Reference

Registry contract

The registry is a single contract on Ethereum. Source lives in the project at contracts/SlabRegistry.sol.

NetworkEthereum (chain id 1)
AddressNot connected yet — deploy SlabRegistry.sol, then paste its address on the Launch page
AuditNone. Unaudited code, use at your own risk.

Functions

bind(grader, certificate, cardName, setYear, grade, token, imageURI, description)

Writes a new binding keyed by the certificate number and stores msg.sender as the creator. Reverts with CertificateAlreadyBound if the certificate exists, EmptyField if a required field is blank.

setToken(certificate, token)

Links a token address to an existing binding. Callable only by the creator wallet. Reverts with NotCreator or CertificateNotFound.

getRecord(certificate)

Returns the full record. Reverts with CertificateNotFound.

getRecords(offset, limit)

Newest-first paginated read of all bindings.

isBound(certificate)

Cheap existence check used before submitting a bind transaction.

totalRecords()

Number of bindings written so far.

keyOf(certificate)

keccak256 of the certificate string — the storage key of a record.

Events

CollectibleBoundkey, creator, certificate, grader, token — emitted on every successful bind.
TokenLinkedkey, creator, token — emitted when a creator links an asset.

Errors surfaced in the app

CertificateAlreadyBoundThe certificate already resolves to an asset.
CertificateNotFoundNo record exists for that certificate.
NotCreatorA wallet other than the creator tried to link a token.
Wallet rejectionYou declined the request in your wallet.
Insufficient fundsNot enough ETH to cover gas.
Wrong networkWallet is not on Ethereum mainnet; the app prompts a switch.