Skip to content

Commit

Permalink
chore: Notes in README to explain lack of reverts (SC-4181) (#5)
Browse files Browse the repository at this point in the history
* chore: Notes in README to explain lack of reverts

* Update README.md

Co-authored-by: Lucas Manuel <lucas@maple.finance>
  • Loading branch information
deluca-mike and Lucas Manuel authored Nov 26, 2021
1 parent 1898357 commit 78bcdcc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

Basic library designed to be used as a middleware between general smart contracts diverse erc20 tokens. It standardizes the behaviours of all commonly used implementations.

Note, unlike other similar libraries, this library does not revert on failures, so it can be more flexible for contracts that:
- Want to choose their own revert strings, or none at all (i.e. `require(ERC20Helper.transfer(asset, msg.sender, amount), "FOO:FAILED_TRANSFER");`).
- Want to use the returns as booleans (i.e. `require(ERC20Helper.transfer(asset1, msg.sender, amount) || ERC20Helper.transfer(asset2, msg.sender, amount));`).
- Do not care about the result of a transfer.

To clone, set up and run tests:

```
Expand Down

0 comments on commit 78bcdcc

Please sign in to comment.