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.
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
You can use Sidecar too that exposes an endpoint to dry run a extrinsic.