From 66797ea158b2992a8364438fdc728bb77fa0a223 Mon Sep 17 00:00:00 2001 From: 0xFable <0xfable@protonmail.com> Date: Mon, 15 Apr 2024 12:33:48 +0100 Subject: [PATCH] fix: fmt --- contracts/liquidity_hub/incentive-manager/src/helpers.rs | 2 +- .../liquidity_hub/pool-manager/src/manager/commands.rs | 4 ++-- packages/white-whale-std/src/bonding_manager.rs | 6 ++---- packages/white-whale-std/src/coin.rs | 3 +-- packages/white-whale-std/src/lib.rs | 2 +- packages/white-whale-std/src/whale_lair.rs | 3 +-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/contracts/liquidity_hub/incentive-manager/src/helpers.rs b/contracts/liquidity_hub/incentive-manager/src/helpers.rs index 8a36ed74..997bf7bc 100644 --- a/contracts/liquidity_hub/incentive-manager/src/helpers.rs +++ b/contracts/liquidity_hub/incentive-manager/src/helpers.rs @@ -71,7 +71,7 @@ pub(crate) fn process_incentive_creation_fee( } // send incentive creation fee to whale lair for distribution - messages.push(white_whale_std::whale_lair::fill_rewards_msg( + messages.push(white_whale_std::whale_lair::fill_rewards_msg_coin( config.whale_lair_addr.clone().into_string(), vec![incentive_creation_fee.to_owned()], )?); diff --git a/contracts/liquidity_hub/pool-manager/src/manager/commands.rs b/contracts/liquidity_hub/pool-manager/src/manager/commands.rs index 46925677..991785f1 100644 --- a/contracts/liquidity_hub/pool-manager/src/manager/commands.rs +++ b/contracts/liquidity_hub/pool-manager/src/manager/commands.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{ use white_whale_std::{ fee::PoolFee, pool_network::{asset::PairType, querier::query_native_decimals}, - whale_lair::fill_rewards_msg, + whale_lair::{fill_rewards_msg, fill_rewards_msg_coin}, }; use crate::state::{get_pair_by_identifier, NATIVE_TOKEN_DECIMALS, PAIR_COUNTER}; @@ -110,7 +110,7 @@ pub fn create_pair( let creation_fee = vec![config.pool_creation_fee]; // send pair creation fee to whale lair i.e the new fee_collector - messages.push(fill_rewards_msg( + messages.push(fill_rewards_msg_coin( config.whale_lair_addr.into_string(), creation_fee, )?); diff --git a/packages/white-whale-std/src/bonding_manager.rs b/packages/white-whale-std/src/bonding_manager.rs index 927dd75d..6f8f82b1 100644 --- a/packages/white-whale-std/src/bonding_manager.rs +++ b/packages/white-whale-std/src/bonding_manager.rs @@ -21,7 +21,6 @@ pub struct Config { pub bonding_assets: Vec, /// The duration of the grace period in epochs, i.e. how many expired epochs can be claimed pub grace_period: Uint64, - } #[cw_serde] @@ -85,7 +84,7 @@ pub struct InstantiateMsg { pub growth_rate: Decimal, /// [String] denoms of the assets that can be bonded. pub bonding_assets: Vec, - /// Grace period the maximum age of a bucket before fees are forwarded from it + /// Grace period the maximum age of a bucket before fees are forwarded from it pub grace_period: Uint64, } @@ -97,8 +96,7 @@ pub struct EpochChangedHookMsg { #[cw_serde] pub enum ExecuteMsg { /// Bonds the specified [Asset]. - Bond { - }, + Bond {}, /// Unbonds the specified [Asset]. Unbond { asset: Coin, diff --git a/packages/white-whale-std/src/coin.rs b/packages/white-whale-std/src/coin.rs index 20621d22..0b927b59 100644 --- a/packages/white-whale-std/src/coin.rs +++ b/packages/white-whale-std/src/coin.rs @@ -1,4 +1,3 @@ - use std::collections::HashMap; use cosmwasm_std::{Coin, StdError, StdResult, Uint128}; @@ -160,7 +159,7 @@ fn get_factory_token_label(denom: &str) -> StdResult { } //todo test these functions in isolation -// move to ww package +// move to ww package pub fn deduct_coins(coins: Vec, to_deduct: Vec) -> StdResult> { let mut updated_coins = coins.to_vec(); diff --git a/packages/white-whale-std/src/lib.rs b/packages/white-whale-std/src/lib.rs index b0aa104d..18539f90 100644 --- a/packages/white-whale-std/src/lib.rs +++ b/packages/white-whale-std/src/lib.rs @@ -12,8 +12,8 @@ pub mod pool_manager; pub mod pool_network; pub mod token_factory; -pub mod coin; pub mod bonding_manager; +pub mod coin; #[cfg(any( feature = "token_factory", diff --git a/packages/white-whale-std/src/whale_lair.rs b/packages/white-whale-std/src/whale_lair.rs index 32441c7f..9212e417 100644 --- a/packages/white-whale-std/src/whale_lair.rs +++ b/packages/white-whale-std/src/whale_lair.rs @@ -1,7 +1,7 @@ use crate::pool_network::asset::{Asset, AssetInfo, ToCoins}; use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{ - to_json_binary, Addr, Coin, CosmosMsg, Decimal, StdResult, Timestamp, Uint128, Uint64, WasmMsg + to_json_binary, Addr, Coin, CosmosMsg, Decimal, StdResult, Timestamp, Uint128, Uint64, WasmMsg, }; #[cw_serde] @@ -88,7 +88,6 @@ pub enum ExecuteMsg { /// Fills the whale lair with new rewards. FillRewards { assets: Vec }, /// Fills the whale lair with new rewards. - FillRewardsCoin, }