diff --git a/contracts/external/cw-abc/src/commands.rs b/contracts/external/cw-abc/src/commands.rs index bd351fb9d..f80868d37 100644 --- a/contracts/external/cw-abc/src/commands.rs +++ b/contracts/external/cw-abc/src/commands.rs @@ -283,7 +283,7 @@ fn assert_allowlisted(storage: &dyn Storage, hatcher: &Addr) -> Result<(), Contr /// Set the maxiumum supply (only callable by owner) /// If `max_supply` is set to None there will be no limit.` -pub fn set_max_supply( +pub fn update_max_supply( deps: DepsMut, info: MessageInfo, max_supply: Option, @@ -296,7 +296,7 @@ pub fn set_max_supply( } Ok(Response::new() - .add_attribute("action", "set_max_supply") + .add_attribute("action", "update_max_supply") .add_attribute("value", max_supply.unwrap_or(Uint128::MAX).to_string())) } diff --git a/contracts/external/cw-abc/src/contract.rs b/contracts/external/cw-abc/src/contract.rs index 314e62c71..5170c570c 100644 --- a/contracts/external/cw-abc/src/contract.rs +++ b/contracts/external/cw-abc/src/contract.rs @@ -116,10 +116,12 @@ pub fn execute( ) -> CwAbcResult { match msg { ExecuteMsg::Buy {} => commands::execute_buy(deps, env, info), - ExecuteMsg::Burn {} => commands::execute_sell(deps, env, info), + ExecuteMsg::Sell {} => commands::execute_sell(deps, env, info), ExecuteMsg::Close {} => commands::execute_close(deps, info), ExecuteMsg::Donate {} => commands::execute_donate(deps, env, info), - ExecuteMsg::SetMaxSupply { max_supply } => commands::set_max_supply(deps, info, max_supply), + ExecuteMsg::UpdateMaxSupply { max_supply } => { + commands::update_max_supply(deps, info, max_supply) + } ExecuteMsg::UpdateCurve { curve_type } => commands::update_curve(deps, info, curve_type), ExecuteMsg::UpdateHatchAllowlist { to_add, to_remove } => { commands::update_hatch_allowlist(deps, info, to_add, to_remove) diff --git a/contracts/external/cw-abc/src/msg.rs b/contracts/external/cw-abc/src/msg.rs index 34b131256..f6ee7e0db 100644 --- a/contracts/external/cw-abc/src/msg.rs +++ b/contracts/external/cw-abc/src/msg.rs @@ -52,14 +52,15 @@ pub enum UpdatePhaseConfigMsg { #[cw_serde] pub enum ExecuteMsg { /// Buy will attempt to purchase as many supply tokens as possible. - /// You must send only reserve tokens in that message + /// You must send only reserve tokens. Buy {}, - /// Burn is a base message to destroy tokens forever - Burn {}, + /// Sell burns supply tokens in return for the reserve token. + /// You must send only supply tokens. + Sell {}, /// Donate will add reserve tokens to the funding pool Donate {}, /// Sets (or unsets if set to None) the maximum supply - SetMaxSupply { + UpdateMaxSupply { /// The maximum supply able to be minted. max_supply: Option, }, diff --git a/contracts/external/cw-abc/src/test_tube/integration_tests.rs b/contracts/external/cw-abc/src/test_tube/integration_tests.rs index f7c401e5e..f13c368ba 100644 --- a/contracts/external/cw-abc/src/test_tube/integration_tests.rs +++ b/contracts/external/cw-abc/src/test_tube/integration_tests.rs @@ -1,20 +1,15 @@ use crate::{ abc::{ClosedConfig, CommonsPhase, CommonsPhaseConfig, HatchConfig, MinMax, OpenConfig}, - msg::{ - CommonsPhaseConfigResponse, CurveInfoResponse, DenomResponse, ExecuteMsg, InstantiateMsg, - QueryMsg, - }, + msg::{CommonsPhaseConfigResponse, CurveInfoResponse, DenomResponse, ExecuteMsg, QueryMsg}, ContractError, }; -use super::test_env::{TestEnv, TestEnvBuilder, DENOM, RESERVE}; +use super::test_env::{TestEnv, TestEnvBuilder, RESERVE}; use cosmwasm_std::{coins, Decimal, Uint128}; use cw_tokenfactory_issuer::msg::QueryMsg as IssuerQueryMsg; use osmosis_std::types::cosmos::bank::v1beta1::QueryBalanceRequest; -use osmosis_test_tube::{ - osmosis_std::types::cosmos::base::v1beta1::Coin, Account, OsmosisTestApp, RunnerError, -}; +use osmosis_test_tube::{osmosis_std::types::cosmos::base::v1beta1::Coin, Account, OsmosisTestApp}; #[test] fn test_happy_path() { @@ -109,9 +104,9 @@ fn test_happy_path() { } ); - // Burn + // Sell abc.execute( - &ExecuteMsg::Burn {}, + &ExecuteMsg::Sell {}, &coins(100, denom.clone()), &accounts[0], )