420Docs context
Skip to content

420 Token architecture

420 Token is the Genesis self-service deployment protocol for a frozen set of qualified ERC asset profiles. It does not issue native $420, confer downstream approval, or accept arbitrary caller-supplied bytecode.

Canonical graph

  • TokenTemplateRegistry420 contains the eight version-1 template identities and profile commitments. Its only mutable operation is governance-controlled enable/disable; it cannot replace executable code under an existing template ID/version.
  • TokenFactory420 is the canonical 420/component/token/v1 / 420/service/token/v1 implementation. It is Registry-resolved and has no fixed Genesis address.
  • Each factory deployment creates one ERC20Template420, ERC721Template420 or ERC1155Template420 instance with CREATE2. The salt commits the creator, caller-supplied salt, template ID and monotonic creator nonce.
  • The factory records creator, token address, template ID/version, configuration hash and deployment time. It retains no token ownership, mint authority or token custody.
  • Every successful deployment requires exactly 42 native 420. The factory is immutably bound at construction to a Vault whose vaultId() is 420/treasury/vault/token-creation-community-revenue/v1; the full fee is forwarded with depositNative() and the entire transaction reverts if that deposit fails.

Trust and authority boundaries

TokenTemplateRegistry420 inherits SystemAccess; its governance authority is the canonical GovernanceTimelock for a real release. Repository-local tests may use the test contract as the timelock, but production/testnet qualification must prove the exact deployed timelock identity.

The factory validates the community Vault ID in its constructor. A contract that merely returns the expected ID is not, by itself, proof of live canonical deployment identity. Release qualification therefore must bind the factory constructor to the verified, registered community AssetVault420 address, runtime code hash and Vault registration/configuration. This is a deployment trust boundary, not permission for clients to accept an arbitrary same-ID contract.

The factory itself has no owner/admin mutation path. Changing its immutable template-registry or community-Vault dependencies requires deploying and qualifying a new factory/release rather than redirecting an existing one.

Template semantics

The frozen V1 catalog is:

  1. ERC20 fixed supply
  2. ERC20 owner-mintable
  3. ERC20 owner-mintable capped
  4. ERC20 fixed-supply burnable
  5. ERC20 fixed-supply EIP-2612 permit
  6. ERC20 fixed-supply permit + delegated vote checkpoints
  7. ERC721 owner-mintable collection
  8. ERC1155 owner-mintable multi-token

ERC20 permit domains commit chain ID and verifying-contract address. Canonical signatures require v 27/28 and low-s; nonces increase monotonically and reverts roll nonce changes back. Vote checkpoints follow delegated balances and expose historical block queries. ERC721/ERC1155 safe transfers require the appropriate receiver callback for contract recipients.

Discovery and user path

The Wallet Genesis application catalogue exposes 420/service/token/v1. The shared SDK entry point is wallet/web/core/token-app.js: token-sdk.js owns frozen template descriptors, typed drafts and canonical ABI/config commitments; token-runtime.js owns release binding and read-only verification; token-handoff.js owns preparation through the existing Wallet execution boundary. This is a browser-safe application layer, not a second Wallet or standalone service.

Runtime verification requires an independently approved Wallet-owned release binding. It reconciles chain and genesis hash, both canonical Registry records and their commitments, ten dependency code hashes, immutable getters, active community Vault registration and typed policies, all eight template profiles and the canonical verification block. It rejects reserved, aliased or mismatched dependencies. Shape validation alone is not authorization.

token-discovery.js connects this SDK to the existing Wallet host. The runtime generator admits an optional verified, bound appAuthority.token420 inventory entry for the same environment and chain; otherwise generated token is null. The runtime config validator reconciles the release with the Wallet Registry and CapabilityRegistry authority. The connected Wallet host resolves the selected SmartAccount afresh, rechecks its controller and chain and the canonical verification block, and publishes an immutable DISCOVERY_ONLY snapshot through an internal shared session. Account/chain/disconnect events or newer refreshes invalidate older in-flight reads. The Apps catalogue uses only that session for Token's read-only status; Token is Wallet-integrated and rejects generic navigation and public-manifest launch URLs. No signing, account grants or spending authority are introduced. Actual live configuration remains absent until qualified deployment evidence exists.

