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

Missing values in Receipt #3027

Open
MoonLabsDev opened this issue Nov 3, 2023 · 3 comments
Open

Missing values in Receipt #3027

MoonLabsDev opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@MoonLabsDev
Copy link

As stated in the official documentation:
https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt

currently your receipt doesnt expose the values "type" and "effectiveGasPrice". We use effectiveGasPrice in one of our bots to multiply it with "gasUsed" to get the actually spend SMR amount (and then convert it to $, to show the $ cost of a transaction).
To be fully complient it would be nice of you add those 2 values to your list. In your case they are currently both static.

  • effectiveGasPrice : QUANTITY - The sum of the base fee and tip paid per unit of gas.
  • type: QUANTITY - integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.

So in your case effectiveGasPrice would be 1000 GWEI (so 1000 * 10^9) as hex string, and type would be "0x0"

As at some point more protocols and dApps from other chains will come to shimmer you should try to be as complient as possible with the EVM standard, so that they can migrate without having to make alot of adjustments "just for Shimmer".

@MoonLabsDev MoonLabsDev added the bug Something isn't working label Nov 3, 2023
MoonLabsDev added a commit to MoonLabsDev/wasp that referenced this issue Nov 3, 2023
@trungtt198x
Copy link

@MoonLabsDev
You mentioned on Discord that you'd wanna make an PR.
Below can be the relevant code to add effectiveGasPrice
https://github.com/iotaledger/wasp/blob/develop/packages/evm/jsonrpc/types.go#L175

@MoonLabsDev
Copy link
Author

#3028

@MoonLabsDev
Copy link
Author

another solution might be

r.EffectiveGasPrice
and r.Type instead of the static values, if you fill these value correctly, but i am not a GO developer so it is hard for me to read that code (first time I see GO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants