Skip to content

lchy123/foundry00

Repository files navigation

Foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

Foundry consists of:

  • Forge: Ethereum testing framework (like Truffle, Hardhat and DappTools).
  • Cast: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil: Local Ethereum node, akin to Ganache, Hardhat Network.
  • Chisel: Fast, utilitarian, and verbose solidity REPL.

Documentation

https://book.getfoundry.sh/

Usage

install git repos as libs

forge install --no-commit @chainlink=smartcontractkit/chainlink@49f1bf3ba296f0e3dfc01d5a3d371f82f159dc4a
forge install --no-commit @aave/protocol-v2=aave/protocol-v2

Build & Test

$ FOUNDRY_PROFILE=0_4_x forge build
$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/readPrice.s.sol:readPriceScript --fork-url http://127.0.0.1:8545 --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

Cast

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help

About

foundry for solidity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published