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

bug: optimism gas calc. #2

Open
denverbaumgartner opened this issue Jan 10, 2023 · 1 comment
Open

bug: optimism gas calc. #2

denverbaumgartner opened this issue Jan 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@denverbaumgartner
Copy link
Contributor

within the gas tracking branch, we have implemented a transaction entity that interacts with the optimism gas oracle to return all of the necessary data fields to calculate the gas cost of the transaction. currently, the l1_gas_used by the transaction is underestimated by ~1% on average. from my best guess, this is a problem with how we are passing in the transaction data to the contract function.

the oracle contract function being called can be found here.

an example of interacting with the oracle contract can be found in the optimism sdk here

the current convention used for passing transaction data to the function can be found here

without the serialize function of the ethers package, we are restricted to using the ethereum class in graph-ts

@denverbaumgartner denverbaumgartner added the bug Something isn't working label Jan 10, 2023
@denverbaumgartner
Copy link
Contributor Author

i really liked the idea of a big subgraph that collected and formatted every piece of data you could want and was written in a very modular way (writing each entity in its own file (?) and other good stuff) that could be forked and used as boilerplate for any type of rubicon-related subgraph you could encounter (im talking about you future messari orderbook template). but, this goes against our event-driven lifestyle at the moment.

i believe we will meet again, #2

@denverbaumgartner denverbaumgartner mentioned this issue May 26, 2023
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

1 participant