-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable async withdrawals on superOETHb (#2275)
* Enable async withdrawals on superOETHb * Clean up code * revert modifier change * Update comment * Avoid two reads * Fix base fork tests * A bit more tweaks * Tweak hardhat config a bit * Fix base fork test * Increase optimizer runs * Fix solcover issue * Fix moved file * Slither fixes and a bit more tests * Fix unit tests * Fix bit more tests * Address CR comments * Lint * Remove old values from event * Revert changes to FixedRateDripper * Address CR comments * Fix test
- Loading branch information
1 parent
95ece09
commit f484add
Showing
11 changed files
with
252 additions
and
64 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
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,45 @@ | ||
const { deployOnBaseWithGuardian } = require("../../utils/deploy-l2"); | ||
const { deployWithConfirmation } = require("../../utils/deploy"); | ||
const addresses = require("../../utils/addresses"); | ||
|
||
module.exports = deployOnBaseWithGuardian( | ||
{ | ||
deployName: "019_async_withdrawals", | ||
}, | ||
async ({ ethers }) => { | ||
const cOETHbVaultProxy = await ethers.getContract("OETHBaseVaultProxy"); | ||
const cOETHbVault = await ethers.getContractAt( | ||
"IVault", | ||
cOETHbVaultProxy.address | ||
); | ||
|
||
// Deploy new implementation | ||
const dOETHbVaultCore = await deployWithConfirmation("OETHBaseVaultCore", [ | ||
addresses.base.WETH, | ||
]); | ||
const dOETHbVaultAdmin = await deployWithConfirmation("OETHBaseVaultAdmin"); | ||
|
||
return { | ||
actions: [ | ||
{ | ||
// 1. Upgrade VaultCore | ||
contract: cOETHbVaultProxy, | ||
signature: "upgradeTo(address)", | ||
args: [dOETHbVaultCore.address], | ||
}, | ||
{ | ||
// 2. Upgrade VaultAdmin | ||
contract: cOETHbVault, | ||
signature: "setAdminImpl(address)", | ||
args: [dOETHbVaultAdmin.address], | ||
}, | ||
{ | ||
// 3. Set async claim delay to 1 day | ||
contract: cOETHbVault, | ||
signature: "setWithdrawalClaimDelay(uint256)", | ||
args: [24 * 60 * 60], // 1d | ||
}, | ||
], | ||
}; | ||
} | ||
); |
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,55 @@ | ||
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, | ||
]); | ||
const dVaultAdmin = await deployWithConfirmation("OETHVaultAdmin", [ | ||
addresses.mainnet.WETH, | ||
]); | ||
|
||
// 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 | ||
}, | ||
], | ||
}; | ||
} | ||
); |
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
Oops, something went wrong.