Skip to content

Commit

Permalink
chore: use crates injective-std and some minor refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
gorgos committed Jan 5, 2024
1 parent 0583723 commit e5056bc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
10 changes: 6 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions contracts/injective-cosmwasm-mock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[package]
authors = ["Markus Waas <[email protected]>"]
authors = [ "Markus Waas <[email protected]>" ]
edition = "2018"
name = "injective-cosmwasm-mock"
name = "injective-cosmwasm-mock"
version = "1.0.0"

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]
crate-type = [ "cdylib", "rlib" ]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
backtraces = [ "cosmwasm-std/backtraces" ]
# use library feature to disable all instantiate/execute/query exports
library = []
library = [ ]

[package.metadata.scripts]
optimize = """docker run --rm -v "$(pwd)":/code \
Expand All @@ -29,13 +29,13 @@ optimize = """docker run --rm -v "$(pwd)":/code \
"""

[dependencies]
cosmwasm-std = { version = "1.5.0" }
cw-storage-plus = "1.2.0"
cw2 = "0.16.0"
injective-cosmwasm = { path = "../../packages/injective-cosmwasm" }
schemars = "0.8.8"
serde = { version = "1.0.137", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.31" }
injective-test-tube = { git = "https://github.com/InjectiveLabs/test-tube", branch = "latest" }
injective-std = { path = "../../packages/injective-std" }
injective-math = { path = "../../packages/injective-math" }
cosmwasm-std = { version = "1.5.0", features = [ "abort", "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "iterator", "stargate" ] }
cw-storage-plus = "1.2.0"
cw2 = "0.16.0"
injective-cosmwasm = { path = "../../packages/injective-cosmwasm" }
injective-math = { path = "../../packages/injective-math" }
injective-std = { version = "0.1.5" }
injective-test-tube = "1.1.6"
schemars = "0.8.8"
serde = { version = "1.0.137", default-features = false, features = [ "derive" ] }
thiserror = { version = "1.0.31" }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use cosmwasm_std::{Addr, Coin};
use injective_cosmwasm::{checked_address_to_subaccount_id, MarketId};
use injective_math::{scale::Scaled, FPDecimal};
use injective_std::types::injective::exchange::v1beta1::{MsgInstantSpotMarketLaunch, QuerySpotMarketsRequest};
use injective_test_tube::{injective_cosmwasm::SpotMarketResponse, Exchange, Module, Wasm, Account};
use injective_test_tube::{injective_cosmwasm::SpotMarketResponse, Account, Exchange, Module, Wasm};

pub const BASE_DENOM: &str = "inj";
pub const QUOTE_DENOM: &str = "usdt";
Expand Down Expand Up @@ -50,7 +50,7 @@ fn test_instantiation() {
min_price_tick_size: dec_to_proto(FPDecimal::must_from_str("0.000000000000001")),
min_quantity_tick_size: dec_to_proto(FPDecimal::must_from_str("1000000000000000")),
},
&signer,
signer,
)
.unwrap();

Expand Down

0 comments on commit e5056bc

Please sign in to comment.