-
Notifications
You must be signed in to change notification settings - Fork 121
Add contract instance to ledger entry fetch #2269
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
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed squash merging is enabled - updating review!
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]