Skip to content
/ forge-template Public template

This is a template to quickly setup a project using Forge

License

Notifications You must be signed in to change notification settings

PraneshASP/forge-template

Repository files navigation

Forge Template

Template for Forge project based on https://github.com/soliditylabs/forge-erc20-template.

Getting Started

Click Use this template on Github to create a new repository with this repo as the initial state.

Or run (also works for existing projects):

forge init --template https://github.com/PraneshASP/forge-template
git submodule update --init --recursive
forge install

Directory structure

lib
├─ forge-std — https://github.com/brockelmore/forge-std
├─ openzeppelin-contracts — https://github.com/OpenZeppelin/openzeppelin-contracts
src
├─ tests
│  └─ Faucet.t.sol — "Simple base setup for tests"
├─ Facuet.sol — "A Simple starter for the Faucet contract"
└─ MockERC20.sol — "A mock erc20 token for the faucet"

Development

Compilation

forge build

Testing

forge test

To run tests with console outputs (console.logs()):

forge test -vv

Deployment

Copy the .env.example file to .env and update the values.

First, deploy the MockERC20 to Kovan:

./scripts/deploy_token_kovan.sh

Then, deploy the Faucet to Kovan:

./scripts/deploy_faucet_kovan.sh

Configure Foundry

Using foundry.toml, Foundry is easily configurable.

For a full list of configuration options, see the Foundry configuration documentation.

License

MIT

Acknowledgements

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

About

This is a template to quickly setup a project using Forge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published