Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Script function entry #111

Merged
merged 5 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/StarcoinFramework/BuildInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ compiled_package_info:
? address: "0x00000000000000000000000000000001"
name: YieldFarmingV2
: StarcoinFramework
source_digest: B7532EE5E9C8A1193C77FE19E7AE49D681E650064C2BE33605779EE6B7E56BC6
source_digest: D7009E25679D370668CC815C5CF9F50E1CFFB3A9E058F2C9020F9C03179EF15A
build_flags:
dev_mode: false
test_mode: false
Expand Down
Binary file not shown.
Binary file modified build/StarcoinFramework/bytecode_modules/MemberProposalPlugin.mv
Binary file not shown.
31 changes: 28 additions & 3 deletions build/StarcoinFramework/docs/InstallPluginProposalPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Function `required_caps`](#0x1_InstallPluginProposalPlugin_required_caps)
- [Function `create_proposal`](#0x1_InstallPluginProposalPlugin_create_proposal)
- [Function `execute_proposal`](#0x1_InstallPluginProposalPlugin_execute_proposal)
- [Function `execute_proposal_entry`](#0x1_InstallPluginProposalPlugin_execute_proposal_entry)


<pre><code><b>use</b> <a href="DAOSpace.md#0x1_DAOSpace">0x1::DAOSpace</a>;
Expand Down Expand Up @@ -134,7 +135,7 @@



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: signer, proposal_id: u64)
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, proposal_id: u64)
</code></pre>


Expand All @@ -143,15 +144,39 @@
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: signer, proposal_id: u64){
<pre><code><b>public</b> <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store, ToInstallPluginT: store&gt;(sender: &signer, proposal_id: u64){
<b>let</b> witness = <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>{};
<b>let</b> proposal_cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_proposal_cap">DAOSpace::acquire_proposal_cap</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>&gt;(&witness);
<b>let</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>{required_caps} = <a href="DAOSpace.md#0x1_DAOSpace_execute_proposal">DAOSpace::execute_proposal</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>&lt;ToInstallPluginT&gt;&gt;(&proposal_cap, &sender, proposal_id);
<b>let</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>{required_caps} = <a href="DAOSpace.md#0x1_DAOSpace_execute_proposal">DAOSpace::execute_proposal</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>&lt;ToInstallPluginT&gt;&gt;(&proposal_cap, sender, proposal_id);
<b>let</b> install_plugin_cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_install_plugin_cap">DAOSpace::acquire_install_plugin_cap</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>&gt;(&witness);
<a href="DAOSpace.md#0x1_DAOSpace_install_plugin">DAOSpace::install_plugin</a>&lt;DAOT, <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin">InstallPluginProposalPlugin</a>, ToInstallPluginT&gt;(&install_plugin_cap, required_caps);
}
</code></pre>



</details>

<a name="0x1_InstallPluginProposalPlugin_execute_proposal_entry"></a>

## Function `execute_proposal_entry`



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal_entry">execute_proposal_entry</a>&lt;DAOT: store, ToInstallPluginT: <b>copy</b>, drop, store&gt;(sender: signer, proposal_id: u64)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal_entry">execute_proposal_entry</a>&lt;DAOT: store, ToInstallPluginT: <b>copy</b> + drop + store&gt;(sender: signer, proposal_id: u64) {
<a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT, ToInstallPluginT&gt;(&sender, proposal_id);
}
</code></pre>



</details>
93 changes: 84 additions & 9 deletions build/StarcoinFramework/docs/MemberProposalPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
- [Struct `MemberJoinAction`](#0x1_MemberProposalPlugin_MemberJoinAction)
- [Function `required_caps`](#0x1_MemberProposalPlugin_required_caps)
- [Function `create_proposal`](#0x1_MemberProposalPlugin_create_proposal)
- [Function `create_proposal_entry`](#0x1_MemberProposalPlugin_create_proposal_entry)
- [Function `execute_proposal`](#0x1_MemberProposalPlugin_execute_proposal)
- [Function `execute_proposal_entry`](#0x1_MemberProposalPlugin_execute_proposal_entry)
- [Function `install_plugin_proposal`](#0x1_MemberProposalPlugin_install_plugin_proposal)
- [Function `install_plugin_proposal_entry`](#0x1_MemberProposalPlugin_install_plugin_proposal_entry)


<pre><code><b>use</b> <a href="DAOSpace.md#0x1_DAOSpace">0x1::DAOSpace</a>;
Expand Down Expand Up @@ -125,7 +128,7 @@



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
</code></pre>


Expand All @@ -134,7 +137,7 @@
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
<b>let</b> witness = <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>{};
<b>let</b> cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_proposal_cap">DAOSpace::acquire_proposal_cap</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>&gt;(&witness);
<b>let</b> action = <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>{
Expand All @@ -143,7 +146,31 @@
image_data,
image_url
};
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, &sender, action, description, action_delay);
<a href="DAOSpace.md#0x1_DAOSpace_create_proposal">DAOSpace::create_proposal</a>(&cap, sender, action, description, action_delay);
}
</code></pre>



</details>

<a name="0x1_MemberProposalPlugin_create_proposal_entry"></a>

## Function `create_proposal_entry`



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data: vector&lt;u8&gt;, image_url: vector&lt;u8&gt;, init_sbt: u128, action_delay: u64)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal_entry">create_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, member: <b>address</b>, image_data:vector&lt;u8&gt;, image_url:vector&lt;u8&gt;, init_sbt: u128, action_delay: u64){
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_create_proposal">create_proposal</a>&lt;DAOT&gt;(&sender, description, member, image_data, image_url, init_sbt, action_delay);
}
</code></pre>

Expand All @@ -157,7 +184,7 @@



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store&gt;(sender: signer, proposal_id: u64)
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store&gt;(sender: &signer, proposal_id: u64)
</code></pre>


Expand All @@ -166,17 +193,41 @@
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store&gt;(sender: signer, proposal_id: u64){
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT: store&gt;(sender: &signer, proposal_id: u64){
<b>let</b> witness = <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>{};
<b>let</b> proposal_cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_proposal_cap">DAOSpace::acquire_proposal_cap</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>&gt;(&witness);
<b>let</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>{member, init_sbt, image_data, image_url} = <a href="DAOSpace.md#0x1_DAOSpace_execute_proposal">DAOSpace::execute_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(&proposal_cap, &sender, proposal_id);
<b>let</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>{member, init_sbt, image_data, image_url} = <a href="DAOSpace.md#0x1_DAOSpace_execute_proposal">DAOSpace::execute_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(&proposal_cap, sender, proposal_id);
<b>let</b> member_cap = <a href="DAOSpace.md#0x1_DAOSpace_acquire_member_cap">DAOSpace::acquire_member_cap</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin">MemberProposalPlugin</a>&gt;(&witness);
<a href="DAOSpace.md#0x1_DAOSpace_join_member">DAOSpace::join_member</a>(&member_cap, member, <a href="Option.md#0x1_Option_some">Option::some</a>(image_data), <a href="Option.md#0x1_Option_some">Option::some</a>(image_url) , init_sbt);
}
</code></pre>



</details>

<a name="0x1_MemberProposalPlugin_execute_proposal_entry"></a>

## Function `execute_proposal_entry`



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal_entry">execute_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, proposal_id: u64)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal_entry">execute_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, proposal_id: u64){
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_execute_proposal">execute_proposal</a>&lt;DAOT&gt;(&sender, proposal_id);
}
</code></pre>



</details>

<a name="0x1_MemberProposalPlugin_install_plugin_proposal"></a>
Expand All @@ -185,7 +236,31 @@



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, action_delay: u64)
<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT: store&gt;(sender: &signer, description: vector&lt;u8&gt;, action_delay: u64)
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b> <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT:store&gt;(sender:&signer, description: vector&lt;u8&gt;,action_delay:u64){
<a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">InstallPluginProposalPlugin::create_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(sender, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_required_caps">required_caps</a>(), description, action_delay);
}
</code></pre>



</details>

<a name="0x1_MemberProposalPlugin_install_plugin_proposal_entry"></a>

## Function `install_plugin_proposal_entry`



<pre><code><b>public</b>(<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT: store&gt;(sender: signer, description: vector&lt;u8&gt;, action_delay: u64)
</code></pre>


Expand All @@ -194,8 +269,8 @@
<summary>Implementation</summary>


<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT:store&gt;(sender:signer, description: vector&lt;u8&gt;,action_delay:u64){
<a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_create_proposal">InstallPluginProposalPlugin::create_proposal</a>&lt;DAOT, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a>&gt;(&sender, <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_required_caps">required_caps</a>(), description, action_delay);
<pre><code><b>public</b> (<b>script</b>) <b>fun</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal_entry">install_plugin_proposal_entry</a>&lt;DAOT:store&gt;(sender:signer, description: vector&lt;u8&gt;, action_delay:u64){
<a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_install_plugin_proposal">install_plugin_proposal</a>&lt;DAOT&gt;(&sender, description, action_delay);
}
</code></pre>

Expand Down
Binary file not shown.
Binary file modified build/StarcoinFramework/source_maps/MemberProposalPlugin.mvsm
Binary file not shown.
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_proposal.exp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ task 36 'run'. lines 408-429:

task 39 'run'. lines 437-447:
{
"gas_used": 115663,
"gas_used": 115064,
"status": "Executed"
}

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/daospace/dao_proposal.move
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ module creator::DAOHelper {
Account::deposit(receiver, token);
}

public fun queue_proposal_action<DAOT: store>(sender: &signer, proposal_id: u64){
DAOSpace::do_queue_proposal_action<DAOT>(sender, proposal_id);
public fun queue_proposal_action<DAOT: store>(_sender: &signer, proposal_id: u64){
DAOSpace::queue_proposal_action<DAOT>(proposal_id);
}

public fun member_join<DAOT:store>(to_address: address, init_sbt: u128){
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/daospaceplugin/mint_proposal_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ task 11 'run'. lines 110-123:

task 12 'run'. lines 125-139:
{
"gas_used": 264834,
"gas_used": 264828,
"status": "Executed"
}

Expand All @@ -55,7 +55,7 @@ task 19 'run'. lines 164-173:

task 20 'run'. lines 175-200:
{
"gas_used": 435660,
"gas_used": 435640,
"status": "Executed"
}

Expand All @@ -70,12 +70,12 @@ task 24 'run'. lines 208-222:

task 26 'run'. lines 226-240:
{
"gas_used": 173465,
"gas_used": 172880,
"status": "Executed"
}

task 28 'run'. lines 244-265:
{
"gas_used": 513504,
"gas_used": 513498,
"status": "Executed"
}
10 changes: 5 additions & 5 deletions integration-tests/daospaceplugin/mint_proposal_plugin.move
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ script {
IdentifierNFT::accept<DAOMember<XDAO>, DAOMemberBody<XDAO>>(&sender);
let image_data = b"image";
let image_url = b"";
AnyMemberPlugin::join<XDAO>(sender, image_data, image_url);
AnyMemberPlugin::join<XDAO>(&sender, image_data, image_url);
}
}
// check: EXECUTED
Expand Down Expand Up @@ -186,7 +186,7 @@ script {
let amount = 100000;
let action_delay = 0;
MintProposalPlugin::create_mint_proposal<XDAO, AliceToken>(
sender, description, @bob, amount, action_delay);
&sender, description, @bob, amount, action_delay);
let (_id, proposer, start_time, end_time, _yes_votes, _no_votes, _no_with_veto_votes, _abstain_votes, block_number, state_root) = DAOSpace::proposal_info<XDAO>(1);

Debug::print(&proposer);
Expand Down Expand Up @@ -229,11 +229,11 @@ script{
use StarcoinFramework::DAOSpace;

// execute action
fun queue_proposal_action(sender: signer){
fun queue_proposal_action(_sender: signer){
let proposal_id = 1;
let proposal_state = DAOSpace::proposal_state<XDAO>(proposal_id);
assert!(proposal_state == 4, 105); // DAOSpace::AGREED
DAOSpace::do_queue_proposal_action<XDAO>(&sender, proposal_id);
DAOSpace::queue_proposal_action<XDAO>(proposal_id);

}
}
Expand All @@ -257,7 +257,7 @@ script {
assert!(proposal_state == 6, 106); // DAOSpace::EXECUTABLE

let addr = Signer::address_of(&sender);
MintProposalPlugin::execute_mint_proposal<XDAO, AliceToken>(sender, proposal_id);
MintProposalPlugin::execute_mint_proposal<XDAO, AliceToken>(&sender, proposal_id);
let balance = Account::balance<AliceToken>(addr);
assert!(balance == 100000, 107);
assert!(Token::market_cap<AliceToken>() == balance, 108);
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/daospaceplugin/salary_gov_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ task 10 'run'. lines 254-269:

task 11 'run'. lines 272-283:
{
"gas_used": 393187,
"gas_used": 392604,
"status": "Executed"
}

task 13 'run'. lines 288-304:
{
"gas_used": 291420,
"gas_used": 290837,
"status": "Executed"
}

Expand All @@ -48,13 +48,13 @@ task 14 'run'. lines 307-317:

task 16 'run'. lines 321-338:
{
"gas_used": 454361,
"gas_used": 453778,
"status": "Executed"
}

task 18 'run'. lines 342-358:
{
"gas_used": 291420,
"gas_used": 290837,
"status": "Executed"
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospaceplugin/salary_gov_plugin.move
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ module creator::SalaryGovPlugin {
}

fun compute_salary_amount<DAOT: store, TokenT>(member: address): u128 acquires SalaryReceive {
let sbt_amount = DAOSpace::query_sbt<DAOT, SalaryGovPlugin>(member);
let sbt_amount = DAOSpace::query_sbt<DAOT>(member);
let receive = borrow_global<SalaryReceive<DAOT, TokenT>>(member);

sbt_amount * ((Timestamp::now_seconds() - receive.last_receive_time) as u128)
Expand Down
9 changes: 4 additions & 5 deletions sources/daospace/DAOSpace.move
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ module StarcoinFramework::DAOSpace {
}

/// Query amount of the member SBT
public fun query_sbt<DAOT: store, PluginT>(member_addr: address)
public fun query_sbt<DAOT: store>(member_addr: address)
: u128 acquires DAONFTUpdateCapHolder {
if (!is_member<DAOT>(member_addr)) {
return 0
Expand Down Expand Up @@ -1852,16 +1852,15 @@ module StarcoinFramework::DAOSpace {
}

/// queue agreed proposal to execute.
public(script) fun queue_proposal_action<DAOT:store>(
public(script) fun queue_proposal_action_entry<DAOT:store>(
_signer: signer,
proposal_id: u64,
) acquires GlobalProposalActions, GlobalProposals {
do_queue_proposal_action<DAOT>(&_signer, proposal_id)
queue_proposal_action<DAOT>(proposal_id)
}

/// queue agreed proposal to execute.
public fun do_queue_proposal_action<DAOT:store>(
_signer: &signer,
public fun queue_proposal_action<DAOT:store>(
proposal_id: u64,
) acquires GlobalProposalActions, GlobalProposals {
// Only agreed proposal can be submitted.
Expand Down
Loading