Skip to content

Commit

Permalink
Add coordinator address to the WalletCoordinator contract (#626)
Browse files Browse the repository at this point in the history
Refs #622 

The coordinator is EOA which will propose sweeps through the
`WalletCoordinator` contract. The first coordinator address is
controlled by the dev team but the DAO can add and remove coordinator
addresses as they wish.

The deployment scripts have been tested on Goerli and resulted in
deploying and setting up this contract:
https://goerli.etherscan.io/address/0x61120BAdeb77b27f4d933472AD6f93484238F6A3.
  • Loading branch information
nkuba authored May 17, 2023
2 parents a18663d + 974cc44 commit 9fcc8e7
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 2 deletions.
20 changes: 20 additions & 0 deletions solidity/deploy/35_add_coordinator_address.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { HardhatRuntimeEnvironment } from "hardhat/types"
import { DeployFunction } from "hardhat-deploy/types"

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { getNamedAccounts, deployments } = hre
const { execute } = deployments
const { deployer, coordinator } = await getNamedAccounts()

await execute(
"WalletCoordinator",
{ from: deployer, log: true, waitConfirmations: 1 },
"addCoordinator",
coordinator
)
}

export default func

func.tags = ["AddCoordinatorAddress"]
func.dependencies = ["WalletCoordinator"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
export default func

func.tags = ["TransferWalletCoordinatorOwnership"]
func.dependencies = ["WalletCoordinator"]
func.dependencies = ["AddCoordinatorAddress"]
func.runAtTheEnd = true
7 changes: 6 additions & 1 deletion solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,13 @@ const config: HardhatUserConfig = {
goerli: 0,
// We are not setting SPV maintainer for mainnet in deployment scripts.
},
v1Redeemer: {
coordinator: {
default: 9,
goerli: "0x4815cd81fFc21039a25aCFbD97CE75cCE8579042",
mainnet: "0x0595acCca29654c43Bd67E18578b30a405265234",
},
v1Redeemer: {
default: 10,
goerli: 0,
mainnet: "0x8Bac178fA95Cb56D11A94d4f1b2B1F5Fc48A30eA",
},
Expand Down

0 comments on commit 9fcc8e7

Please sign in to comment.