Make sure to install foundry: https://book.getfoundry.sh/getting-started/installation. Then, build the project:
forge buildTo start testing, create a Contract.t.sol file in the test folder and write your tests.
Then, run the tests:
forge test
forge coverageStart a local network:
anvilDeploy the contract using the local network fork on http://localhost:8545:
forge script script/<file>.s.sol:<contract> --fork-url anvil --broadcast --private-key <anvil-private-key>To deploy, create a new wallet keystore:
cast wallet import --interactive
# or
cast wallet newThen, deploy the contract:
forge script script/<file>.s.sol:<script> --rpc-url base-sepolia --account <cast-account> --sender <address> --verify --verifier blockscout --verifier-url 'https://base-sepolia.blockscout.com/api/' --broadcast