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.
$ source /Users/kylemao/.bashrc $ forge install OpenZeppelin/openzeppelin-contracts@v4.8.0
$ forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v4.8.0$ forge build$ forge test$ forge fmt$ forge script script/DeployNFTMarketplace.s.sol --rpc-url "https://linea-sepolia.infura.io/v3/${INFURA_PROJECT_ID}" --private-key "${PRIVATE_KEY}" --broadcast $ forge verify-contract --rpc-url https://rpc.sepolia.linea.build --verifier blockscout --verifier-url 'https://api-explorer.sepolia.linea.build/api/' --compiler-version 0.8.27 <ConstactID> ./src/NFTMarketplace.sol:NFTMarketplace$ forge snapshot
$ forge snapshot revert <snapshot_id>$ anvil$ cast <subcommand>$ forge --help
$ anvil --help
$ cast --help