Skip to content

Commit

Permalink
Adds concrete types distinction to JSON ABI.
Browse files Browse the repository at this point in the history
With the changes proposed in this PR, functions,loggedTypes,
messagesTypes and configurables will only rely on hash based ids of
concrete types.

This change is required because types on the types arrays can be
abstract types, so the hash based ids could not include the generic
parameters of the concrete types used.

For instance a method with two args, `Option<u64>` and `Option<u32>`,
would generate two distinct hash based ids based on `sha256("enum std::option::Option<u64>")`
and `sha256("enum std::option::Option<u32>")`, but there was a single type for Option.

With the proposed changes we can now have multiple hash based ids for
generic types, while still having access to the same generated types as
the new `concreteTypes` map easily to the `typesMetadata` (old `types`).
  • Loading branch information
esdrubal committed Jul 16, 2024
1 parent 63844b5 commit 882a860
Showing 1 changed file with 189 additions and 345 deletions.
Loading

0 comments on commit 882a860

Please sign in to comment.