my goal is to compute the cost of gas for a successful tx.
I get a callback when a transaction succeeds and i retrieve gasUsed
with
transactionReceipt.getGasUsed()
. Now I need to know the exact gas price that was used for this tx.
It does not seem like gasprice is stored in txreceipt. the gas price (obtained with transfer.requestCurrentGasPrice()
) is in some other place where tx is signed but at that time we would not know the actual gas that will be used. so i wait for txreceipt
to find the actual gas used but i then ran into the issue of not knowing gas price that was used.