Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/injective-math improvements #186

Merged
merged 27 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 241 additions & 12 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/injective-cosmwasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cosmwasm-std = { version = "1.4.1" }
cw-storage-plus = { version = "0.15.0" }
ethereum-types = "0.5.2"
hex = { version = "0.4.3", features = [ "serde" ] }
injective-math = { path = "../injective-math", version = "0.1.4" }
injective-math = { path = "../injective-math", version = "0.2.0" }
schemars = "0.8.8"
serde = { version = "1.0.136", default-features = false, features = [ "derive" ] }
serde_repr = "0.1"
Expand Down
16 changes: 8 additions & 8 deletions packages/injective-cosmwasm/src/exchange_mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn default_derivative_market_response_handler(market_id: MarketId) -> QuerierRes
min_quantity_tick_size: FPDecimal::from_str("0.0001").unwrap(),
}),
info: None,
mark_price: FPDecimal::one(),
mark_price: FPDecimal::ONE,
}),
};
SystemResult::Ok(ContractResult::from(to_binary(&response)))
Expand Down Expand Up @@ -153,7 +153,7 @@ fn default_perpetual_market_funding_response_handler() -> QuerierResult {

fn default_market_volatility_response_handler() -> QuerierResult {
let response = MarketVolatilityResponse {
volatility: Some(FPDecimal::one()),
volatility: Some(FPDecimal::ONE),
history_metadata: None,
raw_history: None,
};
Expand Down Expand Up @@ -222,7 +222,7 @@ fn default_denom_decimals_handler() -> QuerierResult {

fn default_oracle_volatility_response_handler() -> QuerierResult {
let response = OracleVolatilityResponse {
volatility: Some(FPDecimal::one()),
volatility: Some(FPDecimal::ONE),
history_metadata: None,
raw_history: None,
};
Expand All @@ -233,13 +233,13 @@ fn default_pyth_price_response_handler() -> QuerierResult {
let response = PythPriceResponse {
price_state: Some(PythPriceState {
price_id: "0xff0ec26442c57d7456695b843694e7379b15cf1b250b27e0e47e657f1955aaff".to_string(),
ema_price: FPDecimal::one(),
ema_conf: FPDecimal::one(),
conf: FPDecimal::one(),
ema_price: FPDecimal::ONE,
ema_conf: FPDecimal::ONE,
conf: FPDecimal::ONE,
publish_time: 1i64,
price_state: PriceState {
price: FPDecimal::one(),
cumulative_price: FPDecimal::one(),
price: FPDecimal::ONE,
cumulative_price: FPDecimal::ONE,
timestamp: 1i64,
},
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/injective-math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.23"
version = "0.2.0"

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

Expand All @@ -15,7 +15,7 @@ version = "0.1.23"
backtraces = [ "cosmwasm-std/backtraces" ]

[dependencies]
bigint = "4"
primitive-types = "0.12.2"
cosmwasm-std = { version = "1.4.1" }
ethereum-types = "0.5.2"
schemars = "0.8.8"
Expand Down
Loading
Loading