Overview
Bulk operations enable users to:- Bulk Listings: Create up to 20 listings with one signature
- Bulk Fulfillment: Buy up to 50 orders in one transaction (shopping cart)
- Fewer wallet confirmations (better UX)
- Lower gas costs (batched transactions)
- Faster marketplace operations
- Enable shopping cart functionality
See Getting Started for prerequisites and installation. For bulk operations, you should also understand creating individual listings and filling individual orders.
Bulk Listing Creation
Create multiple NFT listings with a single signature, improving seller experience.Limits and Constraints
| Constraint | Value | Notes |
|---|---|---|
| Maximum listings | 20 per transaction | Batch into multiple transactions if needed |
| Wallet type | EOA: 1 signature Smart contract: N signatures | Passport wallets need multiple confirmations |
| Approval | Per collection | One-time approval per NFT collection |
How It Works
TheprepareBulkListings() call returns:
- Actions - Approval transactions (if needed) +
signablemessage - completeListings() method - Scoped method to submit signatures
Basic Example
Create multiple ERC-721 listings at once:Mixed Token Types
Create listings for both ERC-721 and ERC-1155 tokens:Smart Contract Wallets (Passport)
Response Structure
ThecompleteListings() method returns success/failure for each listing:
Bulk Order Fulfillment (Shopping Cart)
Buy multiple NFTs in a single transaction—the foundation of marketplace shopping carts.Limits and Constraints
| Constraint | Value | Notes |
|---|---|---|
| Maximum orders | 50 per transaction | Batch into multiple if needed |
| Currency consistency | All orders same currency | Enforce on frontend |
| Best-effort fulfillment | Enabled by default | Fills available orders even if some fail |
How It Works
Bulk fulfillment handles common shopping cart scenarios:- Some orders already filled by others
- Some orders cancelled
- Insufficient balance for all items
- Orders with mixed availability
- fulfillableOrders - Can be executed
- unfulfillableOrders - Cannot be executed (with reasons)
- sufficientBalance - Whether user can afford fulfillable orders
- Actions - Transactions to execute
Basic Example
Simple shopping cart checkout:Response Structure
The response categorizes orders:UX Strategies for Unavailable Items
When some cart items become unavailable, choose a user experience strategy:Strategy 1: All or Nothing
Require users to fix cart before checkout:Strategy 2: Best Effort
Automatically checkout available items without user intervention:Strategy 3: Hybrid (Recommended)
Ask user to confirm before proceeding with partial cart:Insufficient Balance Handling
When user can’t afford fulfillable items:Currency Consistency Requirement
Partial Fills with Bulk Orders
SpecifyamountToFill for ERC-1155 partial fills:
Complete Shopping Cart Example
Full implementation with all strategies:Best Practices
For Bulk Listings
- Batch wisely: Keep under 20 listings per batch
- Handle approvals: Cache approval status per collection
- Smart contract wallets: Warn users about multiple signatures
- Error handling: Gracefully handle partial failures
- Status updates: Poll for PENDING → ACTIVE transitions
For Bulk Fulfillment
- Currency enforcement: Validate same currency on frontend
- Real-time availability: Refresh cart items before checkout
- Balance checks: Verify sufficient funds before transaction
- User communication: Clearly explain unavailable items
- Expiration warning: Show 3-minute countdown timer
- Retry logic: Handle race conditions gracefully
- Gas estimation: Show estimated gas cost for transparency