Gas payment amount

I’m trying to understand how to determine the exact amount of gas paid in a Sui transaction. I see values like:

  • computationCost
  • storageCost
  • storageRebate
  • nonRefundableStorageFee

I understand that some arithmetic between these fields gives an estimate, but it doesn’t seem to match the actual gas paid in all cases. Specifically, storageRebate seems somewhat unpredictable, and I’m not sure how to rely on it for precise calculations.

Looking at object diffs might help, but if I’m analyzing a past transaction block, the object may no longer exist, so I can’t inspect its before/after states to compute the delta.

Is there a reliable way to compute the exact gas paid for a transaction using the node provider endpoints (e.g., fullnode RPC or indexer)?

Any help or clarification would be appreciated.