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

[Chicken & Egg] BlockRange.block_from #42

Open
bh2smith opened this issue Nov 17, 2022 · 0 comments
Open

[Chicken & Egg] BlockRange.block_from #42

bh2smith opened this issue Nov 17, 2022 · 0 comments

Comments

@bh2smith
Copy link
Contributor

Currently we get the "block_from", but opening a file in our own persisted storage, however this value can also be obtained by querying the table in dune itself. The table does not yet exist, but once it does we could experiment with fetching this value from one, or both places...

# TODO - could be replaced by Dune Query on the app_data table (once available).
block_from,
block_to=int(
# KeyError here means the query has been modified and column no longer exists
# IndexError means no results were returned from query (which is unlikely).
(await self.fetch(QUERIES["LATEST_APP_HASH_BLOCK"].query))[0][
"latest_block"
]
),
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant