• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ProjectOpenSea / seadrop / 42316765687
81%

Build:
DEFAULT BRANCH: main
Ran 07 Nov 2026 12:13AM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Nov 2026 12:12AM UTC coverage: 76.8% (+1.3%) from 75.495%
42316765687

push

github

web-flow
Add ERC721SeaDropLockable for ERC-6982 and ERC-8451 locks (#186)

## Motivation

SeaDrop has two ways to restrict trading today: `ERC721SeaDropPausable`
(a temporary trading pause) and `ERC721SeaDropSoulbound` (never
transferable). Neither emits a standard signal, so marketplaces and
wallets can't tell a paused collection from a soulbound one without
custom work per contract.

[ERC-8451](https://github.com/ethereum/ERCs/pull/2084) extends
[ERC-6982](https://eips.ethereum.org/EIPS/eip-6982) with a permanent
lock (`PermanentlyLocked()`, `permanentlyLocked()`), a standard revert
(`TokenLocked(uint256)`), and rules for mints, burns, and approvals
while locked. This PR replaces both contracts with one that implements
it. [The v2 PR](https://github.com/ProjectOpenSea/seadrop/pull/187)
builds the lock into v2's default ERC-721 and ERC-1155 contracts
instead. v1 keeps it as a separate contract because v1's `ERC721SeaDrop`
is the base that third-party contracts inherit, and adding `locked()`,
approval overrides, and a transfer hook to it would break inheritors
that already define them. OpenSea's indexer already reads
`DefaultLocked`, `Locked`, `PermanentlyLocked`, and the `TokenLocked`
revert, so a collection deployed from this contract needs no backend
work.

## Solution

`ERC721SeaDropLockable` takes a fourth constructor argument, `LockMode
lockMode`:

| `lockMode` | Value | Events at deploy | Owner can later |
| --- | --- | --- | --- |
| `Unlocked` | 0 | `DefaultLocked(false)` | lock, lock single tokens,
lock permanently |
| `Locked` | 1 | `DefaultLocked(true)` | unlock, lock again, lock
permanently |
| `PermanentlyLocked` | 2 | `DefaultLocked(true)`, then
`PermanentlyLocked()` | nothing |

The lock logic lives in `src/lib/ERC8451Lockable.sol`. The v2 PR uses
the same file with an initializer function in place of the constructor.
Both have a virtual `_checkPermanentLockAllowed()` hook: here it allows
permanence at any time, and a contract that inherits
`ERC... (continued)

188 of 265 branches covered (70.94%)

Branch coverage included in aggregate %.

94 of 94 new or added lines in 3 files covered. (100.0%)

1113 of 1429 relevant lines covered (77.89%)

2345.07 hits per line

Jobs
ID Job ID Ran Files Coverage
1 foundry - 42316765687.1 07 Nov 2026 12:13AM UTC 31
76.8
GitHub Action Run
Source Files on build 42316765687
  • Tree
  • List 31
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42316765687
  • b9e04a13 on github
  • Prev Build on main (#42315465879)
  • Next Build on main (#42319277381)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc