scallop-advanced-transactionslisted
Install: claude install-skill scallop-io/scallop-skills
# Advanced Transactions
Build complex multi-step transactions with dry runs, gas control, coin management, and BCS serialization.
## Overview
Beyond the basic `*_quick` methods, the SDK provides fine-grained control over transaction construction:
- **Dry Runs**: Simulate transactions before executing
- **Gas Budget**: Control gas spending
- **Coin Management**: Split, merge, and select coins manually
- **Multi-Step PTBs**: Compose multiple operations in a single transaction
- **BCS Serialization**: Build raw serialized transactions
## ScallopBuilder & ScallopTxBlock
```python
from sui_scallop_sdk import ScallopClient
client = ScallopClient(secret_key="...", network="mainnet")
builder = client.create_builder()
tx = builder.create_tx_block()
```
The `ScallopBuilder` handles signing and coin selection. The `ScallopTxBlock` accumulates commands.
## Dry Runs (Simulation)
Simulate a transaction without executing it:
```python
from sui_scallop_sdk import DryRunResult
tx = builder.create_tx_block()
market_coin = tx.supply_quick(1_000_000_000, "sui", client.wallet_address)
tx.transfer_objects([market_coin], client.wallet_address)
# Simulate instead of executing
dry_result: DryRunResult = builder.dry_run_tx_block(tx)
if dry_result.success:
print(f"Gas estimate: {dry_result.gas_estimate}")
print(f"Balance changes: {dry_result.balance_changes}")
print(f"Events: {len(dry_result.events)}")
else:
print(f"Would fail: {dry_result.error}")
```
### DryRunResult Fi