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

Add command for getting arbitrary ledger entries #1317

Open
leighmcculloch opened this issue May 7, 2024 · 2 comments
Open

Add command for getting arbitrary ledger entries #1317

leighmcculloch opened this issue May 7, 2024 · 2 comments

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented May 7, 2024

The contract read subcommand supports reading contract data ledger entries, but not other ledger entries outside of contract data. It accepts a contract data key, and returns a contract data entry.

It'd be helpful if it could retrieve any ledger entry, and I think there is mild ecosystem demand for this.

I've seen several people spread over a long period of time (untracked sorry, without links) try to use the contract read subcommand for reading random entries, or for reading contract data ledger entries and expect to get back the full entry as XDR, not only the value.

It seems like the existing UI maybe underestimated the average user's willingness to engage with the ledger entry as a whole, or at the least there's a second audience of users who are interested in working with ledger entries themselves.

The RPC has a getLedgerEntries endpoint that given multiple keys returns multiple entries. It would be trivial to support that in the CLI as a subcommand. The less trivial thing would be to consider where to put it.

@github-project-automation github-project-automation bot moved this to Backlog in DevX May 7, 2024
@leighmcculloch leighmcculloch changed the title Add support for arbitrary ledger entries to 'contract read' Add support for getting arbitrary ledger entries Dec 10, 2024
@leighmcculloch
Copy link
Member Author

Suggestion for API:

stellar ledger-entries get --key-xdr <XDR> | stellar xdr decode --type LedgerEntry

@leighmcculloch leighmcculloch changed the title Add support for getting arbitrary ledger entries Add command for getting arbitrary ledger entries Dec 10, 2024
@janewang
Copy link
Contributor

Related to this ticket #1838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Not Ready)
Development

No branches or pull requests

2 participants