diff --git a/release/v12/BuildInfo.yaml b/release/v12/BuildInfo.yaml index 778af5fe..6c1f4789 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: E2AE9B65FA7E7B645BCC6FFF7E1C5A23CC82751DCC3A587627C198DC0F9119A0 + source_digest: E90F2F8FC8A933897A28C415C88680705ED69370B7BE7AE1025E9CE037CE07FC 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 fde5220e..4b6ed40a 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 27fb0ca0..ace4ad77 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 d6e7001c..1918610c 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 db6082d2..910f3cf1 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 252e0844..76515082 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 b8ac767f..888f0e89 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 5948f943..cc45a6d5 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 cefe2ab0..758eb187 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 feed6297..c91e8d19 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 49c94f29..0c8dfa4f 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 7de9e6c0..14cc604d 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 a40aee3c..dae9f166 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 e4f48fee..1681816e 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 476ae180..bff74a43 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 bf8a4c64..27336ed5 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 799c9415..1ba9cb2b 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 new file mode 100644 index 00000000..1791f37e Binary files /dev/null and b/release/v12/abis/StakeToSBTPlugin/unstake_all_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi b/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi new file mode 100644 index 00000000..746114b0 Binary files /dev/null and b/release/v12/abis/StakeToSBTPlugin/unstake_by_id_entry.abi differ diff --git a/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi b/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi deleted file mode 100644 index 031947a6..00000000 Binary files a/release/v12/abis/StakeToSBTPlugin/unstake_item_entry.abi and /dev/null differ diff --git a/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi b/release/v12/abis/TreasuryPlugin/create_withdraw_proposal_entry.abi index 599f4fe9..a39f0963 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 12cdf4e3..14cc34a3 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 f1ffd6bf..4609222c 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 a5eb208f..3e83c189 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 7cd9a83e..86aa150d 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 af5d2b1c..361fffc8 100644 --- a/release/v12/docs/AnyMemberPlugin.md +++ b/release/v12/docs/AnyMemberPlugin.md @@ -3,6 +3,7 @@ # Module `0x1::AnyMemberPlugin` +This plugin let every can join the DAO, and auto get 1 sbt. - [Struct `AnyMemberPlugin`](#0x1_AnyMemberPlugin_AnyMemberPlugin) @@ -190,7 +191,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
 
@@ -199,8 +200,8 @@ Implementation -
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);
+
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);
 }
 
@@ -214,7 +215,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
 
@@ -223,8 +224,8 @@ Implementation -
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);
+
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);
 }
 
diff --git a/release/v12/docs/ConfigProposalPlugin.md b/release/v12/docs/ConfigProposalPlugin.md index 5986f4d0..c4a1c97d 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>, description: vector<u8>, action_delay: u64, config: ConfigT)
+
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)
 
@@ -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>, description: vector<u8>,action_delay: u64, config: ConfigT) {
+
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) {
     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, description, action_delay, Option::none<u8>());
+        ConfigProposalAction<ConfigT>>(&cap, sender, action, title, introduction, extend, 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>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, ConfigProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
+
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);
 }
 
@@ -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>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/docs/DAOSpace.md b/release/v12/docs/DAOSpace.md index 55a9c15c..6fb137b7 100644 --- a/release/v12/docs/DAOSpace.md +++ b/release/v12/docs/DAOSpace.md @@ -6022,6 +6022,9 @@ 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. @@ -6760,7 +6763,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 , TODO: 10 % + // Part of the token is awarded to whoever executes this method , current: 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 1ca0042d..ac8efbf8 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, action_delay, Option::none<u8>());
 }
 
@@ -434,7 +434,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay: u64) {
-    InstallPluginProposalPlugin::create_proposal<DAOT, GasOracleProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
+
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);
 }
 
@@ -458,7 +458,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay: u64) {
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/docs/GrantProposalPlugin.md b/release/v12/docs/GrantProposalPlugin.md index 5ec8b7a5..fa054d8d 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, 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);
+
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);
 }
 
