Skip to content

Commit

Permalink
Remove proposal after executed or rejected
Browse files Browse the repository at this point in the history
  • Loading branch information
pause125 committed Sep 28, 2022
1 parent 25148a4 commit 64b12b4
Show file tree
Hide file tree
Showing 31 changed files with 101 additions and 95 deletions.
2 changes: 1 addition & 1 deletion build/StarcoinFramework/BuildInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ compiled_package_info:
? address: "0x00000000000000000000000000000001"
name: YieldFarmingV2
: StarcoinFramework
source_digest: 5F39868CB8511B5984EA5AFAC56DD524087DB8401BE9901148BA2CBF177357E4
source_digest: 1D12C56D29AC46078A871B5A02F4E3AA760DED30C97624E676DD2F230B194B2E
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.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@



<pre><code><b>struct</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>&lt;ToInstallPluginT&gt; <b>has</b> store
<pre><code><b>struct</b> <a href="InstallPluginProposalPlugin.md#0x1_InstallPluginProposalPlugin_InstallPluginAction">InstallPluginAction</a>&lt;ToInstallPluginT&gt; <b>has</b> drop, store
</code></pre>


Expand Down
2 changes: 1 addition & 1 deletion build/StarcoinFramework/docs/MemberProposalPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@



<pre><code><b>struct</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a> <b>has</b> store
<pre><code><b>struct</b> <a href="MemberProposalPlugin.md#0x1_MemberProposalPlugin_MemberJoinAction">MemberJoinAction</a> <b>has</b> drop, store
</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_ext.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 9 tasks

