chore: bump version to 4.1.6 - #925
Merged
Merged
Conversation
Three bug fixes since v4.1.5: approval dedup by operator (#917), criteria resolver indexing (#915), and the zero-duration division guard (#923). Bumped with npm version so package-lock.json stays in sync — the 4.1.5 bump (#912) touched only package.json. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Bumps to 4.1.6 to release the three bug fixes that landed since v4.1.5. All are patch-level: no new public API on the
Seaportentry point, and no breaking changes.What's in it
Approval dedup ignored the operator (#917, fixes #916). Approvals were deduplicated by token address alone. When the same token needed approvals to different operators, for example Seaport versus the OpenSea conduit across bulk orders with mixed
conduitKeyvalues, one approval was silently dropped and fulfillment could then fail onchain for want of it. Dedup is now keyed on (token, operator), withidentifierOrCriteriaincluded for exact ERC721 approvals. This also fixes a second defect in the same filter, which only compared adjacent entries and so emitted redundantsetApprovalForAllcalls for non-consecutive duplicates of one token.Criteria resolvers looked up the wrong criteria (#915).
generateCriteriaResolversindexed the criteria array by the item's position in the full offer or consideration array, butofferCriteriasandconsiderationCriteriasare flat arrays holding only the criteria-based items. Any order where a non-criteria item preceded a criteria item threwTypeError: Cannot read properties of undefined (reading 'identifier'). Lookups now go throughgetItemToCriteriaMap, matching whatfulfill.ts,balanceAndApprovalCheck.tsanditem.tsalready do, and missing criteria raise a meaningful message instead.Division by zero on zero-duration orders (#923, fixes #922).
getPresentItemAmountthrewRangeError: Division by zerowhenstartTime === endTime, since BigInt division by0nthrows rather than yieldingInfinity. This affected any fulfillment path feeding order times intotimeBasedItemParams. The guard sits below the not-yet-started branch, so a zero-duration order at or past its start returnsendAmountinstead of throwing, while one whose start is still in the future keeps returningstartAmountas before.For expectation-setting, a zero-duration order is never fulfillable onchain regardless, because Seaport's
_verifyTimerevertsInvalidTimeonendTime <= block.timestamp. The fix replaces an opaqueRangeErrorduring amount derivation with a clear revert from the contract.Also since v4.1.5
Dependency maintenance, none of it affecting the published package:
hardhat3.10.0 (#919),@biomejs/biome2.5.4 (#918),actions/setup-nodev7 (#920),c8v12 (#921), andimmutable4.3.9 (#913) for GHSA-v56q-mh7h-f735.Note on the bump itself
I used
npm version 4.1.6 --no-git-tag-version, which updatespackage.jsonandpackage-lock.jsontogether. The 4.1.5 bump (#912) changed onlypackage.json, so the lockfile'sversionfields drifted until a later dependency PR happened to regenerate them. This keeps them consistent.To release
v4.1.6to triggernpm publishOne thing to watch on this publish: #920 moved
npm-publish.ymltoactions/setup-node@v7, which drops the dummyNODE_AUTH_TOKENexport. That workflow only runs onrelease: published, so it has never been exercised on v7. The change should be neutral or beneficial here, since this repo publishes via Trusted Publishing (id-token: writeplus--provenance, noNPM_TOKEN), and upstream states the dummy value "didn't break OIDC flows" while its removal avoids corrupting.npmrc. This is still the first release to prove it.🤖 Generated with Claude Code