Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
authorize ESM as per new instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
SidestreamColdMelon committed Jan 23, 2024
1 parent 4d90e4b commit 4435450
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DssSpell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ contract DssSpellAction is DssAction {
string public constant dao_resolutions = "QmVtqkYtx61wEeM5Hb92dGA3TMZ9F1Z5WDSNwcszqxiF1w";

address internal constant RWA009_A_INPUT_CONDUIT_URN_USDC = 0xddd021b7e3Bfbad19c7D455EB7976DCe51180141;
address internal immutable MCD_ESM = DssExecLib.esm();

function actions() public override {
// ---------- Stability Fee Changes ----------
Expand Down Expand Up @@ -154,6 +155,9 @@ contract DssSpellAction is DssAction {
// Forum: https://forum.makerdao.com/t/rwa009-hvbank-mip21-token-ces-domain-team-assessment/15861/15
DssExecLib.setChangelogAddress("RWA009_A_INPUT_CONDUIT_URN_USDC", RWA009_A_INPUT_CONDUIT_URN_USDC);

// Goerli - Call <conduit>.rely(MCD_ESM) to allow ESM module to deny the pause proxy in SwapInputConduit contracts
DssExecLib.authorize(RWA009_A_INPUT_CONDUIT_URN_USDC, MCD_ESM);

// Note: bump chainlog version, due to the added key
DssExecLib.setChangelogVersion("1.17.2");

Expand Down
23 changes: 23 additions & 0 deletions src/DssSpell.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,27 @@ contract DssSpellTest is DssSpellTestBase {
}

// SPELL-SPECIFIC TESTS GO BELOW
function testEsmAuth() public {
string[1] memory esmAuthorisedContractKeys = [
"RWA009_A_INPUT_CONDUIT_URN_USDC"
];

for (uint256 i = 0; i < esmAuthorisedContractKeys.length; i++) {
assertEq(
WardsAbstract(addr.addr(_stringToBytes32(esmAuthorisedContractKeys[i]))).wards(address(esm)),
0,
_concat("testEsmAuth/ward-esm-not-0/", esmAuthorisedContractKeys[i])
);
}
_vote(address(spell));
_scheduleWaitAndCast(address(spell));
assertTrue(spell.done());
for (uint256 i = 0; i < esmAuthorisedContractKeys.length; i++) {
assertEq(
WardsAbstract(addr.addr(_stringToBytes32(esmAuthorisedContractKeys[i]))).wards(address(esm)),
1,
_concat("testEsmAuth/ward-esm-not-1/", esmAuthorisedContractKeys[i])
);
}
}
}

0 comments on commit 4435450

Please sign in to comment.