Repository: public-awesome/launchpad
Pull request #713 (2025-02-03 12:06:45)

Update recipient address for mint fees


Patch:
diff --git a/packages/sg1/src/lib.rs b/packages/sg1/src/lib.rs
index d45a3e11..c663a9d8 100644
--- a/packages/sg1/src/lib.rs
+++ b/packages/sg1/src/lib.rs
@@ -105,14 +105,15 @@ pub fn distribute_mint_fees(
             let liquidity_dao_fee =
                 (remaining_coin.amount.mul_ceil(liquidity_dao_percentage)).u128();
             let liquidity_dao_coin = coin(liquidity_dao_fee, fee.denom.to_string());
-            let foundation_coin = coin(remaining_coin.amount.u128() - liquidity_dao_fee, fee.denom);
+            let launchpad_dao_coin =
+                coin(remaining_coin.amount.u128() - liquidity_dao_fee, fee.denom);
 
             event = event.add_attribute("dev_addr", developer.to_string());
             event = event.add_attribute("dev_coin", dev_coin.to_string());
             event = event.add_attribute("liquidity_DAO_addr", LIQUIDITY_DAO_ADDRESS.to_string());
             event = event.add_attribute("liquidity_DAO_coin", liquidity_dao_coin.to_string());
-            event = event.add_attribute("foundation_addr", FOUNDATION.to_string());
-            event = event.add_attribute("foundation_coin", foundation_coin.to_string());
+            event = event.add_attribute("launchpad_DAO_addr", LAUNCHPAD_DAO_ADDRESS.to_string());
+            event = event.add_attribute("launchpad_DAO_coin", launchpad_dao_coin.to_string());
 
             res.messages.push(SubMsg::new(BankMsg::Send {
                 to_address: developer.to_string(),
@@ -123,27 +124,27 @@ pub fn distribute_mint_fees(
                 amount: vec![liquidity_dao_coin],
             }));
             res.messages.push(SubMsg::new(BankMsg::Send {
-                to_address: FOUNDATION.to_string(),
-                amount: vec![foundation_coin],
+                to_address: LAUNCHPAD_DAO_ADDRESS.to_string(),
+                amount: vec![launchpad_dao_coin],
             }));
         }
         None => {
             let liquidity_dao_fee = fee.amount.mul_ceil(liquidity_dao_percentage).u128();
             let liquidity_dao_coin = coin(liquidity_dao_fee, fee.denom.to_string());
-            let foundation_coin = coin(fee.amount.u128() - liquidity_dao_fee, fee.denom);
+            let launchpad_dao_coin = coin(fee.amount.u128() - liquidity_dao_fee, fee.denom);
 
             event = event.add_attribute("liquidity_DAO_addr", LIQUIDITY_DAO_ADDRESS.to_string());
             event = event.add_attribute("liquidity_DAO_coin", liquidity_dao_coin.to_string());
-            event = event.add_attribute("foundation_addr", FOUNDATION.to_string());
-            event = event.add_attribute("foundation_coin", foundation_coin.to_string());
+            event = event.add_attribute("launchpad_DAO_addr", LAUNCHPAD_DAO_ADDRESS.to_string());
+            event = event.add_attribute("launchpad_DAO_coin", launchpad_dao_coin.to_string());
 
             res.messages.push(SubMsg::new(BankMsg::Send {
                 to_address: LIQUIDITY_DAO_ADDRESS.to_string(),
                 amount: vec![liquidity_dao_coin],
             }));
             res.messages.push(SubMsg::new(BankMsg::Send {
-                to_address: FOUNDATION.to_string(),
-                amount: vec![foundation_coin],
+                to_address: LAUNCHPAD_DAO_ADDRESS.to_string(),
+                amount: vec![launchpad_dao_coin],
             }));
         }
     }


Test patch:
diff --git a/test-suite/src/common_setup/setup_minter/common/constants.rs b/test-suite/src/common_setup/setup_minter/common/constants.rs
index 844cc1a1..79ce5239 100644
--- a/test-suite/src/common_setup/setup_minter/common/constants.rs
+++ b/test-suite/src/common_setup/setup_minter/common/constants.rs
@@ -15,3 +15,5 @@ pub const MIN_MINT_PRICE_OPEN_EDITION: u128 = 100_000_000;
 pub const FOUNDATION: &str = "stars1xqz6xujjyz0r9uzn7srasle5uynmpa0zkjr5l8";
 pub const LIQUIDITY_DAO_ADDRESS: &str =
     "stars12he2ldxl950wfypvelqwkac4mdul7clzgd8wdlnmjvll8z2cc47qsatvl2";
