目录 |
---|
DAO和插件的关系
...
action_delay:u64
多久后可以执行提案
StakeToSBT安装插件时
...
备注:插件的安装和插件的配置是否需要分两个界面。应该有一个插件列表,用户选择插件后安装。
2. 使用插件
2.1 Grant 插件
Grant 授予:
合约接口:
代码块 |
---|
public (script) fun create_grant_proposal<DAOT: store, TokenT:store>(sender: signer, description: vector<u8>,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64) |
...
代码块 |
---|
public (script) fun create_grant_config_proposal<DAOT: store, TokenT:store>(sender: signer, description: vector<u8>, old_grantee: address, new_grantee: address, total: u128, period: u64,start_time:u64, action_delay:u64) |
2.2 StakeToSBT插件
发起提案,接口:
代码块 | ||
---|---|---|
| ||
/// 发起质押类型的提案 /// 模板参数: /// 1. DAOT,DAO类型 /// 2. TokenT,Token类型 /// 普通参数: /// 1. sender 发起者签名 /// 2. description 描述信息 /// 3. action_delay,投票成功后多长时间才可以执行动作 fun StakeToSBT::create_token_accept_proposal<DAOT: store, TokenT: store>( sender: signer, description:vector<u8>, action_delay: u64); /// 发起质押参数的提案 /// 模板参数: /// 1. DAOT,DAO类型 /// 2. TokenT,Token类型 /// 普通参数: /// 1. sender 发起者签名 /// 2. description 描述信息 /// 3. lock_time 锁仓时长 /// 4. weight 倍率 /// 5. action_delay,投票成功后多长时间才可以执行动作 fun StakeToSBT::create_weight_proposal<DAOT: store, TokenT: store>( sender: signer, description:vector<u8>, lock_time: u64, weight: u64, action_delay: u64); |
...