Skip to content
Alchemy Logo

Transactions

The TransactionExecutionService provides methods for executing and simulating transactions on Sui.

Submits a signed transaction for execution on the network.

Request:

FieldTypeRequiredDescription
transactionTransactionYesThe transaction to execute
signaturesrepeated UserSignatureYesArray of user signatures
read_maskFieldMaskNoFields to include in the response

Response:

FieldTypeDescription
transactionExecutedTransactionThe executed transaction result
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/transaction_execution_service.proto \
  -d '{
    "transaction": {"bcs": {"value": "BASE64_TX_BYTES"}},
    "signatures": [{"bcs": {"value": "BASE64_SIGNATURE"}}]
  }' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.TransactionExecutionService/ExecuteTransaction

Simulates transaction execution without submitting to the network. Use this to estimate gas costs or preview effects.

Request:

FieldTypeRequiredDescription
transactionTransactionYesThe transaction to simulate
read_maskFieldMaskNoFields to include in the response
checksTransactionChecksNoEnable or disable transaction checks
do_gas_selectionboolNoPerform automatic gas coin selection

Response:

FieldTypeDescription
transactionExecutedTransactionThe simulated transaction result
command_outputsrepeated CommandResultOutput of each transaction command
suggested_gas_priceuint64Suggested gas price for the transaction
grpcurl \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -import-path proto \
  -proto sui/rpc/v2/transaction_execution_service.proto \
  -d '{
    "transaction": {"bcs": {"value": "BASE64_TX_BYTES"}},
    "do_gas_selection": true
  }' \
  sui-mainnet.g.alchemy.com:443 \
  sui.rpc.v2.TransactionExecutionService/SimulateTransaction
Was this page helpful?