Skip to content

Commit

Permalink
Accept Offer and Accept NFT (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
WGB5445 committed Nov 2, 2022
1 parent 722a298 commit 19b7d1d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions integration-tests/daospace/dao_member_proposal.exp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ task 27 'run'. lines 182-192:
"status": "Executed"
}

task 28 'run'. lines 194-206:
task 28 'run'. lines 194-204:
{
"gas_used": 424219,
"gas_used": 424233,
"status": "Executed"
}
2 changes: 0 additions & 2 deletions integration-tests/daospace/dao_member_proposal.move
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,9 @@ script{
script{
use creator::DAOHelper::{X};
use StarcoinFramework::DAOSpace;
use StarcoinFramework::IdentifierNFT;

// execute action
fun join(sender: signer){
IdentifierNFT::accept<DAOSpace::DAOMember<X>,DAOSpace::DAOMemberBody<X>>(&sender);
DAOSpace::join_member_entry<X>(sender);
}
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/daospace/stake_to_sbt_plugin.exp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ task 5 'run'. lines 71-79:

task 6 'run'. lines 81-117:
{
"gas_used": 987007,
"gas_used": 983307,
"status": "Executed"
}

Expand Down Expand Up @@ -60,7 +60,7 @@ task 15 'run'. lines 204-219:

task 16 'run'. lines 221-232:
{
"gas_used": 638242,
"gas_used": 634542,
"status": {
"MoveAbort": {
"location": {
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/starcoin_dao/starcoin_onchain_config.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ processed 42 tasks

task 11 'run'. lines 23-37:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 12 'run'. lines 39-53:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 13 'run'. lines 55-69:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 14 'run'. lines 71-85:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

Expand Down
8 changes: 4 additions & 4 deletions integration-tests/starcoin_dao/starcoin_treasury_withdraw.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ processed 44 tasks

task 11 'run'. lines 23-37:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 12 'run'. lines 39-53:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 13 'run'. lines 55-69:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 14 'run'. lines 71-85:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

Expand Down
8 changes: 4 additions & 4 deletions integration-tests/starcoin_dao/starcoin_upgrade_module.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ processed 45 tasks

task 11 'run'. lines 23-37:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 12 'run'. lines 39-53:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 13 'run'. lines 55-69:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

task 14 'run'. lines 71-85:
{
"gas_used": 923321,
"gas_used": 919621,
"status": "Executed"
}

Expand Down
1 change: 1 addition & 0 deletions sources/daospace/DAOSpace.move
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ module StarcoinFramework::DAOSpace {
let dao_address = dao_address<DAOT>();
let op_index = Offer::find_offer<OfferMemeber<DAOT>>(dao_address, Signer::address_of(sender));
assert!(Option::is_some(&op_index),1003);
IdentifierNFT::accept<DAOMember<DAOT>, DAOMemberBody<DAOT>>(sender);
let memeber_event = borrow_global_mut<MemberEvent>(dao_address);
let OfferMemeber<DAOT> {
to_address,
Expand Down
2 changes: 0 additions & 2 deletions sources/daospaceplugin/StakeToSBTPlugin.move
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module StarcoinFramework::StakeToSBTPlugin {
use StarcoinFramework::Signer;
use StarcoinFramework::Timestamp;
use StarcoinFramework::InstallPluginProposalPlugin;
use StarcoinFramework::IdentifierNFT;

const ERR_PLUGIN_USER_IS_MEMBER: u64 = 1001;
const ERR_PLUGIN_HAS_STAKED: u64 = 1002;
Expand Down Expand Up @@ -187,7 +186,6 @@ module StarcoinFramework::StakeToSBTPlugin {
DAOSpace::acquire_member_cap<DAOT, StakeToSBTPlugin>(&witness);

if (!DAOSpace::is_member<DAOT>(sender_addr) ) {
IdentifierNFT::accept<DAOSpace::DAOMember<DAOT>, DAOSpace::DAOMemberBody<DAOT>>(sender);
DAOSpace::member_offer<DAOT, StakeToSBTPlugin>(
&member_cap,
sender_addr,
Expand Down

0 comments on commit 19b7d1d

Please sign in to comment.