-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb1a80a
commit a4bd14e
Showing
4 changed files
with
74 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
const addresses = require("../../utils/addresses"); | ||
const { deploymentWithGovernanceProposal } = require("../../utils/deploy"); | ||
|
||
module.exports = deploymentWithGovernanceProposal( | ||
{ | ||
deployName: "108_vault_upgrade", | ||
forceDeploy: false, | ||
//forceSkip: true, | ||
reduceQueueTime: true, | ||
deployerIsProposer: false, | ||
proposalId: "", | ||
}, | ||
async ({ deployWithConfirmation }) => { | ||
// Deployer Actions | ||
// ---------------- | ||
|
||
// 1. Deploy new OETH Vault Core and Admin implementations | ||
const dVaultCore = await deployWithConfirmation( | ||
"OETHVaultCore", | ||
[addresses.mainnet.WETH], | ||
null, | ||
false, | ||
{}, // libraries | ||
3800000, // gasLimit | ||
false // useFeeData | ||
); | ||
const dVaultAdmin = await deployWithConfirmation( | ||
"OETHVaultAdmin", | ||
[addresses.mainnet.WETH], | ||
null, | ||
false, | ||
{}, // libraries | ||
3200000, // gasLimit | ||
false // useFeeData | ||
); | ||
|
||
// 2. Connect to the OETH Vault as its governor via the proxy | ||
const cVaultProxy = await ethers.getContract("OETHVaultProxy"); | ||
const cVault = await ethers.getContractAt("IVault", cVaultProxy.address); | ||
|
||
// Governance Actions | ||
// ---------------- | ||
return { | ||
name: "Upgrade OETH Vault", | ||
actions: [ | ||
// 1. Upgrade the OETH Vault proxy to the new core vault implementation | ||
{ | ||
contract: cVaultProxy, | ||
signature: "upgradeTo(address)", | ||
args: [dVaultCore.address], | ||
}, | ||
// 2. Set OETH Vault proxy to the new admin vault implementation | ||
{ | ||
contract: cVault, | ||
signature: "setAdminImpl(address)", | ||
args: [dVaultAdmin.address], | ||
}, | ||
{ | ||
// 3. Set async claim delay to 10 minutes | ||
contract: cVault, | ||
signature: "setWithdrawalClaimDelay(uint256)", | ||
args: [10 * 60], // 10 mins | ||
}, | ||
], | ||
}; | ||
} | ||
); |