Sui
sui.rpc.v2.TransactionExecutionService/SimulateTransaction50クレジット
Simulate a transaction without executing it
パラメータ
| 名前 | 型 | 説明 |
|---|---|---|
| transaction | Transaction | The transaction to simulate. |
| read_mask | google.protobuf.FieldMask | Fields of the ExecutedTransaction to return. (任意) |
| checks | TransactionChecks | ENABLED (default) or DISABLED: whether the transaction is checked as for a real execution. (任意) |
| do_gas_selection | bool | Select gas payment objects based on a budget estimate. Ignored when checks are DISABLED. (任意) |
戻り値
型
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.
コード例
# 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