diff --git a/release/v12/BuildInfo.yaml b/release/v12/BuildInfo.yaml index 6c1f4789..778af5fe 100644 --- a/release/v12/BuildInfo.yaml +++ b/release/v12/BuildInfo.yaml @@ -333,7 +333,7 @@ compiled_package_info: ? address: "0x00000000000000000000000000000001" name: YieldFarmingV2 : StarcoinFramework - source_digest: E90F2F8FC8A933897A28C415C88680705ED69370B7BE7AE1025E9CE037CE07FC + source_digest: E2AE9B65FA7E7B645BCC6FFF7E1C5A23CC82751DCC3A587627C198DC0F9119A0 build_flags: dev_mode: false test_mode: false diff --git a/release/v12/abis/AnyMemberPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/AnyMemberPlugin/install_plugin_proposal_entry.abi index 4b6ed40a..fde5220e 100644 Binary files a/release/v12/abis/AnyMemberPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/AnyMemberPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/ConfigProposalPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/ConfigProposalPlugin/install_plugin_proposal_entry.abi index ace4ad77..27fb0ca0 100644 Binary files a/release/v12/abis/ConfigProposalPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/ConfigProposalPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/GasOracleProposalPlugin/create_oracle_add_proposal.abi b/release/v12/abis/GasOracleProposalPlugin/create_oracle_add_proposal.abi index 1918610c..d6e7001c 100644 Binary files a/release/v12/abis/GasOracleProposalPlugin/create_oracle_add_proposal.abi and b/release/v12/abis/GasOracleProposalPlugin/create_oracle_add_proposal.abi differ diff --git a/release/v12/abis/GasOracleProposalPlugin/create_oracle_remove_proposal.abi b/release/v12/abis/GasOracleProposalPlugin/create_oracle_remove_proposal.abi index 910f3cf1..db6082d2 100644 Binary files a/release/v12/abis/GasOracleProposalPlugin/create_oracle_remove_proposal.abi and b/release/v12/abis/GasOracleProposalPlugin/create_oracle_remove_proposal.abi differ diff --git a/release/v12/abis/GasOracleProposalPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/GasOracleProposalPlugin/install_plugin_proposal_entry.abi index 76515082..252e0844 100644 Binary files a/release/v12/abis/GasOracleProposalPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/GasOracleProposalPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/GrantProposalPlugin/create_grant_proposal_entry.abi b/release/v12/abis/GrantProposalPlugin/create_grant_proposal_entry.abi index 888f0e89..b8ac767f 100644 Binary files a/release/v12/abis/GrantProposalPlugin/create_grant_proposal_entry.abi and b/release/v12/abis/GrantProposalPlugin/create_grant_proposal_entry.abi differ diff --git a/release/v12/abis/GrantProposalPlugin/create_grant_revoke_proposal_entry.abi b/release/v12/abis/GrantProposalPlugin/create_grant_revoke_proposal_entry.abi index cc45a6d5..5948f943 100644 Binary files a/release/v12/abis/GrantProposalPlugin/create_grant_revoke_proposal_entry.abi and b/release/v12/abis/GrantProposalPlugin/create_grant_revoke_proposal_entry.abi differ diff --git a/release/v12/abis/GrantProposalPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/GrantProposalPlugin/install_plugin_proposal_entry.abi index 758eb187..cefe2ab0 100644 Binary files a/release/v12/abis/GrantProposalPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/GrantProposalPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/MemberProposalPlugin/create_proposal_entry.abi b/release/v12/abis/MemberProposalPlugin/create_proposal_entry.abi index c91e8d19..feed6297 100644 Binary files a/release/v12/abis/MemberProposalPlugin/create_proposal_entry.abi and b/release/v12/abis/MemberProposalPlugin/create_proposal_entry.abi differ diff --git a/release/v12/abis/MemberProposalPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/MemberProposalPlugin/install_plugin_proposal_entry.abi index 0c8dfa4f..49c94f29 100644 Binary files a/release/v12/abis/MemberProposalPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/MemberProposalPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/MintProposalPlugin/create_mint_proposal_entry.abi b/release/v12/abis/MintProposalPlugin/create_mint_proposal_entry.abi index 14cc604d..7de9e6c0 100644 Binary files a/release/v12/abis/MintProposalPlugin/create_mint_proposal_entry.abi and b/release/v12/abis/MintProposalPlugin/create_mint_proposal_entry.abi differ diff --git a/release/v12/abis/MintProposalPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/MintProposalPlugin/install_plugin_proposal_entry.abi index dae9f166..a40aee3c 100644 Binary files a/release/v12/abis/MintProposalPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/MintProposalPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/create_token_accept_proposal_entry.abi b/release/v12/abis/StakeToSBTPlugin/create_token_accept_proposal_entry.abi index 1681816e..e4f48fee 100644 Binary files a/release/v12/abis/StakeToSBTPlugin/create_token_accept_proposal_entry.abi and b/release/v12/abis/StakeToSBTPlugin/create_token_accept_proposal_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/create_weight_proposal_entry.abi b/release/v12/abis/StakeToSBTPlugin/create_weight_proposal_entry.abi index bff74a43..476ae180 100644 Binary files a/release/v12/abis/StakeToSBTPlugin/create_weight_proposal_entry.abi and b/release/v12/abis/StakeToSBTPlugin/create_weight_proposal_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/install_plugin_proposal_entry.abi b/release/v12/abis/StakeToSBTPlugin/install_plugin_proposal_entry.abi index 27336ed5..bf8a4c64 100644 Binary files a/release/v12/abis/StakeToSBTPlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/StakeToSBTPlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/stake_entry.abi b/release/v12/abis/StakeToSBTPlugin/stake_entry.abi index 1ba9cb2b..799c9415 100644 Binary files a/release/v12/abis/StakeToSBTPlugin/stake_entry.abi and b/release/v12/abis/StakeToSBTPlugin/stake_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/unstake_all_entry.abi b/release/v12/abis/StakeToSBTPlugin/unstake_all_entry.abi deleted file mode 100644 index 1791f37e..00000000 Binary files a/release/v12/abis/StakeToSBTPlugin/unstake_all_entry.abi and /dev/null differ diff --git a/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi b/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi deleted file mode 100644 index 746114b0..00000000 Binary files a/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi and /dev/null differ diff --git a/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi b/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi new file mode 100644 index 00000000..031947a6 Binary files /dev/null and b/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi differ diff --git a/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi b/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi index a39f0963..599f4fe9 100644 Binary files a/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi and b/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi differ diff --git a/release/v12/abis/UpgradeModulePlugin/create_proposal_entry.abi b/release/v12/abis/UpgradeModulePlugin/create_proposal_entry.abi index 14cc34a3..12cdf4e3 100644 Binary files a/release/v12/abis/UpgradeModulePlugin/create_proposal_entry.abi and b/release/v12/abis/UpgradeModulePlugin/create_proposal_entry.abi differ diff --git a/release/v12/abis/UpgradeModulePlugin/install_plugin_proposal_entry.abi b/release/v12/abis/UpgradeModulePlugin/install_plugin_proposal_entry.abi index 4609222c..f1ffd6bf 100644 Binary files a/release/v12/abis/UpgradeModulePlugin/install_plugin_proposal_entry.abi and b/release/v12/abis/UpgradeModulePlugin/install_plugin_proposal_entry.abi differ diff --git a/release/v12/bytecode_modules/MemberProposalPlugin.mv b/release/v12/bytecode_modules/MemberProposalPlugin.mv index 3e83c189..a5eb208f 100644 Binary files a/release/v12/bytecode_modules/MemberProposalPlugin.mv and b/release/v12/bytecode_modules/MemberProposalPlugin.mv differ diff --git a/release/v12/bytecode_modules/StakeToSBTPlugin.mv b/release/v12/bytecode_modules/StakeToSBTPlugin.mv index 86aa150d..7cd9a83e 100644 Binary files a/release/v12/bytecode_modules/StakeToSBTPlugin.mv and b/release/v12/bytecode_modules/StakeToSBTPlugin.mv differ diff --git a/release/v12/docs/AnyMemberPlugin.md b/release/v12/docs/AnyMemberPlugin.md index 361fffc8..af5d2b1c 100644 --- a/release/v12/docs/AnyMemberPlugin.md +++ b/release/v12/docs/AnyMemberPlugin.md @@ -3,7 +3,6 @@ # Module `0x1::AnyMemberPlugin` -This plugin let every can join the DAO, and auto get 1 sbt. - [Struct `AnyMemberPlugin`](#0x1_AnyMemberPlugin_AnyMemberPlugin) @@ -191,7 +190,7 @@ This plugin let every can join the DAO, and auto get 1 sbt. -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -200,8 +199,8 @@ This plugin let every can join the DAO, and auto get 1 sbt. Implementation -
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, AnyMemberPlugin>(sender, required_caps(), title, introduction, extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, AnyMemberPlugin>(sender, required_caps(), title, introduction, description, action_delay);
 }
 
