Skip to content

Latest commit

 

History

History
100 lines (63 loc) · 2 KB

README.md

File metadata and controls

100 lines (63 loc) · 2 KB

Solidity Template

Support both Foundry test and Hardhat.

Getting Started

Requirements

Please install the following:

And you probably already have make installed... but if not try looking here. and here for MacOS

Quickstart

make # This installs the project's dependencies.
make test

Testing

make test

or

forge test

Deploying to a network

Setup

You'll need to add the following variables to a .env file:

  • MAINNET_URL
  • MAINNET_PRIVATEKEY
  • GOERLI_URL
  • GOERLI_PRIVATEKEY
  • ETHERSCAN_API_KEY

Deploying

make deploy-goerli

Working with a local network

Foundry comes with local network anvil baked in, and allows us to deploy to our local network for quick testing locally.

To start a local network run:

make anvil

This will spin up a local blockchain with a determined private key, so you can use the same private key each time.

Code Style

We employed solhint to check code style. To check code style with solhint run:

make lint

To re-format code with prettier run:

make format

Security

We use slither, a popular security framework from Trail of Bits. To use slither, you'll first need to install python and install slither.

Then, you can run:

make slither

And get your slither output.

Resources

TODO

[ ] Add support for sepolia chain