@@ -400,7 +400,7 @@ -
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)
+
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)
 
@@ -409,11 +409,11 @@ Implementation -
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){
+
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){
     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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, description: vector<u8>, grantee:address, action_delay:u64){
-    create_grant_revoke_proposal<DAOT, TokenT>(&sender, title, introduction, description, grantee, action_delay);
+
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);
 }
 
@@ -503,7 +503,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, GrantProposalPlugin>(sender, required_caps(), title, introduction, description, action_delay);
+
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);
 }
 
@@ -527,7 +527,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/docs/InstallPluginProposalPlugin.md b/release/v12/docs/InstallPluginProposalPlugin.md index 38e2e989..f42b9fb4 100644 --- a/release/v12/docs/InstallPluginProposalPlugin.md +++ b/release/v12/docs/InstallPluginProposalPlugin.md @@ -148,9 +148,12 @@ ## 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>, description: 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>, extend: vector<u8>, action_delay: u64)
 
@@ -159,7 +162,7 @@ Implementation -
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){
+
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){
     let witness = InstallPluginProposalPlugin{};
 
     let cap = DAOSpace::acquire_proposal_cap<DAOT, InstallPluginProposalPlugin>(&witness);
@@ -167,7 +170,7 @@
         required_caps,
     };
 
-    DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none<u8>());
 }
 
diff --git a/release/v12/docs/MemberProposalPlugin.md b/release/v12/docs/MemberProposalPlugin.md index 5b614ef6..818e6e9c 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, 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);
+
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);
 }
 
@@ -317,7 +317,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>,action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, MemberJoinAction>(sender, required_caps(), title, introduction, description, action_delay);
+
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);
 }
 
@@ -341,7 +341,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/docs/MintProposalPlugin.md b/release/v12/docs/MintProposalPlugin.md index e393609f..e9db71ee 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+    DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, description: vector<u8>, receiver: address, amount: u128, action_delay: u64){
-    create_mint_proposal<DAOT, TokenT>(&sender, description, 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>, extend: vector<u8>, receiver: address, amount: u128, action_delay: u64){
+    create_mint_proposal<DAOT, TokenT>(&sender, extend, 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>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, MintProposalPlugin>(sender,required_caps(), title, introduction,  description, action_delay);
+
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);
 }
 
@@ -372,7 +372,7 @@ MintToken request. -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/docs/SBTVoteStrategy.md b/release/v12/docs/SBTVoteStrategy.md index 13785739..58523ec1 100644 --- a/release/v12/docs/SBTVoteStrategy.md +++ b/release/v12/docs/SBTVoteStrategy.md @@ -48,8 +48,6 @@ 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 68922dfa..c2b828fd 100644 --- a/release/v12/docs/StakeToSBTPlugin.md +++ b/release/v12/docs/StakeToSBTPlugin.md @@ -23,10 +23,13 @@ - [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) @@ -42,8 +45,6 @@ - [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;
@@ -845,6 +846,35 @@ 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);
+}
+
+ + +
@@ -862,8 +892,10 @@ 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);
@@ -921,7 +953,7 @@ Query stake count from stake list
 Unstake from staking
 
 
-
public fun unstake_by_id<DAOT: store, TokenT: store>(member: address, id: u64)
+
public fun unstake_by_id<DAOT: store, TokenT: store>(sender: &signer, id: u64)
 
@@ -930,7 +962,8 @@ Unstake from staking Implementation -
public fun unstake_by_id<DAOT: store, TokenT: store>(member: address, id: u64) acquires StakeList {
+
public fun unstake_by_id<DAOT: store, TokenT: store>(sender: &signer, id: u64) acquires StakeList {
+    let member = Signer::address_of(sender);
     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);
@@ -969,17 +1002,44 @@ 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 member address, -No care whether the user is member or not +Unstake all staking items from sender, +No care whether the sender is member or not -
public fun unstake_all<DAOT: store, TokenT: store>(member: address)
+
public fun unstake_all<DAOT: store, TokenT: store>(sender: &signer)
 
@@ -988,15 +1048,16 @@ No care whether the user is member or not Implementation -
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);
+
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);
     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(member, unstake_item<DAOT, TokenT>(member, item));
