TransactionManager
A component that orchestrates multiple blockchain transactions in sequence.
TransactionManager
The TransactionManager component orchestrates multiple blockchain transactions in sequence, handling the flow between steps and providing status tracking.
Usage
Props
| Prop | Type | Default | Description | 
|---|---|---|---|
| chain_id | number | - | Chain ID for the transactions | 
| transactions | TransactionProps[] | - | Array of transactions to process | 
| onTransactionSent | (timestamp: number) => void | - | Called when a step completes | 
| onTransactionConfirmed | (receipt: any) => void | - | Called when all transactions complete | 
| className | string | - | Additional CSS classes | 
Features
- Sequential transaction execution
- Step-by-step progress tracking
- Automatic state management
- Transaction dependency handling
- Consistent error handling
- Status notifications for each step
Examples
Token Approval and Transfer
Multi-step Protocol Interaction
Transaction Flow
- 
Initialization - Validates transaction array
- Sets up initial state
- Prepares first transaction
 
- 
Step Execution - Processes current transaction
- Waits for confirmation
- Updates progress state
 
- 
Step Transition - Validates completion
- Moves to next transaction
- Updates UI state
 
- 
Completion - Confirms all steps finished
- Triggers completion callback
- Resets internal state
 
Is this guide helpful?