-
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.
Add governance proposal to transfer out Morpho tokens (#2305)
* Add governance proposal to transfer out Morpho tokens * prettify * Tweaks to deploy script * Rename deployment ID to 110
- Loading branch information
1 parent
de0cf23
commit d71e7a9
Showing
2 changed files
with
99 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
const { deploymentWithGovernanceProposal } = require("../../utils/deploy"); | ||
|
||
module.exports = deploymentWithGovernanceProposal( | ||
{ | ||
deployName: "110_transfer_morpho", | ||
forceDeploy: false, | ||
forceSkip: true, | ||
skipSimulation: true, | ||
reduceQueueTime: true, | ||
deployerIsProposer: false, | ||
proposalId: "", | ||
}, | ||
async () => { | ||
const cOUSDMorphoAaveProxy = await ethers.getContract( | ||
"MorphoAaveStrategyProxy" | ||
); | ||
const cOUSDMorphoCompoundProxy = await ethers.getContract( | ||
"MorphoCompoundStrategyProxy" | ||
); | ||
const cOETHMorphoAaveProxy = await ethers.getContract( | ||
"OETHMorphoAaveStrategyProxy" | ||
); | ||
|
||
const cOUSDMorphoAave = await ethers.getContractAt( | ||
"InitializableAbstractStrategy", | ||
cOUSDMorphoAaveProxy.address | ||
); | ||
const cOUSDMorphoCompound = await ethers.getContractAt( | ||
"InitializableAbstractStrategy", | ||
cOUSDMorphoCompoundProxy.address | ||
); | ||
const cOETHMorphoAave = await ethers.getContractAt( | ||
"InitializableAbstractStrategy", | ||
cOETHMorphoAaveProxy.address | ||
); | ||
|
||
const morpho = await ethers.getContractAt( | ||
"IERC20", | ||
"0x9994e35db50125e0df82e4c2dde62496ce330999" | ||
); | ||
|
||
const ousdAaveBalance = await morpho.balanceOf(cOUSDMorphoAave.address); | ||
const ousdCompBalance = await morpho.balanceOf(cOUSDMorphoCompound.address); | ||
const oethAaveBalance = await morpho.balanceOf(cOETHMorphoAave.address); | ||
|
||
// Governance Actions | ||
// ---------------- | ||
return { | ||
name: "Transfer Morpho Tokens from Strategies to the Guardian", | ||
actions: [ | ||
{ | ||
contract: cOUSDMorphoAave, | ||
signature: "transferToken(address,uint256)", | ||
args: [morpho.address, ousdAaveBalance], | ||
}, | ||
{ | ||
contract: cOUSDMorphoCompound, | ||
signature: "transferToken(address,uint256)", | ||
args: [morpho.address, ousdCompBalance], | ||
}, | ||
{ | ||
contract: cOETHMorphoAave, | ||
signature: "transferToken(address,uint256)", | ||
args: [morpho.address, oethAaveBalance], | ||
}, | ||
], | ||
}; | ||
} | ||
); |
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