Skip to content

Commit

Permalink
add dao create
Browse files Browse the repository at this point in the history
  • Loading branch information
WGB5445 committed Sep 29, 2022
1 parent 5c80de1 commit e650877
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
25 changes: 25 additions & 0 deletions integration-tests/daospace/dao_create.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
processed 13 tasks

task 5 'run'. lines 11-19:
{
"gas_used": 791553,
"status": "Executed"
}

task 7 'run'. lines 23-30:
{
"gas_used": 10191,
"status": "Executed"
}

task 9 'run'. lines 70-78:
{
"gas_used": 79013,
"status": "Executed"
}

task 12 'run'. lines 84-95:
{
"gas_used": 1054663,
"status": "Executed"
}
17 changes: 15 additions & 2 deletions integration-tests/daospace/dao_create.move
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,29 @@ module 0xbf3a917cf4fb6425b95cc12763e6038b::XDAO {
}
}

//# run --signers alice --args {{$.package[0].package_hash}}
script{
use StarcoinFramework::DAOAccount;

fun main(sender: signer, package_hash: vector<u8>){
DAOAccount::submit_upgrade_plan_entry(sender, package_hash, 1, false);
}
}
// check: EXECUTED

//# block --author=0x3 --timestamp 90240000

//# deploy {{$.package[0].file}} --signers alice

//# run --signers alice
script{
use StarcoinFramework::XDAO;
use StarcoinFramework::DAOSpace;
use StarcoinFramework::IdentifierNFT;
use 0xbf3a917cf4fb6425b95cc12763e6038b::XDAO::{Self, X};

fun main(sender: signer){
XDAO::create_new_proposal_dao(sender, 1000, 1000, 1000, 1000, 1000);
IdentifierNFT::accept<DAOSpace::DAOMember<X>, DAOSpace::DAOMemberBody<X>>(&sender);
XDAO::create_new_proposal_dao(sender, 1000, 1000, 1, 1000, 1000);
}
}
// check: EXECUTED

0 comments on commit e650877

Please sign in to comment.