Skip to content

Commit

Permalink
Merge pull request #185 from InjectiveLabs/u/cosmwasm-1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gorgos authored Oct 18, 2023
2 parents 7accfec + 78cfcfc commit a88608f
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 36 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/Basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.69.0
toolchain: 1.72.0
target: wasm32-unknown-unknown
override: true

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: unit-test
toolchain: 1.69.0
toolchain: 1.72.0
args: --locked
env:
RUST_BACKTRACE: 1
Expand All @@ -56,20 +56,20 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.69.0
toolchain: 1.72.0
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
toolchain: 1.69.0
toolchain: 1.72.0
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
toolchain: 1.69.0
toolchain: 1.72.0
args: -- -D warnings
24 changes: 12 additions & 12 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = ["packages/*", "contracts/*"]
resolver = "2"

[profile.release.package.injective-cosmwasm]
codegen-units = 1
Expand All @@ -18,4 +19,4 @@ overflow-checks = true

[patch.crates-io]
#cw-multi-test = { path = "../cw-multi-test" }
#cw-multi-test = { git = "https://github.com/InjectiveLabs/cw-multi-test.git", branch ="feature/custom_address_generator" }
#cw-multi-test = { git = "https://github.com/InjectiveLabs/cw-multi-test.git", branch ="feature/custom_address_generator" }
6 changes: 3 additions & 3 deletions contracts/atomic-order-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ optimize = """docker run --rm -v "$(pwd)":/code \
"""

[dependencies]
cosmwasm-std = "1.0.0"
cosmwasm-storage = "1.0.0"
cosmwasm-std = "1.4.1"
cosmwasm-storage = "1.4.1"
cw-storage-plus = "0.14.0"
cw2 = "0.14.0"
cw-utils = "0.14.0"
Expand All @@ -43,5 +43,5 @@ protobuf = { version = "2", features = ["with-bytes"] }
injective-protobuf = { path = "../../packages/injective-protobuf", version = "0.2" }

[dev-dependencies]
cosmwasm-schema = "1.0.0"
cosmwasm-schema = "1.4.1"
cw-multi-test = "0.16.2"
2 changes: 1 addition & 1 deletion contracts/dummy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ optimize = """docker run --rm -v "$(pwd)":/code \
"""

[dependencies]
cosmwasm-std = { version = "1.1.1" }
cosmwasm-std = { version = "1.4.1" }
cw-storage-plus = "0.16.0"
cw2 = "0.14.0"
serde = { version = "1.0.136", default-features = false, features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion contracts/dummy/src/mock_pyth_attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod tests {
api: MockApi::default(),
storage: MockStorage::default(),
querier: custom_querier,
custom_query_type: PhantomData::default(),
custom_query_type: PhantomData,
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/injective-cosmwasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ version = "0.2.14"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cosmwasm-std = { version = "1.1.1" }
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" ] }
Expand All @@ -27,6 +27,6 @@ subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] }
tiny-keccak = "1.2.1"

[dev-dependencies]
cosmwasm-schema = { version = "1.1.1" }
cosmwasm-schema = { version = "1.4.1" }
serde-json-wasm = { version = "0.4.1" }
serde_test = { version = "1.0.166" }
2 changes: 1 addition & 1 deletion packages/injective-cosmwasm/src/exchange_mock_querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn mock_dependencies() -> OwnedDeps<MockStorage, MockApi, WasmMockQuerier, I
api: MockApi::default(),
storage: MockStorage::default(),
querier: custom_querier,
custom_query_type: PhantomData::default(),
custom_query_type: PhantomData,
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/injective-cosmwasm/src/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub(crate) mod testing_helpers {
api: MockApi::default(),
storage: MockStorage::default(),
querier: custom_querier,
custom_query_type: PhantomData::default(),
custom_query_type: PhantomData,
}
}

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 @@ -16,11 +16,11 @@ backtraces = [ "cosmwasm-std/backtraces" ]

[dependencies]
bigint = "4"
cosmwasm-std = { version = "1.1.1" }
cosmwasm-std = { version = "1.4.1" }
ethereum-types = "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.1.1" }
cosmwasm-schema = { version = "1.4.1" }
4 changes: 2 additions & 2 deletions packages/injective-math/src/fp_decimal/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,12 +703,12 @@ mod tests {

#[test]
fn test_chain_sum() {
let vector = vec![FPDecimal::ZERO, FPDecimal::ONE, FPDecimal::TWO, FPDecimal::THREE];
let vector = [FPDecimal::ZERO, FPDecimal::ONE, FPDecimal::TWO, FPDecimal::THREE];
assert_eq!(FPDecimal::SIX, vector.iter().sum());
}
#[test]
fn test_chain_sum_equal_zero() {
let vector = vec![FPDecimal::ZERO, FPDecimal::ONE, FPDecimal::TWO, -FPDecimal::THREE];
let vector = [FPDecimal::ZERO, FPDecimal::ONE, FPDecimal::TWO, -FPDecimal::THREE];
assert_eq!(FPDecimal::ZERO, vector.iter().sum());
}
}
4 changes: 2 additions & 2 deletions packages/injective-math/src/fp_decimal/exp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1520,14 +1520,14 @@ mod tests {
}
#[test]
fn test_25_pow_0_11111() {
let power = FPDecimal::ONE / FPDecimal::from(9 as u128);
let power = FPDecimal::ONE / FPDecimal::from(9_u128);
let result: FPDecimal = FPDecimal::must_from_str("25.0").ln() * power;
let dampen: FPDecimal = FPDecimal::E.pow(result);
assert_eq!(dampen, FPDecimal::must_from_str("1.429969148308728731"));
}
#[test]
fn test_25_pow_0_11111_decimal_lib() {
let x = FPDecimal::ONE / FPDecimal::from(9 as u128);
let x = FPDecimal::ONE / FPDecimal::from(9_u128);
let a: FPDecimal = FPDecimal::must_from_str("25.0");
let result: FPDecimal = a.pow(x);
assert_eq!(result, FPDecimal::must_from_str("1.429969148308728731"));
Expand Down
4 changes: 2 additions & 2 deletions packages/injective-protobuf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protobuf-codegen-pure = "2"
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = { version = "1.1.1" }
cosmwasm-std = { version = "1.4.1" }
schemars = "0.8.8"
serde = { version = "1.0.136", default-features = false, features = ["derive"] }
ethereum-types = "0.5.2"
Expand All @@ -27,4 +27,4 @@ num = "0.4.0"
protobuf = { version = "2", features = ["with-bytes"] }

[dev-dependencies]
cosmwasm-schema = { version = "1.1.1" }
cosmwasm-schema = { version = "1.4.1" }
2 changes: 1 addition & 1 deletion packages/injective-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version = "0.1.3"
[dependencies]
anyhow = "1.0.66"
base64 = "0.13.1"
cosmwasm-std = { version = "1.1.1", features = [ "abort", "iterator" ] }
cosmwasm-std = { version = "1.4.1", features = [ "abort", "iterator" ] }
cw-multi-test = "0.16.2"
injective-cosmwasm = { version = "0.2.0", path = "../injective-cosmwasm" }
injective-math = { version = "0.1.17", path = "../injective-math" }
Expand Down

0 comments on commit a88608f

Please sign in to comment.