DISCLAIMER: THIS IS A POC UNDER DEVELOPMENT, DO NOT USE IT IN PRODUCTION ENVIRONMENTS
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
Foundry consists of:
$ forge build
$ forge test
$ forge fmt
$ forge snapshot
$ anvil
$ source .env
forge script --chain-id 84532 script/Deploy.s.sol:CommunityHubDeployScript --rpc-url ${BASE_SEPOLIA_RPC_URL} --broadcast --slow --verify --verifier-url ${BASESCAN_SEPOLIA_URL} --etherscan-api-key ${BASESCAN_SEPOLIA_API_KEY} --optimize --optimizer-runs 20000 -- --vvvv
forge script --chain-id 8453 script/Deploy.s.sol:CommunityHubDeployScript --rpc-url ${BASE_RPC_URL} --broadcast --slow --verify --verifier-url ${BASESCAN_URL} --etherscan-api-key ${BASESCAN_API_KEY} --optimize --optimizer-runs 20000 -- --vvvv
For production deployments do not use a public RPC. Use a dedicated one or things like the node mempool can cause the script to fail.
$ anvil
forge script script/Deploy.s.sol:MyScript --fork-url http://localhost:8545 --broadcast
forge verify-contract --chain-id 8453 --num-of-optimizations 20000 --watch --verifier-url ${BASESCAN_URL} --etherscan-api-key ${BASESCAN_API_KEY} --compiler-version v0.8.25+commit.b61c2a9
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help
npx hardhat --network base run ./script/migratev2.ts