Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas Fee Calc is using Gas 'Provided' not 'Used' #89

Closed
jmank88 opened this issue Aug 10, 2018 · 1 comment
Closed

Gas Fee Calc is using Gas 'Provided' not 'Used' #89

jmank88 opened this issue Aug 10, 2018 · 1 comment

Comments

@jmank88
Copy link
Contributor

jmank88 commented Aug 10, 2018

screenshot from 2018-08-10 15-58-41
https://testnet-explorer.gochain.io/tx/0xf5bb33b56d16abb1d2677176eefdd1280b20fd9182ef26c5e847f753632024df

The Gas Fee displayed in explorer is derived from Gas Provided, resulting in an incorrect value when a transaction provides more than is actually used. Instead, it should be based on gasUsed from the transaction receipt:

> eth.getTransactionReceipt('0xf5bb33b56d16abb1d2677176eefdd1280b20fd9182ef26c5e847f753632024df')
{
  blockHash: "0xa070bc9a285837a96d2d28102b435e5d4e23bdfeb7036d60388afd2f0244f8a6",
  blockNumber: 760427,
  contractAddress: null,
  cumulativeGasUsed: 21000,
  from: "0x96767c3f17064c6f1372918a3feef32516624cfe",
  gasUsed: 21000,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  status: "0x1",
  to: "0x78cb510135787f42a23ad46998eb16b756111559",
  transactionHash: "0xf5bb33b56d16abb1d2677176eefdd1280b20fd9182ef26c5e847f753632024df",
  transactionIndex: 0
}
@jmank88
Copy link
Contributor Author

jmank88 commented Aug 10, 2018

We should consider displaying additional receipt fields as well.

jmank88 added a commit that referenced this issue Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant