diff --git a/README.md b/README.md index 6564db41..e9005079 100644 --- a/README.md +++ b/README.md @@ -180,12 +180,12 @@ Feel free to use public RPCs but if you want extra security and speed, feel free ## Releasing To release a new rc version, tag the commit with the `-rcX` suffix, where `X` is the release candidate number. -For example, to release `v0.4.0-rc1`, execute the following command: `git tag v0.4.0-rc1 && git push origin v0.4.0-rc1`. +For example, to release `v0.9.1-rc1`, execute the following command: `git tag v0.9.1-rc1 && git push origin v0.9.1-rc1`. This will generate Golang source code for the smart contracts and publish it to the [`ethersphere/go-storage-incentives-abi`](https://github.com/ethersphere/go-storage-incentives-abi) repository. It'll also generate .env file with the bytecodes and publish it to the [`ethersphere/docker-setup-contracts`](https://github.com/ethersphere/docker-setup-contracts) repository. The values for the Golang source code and .env file are taken from the [testnet_deployed.json](testnet_deployed.json) file, (see the [Deployment](#deployment) section). To release a new stable version, tag the commit without the `-rcX` suffix. -For example, to release `v0.4.0`, execute the following command: `git tag v0.4.0 && git push origin v0.4.0`. +For example, to release `v0.9.1`, execute the following command: `git tag v0.9.1 && git push origin v0.9.1`. This will generate Golang source code for the smart contracts and publish it to the [`ethersphere/go-storage-incentives-abi`](https://github.com/ethersphere/go-storage-incentives-abi) repository. The values for the Golang source code file are taken from the [mainnet_deployed.json](mainnet_deployed.json) file (see the [Deployment](#deployment) section). diff --git a/deploy/main/005_deploy_roles_postage.ts b/deploy/main/005_deploy_roles_postage.ts index a5c370d3..191fed14 100644 --- a/deploy/main/005_deploy_roles_postage.ts +++ b/deploy/main/005_deploy_roles_postage.ts @@ -7,7 +7,7 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) log('Setting PostageStamps roles'); const adminRole = await read('PostageStamp', 'DEFAULT_ADMIN_ROLE'); - if (await read('PostageStamp', { from: deployer }, 'hasRole', adminRole)) { + if (await read('PostageStamp', 'hasRole', adminRole, deployer)) { const priceOracleRole = await read('PostageStamp', 'PRICE_ORACLE_ROLE'); await execute('PostageStamp', { from: deployer }, 'grantRole', priceOracleRole, (await get('PriceOracle')).address); diff --git a/deploy/main/007_deploy_roles_staking.ts b/deploy/main/007_deploy_roles_staking.ts index c03a2f66..af3823d9 100644 --- a/deploy/main/007_deploy_roles_staking.ts +++ b/deploy/main/007_deploy_roles_staking.ts @@ -7,9 +7,10 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) log('Setting Staking roles'); const adminRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE'); - if (await read('StakeRegistry', { from: deployer }, 'hasRole', adminRole)) { + if (await read('StakeRegistry', 'hasRole', adminRole, deployer)) { const redisRole = await read('StakeRegistry', 'REDISTRIBUTOR_ROLE'); const redisAddress = (await get('Redistribution')).address; + await execute('StakeRegistry', { from: deployer }, 'grantRole', redisRole, redisAddress); } else { log('DEPLOYER NEEDS TO HAVE ADMIN ROLE TO ASSIGN THE REDISTRIBUTION ROLE, PLEASE ASSIGN IT OR GRANT ROLE MANUALLY'); diff --git a/deploy/main/008_deploy_roles_oracle.ts b/deploy/main/008_deploy_roles_oracle.ts index 36dff874..d92fce13 100644 --- a/deploy/main/008_deploy_roles_oracle.ts +++ b/deploy/main/008_deploy_roles_oracle.ts @@ -6,9 +6,9 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) log('Setting Oracles roles'); - const adminRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE'); + const adminRole = await read('PriceOracle', 'DEFAULT_ADMIN_ROLE'); - if (await read('StakeRegistry', { from: deployer }, 'hasRole', adminRole)) { + if (await read('PriceOracle', 'hasRole', adminRole, deployer)) { 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 @@ -23,4 +23,4 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) }; export default func; -func.tags = ['staking_roles', 'roles']; +func.tags = ['oracle_roles', 'roles']; diff --git a/deploy/tenderly/007_deploy_roles_staking.ts b/deploy/tenderly/007_deploy_roles_staking.ts index f6c3419c..03c61e1a 100644 --- a/deploy/tenderly/007_deploy_roles_staking.ts +++ b/deploy/tenderly/007_deploy_roles_staking.ts @@ -11,7 +11,7 @@ const func: DeployFunction = async function ({ deployments, getNamedAccounts }) const redisAddress = (await get('Redistribution')).address; const adminRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE'); - if (await read('StakeRegistry', { from: deployer }, 'hasRole', adminRole, deployer)) { + if (await read('StakeRegistry', 'hasRole', adminRole, deployer)) { const redisRole = await read('StakeRegistry', 'REDISTRIBUTOR_ROLE'); await execute('StakeRegistry', { from: deployer }, 'grantRole', redisRole, redisAddress); } else {