+        Account::deposit(sender_addr, unstake_item<DAOT, TokenT>(sender_addr, item));
         idx = idx + 1;
     };
 }
@@ -1004,6 +1065,30 @@ No care whether the user 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);
+}
+
+ + +
@@ -1220,7 +1305,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>, description: 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>, extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
 
@@ -1233,7 +1318,7 @@ Create proposal that to specific a weight for a locktime sender: &signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64 @@ -1248,7 +1333,7 @@ Create proposal that to specific a weight for a locktime }, title, introduction, - description, + extend, action_delay, Option::none<u8>()); } @@ -1264,7 +1349,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>, description: 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>, extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64)
 
@@ -1277,12 +1362,12 @@ Create proposal that to specific a weight for a locktime sender: signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, lock_time: u64, weight: u64, action_delay: u64 ) { - create_weight_proposal<DAOT, TokenT>(&sender,title, introduction, description, lock_time, weight, action_delay); + create_weight_proposal<DAOT, TokenT>(&sender,title, introduction, extend, lock_time, weight, action_delay); }
@@ -1364,7 +1449,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>, description: vector<u8>, action_delay: u64)
+
public fun create_token_accept_proposal<DAOT: store, TokenT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
 
@@ -1377,7 +1462,7 @@ Create proposal that to accept a token type, which allow user to convert amount sender: &signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, action_delay: u64 ) { let witness = StakeToSBTPlugin {}; @@ -1390,7 +1475,7 @@ Create proposal that to accept a token type, which allow user to convert amount AcceptTokenCap<DAOT, TokenT> {}, title, introduction, - description, + extend, action_delay, Option::none<u8>() ); @@ -1407,7 +1492,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>, description: 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>, extend: vector<u8>, action_delay: u64)
 
@@ -1420,10 +1505,10 @@ Create proposal that to accept a token type, which allow user to convert amount sender: signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, action_delay: u64 ) { - create_token_accept_proposal<DAOT, TokenT>(&sender, title, introduction, description, action_delay); + create_token_accept_proposal<DAOT, TokenT>(&sender, title, introduction, extend, action_delay); }
@@ -1501,7 +1586,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>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
 
@@ -1514,7 +1599,7 @@ Create proposal that to accept a token type, which allow user to convert amount sender: &signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, action_delay: u64 ) { InstallPluginProposalPlugin::create_proposal<DAOT, StakeToSBTPlugin>( @@ -1522,7 +1607,7 @@ Create proposal that to accept a token type, which allow user to convert amount required_caps(), title, introduction, - description, + extend, action_delay ); } @@ -1538,7 +1623,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>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: vector<u8>, action_delay: u64)
 
@@ -1551,68 +1636,10 @@ Create proposal that to accept a token type, which allow user to convert amount sender: signer, title:vector<u8>, introduction:vector<u8>, - description: vector<u8>, + extend: vector<u8>, action_delay: u64 ) { - 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);
+    install_plugin_proposal<DAOT>(&sender, title, introduction, extend, action_delay);
 }
 