token-catalogue.js exposes the eight immutable display profiles through token-app.js, derives only enablement from the complete verified discovery snapshot, rejects missing/duplicated/substituted profiles, and separates unknown and governance-disabled availability. The actual Wallet Apps page mounts token-catalogue-ui.js with keyboard-accessible selection and refresh controls. Opening/refreshing the catalogue or selecting a currently enabled profile rechecks the host-approved runtime; selection becomes a display-only preference bound to the new verification block, never a draft or transaction authorization. Unconfigured/offline states still describe all eight profiles without allowing selection. Counterfactual/non-owner readiness is shown separately. Fee semantics remain exactly 42 native 420 with network gas separate. No new live configuration, external launch URL, or write authority exists.

token-erc20-wizard.js and token-erc20-wizard-ui.js implement Wallet ERC20 configuration for the six frozen profiles. The form requires a verified deployed SmartAccount owner selecting an enabled ERC20 profile. It uses exact integer conversion of decimal quantities to 18-decimal base units, a positive cap at least equal to supply only for the capped profile, metadata validation, secure random bytes32 salt and the contract's uint208 vote checkpoint supply bound. Draft preparation freshly selects the same profile and checks the same approved release, account and chain, then constructs the canonical SDK request with owner/initial recipient equal to the SmartAccount and exact 42 native 420 fee. Edits or invalidation clear the local draft. No independent signer, submission, gas estimate, simulation, live pin or persistent draft storage.

token-creation-wizard.js shares the verified creation draft lifecycle between ERC20 and ERC721 while retaining the ERC20 SDK API. token-erc721-wizard.js and token-erc721-wizard-ui.js provide the single frozen ERC721_COLLECTION profile with name, symbol, optional collection base URI and secure bytes32 salt. On deployment the SmartAccount owns an empty collection; owner minting and holder/approved-operator burning are separate actions. The frozen contract returns the same exact stored baseURI for every minted token ID, with no setter, suffix or placeholder substitution. The wizard makes these semantics explicit, accepts empty URI with a warning, validates safe URI text and never fetches or executes metadata. It re-verifies the same approved release, enabled template, chain and deployed SmartAccount owner before preparing a canonical immutable draft with exact 42 native 420 fee. URI guardrails are wizard-only input safeguards; contract behavior is unchanged. Profile switching isolates drafts; edits and invalidation clear them. No transaction, signing, gas estimation, simulation or minting is performed.

token-erc1155-wizard.js and token-erc1155-wizard-ui.js complete the frozen ERC1155_MULTI creation draft interface using the common creation lifecycle and URI input guards shared with ERC721. Only URI and secure bytes32 salt are configurable. Deployment creates an empty contract owned by the verified SmartAccount; individual IDs and quantities are minted later by the owner. Holder/approved-operator burn and safe single/batch transfers are supported. The frozen contract stores an immutable URI and both uri(uint256) and uri() return the exact string, even for unminted IDs. Standard client-side substitution of literal {id} uses lowercase 64-digit hexadecimal uint256 values without 0x; the wizard shows an inert example for ID 1, leaves the stored URI unchanged, and warns about empty/shared URI and mutable external content. No metadata is fetched. Fresh release/profile/account verification produces the canonical 42-native-420 draft only; forms are isolated and edits or trust changes invalidate them. All eight profiles now have draft interfaces, not live transaction submission.

