docs: use safe mint in ERC721 example#6549
Conversation
🦋 Changeset detectedLatest commit: 0ec1539 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe GameItem documentation example contract in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
_safeMintin the ERC721GameItemdocs example_nextTokenId++before minting so the token id is advanced before the receiver callbackCloses #4033.
Tests
npx prettier --log-level warn --ignore-path .gitignore contracts/mocks/docs/token/ERC721/GameItem.sol --checknpx solhint --config solhint.config.js --noPoster contracts/mocks/docs/token/ERC721/GameItem.solnpx hardhat compilegit diff --checkNote: the local pre-commit hook invokes Unix shell scripts directly and did not run on Windows, so I committed with
--no-verifyafter running the checks above manually.