diff --git a/release/v12/docs/TreasuryPlugin.md b/release/v12/docs/TreasuryPlugin.md index 9d835b05..8821d43a 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>, description: 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>, extend: 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>, - description: vector<u8>, + extend: 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, description, action_delay, Option::some(scale)); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, - description: vector<u8>, + extend: vector<u8>, receiver: address, amount: u128, period: u64, action_delay: u64) { - create_withdraw_proposal<DAOT, TokenT>(&sender, title, introduction, description, receiver, amount, period, action_delay); + create_withdraw_proposal<DAOT, TokenT>(&sender, title, introduction, extend, receiver, amount, period, action_delay); }
diff --git a/release/v12/docs/UpgradeModulePlugin.md b/release/v12/docs/UpgradeModulePlugin.md index 63a3eeca..db2dd9fd 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>, description: 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>, extend: 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>, description: 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>, extend: 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, description, action_delay, Option::none<u8>());
+        UpgradeModuleAction>(&cap, sender, action, title, introduction, extend, 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>, description: 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>, extend: 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>, 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);
+
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);
 }
 
@@ -286,7 +286,7 @@ -
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public fun install_plugin_proposal<DAOT: store>(sender: &signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    InstallPluginProposalPlugin::create_proposal<DAOT, UpgradeModulePlugin>(sender,required_caps(), title, introduction,  description, action_delay);
+
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);
 }
 
@@ -310,7 +310,7 @@ -
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, description: vector<u8>, action_delay: u64)
+
public(script) fun install_plugin_proposal_entry<DAOT: store>(sender: signer, title: vector<u8>, introduction: vector<u8>, extend: 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>, description: vector<u8>, action_delay:u64){
-    install_plugin_proposal<DAOT>(&sender, title, introduction, description, action_delay);
+
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);
 }
 
