Vouchers
A voucher is a GiftableToken, an ERC-20 that its issuer mints, with an optional expiry date. The issuer publishes what the voucher redeems for. The contract does not record it.
Create a voucher
CLC deploys each voucher as an ERC-1967 proxy of GiftableToken, initialized with:
| Field | Notes |
|---|---|
name, symbol | The CLC app checks that the symbol is unused. A pool also rejects a second voucher with the same symbol. |
decimals | The CLC app uses 6. |
owner | The issuer. |
expiresAt | Unix time in seconds. Zero means no expiry. |
A new voucher has no supply. The issuer mints the opening supply with mintTo. The description, terms, location and value shown in the CLC app are stored in the CLC catalog, not on-chain.
Mint and burn
- The owner and writers can call
mintTo(to, amount). The owner adds and removes writers withaddWriteranddeleteWriter. - The owner can
burn(amount)from its own balance. totalMintedandtotalBurnedhold lifetime totals.
Expiry
At or after expiresAt, transfers, mints and burns revert with TokenExpired. Anyone can call applyExpiry() to record the expired state. The CLC router does not route expiring vouchers.