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
$ forge test
$ forge fmt
$ forge snapshot
$ anvil
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help
Refer to deployed NFT contract and Token here
-
Refer to the following IPFS upload for the same:
-
Contract will internally handle the json files for uri
git clone https://github.com/KyteSocial/kyte_contracts.git
cd kyte_contracts
npm i
forge build
-
anvil
Network Name : Anvil Testnet
New RPC URL : http://localhost:8545/
Chain ID : 31337
Currency Symbol : ETH
-
forge script script/Deploy.NftCollection.s.sol --rpc-url anvil_local --broadcast
-
forge script script/Deploy.NftCollection.s.sol --rpc-url [mumbai | base_sepolia | optimism_sepolia | eth_sepolia | eth_mainnet | base_mainnet | polygon_mainnet | optimism_mainnet] --broadcast
-
forge script script/DeployAndMintFromCollection.s.sol --rpc-url anvil_local --broadcast
-
forge test -vvv
-
forge test --mt test_name -vvv
forge create --rpc-url eth_sepolia --private-key $PRIVATE_KEY src/NFTCollectionFactory.sol:NFTCollectionFactory \
--constructor-args $(cast abi-encode --packed "constructor(address)" <ARGS_HERE>) \
--verify --verifier blockscout --verifier-url https://sepolia.etherscan.io/api?
forge create --rpc-url base_sepolia --private-key $PRIVATE_KEY src/NFTCollectionFactory.sol:NFTCollectionFactory \
--constructor-args $(cast abi-encode --packed "constructor(address)" <ARGS_HERE>) \
--verify --verifier blockscout --verifier-url https://sepolia.etherscan.io/api?
forge create --rpc-url optimism_sepolia --private-key $PRIVATE_KEY src/NFTCollectionFactory.sol:NFTCollectionFactory \
--constructor-args $(cast abi-encode --packed "constructor(address)" <ARGS_HERE>) \
--verify --verifier blockscout --verifier-url https://optimism-sepolia.blockscout.com/api?