diff --git a/deploy/main/008_deploy_roles_oracle.ts b/deploy/main/008_deploy_roles_oracle.ts index f34b4304..d0e3b48c 100644 --- a/deploy/main/008_deploy_roles_oracle.ts +++ b/deploy/main/008_deploy_roles_oracle.ts @@ -11,6 +11,8 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) if (await read('StakeRegistry', { from: deployer }, 'hasRole', adminRole)) { const redisAddress = (await get('Redistribution')).address; const updaterRole = await read('PriceOracle', 'PRICE_UPDATER_ROLE'); + // We need to do this here and not in constructor as oracle is deployed before redis in order of deployment so it would be old + // redis assigned, could be solved with calculating the contract address await execute('PriceOracle', { from: deployer }, 'grantRole', updaterRole, redisAddress); } else { log('DEPLOYER NEEDS TO HAVE ADMIN ROLE TO ASSIGN THE REDISTRIBUTION ROLE, PLEASE ASSIGN IT OR GRANT ROLE MANUALLY');