mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
## Summary - Import and adapt balance tests from Moonbeam's test suite for DataHaven runtime compatibility - Add comprehensive precompile tests covering ERC20, modexp, proxy, identity, and cryptographic precompiles - Add helper utilities for precompile testing including address constants and contract call wrappers ## Changes ### Balance Tests - `test-balance-existential.ts` - Existential deposit behavior - `test-balance-extrinsics.ts` - Balance extrinsics (transfer, force_transfer) - `test-balance-genesis.ts` - Genesis balance verification - `test-balance-transfer.ts` - Various transfer scenarios ### Precompile Tests - **ERC20**: Native token interface tests including overflow handling - **Modexp**: Comprehensive modular exponentiation tests with extensive test vectors - **Proxy**: Proxy account management and proxy call tests - **Identity**: Full identity precompile test coverage (14 test files) - **Cryptographic**: blake2, bn128add, bn128mul, bn128pairing, ecrecover, ripemd160, sha3fips - **Preimage**: Preimage noting and unnoting tests ### Helper Utilities - `precompile-addresses.ts` - Precompile address constants - `precompile-contract-calls.ts` - Typed contract call helpers (Preimage class) - `modexp.ts` - Modexp test utilities ### Runtime Fixes - Fix Ethan's address in genesis presets to match Moonwall util constants --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com> Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com> |
||
|---|---|---|
| .. | ||
| block.ts | ||
| constants.ts | ||
| contracts.ts | ||
| eth-transactions.ts | ||
| evm.ts | ||
| expect.ts | ||
| fees.ts | ||
| index.ts | ||
| modexp.ts | ||
| parameters.ts | ||
| precompile-addresses.ts | ||
| precompile-contract-calls.ts | ||
| transactions.ts | ||