Contract suite overview
Token Contracts
Factory Contracts
Supporting Contracts
UUPS proxy pattern
Every ERC-20 token deployed throughTokenFactory is an ERC-1967 proxy. The proxy stores your token’s state (balances, metadata, status) and delegates all logic calls to one of the six template implementation contracts. This means:
- You can upgrade a deployed token by calling
upgradeToAndCallon the proxy — only the deployer (admin) can do this. - Templates are shared across all tokens of the same type. If a bug is found in
FarmlandToken, a new implementation is deployed once and you point your proxy to it. - The proxy address is permanent — your token’s on-chain address never changes after deployment, even after an upgrade.
TokenFactory class handles all of this for you via deployFarmland(), deployCommodity(), etc.
The UUPS implementation uses OpenZeppelin Contracts v5. The upgrade authority is the
admin address set at deployment time — by default, the deployer’s wallet. Store this key securely; losing it means you lose upgrade control over your tokens.Roles and access control
Every deployed token carries a small permission model:
There is no Ankara Chain platform key with any privilege over your contracts. Once deployed, the contracts are fully under your admin key’s control.