ExecuteTransaction - Sui
ExecuteTransaction. Submits a signed transaction for execution.
ExecuteTransaction - sui [Value: 20CU]
Submits a signed transaction for execution and returns the executed transaction with the requested fields.
gRPC: sui.rpc.v2.TransactionExecutionService/ExecuteTransaction
Use cases
- Send SUI or tokens
- Call Move functions on-chain
- Publish or upgrade packages
Constraints
- Transaction is required
- At most 2 signatures: sender and sponsor
- Default mask returns effects
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
grpcurl \
-H "x-drpc-key: {API-KEY}" \
-H "x-drpc-chain: sui" \
-d '{
"transaction": {
"bcs": { "value": "<BASE64_TRANSACTION_DATA_BCS>" }
},
"signatures": [
{ "bcs": { "value": "<BASE64_USER_SIGNATURE>" } }
],
"read_mask": "digest,effects.status,checkpoint"
}' \
grpc.drpc.live:443 \
sui.rpc.v2.TransactionExecutionService/ExecuteTransactionResponse
200
{
"transaction": {
"digest": "J4NvV5iQZQFm1xKPYv9ffDCCPW6cZ4yFKsCqFUiDX5L4",
"effects": {
"status": {
"success": true
}
},
"checkpoint": "260411512"
}
}Request params
object
transactionobject
Required. The transaction to execute.
object
bcsobject
The transaction serialized as BCS: `value` (bytes, base64).
signaturesarray_of_objects
`UserSignature`s authorizing the execution of the transaction. At most 2: the sender and an optional sponsor.
read_maskstring
Optional. google.protobuf.FieldMask with the fields to return, as comma-separated paths. Defaults to `effects`. Use `*` to return all fields.
Response
200
Submits a signed transaction for execution and returns the executed transaction with the requested fields.Response params
object
transactionobject
The executed transaction. Only fields included in `read_mask` are populated.
object
digeststring
The transaction digest.
transactionobject
The transaction itself: `bcs`, `digest`, `version`, `kind`, `sender`, `gas_payment`, `expiration`.
signaturesarray_of_objects
User signatures authorizing the transaction.
effectsobject
Transaction effects.
object
statusobject
Execution status: `success`, and `error` if it failed.
epochstring
Epoch in which the transaction was executed.
gas_usedobject
Gas used by the transaction: `computation_cost`, `storage_cost`, `storage_rebate`, `non_refundable_storage_fee`.
changed_objectsarray_of_objects
Objects whose state was changed by the transaction.
gas_objectobject
Information about the gas object. Not set for system transactions that do not require gas.
dependenciesarray_of_strings
Digests of transactions this one depends on.
eventsobject
Events emitted by the transaction (`digest`, `events`). May be empty if the transaction emitted no events.
checkpointstring
Sequence number of the checkpoint that includes the transaction.
timestampstring
Unix timestamp of the checkpoint that includes the transaction (RFC 3339 in JSON).
balance_changesarray_of_objects
Balance changes per address and coin type (`address`, `coin_type`, `amount`).
objectsobject
Objects referenced as inputs or produced as outputs by the transaction.
transaction_indexstring
Position of the transaction within its checkpoint.