Skip to content
/ foundry-template Public template

Boilerplate for Smart Contract repos using Foundry.

License

Notifications You must be signed in to change notification settings

dewiz-xyz/foundry-template

Repository files navigation

Foundry Template

Template for Smart Contract applications compatible with foundry.

Usage

Install dependencies

# Install tools from the nodejs ecosystem: prettier, solhint, husky and lint-staged
make nodejs-deps
# Install smart contract dependencies through `foundry update`
make update

Create a local .env file and change the placeholder values

cp .env.example .env

Build contracts

make build

Test contracts

make test # using a local node listening on http://localhost:8545
# Or
ETH_RPC_URL='https://eth-goerli.alchemyapi.io/v2/<ALCHEMY_API_KEY>' make test # using a remote node

Helper scripts

Wrapper around forge/cast which figure out wallet and password automatically if you are using geth keystore.

  • scripts/forge-deploy.sh: Deploys a contract. Accepts the same options as forge create
  • scripts/forge-verify.sh: Verifies a deployed contract. Accepts the same options as forge verify-contract
  • scripts/cast-send.sh: Signs and publish a transaction. Accepts the same options as cast send

About

Boilerplate for Smart Contract repos using Foundry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published