-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add governance script to wrap Morpho tokens
- Loading branch information
1 parent
f7a0d5a
commit 12d2796
Showing
2 changed files
with
53 additions
and
1 deletion.
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,52 @@ | ||
const addresses = require("../../utils/addresses"); | ||
const { deploymentWithGovernanceProposal } = require("../../utils/deploy"); | ||
|
||
module.exports = deploymentWithGovernanceProposal( | ||
{ | ||
deployName: "111_morpho_wrap_and_transfer", | ||
forceDeploy: false, | ||
// forceSkip: true, | ||
skipSimulation: true, | ||
reduceQueueTime: true, | ||
deployerIsProposer: false, | ||
proposalId: "", | ||
}, | ||
async () => { | ||
const { strategistAddr } = await getNamedAccounts(); | ||
|
||
const cLegacyMorpho = await ethers.getContractAt( | ||
[ | ||
"function approve(address,uint256) external", | ||
"function balanceOf(address) external view returns(uint256)", | ||
], | ||
"0x9994E35Db50125E0DF82e4c2dde62496CE330999" | ||
); | ||
|
||
const cWrapperContract = await ethers.getContractAt( | ||
["function depositFor(address,uint256) external"], | ||
"0x9D03bb2092270648d7480049d0E58d2FcF0E5123" | ||
); | ||
|
||
const currentBalance = await cLegacyMorpho.balanceOf( | ||
addresses.mainnet.Timelock | ||
); | ||
|
||
// Governance Actions | ||
// ---------------- | ||
return { | ||
name: "Transfer Morpho tokens from Timelock to the Guardian", | ||
actions: [ | ||
{ | ||
contract: cLegacyMorpho, | ||
signature: "approve(address,uint256)", | ||
args: [cWrapperContract.address, currentBalance], | ||
}, | ||
{ | ||
contract: cWrapperContract, | ||
signature: "depositFor(address,uint256)", | ||
args: [strategistAddr, currentBalance], | ||
}, | ||
], | ||
}; | ||
} | ||
); |
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