...
代码块 |
---|
|
trait Action<DaoT> {
fnfun name()->vector<u8>:vector<u8>;
fnfun schema()->vector<u8>:vector<u8>;
fnfun execute(dao:DaoT, params:vector<vector<u8>>);
} |
Action schema JSON:JSON schema:
代码块 |
---|
|
{
"params": [
{
"name": "vision",
"type": "vector<u8>",
"describe":"The vision of this DAO",
"required": true,
},
...
]
} |
注册Action:
代码块 |
---|
let action = SetVisionAction {
...
}
DAOSpace::register_action<DaoT, ActionT>(&add_action_cap, action:ActionT); |
移除Action:
代码块 |
---|
DAOSpace::remove_action<DaoT, ActionT>(&remove_action_cap, action_name:vector<u8>); |
相关提案界面: