1. Baseline workflow
- Run local chain:
npx hardhat node. - Run bootstrap:
npx hardhat run scripts/deploy/bootstrap-local.ts --network localhost. - Restart Next dev server to reload
NEXT_PUBLIC_*values. - Open latest alliance from `/dapp/alliances`.
2. Wallet role mapping (bootstrap defaults)
- Deployer/owner: signer #0
- Participants: signer #1, #2, #3
- NFT seller: signer #4
3. Suggested test matrix
| Area | Positive path | Negative path |
|---|---|---|
| Funding | approve + deposit by participant | wrong wallet, over target, post-deadline deposit |
| Acquisition | vote `voteToAcquire`, reach quorum, execute `buyNFT` | tuple mismatch, expired acquisition deadline, quorum not reached |
| Governance | proposal vote and execute sale | deadline mismatch, insufficient quorum, proposal reset conditions |
| Emergency | vote and emergency withdrawal flow | insufficient emergency quorum |
4. Known local trap
Hardhat local chain resets on node restart. Any previously printed factory/token/alliance address becomes invalid and must be replaced by newly deployed values.