Skip to main content
The WriteApi provides methods for executing and testing transactions on the Sui network. All methods are in the sui namespace.

Methods

executeTransactionBlock

Executes a signed transaction and waits for results based on the request type.
Base64
required
BCS serialized transaction data bytes without its type tag, as base64-encoded string
Base64[]
required
List of signatures (flag || signature || pubkey bytes) as base64-encoded strings. Each signature is committed to the intent message of the transaction data
SuiTransactionBlockResponseOptions
Options for specifying the content to be returned
ExecuteTransactionRequestType
The request type, derived from SuiTransactionBlockResponseOptions if None
SuiTransactionBlockResponse
The transaction execution result

devInspectTransactionBlock

Runs the transaction in dev-inspect mode. This allows nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.
Dev inspect does not validate ownership, visibility, or other constraints. Use this for debugging and testing only.
SuiAddress
required
The sender address
Base64
required
BCS encoded TransactionKind (as opposed to TransactionData, which includes gasBudget and gasPrice)
BigInt<u64>
Gas price to use. Gas is not charged, but gas usage is still calculated. Defaults to reference gas price
BigInt<u64>
The epoch to perform the call. Will be set from the system state object if not provided
DevInspectArgs
Additional arguments including gas_budget, gas_objects, gas_sponsor and skip_checks
DevInspectResults
The inspection results, including return values and effects

dryRunTransactionBlock

Returns transaction execution effects including the gas cost summary, without committing the effects to the chain.
Unlike dev-inspect, dry run validates all transaction constraints (ownership, signatures, etc.) as if executing on-chain.
Base64
required
BCS serialized transaction data bytes as base64-encoded string
DryRunTransactionBlockResponse
The dry run results

Dev Inspect vs Dry Run

Usage Example with Rust SDK