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

Add conversion from references of tuples to ScVal #318

Merged
merged 2 commits into from
Nov 4, 2023

Conversation

brson
Copy link
Contributor

@brson brson commented Oct 28, 2023

What

Add impls of TryFrom for references of tuples to ScVec and ScVal.

Why

Per stellar/rs-soroban-sdk#1124, UDTs currently don't work with tuple fields because the #[contracttype] macro generates code that expects the From implementation on references of the types it is converting.

Known limitations

None, but because this enables more forms of UDTs to work, this will impose more requirements on client bindings for non-Rust languages.


I have tested the SDK with this patch applied, that UDTs with tuple fields work. After the SDK is updated for these changes I will land corresponding test cases in the SDK based on this patch: brson/rs-soroban-sdk@bcda4fa

@leighmcculloch leighmcculloch added this pull request to the merge queue Nov 4, 2023
Merged via the queue into stellar:main with commit c7c46d1 Nov 4, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants