Sui
sui.rpc.v2.TransactionExecutionService/SimulateTransaction50 credits
Simulate a transaction without executing it
Parameters
| Name | Type | Description |
|---|---|---|
| transaction | Transaction | The transaction to simulate. |
| read_mask | google.protobuf.FieldMask | Fields of the ExecutedTransaction to return. (optional) |
| checks | TransactionChecks | ENABLED (default) or DISABLED: whether the transaction is checked as for a real execution. (optional) |
| do_gas_selection | bool | Select gas payment objects based on a budget estimate. Ignored when checks are DISABLED. (optional) |
Returns
Type
SimulateTransactionResponse
transaction (ExecutedTransaction), command_outputs (per command: return_values and mutated_by_ref with BCS value and JSON) and suggested_gas_price. Nothing is committed to the chain.
Code examples
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"transaction": {
"bcs": {
"value": "AAACACBfmzYh0HoOxS5FQyGBCQKCVrQsqz1b2yQPzaRNf5fNJwEAAAAAAAAAAA=="
}
},
"read_mask": "effects.status"
}' \
grpc-holy-burned-sky-sui-mainnet.rpcnode.dev:443 \
sui.rpc.v2.TransactionExecutionService/SimulateTransaction