@@ -215,7 +214,7 @@ This plugin let every can join the DAO, and auto get 1 sbt. -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -224,8 +223,8 @@ This plugin let every can join the DAO, and auto get 1 sbt. Implementation -
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/ConfigProposalPlugin.md b/release/v12/docs/ConfigProposalPlugin.md index c4a1c97d..5986f4d0 100644 --- a/release/v12/docs/ConfigProposalPlugin.md +++ b/release/v12/docs/ConfigProposalPlugin.md @@ -154,7 +154,7 @@ Called by other contract which need proposal config -
public fun create_proposal<DAOT: store, ConfigT: drop, store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64, config: ConfigT)
+
public fun create_proposal<DAOT: store, ConfigT: drop, store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64, config: ConfigT)
 
@@ -163,7 +163,7 @@ Called by other contract which need proposal config Implementation -
public fun create_proposal<DAOT: store, ConfigT: store+drop>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>,action_delay: u64, config: ConfigT) {
+
public fun create_proposal<DAOT: store, ConfigT: store+drop>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>,action_delay: u64, config: ConfigT) {
     let witness = ConfigProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, ConfigProposalPlugin>(&witness);
     let action = ConfigProposalAction<ConfigT>{
@@ -172,7 +172,7 @@ Called by other contract which need proposal config
     DAOSpace::create_proposal<
         DAOT,
         ConfigProposalPlugin,
-        ConfigProposalAction<ConfigT>>(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+        ConfigProposalAction<ConfigT>>(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -244,7 +244,7 @@ Called by other contract which need proposal config -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -253,8 +253,8 @@ Called by other contract which need proposal config Implementation -
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, ConfigProposalPlugin>(sender, required_caps(), title, introduction, extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, ConfigProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
 }
 
@@ -268,7 +268,7 @@ Called by other contract which need proposal config -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -277,8 +277,8 @@ Called by other contract which need proposal config Implementation -
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/DAOSpace.md b/release/v12/docs/DAOSpace.md index 6fb137b7..55a9c15c 100644 --- a/release/v12/docs/DAOSpace.md +++ b/release/v12/docs/DAOSpace.md @@ -6022,9 +6022,6 @@ no_with_veto counts as no but also adds a veto vote ## Function `create_proposal` propose a proposal. -title: title of the proposal -introduction: short introduction of the proposal -extend: extend of proposal , ipfs:// | { "title":"xxxxx",........ } action: the actual action to execute. action_delay: the delay to execute after the proposal is agreed quorum_scale_factor: used to scale up the base quorum_votes_rate. @@ -6763,7 +6760,7 @@ A portion of the pledged tokens will be rewarded to the executor who executes th let dao_address = dao_address<DAOT>(); assert!(exists<ProposalActions<ActionT>>(dao_address), Errors::invalid_state(ERR_PROPOSAL_ACTIONS_NOT_EXIST)); let (_, token) = take_proposal_action<ActionT>(dao_address, proposal_id); - // Part of the token is awarded to whoever executes this method , current: 10 % + // Part of the token is awarded to whoever executes this method , TODO: 10 % let award_amount = Token::value(&token) / 10; let (burn_token , award_token) = Token::split(token, award_amount); Account::deposit(Signer::address_of(sender), award_token); diff --git a/release/v12/docs/GasOracleProposalPlugin.md b/release/v12/docs/GasOracleProposalPlugin.md index ac8efbf8..1ca0042d 100644 --- a/release/v12/docs/GasOracleProposalPlugin.md +++ b/release/v12/docs/GasOracleProposalPlugin.md @@ -277,7 +277,7 @@ -
public(script) fun create_oracle_add_proposal<DAOT: store, TokenType: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64, source_address: address)
+
public(script) fun create_oracle_add_proposal<DAOT: store, TokenType: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64, source_address: address)
 
@@ -286,13 +286,13 @@ Implementation -
public(script) fun create_oracle_add_proposal<DAOT: store, TokenType: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay: u64, source_address: address) {
+
public(script) fun create_oracle_add_proposal<DAOT: store, TokenType: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay: u64, source_address: address) {
     let witness = GasOracleProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, GasOracleProposalPlugin>(&witness);
     let action = OracleSourceAddAction<TokenType>{
         source_address
     };
-    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -345,7 +345,7 @@ -
public(script) fun create_oracle_remove_proposal<DAOT: store, TokenType: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64, source_address: address)
+
public(script) fun create_oracle_remove_proposal<DAOT: store, TokenType: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64, source_address: address)
 
@@ -354,13 +354,13 @@ Implementation -
public(script) fun create_oracle_remove_proposal<DAOT: store, TokenType: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay: u64, source_address: address) {
+
public(script) fun create_oracle_remove_proposal<DAOT: store, TokenType: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay: u64, source_address: address) {
     let witness = GasOracleProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, GasOracleProposalPlugin>(&witness);
     let action = OracleSourceRemoveAction<TokenType>{
         source_address
     };
-    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -434,7 +434,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -443,8 +443,8 @@ Implementation -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay: u64) {
-    InstallPluginProposalPlugin::create_proposal<DAOT, GasOracleProposalPlugin>(sender, required_caps(), title, introduction, extend, action_delay);
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay: u64) {
+    InstallPluginProposalPlugin::create_proposal<DAOT, GasOracleProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
 }
 
@@ -458,7 +458,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -467,8 +467,8 @@ Implementation -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay: u64) {
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay: u64) {
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/GrantProposalPlugin.md b/release/v12/docs/GrantProposalPlugin.md index fa054d8d..5ec8b7a5 100644 --- a/release/v12/docs/GrantProposalPlugin.md +++ b/release/v12/docs/GrantProposalPlugin.md @@ -291,7 +291,7 @@ -
public fun create_grant_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, grantee: address, total: u128, start_time: u64, period: u64, action_delay: u64)
+
public fun create_grant_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, grantee: address, total: u128, start_time: u64, period: u64, action_delay: u64)
 
@@ -300,7 +300,7 @@ Implementation -
public fun create_grant_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){
+
public fun create_grant_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){
     let witness = GrantProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, GrantProposalPlugin>(&witness);
     let action = GrantCreateAction<TokenT>{
@@ -309,7 +309,7 @@
         start_time:start_time,
         period:period
     };
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -323,7 +323,7 @@ -
public(script) fun create_grant_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, grantee: address, total: u128, start_time: u64, period: u64, action_delay: u64)
+
public(script) fun create_grant_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, grantee: address, total: u128, start_time: u64, period: u64, action_delay: u64)
 
@@ -332,8 +332,8 @@ Implementation -
public (script) fun create_grant_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){
-    create_grant_proposal<DAOT, TokenT>(&sender, title, introduction, extend, grantee, total, start_time, period, action_delay);
+
public (script) fun create_grant_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){
+    create_grant_proposal<DAOT, TokenT>(&sender, title, introduction, description, grantee, total, start_time, period, action_delay);
 }
 
@@ -400,7 +400,7 @@ -
public fun create_grant_revoke_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, grantee: address, action_delay: u64)
+
public fun create_grant_revoke_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, grantee: address, action_delay: u64)
 