The shared SDK snapshots own enumerable data fields, rejects inherited/accessor/hidden/symbol configuration, enforces exact quantity/cap/salt and UTF-8 rules and checks the aggregate 4096-byte calldata bound during normalization. decodeTokenCreation420 accepts only canonical three-entrypoint factory calldata, verifies string offsets, lengths and UTF-8, then re-encodes to reject noncanonical tails, padding or trailing bytes. validateTokenCreationEncoding420 requires exact data, template ID, configuration hash and calldata hash commitments; the configuration hash intentionally excludes template and salt under frozen factory semantics. Independent Foundry Cast qualification confirms all eight profiles across 32 vectors. Preparation re-encodes the typed draft, rejects mismatched or arbitrary calldata and requires the exact 42 native 420 fee. It verifies release and selected-template availability before and after existing SmartAccount420 simulation/estimation. The immutable result explicitly requires confirmation; it does not broadcast or grant signing/spending authority. The application must source the approved binding from trusted Wallet configuration and retain confirmation and submission control in Wallet. token-discovery.js exposes simulateCurrent through the host-retained Wallet session without exposing a provider or signing context. The new token-fee-review.js and mounted token-fee-review-ui.js integrate all three creation forms with the existing canonical SmartAccount handoff. The exact 42 native 420 creation fee is paid by the SmartAccount to the verified community Treasury Vault; the connected controller pays gas. Integer gas units/price/cost and separate balances are reviewed. Simulation and gas estimate are pinned to a verified block (unsupported pinned estimates fail closed); the ABI bytes returned by execute must contain the nonzero factory-predicted address. The creator nonce, canonical simulation and prior blocks, latest verified release, enabled profile, account owner/epoch/policy and chain are rechecked. Normal block advancement is permitted if relevant state remains consistent. Separate explicit authorization of the current review triggers fresh simulation; changed cost, nonce, predicted address or exact request commitments require another user review. Cancellation, editing or account/chain/template invalidation clears the ephemeral record. The authorization records the exact reviewed gas and total ceilings, but is not a signature, spend, capability grant or submission. The separate Wallet submission boundary in token-discovery.js binds authorization to the session-issued review, consumes it once, re-simulates the same draft against the retained host context and requires unchanged commitments, creator nonce, account authority and estimated costs. It requests the exact approved outer SmartAccount transaction through the connected Wallet with explicit legacy gas and gasPrice ceilings; the injected Wallet remains the user-approved signer. The read-only token-deployment.js checks chain/genesis, canonical Wallet receipt and matching transaction, exact canonical factory creation and community Treasury fee event fields, historical factory/Vault code, token code and factory record. The mounted catalogue tracks pending, confirming, reverted, reorganized, unverified and confirmed results independently of the draft. Ambiguous send errors do not automatically retry. Records are page-session memory; recheck after a changed context and record the hash before reload. The provider may choose different on-chain fees; such a deviation is rejected by confirmation, not incorrectly reported as compliant. Steps 5.1 through 5.14 and aggregate TOKEN-AUDIT-5 are repository-qualified; TOKEN-AUDIT-6/7 reconciliation and live gates remain open. See docs/audit/420TOKEN-AUDIT-5.9-QUALIFICATION.json.

Downstream integrations

A factory deployment is provenance, not endorsement. 420Registry, Explorer, Search and Analytics may surface the deployment and its indexed events. Swap/Exchange, Pay, Bridge and Launchpad apply their own independent eligibility/qualification rules. 420Token has no authority to manufacture liquidity, bridge backing, legal status, investment quality, or Registry legitimacy.

The Token V1 creation fee is an explicit ecosystem-policy exception: the entire fee is routed to the community Treasury Vault. DevelopmentCompensationVault420 is not part of this Token V1 fee path.

Created-token portfolio and provenance

token-portfolio.js reads the selected SmartAccount's original creations from the independently approved canonical factory rather than in-memory transaction history, metadata or an indexer. The Wallet discovery session retains the provider, generation, immutable snapshot and cursor; refreshing obtains a fresh release verification, while subsequent 16-record pages stay on the original canonical block. deploymentCount() and creatorNonce(address) bound the scan and establish completeness for the selected creator. Each retained row validates the frozen template/version, address, factory deployment membership, token code and immutable template identity. Current owner, separate ERC20/ERC721 balance and supply reads, and inert optional metadata are snapshot fields, not entitlement or custody claims; ERC1155 has no aggregate balance or supply claimed. Exact indexed deployment logs, matching canonical receipt, deployment timestamp, correctly ordered matching community Vault fee event and historical factory/Vault runtime hashes independently establish receipt evidence; history limits or invalid receipt evidence yield an explicit factory-record-only result. Refresh/context change/reorg removes stale display evidence. The mounted token-portfolio-ui.js renders partial/completed scan state and provenance without acquiring signing or approval authority. Transaction tracking remains page-session-only, but factory provenance is reconstructible after reload. Qualification: docs/audit/420TOKEN-AUDIT-5.10-QUALIFICATION.json.

Template-specific token management

token-management.js exposes the frozen template action catalogue, strict typed encodings, exact integer/decimal handling and bounded ERC1155 arrays. The Wallet session admits only a retained verified created-token record and independently reads the canonical factory row, membership, code, template, owner and relevant holder/operator/allowance, feature flags and cap or balance state. A fresh pinned SmartAccount simulation, exact return shape and gas estimate are required before review, authorization and submission; reviewed state and gas commitments must remain unchanged. Management sends zero native value, not the 42-native-420 creation fee, and uses the existing connected Wallet as sole signer with explicit gas ceilings. The shared session tracks exact management transaction identity and expected token events with canonical receipt checks, reorg handling and ambiguous-send protection. The management form clears on portfolio/context invalidation. Frozen ECDSA permits cannot authorize SmartAccount holders; on-chain approvals are available instead. No frozen contract change, live acceptance, automatic rebroadcast or new signer is asserted. Qualification: docs/audit/420TOKEN-AUDIT-5.11-QUALIFICATION.json.

