The Optimize stage takes care of simulating your transactions and preparing it to be delivered via your delivery methods.
optimizeTransaction
JSON-RPC method.
Transfer
instruction to your transaction to charge a fee to the fee payer of the transactions. This fee involves the following,
latestBlockhash
is set for your transaction and is returned back in the response.
base64
or base58
formats, but optimized transactions will be returned encoded in base64
format by default.
base58
is being deprecated from Solana and could be removed as an acceptable encoding in the future. It it advised to use base64
latestBlockhash
that can be used to verify transaction confirmation.
The response structure:
@solana/web3.js
or @solana/kit
and sign it for execution:
sendOptimizedTransaction
, transactions may also be self-optimized. All thats needed for delivery is the proper tip configuration for Gateway and Jito (if applicable).
Here’s how you can set up your transactions for delivery: