Skip to content

Commit

Permalink
general refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
epanchee committed Jan 3, 2024
1 parent 15b2260 commit 19bfecb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion contracts/factory/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ pub fn execute(

/// Updates general contract settings.
///
/// * **param** is an object of type [`UpdateConfig`] that contains the parameters to update.
/// * **fee_address** if Some defines new Astroport fees receiver,
///
/// * **generator_address** if Some defines new Astroport generator address,
///
/// * **coin_registry_address** if Some defines new Astroport coin registry address.
///
/// ## Executor
/// Only the owner can execute this.
Expand Down
3 changes: 0 additions & 3 deletions contracts/factory/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ pub enum ContractError {
#[error("Doubling assets in asset infos")]
DoublingAssets {},

#[error("Contract can't be migrated!")]
MigrationError {},

#[error("Failed to parse or process reply message")]
FailedToParseReply {},

Expand Down
13 changes: 8 additions & 5 deletions contracts/pair_concentrated/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,6 @@ fn set_pool_id(deps: DepsMut, info: MessageInfo, pool_id: u64) -> Result<Respons
/// * **slippage_tolerance** is an optional parameter which is used to specify how much
/// the pool price can move until the provide liquidity transaction goes through.
///
/// * **auto_stake** is an optional parameter which determines whether the LP tokens minted after
/// liquidity provision are automatically staked in the Generator contract on behalf of the LP token receiver.
///
/// * **receiver** is an optional parameter which defines the receiver of the LP tokens.
/// If no custom receiver is specified, the pair will mint LP tokens for the function caller.
pub fn provide_liquidity(
Expand Down Expand Up @@ -506,8 +503,6 @@ pub fn provide_liquidity(
/// Withdraw liquidity from the pool.
///
/// * **assets** defines number of coins a user wants to withdraw per each asset.
///
/// * **receiver** address that will receive assets back from the pair contract
pub fn withdraw_liquidity(
deps: DepsMut,
env: Env,
Expand Down Expand Up @@ -602,6 +597,14 @@ pub fn withdraw_liquidity(
///
/// From external perspective this function behaves in the same way as in other Astroport pairs.
/// However, internally it forwards swap request to the Osmosis DEX module.
///
/// * **offer_asset** proposed asset for swapping.
///
/// * **belief_price** is used to calculate the maximum swap spread.
///
/// * **max_spread** sets the maximum spread of the swap operation.
///
/// * **to** sets the recipient of the swap operation.
pub fn execute_swap(
deps: DepsMut,
env: Env,
Expand Down

0 comments on commit 19bfecb

Please sign in to comment.