Write API
iota_devInspectTransactionBlock
Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.
Parameters
sender_address< IotaAddress >
Required: yes
tx_bytes< Base64 >
Required: yes
Description: BCS encoded TransactionKind(as opposed to TransactionData, which include gasBudget and gasPrice)
gas_price< BigInt_for_uint64 >
Required: no
Description: Gas is not charged, but gas usage is still calculated. Default to use reference gas price
epoch< BigInt_for_uint64 >
Required: no
Description: The epoch to perform the call. Will be set from the system state object if not provided
additional_args< DevInspectArgs >
Required: no
Description: Additional arguments including gas_budget, gas_objects, gas_sponsor and skip_checks.
Result
The response from processing a dev inspect transaction
Parameters
effects< TransactionBlockEffects >
Required: yes
Description: Summary of effects that likely would be generated if the transaction is actually run. Note however, that not all dev-inspect transactions are actually usable as transactions so it might not be possible actually generate these effects from a normal transaction.
error< [string,null] >
Required: no
Description: Execution error from executing the transactions
events<[ Event ]>
Required: yes
Description: Events that likely would be generated if the transaction is actually run.
rawEffects<[ string ]>
Required: no
Description: The raw effects of the transaction that was dev inspected.
rawTxnData<[ string ]>
Required: no
Description: The raw transaction data that was dev inspected.
results< IotaExecutionResult [array,null] >
Required: no
Description: Execution results (including return values) from executing the transactions
Example
Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "iota_devInspectTransactionBlock",
"params": [
"0xd70420418b84502e506794227f897237764dde8d79a01ab2104bf742a277a2ab",
"AAACACBnxtMcbJcOVn8D72fYEaT4Q2ZbjePygvpIs+AQO6m77QEAagYVO5/EhuEB8OnicDrIZm0GrsxN3355JqNhlwxlpbECAAAAAAAAACDoQ3EipycU+/EOvBcDPFtMkZiSbdzWAw3CwdmQCAtBWAEBAQEBAAEAAMKwMSYiOSHAg+aAydIFAV6gYWuOXEniP/ORldAFiheCASxDgF0Nb1QCp60Npb3sVJx83qBrxKHTOaIlIe6pM7iJAgAAAAAAAAAgnvsgc1pPauyCE27/c+aBnHN3fSsxRAWdEJYzYFOryNDCsDEmIjkhwIPmgMnSBQFeoGFrjlxJ4j/zkZXQBYoXggoAAAAAAAAAoIYBAAAAAAAA",
1000,
8888,
null
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"effects": {
"messageVersion": "v1",
"status": {
"status": "success"
},
"executedEpoch": "0",
"gasUsed": {
"computationCost": "100",
"computationCostBurned": "100",
"storageCost": "100",
"storageRebate": "10",
"nonRefundableStorageFee": "0"
},
"transactionDigest": "76gyHCk7FRrGACRqXM7Ybj5uJLtAzgEMJ5P9CeEzxZSG",
"mutated": [
{
"owner": {
"AddressOwner": "0xc2b03126223921c083e680c9d205015ea0616b8e5c49e23ff39195d0058a1782"
},
"reference": {
"objectId": "0x2c43805d0d6f5402a7ad0da5bdec549c7cdea06bc4a1d339a22521eea933b889",
"version": 2,
"digest": "BhbWpBeESxuRWvmvLMyb2JNUuFa6j4aG1T4WUiPgKAHm"
}
},
{
"owner": {
"AddressOwner": "0x67c6d31c6c970e567f03ef67d811a4f843665b8de3f282fa48b3e0103ba9bbed"
},
"reference": {
"objectId": "0x6a06153b9fc486e101f0e9e2703ac8666d06aecc4ddf7e7926a361970c65a5b1",
"version": 2,
"digest": "GdfET1avZReDftpJNB8LSuHJ2cKUheSbEaLMzuPVXHsM"
}
}
],
"gasObject": {
"owner": {
"ObjectOwner": "0xc2b03126223921c083e680c9d205015ea0616b8e5c49e23ff39195d0058a1782"
},
"reference": {
"objectId": "0x2c43805d0d6f5402a7ad0da5bdec549c7cdea06bc4a1d339a22521eea933b889",
"version": 2,
"digest": "BhbWpBeESxuRWvmvLMyb2JNUuFa6j4aG1T4WUiPgKAHm"
}
},
"eventsDigest": "6kerMphN4S5QTfd9TAhwMiFq1q9c2YwfpheBfWm85vUq"
},
"events": []
},
"id": 1
}
iota_dryRunTransactionBlock
Return transaction execution effects including the gas cost summary, while the effects are not committed to the chain.
Parameters
tx_bytes< Base64 >
Required: Yes
Result
DryRunTransactionBlockResponse< DryRunTransactionBlockResponse >
Parameters
balanceChanges<[ BalanceChange ]>
Required: yes
effects< TransactionBlockEffects >
Required: yes
events<[ Event ]>
Required: yes
events<[ Event ]>
Required: yes
input< TransactionBlockData >
Required: yes
objectChanges<[ ObjectChange ]>
Required: yes
Example
Dry runs a transaction block to get back estimated gas fees and other potential effects.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "iota_dryRunTransactionBlock",
"params": [
"AAACACB7qR3cfnF89wjJNwYPBASHNuwz+xdG2Zml5YzVxnftgAEAT4LxyFh7mNZMAL+0bDhDvYv2zPp8ZahhOGmM0f3Kw9wCAAAAAAAAACCxDABG4pPAjOwPQHg9msS/SrtNf4IGR/2F0ZGD3ufH/wEBAQEBAAEAAE9XTdl6Y4BapdPcmZyAyccZhwIZVzDQIcZrRpqqsEQ4AejYx86GPzE9o9vZKoPvJtEouI/ma/JuDg0Jza9yfR2EAgAAAAAAAAAgzMqpegLMOpgEFnDhYJ23FOmFjJbp5GmFXxzzv9+X6GVPV03ZemOAWqXT3JmcgMnHGYcCGVcw0CHGa0aaqrBEOAoAAAAAAAAAoIYBAAAAAAAA"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"digest": "B9CPdGjcArAtZXAiqHU874B5D9ZcFHj6kx4W3LaHdgAk",
"transaction": {
"data": {
"messageVersion": "v1",
"transaction": {
"kind": "ProgrammableTransaction",
"inputs": [
{
"type": "pure",
"valueType": "address",
"value": "0x7ba91ddc7e717cf708c937060f04048736ec33fb1746d999a5e58cd5c677ed80"
},
{
"type": "object",
"objectType": "immOrOwnedObject",
"objectId": "0x4f82f1c8587b98d64c00bfb46c3843bd8bf6ccfa7c65a86138698cd1fdcac3dc",
"version": "2",
"digest": "Cv7n2YaM7Am1ssZGu4khsFkcKHnpgVhwFCSs4kLjrtLW"
}
],
"transactions": [
{
"TransferObjects": [
[
{
"Input": 1
}
],
{
"Input": 0
}
]
}
]
},
"sender": "0x4f574dd97a63805aa5d3dc999c80c9c7198702195730d021c66b469aaab04438",
"gasData": {
"payment": [
{
"objectId": "0xe8d8c7ce863f313da3dbd92a83ef26d128b88fe66bf26e0e0d09cdaf727d1d84",
"version": 2,
"digest": "EnRQXe1hDGAJCFyF2ds2GmPHdvf9V6yxf24LisEsDkYt"
}
],
"owner": "0x4f574dd97a63805aa5d3dc999c80c9c7198702195730d021c66b469aaab04438",
"price": "10",
"budget": "100000"
}
},
"txSignatures": [
"AAk0zWxFHoW4PChs3RzxsnNgLYMAvtk8maZHBNEUiupqyV8ptMZrc/tt5rzi09oguNn1JeRsrO6sIH0JDn/sqAdDij1TvBYKLcfLNo8fq6GASb9yfo6uvuwNUBGkTf54wQ=="
]
},
"rawTransaction": "AQAAAAAAAgAge6kd3H5xfPcIyTcGDwQEhzbsM/sXRtmZpeWM1cZ37YABAE+C8chYe5jWTAC/tGw4Q72L9sz6fGWoYThpjNH9ysPcAgAAAAAAAAAgsQwARuKTwIzsD0B4PZrEv0q7TX+CBkf9hdGRg97nx/8BAQEBAQABAABPV03ZemOAWqXT3JmcgMnHGYcCGVcw0CHGa0aaqrBEOAHo2MfOhj8xPaPb2SqD7ybRKLiP5mvybg4NCc2vcn0dhAIAAAAAAAAAIMzKqXoCzDqYBBZw4WCdtxTphYyW6eRphV8c87/fl+hlT1dN2XpjgFql09yZnIDJxxmHAhlXMNAhxmtGmqqwRDgKAAAAAAAAAKCGAQAAAAAAAAFhAAk0zWxFHoW4PChs3RzxsnNgLYMAvtk8maZHBNEUiupqyV8ptMZrc/tt5rzi09oguNn1JeRsrO6sIH0JDn/sqAdDij1TvBYKLcfLNo8fq6GASb9yfo6uvuwNUBGkTf54wQ==",
"effects": {
"messageVersion": "v1",
"status": {
"status": "success"
},
"executedEpoch": "0",
"gasUsed": {
"computationCost": "100",
"computationCostBurned": "100",
"storageCost": "100",
"storageRebate": "10",
"nonRefundableStorageFee": "0"
},
"transactionDigest": "8UExPV121BEfWkbymSPDYhh23rVNh3MSWtC5juJ9JGMJ",
"mutated": [
{
"owner": {
"AddressOwner": "0x4f574dd97a63805aa5d3dc999c80c9c7198702195730d021c66b469aaab04438"
},
"reference": {
"objectId": "0xe8d8c7ce863f313da3dbd92a83ef26d128b88fe66bf26e0e0d09cdaf727d1d84",
"version": 2,
"digest": "EnRQXe1hDGAJCFyF2ds2GmPHdvf9V6yxf24LisEsDkYt"
}
},
{
"owner": {
"AddressOwner": "0x7ba91ddc7e717cf708c937060f04048736ec33fb1746d999a5e58cd5c677ed80"
},
"reference": {
"objectId": "0x4f82f1c8587b98d64c00bfb46c3843bd8bf6ccfa7c65a86138698cd1fdcac3dc",
"version": 2,
"digest": "Cv7n2YaM7Am1ssZGu4khsFkcKHnpgVhwFCSs4kLjrtLW"
}
}
],
"gasObject": {
"owner": {
"ObjectOwner": "0x4f574dd97a63805aa5d3dc999c80c9c7198702195730d021c66b469aaab04438"
},
"reference": {
"objectId": "0xe8d8c7ce863f313da3dbd92a83ef26d128b88fe66bf26e0e0d09cdaf727d1d84",
"version": 2,
"digest": "EnRQXe1hDGAJCFyF2ds2GmPHdvf9V6yxf24LisEsDkYt"
}
},
"eventsDigest": "55TNn3v5vpuXjQfjqamw76P9GZD522pumo4NuT7RYeFB"
},
"objectChanges": [
{
"type": "transferred",
"sender": "0x4f574dd97a63805aa5d3dc999c80c9c7198702195730d021c66b469aaab04438",
"recipient": {
"AddressOwner": "0x7ba91ddc7e717cf708c937060f04048736ec33fb1746d999a5e58cd5c677ed80"
},
"objectType": "0x2::example::Object",
"objectId": "0x4f82f1c8587b98d64c00bfb46c3843bd8bf6ccfa7c65a86138698cd1fdcac3dc",
"version": "2",
"digest": "B3xLC8EbyvTxy5pgiwTNUzHLa6kS7uwD6sZdErKB8F8f"
}
]
},
"id": 1
}
iota_executeTransactionBlock
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
Parameters
tx_bytes< Base64 >
Required: yes
Description: BCS serialized transaction data bytes without its type tag, as base-64 encoded string.
signatures<[ Base64 ]>
Required: yes
Description: A list of signatures (
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.
options< TransactionBlockResponseOptions >
Required: no
Descriptions: Options for specifying the content to be returned
request_type< ExecuteTransactionRequestType >
Required: no
Descriptions: The request type, derived from
IotaTransactionBlockResponseOptions
if None
Result
IotaTransactionBlockResponse< TransactionBlockResponse >
Parameters
balanceChanges< BalanceChange [array,null] >
Required: no
checkpoint< BigInt_for_uint64 | null >
Required: no
Description: 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.
confirmedLocalExecution< [boolean,null] >
Required: no
digest< TransactionDigest >
Required: no
effects< TransactionBlockEffects | null >
Required: no
errors<[ string ]>
Required: yes
events< Event [array,null] >
Required: no
objectChanges< ObjectChange [array,null] >
Required: no
rawEffects<[ string ]>
Required: no
rawTransaction< Base64 >
Required: no
Description: BCS encoded [SenderSignedData] that includes input object references returns empty array if
show_raw_transaction
is false
timestampMs< BigInt_for_uint64 | null >
Required: No
transaction< TransactionBlock | null >
Required: No
Description: Transaction input data
Example
Executes a transaction with serialized signatures.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "iota_executeTransactionBlock",
"params": [
"AAACACBqEB6aOvXIBwES+Ahkizbvv43uihqC3kbZUE6WoRCKFwEAjvdvVsOZYzousxC8qRJOXy84znOeqsu2YAaIgE4HhEgCAAAAAAAAACB9w3+ufZMpihJFwxtCBojBaGy00TVtFxgN2C6TpIPFqwEBAQEBAAEAAL5N77yuKRb4g/2ejPxYvLpjZ2SwXH6wsX5+CabmRdtkAZ+Q9/hmzCnfsdpjc86U+dldylpA9OF2mRjuv5+64AvTAgAAAAAAAAAgjleHL0UiRGjh/BfIFHCJ3EMY/dQA22c2TvNQyVJnbYW+Te+8rikW+IP9noz8WLy6Y2dksFx+sLF+fgmm5kXbZAoAAAAAAAAAoIYBAAAAAAAA",
[
"ANM+jgFPQLHI7qyW/zmHCIi+gStO1jiw2S/b6tR7A9dbt/86/06SB4Z5/gdkRT5pkN5TRdd1INmxxbDZAOyK/AvqvbuA0Q1Bqu4RHV3JPpqmH+C527hWJGUBOZN1j9sg8w=="
],
{
"showInput": true,
"showRawInput": true,
"showEffects": true,
"showEvents": true,
"showObjectChanges": true,
"showBalanceChanges": true,
"showRawEffects": false
},
"WaitForLocalExecution"
]
}
Response
{
"jsonrpc": "2.0",
"result": {
"digest": "6x6axDu4LwDWuSjseCAwBzdKsyJ59iuV7QPNzctdfw7h",
"transaction": {
"data": {
"messageVersion": "v1",
"transaction": {
"kind": "ProgrammableTransaction",
"inputs": [
{
"type": "pure",
"valueType": "address",
"value": "0x6a101e9a3af5c8070112f808648b36efbf8dee8a1a82de46d9504e96a1108a17"
},
{
"type": "object",
"objectType": "immOrOwnedObject",
"objectId": "0x8ef76f56c399633a2eb310bca9124e5f2f38ce739eaacbb6600688804e078448",
"version": "2",
"digest": "9Tvs1pGrMbNv7kkr1PoKLsWamyQpaFz5UWbL2AQ1ezk2"
}
],
"transactions": [
{
"TransferObjects": [
[
{
"Input": 1
}
],
{
"Input": 0
}
]
}
]
},
"sender": "0xbe4defbcae2916f883fd9e8cfc58bcba636764b05c7eb0b17e7e09a6e645db64",
"gasData": {
"payment": [
{
"objectId": "0x9f90f7f866cc29dfb1da6373ce94f9d95dca5a40f4e1769918eebf9fbae00bd3",
"version": 2,
"digest": "AaeJbTYkUuyromsivxzkoxSkHt7pCESTyQG7xz6nbQ2G"
}
],
"owner": "0xbe4defbcae2916f883fd9e8cfc58bcba636764b05c7eb0b17e7e09a6e645db64",
"price": "10",
"budget": "100000"
}
},
"txSignatures": [
"ANM+jgFPQLHI7qyW/zmHCIi+gStO1jiw2S/b6tR7A9dbt/86/06SB4Z5/gdkRT5pkN5TRdd1INmxxbDZAOyK/AvqvbuA0Q1Bqu4RHV3JPpqmH+C527hWJGUBOZN1j9sg8w=="
]
},
"rawTransaction": "AQAAAAAAAgAgahAemjr1yAcBEvgIZIs277+N7ooagt5G2VBOlqEQihcBAI73b1bDmWM6LrMQvKkSTl8vOM5znqrLtmAGiIBOB4RIAgAAAAAAAAAgfcN/rn2TKYoSRcMbQgaIwWhstNE1bRcYDdguk6SDxasBAQEBAQABAAC+Te+8rikW+IP9noz8WLy6Y2dksFx+sLF+fgmm5kXbZAGfkPf4Zswp37HaY3POlPnZXcpaQPThdpkY7r+fuuAL0wIAAAAAAAAAII5Xhy9FIkRo4fwXyBRwidxDGP3UANtnNk7zUMlSZ22Fvk3vvK4pFviD/Z6M/Fi8umNnZLBcfrCxfn4JpuZF22QKAAAAAAAAAKCGAQAAAAAAAAFhANM+jgFPQLHI7qyW/zmHCIi+gStO1jiw2S/b6tR7A9dbt/86/06SB4Z5/gdkRT5pkN5TRdd1INmxxbDZAOyK/AvqvbuA0Q1Bqu4RHV3JPpqmH+C527hWJGUBOZN1j9sg8w==",
"effects": {
"messageVersion": "v1",
"status": {
"status": "success"
},
"executedEpoch": "0",
"gasUsed": {
"computationCost": "100",
"computationCostBurned": "100",
"storageCost": "100",
"storageRebate": "10",
"nonRefundableStorageFee": "0"
},
"transactionDigest": "9agZ3azEMgMqxrDVG8P4GddELfWag2HhimEkpjixHhGE",
"mutated": [
{
"owner": {
"AddressOwner": "0xbe4defbcae2916f883fd9e8cfc58bcba636764b05c7eb0b17e7e09a6e645db64"
},
"reference": {
"objectId": "0x9f90f7f866cc29dfb1da6373ce94f9d95dca5a40f4e1769918eebf9fbae00bd3",
"version": 2,
"digest": "AaeJbTYkUuyromsivxzkoxSkHt7pCESTyQG7xz6nbQ2G"
}
},
{
"owner": {
"AddressOwner": "0x6a101e9a3af5c8070112f808648b36efbf8dee8a1a82de46d9504e96a1108a17"
},
"reference": {
"objectId": "0x8ef76f56c399633a2eb310bca9124e5f2f38ce739eaacbb6600688804e078448",
"version": 2,
"digest": "9Tvs1pGrMbNv7kkr1PoKLsWamyQpaFz5UWbL2AQ1ezk2"
}
}
],
"gasObject": {
"owner": {
"ObjectOwner": "0xbe4defbcae2916f883fd9e8cfc58bcba636764b05c7eb0b17e7e09a6e645db64"
},
"reference": {
"objectId": "0x9f90f7f866cc29dfb1da6373ce94f9d95dca5a40f4e1769918eebf9fbae00bd3",
"version": 2,
"digest": "AaeJbTYkUuyromsivxzkoxSkHt7pCESTyQG7xz6nbQ2G"
}
},
"eventsDigest": "816hEv4WAW2reK9xkf11PeHiaZJrp7PQT9oGJZhdf9TN"
},
"objectChanges": [
{
"type": "transferred",
"sender": "0xbe4defbcae2916f883fd9e8cfc58bcba636764b05c7eb0b17e7e09a6e645db64",
"recipient": {
"AddressOwner": "0x6a101e9a3af5c8070112f808648b36efbf8dee8a1a82de46d9504e96a1108a17"
},
"objectType": "0x2::example::Object",
"objectId": "0x8ef76f56c399633a2eb310bca9124e5f2f38ce739eaacbb6600688804e078448",
"version": "2",
"digest": "7PsBHpUW6yfGNov2WrbVafLjgT9nYziQ3gVDbRq6zTbF"
}
]
},
"id": 1
}
Last updated