Simulate Bid

A Bid will not be accepted if it fails to pass dry-run (against current world state + opportunity transaction).

There is no consequence from bid being rejected, so it makes sense to submit as many bids as it takes if you are unsure which ones will succeed, without the need of simulating each bid. If this stands, a Simulate Bid API will be not necessary.

However, we recognize that when writing and testing your program, it is handy to have a way to simulate a bid rather than actually submitting it, so that it will not be included to the blockchain (therefore, no cost of gas).

To simulate a bid, send a JSON-RPC request to https://rpc.getshio.com in the following format:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "shio_simulateBid",
  "params": [
    "E72mG9GCroPgaw9uoeGiKLzAfd9CZq82iGDjypKdzYG7",
    "txDataBase64Encoded"
  ]
}
  • The first parameter indicates opportunity transaction's digest. An ongoing auction for that opportunity transaction is required, so that we know what state to simulate against.

  • The second parameter is a Base64-encoded bcs serialized bytes of TransactionData. This is the same method of encoding as if you are using sui_dryRunTransactionBlock.

On success, the bid's side effects will be returned (gas usage, events, created objects and mutated objects), in the same format as in auctionStarted event (sideEffects field).

On error, there will be detailed error message indicating what went wrong.

Last updated