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!: encoding revamp #1741

Closed
wants to merge 28 commits into from
Closed

feat!: encoding revamp #1741

wants to merge 28 commits into from

Conversation

danielbate
Copy link
Member

@danielbate danielbate commented Feb 9, 2024

This PR aims to improve our current encoding infrastructure:

  • Supporting multiple, concurrent encoding versions, and even the possibility of custom encoding
  • Reduce the number of coder touch points and introduce more config driven encoding system

It will achieve this by:

  • Introducing encoding strategies to support multiple specifications (custom TBD)
  • Reducing the number of coders and introducing config driven coders

@danielbate danielbate added feat Issue is a feature mainnet labels Feb 9, 2024
@danielbate danielbate self-assigned this Feb 9, 2024
@fuel-service-user fuel-service-user requested a review from a team February 9, 2024 14:41
@danielbate danielbate added mainnet and removed mainnet labels Feb 9, 2024
Copy link
Contributor

github-actions bot commented Feb 9, 2024

Coverage Report:

Lines Branches Functions Statements
77.93%(-0.82%) 67.35%(-1.32%) 76.55%(-0.77%) 77.91%(-0.8%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/abi-coder/src/abi-coder.ts 80%
(-9.65%)
100%
(+29.63%)
66.66%
(-20.84%)
80%
(-9.83%)
🔴 packages/abi-coder/src/constants.ts 97.29%
(+1.29%)
100%
(+0%)
0%
(+0%)
97.29%
(+1.29%)
🔴 packages/abi-coder/src/interface.ts 60%
(-1.76%)
50%
(+0%)
76.47%
(+0%)
59.45%
(-1.66%)
🔴 ✨ packages/abi-coder/src/encoding/utilities.ts 50%
(+50%)
50%
(+50%)
100%
(+100%)
50%
(+50%)
✨ packages/abi-coder/src/encoding/coders/abstract-coder.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/array.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/b256.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/b512.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/boolean.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/byte.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/enum.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/number.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/abi-coder/src/encoding/coders/v0/option.ts 91.66%
(+91.66%)
87.5%
(+87.5%)
100%
(+100%)
91.66%
(+91.66%)
✨ packages/abi-coder/src/encoding/coders/v0/raw-slice.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/stdString.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/string.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/struct.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/tuple.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/u64.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v0/vec.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/byte.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/abi-coder/src/encoding/coders/v1/enum.ts 92.3%
(+92.3%)
75%
(+75%)
100%
(+100%)
92.3%
(+92.3%)
🔴 ✨ packages/abi-coder/src/encoding/coders/v1/literal.ts 58.33%
(+58.33%)
25%
(+25%)
40%
(+40%)
60%
(+60%)
✨ packages/abi-coder/src/encoding/coders/v1/raw-slice.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/std-string.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/str-slice.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/string.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/struct.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/tuple.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/abi-coder/src/encoding/coders/v1/vec.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ packages/abi-coder/src/encoding/strategies/v0.ts 90.56%
(+90.56%)
84.37%
(+84.37%)
100%
(+100%)
90.74%
(+90.74%)
🔴 ✨ packages/abi-coder/src/encoding/strategies/v1.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)

@danielbate
Copy link
Member Author

Superceded by #1780. Decided to scale back the refactor to now until contract call v1 encoding has been delivered.

@danielbate danielbate closed this Feb 20, 2024
@arboleya arboleya deleted the db/feat/encoding-revamp branch February 26, 2024 15:19
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.

1 participant