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

feat!: support v1 encoding in program types #1832

Merged
merged 95 commits into from
Apr 4, 2024

Conversation

danielbate
Copy link
Contributor

@danielbate danielbate commented Mar 5, 2024

Closes #1739
Closes #1749

This PR is using forc@0.52.1 for our experimental forc version.

#1187 is currently blocked sway side and will be supported later.

Breaking change:
When building projects using --experimental-new-encoding, calls to program types are now parsed using the new encoding scheme. As the flag suggests, this is currently experimental and should be treated as so. Calls using a string slice and nested heaps no longer throw.

@danielbate danielbate added feat Issue is a feature blocked labels Mar 5, 2024
@danielbate danielbate self-assigned this Mar 5, 2024
@danielbate danielbate removed the blocked label Mar 8, 2024
@danielbate danielbate requested a review from maschad as a code owner April 3, 2024 17:12
Copy link
Contributor

@petertonysmith94 petertonysmith94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTG 🍏

Dhaiwat10
Dhaiwat10 previously approved these changes Apr 4, 2024
Copy link
Member

@Dhaiwat10 Dhaiwat10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 Excellent work

Torres-ssf
Torres-ssf previously approved these changes Apr 4, 2024
@danielbate danielbate enabled auto-merge (squash) April 4, 2024 13:41
@danielbate
Copy link
Contributor Author

danielbate commented Apr 4, 2024

Merging #1895 broke one of my test assertions used to validate #823. Has been resolved here.

cc @Dhaiwat10 @petertonysmith94 @Torres-ssf

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Coverage Report:

Lines Branches Functions Statements
81.04%(-0.41%) 71.64%(-0.36%) 79.09%(-0.37%) 81.12%(-0.4%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/abi-coder/src/FunctionFragment.ts 73.23%
(-0.29%)
71.42%
(+0.46%)
81.81%
(+0%)
74.35%
(-0.31%)
packages/abi-coder/src/encoding/coders/v1/ByteCoder.ts 100%
(+6.25%)
100%
(+16.67%)
100%
(+0%)
100%
(+6.25%)
🔴 ✨ packages/abi-coder/src/encoding/coders/v1/OptionCoder.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
🔴 packages/abi-coder/src/encoding/strategies/getCoderV1.ts 2%
(+0.04%)
0%
(+0%)
0%
(+0%)
1.96%
(+0.04%)
🔴 packages/program/src/contract-call-script.ts 11.01%
(-0.22%)
0%
(+0%)
0%
(+0%)
10.74%
(-0.12%)

@danielbate danielbate merged commit b4cbd53 into master Apr 4, 2024
15 checks passed
@danielbate danielbate deleted the db/feat/support-v1-encoding branch April 4, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New encoding for Scripts and Predicates New encoding for Contracts
5 participants