diff --git a/release/v12/source_maps/AnyMemberPlugin.mvsm b/release/v12/source_maps/AnyMemberPlugin.mvsm index 11d3036c..b3f2257e 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 16e8ecb5..d433c503 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 e16b0917..5354ff2f 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 a4f38bde..7381aadc 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 59bd79bc..8f1250a4 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 975f8525..ee12064f 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 150ff421..b3485cbc 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 fb5c1baa..43d9c184 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 5567d6a4..93c7dbb5 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 5c91f2d8..1247500d 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 f72fe255..23a6f634 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 93dfd426..b6f9cd1b 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 1be55b99..36fb4c45 100644 --- a/release/v12/sources/AnyMemberPlugin.move +++ b/release/v12/sources/AnyMemberPlugin.move @@ -1,4 +1,4 @@ -//TODO find more good name +/// This plugin let every can join the DAO, and auto get 1 sbt. 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, description: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); + 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 (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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/ConfigProposalPlugin.move b/release/v12/sources/ConfigProposalPlugin.move index 2c1addfa..be9d43af 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, description: vector,action_delay: u64, config: ConfigT) { + public fun create_proposal(sender: &signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + ConfigProposalAction>(&cap, sender, action, title, introduction, extend, 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, description: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); + 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 (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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/DAOSpace.move b/release/v12/sources/DAOSpace.move index ef8850b7..b94b03f0 100644 --- a/release/v12/sources/DAOSpace.move +++ b/release/v12/sources/DAOSpace.move @@ -1641,6 +1641,9 @@ 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. @@ -2098,7 +2101,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 , TODO: 10 % + // Part of the token is awarded to whoever executes this method , current: 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 97fb63cb..e6e7825b 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, description: vector, action_delay: u64, source_address: address) { + public(script) fun create_oracle_add_proposal(sender: signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, 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, description: vector, action_delay: u64, source_address: address) { + public(script) fun create_oracle_remove_proposal(sender: signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, &sender, action, title, introduction, extend, 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, description: vector, action_delay: u64) { - InstallPluginProposalPlugin::create_proposal(sender, required_caps(), title, introduction, description, action_delay); + 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(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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/GrantProposalPlugin.move b/release/v12/sources/GrantProposalPlugin.move index af575704..8160dd35 100644 --- a/release/v12/sources/GrantProposalPlugin.move +++ b/release/v12/sources/GrantProposalPlugin.move @@ -1,4 +1,3 @@ -//TODO find more good name module StarcoinFramework::GrantProposalPlugin{ use StarcoinFramework::Errors; use StarcoinFramework::Option; @@ -61,7 +60,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, description: vector,grantee: address, total: u128, start_time:u64, period: u64, action_delay:u64){ + 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){ let witness = GrantProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = GrantCreateAction{ @@ -70,11 +69,11 @@ module StarcoinFramework::GrantProposalPlugin{ start_time:start_time, period:period }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); } - 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 (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 fun execute_grant_proposal(sender: &signer, proposal_id: u64){ @@ -90,15 +89,15 @@ module StarcoinFramework::GrantProposalPlugin{ execute_grant_proposal(&sender, proposal_id); } - public fun create_grant_revoke_proposal(sender: &signer, title:vector, introduction:vector, description: vector, grantee:address, action_delay:u64){ + public fun create_grant_revoke_proposal(sender: &signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); } - 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 (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 fun execute_grant_revoke_proposal(sender: &signer, proposal_id: u64){ @@ -113,12 +112,12 @@ module StarcoinFramework::GrantProposalPlugin{ execute_grant_revoke_proposal(&sender, proposal_id); } - 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 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 (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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/InstallPluginProposalPlugin.move b/release/v12/sources/InstallPluginProposalPlugin.move index c9009ecd..6302cb5f 100644 --- a/release/v12/sources/InstallPluginProposalPlugin.move +++ b/release/v12/sources/InstallPluginProposalPlugin.move @@ -1,4 +1,3 @@ -//TODO find more good name module StarcoinFramework::InstallPluginProposalPlugin{ use StarcoinFramework::Option; use StarcoinFramework::DAOPluginMarketplace; @@ -39,8 +38,10 @@ module StarcoinFramework::InstallPluginProposalPlugin{ caps } - //TODO how to unify arguments. - public fun create_proposal(sender: &signer, required_caps: vector, title:vector, introduction:vector, description: vector, action_delay: u64){ + /// 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){ let witness = InstallPluginProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); @@ -48,7 +49,7 @@ module StarcoinFramework::InstallPluginProposalPlugin{ required_caps, }; - DAOSpace::create_proposal(&cap, sender, action, title, introduction, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, 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 469b89aa..53e1146a 100644 --- a/release/v12/sources/MemberProposalPlugin.move +++ b/release/v12/sources/MemberProposalPlugin.move @@ -1,4 +1,3 @@ -//TODO find more good name module StarcoinFramework::MemberProposalPlugin{ use StarcoinFramework::Option; use StarcoinFramework::DAOPluginMarketplace; @@ -47,7 +46,7 @@ module StarcoinFramework::MemberProposalPlugin{ caps } - 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){ + 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){ let witness = MemberProposalPlugin{}; let cap = DAOSpace::acquire_proposal_cap(&witness); let action = MemberJoinAction{ @@ -58,11 +57,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, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); } - 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 (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 fun execute_proposal(sender: &signer, proposal_id: u64){ @@ -87,12 +86,12 @@ module StarcoinFramework::MemberProposalPlugin{ execute_proposal(&sender, proposal_id); } - 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 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 (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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/MintProposalPlugin.move b/release/v12/sources/MintProposalPlugin.move index 5400999d..1d6a0180 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, description: vector, receiver: address, amount: u128, action_delay: u64){ + public fun create_mint_proposal(sender: &signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); } - 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 (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 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, description: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, description, action_delay); + 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 (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); + 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); } } \ No newline at end of file diff --git a/release/v12/sources/SBTVoteStrategy.move b/release/v12/sources/SBTVoteStrategy.move index 79605d13..8279771e 100644 --- a/release/v12/sources/SBTVoteStrategy.move +++ b/release/v12/sources/SBTVoteStrategy.move @@ -9,8 +9,6 @@ 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 c8d4c9e0..0cf1b71d 100644 --- a/release/v12/sources/StakeToSBTPlugin.move +++ b/release/v12/sources/StakeToSBTPlugin.move @@ -243,8 +243,19 @@ module StarcoinFramework::StakeToSBTPlugin { id } - public fun query_stake(member: address, id: u64) - : (u64, u64, u64, u128, u128) acquires StakeList { + 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 { 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); @@ -271,7 +282,8 @@ module StarcoinFramework::StakeToSBTPlugin { } /// Unstake from staking - public fun unstake_by_id(member: address, id: u64) acquires StakeList { + public fun unstake_by_id(sender: &signer, id: u64) acquires StakeList { + let member = Signer::address_of(sender); 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); @@ -307,21 +319,33 @@ module StarcoinFramework::StakeToSBTPlugin { ); } - /// 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); + 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); 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(member, unstake_item(member, item)); + Account::deposit(sender_addr, unstake_item(sender_addr, 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, @@ -434,7 +458,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - description: vector, + extend: vector, lock_time: u64, weight: u64, action_delay: u64 @@ -449,7 +473,7 @@ module StarcoinFramework::StakeToSBTPlugin { }, title, introduction, - description, + extend, action_delay, Option::none()); } @@ -458,12 +482,12 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - description: vector, + extend: vector, lock_time: u64, weight: u64, action_delay: u64 ) { - create_weight_proposal(&sender,title, introduction, description, lock_time, weight, action_delay); + create_weight_proposal(&sender,title, introduction, extend, lock_time, weight, action_delay); } public fun execute_weight_proposal( @@ -498,7 +522,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - description: vector, + extend: vector, action_delay: u64 ) { let witness = StakeToSBTPlugin {}; @@ -511,7 +535,7 @@ module StarcoinFramework::StakeToSBTPlugin { AcceptTokenCap {}, title, introduction, - description, + extend, action_delay, Option::none() ); @@ -521,10 +545,10 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - description: vector, + extend: vector, action_delay: u64 ) { - create_token_accept_proposal(&sender, title, introduction, description, action_delay); + create_token_accept_proposal(&sender, title, introduction, extend, action_delay); } public fun execute_token_accept_proposal( @@ -556,7 +580,7 @@ module StarcoinFramework::StakeToSBTPlugin { sender: &signer, title:vector, introduction:vector, - description: vector, + extend: vector, action_delay: u64 ) { InstallPluginProposalPlugin::create_proposal( @@ -564,7 +588,7 @@ module StarcoinFramework::StakeToSBTPlugin { required_caps(), title, introduction, - description, + extend, action_delay ); } @@ -573,27 +597,9 @@ module StarcoinFramework::StakeToSBTPlugin { sender: signer, title:vector, introduction:vector, - description: vector, + extend: vector, action_delay: u64 ) { - 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); + install_plugin_proposal(&sender, title, introduction, extend, action_delay); } } diff --git a/release/v12/sources/TreasuryPlugin.move b/release/v12/sources/TreasuryPlugin.move index 96d19922..dbc8d672 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, - description: vector, + extend: 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, description, action_delay, Option::some(scale)); + DAOSpace::create_proposal(&cap, sender, action, title, introduction, extend, action_delay, Option::some(scale)); } public(script) fun create_withdraw_proposal_entry( sender: signer, title:vector, introduction:vector, - description: vector, + extend: vector, receiver: address, amount: u128, period: u64, action_delay: u64) { - create_withdraw_proposal(&sender, title, introduction, description, receiver, amount, period, action_delay); + create_withdraw_proposal(&sender, title, introduction, extend, 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 7238c269..23f546de 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, description: vector, action_delay:u64, package_hash: vector, version: u64, enforced: bool) { + public fun create_proposal(sender: &signer, title:vector, introduction:vector, extend: 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, description, action_delay, Option::none()); + UpgradeModuleAction>(&cap, sender, action, title, introduction, extend, action_delay, Option::none()); } - 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 (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 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, description: vector, action_delay:u64){ - InstallPluginProposalPlugin::create_proposal(sender,required_caps(), title, introduction, description, action_delay); + 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 (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); + 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); } } \ No newline at end of file