sui_devInspectTransactionBlock

Write API

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

KeyRequiredTypeDetail
sender_addressStringSui address
tx_bytesBase64BCS encoded TransactionKind(as opposed to TransactionData, which include gasBudget and gasPrice)
gas_priceBigInt_for_uint64Gas is not charged, but gas usage is still calculated. Default to use reference gas price
epochBigInt_for_uint64The epoch to perform the call. Will be set from the system state object if not provided
"params": [
    "0xd70420418b84502e506794227f897237764dde8d79a01ab2104bf742a277a2ab",
    "AAMACADKmjsAAAAAAAgAypo7AAAAAAAgglqSaZYpUVsSteIC4sz1LMqKeqs+vUjkLh7NrAd/6tcCAgACAQAAAQEAAQIDAAAAAAMAAAEAAQIA"
  ]

Result

DevInspectResults : <DevInspectResults>

  • effects : <[TransactionBlockEffects]> - 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> - Execution error from executing the transactions
  • events : <[Event]> - Events that likely would be generated if the transaction is actually run.
  • results : <[SuiExecutionResult]> - Execution results (including return values) from executing the transactions

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
  "method": "sui_devInspectTransactionBlock",
  "params": [
    "0xd70420418b84502e506794227f897237764dde8d79a01ab2104bf742a277a2ab",
    "AAMACADKmjsAAAAAAAgAypo7AAAAAAAgglqSaZYpUVsSteIC4sz1LMqKeqs+vUjkLh7NrAd/6tcCAgACAQAAAQEAAQIDAAAAAAMAAAEAAQIA"
  ],
  "id": 1,
  "jsonrpc": "2.0"
}'

Return

{
    "jsonrpc": "2.0",
    "result": {
        "effects": {
            "messageVersion": "v1",
            "status": {
                "status": "success"
            },
            "executedEpoch": "118",
            "gasUsed": {
                "computationCost": "790000",
                "storageCost": "2964000",
                "storageRebate": "0",
                "nonRefundableStorageFee": "0"
            },
            "modifiedAtVersions": [
                {
                    "objectId": "0xc0d23cb8168a197641d162b1e3be65930f4f536ed40fdade35c0ee0fc2d9252a",
                    "sequenceNumber": "0"
                }
            ],
            "transactionDigest": "GuNyiru3Pki7sCQkbxbgBWZcYKru3F8Bc1VEH7qGy4k9",
            "created": [
                {
                    "owner": {
                        "AddressOwner": "0x825a92699629515b12b5e202e2ccf52cca8a7aab3ebd48e42e1ecdac077fead7"
                    },
                    "reference": {
                        "objectId": "0x0a19b1d491656a33b59dd38f87b1e7298b6e85fef13e3199c3cc67541e330d5e",
                        "version": 9223372036854775807,
                        "digest": "HcFKfWwRrBAe11zM3z5fCgWYskGzWMamscw9L2mYNpSk"
                    }
                },
                {
                    "owner": {
                        "AddressOwner": "0x825a92699629515b12b5e202e2ccf52cca8a7aab3ebd48e42e1ecdac077fead7"
                    },
                    "reference": {
                        "objectId": "0x1221058893bedeac8c031eb9aea234e23ca45ef0ad8f5e401cde2f6773247477",
                        "version": 9223372036854775807,
                        "digest": "D2FnAW2KkbXpzcXp2fynEZsgF1NimaEQmfu5kxhH5bbm"
                    }
                }
            ],
            "mutated": [
                {
                    "owner": {
                        "AddressOwner": "0xd70420418b84502e506794227f897237764dde8d79a01ab2104bf742a277a2ab"
                    },
                    "reference": {
                        "objectId": "0xc0d23cb8168a197641d162b1e3be65930f4f536ed40fdade35c0ee0fc2d9252a",
                        "version": 9223372036854775807,
                        "digest": "G3VJYHDbcS3KPZuGPqCVhbmCuBwguvV7M9fguyjqJXE6"
                    }
                }
            ],
            "gasObject": {
                "owner": {
                    "AddressOwner": "0xd70420418b84502e506794227f897237764dde8d79a01ab2104bf742a277a2ab"
                },
                "reference": {
                    "objectId": "0xc0d23cb8168a197641d162b1e3be65930f4f536ed40fdade35c0ee0fc2d9252a",
                    "version": 9223372036854775807,
                    "digest": "G3VJYHDbcS3KPZuGPqCVhbmCuBwguvV7M9fguyjqJXE6"
                }
            }
        },
        "events": [],
        "results": [
            {
                "mutableReferenceOutputs": [
                    [
                        "GasCoin",
                        [
                            192,
                            210,
                            60,
                            184,
                            22,
                            138,
                            25,
                            118,
                            65,
                            209,
                            98,
                            177,
                            227,
                            190,
                            101,
                            147,
                            15,
                            79,
                            83,
                            110,
                            212,
                            15,
                            218,
                            222,
                            53,
                            192,
                            238,
                            15,
                            194,
                            217,
                            37,
                            42,
                            0,
                            224,
                            5,
                            45,
                            11,
                            0,
                            0,
                            0
                        ],
                        "0x2::coin::Coin<0x2::sui::SUI>"
                    ]
                ],
                "returnValues": [
                    [
                        [
                            10,
                            25,
                            177,
                            212,
                            145,
                            101,
                            106,
                            51,
                            181,
                            157,
                            211,
                            143,
                            135,
                            177,
                            231,
                            41,
                            139,
                            110,
                            133,
                            254,
                            241,
                            62,
                            49,
                            153,
                            195,
                            204,
                            103,
                            84,
                            30,
                            51,
                            13,
                            94,
                            0,
                            202,
                            154,
                            59,
                            0,
                            0,
                            0,
                            0
                        ],
                        "0x2::coin::Coin<0x2::sui::SUI>"
                    ],
                    [
                        [
                            18,
                            33,
                            5,
                            136,
                            147,
                            190,
                            222,
                            172,
                            140,
                            3,
                            30,
                            185,
                            174,
                            162,
                            52,
                            226,
                            60,
                            164,
                            94,
                            240,
                            173,
                            143,
                            94,
                            64,
                            28,
                            222,
                            47,
                            103,
                            115,
                            36,
                            116,
                            119,
                            0,
                            202,
                            154,
                            59,
                            0,
                            0,
                            0,
                            0
                        ],
                        "0x2::coin::Coin<0x2::sui::SUI>"
                    ]
                ]
            },
            {}
        ]
    },
    "id": 1
}
Language
Click Try It! to start a request and see the response here!