Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes ABI alias metadata types. #6494

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Fixes ABI alias metadata types. #6494

merged 3 commits into from
Sep 5, 2024

Conversation

esdrubal
Copy link
Contributor

@esdrubal esdrubal commented Sep 4, 2024

Description

Before this push, using an alias in a contract would produce an ABI with two distinct metadata types for tuples: one for (_,_) and another for (u64,u64).

With this change, aliases are bypassed and we only produce metadata for the string type of the inner alias type. If alias is (u64, u64) we will produce a metadatatype for (_,_).

Fixes #6488

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@esdrubal esdrubal added the ABI Everything to do the ABI, especially the JSON representation label Sep 4, 2024
@esdrubal esdrubal self-assigned this Sep 4, 2024
Before this push using an alias in a contract would produce an ABI with
two distinct metadata types for tuples, one for `(_,_)` and another one
for `(u64,u64)`.

With this change alias are bypassed and we only produce metadata for the
string type of the inner alias type. If alias is `(u64, u64)` we will
produce a metadatatype for `(_,_)`.

Fixes #6488
@esdrubal esdrubal force-pushed the esdrubal/fix_abi_alias branch from ce261c9 to ce47bf6 Compare September 4, 2024 11:32
Copy link

codspeed-hq bot commented Sep 4, 2024

CodSpeed Performance Report

Merging #6494 will not alter performance

Comparing esdrubal/fix_abi_alias (f57f6ab) with master (e220eca)

Summary

✅ 21 untouched benchmarks

@esdrubal esdrubal marked this pull request as ready for review September 4, 2024 12:29
@esdrubal esdrubal requested a review from a team as a code owner September 4, 2024 12:29
@IGI-111 IGI-111 enabled auto-merge (squash) September 5, 2024 00:43
@IGI-111 IGI-111 merged commit cd95cdc into master Sep 5, 2024
38 checks passed
@IGI-111 IGI-111 deleted the esdrubal/fix_abi_alias branch September 5, 2024 00:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
ABI Everything to do the ABI, especially the JSON representation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent ABI metadata types with aliased types
3 participants