3.2.0 • Published 1 year ago
@lambdalf-dev/ethereum-contracts v3.2.0
Ethereum Contracts
This project is an attempt to create a more efficient implementation of the common interface IERC721 compared to Open Zeppelin's implementation.
What's Inside
- Forge: compile, test, fuzz, format, and deploy smart contracts
- Forge Std: collection of helpful contracts and utilities for testing
Installation
Foundry typically uses git submodules to manage dependencies, but this template uses Node.js packages because submodules don't scale.
This is how to install dependencies:
- Install the dependency using your preferred package manager, e.g.
yarn install dependency-name- Use this syntax to install from GitHub:
yarn install github:username/repo-name
- Use this syntax to install from GitHub:
- Add a remapping for the dependency in remappings.txt, e.g.
dependency-name=node_modules/dependency-name
Usage
Build/Compile
Build the contracts:
yarn buildforge buildforge compile
Clean
Delete the build artifacts and cache directories:
yarn cleanforge clean
Coverage
Get a test coverage report:
yarn coverageforge coverage
Gas Report
Get a gas report:
yarn gasforge test --gas-report
Lint
Format the contracts:
yarn lintforge fmt check
Test
Run all tests:
yarn testforge test
Run all tests with verbose output:
yarn test:verboseforge test -vvvv
Run all unit tests (test name starts with "testunit"):
yarn test:unitforge test --mt test_unit_
Run all fuzz tests (test name starts with "testfuzz"):
yarn test:fuzzforge test --mt test_fuzz_
Run all edge tests (test name starts with "testedge"):
yarn test:edgeforge test --mt test_edge_