diff --git a/e2e/expectations-node.ts b/e2e/expectations-node.ts index fedbd7a..803ae64 100644 --- a/e2e/expectations-node.ts +++ b/e2e/expectations-node.ts @@ -77,8 +77,7 @@ export const expectationNodeManagement = { DistributionFrequencySeconds: 112233, EthereumEndpoint: 'http://ganache:7545', SignerEndpoint: 'http://signer:7777', - EthereumDelegationsContract: isValidEthereumAddress, - EthereumRewardsContract: isValidEthereumAddress, + EthereumGenesisContract: isValidEthereumAddress, GuardianAddress: '0x29ce860a2247d97160d6dfc087a15f41e2349087', NodeOrbsAddress: '16fcf728f8dc3f687132f2157d8379c021a08c12', EthereumFirstBlock: 0, diff --git a/src/api/render-node.test.ts b/src/api/render-node.test.ts index c689c99..53d41f9 100644 --- a/src/api/render-node.test.ts +++ b/src/api/render-node.test.ts @@ -109,8 +109,7 @@ test.serial('[integration] getNodeManagement responds according to Ethereum and t.deepEqual(res.services['rewards-service'].Config, { EthereumEndpoint: config.EthereumEndpoint, SignerEndpoint: 'http://signer:7777', - EthereumDelegationsContract: ethereum.getContractAddress('delegations'), - EthereumRewardsContract: ethereum.getContractAddress('rewards'), + EthereumGenesisContract: config.EthereumGenesisContract, GuardianAddress: '0x29ce860a2247d97160d6dfc087a15f41e2349087', NodeOrbsAddress: '16fcf728f8dc3f687132f2157d8379c021a08c12', EthereumFirstBlock: config.EthereumFirstBlock, diff --git a/src/api/render-node.ts b/src/api/render-node.ts index 5eac0b3..7f1fcfc 100644 --- a/src/api/render-node.ts +++ b/src/api/render-node.ts @@ -109,10 +109,6 @@ function getEthereumWriter(snapshot: StateSnapshot, config: ServiceConfiguration function getRewardsService(snapshot: StateSnapshot, config: ServiceConfiguration) { const version = snapshot.CurrentImageVersions['main']['rewards-service']; if (!version) return undefined; - const delegations = snapshot.CurrentContractAddress['delegations']; - if (!delegations) return undefined; - const rewards = snapshot.CurrentContractAddress['rewards']; - if (!rewards) return undefined; const guardian = _.findKey(snapshot.CurrentOrbsAddress, (orbsAddress) => orbsAddress == config['node-address']); if (!guardian) return undefined; const registration = snapshot.CurrentRegistrationData[guardian]; @@ -131,8 +127,7 @@ function getRewardsService(snapshot: StateSnapshot, config: ServiceConfiguration DistributionFrequencySeconds: frequency > 0 ? frequency : undefined, EthereumEndpoint: config.EthereumEndpoint, SignerEndpoint: 'http://signer:7777', - EthereumDelegationsContract: delegations, - EthereumRewardsContract: rewards, + EthereumGenesisContract: config.EthereumGenesisContract, GuardianAddress: `0x${guardian}`, NodeOrbsAddress: config['node-address'], EthereumFirstBlock: config.EthereumFirstBlock,