Transaction to calculate the cost of
Optional
gasOptional
innerOptional
isOptional
query<template>
Amount: {{ txUnpacked.amount }}
Name fee: {{ txUnpacked.nameFee }}
Other fees: {{ getExecutionCost(txEncoded) - txUnpacked.amount - txUnpacked.nameFee }}
</template>
Doing this way you won't worry to show wrong fee for a transaction you may not support. Because the SDK calculates the overall price of any transaction on its side.
Generated using TypeDoc
Calculates the cost of transaction execution Provides an upper cost of contract-call-related transactions because of
gasLimit
. Also assumes that oracle query fee is 0 unless it is provided in options.The idea is that if you need to show transaction details with some accuracy you can define expense fields that you want to show separately. And to show
getExecutionCost
result as a fee, subtracting all fields shown separately.