From e9d1565376fe046566c41a38b9772394a4e041b9 Mon Sep 17 00:00:00 2001 From: "Mark.B" Date: Wed, 11 Sep 2024 22:16:41 +0200 Subject: [PATCH] add some comments --- deploy/main/008_deploy_roles_oracle.ts | 2 ++ 1 file changed, 2 insertions(+) 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');