--- name: avax-testing description: Verify Avalanche contracts and integrations with reproducible forks, realistic failure cases and chain-specific checks. --- # Testing & release evidence Source review: 2026-09-06. Recheck network-dependent facts before use. 1. Select the invariant or user-visible behavior being verified. For external C-Chain integrations use a pinned fork block and document its network, block hash, protocol deployment and compiler target. 2. Use unit tests for local logic, fuzzing for arithmetic boundaries and invariants for multi-step state transitions where each adds coverage. Fork tests should exercise the real target protocol rather than replace the entire integration with a permissive mock. 3. Test decimals, insufficient balances/allowances, wrong network, stale quotes, rejected signatures and reverted execution for the paths the app actually exposes. Check that failure leaves expected balances and permissions intact. 4. For L1 or ICM behavior use an environment that includes the relevant VM, precompiles, messenger and relaying infrastructure. A generic EVM fork does not prove validator signatures, P-Chain interactions or cross-chain delivery. 5. Distinguish mainnet-state fork tests from target-node feature checks: a local fork imports state but can use a different execution engine and enabled opcodes. Verify network-specific transaction types and precompiles against a compatible node/test environment. Separate mainnet-fork compatibility from Fuji behavior. Testnet success does not establish mainnet opcode or activation parity; consult [Upgrades](../upgrades/SKILL.md). 6. Verify the frontend on desktop and mobile with rejection, pending, retry and network-switch states. Return observed results and the exact artifact revision; do not label unexecuted checks as passing. **Evidence to return:** commands/configuration, fork block and hash, covered scenarios, failures and remaining gaps. Keep all test broadcasts local or within expressly authorized test networks. ## Primary sources - [Foundry fork testing](https://www.getfoundry.sh/guides/fork-testing) - [Avalanche Interchain Kit](https://build.avax.network/docs/tooling/interchain-kit/icm-messaging) ## Run evidence by capability Commands resolve from the complete executable bundle root after [Tools](../tools/SKILL.md) setup. | Capability | Command | Boundary | | --- | --- | --- | | Contract/browser/indexer | `node examples/core/verify.mjs` | Real local EVM and controlled wallet, not public Fuji | | Protocol guards | `node --test examples/protocols/*/recipe.test.mjs` | Encoding and adversarial fixtures | | Three DEX swaps | `node research/parity-dexes/fork-execution.mjs` | Production-state fork, deltas/reverts | | AaveV4/BENQI | `node research/parity-aave-benqi/fork-proof.mjs` | Supply/withdraw/staking; mature redemption unproved | | Silo/Euler | `node research/parity-silo-euler/verify-fork.mjs` | Deposit/withdraw; funded borrow unproved | | Standards | `node --test examples/standards/standards.test.mjs` | Math/authority/synthetic HTTP validation | | Noir | `node examples/privacy/verify.mjs` | Real proof and generated Solidity verifier | Run each family's live-capture script for fresh state. Archived evidence is not a current quote/allowance. Core local chain43113 and protocol local forks43114 both remain loopback simulations. For model-gap evaluation, preregister identical tasks/resources and fixed objective graders, use fresh independent contexts, record first-pass failures, and keep baseline/assisted artifacts distinct. Passing both arms establishes reproducibility, not improvement. Small samples do not establish general superiority over another library. Report commands, source/tool identities, invariants, observed failures/repairs and not-run cases. Website test totals, code review and ABI presence cannot substitute for execution, cross-chain or VM-feature proof.