datahaven/biome.json
Steve Degosserie 506471db24
feat(test): expand Moonwall test coverage with balance and precompile tests (#414)
## 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>
2026-02-02 15:42:14 +01:00

77 lines
1.8 KiB
JSON

{
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.5/schema.json",
"files": {
"includes": [
"**/*.js",
"**/*.ts",
"**/*.json",
"**/*.yml",
"**/*.md",
"!node_modules/*",
"!**/moonwall/**/*",
"!target/*",
"!**/tmp/*",
"!**/*.spec.json",
"!**/.papi/descriptors/**/*",
"!**/contract-bindings/**/*",
"!**/html/**/*",
"!**/moonwall/contracts/out/**/*",
"!**/contracts/out/**/*",
"!**/contracts/deployments/state-diff.checksum"
],
"maxSize": 3000000
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"formatter": {
"enabled": true,
"attributePosition": "multiline",
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"json": {
"formatter": {
"enabled": true
}
},
"javascript": {
"formatter": {
"trailingCommas": "none",
"semicolons": "always",
"quoteStyle": "double"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "warn",
"noUnusedImports": "warn"
},
"suspicious": {
"noExplicitAny": "off",
"noAsyncPromiseExecutor": "off"
},
"performance": {
"noAccumulatingSpread": "off"
},
"nursery": {
"noFloatingPromises": "error"
},
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error",
"noNonNullAssertion": "off"
}
}
}
}