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

Update SDK for Sway's change to use IR by default. #201

Closed
otrho opened this issue Apr 4, 2022 · 3 comments · Fixed by #234
Closed

Update SDK for Sway's change to use IR by default. #201

otrho opened this issue Apr 4, 2022 · 3 comments · Fixed by #234
Assignees
Labels
big enhancement New feature or request P0 Critical priority

Comments

@otrho
Copy link

otrho commented Apr 4, 2022

Sway is switching to use IR by default here: FuelLabs/sway#1130

Contract calls are slightly different compared to current Sway -- user args are always wrapped in a struct, even if there is only one. This is a bit more consistent and disregards the need for special casing.

Also, values are returned from a contract call via RET or RETD based now on the value type, not size. unit, bool, byte and u64 are 'copy' types returned via RET, otherwise RETD is used.

@otrho otrho added the bug Something isn't working label Apr 4, 2022
@digorithm digorithm self-assigned this Apr 4, 2022
@digorithm digorithm added enhancement New feature or request big and removed bug Something isn't working labels Apr 5, 2022
@digorithm
Copy link
Member

Note: this is momentarily blocked by FuelLabs/sway#1146.

@mohammadfawaz
Copy link
Contributor

forc v0.10.0 is now available.

@otrho
Copy link
Author

otrho commented Apr 13, 2022

I think the design we want now is to actually keep the special casing for small struct args but use the newer 'by-typeconventions forRETvsRETD` as mentioned in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big enhancement New feature or request P0 Critical priority
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants