forge install OpenZeppelin/openzeppelin-contracts --no-commit
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.
forge build --via-ir
forge test
forge fmt
forge snapshot
anvil --port 8555 --balance 1000000 --fork-url http://localhost:8545 --chain-id 369
# 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 <subcommand>
cast balance 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --rpc-url http://localhost:8555
forge --help
anvil --help
cast --help