Skip to content

Commit

Permalink
chore: add DAI/MKR transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdecr1pto committed Aug 24, 2023
1 parent c87ca1e commit c477c57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
15 changes: 6 additions & 9 deletions src/DssSpell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ contract DssSpellAction is DssAction {
string public constant override description =
"2023-08-30 MakerDAO Executive Spell | Hash: TODO";

GemAbstract internal immutable MKR = GemAbstract(DssExecLib.mkr());
address internal immutable MCD_ESM = DssExecLib.esm();
address internal immutable MCD_VOW = DssExecLib.vow();
address public immutable MCD_VEST_DAI = DssExecLib.getChangelogAddress("MCD_VEST_DAI");
Expand Down Expand Up @@ -77,7 +78,7 @@ contract DssSpellAction is DssAction {
address internal constant RWA015_A_INPUT_CONDUIT_JAR_PAX = 0x79Fc3810735959db3C6D4fc64F7F7b5Ce48d1CEc;

// ---------- Launch Project Transfers ----------
GemAbstract internal immutable mkr = GemAbstract(DssExecLib.mkr());
address internal constant LAUNCH_PROJECT_FUNDING = 0x3C5142F28567E6a0F172fd0BaaF1f2847f49D02F;

// Contracts pulled from Spark official deployment repository
// Spark Proxy: https://github.com/marsfoundation/sparklend/blob/d42587ba36523dcff24a4c827dc29ab71cd0808b/script/output/5/primary-sce-latest.json#L2
Expand All @@ -92,7 +93,6 @@ contract DssSpellAction is DssAction {

DssExecLib.authorize(MCD_VOW, MCD_ESM);


// ---------- BlockTower Andromeda Input Conduit Chainlog Additions ----------
// Forum: http://forum.makerdao.com/t/overlooked-vectors-for-post-shutdown-governance-attacks-postmortem/20696/5

Expand Down Expand Up @@ -132,31 +132,28 @@ contract DssSpellAction is DssAction {
DssExecLib.setChangelogAddress("RWA015_A_INPUT_CONDUIT_URN_USDC", RWA015_A_INPUT_CONDUIT_URN_USDC);
DssExecLib.setChangelogAddress("RWA015_A_INPUT_CONDUIT_JAR_USDC", RWA015_A_INPUT_CONDUIT_JAR_USDC);



// ---------- Chainlog Cleanup ----------
// Discussion: https://github.com/makerdao/spells-mainnet/issues/354

ChainlogLike(DssExecLib.LOG).removeAddress("FLIPPER_MOM");
ChainlogLike(DssExecLib.LOG).removeAddress("FLIP_FAB");

// ---------- Launch Project Dai Transfer ----------
// Discussion: https://github.com/makerdao/spells-mainnet/issues/354
// NOTE: Skip for goerli
// Discussion: https://forum.makerdao.com/t/utilization-of-the-launch-project-under-the-accessibility-scope/21468/4

DssExecLib.sendPaymentFromSurplusBuffer(LAUNCH_PROJECT_FUNDING, 941_993);

// ---------- Launch Project MKR Transfer ----------
// Discussion: https://github.com/makerdao/spells-mainnet/issues/354
// NOTE: Skip for goerli
// Discussion: https://forum.makerdao.com/t/utilization-of-the-launch-project-under-the-accessibility-scope/21468/4

MKR.transfer(LAUNCH_PROJECT_FUNDING, 210.83 ether); // NOTE: 'ether' is a keyword helper, only MKR is transferred here

// ---------- Yank GovAlpha Budget Streams ----------
// Forum: http://forum.makerdao.com/t/overlooked-vectors-for-post-shutdown-governance-attacks-postmortem/20696/5

DssVestLike(MCD_VEST_DAI).yank(17);
DssVestLike(MCD_VEST_MKR_TREASURY).yank(34);


// ---------- Trigger Spark Proxy Spell - Poll ongoing, can cofirm on 2023-08-24 ----------
// Forum: https://forum.makerdao.com/t/phoenix-labs-proposed-changes-for-spark-for-august-18th-spell/21612

Expand Down
25 changes: 5 additions & 20 deletions src/DssSpell.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,15 @@ contract DssSpellTest is DssSpellTestBase {
uint256 amount;
}

function testPayments() private { // make private to disable
function testPayments() public { // make private to disable

// For each payment, create a Payee object with
// the Payee address,
// the amount to be paid in whole Dai units
// Initialize the array with the number of payees
Payee[1] memory payees = [
// ECOSYSTEM ACTOR DAI TRANSFERS
Payee(wallets.addr("LAUNCH_PROJECT_FUNDING"), 2_000_000)
Payee(wallets.addr("LAUNCH_PROJECT_FUNDING"), 941_993)
];

uint256 prevBalance;
Expand Down Expand Up @@ -657,28 +657,13 @@ contract DssSpellTest is DssSpellTestBase {
}
}

function testMKRPayments() private { // make public to enable
function testMKRPayments() public { // make public to enable
// For each payment, create a Payee object with
// the Payee address,
// the amount to be paid
// Initialize the array with the number of payees
Payee[16] memory payees = [
Payee(wallets.addr("DEFENSOR"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("BONAPUBLICA"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("QGOV"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("TRUENAME"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("UPMAKER"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("VIGILANT"), 29.76 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("WBC"), 14.82 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("PALC"), 13.89 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("NAVIGATOR"), 11.24 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("PBG"), 9.92 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("VOTEWIZARD"), 9.92 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("LIBERTAS"), 9.92 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("HARMONY"), 8.93 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("JAG"), 7.61 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("CLOAKY"), 4.30 ether), // NOTE: ether is a keyword helper, only MKR is transferred here
Payee(wallets.addr("SKYNET"), 3.64 ether) // NOTE: ether is a keyword helper, only MKR is transferred here
Payee[1] memory payees = [
Payee(wallets.addr("LAUNCH_PROJECT_FUNDING"), 210.83 ether) // NOTE: ether is a keyword helper, only MKR is transferred here
];

// Calculate and save previous balances
Expand Down

0 comments on commit c477c57

Please sign in to comment.