Skip to main content

Events

Every event SealedAuction and AuctionRevealCondition emit, with arg ordering and indexing.

SealedAuction

AuctionCreated

event AuctionCreated(
uint256 indexed auctionId,
address indexed seller,
address indexed ipId,
uint256 licenseTermsId,
uint32 reserveUuid,
uint64 deadline
);

Emitted by createAuction. Marks the transition into Open state.

reserveUuid is the CDR vault uuid allocated for the seller's sealed reserve. There is no plaintext reservePrice in this event.

Indexed: auctionId, seller, ipId.

EncryptedReserveSubmitted

event EncryptedReserveSubmitted(
uint256 indexed auctionId,
address indexed seller,
uint32 indexed reserveUuid
);

Emitted by submitEncryptedReserve when the seller writes ciphertext to the reserve vault. Marks that auction.reserveHasCiphertext is now true.

Indexed: auctionId, seller, reserveUuid.

BidSlotAllocated

event BidSlotAllocated(
uint256 indexed auctionId,
address indexed bidder,
uint32 indexed ciphertextUuid,
uint256 deposit
);

Emitted by allocateBidSlot. Marks that a bidder has reserved a slot and escrowed a deposit.

The bid amount is NOT in this event; only the deposit (the upper bound). The actual amount is encrypted and only revealed at settle.

Indexed: auctionId, bidder, ciphertextUuid.

EncryptedBidSubmitted

event EncryptedBidSubmitted(
uint256 indexed auctionId,
address indexed bidder,
uint32 indexed ciphertextUuid
);

Emitted by submitEncryptedBid. Marks that the encrypted payload for this slot is now committed on-chain. Combined with BidSlotAllocated, indicates a fully sealed bid.

A slot that has BidSlotAllocated but no matching EncryptedBidSubmitted event will be skipped and refunded at settle.

Indexed: auctionId, bidder, ciphertextUuid.

AuctionTriggered

event AuctionTriggered(uint256 indexed auctionId);

Emitted by trigger. Marks transition into Triggered state. This is the signal validators watch to confirm the second gate of AuctionRevealCondition is now open, and to begin publishing decryption shares.

AuctionSettled

event AuctionSettled(
uint256 indexed auctionId,
address indexed winner,
uint256 winningAmount,
uint256 licenseTokenId
);

Emitted by settle on the winner path. Marks transition into Settled state.

licenseTokenId is the ERC-721 token id minted to the winner by LicensingModule.mintLicenseTokens.

Indexed: auctionId, winner.

AuctionExpiredNoWinner

event AuctionExpiredNoWinner(uint256 indexed auctionId);

Emitted by settle when no revealed bid cleared the reserve floor. Marks transition into ExpiredNoWinner. All deposits are refunded in the same transaction.

AuctionRevealCondition

Registered

event Registered(
uint32 indexed uuid,
uint256 indexed auctionId,
uint256 deadline
);

Emitted by register each time SealedAuction binds a CDR vault uuid to its auction and deadline. Emitted once per bid vault (from allocateBidSlot) and once for the reserve vault (from createAuction).

Watching events with viem

import {sealedAuctionAbi} from '@sealedip/sdk/abi/sealed-auction'
import {SEALED_AUCTION_ADDRESS} from '@sealedip/sdk/constants'
import {createPublicClient, http} from 'viem'
import {storyAeneid} from 'viem/chains'

const client = createPublicClient({chain: storyAeneid, transport: http()})

const unwatch = client.watchContractEvent({
address: SEALED_AUCTION_ADDRESS,
abi: sealedAuctionAbi,
eventName: 'AuctionCreated',
args: {seller: '0xYourSellerAddress'},
onLogs: logs => {
for (const log of logs) {
console.log(`Auction #${log.args.auctionId} created, reserveUuid=${log.args.reserveUuid}`)
}
},
})

Historical reads

const logs = await client.getContractEvents({
address: SEALED_AUCTION_ADDRESS,
abi: sealedAuctionAbi,
eventName: 'AuctionSettled',
fromBlock: 'earliest',
toBlock: 'latest',
})

For high-volume historical scans, paginate by block range: Aeneid's RPC has a per-request log limit.

Event ordering guarantees

Within a single transaction, events are emitted in source-code order.

settle emits exactly one of AuctionSettled or AuctionExpiredNoWinner, never both, never neither.

trigger emits AuctionTriggered. It does not emit any expired event; the expired-no-winner path is resolved by settle.