Skip to content

Commit 628b491

Browse files
author
Franck
authored
Governance proposal to add DAI to the Compound strategy (#596)
1 parent 7345b88 commit 628b491

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

contracts/scripts/governor/propose.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,26 @@ async function proposeSettingUpdatesArgs() {
820820
return { args, description };
821821
}
822822

823+
async function proposeCompoundDAIArgs() {
824+
const cCompoundStrategyProxy = await ethers.getContract(
825+
"CompoundStrategyProxy"
826+
);
827+
const cCompoundStrategy = await ethers.getContractAt(
828+
"CompoundStrategy",
829+
cCompoundStrategyProxy.address
830+
);
831+
832+
const args = await proposeArgs([
833+
{
834+
contract: cCompoundStrategy,
835+
signature: "setPTokenAddress(address,address)",
836+
args: [addresses.mainnet.DAI, addresses.mainnet.cDAI],
837+
},
838+
]);
839+
const description = "Enable DAI on Compound strategy";
840+
return { args, description };
841+
}
842+
823843
async function proposeWithdrawAllArgs() {
824844
const cAaveStrategyProxy = await ethers.getContract("AaveStrategyProxy");
825845
const cAaveStrategy = await ethers.getContractAt(
@@ -974,6 +994,9 @@ async function main(config) {
974994
} else if (config.withdrawAll) {
975995
console.log("proposeWithdrawAll");
976996
argsMethod = proposeWithdrawAllArgs;
997+
} else if (config.compoundDAI) {
998+
console.log("proposeCompoundDAI");
999+
argsMethod = proposeCompoundDAIArgs;
9771000
} else {
9781001
console.error("An action must be specified on the command line.");
9791002
return;
@@ -1070,6 +1093,7 @@ const config = {
10701093
setAirDropRoot: args["--setAirDropRoot"],
10711094
proposeSettingUpdates: args["--proposeSettingUpdates"],
10721095
withdrawAll: args["--withdrawAll"],
1096+
compoundDAI: args["--compoundDAI"],
10731097
};
10741098

10751099
// Validate arguments.

0 commit comments

Comments
 (0)