From cafbef87ecabc61ec1bdec4e531843585431f395 Mon Sep 17 00:00:00 2001 From: nk_ysg Date: Thu, 2 Mar 2023 16:15:17 +0800 Subject: [PATCH] Revert "[daospace] Refactor daospace functions name (#195)" This reverts commit 0dd5c685ad817e40b16a4a2f82fadbe4d193f464. --- .../bytecode_modules/MemberProposalPlugin.mv | Bin 1741 -> 1735 bytes .../docs/MemberProposalPlugin.md | 2 +- .../source_maps/MemberProposalPlugin.mvsm | Bin 9744 -> 9744 bytes .../daospace/dao_member_proposal.exp | 2 +- .../daospace/dao_member_proposal.move | 2 +- .../daospaceplugin/gas_oracle_plugin.exp | 2 +- .../daospaceplugin/mint_proposal_plugin.exp | 2 +- sources/daospace/DAOSpace.move | 56 ++++++++---------- sources/daospaceplugin/AnyMemberPlugin.move | 11 ++-- .../GasOracleProposalPlugin.move | 14 ++--- .../daospaceplugin/MemberProposalPlugin.move | 2 +- sources/daospaceplugin/StakeToSBTPlugin.move | 4 +- 12 files changed, 45 insertions(+), 52 deletions(-) diff --git a/build/StarcoinFramework/bytecode_modules/MemberProposalPlugin.mv b/build/StarcoinFramework/bytecode_modules/MemberProposalPlugin.mv index a5eb208fcfe40b8a1356c4694c1cf416eb9fcf47..53a7982ad9b57d52b7b45cc4e2e948a40b8ffaab 100644 GIT binary patch delta 35 rcmX@hdz^QIyx<`gjs{Kvwh5eVj9k;Wgm_kLG!SNCCyx<8Ijy6sKwrQMgj9hcLgm~6%G!SNC7s@OyE=`T!?84H_1OWEC3!?x4 diff --git a/build/StarcoinFramework/docs/MemberProposalPlugin.md b/build/StarcoinFramework/docs/MemberProposalPlugin.md index 5b614ef6..43ab9fb9 100644 --- a/build/StarcoinFramework/docs/MemberProposalPlugin.md +++ b/build/StarcoinFramework/docs/MemberProposalPlugin.md @@ -279,7 +279,7 @@ }else{ Option::some(image_url) }; - DAOSpace::issue_member_offer(&member_cap, member,op_image_data , op_image_url , init_sbt); + DAOSpace::member_offer(&member_cap, member,op_image_data , op_image_url , init_sbt); } diff --git a/build/StarcoinFramework/source_maps/MemberProposalPlugin.mvsm b/build/StarcoinFramework/source_maps/MemberProposalPlugin.mvsm index 150ff421ff18c7e8ff9fce3c313948efbcfe22c2..67138a88bfcbe11aef9c7f0c6c3d234aac419ed0 100644 GIT binary patch literal 9744 zcmb7}d2Ccw6o=o?cDe#BlpU4DvM+5Z5(tY0+6a-fP{ak}WXg;%&{>>LgBT1*Kp-}d z5KLr=5R+nC;)19M#9%CvphgiI6=hK(i3Va7At18&J<28g_q#*#{X@Td-n;Lfd*3

