Description
Integration tests today wire up holders manually. Add a testnet-only faucet_seed_holders(offering_id, count) that allocates deterministic addresses with documented BPS distribution, so external test suites can pin against a known seed.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/test_utils.rs, TESTNET_MODE.md
- Faucet must reject when
testnet_mode == false
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/testnet-faucet-seed
- Implement changes
- Gate behind
is_testnet_mode() and panic on mainnet
- Use
env.crypto().sha256(seed || idx) to derive addresses
- Emit
faucet_seed events
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Invocation outside testnet must error
TestnetOnly
- Include test output and security notes
Example commit message
feat: add testnet-only faucet_seed_holders for integration suites
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Integration tests today wire up holders manually. Add a testnet-only
faucet_seed_holders(offering_id, count)that allocates deterministic addresses with documented BPS distribution, so external test suites can pin against a known seed.Requirements and context
Revora-Contracts/src/test_utils.rs,TESTNET_MODE.mdtestnet_mode == falseSuggested execution
git checkout -b feat/testnet-faucet-seedis_testnet_mode()and panic on mainnetenv.crypto().sha256(seed || idx)to derive addressesfaucet_seedeventsTest and commit
cargo test --allTestnetOnlyExample commit message
feat: add testnet-only faucet_seed_holders for integration suitesGuidelines