Skip to content

Conversation

@elizabethengelman
Copy link
Collaborator

@elizabethengelman elizabethengelman commented Oct 30, 2025

What

this pr is based off of #2012

closes #2273

Updates the ledger entry fetch command to allow for returning the contract instance ledger entry by adding an --instance option 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 --instance

Why

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]

ifropc and others added 30 commits May 7, 2025 11:40
…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
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Oct 30, 2025
@elizabethengelman elizabethengelman marked this pull request as ready for review November 4, 2025 16:26
@sagpatil sagpatil requested a review from fnando November 5, 2025 20:54
Base automatically changed from ledger-entry-get to main November 12, 2025 14:40
@sagpatil sagpatil requested a review from mootz12 November 12, 2025 20:47
Copy link
Contributor

@mootz12 mootz12 left a 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.

@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Needs Review in DevX Nov 13, 2025
Copy link
Contributor

@mootz12 mootz12 left a 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!

@elizabethengelman elizabethengelman merged commit f99d62b into main Nov 14, 2025
31 checks passed
@elizabethengelman elizabethengelman deleted the ledger-entry-fetch-instance branch November 14, 2025 16:17
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Allow for fetching contract instance with ledger entry fetch more easily

5 participants