diff --git a/.circleci/config.yml b/.circleci/config.yml index 9344a41..a143e07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,23 +1,23 @@ version: 2.1 jobs: - dapp_test: - docker: - - image: bakii0499/dapptools:0.48.0-solc-0.8.7 - steps: - - run: - name: Checkout erc20-helper - command: | - GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone git@github.com:maple-labs/erc20-helper.git . - git checkout $CIRCLE_BRANCH - - run: - name: Build and test contracts - command: | - GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git submodule update --init --recursive - ./test.sh -c ./config/ci.json + dapp_test: + docker: + - image: bakii0499/dapptools:0.48.0-solc-0.8.7 + steps: + - run: + name: Checkout erc20-helper + command: | + GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone git@github.com:maple-labs/erc20-helper.git . + git checkout $CIRCLE_BRANCH + - run: + name: Build and test contracts + command: | + GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git submodule update --init --recursive + ./test.sh -c ./config/ci.json workflows: - version: 2 - test_all: - jobs: - - dapp_test: - context: seth + version: 2 + test_all: + jobs: + - dapp_test: + context: seth diff --git a/.gitignore b/.gitignore index bfabe57..3421066 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ /out hevm* -.vscode/* \ No newline at end of file +.vscode/* +artifacts/* +docs/* +metadata.json diff --git a/package.yaml b/package.yaml index ae4eb94..b218425 100644 --- a/package.yaml +++ b/package.yaml @@ -4,4 +4,5 @@ source: src packages: - path: src/ERC20Helper.sol contractName: ERC20Helper + customChecksum: 0xd7fe2d90a5d342dce7b236f581d29dd0be53ed987f2cfedb8ad5e093565cdf50 customDescription: ERC20Helper Artifacts and ABIs diff --git a/src/ERC20Helper.sol b/src/ERC20Helper.sol index 54d2db6..de45af7 100644 --- a/src/ERC20Helper.sol +++ b/src/ERC20Helper.sol @@ -5,8 +5,6 @@ import { IERC20Like } from "./interfaces/IERC20Like.sol"; /** * @title Small Library to standardize erc20 token interactions. - * @dev Code taken from https://github.com/maple-labs/erc20-helper - * @dev Acknowledgements to Solmate, OpenZeppelin, and Uniswap-V3 for inspiring this code. */ library ERC20Helper { @@ -34,12 +32,12 @@ library ERC20Helper { } function _call(address token_, bytes memory data_) private returns (bool success_) { - if (token_.code.length == 0) return false; + if (token_.code.length == uint256(0)) return false; bytes memory returnData; ( success_, returnData ) = token_.call(data_); - return success_ && (returnData.length == 0 || abi.decode(returnData, (bool))); + return success_ && (returnData.length == uint256(0) || abi.decode(returnData, (bool))); } }