Skip to content

Resolve issues 295 and 298#299

Open
Deewai wants to merge 4 commits intomasterfrom
deewai/issue-295-and-298
Open

Resolve issues 295 and 298#299
Deewai wants to merge 4 commits intomasterfrom
deewai/issue-295-and-298

Conversation

@Deewai
Copy link
Contributor

@Deewai Deewai commented Dec 1, 2025

@Deewai Deewai requested a review from a team as a code owner December 1, 2025 23:07
@Deewai Deewai requested a review from EricLin2004 December 1, 2025 23:08
Copy link
Contributor

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

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

The change to TopShot looks good.

There are still some other contracts and transactions that use destroy that should be changed to Burner, like the destroy moments transactions.

Additionally, some of the contracts use the old pattern of removing an old resource from a mapping in order to store a new one there, but you can just switch to force assign instead:

// this
let oldToken <- self.ownedNFTs[id] <- newToken
destroy oldToken

// can be changed to this
self.ownedNFTs[id] <-! newToken

If we're going to close the destroy things properly issue, we should include this here too as well as making sure all instances of destroy properly use Burner. I'd also recommend making sure that the other dapper sports contracts don't use this pattern in their specific destroy NFT transactions/functions

@Deewai Deewai requested a review from joshuahannan December 2, 2025 22:49
Copy link
Contributor

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Burner.burn when destroying resources

3 participants