Skip to content

Commit

Permalink
add OD fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daopunk committed Jul 9, 2024
1 parent 482434a commit 478d50b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions script/Common.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import '@script/Registry.s.sol';
import {Test} from 'forge-std/Test.sol';
import {VmSafe} from 'forge-std/Script.sol';
import {Params, ParamChecker, OD, ETH_A, ARB, JOB_REWARD} from '@script/Params.s.sol';
import {AuthorizableUpgradeable} from '@contracts/utils/AuthorizableUpgradeable.sol';
import 'forge-std/console.sol';

abstract contract Common is Contracts, Params, Test {
Expand Down Expand Up @@ -215,12 +216,22 @@ abstract contract Common is Contracts, Params, Test {
if (!isNetworkAnvil()) {
address systemCoinAddress = create2.create2deploy(_systemCoinSalt, _systemCoinInitCode);
systemCoin = ISystemCoin(systemCoinAddress);
systemCoin.initialize('Open Dollar', 'OD');
} else {
systemCoin = new OpenDollar();
if (_isTest && !isNetworkArbitrumSepolia()) {
systemCoin = OpenDollar(0x221A0f68770658C15B525d0F89F5da2baAB5f321);
vm.stopPrank();
vm.startPrank(AuthorizableUpgradeable(address(systemCoin)).authorizedAccounts()[0]);
AuthorizableUpgradeable(address(systemCoin)).addAuthorization(deployer);
vm.stopPrank();
vm.startPrank(deployer);
} else {
systemCoin = new OpenDollar();
systemCoin.initialize('Open Dollar', 'OD');
}
protocolToken = new OpenDollarGovernance();
protocolToken.initialize('Open Dollar Governance', 'ODG');
}
systemCoin.initialize('Open Dollar', 'OD');
address[] memory members = new address[](0);

if (isNetworkAnvil()) {
Expand Down
1 change: 0 additions & 1 deletion test/e2e/E2ELiquidation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ contract E2ELiquidation is Common {
function testAssumptions() public {
assertEq(reth.balanceOf(alice), USER_AMOUNT - DEPOSIT);
assertEq(reth.balanceOf(bob), USER_AMOUNT - DEPOSIT * 3);
assertEq(systemCoin.totalSupply(), 2960 ether);
emitRatio(RETH, aliceNFV.safeHandler); // 135% over-collateralized
readDelayedPrice(RETH);
collateralDevaluation(RETH, ELEVEN_PERCENT); // 11% devaulation
Expand Down

0 comments on commit 478d50b

Please sign in to comment.