Repository navigation
Document MintTimeAndTransferCountHooks as a second reference hook - #356
Merged
Merged
Conversation
The page named OwnerHistoryTransferHook as the only first-party hook. There are now two, and the new one is the more interesting of the pair: it is a combined transfer hook and PostParams read-augment hook, injecting mintTimestamp, secondsSinceMint and transferCount. It also resolves the re-render gotcha this page raises, rather than only describing it. Configuring transferCount as an Address-authorized param pointing at the hook makes the hook write it on each counted transfer, which is what triggers the re-render — try/catch'd, emitting TransferCountPMPSyncFailed, so a misconfigured param costs a stale image instead of a frozen collection. The gotcha now points at it for anyone who would rather configure a deployed hook than write one. Both addresses are listed, with why they differ: the hook is constructor-bound to a PMP contract and Sepolia dev runs its own instance. Verified on chain across all five networks — code present, ERC-165 ITransferHook, and bound to the PMPV1 instance claimed here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C6jcGQ48oJZddVVQFpShAz
|
lindsgil
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on to #355. That page named
OwnerHistoryTransferHookas the only first-party hook; there are now two, and the new one is the more interesting of the pair.What this adds
MintTimeAndTransferCountHooksis a combined hook — a transfer hook and a PostParams read-augment hook in one contract. It records each token's mint timestamp and post-mint transfer count, and injects three values on every read:mintTimestamp"0"if the hook was not configured before the mintsecondsSinceMinttransferCountIt also resolves the re-render gotcha this page already raises, rather than only describing it. Configuring
transferCountas anAddress-authorized param pointing at the hook makes it write on each counted transfer, which is what triggers the off-chain re-render. That write istry/catch'd and emitsTransferCountPMPSyncFailed, so a misconfigured param costs a stale image instead of a frozen collection. The gotcha now links to it for anyone who would rather configure a deployed hook than write one.Addresses
0x000000002099d6BB23Ebd24aDCbee931ad461a390x2B530627ed72e3F77EAC0d1c8b3904E6d8f67c25Both are listed, with the reason they differ: the hook is constructor-bound to a PMP contract and Sepolia dev runs its own PMP instance.
Verification
Checked on chain across all five networks — code present, ERC-165
ITransferHook, andpmp()returning the PMPV1 instance claimed here. All internal links and GitHub source links resolve.🤖 Generated with Claude Code
https://claude.ai/code/session_01C6jcGQ48oJZddVVQFpShAz