From fe7833191074e1cac6319eec2670995d6101e4b2 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Tue, 30 Apr 2024 18:21:58 -0500 Subject: [PATCH 01/12] feat: use incentives native tokens structs in staking impl --- cw-dex-astroport/src/staking.rs | 77 ++++++++++++------- .../astroport-test-contract/src/contract.rs | 2 +- test-contracts/package/src/msg.rs | 2 +- test-helpers/src/astroport.rs | 4 +- 4 files changed, 53 insertions(+), 32 deletions(-) diff --git a/cw-dex-astroport/src/staking.rs b/cw-dex-astroport/src/staking.rs index f073938..a644545 100644 --- a/cw-dex-astroport/src/staking.rs +++ b/cw-dex-astroport/src/staking.rs @@ -1,49 +1,70 @@ //! Staking/rewards traits implementations for Astroport - +use apollo_cw_asset::{AssetInfo, AssetList}; use apollo_utils::assets::separate_natives_and_cw20s; -use cosmwasm_schema::cw_serde; +use astroport::asset::{Asset as AstroAsset}; +use cosmwasm_schema::{cw_serde, QueryResponses}; use cosmwasm_std::{ - to_json_binary, Addr, CosmosMsg, Deps, Empty, Env, Event, QuerierWrapper, QueryRequest, + coins, to_json_binary, Addr, CosmosMsg, Deps, Empty, Env, Event, QuerierWrapper, QueryRequest, Response, Uint128, WasmMsg, WasmQuery, }; -use cw20::Cw20ExecuteMsg; - -use apollo_cw_asset::AssetList; -use astroport::asset::Asset as AstroAsset; -use astroport_v3::incentives::{ - Cw20Msg as IncentivesCw20Msg, ExecuteMsg as IncentivesExecuteMsg, - QueryMsg as IncentivesQueryMsg, -}; - use cw_dex::traits::{Rewards, Stake, Staking, Unstake}; use cw_dex::CwDexError; /// Represents staking of tokens on Astroport #[cw_serde] pub struct AstroportStaking { - /// The address of the associated LP token contract - pub lp_token_addr: Addr, + /// The cw20 or token factory denom of the associated LP token + pub lp_token: AssetInfo, /// The address of the astroport incentives contract pub incentives: Addr, } +#[cw_serde] +pub enum AstroportV5IncentivesExecuteMsg { + /// Stake LP tokens in the Generator. LP tokens staked on behalf of + /// recipient if recipient is set. Otherwise LP tokens are staked on + /// behalf of message sender. + Deposit { recipient: Option }, + /// Withdraw LP tokens from the Generator + Withdraw { + /// The LP token cw20 address or token factory denom + lp_token: String, + /// The amount to withdraw. Must not exceed total staked amount. + amount: Uint128, + }, + /// Update rewards and return it to user. + ClaimRewards { + /// The LP token cw20 address or token factory denom + lp_tokens: Vec, + }, +} + +/// We copied this in because versioning on Astroport is a mess and it's easier to simply copy it in. +/// These incentive related structs come from here: https://github.com/astroport-fi/hidden_astroport_core/blob/main/packages/astroport/src/incentives.rs#L92 +/// This will be released as Astroport V5 at some point in the future + +#[cw_serde] +#[derive(QueryResponses)] +pub enum AstroportV5IncentivesQueryMsg { + /// PendingToken returns the amount of rewards that can be claimed by an + /// account that deposited a specific LP token in a generator + #[returns(Vec)] + PendingRewards { lp_token: String, user: String }, +} + impl Staking for AstroportStaking {} impl Stake for AstroportStaking { fn stake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { let stake_msg = CosmosMsg::Wasm(WasmMsg::Execute { - contract_addr: self.lp_token_addr.to_string(), - msg: to_json_binary(&Cw20ExecuteMsg::Send { - contract: self.incentives.to_string(), - amount, - msg: to_json_binary(&IncentivesCw20Msg::Deposit { recipient: None })?, - })?, - funds: vec![], + contract_addr: self.incentives.to_string(), + msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::Deposit { recipient: None })?, + funds: coins(amount.into(), self.lp_token.to_string()), }); let event = Event::new("apollo/cw-dex/stake") .add_attribute("type", "astroport_staking") - .add_attribute("asset", self.lp_token_addr.to_string()) + .add_attribute("asset", self.lp_token.to_string()) .add_attribute("incentives contract address", self.incentives.to_string()); Ok(Response::new().add_message(stake_msg).add_event(event)) @@ -64,8 +85,8 @@ impl Rewards for AstroportStaking { let claim_rewards_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&IncentivesExecuteMsg::ClaimRewards { - lp_tokens: vec![self.lp_token_addr.to_string()], + msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::ClaimRewards { + lp_tokens: vec![self.lp_token.to_string()], })?, funds: vec![], }); @@ -116,8 +137,8 @@ impl Rewards for AstroportStaking { let pending_rewards: Vec = querier .query::>(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&IncentivesQueryMsg::PendingRewards { - lp_token: self.lp_token_addr.to_string(), + msg: to_json_binary(&AstroportV5IncentivesQueryMsg::PendingRewards { + lp_token: self.lp_token.to_string(), user: user.to_string(), })?, }))? @@ -133,8 +154,8 @@ impl Unstake for AstroportStaking { fn unstake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { let unstake_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&IncentivesExecuteMsg::Withdraw { - lp_token: self.lp_token_addr.to_string(), + msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::Withdraw { + lp_token: self.lp_token.to_string(), amount, })?, funds: vec![], diff --git a/test-contracts/astroport-test-contract/src/contract.rs b/test-contracts/astroport-test-contract/src/contract.rs index c6608e5..9a1acb8 100644 --- a/test-contracts/astroport-test-contract/src/contract.rs +++ b/test-contracts/astroport-test-contract/src/contract.rs @@ -28,7 +28,7 @@ pub fn instantiate( STAKING.save( deps.storage, &AstroportStaking { - lp_token_addr: Addr::unchecked(msg.lp_token_addr), + lp_token: AssetInfo::from_str(deps.api, &msg.lp_token), incentives: Addr::unchecked(msg.incentives_addr), }, )?; diff --git a/test-contracts/package/src/msg.rs b/test-contracts/package/src/msg.rs index dffec8d..60481f6 100644 --- a/test-contracts/package/src/msg.rs +++ b/test-contracts/package/src/msg.rs @@ -13,7 +13,7 @@ pub struct OsmosisTestContractInstantiateMsg { #[cw_serde] pub struct AstroportContractInstantiateMsg { pub pair_addr: String, - pub lp_token_addr: String, + pub lp_token: String, pub incentives_addr: String, pub astro_token: AssetInfo, pub liquidity_manager_addr: String, diff --git a/test-helpers/src/astroport.rs b/test-helpers/src/astroport.rs index 7653c01..1de9a4e 100644 --- a/test-helpers/src/astroport.rs +++ b/test-helpers/src/astroport.rs @@ -296,13 +296,13 @@ pub fn instantiate_test_astroport_contract<'a, R: Runner<'a>>( pair_addr: String, incentives_addr: String, astro_token: AssetInfo, - lp_token_addr: String, + lp_token_denom: String, liquidity_manager_addr: String, signer: &SigningAccount, ) -> RunnerResult { let init_msg = AstroportContractInstantiateMsg { pair_addr, - lp_token_addr, + lp_token: lp_token_denom, incentives_addr, astro_token, liquidity_manager_addr, From 2155779568a4360180c3cc794813d1627d19d63a Mon Sep 17 00:00:00 2001 From: Pacman Date: Wed, 1 May 2024 16:37:24 +0200 Subject: [PATCH 02/12] refactor: remove copied astroport messages --- cw-dex-astroport/src/staking.rs | 47 ++++++--------------------------- 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/cw-dex-astroport/src/staking.rs b/cw-dex-astroport/src/staking.rs index a644545..54fe944 100644 --- a/cw-dex-astroport/src/staking.rs +++ b/cw-dex-astroport/src/staking.rs @@ -1,8 +1,8 @@ //! Staking/rewards traits implementations for Astroport use apollo_cw_asset::{AssetInfo, AssetList}; use apollo_utils::assets::separate_natives_and_cw20s; -use astroport::asset::{Asset as AstroAsset}; -use cosmwasm_schema::{cw_serde, QueryResponses}; +use astroport::asset::Asset as AstroAsset; +use cosmwasm_schema::cw_serde; use cosmwasm_std::{ coins, to_json_binary, Addr, CosmosMsg, Deps, Empty, Env, Event, QuerierWrapper, QueryRequest, Response, Uint128, WasmMsg, WasmQuery, @@ -19,46 +19,15 @@ pub struct AstroportStaking { pub incentives: Addr, } -#[cw_serde] -pub enum AstroportV5IncentivesExecuteMsg { - /// Stake LP tokens in the Generator. LP tokens staked on behalf of - /// recipient if recipient is set. Otherwise LP tokens are staked on - /// behalf of message sender. - Deposit { recipient: Option }, - /// Withdraw LP tokens from the Generator - Withdraw { - /// The LP token cw20 address or token factory denom - lp_token: String, - /// The amount to withdraw. Must not exceed total staked amount. - amount: Uint128, - }, - /// Update rewards and return it to user. - ClaimRewards { - /// The LP token cw20 address or token factory denom - lp_tokens: Vec, - }, -} - -/// We copied this in because versioning on Astroport is a mess and it's easier to simply copy it in. -/// These incentive related structs come from here: https://github.com/astroport-fi/hidden_astroport_core/blob/main/packages/astroport/src/incentives.rs#L92 -/// This will be released as Astroport V5 at some point in the future - -#[cw_serde] -#[derive(QueryResponses)] -pub enum AstroportV5IncentivesQueryMsg { - /// PendingToken returns the amount of rewards that can be claimed by an - /// account that deposited a specific LP token in a generator - #[returns(Vec)] - PendingRewards { lp_token: String, user: String }, -} - impl Staking for AstroportStaking {} impl Stake for AstroportStaking { fn stake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { let stake_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::Deposit { recipient: None })?, + msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Deposit { + recipient: None, + })?, funds: coins(amount.into(), self.lp_token.to_string()), }); @@ -85,7 +54,7 @@ impl Rewards for AstroportStaking { let claim_rewards_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::ClaimRewards { + msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::ClaimRewards { lp_tokens: vec![self.lp_token.to_string()], })?, funds: vec![], @@ -137,7 +106,7 @@ impl Rewards for AstroportStaking { let pending_rewards: Vec = querier .query::>(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&AstroportV5IncentivesQueryMsg::PendingRewards { + msg: to_json_binary(&astroport_v3::incentives::QueryMsg::PendingRewards { lp_token: self.lp_token.to_string(), user: user.to_string(), })?, @@ -154,7 +123,7 @@ impl Unstake for AstroportStaking { fn unstake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { let unstake_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&AstroportV5IncentivesExecuteMsg::Withdraw { + msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Withdraw { lp_token: self.lp_token.to_string(), amount, })?, From 6fb3624795ad48606f51706184d56a700425d77a Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 19:51:36 +0200 Subject: [PATCH 03/12] fix: separate stake msgs depending on assetinfo type --- cw-dex-astroport/src/staking.rs | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/cw-dex-astroport/src/staking.rs b/cw-dex-astroport/src/staking.rs index 54fe944..18081e5 100644 --- a/cw-dex-astroport/src/staking.rs +++ b/cw-dex-astroport/src/staking.rs @@ -7,6 +7,7 @@ use cosmwasm_std::{ coins, to_json_binary, Addr, CosmosMsg, Deps, Empty, Env, Event, QuerierWrapper, QueryRequest, Response, Uint128, WasmMsg, WasmQuery, }; +use cw20::Cw20ExecuteMsg; use cw_dex::traits::{Rewards, Stake, Staking, Unstake}; use cw_dex::CwDexError; @@ -23,13 +24,26 @@ impl Staking for AstroportStaking {} impl Stake for AstroportStaking { fn stake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { - let stake_msg = CosmosMsg::Wasm(WasmMsg::Execute { - contract_addr: self.incentives.to_string(), - msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Deposit { - recipient: None, - })?, - funds: coins(amount.into(), self.lp_token.to_string()), - }); + let stake_msg = match &self.lp_token { + AssetInfo::Cw20(cw20_addr) => CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: cw20_addr.to_string(), + msg: to_json_binary(&Cw20ExecuteMsg::Send { + contract: self.incentives.to_string(), + amount, + msg: to_json_binary(&astroport_v3::incentives::Cw20Msg::Deposit { + recipient: None, + })?, + })?, + funds: vec![], + }), + AssetInfo::Native(denom) => CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: self.incentives.to_string(), + msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Deposit { + recipient: None, + })?, + funds: coins(amount.into(), denom), + }), + }; let event = Event::new("apollo/cw-dex/stake") .add_attribute("type", "astroport_staking") From c1bdff2c56bb38476cdf5419f791e8a06521cfc2 Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 20:13:42 +0200 Subject: [PATCH 04/12] feat: update AstroportPool to use astroport v5 messaging --- Cargo.lock | 72 +++++++++++++++++++++-- Cargo.toml | 2 +- cw-dex-astroport/Cargo.toml | 4 +- cw-dex-astroport/src/lib.rs | 2 +- cw-dex-astroport/src/pool.rs | 47 +++++++++++---- cw-dex-astroport/src/staking.rs | 10 ++-- cw-dex-astroport/tests/astroport_tests.rs | 21 ++++--- 7 files changed, 124 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91cfe2e..e94ed2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -123,7 +123,7 @@ version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c001a7f97db88ffe6fc6cca97bbdbfe926e55599184921ff7e72cd47559440de" dependencies = [ - "astroport-circular-buffer", + "astroport-circular-buffer 0.1.0", "cosmwasm-schema", "cosmwasm-std", "cw-asset", @@ -135,6 +135,25 @@ dependencies = [ "uint", ] +[[package]] +name = "astroport" +version = "5.0.0-rc.1-tokenfactory" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf6999cd2652543814f071f6e67c718ad4608607c90bc3bc89566b8a5985db3" +dependencies = [ + "astroport-circular-buffer 0.2.0", + "cosmos-sdk-proto 0.19.0", + "cosmwasm-schema", + "cosmwasm-std", + "cw-asset", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw20 1.1.2", + "itertools 0.12.1", + "prost 0.11.9", + "uint", +] + [[package]] name = "astroport-circular-buffer" version = "0.1.0" @@ -147,6 +166,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "astroport-circular-buffer" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c7369d3c4126804f861620db2221c15b5fa7b7718f12180e265b087c933fb6" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 0.15.1", + "thiserror", +] + [[package]] name = "astroport-factory" version = "1.5.1" @@ -676,6 +707,17 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +[[package]] +name = "cosmos-sdk-proto" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" +dependencies = [ + "prost 0.11.9", + "prost-types 0.11.9", + "tendermint-proto 0.32.2", +] + [[package]] name = "cosmos-sdk-proto" version = "0.20.0" @@ -684,7 +726,7 @@ checksum = "32560304ab4c365791fd307282f76637213d8083c1a98490c35159cd67852237" dependencies = [ "prost 0.12.3", "prost-types 0.12.3", - "tendermint-proto", + "tendermint-proto 0.34.0", ] [[package]] @@ -694,7 +736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47126f5364df9387b9d8559dcef62e99010e1d4098f39eb3f7ee4b5c254e40ea" dependencies = [ "bip32", - "cosmos-sdk-proto", + "cosmos-sdk-proto 0.20.0", "ecdsa 0.16.9", "eyre", "k256 0.13.1", @@ -914,7 +956,7 @@ dependencies = [ "apollo-cw-asset", "apollo-utils", "astroport 2.9.0", - "astroport 3.11.1", + "astroport 5.0.0-rc.1-tokenfactory", "cosmwasm-schema", "cosmwasm-std", "cw-dex", @@ -3154,7 +3196,7 @@ dependencies = [ "signature 2.2.0", "subtle", "subtle-encoding", - "tendermint-proto", + "tendermint-proto 0.34.0", "time", "zeroize", ] @@ -3173,6 +3215,24 @@ dependencies = [ "url", ] +[[package]] +name = "tendermint-proto" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost 0.11.9", + "prost-types 0.11.9", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + [[package]] name = "tendermint-proto" version = "0.34.0" @@ -3213,7 +3273,7 @@ dependencies = [ "subtle-encoding", "tendermint", "tendermint-config", - "tendermint-proto", + "tendermint-proto 0.34.0", "thiserror", "time", "tokio", diff --git a/Cargo.toml b/Cargo.toml index f4a2de1..346263c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ osmosis-std = "0.22.0" cw-it = "0.3.0" apollo-utils = "0.1.0" astroport = "2.9.0" -astroport_v3 = { package = "astroport", version = "3.11.1" } +astroport_v5 = { package = "astroport", version = "5.0.0-rc.1-tokenfactory" } test-case = "3.0.0" proptest = "1.0.0" diff --git a/cw-dex-astroport/Cargo.toml b/cw-dex-astroport/Cargo.toml index 4122a02..976f77e 100644 --- a/cw-dex-astroport/Cargo.toml +++ b/cw-dex-astroport/Cargo.toml @@ -20,7 +20,7 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] cw-dex = { workspace = true } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true } +cosmwasm-std = { workspace = true, features = ["cosmwasm_1_1"] } apollo-cw-asset = { workspace = true, features = ["astroport"] } cw-utils = { workspace = true } cw20 = { workspace = true } @@ -28,7 +28,7 @@ apollo-utils = { workspace = true } # Astroport astroport = { workspace = true } -astroport_v3 = { workspace = true } +astroport_v5 = { workspace = true } cw2 = { workspace = true } [dev-dependencies] diff --git a/cw-dex-astroport/src/lib.rs b/cw-dex-astroport/src/lib.rs index 66173e1..3ba4f39 100644 --- a/cw-dex-astroport/src/lib.rs +++ b/cw-dex-astroport/src/lib.rs @@ -6,4 +6,4 @@ mod staking; pub use pool::AstroportPool; pub use staking::AstroportStaking; -pub use {astroport, astroport_v3}; +pub use {astroport, astroport_v5}; diff --git a/cw-dex-astroport/src/pool.rs b/cw-dex-astroport/src/pool.rs index 84d255f..ed84710 100644 --- a/cw-dex-astroport/src/pool.rs +++ b/cw-dex-astroport/src/pool.rs @@ -14,7 +14,7 @@ use cw20::Cw20ExecuteMsg; use cw_utils::Expiration; use apollo_utils::assets::separate_natives_and_cw20s; -use astroport::asset::{Asset as AstroAsset, PairInfo}; +use astroport::asset::Asset as AstroAsset; use astroport::factory::PairType; use astroport::pair::{ Cw20HookMsg as PairCw20HookMsg, ExecuteMsg as PairExecuteMsg, PoolResponse, @@ -30,7 +30,7 @@ pub struct AstroportPool { /// The address of the associated pair contract pub pair_addr: Addr, /// The address of the associated LP token contract - pub lp_token_addr: Addr, + pub lp_token: AssetInfo, /// The assets of the pool pub pool_assets: Vec, /// The type of pool represented: Constant product (*Xyk*) or *Stableswap* @@ -47,11 +47,14 @@ impl AstroportPool { pub fn new(deps: Deps, pair_addr: Addr, liquidity_manager: Addr) -> StdResult { let pair_info = deps .querier - .query_wasm_smart::(pair_addr.clone(), &PairQueryMsg::Pair {})?; + .query_wasm_smart::( + pair_addr.clone(), + &PairQueryMsg::Pair {}, + )?; // Validate pair type. We only support XYK, stable swap, and PCL pools match &pair_info.pair_type { - PairType::Custom(t) => match t.as_str() { + astroport_v5::factory::PairType::Custom(t) => match t.as_str() { "concentrated" => Ok(()), "astroport-pair-xyk-sale-tax" => Ok(()), _ => Err(StdError::generic_err("Custom pair type is not supported")), @@ -61,9 +64,13 @@ impl AstroportPool { Ok(Self { pair_addr, - lp_token_addr: pair_info.liquidity_token, - pool_assets: pair_info.asset_infos.into_elementwise(), - pair_type: pair_info.pair_type, + lp_token: AssetInfo::from_str(deps.api, &pair_info.liquidity_token), + pool_assets: pair_info + .asset_infos + .into_iter() + .map(|x| astroport_v5_assetinfo_to_assetinfo(x)) + .collect(), + pair_type: astroport_v5_pairtype_to_astroport_v3_pairtype(pair_info.pair_type), liquidity_manager, }) } @@ -103,7 +110,10 @@ impl AstroportPool { /// Returns the total supply of the associated LP token pub fn query_lp_token_supply(&self, querier: &QuerierWrapper) -> StdResult { - query_supply(querier, self.lp_token_addr.to_owned()) + match &self.lp_token { + AssetInfo::Native(denom) => Ok(querier.query_supply(denom)?.amount), + AssetInfo::Cw20(token_addr) => query_supply(querier, token_addr), + } } /// Queries the pair contract for the current pool state @@ -296,7 +306,7 @@ impl Pool for AstroportPool { )?; let lp_token = Asset { - info: AssetInfo::Cw20(self.lp_token_addr.clone()), + info: self.lp_token.clone(), amount, }; @@ -338,10 +348,27 @@ impl Pool for AstroportPool { } fn lp_token(&self) -> AssetInfo { - AssetInfoBase::Cw20(self.lp_token_addr.clone()) + self.lp_token.clone() } fn pool_assets(&self, _deps: Deps) -> StdResult> { Ok(self.pool_assets.clone()) } } + +pub fn astroport_v5_assetinfo_to_assetinfo(asset: astroport_v5::asset::AssetInfo) -> AssetInfo { + match asset { + astroport_v5::asset::AssetInfo::NativeToken { denom } => AssetInfo::native(denom), + astroport_v5::asset::AssetInfo::Token { contract_addr } => AssetInfo::cw20(contract_addr), + } +} + +pub fn astroport_v5_pairtype_to_astroport_v3_pairtype( + pair_type: astroport_v5::factory::PairType, +) -> PairType { + match pair_type { + astroport_v5::factory::PairType::Xyk {} => PairType::Xyk {}, + astroport_v5::factory::PairType::Stable {} => PairType::Stable {}, + astroport_v5::factory::PairType::Custom(pair_type) => PairType::Custom(pair_type), + } +} diff --git a/cw-dex-astroport/src/staking.rs b/cw-dex-astroport/src/staking.rs index 18081e5..5b3b1e0 100644 --- a/cw-dex-astroport/src/staking.rs +++ b/cw-dex-astroport/src/staking.rs @@ -30,7 +30,7 @@ impl Stake for AstroportStaking { msg: to_json_binary(&Cw20ExecuteMsg::Send { contract: self.incentives.to_string(), amount, - msg: to_json_binary(&astroport_v3::incentives::Cw20Msg::Deposit { + msg: to_json_binary(&astroport_v5::incentives::Cw20Msg::Deposit { recipient: None, })?, })?, @@ -38,7 +38,7 @@ impl Stake for AstroportStaking { }), AssetInfo::Native(denom) => CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Deposit { + msg: to_json_binary(&astroport_v5::incentives::ExecuteMsg::Deposit { recipient: None, })?, funds: coins(amount.into(), denom), @@ -68,7 +68,7 @@ impl Rewards for AstroportStaking { let claim_rewards_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::ClaimRewards { + msg: to_json_binary(&astroport_v5::incentives::ExecuteMsg::ClaimRewards { lp_tokens: vec![self.lp_token.to_string()], })?, funds: vec![], @@ -120,7 +120,7 @@ impl Rewards for AstroportStaking { let pending_rewards: Vec = querier .query::>(&QueryRequest::Wasm(WasmQuery::Smart { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&astroport_v3::incentives::QueryMsg::PendingRewards { + msg: to_json_binary(&astroport_v5::incentives::QueryMsg::PendingRewards { lp_token: self.lp_token.to_string(), user: user.to_string(), })?, @@ -137,7 +137,7 @@ impl Unstake for AstroportStaking { fn unstake(&self, _deps: Deps, _env: &Env, amount: Uint128) -> Result { let unstake_msg = CosmosMsg::Wasm(WasmMsg::Execute { contract_addr: self.incentives.to_string(), - msg: to_json_binary(&astroport_v3::incentives::ExecuteMsg::Withdraw { + msg: to_json_binary(&astroport_v5::incentives::ExecuteMsg::Withdraw { lp_token: self.lp_token.to_string(), amount, })?, diff --git a/cw-dex-astroport/tests/astroport_tests.rs b/cw-dex-astroport/tests/astroport_tests.rs index f155311..be6ebae 100644 --- a/cw-dex-astroport/tests/astroport_tests.rs +++ b/cw-dex-astroport/tests/astroport_tests.rs @@ -4,7 +4,7 @@ mod tests { use apollo_utils::coins::coin_from_str; use apollo_utils::submessages::{find_event, parse_attribute_value}; use astroport::factory::PairType; - use astroport_v3::asset::Asset as AstroportAsset; + use astroport_v5::asset::Asset as AstroportAsset; use cosmwasm_std::{assert_approx_eq, coin, coins, Addr, Coin, SubMsgResponse, Uint128}; use cw_dex_test_contract::msg::{AstroportExecuteMsg, ExecuteMsg, QueryMsg}; @@ -513,7 +513,7 @@ mod tests { for (incentive, periods) in incentives.clone() { // Increase allowance for cw20 incentives and construct funds let funds = match incentive.info.clone() { - astroport_v3::asset::AssetInfo::Token { contract_addr } => { + astroport_v5::asset::AssetInfo::Token { contract_addr } => { // Increase allowance for incentives contract wasm.execute( contract_addr.as_str(), @@ -528,15 +528,15 @@ mod tests { .unwrap(); vec![] } - astroport_v3::asset::AssetInfo::NativeToken { denom } => { + astroport_v5::asset::AssetInfo::NativeToken { denom } => { vec![coin(incentive.amount.u128(), &denom)] } }; wasm.execute( &astroport_contracts.incentives.address, - &astroport_v3::incentives::ExecuteMsg::Incentivize { + &astroport_v5::incentives::ExecuteMsg::Incentivize { lp_token: lp_token_addr.clone(), - schedule: astroport_v3::incentives::InputSchedule { + schedule: astroport_v5::incentives::InputSchedule { reward: incentive, duration_periods: periods, }, @@ -577,7 +577,7 @@ mod tests { let pending_rewards: Vec = wasm .query( &astroport_contracts.incentives.address, - &astroport_v3::incentives::QueryMsg::PendingRewards { + &astroport_v5::incentives::QueryMsg::PendingRewards { lp_token: lp_token_addr.clone(), user: testing_contract_addr.clone(), }, @@ -596,10 +596,10 @@ mod tests { for asset in pending_rewards.clone() { // Convert astroport asset info to asset info let asset_info = match asset.info { - astroport_v3::asset::AssetInfo::Token { contract_addr } => { + astroport_v5::asset::AssetInfo::Token { contract_addr } => { AssetInfo::Cw20(contract_addr) } - astroport_v3::asset::AssetInfo::NativeToken { denom } => AssetInfo::Native(denom), + astroport_v5::asset::AssetInfo::NativeToken { denom } => AssetInfo::Native(denom), }; let amount = cw_dex_pending_rewards.find(&asset_info).unwrap().amount; @@ -646,7 +646,10 @@ mod tests { .query::<_, AstroportPool>(&contract_addr, &query) .unwrap(); - assert_eq!(pool.lp_token_addr, Addr::unchecked(lp_token_addr)); + assert_eq!( + pool.lp_token, + AssetInfo::cw20(Addr::unchecked(lp_token_addr)) + ); assert_eq!(pool.pair_addr, Addr::unchecked(pair_addr)); assert_eq!( pool.pool_assets, From 2837738ea3525ec76bff16411201b54f34b2d0a8 Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 20:14:27 +0200 Subject: [PATCH 05/12] chore: bump cosmwasm-std to 1.5.4 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e94ed2b..5559984 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -752,9 +752,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9934c79e58d9676edfd592557dee765d2a6ef54c09d5aa2edb06156b00148966" +checksum = "e6b4c3f9c4616d6413d4b5fc4c270a4cc32a374b9be08671e80e1a019f805d8f" dependencies = [ "digest 0.10.7", "ecdsa 0.16.9", @@ -766,9 +766,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5e72e330bd3bdab11c52b5ecbdeb6a8697a004c57964caeb5d876f0b088b3c" +checksum = "c586ced10c3b00e809ee664a895025a024f60d65d34fe4c09daed4a4db68a3f3" dependencies = [ "syn 1.0.109", ] @@ -799,9 +799,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8666e572a3a2519010dde88c04d16e9339ae751b56b2bb35081fe3f7d6be74" +checksum = "712fe58f39d55c812f7b2c84e097cdede3a39d520f89b6dc3153837e31741927" dependencies = [ "base64 0.21.7", "bech32", diff --git a/Cargo.toml b/Cargo.toml index 346263c..96639e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ rust-version = "1.64.0" [workspace.dependencies] cosmwasm-schema = "1.2.1" -cosmwasm-std = "1.5.3" +cosmwasm-std = "1.5.4" cosmwasm-storage = "1.2.1" cw-storage-plus = "1.0" cw2 = "1.0" From ead2c6821ca22fcc33886ce6dcf8780a2305ff1c Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 20:19:38 +0200 Subject: [PATCH 06/12] style: clippy --- cw-dex-astroport/src/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw-dex-astroport/src/pool.rs b/cw-dex-astroport/src/pool.rs index ed84710..f02e4f2 100644 --- a/cw-dex-astroport/src/pool.rs +++ b/cw-dex-astroport/src/pool.rs @@ -68,7 +68,7 @@ impl AstroportPool { pool_assets: pair_info .asset_infos .into_iter() - .map(|x| astroport_v5_assetinfo_to_assetinfo(x)) + .map(astroport_v5_assetinfo_to_assetinfo) .collect(), pair_type: astroport_v5_pairtype_to_astroport_v3_pairtype(pair_info.pair_type), liquidity_manager, From 8932f5ed193f94dace2c452f1e621df7b8072fae Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 20:20:01 +0200 Subject: [PATCH 07/12] chore: bump cw-dex-astroport version and add changelog --- Cargo.lock | 2 +- Cargo.toml | 2 +- cw-dex-astroport/CHANGELOG.md | 14 ++++++++++++++ cw-dex-astroport/Cargo.toml | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 cw-dex-astroport/CHANGELOG.md diff --git a/Cargo.lock b/Cargo.lock index 5559984..eff3884 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -951,7 +951,7 @@ dependencies = [ [[package]] name = "cw-dex-astroport" -version = "0.1.1" +version = "0.2.0-rc.1" dependencies = [ "apollo-cw-asset", "apollo-utils", diff --git a/Cargo.toml b/Cargo.toml index 96639e6..e1e3459 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ proptest = "1.0.0" # Workspace packages cw-dex = { path = "cw-dex", version = "0.5.3" } -cw-dex-astroport = { path = "cw-dex-astroport", version = "0.1.1" } +cw-dex-astroport = { path = "cw-dex-astroport", version = "0.2.0-rc.1" } cw-dex-osmosis = { path = "cw-dex-osmosis", version = "0.1.0" } cw-dex-test-contract = { path = "test-contracts/package" } astroport-test-contract = { path = "test-contracts/astroport-test-contract" } diff --git a/cw-dex-astroport/CHANGELOG.md b/cw-dex-astroport/CHANGELOG.md new file mode 100644 index 0000000..6025781 --- /dev/null +++ b/cw-dex-astroport/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +# [0.2.0-rc.1] - 2024-05-01 + +### Changed + +- Bumped `astroport_v3` dependency alias of `astroport` package to `5.0.0-rc.1-tokenfactory`. +- Changed `AstroportStaking` field `lp_token_addr: Addr` to `lp_token: AssetInfo`. +- Changed `AstroportPool` field `lp_token_addr: Addr` to `lp_token: AssetInfo`. diff --git a/cw-dex-astroport/Cargo.toml b/cw-dex-astroport/Cargo.toml index 976f77e..4453add 100644 --- a/cw-dex-astroport/Cargo.toml +++ b/cw-dex-astroport/Cargo.toml @@ -5,7 +5,7 @@ description = "Implementation of the cw-dex API for the Astroport AMM" edition = "2021" license = "MPL-2.0" repository = "https://github.com/apollodao/cw-dex" -version = "0.1.1" +version = "0.2.0-rc.1" readme = "README.md" [features] From 639b112a5c589e3f436d3c3a7386be42cf3ba501 Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Wed, 1 May 2024 20:22:14 +0200 Subject: [PATCH 08/12] style: rename lp_token var in test-helper --- test-helpers/src/astroport.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-helpers/src/astroport.rs b/test-helpers/src/astroport.rs index 1de9a4e..0ce5374 100644 --- a/test-helpers/src/astroport.rs +++ b/test-helpers/src/astroport.rs @@ -296,13 +296,13 @@ pub fn instantiate_test_astroport_contract<'a, R: Runner<'a>>( pair_addr: String, incentives_addr: String, astro_token: AssetInfo, - lp_token_denom: String, + lp_token: String, liquidity_manager_addr: String, signer: &SigningAccount, ) -> RunnerResult { let init_msg = AstroportContractInstantiateMsg { pair_addr, - lp_token: lp_token_denom, + lp_token, incentives_addr, astro_token, liquidity_manager_addr, From f430780be9d73b529433dfc9a17549e57248530d Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Thu, 2 May 2024 11:26:01 +0200 Subject: [PATCH 09/12] build: run machete on stable rust --- Makefile.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index 90d450e..93d8466 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -106,7 +106,7 @@ args = [ # This task requires the `cargo-machete` package: https://crates.io/crates/cargo-machete [tasks.machete-check] -toolchain = "${NIGHTLY_VERSION}" +toolchain = "${RUST_VERSION}" command = "cargo" args = ["machete"] [tasks.machete-fix] From ed3297fbbf981b4bfdf87ae62736c51ccf0ecfea Mon Sep 17 00:00:00 2001 From: Sturdy <91910406+apollo-sturdy@users.noreply.github.com> Date: Thu, 2 May 2024 11:36:31 +0200 Subject: [PATCH 10/12] ci: install stable toolchain on lint job --- .github/workflows/lint-format.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index 882c6aa..7e338af 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -25,6 +25,9 @@ jobs: - name: Install nightly toolchain run: cargo make install-nightly + - name: Install stable toolchain + run: cargo make install-stable + - name: Run cargo clippy run: cargo make clippy-check From c7863cc5af4148c85526e0fe727f86ffc29f7072 Mon Sep 17 00:00:00 2001 From: ApolloGie Date: Tue, 25 Jun 2024 12:19:50 -0500 Subject: [PATCH 11/12] fix: bump to astroport v5 --- Cargo.lock | 6 ++--- Cargo.toml | 2 +- cw-dex-astroport/src/pool.rs | 46 ++++++++++++++++++++++++++++++++++-- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eff3884..85a37d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "astroport" -version = "5.0.0-rc.1-tokenfactory" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf6999cd2652543814f071f6e67c718ad4608607c90bc3bc89566b8a5985db3" +checksum = "314b84869c5e8cce3c9a7ec7d0a280350f8d2e8e05a772d8b14622da7263784e" dependencies = [ "astroport-circular-buffer 0.2.0", "cosmos-sdk-proto 0.19.0", @@ -956,7 +956,7 @@ dependencies = [ "apollo-cw-asset", "apollo-utils", "astroport 2.9.0", - "astroport 5.0.0-rc.1-tokenfactory", + "astroport 5.1.0", "cosmwasm-schema", "cosmwasm-std", "cw-dex", diff --git a/Cargo.toml b/Cargo.toml index e1e3459..9e79f43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ osmosis-std = "0.22.0" cw-it = "0.3.0" apollo-utils = "0.1.0" astroport = "2.9.0" -astroport_v5 = { package = "astroport", version = "5.0.0-rc.1-tokenfactory" } +astroport_v5 = { package = "astroport", version = "5.1.0" } test-case = "3.0.0" proptest = "1.0.0" diff --git a/cw-dex-astroport/src/pool.rs b/cw-dex-astroport/src/pool.rs index f02e4f2..96bd68e 100644 --- a/cw-dex-astroport/src/pool.rs +++ b/cw-dex-astroport/src/pool.rs @@ -7,8 +7,8 @@ use apollo_utils::iterators::IntoElementwise; use astroport::liquidity_manager; use cosmwasm_schema::cw_serde; use cosmwasm_std::{ - to_json_binary, wasm_execute, Addr, CosmosMsg, Decimal, Deps, Env, Event, QuerierWrapper, - QueryRequest, Response, StdError, StdResult, Uint128, WasmMsg, WasmQuery, + coins, to_json_binary, wasm_execute, Addr, CosmosMsg, Decimal, Deps, Env, Event, + QuerierWrapper, QueryRequest, Response, StdError, StdResult, Uint128, WasmMsg, WasmQuery, }; use cw20::Cw20ExecuteMsg; use cw_utils::Expiration; @@ -218,6 +218,39 @@ impl Pool for AstroportPool { funds: vec![], }); + let event = Event::new("apollo/cw-dex/withdraw_liquidity") + .add_attribute("pair_addr", &self.pair_addr) + .add_attribute("asset", format!("{:?}", asset)) + .add_attribute("token_amount", asset.amount); + + Ok(Response::new() + .add_message(withdraw_liquidity) + .add_event(event)) + } else if let AssetInfoBase::Native(token_denom) = &asset.info { + // Liquidity manager requires min_out to contain all assets in the pool + for asset in &self.pool_assets { + if min_out.find(asset).is_none() { + // Add one unit as AssetList does not allow zero amounts (calls self.purge on + // add) + min_out.add(&Asset::new(asset.clone(), Uint128::one()))?; + } + } + + let withdraw_liquidity = CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: self.pair_addr.to_string(), + msg: to_json_binary(&astroport_v5::pair::ExecuteMsg::WithdrawLiquidity { + assets: vec![asset_to_astroport_v5_asset(asset.clone())], + min_assets_to_receive: Some( + min_out + .to_vec() + .into_iter() + .map(asset_to_astroport_v5_asset) + .collect(), + ), + })?, + funds: coins(asset.amount.u128(), token_denom), + }); + let event = Event::new("apollo/cw-dex/withdraw_liquidity") .add_attribute("pair_addr", &self.pair_addr) .add_attribute("asset", format!("{:?}", asset)) @@ -363,6 +396,15 @@ pub fn astroport_v5_assetinfo_to_assetinfo(asset: astroport_v5::asset::AssetInfo } } +pub fn asset_to_astroport_v5_asset(asset: Asset) -> astroport_v5::asset::Asset { + match asset.info { + AssetInfoBase::Native(denom) => astroport_v5::asset::Asset::native(denom, asset.amount), + AssetInfo::Cw20(contract_addr) => { + astroport_v5::asset::Asset::cw20(contract_addr, asset.amount) + } + } +} + pub fn astroport_v5_pairtype_to_astroport_v3_pairtype( pair_type: astroport_v5::factory::PairType, ) -> PairType { From 4ee80b7e2add9fbe4f2be942762d04696cf288cf Mon Sep 17 00:00:00 2001 From: ApolloGie Date: Wed, 26 Jun 2024 19:52:05 -0500 Subject: [PATCH 12/12] fix: bump cw-it --- Cargo.lock | 520 +++++++++++++++++++++++++++++++++++++---------------- Cargo.toml | 2 +- 2 files changed, 364 insertions(+), 158 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85a37d8..86e8978 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "astro-satellite-package" -version = "0.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cf737cf762c341a9575ee8fc6da47cc0c4ec11725c9fd0fc5fbb2c31ce0d61a" +checksum = "893363819104a2a4685d99f19e35e5d81102fb782e622619ac643e54ff65d638" dependencies = [ "astroport-governance", "cosmwasm-schema", @@ -135,6 +135,23 @@ dependencies = [ "uint", ] +[[package]] +name = "astroport" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5ec8dd4298b362361b0e118107a060e5e58501a68273b3257059c96b723b57c" +dependencies = [ + "astroport-circular-buffer 0.2.0", + "cosmwasm-schema", + "cosmwasm-std", + "cw-asset", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw20 1.1.2", + "itertools 0.12.1", + "uint", +] + [[package]] name = "astroport" version = "5.1.0" @@ -180,35 +197,17 @@ dependencies = [ [[package]] name = "astroport-factory" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ecf768e2d3153bebfbe0c502ffa4199a52598e9b6e89fca54339615b2de77eb" -dependencies = [ - "astroport 2.9.0", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", - "itertools 0.10.5", - "protobuf", - "thiserror", -] - -[[package]] -name = "astroport-generator" -version = "2.3.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6144780ac014665b07616de0cfb35ca6a9411ed821e20c21e02f4f428c8ed51f" +checksum = "68abcc896255acba2f4aa39f239a1e8361a6035d7bc712442da122dc31f6f959" dependencies = [ - "astroport 2.9.0", - "astroport-governance", + "astroport 5.1.0", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw1-whitelist", - "cw2 0.15.1", - "cw20 0.15.1", - "protobuf", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "itertools 0.12.1", "thiserror", ] @@ -227,52 +226,34 @@ dependencies = [ [[package]] name = "astroport-incentives" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba05c27479d2885ba313086aa0b7d09284f1393f1ebb6d385f96d93b3c6fb72a" +checksum = "0faeda17ac97ec8bc9d20cde1df9e036bfc723e3287f749ee9267fde5701f648" dependencies = [ - "astroport 3.11.1", + "astroport 4.0.3", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 1.2.0", "cw-utils 1.0.3", "cw2 1.1.2", "cw20 1.1.2", - "itertools 0.11.0", - "thiserror", -] - -[[package]] -name = "astroport-liquidity-manager" -version = "1.0.3-astroport-v2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae4bf7689e7c37cfecc200aab3401c1ff6a507cccc9fb1baadfa71a73addaa2f" -dependencies = [ - "astroport 2.9.0", - "astroport-factory", - "astroport-pair", - "astroport-pair-stable", - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw20 0.15.1", - "cw20-base 0.15.1", + "itertools 0.12.1", "thiserror", ] [[package]] name = "astroport-maker" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92403e5d00e3c77d13d9616661ea9d9308d493fff6bec5e6e5e7bd7b7e0ff6af" +checksum = "38fac94577669cb3cb5ce961bb942ea22f0901fded50dcbfdefd5b765edef081" dependencies = [ "astro-satellite-package", - "astroport 2.9.0", + "astroport 4.0.3", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", + "cw20 1.1.2", "thiserror", ] @@ -293,63 +274,82 @@ dependencies = [ [[package]] name = "astroport-pair" -version = "1.3.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e760b91eaf269bb2843b75b34eb73d474374bd2ebefbbe3cdb0a58d69959573b" +checksum = "9a5e6cd4508d45d89f9f44b607eb482aa614fa54274c46746d6f251bf10b27ae" dependencies = [ - "astroport 2.9.0", + "astroport 5.1.0", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "integer-sqrt", - "protobuf", "thiserror", ] [[package]] name = "astroport-pair-concentrated" -version = "1.2.7" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04a90ce51403c81af3acf8e7028bb0eb095fce802365453b7e4a13bc0eb0d6d7" +checksum = "4a32d9cadee60182935879a465d7bff7733b917e814ce29d97d6903f7336119a" dependencies = [ - "astroport 2.9.0", + "astroport 5.1.0", + "astroport-circular-buffer 0.2.0", "astroport-factory", + "astroport-pcl-common", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw-utils 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", - "itertools 0.10.5", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "itertools 0.12.1", "thiserror", ] [[package]] name = "astroport-pair-stable" -version = "2.1.3" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d052966163fc2dd3eb46ae3c948ee7032a28726e046bc44431f9b488cb1dba90" +checksum = "3386d5771faedd33fc7741cb0a7082cbdc0416d42f1bd051d4f1a0b987248e3c" dependencies = [ - "astroport 2.9.0", + "astroport 5.1.0", + "astroport-circular-buffer 0.2.0", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", + "cw-storage-plus 1.2.0", "cw-utils 1.0.3", - "cw2 0.15.1", - "cw20 0.15.1", - "itertools 0.10.5", + "cw2 1.1.2", + "cw20 1.1.2", + "itertools 0.12.1", + "thiserror", +] + +[[package]] +name = "astroport-pcl-common" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a810d9ff3459d62a6288314c01201b4270e96fa518bfa36ef759a4c76b87334f" +dependencies = [ + "astroport 5.1.0", + "astroport-factory", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw20 1.1.2", + "itertools 0.12.1", "thiserror", ] [[package]] name = "astroport-router" -version = "1.1.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bbb33c00370bd194cf3a166f1e3f4029a2add2bea01a5eb61e886aefbc85b" +checksum = "c2aa8511eeb2fde51a070ccc7a93259e88c0d88c4380930dd307e89f09d84fda" dependencies = [ - "astroport 2.9.0", + "astroport 3.11.1", "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 0.15.1", @@ -361,17 +361,16 @@ dependencies = [ [[package]] name = "astroport-staking" -version = "1.1.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67adbc4240794e886ca1edbc7d46bc8a54c7aca7217d73ddcfbc90e1dbb030e7" +checksum = "315e43350f20d04f8d65bbb4d29ae423eea2fb12e292f0185b983a210d1c6d1a" dependencies = [ - "astroport 2.9.0", - "cosmwasm-schema", + "astroport 4.0.3", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", - "protobuf", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "osmosis-std 0.21.0", "thiserror", ] @@ -406,31 +405,31 @@ dependencies = [ [[package]] name = "astroport-vesting" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffce7cf86bf4d4f177ef941145352499e802abc4b898032af7808d16cca6371" +checksum = "871f8f0f390245642ccc1ec10c7f79b440979187a98aa8b0246269d6a4e0172c" dependencies = [ - "astroport 2.9.0", + "astroport 4.0.3", "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw-utils 0.15.1", - "cw2 0.15.1", - "cw20 0.15.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", "thiserror", ] [[package]] name = "astroport-whitelist" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44156757bfab3d4bd208d9b86b890d1478f45d07c8f8d3d1c3e3da91081cb54d" +checksum = "ecc56be98fb0fad68549e2af01b03322476b5b163f2ebbb579d19a96eec73e6f" dependencies = [ - "astroport 2.9.0", "cosmwasm-schema", "cosmwasm-std", "cw1-whitelist", - "cw2 0.15.1", + "cw2 1.1.2", + "neutron-sdk", "thiserror", ] @@ -478,12 +477,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -567,6 +560,9 @@ name = "bitflags" version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +dependencies = [ + "serde", +] [[package]] name = "block-buffer" @@ -668,11 +664,12 @@ dependencies = [ [[package]] name = "config" -version = "0.13.4" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" dependencies = [ "async-trait", + "convert_case", "json5", "lazy_static", "nom", @@ -681,7 +678,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml", + "toml 0.8.14", "yaml-rust", ] @@ -691,6 +688,35 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -752,9 +778,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b4c3f9c4616d6413d4b5fc4c270a4cc32a374b9be08671e80e1a019f805d8f" +checksum = "dd50718a2b6830ce9eb5d465de5a018a12e71729d66b70807ce97e6dd14f931d" dependencies = [ "digest 0.10.7", "ecdsa 0.16.9", @@ -766,9 +792,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c586ced10c3b00e809ee664a895025a024f60d65d34fe4c09daed4a4db68a3f3" +checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" dependencies = [ "syn 1.0.109", ] @@ -799,11 +825,11 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712fe58f39d55c812f7b2c84e097cdede3a39d520f89b6dc3153837e31741927" +checksum = "78c1556156fdf892a55cced6115968b961eaaadd6f724a2c2cb7d1e168e32dd3" dependencies = [ - "base64 0.21.7", + "base64", "bech32", "bnum", "cosmwasm-crypto", @@ -813,7 +839,7 @@ dependencies = [ "hex", "schemars", "serde", - "serde-json-wasm", + "serde-json-wasm 0.5.2", "sha2 0.10.8", "static_assertions", "thiserror", @@ -1017,19 +1043,17 @@ dependencies = [ [[package]] name = "cw-it" -version = "0.3.0" +version = "0.4.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1bd88c423ae22eefe99b1b008c8b2d7936def56cfb0c65f6ccf634a0988d7b0" +checksum = "ee449baa2583685117ee79e3de561475c1bbf759f9bbda6142d8fc5496bb91f5" dependencies = [ "anyhow", "apollo-cw-multi-test", "apollo-utils", "astroport 2.9.0", - "astroport 3.11.1", + "astroport 5.1.0", "astroport-factory", - "astroport-generator", "astroport-incentives", - "astroport-liquidity-manager", "astroport-maker", "astroport-native-coin-registry", "astroport-pair", @@ -1045,14 +1069,14 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw20 0.15.1", - "osmosis-std 0.22.0", + "osmosis-std 0.25.0", "osmosis-test-tube", "paste", "proptest", "prost 0.12.3", "regex", "serde", - "strum", + "strum 0.24.1", "test-tube", "thiserror", ] @@ -1111,9 +1135,9 @@ dependencies = [ [[package]] name = "cw1" -version = "0.15.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe0783ec4210ba4e0cdfed9874802f469c6db0880f742ad427cb950e940b21c" +checksum = "f1605722190afd93bfea6384b88224d1cfe50ebf70d2e10641535da79fa70e83" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1123,16 +1147,16 @@ dependencies = [ [[package]] name = "cw1-whitelist" -version = "0.15.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233dd13f61495f1336da57c8bdca0536fa9f8dd59c12d2bbfc59928ea580e478" +checksum = "81bb3e9dc87f4ff26547f4e27e0ba3c82034372f21b2f55527fb52b542637d8d" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw-storage-plus 0.15.1", - "cw-utils 0.15.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", "cw1", - "cw2 0.15.1", + "cw2 1.1.2", "schemars", "serde", "thiserror", @@ -1305,9 +1329,12 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] [[package]] name = "doc-comment" @@ -1669,6 +1696,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + [[package]] name = "hashbrown" version = "0.14.3" @@ -1993,6 +2026,27 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "neutron-sdk" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f60e477bd71007d9ff78ae020ec1c6b3b47798578af6151429434d86472efc" +dependencies = [ + "bech32", + "cosmos-sdk-proto 0.20.0", + "cosmwasm-schema", + "cosmwasm-std", + "prost 0.12.3", + "prost-types 0.12.3", + "protobuf", + "schemars", + "serde", + "serde-json-wasm 1.0.1", + "speedate", + "tendermint-proto 0.34.0", + "thiserror", +] + [[package]] name = "nom" version = "7.1.3" @@ -2069,12 +2123,12 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "ordered-multimap" -version = "0.4.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" dependencies = [ "dlv-list", - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -2093,6 +2147,22 @@ dependencies = [ "serde-cw-value", ] +[[package]] +name = "osmosis-std" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87adf61f03306474ce79ab322d52dfff6b0bcf3aed1e12d8864ac0400dec1bf" +dependencies = [ + "chrono", + "cosmwasm-std", + "osmosis-std-derive 0.20.1", + "prost 0.12.3", + "prost-types 0.12.3", + "schemars", + "serde", + "serde-cw-value", +] + [[package]] name = "osmosis-std" version = "0.22.0" @@ -2109,6 +2179,22 @@ dependencies = [ "serde-cw-value", ] +[[package]] +name = "osmosis-std" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca66dca7e8c9b11b995cd41a44c038134ccca4469894d663d8a9452d6e716241" +dependencies = [ + "chrono", + "cosmwasm-std", + "osmosis-std-derive 0.20.1", + "prost 0.12.3", + "prost-types 0.12.3", + "schemars", + "serde", + "serde-cw-value", +] + [[package]] name = "osmosis-std-derive" version = "0.16.2" @@ -2151,15 +2237,15 @@ dependencies = [ [[package]] name = "osmosis-test-tube" -version = "22.1.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a082b97136d15470a37aa758f227c865594590b69d74721248ed5adf59bf1ca2" +checksum = "5eb35dcc9adc1b39e23dfae07c9f04a60187fde57a52b7762434ea6548581a1a" dependencies = [ - "base64 0.21.7", + "base64", "bindgen", "cosmrs", "cosmwasm-std", - "osmosis-std 0.22.0", + "osmosis-std 0.25.0", "prost 0.12.3", "serde", "serde_json", @@ -2449,11 +2535,22 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.28.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +checksum = "df67496db1a89596beaced1579212e9b7c53c22dca1d9745de00ead76573d514" dependencies = [ - "bytes", + "once_cell", + "protobuf-support", + "thiserror", +] + +[[package]] +name = "protobuf-support" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e2d30ab1878b2e72d1e2fc23ff5517799c9929e2cf81a8516f9f4dcf2b9cf3" +dependencies = [ + "thiserror", ] [[package]] @@ -2551,7 +2648,7 @@ version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ - "base64 0.21.7", + "base64", "bytes", "encoding_rs", "futures-core", @@ -2632,20 +2729,21 @@ dependencies = [ [[package]] name = "ron" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64", + "bitflags 2.4.2", "serde", + "serde_derive", ] [[package]] name = "rust-ini" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" dependencies = [ "cfg-if", "ordered-multimap", @@ -2706,7 +2804,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.7", + "base64", ] [[package]] @@ -2879,6 +2977,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-json-wasm" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -2932,6 +3039,15 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3034,6 +3150,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "speedate" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "242f76c50fd18cbf098607090ade73a08d39cfd84ea835f3796a2c855223b19b" +dependencies = [ + "strum 0.25.0", + "strum_macros 0.25.3", +] + [[package]] name = "spin" version = "0.9.8" @@ -3072,7 +3198,16 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros 0.25.3", ] [[package]] @@ -3088,6 +3223,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", +] + [[package]] name = "subtle" version = "2.5.0" @@ -3211,7 +3359,7 @@ dependencies = [ "serde", "serde_json", "tendermint", - "toml", + "toml 0.5.11", "url", ] @@ -3318,14 +3466,14 @@ dependencies = [ [[package]] name = "test-tube" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09184c7655b2bdaf4517b06141a2e4c44360904f2706a05b24c831bd97ad1db6" +checksum = "804bb9bda992b6cda6f883e7973cb999d4da90d21257fb918d6a693407148681" dependencies = [ - "base64 0.21.7", + "base64", "cosmrs", "cosmwasm-std", - "osmosis-std 0.22.0", + "osmosis-std 0.25.0", "prost 0.12.3", "serde", "serde_json", @@ -3382,6 +3530,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -3458,6 +3615,40 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -3540,6 +3731,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "untrusted" version = "0.9.0" @@ -3854,6 +4051,15 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 9e79f43..cb28c5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ serde = { version = "1.0.145", default-features = false, features = ["derive"] } thiserror = { version = "1.0.31" } apollo-cw-asset = "0.1.1" osmosis-std = "0.22.0" -cw-it = "0.3.0" +cw-it = "0.4.0-rc.1" apollo-utils = "0.1.0" astroport = "2.9.0" astroport_v5 = { package = "astroport", version = "5.1.0" }