Skip to main content

payment_queryFeeDetails

Description#

Returns a detailed fee breakdown for a signed extrinsic, including baseFee, lenFee, and adjustedWeightFee. Combine with payment_queryInfo to present both total fee and components.

Parameters#

PositionTypeDescription
0stringSigned extrinsic hex
1 (optional)stringBlock hash

Example (HTTP)#

curl -s https://api-acala.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":100,"method":"payment_queryFeeDetails","params":["0xSIGNED_EXTRINSIC_HEX"]}'

Sample Response#

{
"jsonrpc": "2.0",
"id": 100,
"result": {
"inclusionFee": {
"baseFee": "0x...",
"lenFee": "0x...",
"adjustedWeightFee": "0x..."
},
"tip": null
}
}

Code Examples#

const details = await api.rpc.payment.queryFeeDetails(signedTx.toHex());
console.log(details.toHuman());