1

I saw this polkadot API document: https://polkadot.js.org/docs/substrate/rpc/#payment and it mentioned that the payment_queryInfo is deprecated and should use api.call.transactionPaymentApi.queryInfo instead.

Does this mean I can only use queryInfo by using JS SDK directly? or is there any RPC method that can replace this method?

Because when I search for supported rpc methods by invoking rpc_methods, it still returns payment_queryInfo as one of the supported methods, and I don't see other alternative RPC methods.

Thanks

1 Answer 1

2

for the time being the RPC is still available, but will soon be faded out, that's why it's marked as deprecated. You could use the api.call.transactionPaymentApi.queryInfo as you mentioned or, if you prefer using RPC, you could also use the RPC state_call with TransactionPaymentApi_query_info and the encoded extrinsic you'd like to know the fees of. Both alternatives are equivalent and will return the same result.

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.