33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
// Charter 标准库 - ACC-1400 证券代币协议
|
||
// 版本: 1.0 | 继承 ACC-1410,增加证券特有功能
|
||
|
||
/// ACC-1400 证券代币接口
|
||
/// 在 ACC-1410 基础上增加:股息分配、投票权管理、转让限制、合规验证
|
||
protocol Acc1400 extends Acc1410 {
|
||
/// 创建证券分区
|
||
fn create_security_partition(
|
||
name: String, gnacs: ExtendedGNACS, partition_type: PartitionType
|
||
) -> Hash;
|
||
|
||
/// 发行证券
|
||
fn issue_security(security_id: Hash, to: Address, amount: u128) -> Result;
|
||
|
||
/// 证券转让(含合规检查)
|
||
fn transfer_security(from: Address, to: Address, amount: u128, security_id: Hash) -> Result;
|
||
|
||
/// 设置投票权
|
||
fn set_voting_rights(account: Address, weight: u128, multiplier: u8);
|
||
|
||
/// 创建治理提案
|
||
fn create_proposal(title: String, description: String, ...) -> Hash;
|
||
|
||
/// 投票
|
||
fn cast_vote(proposal_id: Hash, voter: Address, option: VoteOption) -> Result;
|
||
|
||
/// 添加转让限制
|
||
fn add_transfer_restriction(name: String, restriction_type: RestrictionType);
|
||
|
||
/// 白名单管理
|
||
fn add_to_whitelist(account: Address, admin: Address, ...) -> Result;
|
||
}
|