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

Support new encoder/decoder for contracts #1278

Closed
digorithm opened this issue Feb 12, 2024 · 0 comments · Fixed by #1303
Closed

Support new encoder/decoder for contracts #1278

digorithm opened this issue Feb 12, 2024 · 0 comments · Fixed by #1303
Assignees
Labels
epic An epic is a high-level master issue for large pieces of work.

Comments

@digorithm
Copy link
Member

Part of #1246 and blocked by FuelLabs/sway#5512.

@kamyar-tm kamyar-tm added the epic An epic is a high-level master issue for large pieces of work. label Feb 15, 2024
hal3e added a commit that referenced this issue Apr 2, 2024
)

closes: #1278,
#1279,
#1046

This PR adds support for the new encoding scheme for contracts, scripts
and predicates.

I have added a new `ExperimentalBoundedEncoder` which can be activated
with the `experimental` cfg flag.
I have tried to minimize the impact of the new encoder as much as
possible to make it easier for review. A full refactor of the whole sdk
is necessary once the new encoding becomes the default one.

- The function selector changed and now it is the name of the method.
- The `CALL` opcode changed with the new encoding and is expecting the
following call data: ContractID, pointer to fn_selector (name of the
method), pointer to encoded arguments, number of coins, asset_id,
gas_forwarded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic An epic is a high-level master issue for large pieces of work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants