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

Create the asset_id.sw file and move AssetId out of contract_id.sw #5439

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

bitzoic
Copy link
Member

@bitzoic bitzoic commented Jan 8, 2024

Description

This PR removes the AssetId type from the contract_id.sw file and into the new asset_id.sw file for better composability and navigation of the standard library.

This PR causes breaking changes as the transfer() and mint_to() functions from Address, ContractId, and Identity have been removed due to circular dependencies. This was originally added in this PR to give developers a familiarity from solidity. It has been heavily debated whether this should be kept in the standard library as it adds complexity and duplicates the existing transfer() and mint_to() functions. For the sake of simplicity and ensuring likeness between all asset management functions, especially in audits, this has been removed.

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 added enhancement New feature or request lib: std Standard library labels Jan 8, 2024
@bitzoic bitzoic requested a review from a team January 8, 2024 04:01
@bitzoic bitzoic self-assigned this Jan 8, 2024
@bitzoic bitzoic added the breaking May cause existing user code to break. Requires a minor or major release. label Jan 8, 2024
@bitzoic bitzoic requested a review from a team January 8, 2024 09:23
@bitzoic bitzoic enabled auto-merge (squash) January 9, 2024 00:00
@bitzoic bitzoic merged commit f6d8710 into master Jan 9, 2024
32 checks passed
@bitzoic bitzoic deleted the bitzoic-asset-id-file branch January 9, 2024 00:17
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. enhancement New feature or request lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants