Note
In this foundry template the default chain is monadDevnet
, if you wish to change it change the network in foundry.toml
Foundry-Monad is a Foundry template with Monad configuration. So developers don't have to do the initial configuration in Foundry for Monad network.
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.
Before you begin, you need to install the following tools:
- Rust
- Cargo
- Foundryup
To get started, follow the steps below:
- You can either clone this repo using the below command:
git clone https://github.com/monad-developers/foundry-monad
or
You can do it manually using the below set of commands:
mkdir [project_name] && cd [project_name] && forge init --template monad-developers/foundry-monad
The foundry project is now ready to be used!
forge compile
forge build
forge test
forge create --private-key <your_private_key> src/Counter.sol:Counter
forge verify-contract <contract_address> src/Counter.sol:Counter
forge fmt
forge snapshot
anvil
cast <subcommand>
forge --help
anvil --help
cast --help