Ownership, permissions and security controls

Targeted canonical permission inspection revalidates the retained token record, controller/SmartAccount context, template and runtime code, then reads current owner, holder/allowance/operator/NFT-specific approval or delegation state at a pinned block. It is not a complete enumerable permission inventory. The mounted management UI prepares explicit scoped revocations through the same simulated, reviewed, one-use Wallet authorization path; cancellation alone never changes on-chain permission. High-risk actions require exact typed acknowledgement of the displayed risk. Unlimited approval, nonzero allowance replacement, burn authority, irreversible ownership actions and unknown destination custody are disclosed. The review binds fresh owner, recovery state, authorization epoch/policy and code hash, token permission state and applicable destination code. Changed state or replacement/cancellation of a review invalidates in-flight authorization; submission remains Wallet-owned. Receipt tracking requires bound canonical target logs and unique log indices. No frozen contract or independent signer changes; no guarantee of state stability after broadcast, no live chain or finality assertion. Qualification: docs/audit/420TOKEN-AUDIT-5.12-QUALIFICATION.json.

Responsive design, accessibility and error states

The mounted Token catalogue, creation wizards, fee review, receipt tracking, portfolio and management share UI-only focus and status helpers. Canonical field validation attaches error fields without treating RPC failures as field errors; corrections retain exact input and clear the old error. UI status text is inert, strips control/direction characters, and never creates transaction authority. Native focus and live status regions support keyboard navigation and asynchronous recovery; management cancellation returns focus to the originating control or portfolio status. Responsive CSS wraps exact evidence and uses 44px controls, visible focus and forced-color styles. The rendered qualification exercises five widths and desktop 200% CSS zoom, not every assistive technology or real device. Existing Wallet authorization and no-automatic-retry guarantees remain unchanged. Evidence: docs/audit/420TOKEN-AUDIT-5.13-QUALIFICATION.json.

Local Wallet-to-contract qualification

The exact staged Solidity dependency closure is compiled with Foundry, deployed into isolated Cancun Anvil chain 31337 and exercised through the actual Wallet discovery/catalogue/wizard/fee-review/authorization/submission/confirmation modules. The test selects real local unlocked controller accounts and forwards RPC without manufactured receipts or state. Reserved Registry and governance addresses are installed and governance impersonated only for local bootstrap; this neither qualifies real Genesis materialization nor governance scheduling. All eight templates create with exactly 42 native units paid by the SmartAccount, independently reconstructed factory provenance and matching actual community Vault balance/accounting. Management and permissions use tested transactions and current ownership, including a real holder operator grant/revocation and local snapshot/revert. Prior included receipts must be rechecked after Wallet context refresh before another submission. The local node is not the 420Integrated testnet. Evidence: docs/audit/420TOKEN-AUDIT-5.14-QUALIFICATION.json.

Ecosystem discovery and independent authority

AppStore lists the curated Token application and its locally implemented creation and management expressions; curation is not a Registry publication or a launch authorization. Wallet retains the independent runtime and SmartAccount verification, simulation, authorization and submission path described above. Registry owns release identity, the factory records deployment provenance, and the community Treasury Vault owns its actual accounting. Development Compensation Vault is not part of Token V1 fee routing.

Both Indexer runtimes expose a checkpoint-bound historical creation and fee projection, not a token registry. An independently approved deployment binding anchors chain/genesis, Registry V1 service/profile publication, factory, community Vault and accounting addresses and release commitments. A successful receipt must contain the matching factory deployment, Vault accounting deposit, Vault native deposit and factory fee event, in that order. Transactions with several creations are correlated by their successive factory deployment log intervals. Rebuilds and checkpoint rollback remove observations beyond the canonical snapshot. This read model does not prove current factory code, current registration/ownership, spend authorization, finality, price, liquidity, endorsement or asset eligibility. Explorer and Search consume it without acquiring signing or admission authority. Analytics may aggregate indexed events with their chain/checkpoint provenance; it must not equate aggregate historical deposits with current Vault balances.

Swap/Exchange, Launchpad, Bridge and Pay continue to apply their own on-chain asset, market, project, route and settlement admission requirements. Token deployment alone cannot create any of those states; no cross-protocol authority is added.