sui_executeTransactionBlock
POST
Execute the transaction and wait for results if desired. Request types:1. WaitForEffectsCert: waits for TransactionEffectsCert and then return to client. This mode is a proxy for transaction finality.2. WaitForLocalExecution: waits for TransactionEffectsCert and make sure the node executed the transaction locally before returning the client.The local execution makes sure this node is aware of this transaction when 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 indicated the case.request_type is default to be WaitForEffectsCert unless options.show_events or options.show_effects is true
param[0]
txBytesstringrequired
BCS serialized transaction data bytes without its type tag, as base-64 encoded string.param[1]
signaturesarrayrequired
param[2]
optionsobjectrequired
showBalanceChangesboolean
Whether to show balance_changes. Default to be FalseshowEffectsboolean
Whether to show transaction effects. Default to be FalseshowEventsboolean
Whether to show transaction events. Default to be FalseshowInputboolean
Whether to show transaction input data. Default to be FalseshowObjectChangesboolean
Whether to show object_changes. Default to be FalseshowRawEffectsboolean
Whether to show raw transaction effects. Default to be FalseshowRawInputboolean
Whether to show bcs-encoded transaction input dataparam[3]
requestTypestringrequired
Responses
idinteger
jsonrpcstring
balanceChangesarraynull
checkpointstring
The checkpoint number when this transaction was included and hence finalized. This is only returned in the read api, not in the transaction execution api.confirmedLocalExecutionbooleannull
digestobjectrequired
effectsoneOf
The abort error populated if the transaction failed with an abort code.
error_codeintegernull
functionstringnull
lineintegernull
module_idstringnull
ObjectRef and owner of new objects created.
owneroneOfrequired
AddressOwnerobjectrequired
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
Object Refs of objects now deleted (the old refs).
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
dependenciesarray
The set of transaction digests this transaction depends on.eventsDigestobject
executedEpochobjectrequired
owneroneOfrequired
AddressOwnerobjectrequired
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
Summary of the charges in a transaction. Storage is charged independently of computation. There are 3 parts to the storage charges:
storage_cost: it is the charge of storage at the time the transaction is executed. The cost of storage is the number of bytes of the objects being mutated multiplied by a variable storage cost per bytestorage_rebate: this is the amount a user gets back when manipulating an object. The storage_rebate is the storage_cost for an object minus fees.non_refundable_storage_fee: not all the value of the object storage cost is given back to user and there is a small fraction that is kept by the system. This value tracks that charge.When looking at a gas cost summary the amount charged to the user is computation_cost + storage_cost - storage_rebate and that is the amount that is deducted from the gas coins. non_refundable_storage_fee is collected from the objects being mutated/deleted and it is tracked by the system in storage funds.Objects deleted, including the older versions of objects mutated, have the storage field on the objects added up to a pool of "potential rebate". This rebate then is reduced by the "nonrefundable rate" such that: potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_feecomputationCostobjectrequired
nonRefundableStorageFeeobjectrequired
storageCostobjectrequired
storageRebateobjectrequired
messageVersionstringrequired
The version that every modified (mutated or deleted) object had before it was modified by this transaction.
objectIdobjectrequired
sequenceNumberintegerrequired
ObjectRef and owner of mutated objects, including gas object.
owneroneOfrequired
AddressOwnerobjectrequired
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
The object references of the shared objects used in this transaction. Empty if no shared objects were used.
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
statusobjectrequired
transactionDigestobjectrequired
ObjectRef and owner of objects that are unwrapped in this transaction. Unwrapped objects are objects that were wrapped into other objects in the past, and just got extracted out.
owneroneOfrequired
AddressOwnerobjectrequired
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
Object refs of objects previously wrapped in other objects but now deleted.
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
Object refs of objects now wrapped in other objects.
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
errorsarray
eventsarraynull
objectChangesarraynull
rawEffectsarray
rawTransactionobject
timestampMsstring
Transaction input data
dataoneOfrequired
budgetstringrequired
ownerobjectrequired
digestobjectrequired
objectIdobjectrequired
versionobjectrequired
pricestringrequired
messageVersionstringrequired
senderobjectrequired
transactiononeOfrequired
computation_chargestringrequired
epochstringrequired
epoch_start_timestamp_msstringrequired
kindstringrequired
storage_chargestringrequired
storage_rebatestringrequired
txSignaturesarrayrequired
codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Bad Request"}
cURL
curl -X POST 'https://sui-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "sui_executeTransactionBlock","params": ["AAACACBqEB6aOvXIBwES+Ahkizbvv43uihqC3kbZUE6WoRCKFwEAjvdvVsOZYzousxC8qRJOXy84znOeqsu2YAaIgE4HhEgCAAAAAAAAACB9w3+ufZMpihJFwxtCBojBaGy00TVtFxgN2C6TpIPFqwEBAQEBAAEAAAS0l6kWtGVmCaf6gnoJGE1vR2gdO6dM4NejbGSysfiHAZ+Q9/hmzCnfsdpjc86U+dldylpA9OF2mRjuv5+64AvTAgAAAAAAAAAgjleHL0UiRGjh/BfIFHCJ3EMY/dQA22c2TvNQyVJnbYUEtJepFrRlZgmn+oJ6CRhNb0doHTunTODXo2xksrH4hwoAAAAAAAAAoIYBAAAAAAAA",["AKD4XdltkCyBi1Heb4EJJ3lzuV3F4u7+CYeaE+Fd7qXpaT17yd4tHWjMf4CWq3TuXBLxTpkc2MV39P6p7eMV8QnqvbuA0Q1Bqu4RHV3JPpqmH+C527hWJGUBOZN1j9sg8w=="],{"showBalanceChanges": true,"showEffects": true,"showEvents": true,"showInput": true,"showObjectChanges": true,"showRawEffects": false,"showRawInput": true},"WaitForLocalExecution"]}'