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

Return type of output_asset_to changed to Address #5424

Merged
merged 5 commits into from
May 17, 2024

Conversation

dmihal
Copy link
Contributor

@dmihal dmihal commented Dec 29, 2023

Description

When output_asset_to was added in #4694, it used b256 as the return type, instead of an Address. It referenced #4569, which describes the confusion developers face between Address and Identity.

While that confusion is an issue, I don't believe that's relevant to this function type. An output coin can only be an address, not a contract, since contract balances are stored in the contract UTXO itself. Furthermore, the standard lib API will need to be frozen soon, and there's no plans in place to change anything in regards to #4569.

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.

bitzoic
bitzoic previously approved these changes Dec 29, 2023
Copy link
Member

@bitzoic bitzoic left a comment

Choose a reason for hiding this comment

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

This makes sense to me! Also very cool to see our first practical implementation of order-independent modules since #5300 has been merged 🔥

@dmihal dmihal force-pushed the dm/output_asset_to-address branch from e11543d to 1d488c0 Compare May 14, 2024 13:49
@SwayStar123 SwayStar123 self-requested a review May 15, 2024 14:10
Copy link
Member

@bitzoic bitzoic left a comment

Choose a reason for hiding this comment

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

:shipit:

@dmihal dmihal enabled auto-merge (squash) May 17, 2024 10:51
@dmihal dmihal merged commit e97d6ac into master May 17, 2024
33 checks passed
@dmihal dmihal deleted the dm/output_asset_to-address branch May 17, 2024 11:05
@bitzoic bitzoic added breaking May cause existing user code to break. Requires a minor or major release. lib: std Standard library labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking May cause existing user code to break. Requires a minor or major release. lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants