Links

sui_executeTransaction

Execute a transaction with a serialized signature
Execute the transaction and wait for results if desired. Request types: 1. WaitForEffectsCert: waits for TransactionEffectsCert and then return to client. This model is a proxy for transaction finality. 2. WaitForLocalExecution: waits for TransactionEffectsCert and makes sure the node executed the transaction locally before returning the client. The local execution makes sure this node is aware of this transaction when the client fires subsequent queries. However, if the node fails to execute the transaction locally in a timely manner, a bool type in the response is set to false to indicate the case.

Parameters

  • tx_bytes : <Base64> - BCS serialized transaction data bytes without its type tag, as base-64 encoded string.
  • signature : <Base64> - `flag || signature || pubkey` bytes, as base-64 encoded string, signature is committed to the intent message of the transaction data, as base-64 encoded string.
  • request_type : <ExecuteTransactionRequestType> - The request type

Returns

SuiExecuteTransactionResponse : <SuiExecuteTransactionResponse>

Example Request and Result for sui_executeTransaction

Request
curl
--location --request POST 'https://sui-devnet.blastapi.io/<project_id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": 1,
"method": "sui_executeTransaction",
"params": [
"AABu/ETttc09/jL0v2w+isQu7xOF4BQD5JpLKWrcsi6ifTyS5M4iVqxkAgAAAAAAAAAg4/KC+kiz4BA7qbvtagYVO5/EhuEB8OnicDrIZm0Grsy1FgS1GDdd/f3bXfUkeP8IXSFaC1y6vcNs8bny7ISBomyn2BFpVZeUAgAAAAAAAAAgAouPAuQwKlWV2IiaZ8bTHGyXDlZ/A+9n2BGk+ENmW40BAAAAAAAAAOgDAAAAAAAA",
"AG+IXPpjofhGMG9roBEk00xzpNPsBOM6JtTgRKRY8zyvWcwIyrU4qhHVesKT0Pon0W0xP0b6SqIFneWxTvDC4gMETxNsaJH6UBKN/GfiZ46X8iMV/dyLU/zHwVMrBp9VTQ==",
"WaitForLocalExecution"
]
}'
Result
{
"jsonrpc": "2.0",
"result": {
"certificate": {
"transactionDigest": "BEq7zDLoAQYesW7napSoEwAaurhRRuzJ5hfjaHcsGi63",
"data": {
"transactions": [
{
"TransferObject": {
"recipient": "0x6efc44edb5cd3dfe32f4bf6c3e8ac42eef1385e0",
"objectRef": {
"objectId": "0x1403e49a4b296adcb22ea27d3c92e4ce2256ac64",
"version": 2,
"digest": "4/KC+kiz4BA7qbvtagYVO5/EhuEB8OnicDrIZm0Grsw="
}
}
}
],
"sender": "0xb51604b518375dfdfddb5df52478ff085d215a0b",
"gasPayment": {
"objectId": "0x5cbabdc36cf1b9f2ec8481a26ca7d81169559794",
"version": 2,
"digest": "AouPAuQwKlWV2IiaZ8bTHGyXDlZ/A+9n2BGk+ENmW40="
},
"gasPrice": 1,
"gasBudget": 1000
},
"txSignature": "AG+IXPpjofhGMG9roBEk00xzpNPsBOM6JtTgRKRY8zyvWcwIyrU4qhHVesKT0Pon0W0xP0b6SqIFneWxTvDC4gMETxNsaJH6UBKN/GfiZ46X8iMV/dyLU/zHwVMrBp9VTQ==",
"authSignInfo": {
"epoch": 0,
"signature": "",
"signers_map": [
58,
48,
0,
0,
0,
0,
0,
0
]
}
},
"effects": {
"status": {
"status": "success"
},
"gasUsed": {
"computationCost": 100,
"storageCost": 100,
"storageRebate": 10
},
"transactionDigest": "6Ez41t7shkB8LUjE3owq2QcEyrDYhsZZYuQZQrJPpJDx",
"mutated": [
{
"owner": {
"AddressOwner": "0xb51604b518375dfdfddb5df52478ff085d215a0b"
},
"reference": {
"objectId": "0x5cbabdc36cf1b9f2ec8481a26ca7d81169559794",
"version": 2,
"digest": "AouPAuQwKlWV2IiaZ8bTHGyXDlZ/A+9n2BGk+ENmW40="
}
},
{
"owner": {
"AddressOwner": "0x6efc44edb5cd3dfe32f4bf6c3e8ac42eef1385e0"
},
"reference": {
"objectId": "0x1403e49a4b296adcb22ea27d3c92e4ce2256ac64",
"version": 2,
"digest": "4/KC+kiz4BA7qbvtagYVO5/EhuEB8OnicDrIZm0Grsw="
}
}
],
"gasObject": {
"owner": {
"ObjectOwner": "0xb51604b518375dfdfddb5df52478ff085d215a0b"
},
"reference": {
"objectId": "0x5cbabdc36cf1b9f2ec8481a26ca7d81169559794",
"version": 2,
"digest": "AouPAuQwKlWV2IiaZ8bTHGyXDlZ/A+9n2BGk+ENmW40="
}
},
"events": [
{
"transferObject": {
"packageId": "0x0000000000000000000000000000000000000002",
"transactionModule": "native",
"sender": "0xb51604b518375dfdfddb5df52478ff085d215a0b",
"recipient": {
"AddressOwner": "0x6efc44edb5cd3dfe32f4bf6c3e8ac42eef1385e0"
},
"objectType": "0x2::example::Object",
"objectId": "0x1403e49a4b296adcb22ea27d3c92e4ce2256ac64",
"version": 2
}
}
]
},
"timestamp_ms": null,
"parsed_data": null
}
}