E2E
e2e/ validates the full integrated path: package → IPFS publish → governance proposal → vote → queue → execute → fetch → verify.
Infrastructure
The test runner manages:
- Anvil — local EVM, started fresh (kills prior instances, removes stale
devnet.json) - IPFS — Docker container via
docker-compose.ipfs.yml - Contracts — deployed via
contracts/script/local-devnet.sh
Health checks poll for RPC availability (30s timeout), IPFS API (8s), and contract deployment (120s, checks governor bytecode).
Configuration
cd e2e && cp .env.example .env
| Variable | Default | Required |
|---|---|---|
MONOREPO_DIR | — | Yes (absolute path) |
ANVIL_PORT | 8546 | No |
IPFS_API | http://127.0.0.1:5001 | No |
IPFS_GATEWAY | http://127.0.0.1:8080 | No |
MAINNET_FORK_URL | — | No |
Test Flow
For each of 3 example dapps (Uniswap V2, Aave V3, Safe Admin):
- Package —
vibefi packagevalidates, bundles, publishes to IPFS →rootCid - Propose —
vibefi dapp:proposecreates governance proposal →txHash - Mine —
anvil_mine1 block, decodeProposalCreatedevent →proposalId - Vote —
vibefi vote:cast <id> --support for - Mine voting period —
anvil_mine25 blocks (exceeds 20-blockVOTING_PERIOD) - Check vote —
vibefi vote:statusverifies counts and quorum - Queue —
vibefi proposals:queuemoves to timelock - Advance time —
evm_increaseTime2s + mine 1 block - Execute —
vibefi proposals:executetriggersDappRegistry.setDapp() - Fetch & verify —
vibefi dapp:fetchdownloads from IPFS, recomputes CID to verify integrity
After all cycles, vibefi dapp:list asserts >= 3 dapps in registry.
Utilities
| Function | Purpose |
|---|---|
runCmd(cmd, args, opts) | Spawn process with stdio control |
runCli(args, opts) | CLI runner with auto-injected RPC/devnet paths |
waitFor(label, probe, timeout) | Poll at 250ms intervals until probe succeeds |
logSection(title) | Timed log section with elapsed duration |
All CLI commands run with --json; output parsed with JSON.parse() for field validation.
Run
cd e2e && bun install && bun run e2e
Anvil is left running after tests for manual inspection.