aI*u~~JaGR%PyVc6xH=fG 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 JCFTza&i`U}%Ci6f diff --git a/integration-tests/daospace/dao_member_proposal.exp b/integration-tests/daospace/dao_member_proposal.exp index 2a085eac..a2ac3913 100644 --- a/integration-tests/daospace/dao_member_proposal.exp +++ b/integration-tests/daospace/dao_member_proposal.exp @@ -8,7 +8,7 @@ task 8 'run'. lines 71-80: task 10 'run'. lines 84-91: { - "gas_used": 608438, + "gas_used": 378392, "status": "Executed" } diff --git a/integration-tests/daospace/dao_member_proposal.move b/integration-tests/daospace/dao_member_proposal.move index 0169934a..ae74a7d2 100644 --- a/integration-tests/daospace/dao_member_proposal.move +++ b/integration-tests/daospace/dao_member_proposal.move @@ -198,7 +198,7 @@ script{ // execute action fun join(sender: signer){ - DAOSpace::accept_member_offer_entry(sender); + DAOSpace::join_member_entry(sender); } } // check: EXECUTED \ No newline at end of file diff --git a/integration-tests/daospaceplugin/gas_oracle_plugin.exp b/integration-tests/daospaceplugin/gas_oracle_plugin.exp index 2e7cc3fc..05bdad1c 100644 --- a/integration-tests/daospaceplugin/gas_oracle_plugin.exp +++ b/integration-tests/daospaceplugin/gas_oracle_plugin.exp @@ -20,7 +20,7 @@ task 7 'run'. lines 87-96: task 9 'run'. lines 100-114: { - "gas_used": 614488, + "gas_used": 377540, "status": "Executed" } diff --git a/integration-tests/daospaceplugin/mint_proposal_plugin.exp b/integration-tests/daospaceplugin/mint_proposal_plugin.exp index cbedd1bb..4d7f468e 100644 --- a/integration-tests/daospaceplugin/mint_proposal_plugin.exp +++ b/integration-tests/daospaceplugin/mint_proposal_plugin.exp @@ -37,7 +37,7 @@ task 11 'run'. lines 110-123: task 12 'run'. lines 125-139: { - "gas_used": 614488, + "gas_used": 377540, "status": "Executed" } diff --git a/sources/daospace/DAOSpace.move b/sources/daospace/DAOSpace.move index 2232edb0..c7b95b3d 100644 --- a/sources/daospace/DAOSpace.move +++ b/sources/daospace/DAOSpace.move @@ -567,7 +567,7 @@ module StarcoinFramework::DAOSpace { } /// Save the item to the storage - public fun save_to_storage(_cap: &DAOStorageCap, item: V) acquires DAOAccountCapHolder { + public fun save(_cap: &DAOStorageCap, item: V) acquires DAOAccountCapHolder { let dao_signer = dao_signer(); assert!(!exists>(Signer::address_of(&dao_signer)), Errors::already_published(ERR_STORAGE_ERROR)); move_to(&dao_signer, StorageItem{ @@ -576,7 +576,7 @@ module StarcoinFramework::DAOSpace { } /// Get the item from the storage - public fun take_from_storage(_cap: &DAOStorageCap): V acquires StorageItem { + public fun take(_cap: &DAOStorageCap): V acquires StorageItem { let dao_address = dao_address(); assert!(exists>(dao_address), Errors::not_published(ERR_STORAGE_ERROR)); let StorageItem{ item } = move_from>(dao_address); @@ -584,12 +584,12 @@ module StarcoinFramework::DAOSpace { } /// Check the item has exists in storage - public fun exists_in_storage(): bool { + public fun exists_storage(): bool { exists>(dao_address()) } - /// Copy the item from the storage - public fun copy_from_storage(_cap: &DAOStorageCap): V acquires StorageItem { + /// borow the item from the storage + public fun borrow_storage(_cap: &DAOStorageCap): V acquires StorageItem { let dao_address = dao_address(); assert!(exists>(dao_address), Errors::not_published(ERR_STORAGE_ERROR)); let storage_item = borrow_global>(dao_address); @@ -617,15 +617,14 @@ module StarcoinFramework::DAOSpace { // Membership function - struct MemeberOffer has drop, store{ + struct OfferMemeber has drop, store{ to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128 } - /// invite a new member to the DAO - public fun issue_member_offer(_cap: &DAOMemberCap, to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAOAccountCapHolder, MemberEvent, DAO { + public fun member_offer(_cap: &DAOMemberCap, to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAOAccountCapHolder, MemberEvent, DAO { let dao_address = dao_address(); let dao_signer = dao_signer(); let memeber_event = borrow_global_mut(dao_address); @@ -641,14 +640,14 @@ module StarcoinFramework::DAOSpace { return }; - let op_index = Offer::find_offer>(dao_address, to_address); + let op_index = Offer::find_offer>(dao_address, to_address); if(Option::is_some(&op_index)){ - let MemeberOffer{ + let OfferMemeber{ to_address, image_data, image_url, init_sbt - } = Offer::retake>(&dao_signer, Option::destroy_some(op_index)); + } = Offer::retake>(&dao_signer, Option::destroy_some(op_index)); Event::emit_event(&mut memeber_event.member_offer_event_handler, MemberOfferEvent { dao_id: dao_id(dao_address), addr:to_address, @@ -660,13 +659,13 @@ module StarcoinFramework::DAOSpace { return }; - let offered = MemeberOffer { + let offered = OfferMemeber { to_address, image_data: copy image_data, image_url: copy image_url, init_sbt }; - Offer::create_v2>(&dao_signer, offered, to_address, 0); + Offer::create_v2>(&dao_signer, offered, to_address, 0); Event::emit_event(&mut memeber_event.member_offer_event_handler, MemberOfferEvent { dao_id: dao_id(dao_address), @@ -678,19 +677,18 @@ module StarcoinFramework::DAOSpace { }); } - /// Review the member offer - public fun revoke_member_offer(_cap: &DAOMemberCap, to_address: address) acquires DAOAccountCapHolder, MemberEvent, DAO { + public fun member_offer_revoke(_cap: &DAOMemberCap, to_address: address) acquires DAOAccountCapHolder, MemberEvent, DAO { let dao_address = dao_address(); let dao_signer = dao_signer(); - let op_index = Offer::find_offer>(dao_address, to_address); + let op_index = Offer::find_offer>(dao_address, to_address); let memeber_event = borrow_global_mut(dao_address); if(Option::is_some(&op_index)){ - let MemeberOffer{ + let OfferMemeber{ to_address, image_data, image_url, init_sbt - } = Offer::retake>(&dao_signer, Option::destroy_some(op_index)); + } = Offer::retake>(&dao_signer, Option::destroy_some(op_index)); Event::emit_event(&mut memeber_event.member_offer_event_handler, MemberOfferEvent { dao_id: dao_id(dao_address), addr:to_address, @@ -702,19 +700,19 @@ module StarcoinFramework::DAOSpace { } } - /// Accept the MemberOffer and become a member - public fun accept_member_offer(sender: &signer) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent, DAONFTUpdateCapHolder { + /// Join DAO and get a membership by self + public fun join_member(sender: &signer) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent, DAONFTUpdateCapHolder { let dao_address = dao_address(); - let op_index = Offer::find_offer>(dao_address, Signer::address_of(sender)); + let op_index = Offer::find_offer>(dao_address, Signer::address_of(sender)); assert!(Option::is_some(&op_index),1003); IdentifierNFT::accept, DAOMemberBody>(sender); let memeber_event = borrow_global_mut(dao_address); - let MemeberOffer { + let OfferMemeber { to_address, image_data, image_url, init_sbt - }= Offer::redeem_v2>(sender, dao_address, Option::destroy_some(op_index)); + }= Offer::redeem_v2>(sender, dao_address, Option::destroy_some(op_index)); Event::emit_event(&mut memeber_event.member_offer_event_handler, MemberOfferEvent { dao_id: dao_id(dao_address), addr:to_address, @@ -737,8 +735,8 @@ module StarcoinFramework::DAOSpace { } } - public (script) fun accept_member_offer_entry(sender: signer) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent , DAONFTUpdateCapHolder { - accept_member_offer(&sender) + public (script) fun join_member_entry(sender: signer) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent , DAONFTUpdateCapHolder { + join_member(&sender) } fun do_join_member(to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO { @@ -786,9 +784,9 @@ module StarcoinFramework::DAOSpace { if(!is_member(member_addr)){ let dao_address = dao_address(); let dao_signer = dao_signer(); - let op_index = Offer::find_offer>(dao_address, member_addr); + let op_index = Offer::find_offer>(dao_address, member_addr); if(Option::is_some(&op_index)){ - Offer::retake>(&dao_signer, Option::destroy_some(op_index)); + Offer::retake>(&dao_signer, Option::destroy_some(op_index)); }; return }; @@ -841,7 +839,6 @@ module StarcoinFramework::DAOSpace { (member_id, sbt_amount) } - // TODO refactor the cap and remove this function public fun join_member_with_root_cap(_cap: &DAORootCap, to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent { let dao_address = dao_address(); let memeber_event = borrow_global_mut(dao_address); @@ -855,7 +852,6 @@ module StarcoinFramework::DAOSpace { }); } - // TODO refactor the cap and remove this function public fun join_member_with_member_cap(_cap: &DAOMemberCap, to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent { let dao_address = dao_address(); let memeber_event = borrow_global_mut(dao_address); @@ -988,7 +984,7 @@ module StarcoinFramework::DAOSpace { public fun is_exist_member_offer(member_addr: address):bool{ let dao_address = dao_address(); - Option::is_some(&Offer::find_offer>(dao_address, member_addr)) + Option::is_some(&Offer::find_offer>(dao_address, member_addr)) } struct PluginEvent has key, store { diff --git a/sources/daospaceplugin/AnyMemberPlugin.move b/sources/daospaceplugin/AnyMemberPlugin.move index 1be55b99..b1f800ef 100644 --- a/sources/daospaceplugin/AnyMemberPlugin.move +++ b/sources/daospaceplugin/AnyMemberPlugin.move @@ -6,6 +6,7 @@ module StarcoinFramework::AnyMemberPlugin{ use StarcoinFramework::Signer; use StarcoinFramework::Option; use StarcoinFramework::InstallPluginProposalPlugin; + use StarcoinFramework::IdentifierNFT; struct AnyMemberPlugin has store, drop{} @@ -36,13 +37,11 @@ module StarcoinFramework::AnyMemberPlugin{ ); } + //TODO how to unify arguments. public fun join(sender: &signer, image_data:vector, image_url:vector){ let witness = AnyMemberPlugin{}; - let sender_addr = Signer::address_of(sender); - if (DAOSpace::is_member(sender_addr) ) { - return - }; let member_cap = DAOSpace::acquire_member_cap(&witness); + IdentifierNFT::accept,DAOSpace::DAOMemberBody>(sender); let op_image_data = if(Vector::is_empty(&image_data)){ Option::none>() }else{ @@ -53,9 +52,7 @@ module StarcoinFramework::AnyMemberPlugin{ }else{ Option::some(image_url) }; - - DAOSpace::issue_member_offer(&member_cap, sender_addr, op_image_data, op_image_url, 1); - DAOSpace::accept_member_offer(sender); + DAOSpace::join_member_with_member_cap(&member_cap, Signer::address_of(sender), op_image_data, op_image_url, 1); } public (script) fun join_entry(sender: signer, image_data:vector, image_url:vector){ diff --git a/sources/daospaceplugin/GasOracleProposalPlugin.move b/sources/daospaceplugin/GasOracleProposalPlugin.move index 97fb63cb..bc4dbf7d 100644 --- a/sources/daospaceplugin/GasOracleProposalPlugin.move +++ b/sources/daospaceplugin/GasOracleProposalPlugin.move @@ -75,18 +75,18 @@ module StarcoinFramework::GasOracleProposalPlugin { let proposal_cap = DAOSpace::acquire_proposal_cap(&witness); let OracleSourceAddAction{ source_address } = DAOSpace::execute_proposal>(&proposal_cap, &sender, proposal_id); let storage_cap = DAOSpace::acquire_storage_cap(&witness); - let source_addresses = if (!DAOSpace::exists_in_storage>()) { + let source_addresses = if (!DAOSpace::exists_storage>()) { let genesis_singer= GenesisSignerCapability::get_genesis_signer(); Account::accept_token(genesis_singer); Vector::singleton(source_address) }else { - let OracleSources{ source_addresses } = DAOSpace::take_from_storage>(&storage_cap); + let OracleSources{ source_addresses } = DAOSpace::take>(&storage_cap); assert!(Vector::contains(&source_addresses, &source_address) == false, Errors::invalid_state(ERR_PLUGIN_ORACLE_EXIST)); Vector::push_back(&mut source_addresses, source_address); source_addresses }; - DAOSpace::save_to_storage(&storage_cap, OracleSources{ source_addresses }); + DAOSpace::save(&storage_cap, OracleSources{ source_addresses }); } public(script) fun create_oracle_remove_proposal(sender: signer, title:vector, introduction:vector, description: vector, action_delay: u64, source_address: address) { @@ -103,18 +103,18 @@ module StarcoinFramework::GasOracleProposalPlugin { let proposal_cap = DAOSpace::acquire_proposal_cap(&witness); let OracleSourceRemoveAction{ source_address } = DAOSpace::execute_proposal>(&proposal_cap, &sender, proposal_id); let storage_cap = DAOSpace::acquire_storage_cap(&witness); - assert!(DAOSpace::exists_in_storage>(), ERR_PLUGIN_ORACLE_NOT_EXIST); - let OracleSources{ source_addresses } = DAOSpace::take_from_storage>(&storage_cap); + assert!(DAOSpace::exists_storage>(), ERR_PLUGIN_ORACLE_NOT_EXIST); + let OracleSources{ source_addresses } = DAOSpace::take>(&storage_cap); let (exist,index)= Vector::index_of(&source_addresses, &source_address); assert!(exist, Errors::invalid_state(ERR_PLUGIN_ORACLE_NOT_EXIST)); Vector::remove(&mut source_addresses,index); - DAOSpace::save_to_storage(&storage_cap, OracleSources{ source_addresses }); + DAOSpace::save(&storage_cap, OracleSources{ source_addresses }); } public fun gas_oracle_read(): u128 { let witness = GasOracleProposalPlugin{}; let storage_cap = DAOSpace::acquire_storage_cap(&witness); - let OracleSources{ source_addresses } = DAOSpace::copy_from_storage>(&storage_cap); + let OracleSources{ source_addresses } = DAOSpace::borrow_storage>(&storage_cap); PriceOracleAggregator::latest_price_average_aggregator>(&source_addresses, ORACLE_UPDATED_IN) } diff --git a/sources/daospaceplugin/MemberProposalPlugin.move b/sources/daospaceplugin/MemberProposalPlugin.move index 469b89aa..a6cb6cda 100644 --- a/sources/daospaceplugin/MemberProposalPlugin.move +++ b/sources/daospaceplugin/MemberProposalPlugin.move @@ -80,7 +80,7 @@ module StarcoinFramework::MemberProposalPlugin{ }else{ Option::some(image_url) }; - DAOSpace::issue_member_offer(&member_cap, member,op_image_data , op_image_url , init_sbt); + DAOSpace::member_offer(&member_cap, member,op_image_data , op_image_url , init_sbt); } public (script) fun execute_proposal_entry(sender: signer, proposal_id: u64){ diff --git a/sources/daospaceplugin/StakeToSBTPlugin.move b/sources/daospaceplugin/StakeToSBTPlugin.move index a253bb5b..2c375ed2 100644 --- a/sources/daospaceplugin/StakeToSBTPlugin.move +++ b/sources/daospaceplugin/StakeToSBTPlugin.move @@ -186,14 +186,14 @@ module StarcoinFramework::StakeToSBTPlugin { DAOSpace::acquire_member_cap(&witness); if (!DAOSpace::is_member(sender_addr) ) { - DAOSpace::issue_member_offer( + DAOSpace::member_offer( &member_cap, sender_addr, Option::none>(), Option::none>(), 0 ); - DAOSpace::accept_member_offer(sender); + DAOSpace::join_member(sender); }; if (!exists>(sender_addr)) {