Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mainnet spell 2024-09-27 #431

Merged
merged 16 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all :; DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$(shell cat DssExecLib.address)' \
DAPP_BUILD_OPTIMIZE=1 DAPP_BUILD_OPTIMIZE_RUNS=1 \
DAPP_BUILD_OPTIMIZE=0 DAPP_BUILD_OPTIMIZE_RUNS=200 \
DAPP_REMAPPINGS=$$(cat remappings.txt) \
dapp --use solc:0.8.16 build
clean :; forge clean
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-dssspell-forge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ done
DSS_EXEC_LIB=$(< DssExecLib.address)
echo "Using DssExecLib at: $DSS_EXEC_LIB"
export FOUNDRY_LIBRARIES="lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:$DSS_EXEC_LIB"
export FOUNDRY_OPTIMIZER=true
export FOUNDRY_OPTIMIZER_RUNS=1
export FOUNDRY_OPTIMIZER=false
export FOUNDRY_OPTIMIZER_RUNS=200
export FOUNDRY_ROOT_CHAINID=1

TEST_ARGS=''
Expand Down
543 changes: 156 additions & 387 deletions src/DssSpell.sol

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/DssSpell.t.base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ contract DssSpellTestBase is Config, DssTest {
SUsdsLike susds = SUsdsLike( addr.addr("SUSDS"));
UsdsJoinLike usdsJoin = UsdsJoinLike( addr.addr("USDS_JOIN"));
DSTokenAbstract gov = DSTokenAbstract( addr.addr("MCD_GOV"));
DSTokenAbstract mkr = DSTokenAbstract( addr.addr("MCD_GOV"));
GemAbstract sky = GemAbstract( addr.addr("SKY"));
EndAbstract end = EndAbstract( addr.addr("MCD_END"));
ESMAbstract esm = ESMAbstract( addr.addr("MCD_ESM"));
Expand Down Expand Up @@ -2579,7 +2580,7 @@ contract DssSpellTestBase is Config, DssTest {
uint256 lotRad = vow.bump() * split.burn() / WAD;
uint256 payWad = (vow.bump() - lotRad) / RAY;

uint256 pbalancePauseProxy = pair.balanceOf(pauseProxy);
uint256 pskyBalancePauseProxy = sky.balanceOf(pauseProxy);
uint256 pdaiVow = vat.dai(address(vow));
uint256 preserveUsds = usds.balanceOf(address(pair));
uint256 preserveSky = sky.balanceOf(address(pair));
Expand All @@ -2593,9 +2594,9 @@ contract DssSpellTestBase is Config, DssTest {

vow.flap();

assertGt(pair.balanceOf(pauseProxy), pbalancePauseProxy, "TestError/Flapper/pair-pauseProxy-balance-no-increase");
assertGt(sky.balanceOf(pauseProxy), pskyBalancePauseProxy, "TestError/Flapper/unexpected-sky-pause-proxy-balance");
assertLt(sky.balanceOf(address(pair)), preserveSky, "TestError/Flapper/unexpected-sky-pair-balance");
assertEq(usds.balanceOf(address(pair)), preserveUsds + lotRad / RAY, "TestError/Flapper/invalid-usds-pair-balance-increase");
assertEq(sky.balanceOf(address(pair)), preserveSky, "TestError/Flapper/unexpected-sky-pair-balance-change");
assertEq(pdaiVow - vat.dai(address(vow)), vow.bump(), "TestError/Flapper/invalid-vat-dai-vow-change");
assertEq(usds.balanceOf(address(flap)), 0, "TestError/Flapper/invalid-usds-balance");
assertEq(sky.balanceOf(address(flap)), 0, "TestError/Flapper/invalid-sky-balance");
Expand Down
493 changes: 137 additions & 356 deletions src/DssSpell.t.sol

Large diffs are not rendered by default.

61 changes: 0 additions & 61 deletions src/dependencies/01-usds/UsdsInit.sol

This file was deleted.

24 changes: 0 additions & 24 deletions src/dependencies/01-usds/UsdsInstance.sol

This file was deleted.

71 changes: 0 additions & 71 deletions src/dependencies/02-susds/SUsdsInit.sol

This file was deleted.

22 changes: 0 additions & 22 deletions src/dependencies/02-susds/SUsdsInstance.sol

This file was deleted.

57 changes: 0 additions & 57 deletions src/dependencies/03-sky/SkyInit.sol

This file was deleted.

22 changes: 0 additions & 22 deletions src/dependencies/03-sky/SkyInstance.sol

This file was deleted.

Loading
Loading