Skip to content

Fix: Refuse to mint an NFT whose instance number already exists - #943

Merged
dzikowski merged 1 commit into
mainfrom
fix/nft-instance-exists
Oct 30, 2026
Merged

dzikowski merged 1 commit into
mainfrom
fix/nft-instance-exists

Conversation

@dzikowski

Copy link
Copy Markdown
Collaborator

Before saving new NFT instances, mintToken checks that none of their keys is already on the ledger. If one exists, the mint fails with NftInstanceAlreadyExistsError and nothing is written, so a mint can never overwrite an existing NFT. This adds one state read per minted NFT.

Before saving new NFT instances, mintToken checks that none of their keys is already on the ledger and
throws NftInstanceAlreadyExistsError if one is, so a mint can never overwrite an existing NFT.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dzikowski
dzikowski merged commit 933d0c7 into main Oct 30, 2026
13 checks passed
@dzikowski
dzikowski deleted the fix/nft-instance-exists branch October 30, 2026 14:10
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.

1 participant