GetTransaction - Sui
GetTransaction. Returns an executed transaction by digest.
GetTransaction - sui [Value: 20CU]
Returns an executed transaction by its digest, including effects, events and balance changes if requested.
gRPC: sui.rpc.v2.LedgerService/GetTransaction
Use cases
- Confirm transaction status
- Read gas used and effects
- Show balance changes to users
Constraints
- Digest is required
- Default mask returns only digest
- Old data may be pruned
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 '{
"digest": "J4NvV5iQZQFm1xKPYv9ffDCCPW6cZ4yFKsCqFUiDX5L4",
"read_mask": "digest,effects,events"
}' \
grpc.drpc.live:443 \
sui.rpc.v2.LedgerService/GetTransactionResponse
200
{
"transaction": {
"digest": "J4NvV5iQZQFm1xKPYv9ffDCCPW6cZ4yFKsCqFUiDX5L4",
"effects": {
"digest": "6dQhR3cWz1TbJ5nK8pL2sV9xF4gA7yE0uM3oN6iB5rC8",
"version": 2,
"status": {
"success": true
},
"epoch": "1084",
"gas_used": {
"computation_cost": "750000",
"storage_cost": "1976000",
"storage_rebate": "978120",
"non_refundable_storage_fee": "9880"
},
"transaction_digest": "J4NvV5iQZQFm1xKPYv9ffDCCPW6cZ4yFKsCqFUiDX5L4",
"changed_objects": [ ... ]
},
"events": {
"digest": "2kP8sW5vN1xR7tQ4mY9bH3jC6fL0gD2aZ5eU8iO1nT4w",
"events": [ ... ]
}
}
}Request params
object
digeststring
Required. The digest of the transaction.
read_maskstring
Optional. google.protobuf.FieldMask with the fields to return, as comma-separated paths. Defaults to `digest`. Use `*` to return all fields.
Response
200
Returns an executed transaction by its digest, including effects, events and balance changes if requested.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.