Skip to content

Simulate

Pre-execution simulation of a transaction, predicting its execution cost and resource usage without committing any changes.

This method typically returns information like estimated gas fees or other transaction-related metrics to anticipate the impact of operations before they are executed on the blockchain.

Method Declaration

Python
async def simulate(self, transaction: Tx)
Unification Plan
  • Some extra parameters in TypeScript? What to do with them?

Parameters

ParameterLocationTypeRequiredDescription
transactionqueryTxtrueThe transaction to simulate.

Response

StatusMeaningSchema
200OKGasInfo
400Bad RequestThe request was malformed or invalid.

Examples: Python | TypeScript | Rust