npm install
npm run build
# Test default strategy (erc20-balance-of)
npm run test
# Test strategy with name
npm run test --strategy=erc20-received
npm run test --strategy=eth-balance
# Test with more addresses from addresses.json
npm run test --strategy=eth-balance --more=200
Testing using a custom network (e.g. dev testing or CI) overrides the default networks, requiring a few extra steps.
- JSON-RPC endpoint accessible from script run location.
- Governance contract (e.g. your ERC20 contract) deployed and populated with test data.
- Multicall contract deployed (used by snapshot to aggregate data retrieval calls).
multicall
; Multicall contract address on your network.chainId
; Chain Id matching that of your created network.rpc
; connection details for your JSON-RPC endpoint.
strategy
address
; governance contract address from deployment on your network.addresses
; test accounts created earlier when creating your network.snapshot
; to an appropriate block height for your network.
# Test default strategy (erc20-balance-of) using local.json networks file
npm run test --network=../../network/local.json
MIT.