Skip to content

Commit

Permalink
test: make TokensTestSuite work
Browse files Browse the repository at this point in the history
Yes, forked USDT is as fucked up as the mainnet one.
And this mate spent 8 cents to remind us about it:
`0xff22cc981468f5ac9e2eddd269bd96b32f374cf1624f2db1b16e3fce0b994a73`
  • Loading branch information
lekhovitsky committed Oct 21, 2023
1 parent cf7f733 commit 2d70d93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/test/suites/TokensTestSuite.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pragma solidity ^0.8.17;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import {WETHMock} from "../mocks/token/WETHMock.sol";
import {ERC20BlacklistableMock} from "../mocks/token/ERC20Blacklistable.sol";
Expand All @@ -26,6 +27,8 @@ import {TokenData, TokensDataLive, TokenType} from "@gearbox-protocol/sdk-gov/co
import {NetworkDetector} from "@gearbox-protocol/sdk-gov/contracts/NetworkDetector.sol";

contract TokensTestSuite is Test, TokensTestSuiteHelper {
using SafeERC20 for IERC20;

mapping(Tokens => address) public addressOf;
mapping(Tokens => string) public symbols;
mapping(Tokens => uint256) public prices;
Expand Down Expand Up @@ -183,7 +186,7 @@ contract TokensTestSuite is Test, TokensTestSuiteHelper {

if (balance > 0) {
vm.prank(account);
IERC20(token).transfer(address(type(uint160).max), balance);
IERC20(token).safeTransfer(address(type(uint160).max), balance);
}
}
}
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
libs = ['lib']
out = 'forge-out'
solc_version = '0.8.17'
evm_version = 'shanghai'
src = 'contracts'
optimizer_runs = 12000

Expand Down

0 comments on commit 2d70d93

Please sign in to comment.