Skip to content

Commit 11386b9

Browse files
authored
Add governance script to wrap Morpho tokens (#2316)
* Add governance script to wrap Morpho tokens * Add proposal ID * Fix brownie script
1 parent f7a0d5a commit 11386b9

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed

brownie/world_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from world_abstract import *
22

3-
weth = load_contract('ERC20', WETH_BASE)
3+
weth = load_contract('weth', WETH_BASE)
44
aero = load_contract('ERC20', AERO_BASE)
55
oethb = load_contract('ousd', OETHB)
66
woeth = load_contract('ERC20', BRIDGED_WOETH_BASE)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const addresses = require("../../utils/addresses");
2+
const { deploymentWithGovernanceProposal } = require("../../utils/deploy");
3+
4+
module.exports = deploymentWithGovernanceProposal(
5+
{
6+
deployName: "111_morpho_wrap_and_transfer",
7+
forceDeploy: false,
8+
// forceSkip: true,
9+
reduceQueueTime: true,
10+
deployerIsProposer: false,
11+
proposalId:
12+
"52303668283507532886105041405617076369748861896782994594114630508874108983718",
13+
},
14+
async () => {
15+
const { strategistAddr } = await getNamedAccounts();
16+
17+
const cLegacyMorpho = await ethers.getContractAt(
18+
[
19+
"function approve(address,uint256) external",
20+
"function balanceOf(address) external view returns(uint256)",
21+
],
22+
"0x9994E35Db50125E0DF82e4c2dde62496CE330999"
23+
);
24+
25+
const cWrapperContract = await ethers.getContractAt(
26+
["function depositFor(address,uint256) external"],
27+
"0x9D03bb2092270648d7480049d0E58d2FcF0E5123"
28+
);
29+
30+
const currentBalance = await cLegacyMorpho.balanceOf(
31+
addresses.mainnet.Timelock
32+
);
33+
34+
// Governance Actions
35+
// ----------------
36+
return {
37+
name: "Transfer Morpho tokens from Timelock to the Guardian",
38+
actions: [
39+
{
40+
contract: cLegacyMorpho,
41+
signature: "approve(address,uint256)",
42+
args: [cWrapperContract.address, currentBalance],
43+
},
44+
{
45+
contract: cWrapperContract,
46+
signature: "depositFor(address,uint256)",
47+
args: [strategistAddr, currentBalance],
48+
},
49+
],
50+
};
51+
}
52+
);

contracts/deployments/mainnet/.migrations.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,6 @@
9797
"105_ousd_remove_flux_strat": 1724650407,
9898
"106_ousd_metamorpho_usdc": 1725548135,
9999
"107_arm_buyback": 1726909418,
100-
"109_3rd_native_ssv_staking": 1731456871
100+
"109_3rd_native_ssv_staking": 1731456871,
101+
"111_morpho_wrap_and_transfer": 1732639817
101102
}

contracts/utils/deploy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ const submitProposalGnosisSafe = async (
577577
description,
578578
opts = {}
579579
) => {
580-
if (!isMainnet) {
580+
if (!isMainnet && !isFork) {
581581
throw new Error("submitProposalGnosisSafe only works on Mainnet");
582582
}
583583

0 commit comments

Comments
 (0)