@@ -409,11 +409,11 @@ Implementation -
public fun create_grant_revoke_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, grantee:address, action_delay:u64){
+
public fun create_grant_revoke_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, grantee:address, action_delay:u64){
     let witness = GrantProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, GrantProposalPlugin>(&witness);
     let action = GrantRevokeAction<TokenT>{ grantee };
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -427,7 +427,7 @@ -
public(script) fun create_grant_revoke_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, grantee: address, action_delay: u64)
+
public(script) fun create_grant_revoke_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, grantee: address, action_delay: u64)
 
@@ -436,8 +436,8 @@ Implementation -
public (script) fun create_grant_revoke_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, grantee:address, action_delay:u64){
-    create_grant_revoke_proposal<DAOT, TokenT>(&sender, title, introduction, extend, grantee, action_delay);
+
public (script) fun create_grant_revoke_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, grantee:address, action_delay:u64){
+    create_grant_revoke_proposal<DAOT, TokenT>(&sender, title, introduction, description, grantee, action_delay);
 }
 
@@ -503,7 +503,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -512,8 +512,8 @@ Implementation -
public fun install_plugin_proposal<DAOT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, GrantProposalPlugin>(sender, required_caps(), title, introduction, extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, GrantProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
 }
 
@@ -527,7 +527,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -536,8 +536,8 @@ Implementation -
public (script) fun install_plugin_proposal_entry<DAOT: store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT: store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/InstallPluginProposalPlugin.md b/release/v12/docs/InstallPluginProposalPlugin.md index f42b9fb4..38e2e989 100644 --- a/release/v12/docs/InstallPluginProposalPlugin.md +++ b/release/v12/docs/InstallPluginProposalPlugin.md @@ -148,12 +148,9 @@ ## Function `create_proposal` -Create a proposal to install a plugin. -We do not provide a entry function for create_proposal, because we can not use CapType as an entry function parameter, -every plugin should provide a entry function to create proposal to install self. -
public fun create_proposal<DAOT: store, ToInstallPluginT: store>(sender: &signer, required_caps: vector<DAOSpace::CapType>, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun create_proposal<DAOT: store, ToInstallPluginT: store>(sender: &signer, required_caps: vector<DAOSpace::CapType>, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -162,7 +159,7 @@ every plugin should provide a entry function to create proposal to install self. Implementation -
public fun create_proposal<DAOT: store, ToInstallPluginT: store>(sender: &signer, required_caps: vector<CapType>, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay: u64){
+
public fun create_proposal<DAOT: store, ToInstallPluginT: store>(sender: &signer, required_caps: vector<CapType>, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay: u64){
     let witness = InstallPluginProposalPlugin{};
 
     let cap = DAOSpace::acquire_proposal_cap<DAOT, InstallPluginProposalPlugin>(&witness);
@@ -170,7 +167,7 @@ every plugin should provide a entry function to create proposal to install self.
         required_caps,
     };
 
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
diff --git a/release/v12/docs/MemberProposalPlugin.md b/release/v12/docs/MemberProposalPlugin.md index 818e6e9c..5b614ef6 100644 --- a/release/v12/docs/MemberProposalPlugin.md +++ b/release/v12/docs/MemberProposalPlugin.md @@ -197,7 +197,7 @@ -
public fun create_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, member: address, image_data: vector<u8>, image_url: vector<u8>, init_sbt: u128, action_delay: u64)
+
public fun create_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, member: address, image_data: vector<u8>, image_url: vector<u8>, init_sbt: u128, action_delay: u64)
 
@@ -206,7 +206,7 @@ Implementation -
public fun create_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, member: address, image_data:vector<u8>, image_url:vector<u8>, init_sbt: u128, action_delay: u64){
+
public fun create_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, member: address, image_data:vector<u8>, image_url:vector<u8>, init_sbt: u128, action_delay: u64){
     let witness = MemberProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, MemberProposalPlugin>(&witness);
     let action = MemberJoinAction{
@@ -217,7 +217,7 @@
     };
     assert!(!DAOSpace::is_exist_member_offer<DAOT>(member), Errors::already_published(ERR_MEMBER_OFFER_EXIST));
     assert!(!DAOSpace::is_member<DAOT>(member), Errors::already_published(ERR_MEMBER_EXIST));
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -231,7 +231,7 @@ -
public(script) fun create_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, member: address, image_data: vector<u8>, image_url: vector<u8>, init_sbt: u128, action_delay: u64)
+
public(script) fun create_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, member: address, image_data: vector<u8>, image_url: vector<u8>, init_sbt: u128, action_delay: u64)
 
@@ -240,8 +240,8 @@ Implementation -
public (script) fun create_proposal_entry<DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, member: address, image_data:vector<u8>, image_url:vector<u8>, init_sbt: u128, action_delay: u64){
-    create_proposal<DAOT>(&sender, title, introduction, extend, member, image_data, image_url, init_sbt, action_delay);
+
public (script) fun create_proposal_entry<DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, member: address, image_data:vector<u8>, image_url:vector<u8>, init_sbt: u128, action_delay: u64){
+    create_proposal<DAOT>(&sender, title, introduction, description, member, image_data, image_url, init_sbt, action_delay);
 }
 
@@ -317,7 +317,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -326,8 +326,8 @@ Implementation -
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>,action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, MemberProposalPlugin>(sender, required_caps(), title, introduction, extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>,action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, MemberJoinAction>(sender, required_caps(), title, introduction, description, action_delay);
 }
 
@@ -341,7 +341,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -350,8 +350,8 @@ Implementation -
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/MintProposalPlugin.md b/release/v12/docs/MintProposalPlugin.md index e9db71ee..e393609f 100644 --- a/release/v12/docs/MintProposalPlugin.md +++ b/release/v12/docs/MintProposalPlugin.md @@ -241,7 +241,7 @@ MintToken request. -
public fun create_mint_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, receiver: address, amount: u128, action_delay: u64)
+
public fun create_mint_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, receiver: address, amount: u128, action_delay: u64)
 
@@ -250,14 +250,14 @@ MintToken request. Implementation -
public fun create_mint_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, receiver: address, amount: u128, action_delay: u64){
+
public fun create_mint_proposal<DAOT: store, TokenT:store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, receiver: address, amount: u128, action_delay: u64){
     let witness = MintProposalPlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, MintProposalPlugin>(&witness);
     let action = MintTokenAction<TokenT>{
         receiver,
         amount,
     };
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -271,7 +271,7 @@ MintToken request. -
public(script) fun create_mint_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, receiver: address, amount: u128, action_delay: u64)
+
public(script) fun create_mint_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, receiver: address, amount: u128, action_delay: u64)
 
@@ -280,8 +280,8 @@ MintToken request. Implementation -
public (script) fun create_mint_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, receiver: address, amount: u128, action_delay: u64){
-    create_mint_proposal<DAOT, TokenT>(&sender, extend, title, introduction, receiver, amount, action_delay);
+
public (script) fun create_mint_proposal_entry<DAOT: store, TokenT:store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, receiver: address, amount: u128, action_delay: u64){
+    create_mint_proposal<DAOT, TokenT>(&sender, description, title, introduction, receiver, amount, action_delay);
 }
 
@@ -348,7 +348,7 @@ MintToken request. -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -357,8 +357,8 @@ MintToken request. Implementation -
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, MintProposalPlugin>(sender,required_caps(), title, introduction,  extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, MintProposalPlugin>(sender,required_caps(), title, introduction,  description, action_delay);
 }
 
@@ -372,7 +372,7 @@ MintToken request. -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -381,8 +381,8 @@ MintToken request. Implementation -
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/docs/SBTVoteStrategy.md b/release/v12/docs/SBTVoteStrategy.md index 58523ec1..13785739 100644 --- a/release/v12/docs/SBTVoteStrategy.md +++ b/release/v12/docs/SBTVoteStrategy.md @@ -48,6 +48,8 @@ deserialize snapshot vote value from state
public fun get_voting_power(state: &vector<u8>) : u128 {
     let sbt_value = deserialize_sbt_value_from_bcs_state(state);
+
+    //TODO support calculate weight_factor
     sbt_value
 }
 
