Add contract instance to ledger entry fetch#2269
Merged
Merged
Conversation
…eyAccount We were previously checking to see if asset, offer or data-name were also passed in. If not, the LedgerKeyAccount of the given account was added to the list of keys. However, there is an edge case, that if the user passes in 'xlm' as the asset, the entries was returning empty because there is not an xlm trustline so no key was passed in. As a solution, this PR always include the LedgerKeyAccount in the list of keys, so the LedgerEntryAccount is always returned when --account is passed in as an arg
mootz12
requested changes
Nov 13, 2025
mootz12
left a comment
Contributor
There was a problem hiding this comment.
LG2M.
Can we fix the commit history before merging? Git seems to have gotten lost after ledger_entry_get was merged.
Feel free to ignore if some magic will prevent the likely duplicate commit history github seems to think exists.
mootz12
approved these changes
Nov 13, 2025
mootz12
left a comment
Contributor
There was a problem hiding this comment.
Noticed squash merging is enabled - updating review!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
this pr is based off of #2012
closes #2273
Updates the
ledger entry fetchcommand to allow for returning the contract instance ledger entry by adding an--instanceoption which will include the contract instance ledger entry to the list of keys being fetched.cargo run ledger entry fetch contract-data --contract hello-world --network local --instanceWhy
This way we are able to more easily fetch a contract wasm hash based on it's contract id/alias.
Known limitations
[TODO or N/A]