Foundry Template for arbitrum testnet
API_KEY_INFURA=your infura api key [Used for sepolia testnet]
API_KEY_ARBISCAN=your arbiscan api key [Used for arbitrum sepolia testnet]
API_KEY_ETHERSCAN=your etherscan api key [Used for sepolia testnet]
SEPOLIA_WALLET_PRIVATE_KEY=your wallet private key [Used for Deploy.s.sol]
forge install
Build the contracts:
forge build
Delete the build artifacts and cache directories:
forge clean
Compile the contracts:
forge build
Run the tests:
forge test -vv
Get a test coverage report:
forge coverage
Get a gas report:
forge test --gas-report
anvil
forge script script/Deploy.s.sol --fork-url localhost --broadcast -vvvv
forge script script/Deploy.s.sol:DeployScript --rpc-url arbitrum_sepolia --broadcast --verify -vvvv
forge script script/Destroy.s.sol:DestroyScript --rpc-url arbitrum_sepolia --broadcast -vvvv
https://sepolia.arbiscan.io/tx/0x4878408b3ea0fede3524bcec5ee6b1c048380e2fa5784f0ba20652b6840aba5c
For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.
Format the contracts:
forge fmt