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

[Feat] leo query CLI tool #27935

Merged
merged 7 commits into from
May 13, 2024
Merged

[Feat] leo query CLI tool #27935

merged 7 commits into from
May 13, 2024

Conversation

evan-schott
Copy link
Contributor

TLDR

leo query is a CLI tool that enables users to access all available on-chain state, and easily retrieve relevant context to the programs they are developing.

Features:

  • Full coverage of all available endpoints in snarkOS besides /peers, /statePath and /memoryPool:
    • Those uncovered paths can be added in the future depending on whether developers find them useful. The primary reason for not including them is they are only accessible when running a node.
  • Ability to specify custom endpoint with --endpoint and custom network with--network
  • More intuitive grouping and syntax when interacting with leo query than memorizing snarkOS endpoints
    • Additionally, query inputs are type checked, and specific errors are thrown to tell users how to correct their inputs. (Ex: all transaction ids are 61 character sequences of either lower case letters or numbers, and must be prefaced with at1).

@evan-schott evan-schott requested a review from d0cd May 6, 2024 21:57
Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 15.08380% with 152 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (fix/leo-add@764f116). Click here to learn what that means.

Files Patch % Lines
leo/cli/commands/query/utils.rs 0.00% 43 Missing ⚠️
leo/cli/commands/query/mod.rs 0.00% 25 Missing ⚠️
leo/cli/commands/query/block.rs 0.00% 22 Missing ⚠️
leo/cli/commands/query/transaction.rs 0.00% 15 Missing ⚠️
errors/src/errors/utils/util_errors.rs 0.00% 12 Missing ⚠️
leo/cli/commands/query/program.rs 0.00% 10 Missing ⚠️
leo/cli/commands/query/mempool.rs 0.00% 6 Missing ⚠️
leo/cli/commands/query/peers.rs 0.00% 5 Missing ⚠️
errors/src/errors/package/package_errors.rs 0.00% 3 Missing ⚠️
leo/cli/commands/query/committee.rs 0.00% 3 Missing ⚠️
... and 5 more
Additional details and impacted files
@@              Coverage Diff               @@
##             fix/leo-add   #27935   +/-   ##
==============================================
  Coverage               ?   74.44%           
==============================================
  Files                  ?      219           
  Lines                  ?     7376           
  Branches               ?     7376           
==============================================
  Hits                   ?     5491           
  Misses                 ?     1885           
  Partials               ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

leo/package/src/package.rs Outdated Show resolved Hide resolved
d0cd added 2 commits May 13, 2024 08:27
Signed-off-by: d0cd <23022326+d0cd@users.noreply.github.com>
@d0cd d0cd merged commit 3c83d49 into fix/leo-add May 13, 2024
15 checks passed
@d0cd d0cd deleted the feat/leo-query branch May 13, 2024 17:39
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

Successfully merging this pull request may close these issues.

2 participants