payment_queryFeeDetails - JSON-RPC Method
Returns a detailed breakdown of fee components for a signed extrinsic.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
extrinsic | string | Yes | SCALE-encoded signed extrinsic in hex |
cURL Example
curl -X POST https://api-moonbase-alpha.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":1,
"method":"payment_queryFeeDetails",
"params":["0x<signed_extrinsic_hex>"]
}'
JavaScript (polkadot.js)
import { ApiPromise, WsProvider } from '@polkadot/api';
async function details(exHex: string) {
const api = await ApiPromise.create({ provider: new WsProvider('wss://api-moonbase-alpha.n.dwellir.com/YOUR_API_KEY') });
const d = await api.rpc.payment.queryFeeDetails(exHex);
console.log(d.toHuman());
await api.disconnect();
}
Returns
Includes inclusionFee
and optional tip
fields.
Notes
- Use after constructing the exact signed extrinsic to get precise costs.
- Pair with
system_accountNextIndex
to sign with the correct nonce.