diff --git a/release/v12/docs/StakeToSBTPlugin.md b/release/v12/docs/StakeToSBTPlugin.md index c2b828fd..68922dfa 100644 --- a/release/v12/docs/StakeToSBTPlugin.md +++ b/release/v12/docs/StakeToSBTPlugin.md @@ -23,13 +23,10 @@ - [Function `set_sbt_weight_by_dao`](#0x1_StakeToSBTPlugin_set_sbt_weight_by_dao) - [Function `accept_token`](#0x1_StakeToSBTPlugin_accept_token) - [Function `stake`](#0x1_StakeToSBTPlugin_stake) -- [Function `stake_entry`](#0x1_StakeToSBTPlugin_stake_entry) - [Function `query_stake`](#0x1_StakeToSBTPlugin_query_stake) - [Function `query_stake_count`](#0x1_StakeToSBTPlugin_query_stake_count) - [Function `unstake_by_id`](#0x1_StakeToSBTPlugin_unstake_by_id) -- [Function `unstake_by_id_entry`](#0x1_StakeToSBTPlugin_unstake_by_id_entry) - [Function `unstake_all`](#0x1_StakeToSBTPlugin_unstake_all) -- [Function `unstake_all_entry`](#0x1_StakeToSBTPlugin_unstake_all_entry) - [Function `unstake_item`](#0x1_StakeToSBTPlugin_unstake_item) - [Function `get_sbt_weight`](#0x1_StakeToSBTPlugin_get_sbt_weight) - [Function `set_sbt_weight`](#0x1_StakeToSBTPlugin_set_sbt_weight) @@ -45,6 +42,8 @@ - [Function `execute_token_accept_proposal_entry`](#0x1_StakeToSBTPlugin_execute_token_accept_proposal_entry) - [Function `install_plugin_proposal`](#0x1_StakeToSBTPlugin_install_plugin_proposal) - [Function `install_plugin_proposal_entry`](#0x1_StakeToSBTPlugin_install_plugin_proposal_entry) +- [Function `stake_entry`](#0x1_StakeToSBTPlugin_stake_entry) +- [Function `unstake_item_entry`](#0x1_StakeToSBTPlugin_unstake_item_entry)
use 0x1::Account;
@@ -846,35 +845,6 @@ Accept token with token type
 
 
 
-
-
-
-
-## Function `stake_entry`
-
-
-
-
public(script) fun stake_entry<DAOT: store, TokenT: store>(sender: signer, amount: u128, lock_time: u64)
-
- - - -
-Implementation - - -
public(script) fun stake_entry<DAOT: store, TokenT: store>(
-    sender: signer,
-    amount: u128,
-    lock_time: u64
-) acquires StakeList {
-    let token = Account::withdraw<TokenT>(&sender, amount);
-    stake<DAOT, TokenT>(&sender, token, lock_time);
-}
-
- - -
@@ -892,10 +862,8 @@ Accept token with token type Implementation -
public fun query_stake<DAOT: store, TokenT: store>(
-    member: address,
-    id: u64
-): (u64, u64, u64, u128, u128) acquires StakeList {
+
public fun query_stake<DAOT: store, TokenT: store>(member: address, id: u64)
+: (u64, u64, u64, u128, u128) acquires StakeList {
     assert!(exists<StakeList<DAOT, TokenT>>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE));
     let stake_list = borrow_global_mut<StakeList<DAOT, TokenT>>(member);
     let item_index = find_item(id, &stake_list.items);
@@ -953,7 +921,7 @@ Query stake count from stake list
 Unstake from staking
 
 
-
public fun unstake_by_id<DAOT: store, TokenT: store>(sender: &signer, id: u64)
+
public fun unstake_by_id<DAOT: store, TokenT: store>(member: address, id: u64)
 
@@ -962,8 +930,7 @@ Unstake from staking Implementation -
public fun unstake_by_id<DAOT: store, TokenT: store>(sender: &signer, id: u64) acquires StakeList {
-    let member = Signer::address_of(sender);
+
public fun unstake_by_id<DAOT: store, TokenT: store>(member: address, id: u64) acquires StakeList {
     assert!(exists<StakeList<DAOT, TokenT>>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE));
     let stake_list = borrow_global_mut<StakeList<DAOT, TokenT>>(member);
     let item_index = find_item(id, &stake_list.items);
@@ -1002,44 +969,17 @@ Unstake from staking
 
 
 
-
-
-
-
-## Function `unstake_by_id_entry`
-
-
-
-
public(script) fun unstake_by_id_entry<DAOT: store, TokenT: store>(sender: signer, id: u64)
-
- - - -
-Implementation - - -
public(script) fun unstake_by_id_entry<DAOT: store, TokenT: store>(
-    sender: signer,
-    id: u64
-) acquires StakeList {
-    unstake_by_id<DAOT, TokenT>(&sender, id);
-}
-
- - -
## Function `unstake_all` -Unstake all staking items from sender, -No care whether the sender is member or not +Unstake all staking items from member address, +No care whether the user is member or not -
public fun unstake_all<DAOT: store, TokenT: store>(sender: &signer)
+
public fun unstake_all<DAOT: store, TokenT: store>(member: address)
 
@@ -1048,16 +988,15 @@ No care whether the sender is member or not Implementation -
public fun unstake_all<DAOT: store, TokenT: store>(sender: &signer) acquires StakeList {
-    let sender_addr = Signer::address_of(sender);
-    assert!(exists<StakeList<DAOT, TokenT>>(sender_addr), Errors::not_published(ERR_PLUGIN_NOT_STAKE));
-    let stake_list = borrow_global_mut<StakeList<DAOT, TokenT>>(sender_addr);
+
public fun unstake_all<DAOT: store, TokenT: store>(member: address) acquires StakeList {
+    assert!(exists<StakeList<DAOT, TokenT>>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE));
+    let stake_list = borrow_global_mut<StakeList<DAOT, TokenT>>(member);
     let len = Vector::length(&mut stake_list.items);
 
     let idx = 0;
     while (idx < len) {
         let item = Vector::remove(&mut stake_list.items, idx);
-        Account::deposit(sender_addr, unstake_item<DAOT, TokenT>(sender_addr, item));
+        Account::deposit(member, unstake_item<DAOT, TokenT>(member, item));
         idx = idx + 1;
     };
 }
@@ -1065,30 +1004,6 @@ No care whether the sender is member or not
 
 
 
-
-
-
-
-## Function `unstake_all_entry`
-
-
-
-
public(script) fun unstake_all_entry<DAOT: store, TokenT: store>(sender: signer)
-
- - - -
-Implementation - - -
public(script) fun unstake_all_entry<DAOT: store, TokenT: store>(sender: signer) acquires StakeList {
-    unstake_all<DAOT, TokenT>(&sender);
-}
-
- - -
@@ -1305,7 +1220,7 @@ Unstake a item from a item object Create proposal that to specific a weight for a locktime -
public fun create_weight_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
+
public fun create_weight_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
 
@@ -1318,7 +1233,7 @@ Create proposal that to specific a weight for a locktime sender: &signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, lock_time: u64, weight: u64, action_delay: u64 @@ -1333,7 +1248,7 @@ Create proposal that to specific a weight for a locktime }, title, introduction, - extend, + description, action_delay, Option::none<u8>()); } @@ -1349,7 +1264,7 @@ Create proposal that to specific a weight for a locktime -
public(script) fun create_weight_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
+
public(script) fun create_weight_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
 
