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

Vector as output #602

Closed
segfault-magnet opened this issue Oct 3, 2022 · 3 comments
Closed

Vector as output #602

segfault-magnet opened this issue Oct 3, 2022 · 3 comments
Labels
blocked enhancement New feature or request

Comments

@segfault-magnet
Copy link
Contributor

segfault-magnet commented Oct 3, 2022

We've had a meeting with the compiler team where we agreed to the following:

  • When returning or logging, vectors cannot be nested in other types.
  • retd will be used to return vector data -- i.e. vector elements will be contained in the ReturnData receipt.
  • logging a vector will log its elements.

Currently, we've adapted the SDK to throw a compile-time error if it detects the usage of vectors in the output type of a contract method.

If somebody should circumvent that and call ABIDecoder::decode... on a vector or a type containing one, the SDK will panic with an appropriate message.

Blocked -- waiting for support from the compiler.

Related:
FuelLabs/sway#2900
#600

@iqdecay
Copy link
Contributor

iqdecay commented Jan 30, 2023

Part of this issue is this one: #746

@iqdecay
Copy link
Contributor

iqdecay commented Feb 23, 2023

Solved by #848 (I am going to add support for logging vectors because I didn't think of it at first)

@iqdecay
Copy link
Contributor

iqdecay commented Mar 22, 2023

Solved by #848.
Vector logging is tracked in #898

@iqdecay iqdecay closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants