Full integration for aggregation benefits: This guide covers the complete integration process for transaction aggregation. If you only need faster inclusion and MEV protection without aggregation, you can get started instantly with Wallet Setup, which requires just an RPC endpoint change.
Integration Overview
This full integration enables transaction aggregation, allowing multiple transactions to share execution costs (including the 21k intrinsic gas) and reducing overhead for all participants. The integration process involves five main steps:- Whitelist your address - Get access to DA Builder’s RPC endpoint
- Implement a Trustless Proposer - Deploy a proposer contract that implements the
IProposerinterface - EIP-7702 Account Code Setup - Associate your proposer contract with your EOA
- Gas Tank Integration - Deposit ETH to cover transaction costs
- DA Builder Transaction Submission - Submit and monitor transactions using DA Builder’s RPC endpoints
Note: This walkthrough provides step-by-step instructions with explanations and simple code examples for integrating with DA Builder. For a complete working example, see our sample integration repository ↗.
0. Whitelist Your Address
Before DA Builder will accept txs from your EOA it must be whitelisted. Reach out here↗ to get it added first. Once you receive a response indicating it has been added you can proceed with the next steps.1. Implement a Trustless Proposer
DA Builder only allows transactions to be submitted by an EOA with valid EIP-7702 account code set. The EIP-7702 account code must implement theIProposer interface.
How a Trustless Proposer Works
TheTrustlessProposer above implements three core security mechanisms:
-
Signature Protection : The
_dataparameter must contain a signature that you created offline, which the contract verifies matches your EOA address - Nonce Protection : Each call requires a unique nonce to prevent replay attacks
- Deadline Protection : Each call has a deadline to prevent stale transactions
⚠️ Important Safety Note: Custom Storage Layout : EOA contracts should use a fixed storage location (layout at) to prevent storage conflicts when upgrading account code. Since EIP-7702 account code can be updated but storage persists, using a predictable storage layout ensures that e.g. thenestedNoncevariable won’t conflict with future or past account code. See here↗ for more details.
For a more complete implementation: See TrustlessProposer.sol↗ in the sample repository.
2. EIP-7702 Account Code Setup
Set up your EOA to use the proposer contract as its account code. This allows others to execute operations on your behalf - your transactions can now be combined with other users’ transactions:For complete EIP-7702 setup: See setup_eip7702_account_code↗ in the sample repository.
3. Gas Tank Integration
Deposit funds into the DA Builder Gas Tank to pay for the gas used by your transactions. The savings from shared transactions are split amongst participants in the aggregated transaction:For complete Gas Tank integration: See deposit_to_gas_tank↗ in the sample repository.
Important: After depositing to the GasTank, it can take a couple minutes for the deposit to be indexed and processed before you can execute aggregated transactions through DA Builder. Use dab_accountInfo to check when your balance is available for transaction submission.
4. DA Builder Transaction Submission
Submit transactions through DA Builder’s RPC endpoint. The call you make into DA Builder to execute the underlying transaction might be different depending on how you have implemented your Proposer. We provide an example client that interfaces with a TrustlessProposer contract in the sample integration repository:send_da_builder_transaction method automatically:
- Signs the transaction with EIP-712
- Submits to DA Builder’s aggregation service
- Returns a pending transaction for monitoring
For complete transaction submission: See send_da_builder_transaction↗ in the sample repository.
EIP-712 Signature Generation
At its core, the TrustlessProposer expects a signed message hash to prove the EOA owner is the one that generated the transaction. Using Alloy:For complete EIP-712 implementation: See prepare_trustless_proposer_call↗ in the sample repository.
5. Transaction Monitoring
When you submit a transaction to DA Builder, you receive a DA Builder Request ID (not an immediate blockchain hash). Use this ID to track your transaction’s progress:Quick Reference
- Quick Reference - Endpoints, addresses, and methods
- Architecture - System architecture overview
- Cost Structure - Pricing model details
- Monitor Account - Check balance and transaction status
- Sample Integration↗ - Working code examples