@@ -1362,12 +1277,12 @@ Create proposal that to specific a weight for a locktime sender: signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, lock_time: u64, weight: u64, action_delay: u64 ) { - create_weight_proposal<DAOT, TokenT>(&sender,title, introduction, extend, lock_time, weight, action_delay); + create_weight_proposal<DAOT, TokenT>(&sender,title, introduction, description, lock_time, weight, action_delay); }
@@ -1449,7 +1364,7 @@ Create proposal that to specific a weight for a locktime Create proposal that to accept a token type, which allow user to convert amount of token to SBT -
public fun create_token_accept_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun create_token_accept_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -1462,7 +1377,7 @@ Create proposal that to accept a token type, which allow user to convert amount sender: &signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, action_delay: u64 ) { let witness = StakeToSBTPlugin {}; @@ -1475,7 +1390,7 @@ Create proposal that to accept a token type, which allow user to convert amount AcceptTokenCap<DAOT, TokenT> {}, title, introduction, - extend, + description, action_delay, Option::none<u8>() ); @@ -1492,7 +1407,7 @@ Create proposal that to accept a token type, which allow user to convert amount -
public(script) fun create_token_accept_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun create_token_accept_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -1505,10 +1420,10 @@ Create proposal that to accept a token type, which allow user to convert amount sender: signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, action_delay: u64 ) { - create_token_accept_proposal<DAOT, TokenT>(&sender, title, introduction, extend, action_delay); + create_token_accept_proposal<DAOT, TokenT>(&sender, title, introduction, description, action_delay); }
@@ -1586,7 +1501,7 @@ Create proposal that to accept a token type, which allow user to convert amount -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -1599,7 +1514,7 @@ Create proposal that to accept a token type, which allow user to convert amount sender: &signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, action_delay: u64 ) { InstallPluginProposalPlugin::create_proposal<DAOT, StakeToSBTPlugin>( @@ -1607,7 +1522,7 @@ Create proposal that to accept a token type, which allow user to convert amount required_caps(), title, introduction, - extend, + description, action_delay ); } @@ -1623,7 +1538,7 @@ Create proposal that to accept a token type, which allow user to convert amount -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -1636,10 +1551,68 @@ Create proposal that to accept a token type, which allow user to convert amount sender: signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, action_delay: u64 ) { - install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay); + install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay); +} +
+ + + + + + + +## Function `stake_entry` + +Called by script + + +
public(script) fun stake_entry<DAOT: store, TokenT: store>(sender: signer, amount: u128, lock_time: u64)
+
+ + + +
+Implementation + + +
public(script) fun stake_entry<DAOT: store, TokenT: store>(
+    sender: signer,
+    amount: u128,
+    lock_time: u64
+) acquires StakeList {
+    let token = Account::withdraw<TokenT>(&sender, amount);
+    stake<DAOT, TokenT>(&sender, token, lock_time);
+}
+
+ + + +
+ + + +## Function `unstake_item_entry` + +Called by script + + +
public(script) fun unstake_item_entry<DAOT: store, TokenT: store>(member: address, id: u64)
+
+ + + +
+Implementation + + +
public(script) fun unstake_item_entry<DAOT: store, TokenT: store>(
+    member: address,
+    id: u64
+) acquires StakeList {
+    unstake_by_id<DAOT, TokenT>(member, id);
 }
 
diff --git a/release/v12/docs/TreasuryPlugin.md b/release/v12/docs/TreasuryPlugin.md index 8821d43a..9d835b05 100644 --- a/release/v12/docs/TreasuryPlugin.md +++ b/release/v12/docs/TreasuryPlugin.md @@ -344,7 +344,7 @@ Should be called by token issuer. -
public fun create_withdraw_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64)
+
public fun create_withdraw_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64)
 
@@ -357,7 +357,7 @@ Should be called by token issuer. sender: &signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, receiver: address, amount: u128, period: u64, @@ -377,7 +377,7 @@ Should be called by token issuer. set_scale_factor_inner<DAOT>(0u8); }; let scale = DAOSpace::get_custom_config<DAOT, QuorumScale>().scale; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::some(scale)); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::some(scale)); }
@@ -391,7 +391,7 @@ Should be called by token issuer. -
public(script) fun create_withdraw_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64)
+
public(script) fun create_withdraw_proposal_entry<DAOT: store, TokenT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64)
 
@@ -404,13 +404,13 @@ Should be called by token issuer. sender: signer, title:vector<u8>, introduction:vector<u8>, - extend: vector<u8>, + description: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64) { - create_withdraw_proposal<DAOT, TokenT>(&sender, title, introduction, extend, receiver, amount, period, action_delay); + create_withdraw_proposal<DAOT, TokenT>(&sender, title, introduction, description, receiver, amount, period, action_delay); }
diff --git a/release/v12/docs/UpgradeModulePlugin.md b/release/v12/docs/UpgradeModulePlugin.md index db2dd9fd..63a3eeca 100644 --- a/release/v12/docs/UpgradeModulePlugin.md +++ b/release/v12/docs/UpgradeModulePlugin.md @@ -166,7 +166,7 @@ -
public fun create_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64, package_hash: vector<u8>, version: u64, enforced: bool)
+
public fun create_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64, package_hash: vector<u8>, version: u64, enforced: bool)
 
