Example: Minimal Token
Smallest readable fungible token: metadata, supply, owner, balances map, one @view.
CX3Script does not auto-expose state fields as ABI view methods the way Solidity's implicit public getters do - the ABI lists the functions you declare (plus events and errors). The Green Chain node answers name, symbol, decimals, totalSupply, balanceOf and allowance from contract state, so a token that keeps its supply in totalSupply and balances in mapping balances is readable by wallets and the SDK without getters. The @view functions below expose the same values to direct calls; the name getTotalSupply is this sample's choice and must differ from the totalSupply field.