Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 1.54 KB

README.md

File metadata and controls

82 lines (56 loc) · 1.54 KB

No Grind Token

forge install OpenZeppelin/openzeppelin-contracts --no-commit

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

Documentation link

Usage

Build

forge build --via-ir

Test

forge test

Format

forge fmt

Gas Snapshots

forge snapshot

Anvil

anvil --port 8555 --balance 1000000 --fork-url http://localhost:8545 --chain-id 369

Deploy

# forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
forge script script/NoGrindToken.s.sol:DeployNoGrindToken --rpc-url $RPC_URL --broadcast
# forge script script/FlashSwapArb.s.sol:DeployFlashSwapArb --broadcast --verify --rpc-url <your_rpc_url>
forge script script/FlashSwapArb.s.sol:DeployFlashSwapArb --broadcast --rpc-url http://localhost:8555 --via-ir

Cast

cast <subcommand>
cast balance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --rpc-url http://localhost:8555

Help

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