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

Add ownership and pausing functionality to Asset and NFT examples #790

Merged
merged 17 commits into from
Apr 22, 2024

Conversation

bitzoic
Copy link
Member

@bitzoic bitzoic commented Apr 10, 2024

Type of change

  • Improvement (refactoring, restructuring repository, cleaning tech debt, ...)

Changes

The following changes have been made:

  • Add ownership to the native-asset app
  • Add ownership to the NFT app
  • Upgrades native-asset tests to use Rust SDK
  • Upgrades NFT tests to use Rust SDK

Notes

  • There was an internal discussion to add ownership and pausing functionality to the apps to make them production-ready. Ownership has been added to the native asset app and both ownership and pausing have been added to the NFT app.
  • SDK tests related to metadata are ignored until nested heap types are supported.
  • Dependent on Bump to forc v0.53.0 sway-libs#226

Related Issues

Closes #784

@bitzoic bitzoic added Improvement Enhancing a feature that already exists App: NFT Label used to filter for the app issue App: Token Label used to filter for the app issue labels Apr 10, 2024
@bitzoic bitzoic self-assigned this Apr 10, 2024
@bitzoic bitzoic linked an issue Apr 10, 2024 that may be closed by this pull request
Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sway-applications ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 2:14am

@bitzoic bitzoic changed the title Add ownership functionality to Asset and NFT examples Add ownership and pausing functionality to Asset and NFT examples Apr 11, 2024
@bitzoic bitzoic marked this pull request as ready for review April 12, 2024 00:43
@bitzoic bitzoic requested a review from a team as a code owner April 12, 2024 00:43
Copy link
Member

@K1-R1 K1-R1 left a comment

Choose a reason for hiding this comment

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

Looking good. The below is a follow up to a comment on the NFT/NFT-contract/src/main.sw mint() func.

  • If mint() becomes only_owner() then set_metadata() should probs be only_owner() too.

NFT/NFT-contract/src/main.sw Show resolved Hide resolved
NFT/NFT-contract/src/main.sw Show resolved Hide resolved
native-asset/native-asset-contract/tests/functions/burn.rs Outdated Show resolved Hide resolved
native-asset/native-asset-contract/tests/functions/burn.rs Outdated Show resolved Hide resolved
@K1-R1 K1-R1 requested a review from a team April 12, 2024 15:08
K1-R1
K1-R1 previously approved these changes Apr 16, 2024
@bitzoic bitzoic requested a review from a team April 19, 2024 02:20
@bitzoic bitzoic merged commit 379ceb7 into master Apr 22, 2024
22 checks passed
@bitzoic bitzoic deleted the bitzoic-784 branch April 22, 2024 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: NFT Label used to filter for the app issue App: Token Label used to filter for the app issue Improvement Enhancing a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ownership/pausing functionality to Asset and NFT examples
2 participants