I am currently working on a project involving Tezos smart contracts, and I'm using Taquito to interact with the Tezos blockchain. I'm trying to calculate the total fees spent on a confirmed transaction, including the baker's fee and the storage cost.
From what I can tell, the result: OperationContentsAndResult
object returned when an operation is confirmed contains a fee
field (which I assume represents the baker's fee) and a storage_limit
field. My current approach is to calculate the total fee as fee + storage_limit * 250 mutez
.
However, it feels like I might be reinventing the wheel here. Is there a built-in function or feature in Taquito that allows you to get the total fees (in XTZ) spent on a transaction? If not, is my current approach correct, or is there a better way to calculate this?