Skip to content

Commit

Permalink
Revert "Accept Offer and Accept NFT (#192)"
Browse files Browse the repository at this point in the history
This reverts commit 19b7d1d.
  • Loading branch information
nkysg committed Mar 2, 2023
1 parent cafbef8 commit b35fa09
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 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-204:
task 28 'run'. lines 194-206:
{
"gas_used": 424233,
"gas_used": 424219,
"status": "Executed"
}
2 changes: 2 additions & 0 deletions integration-tests/daospace/dao_member_proposal.move
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ 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": 983307,
"gas_used": 987007,
"status": "Executed"
}

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

task 16 'run'. lines 221-232:
{
"gas_used": 634542,
"gas_used": 638242,
"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": 919621,
"gas_used": 923321,
"status": "Executed"
}

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

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

task 14 'run'. lines 71-85:
{
"gas_used": 919621,
"gas_used": 923321,
"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": 919621,
"gas_used": 923321,
"status": "Executed"
}

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

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

task 14 'run'. lines 71-85:
{
"gas_used": 919621,
"gas_used": 923321,
"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": 919621,
"gas_used": 923321,
"status": "Executed"
}

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

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

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

Expand Down
1 change: 0 additions & 1 deletion sources/daospace/DAOSpace.move
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ 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: 2 additions & 0 deletions sources/daospaceplugin/StakeToSBTPlugin.move
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ 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 @@ -186,6 +187,7 @@ 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 b35fa09

Please sign in to comment.