Skip to content

Commit

Permalink
Transfer chaosnet owner role when deploying beacon sortition pool
Browse files Browse the repository at this point in the history
  • Loading branch information
pdyraga committed Sep 22, 2022
1 parent 6009296 commit 2b11100
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import type { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { getNamedAccounts, deployments, helpers } = hre
const { deployer } = await getNamedAccounts()
const { deployer, chaosnetOwner } = await getNamedAccounts()
const { execute } = deployments
const { to1e18 } = helpers.number

const POOL_WEIGHT_DIVISOR = to1e18(1) // TODO: Update value
Expand All @@ -18,6 +19,13 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
waitConfirmations: 1,
})

await execute(
"BeaconSortitionPool",
{ from: deployer },
"transferChaosnetOwnerRole",
chaosnetOwner
)

if (hre.network.tags.etherscan) {
await helpers.etherscan.verify(BeaconSortitionPool)
}
Expand Down
5 changes: 5 additions & 0 deletions solidity/random-beacon/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ const config: HardhatUserConfig = {
goerli: 0,
// mainnet: ""
},
chaosnetOwner: {
default: 3,
goerli: 0,
// mainnet: ""
},
},
external: {
contracts:
Expand Down

0 comments on commit 2b11100

Please sign in to comment.