-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment script for WalletCoordinator upgrade #643
Conversation
We add a script for WalletCoordinator contract upgrade. The current WalletCoordinator contract deployed to mainnet is owned by Threshold Council, so it cannot be upgraded right away by the deployer. The deployer will deploy a fresh WalletCoordinator contract implementation, then Threshold Council need to execute transactions to upgrade the WalletCoordinator proxy to the new implementation and set the initial values for newely added parameters.
const upgradeTxData = await proxyAdmin.interface.encodeFunctionData( | ||
"upgrade", | ||
[proxyDeployment.address, newImplementationAddress] | ||
) | ||
|
||
deployments.log( | ||
`proxy admin owner ${proxyAdminOwner} is required to upgrade proxy implementation with transaction:\n` + | ||
`\t\tfrom: ${proxyAdminOwner}\n` + | ||
`\t\tto: ${proxyAdmin.address}\n` + | ||
`\t\tdata: ${upgradeTxData}` | ||
) | ||
|
||
// Assemble parameters upgrade transaction. | ||
const walletCoordinator: WalletCoordinator = | ||
await helpers.contracts.getContract("WalletCoordinator") | ||
|
||
const walletCoordinatorOwner = await walletCoordinator.owner() | ||
|
||
const updateRedemptionProposalParametersTxData = | ||
walletCoordinator.interface.encodeFunctionData( | ||
"updateRedemptionProposalParameters", | ||
[7200, 600, 7200, 20, 20000] | ||
) | ||
|
||
deployments.log( | ||
`WalletCoordinator owner ${walletCoordinatorOwner} is required to update redemption proposal parameters with transaction:\n` + | ||
`\t\tfrom: ${walletCoordinatorOwner}\n` + | ||
`\t\tto: ${walletCoordinator.address}\n` + | ||
`\t\tdata: ${updateRedemptionProposalParametersTxData}` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is nice to be able to double-check the data in the simulation but worth noting, this part is not strictly required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, we will simulate with Tenderly first. But we need the new contract to be deployed for that.
We add a script for WalletCoordinator contract upgrade.
The current WalletCoordinator contract deployed to mainnet is owned by Threshold Council, so it cannot be upgraded right away by the deployer.
The deployer will deploy a fresh WalletCoordinator contract implementation, then Threshold Council needs to execute transactions to upgrade the WalletCoordinator proxy to the new implementation and set the initial values for newly added parameters.
Refs: #641