-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: experimental encoding for contracts, scripts and predicates #1303
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks for the effort you put into making this PR easily digestible.
The new encoding will make things a lot simpler on our side, looking forward to making it stable.
packages/fuels-core/src/codec/abi_encoder/experimental_bounded_encoder.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work. Especially with the feature-gating, removing the old encoding is looking to be painless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @hal3e!
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 theexperimental
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.
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.To run the tests, first install
forc: 0.52.0
and build the projects with:forc build --path packages/fuels --experimental-new-encoding
then run the tests with:cargo test --all-targets --workspace --features experimental
Checklist