From 8f3b9bbca944fdb6c94e77c7f5208f7fb13878f1 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:04:15 -0300 Subject: [PATCH 1/8] Forced cosmwasm packages to version compatible with 1.2.7 --- Cargo.lock | 54 +++------ contracts/atomic-order-example/src/helpers.rs | 4 +- contracts/atomic-order-example/src/tests.rs | 4 +- contracts/dummy/src/contract.rs | 10 +- packages/injective-cosmwasm/Cargo.toml | 6 +- .../src/exchange_mock_querier.rs | 110 +++++++++--------- packages/injective-math/Cargo.toml | 4 +- packages/injective-protobuf/Cargo.toml | 4 +- packages/injective-std/Cargo.toml | 2 +- packages/injective-testing/Cargo.toml | 2 +- packages/injective-testing/src/chain_mock.rs | 6 +- 11 files changed, 93 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86ddeff3..7a62af65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -88,24 +88,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - [[package]] name = "base64ct" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bitflags" version = "1.3.2" @@ -130,12 +118,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bnum" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" - [[package]] name = "bumpalo" version = "3.14.0" @@ -229,9 +211,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.5.0" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" +checksum = "230e5d1cefae5331db8934763c81b9c871db6a2cd899056a5694fa71d292c815" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -242,9 +224,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.5.0" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" +checksum = "43dadf7c23406cb28079d69e6cb922c9c29b9157b0fe887e3b79c783b7d4bcb8" dependencies = [ "proc-macro2", "quote", @@ -253,13 +235,11 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.0" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" +checksum = "4337eef8dfaf8572fe6b6b415d6ec25f9308c7bb09f2da63789209fb131363be" dependencies = [ - "base64 0.21.5", - "bech32", - "bnum", + "base64", "cosmwasm-crypto", "cosmwasm-derive", "derivative", @@ -269,15 +249,15 @@ dependencies = [ "serde 1.0.192", "serde-json-wasm 0.5.1", "sha2 0.10.8", - "static_assertions 1.1.0", "thiserror", + "uint 0.9.5", ] [[package]] name = "cosmwasm-storage" -version = "1.5.0" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4" +checksum = "e8601d284db8776e39fe99b3416516c5636ca73cef14666b7bb9648ca32c4b89" dependencies = [ "cosmwasm-std", "serde 1.0.192", @@ -354,7 +334,7 @@ dependencies = [ "anyhow", "cosmwasm-std", "cw-storage-plus 1.1.0", - "cw-utils 1.0.2", + "cw-utils 1.0.1", "derivative", "itertools", "k256 0.11.6", @@ -403,13 +383,13 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cw2 1.1.1", + "cw2 1.1.0", "schemars", "semver", "serde 1.0.192", @@ -431,9 +411,9 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" +checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -950,7 +930,7 @@ name = "injective-testing" version = "0.1.4" dependencies = [ "anyhow", - "base64 0.13.1", + "base64", "cosmwasm-std", "cw-multi-test", "injective-cosmwasm", diff --git a/contracts/atomic-order-example/src/helpers.rs b/contracts/atomic-order-example/src/helpers.rs index 3f3fe182..30567ade 100644 --- a/contracts/atomic-order-example/src/helpers.rs +++ b/contracts/atomic-order-example/src/helpers.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_json_binary, Addr, CosmosMsg, StdResult, SubMsg, WasmMsg}; +use cosmwasm_std::{to_binary, Addr, CosmosMsg, StdResult, SubMsg, WasmMsg}; use injective_cosmwasm::InjectiveMsgWrapper; use injective_math::FPDecimal; use schemars::JsonSchema; @@ -17,7 +17,7 @@ impl CwTemplateContract { } pub fn call>(&self, msg: T) -> StdResult { - let msg = to_json_binary(&msg.into())?; + let msg = to_binary(&msg.into())?; Ok(WasmMsg::Execute { contract_addr: self.addr().into(), msg, diff --git a/contracts/atomic-order-example/src/tests.rs b/contracts/atomic-order-example/src/tests.rs index 7dc618c7..5ceb70a4 100644 --- a/contracts/atomic-order-example/src/tests.rs +++ b/contracts/atomic-order-example/src/tests.rs @@ -2,7 +2,7 @@ use std::str::FromStr; use cosmwasm_std::testing::{mock_info, MockApi, MockStorage}; use cosmwasm_std::{ - coins, to_json_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, + coins, to_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, Reply, SubMsgResponse, SubMsgResult, SystemResult, Uint128, }; @@ -138,7 +138,7 @@ fn create_spot_market_handler() -> impl HandlesMarketIdQuery { min_quantity_tick_size: FPDecimal::from_str("1000000000000000").unwrap(), }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Temp() diff --git a/contracts/dummy/src/contract.rs b/contracts/dummy/src/contract.rs index b1c2378f..2776b61e 100644 --- a/contracts/dummy/src/contract.rs +++ b/contracts/dummy/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, + to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult, }; use cw2::set_contract_version; use cw_storage_plus::Item; @@ -44,7 +44,7 @@ pub fn execute( match msg { ExecuteMsg::Ping { .. } => { let mut response = Response::new(); - response.data = Some(to_json_binary("pong")?); + response.data = Some(to_binary("pong")?); Ok(response) } ExecuteMsg::Error { .. } => Err(ContractError::Std(StdError::generic_err("oh no!"))), @@ -71,15 +71,15 @@ pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result StdResult { match msg { - QueryMsg::Ping { .. } => to_json_binary("pong"), + QueryMsg::Ping { .. } => to_binary("pong"), QueryMsg::Error { .. } => Err(StdError::generic_err("oh no!")), QueryMsg::Runs {} => { let runs_count = COUNTER.load(deps.storage)?; - to_json_binary(&format!("{runs_count}")) + to_binary(&format!("{runs_count}")) } QueryMsg::Active {} => { let is_active = ACTIVE.load(deps.storage)?; - to_json_binary(&format!("{is_active}")) + to_binary(&format!("{is_active}")) } } } diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index 68271625..cd73f04d 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -15,8 +15,8 @@ version = "0.2.16" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } -cw-storage-plus = { version = "0.16.0" } +cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } +cw-storage-plus = { version = "=0.16.0" } ethereum-types = { version = "0.5.2" } hex = { version = "0.4.3", features = [ "serde" ] } injective-math = { path = "../injective-math", version = "0.2.2" } @@ -27,6 +27,6 @@ subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } tiny-keccak = "1.2.1" [dev-dependencies] -cosmwasm-schema = { version = "1.2.7" } +cosmwasm-schema = { version = "=1.2.7" } serde-json-wasm = { version = "0.4.1" } serde_test = { version = "1.0.166" } diff --git a/packages/injective-cosmwasm/src/exchange_mock_querier.rs b/packages/injective-cosmwasm/src/exchange_mock_querier.rs index 42081c72..689529d8 100644 --- a/packages/injective-cosmwasm/src/exchange_mock_querier.rs +++ b/packages/injective-cosmwasm/src/exchange_mock_querier.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use cosmwasm_std::testing::{MockApi, MockStorage}; use cosmwasm_std::{ - from_json, to_json_binary, Addr, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, + from_slice, to_binary, Addr, AllBalanceResponse, BalanceResponse, BankQuery, Binary, Coin, ContractResult, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, WasmQuery, }; @@ -49,7 +49,7 @@ fn default_subaccount_deposit_response_handler() -> QuerierResult { total_balance: FPDecimal::from(10_000_000_000u128), }, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_spot_market_response_handler(market_id: MarketId) -> QuerierResult { @@ -67,22 +67,22 @@ fn default_spot_market_response_handler(market_id: MarketId) -> QuerierResult { min_quantity_tick_size: FPDecimal::from_str("1000000000000000.0").unwrap(), }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_spot_orders_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_spot_orders_to_cancel_up_to_amount_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_derivative_orders_to_cancel_up_to_amount_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_derivative_market_response_handler(market_id: MarketId) -> QuerierResult { @@ -109,7 +109,7 @@ fn default_derivative_market_response_handler(market_id: MarketId) -> QuerierRes mark_price: FPDecimal::ONE, }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_subaccount_positions_response_handler() -> QuerierResult { @@ -118,37 +118,37 @@ fn default_subaccount_positions_response_handler() -> QuerierResult { fn default_subaccount_position_in_market_response_handler() -> QuerierResult { let response = SubaccountPositionInMarketResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_subaccount_effective_position_in_market_response_handler() -> QuerierResult { let response = SubaccountEffectivePositionInMarketResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_derivative_orders_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_transient_spot_orders_response_handler() -> QuerierResult { let response = TraderSpotOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_trader_transient_derivative_orders_response_handler() -> QuerierResult { let response = TraderDerivativeOrdersResponse { orders: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_perpetual_market_info_response_handler() -> QuerierResult { let response = PerpetualMarketInfoResponse { info: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_perpetual_market_funding_response_handler() -> QuerierResult { let response = PerpetualMarketFundingResponse { state: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_market_volatility_response_handler() -> QuerierResult { @@ -157,7 +157,7 @@ fn default_market_volatility_response_handler() -> QuerierResult { history_metadata: None, raw_history: None, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_spot_market_mid_price_and_tob_response_handler() -> QuerierResult { @@ -166,7 +166,7 @@ fn default_spot_market_mid_price_and_tob_response_handler() -> QuerierResult { best_buy_price: None, best_sell_price: None, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_derivative_market_mid_price_and_tob_response_handler() -> QuerierResult { @@ -175,7 +175,7 @@ fn default_derivative_market_mid_price_and_tob_response_handler() -> QuerierResu best_buy_price: None, best_sell_price: None, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_aggregate_market_volume_handler() -> QuerierResult { @@ -185,7 +185,7 @@ fn default_aggregate_market_volume_handler() -> QuerierResult { taker_volume: FPDecimal::from(100u128), }, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_aggregate_account_volume_handler() -> QuerierResult { @@ -207,17 +207,17 @@ fn default_aggregate_account_volume_handler() -> QuerierResult { }, ], }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_denom_decimal_handler() -> QuerierResult { let response = QueryDenomDecimalResponse { decimals: 6 }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_denom_decimals_handler() -> QuerierResult { let response = QueryDenomDecimalsResponse { denom_decimals: vec![] }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_oracle_volatility_response_handler() -> QuerierResult { @@ -226,7 +226,7 @@ fn default_oracle_volatility_response_handler() -> QuerierResult { history_metadata: None, raw_history: None, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_pyth_price_response_handler() -> QuerierResult { @@ -244,40 +244,40 @@ fn default_pyth_price_response_handler() -> QuerierResult { }, }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_token_factory_denom_total_supply_handler() -> QuerierResult { let response = TokenFactoryDenomSupplyResponse { total_supply: Uint128::from(1000u128), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_token_factory_denom_creation_fee_handler() -> QuerierResult { let response = TokenFactoryCreateDenomFeeResponse { fee: vec![Coin::new(10, "inj")], }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_contract_registration_info_response_handler() -> QuerierResult { let response = QueryContractRegistrationInfoResponse { contract: None }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_balance_bank_query_handler(denom: impl Into) -> QuerierResult { let response = BalanceResponse { amount: Coin::new(1000000000000000, denom), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_all_balances_bank_query_handler() -> QuerierResult { let response = AllBalanceResponse { amount: vec![Coin::new(1000000000000000, "inj")], }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_exchange_params_response_handler() -> QuerierResult { @@ -311,7 +311,7 @@ fn default_exchange_params_response_handler() -> QuerierResult { is_instant_derivative_market_launch_enabled: Some(true), }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_spot_market_orderbook_response_handler() -> QuerierResult { @@ -322,7 +322,7 @@ fn default_spot_market_orderbook_response_handler() -> QuerierResult { PriceLevel::new(12u128.into(), 10u128.into()), ], }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_derivative_market_orderbook_response_handler() -> QuerierResult { @@ -333,14 +333,14 @@ fn default_derivative_market_orderbook_response_handler() -> QuerierResult { PriceLevel::new(12u128.into(), 10u128.into()), ], }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } fn default_market_atomic_execution_fee_multiplier_response_handler() -> QuerierResult { let response = QueryMarketAtomicExecutionFeeMultiplierResponse { multiplier: FPDecimal::from_str("2.0").unwrap(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } pub trait HandlesSmartQuery { @@ -503,7 +503,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: QueryRequest = match from_json(bin_request) { + let request: QueryRequest = match from_slice(bin_request) { Ok(v) => v, Err(e) => { return SystemResult::Err(SystemError::InvalidRequest { @@ -781,7 +781,7 @@ impl TestDeposit { pub mod handlers { use cosmwasm_std::{ - to_json_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, + to_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, Uint128, }; use std::collections::HashMap; @@ -826,7 +826,7 @@ pub mod handlers { total_balance: matching_coins.first().unwrap().amount, }, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { coins })) @@ -851,7 +851,7 @@ pub mod handlers { let response = SubaccountDepositResponse { deposits: matching_deposits.first().unwrap().deposit.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { deposits })) @@ -876,7 +876,7 @@ pub mod handlers { let response = SpotMarketResponse { market: self.market.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { market })) @@ -897,7 +897,7 @@ pub mod handlers { buys_price_level: if order_side != OrderSide::Sell { price_levels.clone() } else { vec![] }, sells_price_level: if order_side != OrderSide::Buy { price_levels } else { vec![] }, }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { orderbooks })) @@ -913,7 +913,7 @@ pub mod handlers { let response = SpotMarketResponse { market: self.markets.get(&market_id).cloned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } @@ -946,7 +946,7 @@ pub mod handlers { let response = TraderSpotOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { orders, assertion })) @@ -977,7 +977,7 @@ pub mod handlers { let response = TraderDerivativeOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { orders, assertion })) @@ -1002,7 +1002,7 @@ pub mod handlers { mark_price: self.mark_price.to_owned(), }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { market, info, mark_price })) @@ -1017,7 +1017,7 @@ pub mod handlers { let response = TraderSpotOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { orders })) @@ -1034,7 +1034,7 @@ pub mod handlers { let response = TraderDerivativeOrdersResponse { orders: self.orders.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { orders })) @@ -1052,7 +1052,7 @@ pub mod handlers { let response = SubaccountEffectivePositionInMarketResponse { state: self.position.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } @@ -1069,7 +1069,7 @@ pub mod handlers { let response = SubaccountPositionInMarketResponse { state: self.position.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } @@ -1093,7 +1093,7 @@ pub mod handlers { best_buy_price: self.best_buy_price.to_owned(), best_sell_price: self.best_sell_price.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { @@ -1125,7 +1125,7 @@ pub mod handlers { history_metadata: self.history_metadata.to_owned(), raw_history: self.raw_history.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { @@ -1166,7 +1166,7 @@ pub mod handlers { quote_timestamp: self.quote_timestamp.to_owned(), }), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { @@ -1187,7 +1187,7 @@ pub mod handlers { impl HandlesDenomSupplyQuery for Temp { fn handle(&self, _denom: String) -> QuerierResult { let response = TokenFactoryDenomSupplyResponse { total_supply: self.supply }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { supply })) @@ -1200,7 +1200,7 @@ pub mod handlers { impl HandlesFeeQuery for Temp { fn handle(&self) -> QuerierResult { let response = TokenFactoryCreateDenomFeeResponse { fee: self.fee.to_owned() }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { fee })) @@ -1215,7 +1215,7 @@ pub mod handlers { let response = QueryContractRegistrationInfoResponse { contract: self.contract.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { contract })) @@ -1232,7 +1232,7 @@ pub mod handlers { let balance = balances.iter().find(|b| -> bool { b.denom == denom }).unwrap_or(&empty); let res = BalanceResponse { amount: balance.to_owned() }; - SystemResult::Ok(ContractResult::from(to_json_binary(&res))) + SystemResult::Ok(ContractResult::from(to_binary(&res))) } } Some(Box::new(Temp { balances })) @@ -1248,7 +1248,7 @@ pub mod handlers { amount: self.balances.to_owned(), }; - SystemResult::Ok(ContractResult::from(to_json_binary(&res))) + SystemResult::Ok(ContractResult::from(to_binary(&res))) } } Some(Box::new(Temp { balances })) @@ -1261,7 +1261,7 @@ pub mod handlers { impl HandlesMarketIdQuery for Temp { fn handle(&self, _market_id: MarketId) -> QuerierResult { let response = QueryMarketAtomicExecutionFeeMultiplierResponse { multiplier: self.multiplier }; - SystemResult::Ok(ContractResult::from(to_json_binary(&response))) + SystemResult::Ok(ContractResult::from(to_binary(&response))) } } Some(Box::new(Temp { multiplier })) diff --git a/packages/injective-math/Cargo.toml b/packages/injective-math/Cargo.toml index 73bc1863..a5265ec3 100644 --- a/packages/injective-math/Cargo.toml +++ b/packages/injective-math/Cargo.toml @@ -16,11 +16,11 @@ backtraces = [ "cosmwasm-std/backtraces" ] [dependencies] primitive-types = {version= "0.12.2" ,default-features = false} -cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } ethereum-types = { version = "0.5.2" } schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } [dev-dependencies] -cosmwasm-schema = { version = "1.2.7" } +cosmwasm-schema = { version = "=1.2.7" } diff --git a/packages/injective-protobuf/Cargo.toml b/packages/injective-protobuf/Cargo.toml index b69f2bfb..e6bf58aa 100644 --- a/packages/injective-protobuf/Cargo.toml +++ b/packages/injective-protobuf/Cargo.toml @@ -18,7 +18,7 @@ protobuf-codegen-pure = "2" backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = ["derive"] } ethereum-types = "0.5.2" @@ -27,4 +27,4 @@ num = "0.4.0" protobuf = { version = "2", features = ["with-bytes"] } [dev-dependencies] -cosmwasm-schema = { version = "1.2.7" } +cosmwasm-schema = { version = "=1.2.7" } diff --git a/packages/injective-std/Cargo.toml b/packages/injective-std/Cargo.toml index 122a9ecc..3d055849 100644 --- a/packages/injective-std/Cargo.toml +++ b/packages/injective-std/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] chrono = {version = "0.4.24"} -cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } osmosis-std-derive = {version = "0.15.2"} prost = { version = "0.11.9" } prost-types = {version = "0.11.9", default-features = false} diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index e6582529..984385e2 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.4" [dependencies] anyhow = { version = "1.0.66" } base64 = { version = "0.13.1" } -cosmwasm-std = { version = "1.2.7", features = [ "abort", "iterator", "stargate" ] } +cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } cw-multi-test = { version = "0.16.2" } injective-cosmwasm = { version = "0.2.16", path = "../injective-cosmwasm" } injective-math = { version = "0.2.2", path = "../injective-math" } diff --git a/packages/injective-testing/src/chain_mock.rs b/packages/injective-testing/src/chain_mock.rs index c66bfc9d..14f8e80e 100644 --- a/packages/injective-testing/src/chain_mock.rs +++ b/packages/injective-testing/src/chain_mock.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Result as AnyResult}; use cosmwasm_std::{testing::MockApi, Addr, Api, Binary, BlockInfo, Coin, CustomQuery, Empty, MemoryStorage, Querier, Storage}; -use cosmwasm_std::{to_json_binary, StdError}; +use cosmwasm_std::{to_binary, StdError}; use cw_multi_test::{AddressGenerator, App}; use cw_multi_test::{AppResponse, BankKeeper, BasicAppBuilder, CosmosRouter, DistributionKeeper, Module, Router, StakeKeeper, WasmKeeper}; use injective_cosmwasm::{InjectiveMsgWrapper, InjectiveQueryWrapper}; @@ -84,7 +84,7 @@ pub struct ExecuteResponseContainer { impl ExecuteResponseContainer { pub fn with_ok_response(payload: &T) -> Self { ExecuteResponseContainer { - response: Some(Ok(Some(to_json_binary(payload).unwrap()))), + response: Some(Ok(Some(to_binary(payload).unwrap()))), } } @@ -108,7 +108,7 @@ pub struct QueryResponseContainer { impl QueryResponseContainer { pub fn with_ok_response(payload: &T) -> Self { QueryResponseContainer { - response: Some(Ok(to_json_binary(payload).unwrap())), + response: Some(Ok(to_binary(payload).unwrap())), } } From b8533ea6d5c01864e44b04fe794b0a4536db928f Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:08:04 -0300 Subject: [PATCH 2/8] Bumped injective-cosmwasm to latest version number --- packages/injective-cosmwasm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index cd73f04d..ac95aedd 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -11,7 +11,7 @@ license = "Apache-2.0" name = "injective-cosmwasm" readme = "README.md" repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/bindings" -version = "0.2.16" +version = "0.2.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] From 48aa3953fe6d7c04575c86cb741e8d678de12ba9 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:09:41 -0300 Subject: [PATCH 3/8] Thank you lint --- contracts/atomic-order-example/src/tests.rs | 4 ++-- packages/injective-cosmwasm/src/exchange_mock_querier.rs | 3 +-- packages/injective-protobuf/src/proto/mod.rs | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/contracts/atomic-order-example/src/tests.rs b/contracts/atomic-order-example/src/tests.rs index 5ceb70a4..d4ef719f 100644 --- a/contracts/atomic-order-example/src/tests.rs +++ b/contracts/atomic-order-example/src/tests.rs @@ -2,8 +2,8 @@ use std::str::FromStr; use cosmwasm_std::testing::{mock_info, MockApi, MockStorage}; use cosmwasm_std::{ - coins, to_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, - Reply, SubMsgResponse, SubMsgResult, SystemResult, Uint128, + coins, to_binary, BankMsg, Binary, ContractResult, CosmosMsg, OwnedDeps, QuerierResult, Reply, + SubMsgResponse, SubMsgResult, SystemResult, Uint128, }; use injective_cosmwasm::InjectiveMsg::CreateSpotMarketOrder; diff --git a/packages/injective-cosmwasm/src/exchange_mock_querier.rs b/packages/injective-cosmwasm/src/exchange_mock_querier.rs index 689529d8..1020ab24 100644 --- a/packages/injective-cosmwasm/src/exchange_mock_querier.rs +++ b/packages/injective-cosmwasm/src/exchange_mock_querier.rs @@ -781,8 +781,7 @@ impl TestDeposit { pub mod handlers { use cosmwasm_std::{ - to_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, - Uint128, + to_binary, AllBalanceResponse, BalanceResponse, Binary, Coin, ContractResult, QuerierResult, StdResult, SystemError, SystemResult, Uint128, }; use std::collections::HashMap; diff --git a/packages/injective-protobuf/src/proto/mod.rs b/packages/injective-protobuf/src/proto/mod.rs index de6005c4..de0fb666 100644 --- a/packages/injective-protobuf/src/proto/mod.rs +++ b/packages/injective-protobuf/src/proto/mod.rs @@ -1,9 +1,9 @@ // @generated +pub mod account; pub mod auth; pub mod coin; pub mod distribution; pub mod exchange; -pub mod tx; pub mod oracle; -pub mod account; +pub mod tx; From 6108ae728f8e2d84654ff8dbf620f4de14e4cc66 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:16:44 -0300 Subject: [PATCH 4/8] Bumped injective-math version to newest --- Cargo.lock | 46 +++++++++++++++++--- contracts/atomic-order-example/Cargo.toml | 6 +-- contracts/dummy/Cargo.toml | 2 +- packages/injective-cosmwasm/Cargo.toml | 2 +- packages/injective-math/Cargo.toml | 2 +- packages/injective-protobuf/src/proto/mod.rs | 4 +- packages/injective-testing/Cargo.toml | 4 +- 7 files changed, 49 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a62af65..59f104c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,8 +55,8 @@ dependencies = [ "cw-storage-plus 0.16.0", "cw-utils 0.16.0", "cw2 0.16.0", - "injective-cosmwasm", - "injective-math", + "injective-cosmwasm 0.2.17", + "injective-math 0.2.2", "injective-protobuf", "protobuf", "schemars", @@ -516,7 +516,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus 0.16.0", "cw2 0.16.0", - "injective-cosmwasm", + "injective-cosmwasm 0.2.17", "schemars", "serde 1.0.192", "thiserror", @@ -866,14 +866,14 @@ dependencies = [ [[package]] name = "injective-cosmwasm" -version = "0.2.16" +version = "0.2.17" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 0.16.0", "ethereum-types", "hex", - "injective-math", + "injective-math 0.2.2", "schemars", "serde 1.0.192", "serde-json-wasm 0.4.1", @@ -883,6 +883,24 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "injective-cosmwasm" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd6a4f3cf857a24f7603bdc9faf08ff8d7385dec809f3a2459fe9c403b9f3c1" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.16.0", + "ethereum-types", + "hex", + "injective-math 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "schemars", + "serde 1.0.192", + "serde_repr", + "subtle-encoding", + "tiny-keccak", +] + [[package]] name = "injective-math" version = "0.2.2" @@ -896,6 +914,20 @@ dependencies = [ "subtle-encoding", ] +[[package]] +name = "injective-math" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5067184c84c1451935527f53f612734d2bd14ab6d68e39f61745ed23429277" +dependencies = [ + "cosmwasm-std", + "ethereum-types", + "primitive-types", + "schemars", + "serde 1.0.192", + "subtle-encoding", +] + [[package]] name = "injective-protobuf" version = "0.2.1" @@ -933,8 +965,8 @@ dependencies = [ "base64", "cosmwasm-std", "cw-multi-test", - "injective-cosmwasm", - "injective-math", + "injective-cosmwasm 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "injective-math 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6", "secp256k1", "serde 1.0.192", diff --git a/contracts/atomic-order-example/Cargo.toml b/contracts/atomic-order-example/Cargo.toml index b8147d9c..47437848 100644 --- a/contracts/atomic-order-example/Cargo.toml +++ b/contracts/atomic-order-example/Cargo.toml @@ -37,10 +37,10 @@ cw-utils = { version = "0.16.0" } schemars = { version = "0.8.8", features = [ "enumset" ] } serde = { version = "1.0.137", default-features = false, features = ["derive"] } thiserror = { version = "1.0.31" } -injective-cosmwasm = { version = "0.2.16", path= "../../packages/injective-cosmwasm" } -injective-math = { version = "0.2.2", path = "../../packages/injective-math" } +injective-cosmwasm = { version = "0.2.17" } +injective-math = { version = "0.2.3" } protobuf = { version = "2.28.0", features = ["with-bytes"] } -injective-protobuf = { path = "../../packages/injective-protobuf", version = "0.2.1" } +injective-protobuf = { version = "0.2.1" } [dev-dependencies] cosmwasm-schema = { version = "1.2.7" } diff --git a/contracts/dummy/Cargo.toml b/contracts/dummy/Cargo.toml index debfeba8..a1d6102a 100644 --- a/contracts/dummy/Cargo.toml +++ b/contracts/dummy/Cargo.toml @@ -35,4 +35,4 @@ cw2 = { version = "0.16.0" } serde = { version = "1.0.136", default-features = false, features = ["derive"] } schemars = "0.8.8" thiserror = { version = "1.0.30" } -injective-cosmwasm = { version = "0.2.16", path = "../../packages/injective-cosmwasm" } +injective-cosmwasm = { version = "0.2.17" } diff --git a/packages/injective-cosmwasm/Cargo.toml b/packages/injective-cosmwasm/Cargo.toml index ac95aedd..65ef006b 100644 --- a/packages/injective-cosmwasm/Cargo.toml +++ b/packages/injective-cosmwasm/Cargo.toml @@ -19,7 +19,7 @@ cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "s cw-storage-plus = { version = "=0.16.0" } ethereum-types = { version = "0.5.2" } hex = { version = "0.4.3", features = [ "serde" ] } -injective-math = { path = "../injective-math", version = "0.2.2" } +injective-math = { version = "0.2.3" } schemars = "0.8.8" serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } serde_repr = "0.1" diff --git a/packages/injective-math/Cargo.toml b/packages/injective-math/Cargo.toml index a5265ec3..132af934 100644 --- a/packages/injective-math/Cargo.toml +++ b/packages/injective-math/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "injective-math" readme = "README.md" repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/injective-math" -version = "0.2.2" +version = "0.2.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/injective-protobuf/src/proto/mod.rs b/packages/injective-protobuf/src/proto/mod.rs index de0fb666..de6005c4 100644 --- a/packages/injective-protobuf/src/proto/mod.rs +++ b/packages/injective-protobuf/src/proto/mod.rs @@ -1,9 +1,9 @@ // @generated -pub mod account; pub mod auth; pub mod coin; pub mod distribution; pub mod exchange; -pub mod oracle; pub mod tx; +pub mod oracle; +pub mod account; diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index 984385e2..59a07c46 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -12,8 +12,8 @@ anyhow = { version = "1.0.66" } base64 = { version = "0.13.1" } cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } cw-multi-test = { version = "0.16.2" } -injective-cosmwasm = { version = "0.2.16", path = "../injective-cosmwasm" } -injective-math = { version = "0.2.2", path = "../injective-math" } +injective-cosmwasm = { version = "0.2.17" } +injective-math = { version = "0.2.3" } rand = { version = "0.4.6" } secp256k1 = { version = "0.6.2" } serde = { version = "1.0.137", default-features = false, features = ["derive"] } From 20102d43cd0cec592cb1934e1e3d58297a46be08 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:18:59 -0300 Subject: [PATCH 5/8] Added refreshed Cargo.lock --- Cargo.lock | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59f104c3..57eef2e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,9 +55,9 @@ dependencies = [ "cw-storage-plus 0.16.0", "cw-utils 0.16.0", "cw2 0.16.0", - "injective-cosmwasm 0.2.17", - "injective-math 0.2.2", - "injective-protobuf", + "injective-cosmwasm 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "injective-math 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "injective-protobuf 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf", "schemars", "serde 1.0.192", @@ -516,7 +516,7 @@ dependencies = [ "cosmwasm-std", "cw-storage-plus 0.16.0", "cw2 0.16.0", - "injective-cosmwasm 0.2.17", + "injective-cosmwasm 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "schemars", "serde 1.0.192", "thiserror", @@ -873,7 +873,7 @@ dependencies = [ "cw-storage-plus 0.16.0", "ethereum-types", "hex", - "injective-math 0.2.2", + "injective-math 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "schemars", "serde 1.0.192", "serde-json-wasm 0.4.1", @@ -893,7 +893,7 @@ dependencies = [ "cw-storage-plus 0.16.0", "ethereum-types", "hex", - "injective-math 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "injective-math 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "schemars", "serde 1.0.192", "serde_repr", @@ -903,7 +903,7 @@ dependencies = [ [[package]] name = "injective-math" -version = "0.2.2" +version = "0.2.3" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -916,9 +916,9 @@ dependencies = [ [[package]] name = "injective-math" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5067184c84c1451935527f53f612734d2bd14ab6d68e39f61745ed23429277" +checksum = "9a377b42d309a85a5661ebcd50f9a218097efdc21c6e7709746ce07530bb9733" dependencies = [ "cosmwasm-std", "ethereum-types", @@ -943,6 +943,22 @@ dependencies = [ "subtle-encoding", ] +[[package]] +name = "injective-protobuf" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48b6e4054ec0f985961f0f9db730118419c5b8903da36a4e5e219ff06874acd" +dependencies = [ + "cosmwasm-std", + "ethereum-types", + "num 0.4.1", + "protobuf", + "protobuf-codegen-pure", + "schemars", + "serde 1.0.192", + "subtle-encoding", +] + [[package]] name = "injective-std" version = "0.1.4" @@ -966,7 +982,7 @@ dependencies = [ "cosmwasm-std", "cw-multi-test", "injective-cosmwasm 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "injective-math 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "injective-math 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6", "secp256k1", "serde 1.0.192", From 2c6d300a34c55611ae55f45b42efc980af4edb22 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:28:32 -0300 Subject: [PATCH 6/8] Bumped injective-testing to newest verstion --- packages/injective-testing/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index 59a07c46..b6e6a3a6 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -5,13 +5,13 @@ edition = "2021" license = "Apache-2.0" name = "injective-testing" repository = "https://github.com/InjectiveLabs/cw-injective/tree/master/packages/injective-testing" -version = "0.1.4" +version = "0.1.5" [dependencies] anyhow = { version = "1.0.66" } base64 = { version = "0.13.1" } cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } -cw-multi-test = { version = "0.16.2" } +cw-multi-test = { version = "=0.16.2" } injective-cosmwasm = { version = "0.2.17" } injective-math = { version = "0.2.3" } rand = { version = "0.4.6" } From 5a2112adaf0aae7b2e41ffc3e2ee454d5098c52b Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:30:07 -0300 Subject: [PATCH 7/8] Refreshed Cargo.lock version --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 57eef2e4..f4222f68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,9 +327,9 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "0.16.5" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" +checksum = "c2eb84554bbfa6b66736abcd6a9bfdf237ee0ecb83910f746dff7f799093c80a" dependencies = [ "anyhow", "cosmwasm-std", @@ -975,7 +975,7 @@ dependencies = [ [[package]] name = "injective-testing" -version = "0.1.4" +version = "0.1.5" dependencies = [ "anyhow", "base64", From 284ea32d776936a22bab76bc14f6ddd12a5629f4 Mon Sep 17 00:00:00 2001 From: Nicolas Baum Date: Mon, 13 Nov 2023 10:47:51 -0300 Subject: [PATCH 8/8] Removed cw-multi-test strict version dep --- packages/injective-testing/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/injective-testing/Cargo.toml b/packages/injective-testing/Cargo.toml index b6e6a3a6..bc28b8cf 100644 --- a/packages/injective-testing/Cargo.toml +++ b/packages/injective-testing/Cargo.toml @@ -11,7 +11,7 @@ version = "0.1.5" anyhow = { version = "1.0.66" } base64 = { version = "0.13.1" } cosmwasm-std = { version = "=1.2.7", features = [ "abort", "iterator", "stargate" ] } -cw-multi-test = { version = "=0.16.2" } +cw-multi-test = { version = "0.16.2" } injective-cosmwasm = { version = "0.2.17" } injective-math = { version = "0.2.3" } rand = { version = "0.4.6" }