Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdecr1pto committed Aug 24, 2023
1 parent 3b6f531 commit f7f6dba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
28 changes: 26 additions & 2 deletions src/DssSpell.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ interface ProxyLike {
function exec(address target, bytes calldata args) external payable returns (bytes memory out);
}

interface ERC20Proxy {
function erc20Impl() external returns (address);

function totalSupply() external returns (uint256);
}

interface ERC20Impl {
function erc20Store() external returns (address);
}

interface ERC20Store {
function setTotalSupply(uint256 _newTotalSupply) external;

function setBalance(address _owner, uint256 _newBalance) external;
}

contract DssSpellTest is DssSpellTestBase {
string config;
RootDomain rootDomain;
Expand Down Expand Up @@ -641,7 +657,7 @@ contract DssSpellTest is DssSpellTestBase {
}
}

function testMKRPayments() public { // make public to enable
function testMKRPayments() private { // make public to enable
// For each payment, create a Payee object with
// the Payee address,
// the amount to be paid
Expand Down Expand Up @@ -1001,7 +1017,15 @@ contract DssSpellTest is DssSpellTestBase {
uint256 urnBalanceBefore = dai.balanceOf(rwa015AUrn);
uint256 jarBalanceBefore = dai.balanceOf(rwa015AJar);

GodMode.setBalance(address(gusd), address(this), 2 * gusdAmt);
// Add GUSD blance
address impl = ERC20Proxy(address(gusd)).erc20Impl();
ERC20Store store = ERC20Store(ERC20Impl(impl).erc20Store());

vm.startPrank(impl);
store.setBalance(address(this), 2 * gusdAmt);
store.setTotalSupply(gusd.totalSupply() + 2 * gusdAmt);
vm.stopPrank();

GodMode.setBalance(address(pax), address(this), 2 * paxAmt);

// transfer GUSD to input conduit's
Expand Down
2 changes: 1 addition & 1 deletion src/test/config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ contract Config {
//
// Values for all system configuration changes
//
afterSpell.line_offset = 650 * MILLION; // Offset between the global line against the sum of local lines
afterSpell.line_offset = 680 * MILLION; // Offset between the global line against the sum of local lines
afterSpell.pot_dsr = 5_00; // In basis points
afterSpell.pause_delay = 48 hours; // In seconds
afterSpell.vow_wait = 156 hours; // In seconds
Expand Down

0 comments on commit f7f6dba

Please sign in to comment.