https://github.com/marc-aurele-besner/foundry-test-utility
Test utility for Foundry
https://github.com/marc-aurele-besner/foundry-test-utility
ethereum foundry solidity utility
Last synced: about 1 month ago
JSON representation
Test utility for Foundry
- Host: GitHub
- URL: https://github.com/marc-aurele-besner/foundry-test-utility
- Owner: marc-aurele-besner
- License: mit
- Created: 2022-09-30T00:56:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T07:28:54.000Z (3 months ago)
- Last Synced: 2025-03-28T22:11:16.153Z (about 2 months ago)
- Topics: ethereum, foundry, solidity, utility
- Language: Solidity
- Homepage:
- Size: 153 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/js/foundry-test-utility)# foundry-test-utility
```
______ _ _______ _ _ _ _ _ _ _ _
| ____| | | |__ __| | | | | | | | (_) (_) |
| |__ ___ _ _ _ __ __| |_ __ _ _ ______| | ___ ___| |_ ______| | | | |_ _| |_| |_ _ _
| __/ _ \| | | | '_ \ / _` | '__| | | |______| |/ _ \/ __| __|______| | | | __| | | | __| | | |
| | | (_) | |_| | | | | (_| | | | |_| | | | __/\__ \ |_ | |__| | |_| | | | |_| |_| |
|_| \___/ \__,_|_| |_|\__,_|_| \__, | |_|\___||___/\__| \____/ \__|_|_|_|\__|\__, |
__/ | __/ |
|___/ |___/
```This package aim to deliver a set of reusable contracts and helper function that can be reused and override in your own [Foundry](https://github.com/foundry-rs) tests.
## To add yo your project
First install the package using NPM, Yarn or Forge Install.
```bash
npm i foundry-test-utility
```or
```bash
yarn add foundry-test-utility
```or
```bash
foundry install marc-aurele-besner/foundry-test-utility
```Then add this package path in remapping.text
For NPM/Yarn
```bash
foundry-test-utility/contracts/=node_modules/foundry-test-utility/contracts
```For Forge Install
```bash
foundry-test-utility/contracts/=libs/foundry-test-utility/contracts```
## Directories
- [contracts/](./contracts/)
- [.npmignore](./.npmignore)
- [.prettierignore](./.prettierignore)
- [.prettierrc](./.prettierrc)
- [CONTRIBUTING.md](./CONTRIBUTING.md)
- [LICENSE](./LICENSE)
- [README.md](./README.md)
- [awesome-readme.config.js](./awesome-readme.config.js)
- [foundry.toml](./foundry.toml)
- [package-lock.json](./package-lock.json)
- [package.json](./package.json)
- [remappings.txt](./remappings.txt)
- [renovate.json](./renovate.json)## Reference
This repository include helper contracts from:
- [Forge-std](https://github.com/foundry-rs/forge-std)
- [DS-Test](https://github.com/dapphub/ds-test)## Directory Tree
```
foundry-test-utility/
│ .npmignore
│ .prettierignore
│ .prettierrc
│ CONTRIBUTING.md
│ LICENSE
│ README.md
│ awesome-readme.config.js
│ foundry.toml
│ package-lock.json
│ package.json
│ remappings.txt
│ renovate.json
└─── contracts/
│ MockERC1155.t.sol
│ MockERC1155Upgradeable.t.sol
│ MockERC20.t.sol
│ MockERC20Upgradeable.t.sol
│ MockERC721.t.sol
│ MockERC721Upgradeable.t.sol
│ README.md
└─── interfaces/
└─── mock/
└─── shared/
└─── utils/
```## Don't hesitate to contribute to this project.