So lets say I have an unsigned transaction. Is there any way I can simulate the transaction without actually sending it to the chain to see if the transaction will fail or if it will be succesfull? Basically something like estimateGas on EVM chains.

2 Answers 2


you can try validate_transaction by calling into the runtime api using the client that you can get handle from outer node


from https://polkadot.js.org/apps/#/explorer -> developer -> Runtime calls -> taggedTransactionQueue -> validate_transaction .

  • Can I do this via polkadotjs? Commented May 16, 2023 at 10:07
  • @TadejVengust yes, what didn't you understood with my answer regarding using polkadotjs?
    – dadzerlaze
    Commented May 16, 2023 at 10:08
  • By polkadot js I ment polkadot SDK so progamatically via javascript. Commented May 16, 2023 at 10:12
  • 1
    @TadejVengust polkadot.js.org/docs/substrate/runtime#taggedtransactionqueue
    – dadzerlaze
    Commented May 16, 2023 at 10:20
  • I tried to implement this but it don't quite understand the parameters. This expects 3 parameters which are: - source (local, inBlock, external) - tx - blockHash I want to verify if a transaction will be successful or not. Don't understand why I would need to provide a block hash? Can't find any docs or examples of the usage. Can you provide some? Commented Jul 6, 2023 at 9:10

You can use an RPC call to Dry run an extrinsic at a given block. You can construct this with PolkadotJS very easily with tx.dryRun, see an example here: https://substrate.stackexchange.com/a/2913/2762

However this is an unsafe RPC call and not all the nodes has it activated, if you are running your own node you can activate it with a flag: Unsafe RPC calls?

You can use Sidecar too that exposes an endpoint to dry run a extrinsic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.