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

Accept tip parameter to return past data #8

Open
whoabuddy opened this issue Mar 25, 2023 · 0 comments
Open

Accept tip parameter to return past data #8

whoabuddy opened this issue Mar 25, 2023 · 0 comments

Comments

@whoabuddy
Copy link
Contributor

The Stacks Blockchain API supports a tip parameter for read-only contract calls, which can bring up the data at a certain point in time based on the index_block_hash of the Stacks block height.

Ideally we could support specifying the tip as a hash, a block height, or a cycle number.

  • tip (hash) could be passed directly
  • block height would require a query to get index_tip_hash
  • cycle number would require a query to get first-block-in-cycle, then index_tip_hash

The value would be passed as part of the ReadOnlyFunctionOptions, and is accepted by micro-stacks.

image

image

@whoabuddy whoabuddy changed the title Accept tip parameter to past data Accept tip parameter to return past data Mar 27, 2023
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