ТарифыGitHubКабинет

Sui

sui.rpc.v2.TransactionExecutionService/SimulateTransactionКредиты: 50

Simulate a transaction without executing it

Сеть: sui

Параметры

ИмяТипОписание
transactionTransactionThe transaction to simulate.
read_maskgoogle.protobuf.FieldMaskFields of the ExecutedTransaction to return. (необязательно)
checksTransactionChecksENABLED (default) or DISABLED: whether the transaction is checked as for a real execution. (необязательно)
do_gas_selectionboolSelect 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