@@ -175,7 +175,7 @@ Implementation -
public fun create_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64, package_hash: vector<u8>, version: u64, enforced: bool) {
+
public fun create_proposal<DAOT: store>(sender: &signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64, package_hash: vector<u8>, version: u64, enforced: bool) {
     let witness = UpgradeModulePlugin{};
     let cap = DAOSpace::acquire_proposal_cap<DAOT, UpgradeModulePlugin>(&witness);
     let action = UpgradeModuleAction{
@@ -186,7 +186,7 @@
     DAOSpace::create_proposal<
         DAOT,
         UpgradeModulePlugin,
-        UpgradeModuleAction>(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
+        UpgradeModuleAction>(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
 }
 
@@ -200,7 +200,7 @@ -
public(script) fun create_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64, package_hash: vector<u8>, version: u64, enforced: bool)
+
public(script) fun create_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64, package_hash: vector<u8>, version: u64, enforced: bool)
 
@@ -209,8 +209,8 @@ Implementation -
public (script) fun create_proposal_entry <DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64, package_hash: vector<u8>, version: u64, enforced: bool) {
-    create_proposal<DAOT>(&sender, title, introduction, extend, action_delay, package_hash, version, enforced);
+
public (script) fun create_proposal_entry <DAOT: store>(sender: signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64, package_hash: vector<u8>, version: u64, enforced: bool) {
+    create_proposal<DAOT>(&sender, title, introduction, description, action_delay, package_hash, version, enforced);
 }
 
@@ -286,7 +286,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -295,8 +295,8 @@ Implementation -
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, UpgradeModulePlugin>(sender,required_caps(), title, introduction,  extend, action_delay);
+
public fun install_plugin_proposal<DAOT:store>(sender:&signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    InstallPluginProposalPlugin::create_proposal<DAOT, UpgradeModulePlugin>(sender,required_caps(), title, introduction,  description, action_delay);
 }
 
@@ -310,7 +310,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
 
@@ -319,8 +319,8 @@ Implementation -
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, extend: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
+
public (script) fun install_plugin_proposal_entry<DAOT:store>(sender:signer, title:vector<u8>, introduction:vector<u8>, description: vector<u8>, action_delay:u64){
+    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
 }
 
diff --git a/release/v12/source_maps/AnyMemberPlugin.mvsm b/release/v12/source_maps/AnyMemberPlugin.mvsm index b3f2257e..11d3036c 100644 Binary files a/release/v12/source_maps/AnyMemberPlugin.mvsm and b/release/v12/source_maps/AnyMemberPlugin.mvsm differ diff --git a/release/v12/source_maps/ConfigProposalPlugin.mvsm b/release/v12/source_maps/ConfigProposalPlugin.mvsm index d433c503..16e8ecb5 100644 Binary files a/release/v12/source_maps/ConfigProposalPlugin.mvsm and b/release/v12/source_maps/ConfigProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/DAOSpace.mvsm b/release/v12/source_maps/DAOSpace.mvsm index 5354ff2f..e16b0917 100644 Binary files a/release/v12/source_maps/DAOSpace.mvsm and b/release/v12/source_maps/DAOSpace.mvsm differ diff --git a/release/v12/source_maps/GasOracleProposalPlugin.mvsm b/release/v12/source_maps/GasOracleProposalPlugin.mvsm index 7381aadc..a4f38bde 100644 Binary files a/release/v12/source_maps/GasOracleProposalPlugin.mvsm and b/release/v12/source_maps/GasOracleProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/GrantProposalPlugin.mvsm b/release/v12/source_maps/GrantProposalPlugin.mvsm index 8f1250a4..59bd79bc 100644 Binary files a/release/v12/source_maps/GrantProposalPlugin.mvsm and b/release/v12/source_maps/GrantProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/InstallPluginProposalPlugin.mvsm b/release/v12/source_maps/InstallPluginProposalPlugin.mvsm index ee12064f..975f8525 100644 Binary files a/release/v12/source_maps/InstallPluginProposalPlugin.mvsm and b/release/v12/source_maps/InstallPluginProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/MemberProposalPlugin.mvsm b/release/v12/source_maps/MemberProposalPlugin.mvsm index b3485cbc..150ff421 100644 Binary files a/release/v12/source_maps/MemberProposalPlugin.mvsm and b/release/v12/source_maps/MemberProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/MintProposalPlugin.mvsm b/release/v12/source_maps/MintProposalPlugin.mvsm index 43d9c184..fb5c1baa 100644 Binary files a/release/v12/source_maps/MintProposalPlugin.mvsm and b/release/v12/source_maps/MintProposalPlugin.mvsm differ diff --git a/release/v12/source_maps/SBTVoteStrategy.mvsm b/release/v12/source_maps/SBTVoteStrategy.mvsm index 93c7dbb5..5567d6a4 100644 Binary files a/release/v12/source_maps/SBTVoteStrategy.mvsm and b/release/v12/source_maps/SBTVoteStrategy.mvsm differ diff --git a/release/v12/source_maps/StakeToSBTPlugin.mvsm b/release/v12/source_maps/StakeToSBTPlugin.mvsm index 1247500d..5c91f2d8 100644 Binary files a/release/v12/source_maps/StakeToSBTPlugin.mvsm and b/release/v12/source_maps/StakeToSBTPlugin.mvsm differ diff --git a/release/v12/source_maps/TreasuryPlugin.mvsm b/release/v12/source_maps/TreasuryPlugin.mvsm index 23a6f634..f72fe255 100644 Binary files a/release/v12/source_maps/TreasuryPlugin.mvsm and b/release/v12/source_maps/TreasuryPlugin.mvsm differ diff --git a/release/v12/source_maps/UpgradeModulePlugin.mvsm b/release/v12/source_maps/UpgradeModulePlugin.mvsm index b6f9cd1b..93dfd426 100644 Binary files a/release/v12/source_maps/UpgradeModulePlugin.mvsm and b/release/v12/source_maps/UpgradeModulePlugin.mvsm differ diff --git a/release/v12/sources/AnyMemberPlugin.move b/release/v12/sources/AnyMemberPlugin.move index 36fb4c45..1be55b99 100644 --- a/release/v12/sources/AnyMemberPlugin.move +++ b/release/v12/sources/AnyMemberPlugin.move @@ -1,4 +1,4 @@ -/// This plugin let every can join the DAO, and auto get 1 sbt. +//TODO find more good name module StarcoinFramework::AnyMemberPlugin{ use StarcoinFramework::DAOPluginMarketplace; use StarcoinFramework::DAOSpace::{Self, CapType}; @@ -62,12 +62,12 @@ module StarcoinFramework::AnyMemberPlugin{ join(&sender, image_data, image_url); } - public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/ConfigProposalPlugin.move b/release/v12/sources/ConfigProposalPlugin.move index be9d43af..2c1addfa 100644 --- a/release/v12/sources/ConfigProposalPlugin.move +++ b/release/v12/sources/ConfigProposalPlugin.move @@ -40,7 +40,7 @@ module StarcoinFramework::ConfigProposalPlugin { caps } - public fun create_proposal(sender: &signer, title:vector, introduction:vector, extend: vector,action_delay: u64, config: ConfigT) { + public fun create_proposal(sender: &signer, title:vector, introduction:vector, description: vector,action_delay: u64, config: ConfigT) { let witness = ConfigProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = ConfigProposalAction{ @@ -49,7 +49,7 @@ module StarcoinFramework::ConfigProposalPlugin { DAOSpace::create_proposal< DAOT, ConfigProposalPlugin, - ConfigProposalAction>(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + ConfigProposalAction>(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } public fun execute_proposal(sender: &signer, proposal_id: u64) { @@ -70,12 +70,12 @@ module StarcoinFramework::ConfigProposalPlugin { execute_proposal(&sender, proposal_id); } - public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/DAOSpace.move b/release/v12/sources/DAOSpace.move index b94b03f0..ef8850b7 100644 --- a/release/v12/sources/DAOSpace.move +++ b/release/v12/sources/DAOSpace.move @@ -1641,9 +1641,6 @@ module StarcoinFramework::DAOSpace { } /// propose a proposal. - /// `title`: title of the proposal - /// `introduction`: short introduction of the proposal - /// `extend`: extend of proposal , ipfs:// | { "title":"xxxxx",........ } /// `action`: the actual action to execute. /// `action_delay`: the delay to execute after the proposal is agreed /// `quorum_scale_factor`: used to scale up the base quorum_votes_rate. @@ -2101,7 +2098,7 @@ module StarcoinFramework::DAOSpace { let dao_address = dao_address(); assert!(exists>(dao_address), Errors::invalid_state(ERR_PROPOSAL_ACTIONS_NOT_EXIST)); let (_, token) = take_proposal_action(dao_address, proposal_id); - // Part of the token is awarded to whoever executes this method , current: 10 % + // Part of the token is awarded to whoever executes this method , TODO: 10 % let award_amount = Token::value(&token) / 10; let (burn_token , award_token) = Token::split(token, award_amount); Account::deposit(Signer::address_of(sender), award_token); diff --git a/release/v12/sources/GasOracleProposalPlugin.move b/release/v12/sources/GasOracleProposalPlugin.move index e6e7825b..97fb63cb 100644 --- a/release/v12/sources/GasOracleProposalPlugin.move +++ b/release/v12/sources/GasOracleProposalPlugin.move @@ -61,13 +61,13 @@ module StarcoinFramework::GasOracleProposalPlugin { caps } - public(script) fun create_oracle_add_proposal(sender: signer, title:vector, introduction:vector, extend: vector, action_delay: u64, source_address: address) { + public(script) fun create_oracle_add_proposal(sender: signer, title:vector, introduction:vector, description: vector, action_delay: u64, source_address: address) { let witness = GasOracleProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = OracleSourceAddAction{ source_address }; - DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, &sender, action, title, introduction, description, action_delay, Option::none()); } public(script) fun execute_oracle_add_proposal(sender: signer, proposal_id: u64) { @@ -89,13 +89,13 @@ module StarcoinFramework::GasOracleProposalPlugin { DAOSpace::save_to_storage(&storage_cap, OracleSources{ source_addresses }); } - public(script) fun create_oracle_remove_proposal(sender: signer, title:vector, introduction:vector, extend: vector, action_delay: u64, source_address: address) { + public(script) fun create_oracle_remove_proposal(sender: signer, title:vector, introduction:vector, description: vector, action_delay: u64, source_address: address) { let witness = GasOracleProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = OracleSourceRemoveAction{ source_address }; - DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, &sender, action, title, introduction, description, action_delay, Option::none()); } public(script) fun execute_oracle_remove_proposal(sender: signer, proposal_id: u64) { @@ -118,11 +118,11 @@ module StarcoinFramework::GasOracleProposalPlugin { PriceOracleAggregator::latest_price_average_aggregator>(&source_addresses, ORACLE_UPDATED_IN) } - public fun install_plugin_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, action_delay: u64) { - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender: &signer, title:vector, introduction:vector, description: vector, action_delay: u64) { + InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); } - public(script) fun install_plugin_proposal_entry(sender: signer, title:vector, introduction:vector, extend: vector, action_delay: u64) { - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public(script) fun install_plugin_proposal_entry(sender: signer, title:vector, introduction:vector, description: vector, action_delay: u64) { + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/GrantProposalPlugin.move b/release/v12/sources/GrantProposalPlugin.move index 8160dd35..af575704 100644 --- a/release/v12/sources/GrantProposalPlugin.move +++ b/release/v12/sources/GrantProposalPlugin.move @@ -1,3 +1,4 @@ +//TODO find more good name module StarcoinFramework::GrantProposalPlugin{ use StarcoinFramework::Errors; use StarcoinFramework::Option; @@ -60,7 +61,7 @@ module StarcoinFramework::GrantProposalPlugin{ const ERR_GRANTTREASURY_WITHDRAW_TOO_MORE :u64 = 102; const ERR_SENDER_NOT_SAME :u64 = 103; - public fun create_grant_proposal(sender: &signer, title:vector, introduction:vector, extend: vector,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){ + public fun create_grant_proposal(sender: &signer, title:vector, introduction:vector, description: vector,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){ let witness = GrantProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = GrantCreateAction{ @@ -69,11 +70,11 @@ module StarcoinFramework::GrantProposalPlugin{ start_time:start_time, period:period }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } - public (script) fun create_grant_proposal_entry(sender: signer, title:vector, introduction:vector, extend: vector,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){ - create_grant_proposal(&sender, title, introduction, extend, grantee, total, start_time, period, action_delay); + public (script) fun create_grant_proposal_entry(sender: signer, title:vector, introduction:vector, description: vector,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){ + create_grant_proposal(&sender, title, introduction, description, grantee, total, start_time, period, action_delay); } public fun execute_grant_proposal(sender: &signer, proposal_id: u64){ @@ -89,15 +90,15 @@ module StarcoinFramework::GrantProposalPlugin{ execute_grant_proposal(&sender, proposal_id); } - public fun create_grant_revoke_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, grantee:address, action_delay:u64){ + public fun create_grant_revoke_proposal(sender: &signer, title:vector, introduction:vector, description: vector, grantee:address, action_delay:u64){ let witness = GrantProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = GrantRevokeAction{ grantee }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } - public (script) fun create_grant_revoke_proposal_entry(sender: signer, title:vector, introduction:vector, extend: vector, grantee:address, action_delay:u64){ - create_grant_revoke_proposal(&sender, title, introduction, extend, grantee, action_delay); + public (script) fun create_grant_revoke_proposal_entry(sender: signer, title:vector, introduction:vector, description: vector, grantee:address, action_delay:u64){ + create_grant_revoke_proposal(&sender, title, introduction, description, grantee, action_delay); } public fun execute_grant_revoke_proposal(sender: &signer, proposal_id: u64){ @@ -112,12 +113,12 @@ module StarcoinFramework::GrantProposalPlugin{ execute_grant_revoke_proposal(&sender, proposal_id); } - public fun install_plugin_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender: &signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/InstallPluginProposalPlugin.move b/release/v12/sources/InstallPluginProposalPlugin.move index 6302cb5f..c9009ecd 100644 --- a/release/v12/sources/InstallPluginProposalPlugin.move +++ b/release/v12/sources/InstallPluginProposalPlugin.move @@ -1,3 +1,4 @@ +//TODO find more good name module StarcoinFramework::InstallPluginProposalPlugin{ use StarcoinFramework::Option; use StarcoinFramework::DAOPluginMarketplace; @@ -38,10 +39,8 @@ module StarcoinFramework::InstallPluginProposalPlugin{ caps } - /// Create a proposal to install a plugin. - /// We do not provide a entry function for create_proposal, because we can not use CapType as an entry function parameter, - /// every plugin should provide a entry function to create proposal to install self. - public fun create_proposal(sender: &signer, required_caps: vector, title:vector, introduction:vector, extend: vector, action_delay: u64){ + //TODO how to unify arguments. + public fun create_proposal(sender: &signer, required_caps: vector, title:vector, introduction:vector, description: vector, action_delay: u64){ let witness = InstallPluginProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); @@ -49,7 +48,7 @@ module StarcoinFramework::InstallPluginProposalPlugin{ required_caps, }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } public fun execute_proposal(sender: &signer, proposal_id: u64){ diff --git a/release/v12/sources/MemberProposalPlugin.move b/release/v12/sources/MemberProposalPlugin.move index 53e1146a..469b89aa 100644 --- a/release/v12/sources/MemberProposalPlugin.move +++ b/release/v12/sources/MemberProposalPlugin.move @@ -1,3 +1,4 @@ +//TODO find more good name module StarcoinFramework::MemberProposalPlugin{ use StarcoinFramework::Option; use StarcoinFramework::DAOPluginMarketplace; @@ -46,7 +47,7 @@ module StarcoinFramework::MemberProposalPlugin{ caps } - public fun create_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, member: address, image_data:vector, image_url:vector, init_sbt: u128, action_delay: u64){ + public fun create_proposal(sender: &signer, title:vector, introduction:vector, description: vector, member: address, image_data:vector, image_url:vector, init_sbt: u128, action_delay: u64){ let witness = MemberProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = MemberJoinAction{ @@ -57,11 +58,11 @@ module StarcoinFramework::MemberProposalPlugin{ }; assert!(!DAOSpace::is_exist_member_offer(member), Errors::already_published(ERR_MEMBER_OFFER_EXIST)); assert!(!DAOSpace::is_member(member), Errors::already_published(ERR_MEMBER_EXIST)); - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } - public (script) fun create_proposal_entry(sender: signer, title:vector, introduction:vector, extend: vector, member: address, image_data:vector, image_url:vector, init_sbt: u128, action_delay: u64){ - create_proposal(&sender, title, introduction, extend, member, image_data, image_url, init_sbt, action_delay); + public (script) fun create_proposal_entry(sender: signer, title:vector, introduction:vector, description: vector, member: address, image_data:vector, image_url:vector, init_sbt: u128, action_delay: u64){ + create_proposal(&sender, title, introduction, description, member, image_data, image_url, init_sbt, action_delay); } public fun execute_proposal(sender: &signer, proposal_id: u64){ @@ -86,12 +87,12 @@ module StarcoinFramework::MemberProposalPlugin{ execute_proposal(&sender, proposal_id); } - public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, extend: vector,action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, description: vector,action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/MintProposalPlugin.move b/release/v12/sources/MintProposalPlugin.move index 1d6a0180..5400999d 100644 --- a/release/v12/sources/MintProposalPlugin.move +++ b/release/v12/sources/MintProposalPlugin.move @@ -60,18 +60,18 @@ module StarcoinFramework::MintProposalPlugin{ delegate_token_mint_cap(&sender); } - public fun create_mint_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, receiver: address, amount: u128, action_delay: u64){ + public fun create_mint_proposal(sender: &signer, title:vector, introduction:vector, description: vector, receiver: address, amount: u128, action_delay: u64){ let witness = MintProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = MintTokenAction{ receiver, amount, }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } - public (script) fun create_mint_proposal_entry(sender: signer, title:vector, introduction:vector, extend: vector, receiver: address, amount: u128, action_delay: u64){ - create_mint_proposal(&sender, extend, title, introduction, receiver, amount, action_delay); + public (script) fun create_mint_proposal_entry(sender: signer, title:vector, introduction:vector, description: vector, receiver: address, amount: u128, action_delay: u64){ + create_mint_proposal(&sender, description, title, introduction, receiver, amount, action_delay); } public fun execute_mint_proposal(sender: &signer, proposal_id: u64){ @@ -87,12 +87,12 @@ module StarcoinFramework::MintProposalPlugin{ execute_mint_proposal(&sender, proposal_id); } - public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file diff --git a/release/v12/sources/SBTVoteStrategy.move b/release/v12/sources/SBTVoteStrategy.move index 8279771e..79605d13 100644 --- a/release/v12/sources/SBTVoteStrategy.move +++ b/release/v12/sources/SBTVoteStrategy.move @@ -9,6 +9,8 @@ module StarcoinFramework::SBTVoteStrategy{ /// deserialize snapshot vote value from state public fun get_voting_power(state: &vector) : u128 { let sbt_value = deserialize_sbt_value_from_bcs_state(state); + + //TODO support calculate weight_factor sbt_value } diff --git a/release/v12/sources/StakeToSBTPlugin.move b/release/v12/sources/StakeToSBTPlugin.move index 0cf1b71d..c8d4c9e0 100644 --- a/release/v12/sources/StakeToSBTPlugin.move +++ b/release/v12/sources/StakeToSBTPlugin.move @@ -243,19 +243,8 @@ module StarcoinFramework::StakeToSBTPlugin { id } - public(script) fun stake_entry( - sender: signer, - amount: u128, - lock_time: u64 - ) acquires StakeList { - let token = Account::withdraw(&sender, amount); - stake(&sender, token, lock_time); - } - - public fun query_stake( - member: address, - id: u64 - ): (u64, u64, u64, u128, u128) acquires StakeList { + public fun query_stake(member: address, id: u64) + : (u64, u64, u64, u128, u128) acquires StakeList { assert!(exists>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE)); let stake_list = borrow_global_mut>(member); let item_index = find_item(id, &stake_list.items); @@ -282,8 +271,7 @@ module StarcoinFramework::StakeToSBTPlugin { } /// Unstake from staking - public fun unstake_by_id(sender: &signer, id: u64) acquires StakeList { - let member = Signer::address_of(sender); + public fun unstake_by_id(member: address, id: u64) acquires StakeList { assert!(exists>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE)); let stake_list = borrow_global_mut>(member); let item_index = find_item(id, &stake_list.items); @@ -319,33 +307,21 @@ module StarcoinFramework::StakeToSBTPlugin { ); } - public(script) fun unstake_by_id_entry( - sender: signer, - id: u64 - ) acquires StakeList { - unstake_by_id(&sender, id); - } - - /// Unstake all staking items from sender, - /// No care whether the sender is member or not - public fun unstake_all(sender: &signer) acquires StakeList { - let sender_addr = Signer::address_of(sender); - assert!(exists>(sender_addr), Errors::not_published(ERR_PLUGIN_NOT_STAKE)); - let stake_list = borrow_global_mut>(sender_addr); + /// Unstake all staking items from member address, + /// No care whether the user is member or not + public fun unstake_all(member: address) acquires StakeList { + assert!(exists>(member), Errors::not_published(ERR_PLUGIN_NOT_STAKE)); + let stake_list = borrow_global_mut>(member); let len = Vector::length(&mut stake_list.items); let idx = 0; while (idx < len) { let item = Vector::remove(&mut stake_list.items, idx); - Account::deposit(sender_addr, unstake_item(sender_addr, item)); + Account::deposit(member, unstake_item(member, item)); idx = idx + 1; }; } - public(script) fun unstake_all_entry(sender: signer) acquires StakeList { - unstake_all(&sender); - } - /// Unstake a item from a item object fun unstake_item( member: address, @@ -458,7 +434,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - extend: vector, + description: vector, lock_time: u64, weight: u64, action_delay: u64 @@ -473,7 +449,7 @@ module StarcoinFramework::StakeToSBTPlugin { }, title, introduction, - extend, + description, action_delay, Option::none()); } @@ -482,12 +458,12 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - extend: vector, + description: vector, lock_time: u64, weight: u64, action_delay: u64 ) { - create_weight_proposal(&sender,title, introduction, extend, lock_time, weight, action_delay); + create_weight_proposal(&sender,title, introduction, description, lock_time, weight, action_delay); } public fun execute_weight_proposal( @@ -522,7 +498,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - extend: vector, + description: vector, action_delay: u64 ) { let witness = StakeToSBTPlugin {}; @@ -535,7 +511,7 @@ module StarcoinFramework::StakeToSBTPlugin { AcceptTokenCap {}, title, introduction, - extend, + description, action_delay, Option::none() ); @@ -545,10 +521,10 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - extend: vector, + description: vector, action_delay: u64 ) { - create_token_accept_proposal(&sender, title, introduction, extend, action_delay); + create_token_accept_proposal(&sender, title, introduction, description, action_delay); } public fun execute_token_accept_proposal( @@ -580,7 +556,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - extend: vector, + description: vector, action_delay: u64 ) { InstallPluginProposalPlugin::create_proposal( @@ -588,7 +564,7 @@ module StarcoinFramework::StakeToSBTPlugin { required_caps(), title, introduction, - extend, + description, action_delay ); } @@ -597,9 +573,27 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - extend: vector, + description: vector, action_delay: u64 ) { - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + install_plugin_proposal(&sender, title, introduction, description, action_delay); + } + + /// Called by script + public(script) fun stake_entry( + sender: signer, + amount: u128, + lock_time: u64 + ) acquires StakeList { + let token = Account::withdraw(&sender, amount); + stake(&sender, token, lock_time); + } + + /// Called by script + public(script) fun unstake_item_entry( + member: address, + id: u64 + ) acquires StakeList { + unstake_by_id(member, id); } } diff --git a/release/v12/sources/TreasuryPlugin.move b/release/v12/sources/TreasuryPlugin.move index dbc8d672..96d19922 100644 --- a/release/v12/sources/TreasuryPlugin.move +++ b/release/v12/sources/TreasuryPlugin.move @@ -91,7 +91,7 @@ module StarcoinFramework::TreasuryPlugin { sender: &signer, title:vector, introduction:vector, - extend: vector, + description: vector, receiver: address, amount: u128, period: u64, @@ -111,20 +111,20 @@ module StarcoinFramework::TreasuryPlugin { set_scale_factor_inner(0u8); }; let scale = DAOSpace::get_custom_config().scale; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::some(scale)); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::some(scale)); } public(script) fun create_withdraw_proposal_entry( sender: signer, title:vector, introduction:vector, - extend: vector, + description: vector, receiver: address, amount: u128, period: u64, action_delay: u64) { - create_withdraw_proposal(&sender, title, introduction, extend, receiver, amount, period, action_delay); + create_withdraw_proposal(&sender, title, introduction, description, receiver, amount, period, action_delay); } public fun execute_withdraw_proposal(sender: &signer, proposal_id: u64) acquires WithdrawCapabilityHolder { diff --git a/release/v12/sources/UpgradeModulePlugin.move b/release/v12/sources/UpgradeModulePlugin.move index 23f546de..7238c269 100644 --- a/release/v12/sources/UpgradeModulePlugin.move +++ b/release/v12/sources/UpgradeModulePlugin.move @@ -41,7 +41,7 @@ module StarcoinFramework::UpgradeModulePlugin { caps } - public fun create_proposal(sender: &signer, title:vector, introduction:vector, extend: vector, action_delay:u64, package_hash: vector, version: u64, enforced: bool) { + public fun create_proposal(sender: &signer, title:vector, introduction:vector, description: vector, action_delay:u64, package_hash: vector, version: u64, enforced: bool) { let witness = UpgradeModulePlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = UpgradeModuleAction{ @@ -52,11 +52,11 @@ module StarcoinFramework::UpgradeModulePlugin { DAOSpace::create_proposal< DAOT, UpgradeModulePlugin, - UpgradeModuleAction>(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); + UpgradeModuleAction>(&cap, sender, action, title, introduction, description, action_delay, Option::none()); } - public (script) fun create_proposal_entry (sender: signer, title:vector, introduction:vector, extend: vector, action_delay:u64, package_hash: vector, version: u64, enforced: bool) { - create_proposal(&sender, title, introduction, extend, action_delay, package_hash, version, enforced); + public (script) fun create_proposal_entry (sender: signer, title:vector, introduction:vector, description: vector, action_delay:u64, package_hash: vector, version: u64, enforced: bool) { + create_proposal(&sender, title, introduction, description, action_delay, package_hash, version, enforced); } public fun execute_proposal(sender: &signer, proposal_id: u64) { @@ -81,11 +81,11 @@ module StarcoinFramework::UpgradeModulePlugin { execute_proposal(&sender, proposal_id); } - public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, extend, action_delay); + public fun install_plugin_proposal(sender:&signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, description, action_delay); } - public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, extend: vector, action_delay:u64){ - install_plugin_proposal(&sender, title, introduction, extend, action_delay); + public (script) fun install_plugin_proposal_entry(sender:signer, title:vector, introduction:vector, description: vector, action_delay:u64){ + install_plugin_proposal(&sender, title, introduction, description, action_delay); } } \ No newline at end of file