Skip to content

Architecture

The system centers on a factory contract that deploys certificate contracts from a single blueprint (ERC-5202). The hosted HTTP API at https://ebg-tokenizer.u3dev.deno.net/ talks to the same contracts on Arbitrum (chain id 42161) for reads and writes your operator has configured.

flowchart TB F[factory] BP[certificate collection] C1[Certificate 1] C2[Certificate 2] F -->|create_from_blueprint| BP BP -->|mint_certificate| C1 BP -->|mint_certificate| C2 Relayer[Relayer / minter] -->|MINTER_ROLE| F Admin[Admin] -->|DEFAULT_ADMIN_ROLE| F

Factory

The factory:

  • Deploys a new ERC-721 collection per create_certificate(name_, symbol_, base_uri_) (callers need MINTER_ROLE).
  • Mints through mint_certificate(certificate_, data_, to_), enforcing a global maximum mint count across all collections.
  • Maintains a registry: certificate_count(), certificates(id) → collection address.
  • Emits CertificateCreated, CertificateMinted, IncreaseMaximumMints, and MaximumMintsReached.

See Factory contract for a concise reference.

Certificate collection

Each deployed certificate contract is a full ERC-721 with:

  • Metadata and enumerable extensions, EIP-712 permit, and ERC-4906 metadata update events.
  • A minter (set at deploy) who can mint; the owner can update stored certificate fields per token.

See Certificate contract.

HTTP API mapping

ConceptOnchainHTTP (typical)
New collectioncreate_certificatePOST /factory/certificates
Mint tokenmint_certificatePOST /certificates/:address/mint
ERC-721 metadata JSONOff-chain or APIGET /metadata/42161/...

Write routes on the API are executed by a hosted signer; your clients send JSON only. See API overview for security and authentication expectations.

Released under License.