Contracts overview
SealedIP ships two Solidity contracts plus one library, and depends on several Story Protocol and CDR system contracts. Every on-chain behavior of the marketplace is implemented in these files or their interactions.
Our contracts
SealedAuction.sol— the state machine. Every auction record, bid slot, reserve vault, and settlement lives here.BidPayload.sol— library for the 149-byte sealed payload format (encode / decode / recoverSigner). Shared between bids and the sealed reserve.AuctionRevealCondition.sol— the CDR read condition that gates validator share publishing: deadline elapsed AND auction triggered (two independent gates, both must pass).
AuctionRevealCondition replaced the earlier TimeBasedReadCondition (deadline-only gate),
which has been deleted from the repo. See TimeBasedReadCondition
for the superseded-page note.
Write-condition note
SealedAuction passes writeConditionAddr = address(this) to CDR.allocate. CDR does
not block writes in this setup (verified on-chain). The single-write, caller-is-allocator,
and before-deadline rules are enforced in SealedAuction Solidity itself, not via a custom
CDR write condition. No custom write condition contract was shipped.
Story Protocol contracts we depend on
LicensingModule— attaches PIL terms to an IP; mints license tokens at settle.PILicenseTemplate— registers and stores PIL terms structs.LicenseRegistry— stores the (IP, attached terms) mapping. Read-only for SealedIP.LicenseToken— the ERC-721 collection where settlement-minted license tokens land.RegistrationWorkflows/LicenseAttachmentWorkflows— Story Periphery (SPG) helpers used in the mint-and-list flow.WIPERC-20 — Wrapped IP; used for all deposits and payouts.CDR— the threshold-decryption network's on-chain entry point (Story system contract, operated by piplabs).
For specific addresses on Aeneid, see Deployed addresses.
Test coverage
43 Foundry tests. Run locally:
(cd contracts && forge build && forge test)
npm run coverage
This is a hackathon prototype. The test suite covers the core state-machine paths and BidPayload round-trips. The contracts have not been audited.
Source code
All contracts live at github.com/sneg55/SealedIP
under contracts/src/. License: MIT.
Reading order
If you are new to the contract surface:
SealedAuction— start here; most behaviors live in this contract.BidPayload— the sealed payload format and signature scheme.AuctionRevealCondition— how the two-gate reveal condition works.- Errors and Events — the contract surface in machine-readable form.
- Deployed addresses — what to point at on testnet.