Skip to content

Commit

Permalink
chore: Whitespace, natspec, checksum (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
deluca-mike authored Dec 24, 2021
1 parent 1361ddf commit 5961b58
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
38 changes: 19 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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 [email protected]: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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/out
hevm*
.vscode/*
.vscode/*
artifacts/*
docs/*
metadata.json
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ source: src
packages:
- path: src/ERC20Helper.sol
contractName: ERC20Helper
customChecksum: 0xd7fe2d90a5d342dce7b236f581d29dd0be53ed987f2cfedb8ad5e093565cdf50
customDescription: ERC20Helper Artifacts and ABIs
6 changes: 2 additions & 4 deletions src/ERC20Helper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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)));
}

}

0 comments on commit 5961b58

Please sign in to comment.