datahaven/operator/runtime
Steve Degosserie 757a99b7c6
feat: Add Moonbeam Batch precompile (#138)
## Summary

This PR adds Moonbeam's Batch precompile to DataHaven, enabling
efficient batching of multiple EVM transactions in a single call. This
implementation follows Moonbeam's exact architecture and provides
significant gas savings for batch operations.

## Key Features

### Batch Precompile Functions
- **`batchSome(address[], uint256[], bytes[], uint64[])`**: Execute
multiple calls, continuing on failures
- **`batchSomeUntilFailure(address[], uint256[], bytes[], uint64[])`**:
Execute calls until first failure
- **`batchAll(address[], uint256[], bytes[], uint64[])`**: Execute all
calls, reverting if any fail

### Technical Implementation
- **Address**: `0x0808` (2056 in decimal)
- **Access Control**: Restricted nesting with `SubcallWithMaxNesting<2>`
- **Self-recursion**: Only the Batch precompile can call itself
(`OnlyFrom<AddressU64<2056>>`)
- **Gas Management**: Proper gas estimation and refund handling
- **Error Handling**: Comprehensive revert reasons and event logging

Depends on #137

---------

Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com>
2025-09-05 19:24:09 +02:00
..
common feat: Integrate Proxy pallet into DataHaven runtimes (#128) 2025-08-18 09:46:59 +02:00
mainnet feat: Add Moonbeam Batch precompile (#138) 2025-09-05 19:24:09 +02:00
stagenet feat: Add Moonbeam Batch precompile (#138) 2025-09-05 19:24:09 +02:00
testnet feat: Add Moonbeam Batch precompile (#138) 2025-09-05 19:24:09 +02:00
README.md feat(operator): Add Ethereum RPCs (#55) 2025-04-30 17:01:21 +00:00

Release

Polkadot SDK stable2412