+pub const LAUNCHPAD_DAO_ADDRESS: &str =
+    "stars1huqk6ha02jgrm69lxh8xfgl6wch9wlg7s65ujxydwdr725cxvuus423tj0";
diff --git a/test-suite/src/open_edition_minter/tests/ibc_asset_mint.rs b/test-suite/src/open_edition_minter/tests/ibc_asset_mint.rs
index 43c61c03..0df82b98 100644
--- a/test-suite/src/open_edition_minter/tests/ibc_asset_mint.rs
+++ b/test-suite/src/open_edition_minter/tests/ibc_asset_mint.rs
@@ -4,12 +4,14 @@ use open_edition_factory::state::{OpenEditionMinterParams, ParamsExtension};
 use open_edition_minter::msg::ExecuteMsg;
 use sg_std::{GENESIS_MINT_START_TIME, NATIVE_DENOM};
 
-use crate::common_setup::setup_minter::common::constants::LIQUIDITY_DAO_ADDRESS;
+use crate::common_setup::setup_minter::common::constants::{
+    LAUNCHPAD_DAO_ADDRESS, LIQUIDITY_DAO_ADDRESS,
+};
 use crate::common_setup::{
     setup_accounts_and_block::setup_block_time,
     setup_minter::{
         common::constants::{
-            CREATION_FEE, DEV_ADDRESS, FOUNDATION, MINT_FEE_FAIR_BURN, MIN_MINT_PRICE_OPEN_EDITION,
+            CREATION_FEE, DEV_ADDRESS, MINT_FEE_FAIR_BURN, MIN_MINT_PRICE_OPEN_EDITION,
         },
         open_edition_minter::minter_params::{default_nft_data, init_msg},
     },
@@ -171,7 +173,7 @@ fn one_hundred_percent_burned_ibc_minter() {
     // "community_pool" address from packages/sg-multi-test/src/multi.rs
     let balance = router
         .wrap()
-        .query_balance(Addr::unchecked(FOUNDATION), denom)
+        .query_balance(Addr::unchecked(LAUNCHPAD_DAO_ADDRESS), denom)
         .unwrap();
     assert_eq!(balance.amount, mint_price.amount * Decimal::percent(40));
 
diff --git a/test-suite/src/vending_minter/tests/ibc_asset_mint.rs b/test-suite/src/vending_minter/tests/ibc_asset_mint.rs
index 249ec3bf..b8fb8118 100644
--- a/test-suite/src/vending_minter/tests/ibc_asset_mint.rs
+++ b/test-suite/src/vending_minter/tests/ibc_asset_mint.rs
@@ -1,6 +1,4 @@
-use crate::common_setup::{
-    setup_collection_whitelist::WHITELIST_AMOUNT, setup_minter::common::constants::FOUNDATION,
-};
+use crate::common_setup::setup_collection_whitelist::WHITELIST_AMOUNT;
 use cosmwasm_std::{coin, coins, Addr, Decimal, Uint128};
 use cw_multi_test::{BankSudo, Executor, SudoMsg};
 use sg2::{msg::Sg2ExecuteMsg, tests::mock_collection_params};
@@ -24,7 +22,9 @@ use crate::common_setup::{
     templates::{vending_minter_template, vending_minter_with_ibc_asset},
 };
 
-use crate::common_setup::setup_minter::common::constants::{CREATION_FEE, LIQUIDITY_DAO_ADDRESS};
+use crate::common_setup::setup_minter::common::constants::{
+    CREATION_FEE, LAUNCHPAD_DAO_ADDRESS, LIQUIDITY_DAO_ADDRESS,
+};
 use crate::common_setup::setup_minter::vending_minter::mock_params::mock_params;
 
 #[test]
@@ -257,7 +257,7 @@ fn wl_denom_mint() {
     assert_eq!(balance.amount, wl_mint_price.amount * Decimal::percent(90));
     let balance = app
         .wrap()
-        .query_balance(Addr::unchecked(FOUNDATION), denom)
+        .query_balance(Addr::unchecked(LAUNCHPAD_DAO_ADDRESS), denom)
         .unwrap();
     assert_eq!(balance.amount, wl_mint_price.amount * Decimal::percent(8));
     let balance = app