diff --git a/build/StarcoinFramework/BuildInfo.yaml b/build/StarcoinFramework/BuildInfo.yaml index 4cefad2d..b83b502c 100644 --- a/build/StarcoinFramework/BuildInfo.yaml +++ b/build/StarcoinFramework/BuildInfo.yaml @@ -321,7 +321,7 @@ compiled_package_info: ? address: "0x00000000000000000000000000000001" name: YieldFarmingV2 : StarcoinFramework - source_digest: 4C96D09C5AAF229BF0BFA79CEEEC3E42D49C436FEBA79BBF776354A60A84F1BD + source_digest: 92C4BD219F80CC0A3708B819EA1E57967727A3ED42F5627ACA2408BCF40FC74C build_flags: dev_mode: false test_mode: false diff --git a/integration-tests/daospace/dao_proposal.exp b/integration-tests/daospace/dao_proposal.exp index 2572224e..0ddf23b1 100644 --- a/integration-tests/daospace/dao_proposal.exp +++ b/integration-tests/daospace/dao_proposal.exp @@ -20,13 +20,13 @@ task 9 'run'. lines 198-223: task 11 'run'. lines 228-244: { - "gas_used": 235032, + "gas_used": 239832, "status": "Executed" } task 12 'run'. lines 246-262: { - "gas_used": 235032, + "gas_used": 239832, "status": "Executed" } diff --git a/integration-tests/daospace/stake_to_sbt_plugin.exp b/integration-tests/daospace/stake_to_sbt_plugin.exp index fc3c284f..9b583a6c 100644 --- a/integration-tests/daospace/stake_to_sbt_plugin.exp +++ b/integration-tests/daospace/stake_to_sbt_plugin.exp @@ -8,7 +8,7 @@ task 5 'run'. lines 71-79: task 6 'run'. lines 81-117: { - "gas_used": 655792, + "gas_used": 660592, "status": "Executed" } @@ -60,7 +60,7 @@ task 15 'run'. lines 204-219: task 16 'run'. lines 221-232: { - "gas_used": 307027, + "gas_used": 311827, "status": { "MoveAbort": { "location": { diff --git a/integration-tests/daospaceplugin/mint_proposal_plugin.exp b/integration-tests/daospaceplugin/mint_proposal_plugin.exp index 718c03b9..b4d4724c 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": 264828, + "gas_used": 269638, "status": "Executed" } diff --git a/integration-tests/daospaceplugin/salary_gov_plugin.exp b/integration-tests/daospaceplugin/salary_gov_plugin.exp index 2b7361b8..136832b9 100644 --- a/integration-tests/daospaceplugin/salary_gov_plugin.exp +++ b/integration-tests/daospaceplugin/salary_gov_plugin.exp @@ -14,7 +14,7 @@ task 8 'run'. lines 267-275: task 10 'run'. lines 280-295: { - "gas_used": 279652, + "gas_used": 284462, "status": "Executed" } diff --git a/integration-tests/starcoin_dao/starcoin_onchain_config.exp b/integration-tests/starcoin_dao/starcoin_onchain_config.exp index 85cef41f..e66ba464 100644 --- a/integration-tests/starcoin_dao/starcoin_onchain_config.exp +++ b/integration-tests/starcoin_dao/starcoin_onchain_config.exp @@ -2,7 +2,7 @@ processed 23 tasks task 4 'run'. lines 10-25: { - "gas_used": 875200, + "gas_used": 880000, "status": "Executed" } diff --git a/integration-tests/starcoin_dao/starcoin_upgrade_module.exp b/integration-tests/starcoin_dao/starcoin_upgrade_module.exp index c9b2a556..f8072d79 100644 --- a/integration-tests/starcoin_dao/starcoin_upgrade_module.exp +++ b/integration-tests/starcoin_dao/starcoin_upgrade_module.exp @@ -2,7 +2,7 @@ processed 26 tasks task 4 'run'. lines 9-24: { - "gas_used": 875200, + "gas_used": 880000, "status": "Executed" } diff --git a/sources/daospace/DAOSpace.move b/sources/daospace/DAOSpace.move index 6b5bf3f9..fc80ae4d 100644 --- a/sources/daospace/DAOSpace.move +++ b/sources/daospace/DAOSpace.move @@ -577,6 +577,10 @@ module StarcoinFramework::DAOSpace { /// Join DAO and get a membership public fun join_member(_cap: &DAOMemberCap, to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent { + do_join_member(to_address, image_data, image_url, init_sbt); + } + + fun do_join_member(to_address: address, image_data:Option::Option>, image_url:Option::Option>, init_sbt: u128) acquires DAONFTMintCapHolder, DAOSBTMintCapHolder, DAO, MemberEvent { ensure_not_member(to_address); let member_id = next_member_id(); @@ -673,6 +677,10 @@ module StarcoinFramework::DAOSpace { (member_id, sbt_amount) } + 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 { + do_join_member(to_address, image_data, image_url, init_sbt); + } + /// Increment the member SBT public fun increase_member_sbt(_cap: &DAOMemberCap, member_addr: address, amount: u128) acquires DAONFTUpdateCapHolder, DAOSBTMintCapHolder, MemberEvent { ensure_member(member_addr);