task 6 'run'. lines 56-65:
{
"gas_used": 1008684,
"gas_used": 1035755,
"status": "Executed"
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_grant.exp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ task 5 'run'. lines 13-21:

task 8 'run'. lines 123-134:
{
"gas_used": 1812265,
"gas_used": 1839336,
"status": "Executed"
}

Expand Down
42 changes: 21 additions & 21 deletions integration-tests/daospace/dao_proposal.exp
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
processed 42 tasks

task 7 'run'. lines 169-180:
task 7 'run'. lines 158-169:
{
"gas_used": 1809468,
"gas_used": 1836539,
"status": "Executed"
}

task 8 'run'. lines 182-196:
task 8 'run'. lines 171-185:
{
"gas_used": 109239,
"status": "Executed"
}

task 9 'run'. lines 198-223:
task 9 'run'. lines 187-212:
{
"gas_used": 306386,
"status": "Executed"
}

task 11 'run'. lines 228-244:
task 11 'run'. lines 217-233:
{
"gas_used": 239832,
"status": "Executed"
}

task 12 'run'. lines 246-262:
task 12 'run'. lines 235-251:
{
"gas_used": 239832,
"status": "Executed"
}

task 16 'run'. lines 270-284:
task 16 'run'. lines 259-273:
{
"gas_used": 104944,
"status": "Executed"
}

task 19 'run'. lines 291-304:
task 19 'run'. lines 280-293:
{
"gas_used": 532278,
"status": {
Expand All @@ -52,46 +52,46 @@ task 19 'run'. lines 291-304:
}
}

task 22 'run'. lines 311-322:
task 22 'run'. lines 300-311:
{
"gas_used": 577624,
"status": "Executed"
}

task 23 'run'. lines 325-349:
task 23 'run'. lines 314-338:
{
"gas_used": 476235,
"status": "Executed"
}

task 25 'run'. lines 353-362:
task 25 'run'. lines 342-351:
{
"gas_used": 11943,
"status": "Executed"
}

task 26 'call'. lines 364-364:
task 26 'call'. lines 353-353:
"0xb5d577dc9ce59725e29886632e69ecdf/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>>"

task 28 'run'. lines 368-387:
task 28 'run'. lines 357-376:
{
"gas_used": 6523189,
"status": "Executed"
}

task 29 'call'. lines 390-390:
task 29 'call'. lines 379-379:
"0xa7dcef9aef26202fce82a7c7d6672afb/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>>"

task 31 'run'. lines 394-407:
task 31 'run'. lines 383-396:
{
"gas_used": 6195892,
"status": "Executed"
}

task 32 'call'. lines 410-410:
task 32 'call'. lines 399-399:
"0x3d4926eeda5b14b0ac979269ee79e40e/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::DAOHelper::X>>"

task 34 'run'. lines 414-427:
task 34 'run'. lines 403-416:
{
"gas_used": 35135,
"status": {
Expand All @@ -107,20 +107,20 @@ task 34 'run'. lines 414-427:
}
}

task 36 'run'. lines 432-447:
task 36 'run'. lines 421-436:
{
"gas_used": 106454,
"status": "Executed"
}

task 39 'run'. lines 455-465:
task 39 'run'. lines 444-454:
{
"gas_used": 115442,
"status": "Executed"
}

task 41 'run'. lines 470-482:
task 41 'run'. lines 459-471:
{
"gas_used": 451300,
"gas_used": 461159,
"status": "Executed"
}
15 changes: 2 additions & 13 deletions integration-tests/daospace/dao_proposal.move
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//# init -n dev --debug
//# init -n dev

//// creator address is 0x662ba5a1a1da0f1c70a9762c7eeb7aaf
//# faucet --addr creator --amount 100000000000
Expand All @@ -10,17 +10,6 @@

//# faucet --addr cindy --amount 10000000000


////# run --signers creator
//script{
// use StarcoinFramework::StdlibUpgradeScripts;
//
// fun main(){
// StdlibUpgradeScripts::upgrade_from_v11_to_v12();
// }
//}
//// check: EXECUTED

//# publish
module creator::DAOHelper {
use StarcoinFramework::DAOPluginMarketplace;
Expand Down Expand Up @@ -73,7 +62,7 @@ module creator::DAOHelper {

struct XPlugin has store, drop{}

struct XAction<phantom TokenT> has store {
struct XAction<phantom TokenT> has store, drop {
total: u128,
receiver: address,
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_proposal_rejected.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 40 tasks

task 7 'run'. lines 126-135:
{
"gas_used": 1212834,
"gas_used": 1239905,
"status": {
"MoveAbort": {
"location": {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_proposal_rejected.move
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module creator::DAOHelper {

struct XPlugin has store, drop{}

struct XAction<phantom TokenT> has store {
struct XAction<phantom TokenT> has store, drop {
total: u128,
receiver: address,
}
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_upgrade.exp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ task 9 'run'. lines 130-144:

task 10 'run'. lines 145-154:
{
"gas_used": 1095207,
"gas_used": 1122278,
"status": "Executed"
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/dao_upgrade_incompatible.exp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task 9 'run'. lines 117-132:

task 10 'run'. lines 134-143:
{
"gas_used": 1095207,
"gas_used": 1122278,
"status": "Executed"
}

Expand Down
10 changes: 5 additions & 5 deletions integration-tests/daospace/stake_to_sbt_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 17 tasks

task 5 'run'. lines 71-79:
{
"gas_used": 1758694,
"gas_used": 1785765,
"status": "Executed"
}

Expand All @@ -14,7 +14,7 @@ task 6 'run'. lines 81-117:

task 7 'run'. lines 119-130:
{
"gas_used": 38522,
"gas_used": 38552,
"status": {
"MoveAbort": {
"location": {
Expand All @@ -30,7 +30,7 @@ task 7 'run'. lines 119-130:

task 9 'run'. lines 134-147:
{
"gas_used": 86636,
"gas_used": 249904,
"status": "Executed"
}

Expand All @@ -42,7 +42,7 @@ task 10 'run'. lines 149-165:

task 12 'run'. lines 169-182:
{
"gas_used": 220601,
"gas_used": 376669,
"status": "Executed"
}

Expand All @@ -54,7 +54,7 @@ task 13 'run'. lines 184-200:

task 15 'run'. lines 204-219:
{
"gas_used": 229566,
"gas_used": 238561,
"status": "Executed"
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/daospace/xdao.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 7 tasks

task 3 'run'. lines 54-61:
{
"gas_used": 1168270,
"gas_used": 1195341,
"status": "Executed"
}

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/daospaceplugin/mint_proposal_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ task 8 'run'. lines 71-85:

task 9 'run'. lines 87-96:
{
"gas_used": 1233206,
"gas_used": 1260277,
"status": "Executed"
}

Expand Down Expand Up @@ -76,6 +76,6 @@ task 26 'run'. lines 232-246:

task 28 'run'. lines 250-271:
{
"gas_used": 514254,
"gas_used": 524043,
"status": "Executed"
}
2 changes: 1 addition & 1 deletion integration-tests/daospaceplugin/salary_gov_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processed 21 tasks

task 7 'run'. lines 252-264:
{
"gas_used": 1767430,
"gas_used": 1794501,
"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 @@ -31,7 +31,7 @@ module creator::SalaryGovPlugin {
last_receive_time: u64,
}

struct BossProposalAction<phantom DAOT> has key, store {
struct BossProposalAction<phantom DAOT> has key, store, drop {
boss: address,
}

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/starcoin_dao/starcoin_onchain_config.exp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ task 38 'run'. lines 219-228:
"status": "Executed"
}

task 40 'run'. lines 232-248:
task 40 'run'. lines 232-247:
{
"gas_used": 495761,
"gas_used": 444489,
"status": "Executed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ script{
fun execute_proposal(sender: signer){
assert!(DAOSpace::proposal_state<StarcoinDAO>(1) == 7 , 103);
ConfigProposalPlugin::execute_proposal<StarcoinDAO, RewardConfig::RewardConfig>(&sender, 1);
assert!(DAOSpace::proposal_state<StarcoinDAO>(1) == 8 , 104);

assert!(RewardConfig::reward_delay() == 5, 105);

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/starcoin_dao/starcoin_upgrade_module.exp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ task 39 'run'. lines 227-236:
"status": "Executed"
}

task 41 'run'. lines 240-252:
task 41 'run'. lines 240-251:
{
"gas_used": 518637,
"gas_used": 467445,
"status": "Executed"
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ script{
fun execute_proposal(sender: signer){
assert!(DAOSpace::proposal_state<StarcoinDAO>(1) == 7 , 103);
UpgradeModulePlugin::execute_proposal<StarcoinDAO>(&sender, 1);
assert!(DAOSpace::proposal_state<StarcoinDAO>(1) == 8 , 103);
}
}
// check: EXECUTED
Expand Down
Loading

0 comments on commit 64b12b4

Please sign in to comment.