Skip to content

annaBlaize/ERC721Marketplace

 
 

Repository files navigation

foundry-template

this repository is for foundry setup

To get started with foundry:

Installation

  • Install foundry for Linux/Mac: curl -L https://foundry.paradigm.xyz | bash -> foundryup;
  • More about installation on Windows or Docker see here

Project setup

  • To use this project, run:
  $ forge install
  • If you need to create new project, run:
    $ forge-init

By default, forge-init will also initialize a new git repository, install some submodules and create an initial commit message. If you do not want this behavior, pass --no-git

Build

Build the contracts:

$ forge build

Clean

Delete the build artifacts and cache directories:

$ forge clean

Compile

Compile the contracts:

$ forge build

Coverage

Get a test coverage report:

$ forge coverage

Deploy

Deploy to local:

$ forge script script/{ContractName}.s.sol --broadcast --fork-url http://localhost:8545

For this script to work, you need to have a MNEMONIC environment variable set to a valid BIP39 mnemonic.

For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.

Format

Format the contracts:

$ forge fmt

Gas Usage

Get a gas report:

$ forge test --gas-report

Lint

Lint the contracts:

$ pnpm lint

Test

Run the tests:

$ forge test

To run tests on fork, add ----fork-url <your_rpc_url>. More details here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 99.9%
  • Other 0.1%