soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

Support classic accounts and trustlines in snapshots

Open JakeUrban opened this issue 1 year ago • 4 comments
trafficstars

What version are you using?

22.0.0-rc.1

What did you do?

Created a snapshot like so:

stellar snapshot create --address $myaccount --address $contractid 

Then used the snapshot to create an environment for my contract test using Env::from_ledger_snapshot_file.

Because $myaccount is a Stellar account, and the function tested on $contractid results in a SAC transfer, the test failed with the following:

topics:[error, Error(Storage, MissingValue)], data:"trying to get non-existing value for contract instance"

This appears to be because trustlines are not saved to the snapshot file or are not loaded when creating the environment.

JakeUrban avatar Nov 18 '24 23:11 JakeUrban

Requires some investigation. Snapshots are supposed to include all the trust lines of an account when an account is specified.

For example: https://github.com/stellar/stellar-cli/blob/90db678c08e51e84f05719b5f0965e8f53c3c893/cmd/soroban-cli/src/commands/snapshot/create.rs#L284-L286

leighmcculloch avatar Nov 19 '24 00:11 leighmcculloch

@Dhanraj30 Thanks for the fix. @fnando @leighmcculloch Please take a look at this PR https://github.com/stellar/stellar-cli/pull/1746

janewang avatar Jan 10 '25 16:01 janewang

This issue is stale because it has been assigned for 30 days with no activity. It will be closed in 90 days unless the stale label is removed, and the assignee is removed or updated.

github-actions[bot] avatar Jun 07 '25 18:06 github-actions[bot]

This issue is stale because it has been assigned for 90 days with no activity.

github-actions[bot] avatar Sep 28 '25 18:09 github-actions[bot]