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

Do not require source account when reading contract. #1658

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Conversation

fnando
Copy link
Member

@fnando fnando commented Oct 7, 2024

What

Before:

$ stellar contract read --id hello --network testnet
error: the following required arguments were not provided:
  --source-account <SOURCE_ACCOUNT>

Usage: stellar contract read --source-account <SOURCE_ACCOUNT> --id <CONTRACT_ID> --network <NETWORK>

For more information, try '--help'.

After:

$ stellar contract read --id hello --network testnet
LedgerKeyContractInstance,"{""hash"":""4e1ff745c9f12141dca37e5116e994594812c23c091650c5756a2de7857423d3""}",329089,2402688

Why

The source account was being required just because of how clap's flattening work.

Known limitations

N/A

@fnando fnando requested a review from leighmcculloch October 7, 2024 18:24
Copy link
Member

@willemneal willemneal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one suggestion

@fnando fnando force-pushed the fix-contract-read branch from ac4663e to 1543ed6 Compare October 7, 2024 23:53
@fnando fnando merged commit ba23e00 into main Oct 8, 2024
25 checks passed
@fnando fnando deleted the fix-contract-read branch October 8, 2024 00:04
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.

2 participants