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: Update README (SC-4647) #15

Merged
merged 2 commits into from
Jan 26, 2022
Merged
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
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
# ERC20 Helper
# ERC20Helper

[![CircleCI](https://circleci.com/gh/maple-labs/erc20-helper/tree/main.svg?style=svg)](https://circleci.com/gh/maple-labs/erc20-helper/tree/main) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

**DISCLAIMER: This code has NOT been externally audited and is actively being developed. Please do not use in production without taking the appropriate steps to ensure maximum security.**
**DISCLAIMER: Please do not use in production without taking the appropriate steps to ensure maximum security.**

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.
**WARNING: Unlike other similar libraries, this library does NOT REVERT ON FAILURES. Any contracts that inherit this code that expect the reversion to occur in this contract can have UNINTENDED AND POTENTIALLY CATASTROPHIC CONSEQUENCES.**

Note, unlike other similar libraries, this library does not revert on failures, so it can be more flexible for contracts that:
ERC20Helper is a basic library designed to be used as a middleware between general smart contracts and diverse ERC-20 tokens. It standardizes the behaviours of all commonly used implementations.

The decision to intentionally not revert was so that this library 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:

```
## Testing and Development
### Setup
```sh
git clone [email protected]:maple-labs/erc20-helper.git
cd erc20-helper
dapp update
make test
```
### Running Tests
- To run all tests: `make test` (runs `./test.sh`)
- To run a specific test function: `./test.sh -t <test_name>` (e.g., `./test.sh -t test_fundLoan`)

This project was built using [dapptools](https://github.com/dapphub/dapptools).

## Audit Reports
| Auditor | Report link |
|---|---|
Expand Down