-
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
chore!: support new encoding schema #2826
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
nedsalk
force-pushed
the
ns/new-encoding-concept
branch
from
July 24, 2024 18:20
f8ea63b
to
a5deb2a
Compare
nedsalk
force-pushed
the
ns/new-encoding-concept
branch
from
July 24, 2024 18:23
a5deb2a
to
eb17355
Compare
nedsalk
force-pushed
the
ns/new-encoding-concept
branch
2 times, most recently
from
July 25, 2024 08:22
eba2294
to
416f3f0
Compare
4 tasks
This was referenced Jul 25, 2024
nedsalk
force-pushed
the
ns/new-encoding-concept
branch
from
July 26, 2024 16:11
2178ddf
to
0500627
Compare
Closing this PR in favor of #2856 and we'll later use it when we approach the abi (typegen + coder) holistically in a rewrite. |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
This PR can't be merged until a new version of
forc
is released with FuelLabs/sway#6254.Release notes
In this release, we:
forc 0.63.0
Summary
This PR adds support for the new abi format. The ABI now contains
concreteTypes
andmetadataTypes
. A concrete type can be either a built-in type (e.g.u8
) or it can be a specific instance of a metadata type. Functions, configurables, logged types, message types - they all now reference only concrete types.The way I've gone about implementing this in the
abi-coder
is that I created aResolvableType
for each metadata type, which are then used to getResolvedType
s for every specific concrete type usage in function inputs, outputs, configurables, etc. ThisResolvedType
contains all the information necessary to use in coders the same wayResolvedAbiType
previously did.The benefit of this approach is that I could reuse the same concept of
ResolvableType
andResolvedType
inabi-typegen
. Because typegen already interpreted the ABI in such a way previously (this is where I got the inspiration from), it was relatively easy to plug the new solution in.Once
abi-coder
andabi-typegen
become one package in #2346, the code duplication will cease to exist.I couldn't go with reusing the old
ResolvedAbiType
approach inabi-typegen
because it approached the ABI in a fundamentally different way. Instead of creating all types and then plugging in specific (concrete) implementations of those types, it would create a tree just for the specific type implementation it was given, which isn't the proper approach fortypegen
which first lists all the types (generic and non-generic) and then references them in function inputs, outputs, and configurables.Breaking Changes
TBD once reviews are done.
Checklist
tests
to prove my changesdocs