// ACC-1155: 多代币标准 (Multi-Token Standard) // NAC 原生协议 - Charter 语言定义 // UID: nac.acc.ACC1155.v1 protocol ACC1155 { // 持仓查询:返回指定地址对指定代币ID的持有量 fn balance_of(holder: Address, token_id: u64) -> u128; // 批量持仓查询 fn balance_of_batch(holders: Vec
, token_ids: Vec) -> Vec; // 铸造代币(可替代或不可替代) fn mint(recipient: Address, token_id: u64, amount: u128, constitutional_receipt: Hash) -> Result<(), Error>; // 批量铸造 fn mint_batch(recipient: Address, token_ids: Vec, amounts: Vec, constitutional_receipt: Hash) -> Result<(), Error>; // 转移代币 fn transfer(from: Address, to: Address, token_id: u64, amount: u128) -> Result<(), Error>; // 销毁代币 fn burn(holder: Address, token_id: u64, amount: u128, constitutional_receipt: Hash) -> Result<(), Error>; // 查询代币URI(元数据) fn token_uri(token_id: u64) -> String; }