Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Whitespace, natspec, checksum #13

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)));
}

}