leonardocustodio / polkadart

Polkadart provides developers the ability to query a node and interact with the Polkadot based chains using Dart.
https://polkadart.dev
Apache License 2.0
39 stars 16 forks source link

how to estimate fee? #500

Open weishirongzhen opened 2 days ago

weishirongzhen commented 2 days ago

I can use json rpc payment_queryFeeDetails or payment_queryInfo to query fee before, but I found these two api are error with "data" -> "Execution failed: Execution aborted due to trap: wasm trap: wasmunreachableinstruction executed..." now, and I found some doc about below method, but it looks like polkadart are not contain them?, any help?

payment

queryFeeDetails(extrinsic: Bytes, at?: BlockHash): FeeDetails

leonardocustodio commented 1 day ago

You need to send the full encoded extrinsic. You can use a fake signature if you want to do that before really signing it.