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

[Feature]Accept Offer and Accept NFT #192

Merged
merged 1 commit into from
Nov 2, 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
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