Skip to content

maple-labs/erc20

Repository files navigation

ERC-20

Foundry CI License: AGPL v3

Overview

Basic ERC-20 contract designed to be inherited and extended. Leveraging native overflow checks in solc 0.8 to simplify ERC-20 implementation. It should be noted that this ERC-20 implementation does not include some functionality that is commonly used in other tokens, such as:

  • address(0) checks on _transfer
  • push
  • pull

This was intentional, as this ERC-20 was intended to have the minimum functionality necessary, allowing for maximum extendability and customizability.

This token implementation includes ERC-2612 permit capability as well as increaseAllowance and decreaseAllowance functions.

Setup

This project was built using Foundry. Refer to installation instructions here.

git clone [email protected]:maple-labs/erc20.git
cd erc20
forge install

Running Tests

  • To run all tests: forge test
  • To run specific tests: forge test --match <test_name>

./scripts/test.sh is used to enable Foundry profile usage with the -p flag. Profiles are used to specify the number of fuzz runs.

Acknowledgements

These contracts were inspired by and/or directly modified from the following sources:

Audit Reports

Auditor Report link
Trail of Bits ToB Report - April 12, 2022
Code 4rena C4 Report - April 20, 2022

Bug Bounty

For all information related to the ongoing bug bounty for these contracts run by Immunefi, please visit this site.

About Maple

Maple is a decentralized corporate credit market. Maple provides capital to institutional borrowers through globally accessible fixed-income yield opportunities.

For all technical documentation related to the Maple protocol, please refer to the GitHub wiki.