@daimo/bulk
v0.3.1
Published
Make compressed 4337 bundles swole again. Save calldata, save cost, ship cheap 4337 on L2.
Downloads
17
Keywords
Readme
Bulk
Make compressed 4337 bundles swole again.
Bulk makes 4337 on L2 cheaper. Bundlers can pass compressed bundles to BundleBulker
, which decompresses them before calling the 4337 EntryPoint contract. This reduces L1 data usage, the dominant cost of rollup transactions.
For example, here's a single USDC transfer executed as as a one-op bundle.
Before: 1.6kb
After: 353b
Details
Decompression happens via arbitrary contracts that implement IInflator
. This lets bundlers or individual applications can define their own templates or decompression algorithms. Inflators can be stateful for greater savings.
A bundler supports compression as follows:
- client submits compressed op
- bundler inflates, validates as usual
- bundler submits compressed
Compression is independent from the security of the contract account being called. The same userops go to the EntryPoint either way, validation and execution identical--this is just an optimization to use less calldata.
Bulk is intended for use directly by bundlers, eg with API keys--so griefing can be mitigated offchain. The userop mempool remains important for censorship resistance, and apps can continue to submit uncompressed ops to mempool as a fallback if a direct bundler API is unavailable.
Deployment Details
The deployment address of BundleBulker is 0x000000000091A1F34f51CE866bEd8983dB51a97E
. (deployed using create2 with salt 7cf7a0f0060e1519d0ee3e12e0ee57890f69d7aa693404299a3a779e90cd7921
)
Mainnets
|Chain Name|Deployment| |----------|----------| |Ethereum|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Base|0x000000000091A1F34f51CE866bEd8983dB51a97E| |OP Mainnet|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Polygon|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Gnosis|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Arbitrum One|0x000000000091A1F34f51CE866bEd8983dB51a97E| |BSC |0x000000000091A1F34f51CE866bEd8983dB51a97E| |opBNB|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Avalanche|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Linea Mainnet|0x000000000091A1F34f51CE866bEd8983dB51a97E| |lyra|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Scroll|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Klaytn|0x000000000091A1F34f51CE866bEd8983dB51a97E| |DFK Chain|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Celo|0x000000000091A1F34f51CE866bEd8983dB51a97E|
Testnets
|Chain Name|Deployment| |----------|----------| |Sepolia|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Goerli|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Base Sepolia|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Base Goerli|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Optimism Goerli|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Polygon Mumbai|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Arbitrum Sepolia|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Arbitrum Goerli|0x000000000091A1F34f51CE866bEd8983dB51a97E| |BSC Testnet|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Avalanche Fuji|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Scroll Sepolia|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Gnosis Chiado|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Linea Goerli Testnet|0x000000000091A1F34f51CE866bEd8983dB51a97E| |Celo Alfajores|0x000000000091A1F34f51CE866bEd8983dB51a97E|
Quick start
Proof of concept. In active development.
git clone [email protected]:daimo-eth/bulk --recurse-submodules
foundryup
forge test