Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Dec 10, 2024
1 parent 18f2c40 commit a102297
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 21 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ bcs = "0.1.5"
bech32 = "0.11.0"
client = { version = "^1.0.0", path = "packages/client" }
coordinator = { version = "^1.1.0", path = "contracts/coordinator" }
cosmwasm-crypto = "2.1.4"
cosmwasm-schema = "2.1.4"
cosmwasm-std = "2.1.4"
cw-multi-test = "2.2.0"
cw-storage-plus = { version = "2.0.0", features = ["iterator", "macro"] }
cw-utils = "2.0.0"
cw2 = "2.0.0"
ed25519-dalek = { version = "2.1.1", default-features = false }
error-stack = { version = "0.4.0", features = ["eyre"] }
Expand Down
4 changes: 2 additions & 2 deletions ampd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ valuable-serde = { version = "0.1.0", features = ["std"] }
voting-verifier = { workspace = true }

[dev-dependencies]
assert_ok = { workspace = true }
ed25519-dalek = { workspace = true, features = ["rand_core"] }
elliptic-curve = "0.13.5"
faux = "0.1.10"
generic-array = "0.14.7"
goldie = { workspace = true }
multisig = { workspace = true, features = ["test", "library"] }
rand = { workspace = true }
random-string = "1.0.0"
tokio = { workspace = true, features = ["test-util"] }
goldie = { workspace = true }
assert_ok = { workspace = true }

[build-dependencies]
tonic-build = "0.8.3"
Expand Down
2 changes: 1 addition & 1 deletion contracts/gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ voting-verifier = { workspace = true, features = ["library"] }

[dev-dependencies]
cw-multi-test = { workspace = true }
rand = { workspace = true }
goldie = { workspace = true }
rand = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion contracts/multisig-prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ coordinator = { workspace = true }
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = "2.0.0"
cw-utils = { workspace = true }
cw2 = { workspace = true }
error-stack = { workspace = true }
ethers-contract = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion contracts/multisig-prover/src/encoding/bcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ where
#[cfg(test)]
mod tests {
use axelar_wasm_std::hash::Hash;
use cosmwasm_std::{testing::MockApi, HexBinary, Uint128};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{HexBinary, Uint128};
use multisig::key::KeyType;
use multisig::msg::Signer;
use multisig::verifier_set::VerifierSet;
Expand Down
5 changes: 2 additions & 3 deletions contracts/multisig-prover/src/test/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use axelar_wasm_std::VerificationStatus;
use cosmwasm_std::{
from_json, testing::MockApi, to_json_binary, QuerierResult, Uint128, WasmQuery,
};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{from_json, to_json_binary, QuerierResult, Uint128, WasmQuery};
use multisig::msg::Signer;
use multisig::multisig::Multisig;
use multisig::types::MultisigState;
Expand Down
6 changes: 3 additions & 3 deletions contracts/multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ optimize = """docker run --rm -v "$(pwd)":/code \
[dependencies]
axelar-wasm-std = { workspace = true, features = ["derive"] }
client = { workspace = true }
cosmwasm-crypto = "2.1.4"
cosmwasm-crypto = { workspace = true }
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = "2.0.0"
cw-utils = { workspace = true }
cw2 = { workspace = true }
ed25519-dalek = { workspace = true }
enum-display-derive = "0.1.1"
Expand All @@ -63,8 +63,8 @@ thiserror = { workspace = true }

[dev-dependencies]
curve25519-dalek = "4.1.3"
ed25519-dalek = { workspace = true, features = ["digest", "rand_core"] }
cw-multi-test = { workspace = true }
ed25519-dalek = { workspace = true, features = ["digest", "rand_core"] }
goldie = { workspace = true }
hex = "0.4"

Expand Down
20 changes: 16 additions & 4 deletions contracts/rewards/src/contract/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,9 +926,18 @@ mod test {
);
// a vector of (contract, rewards amounts) pairs
let test_data = vec![
(MockApi::default().addr_make("contract_1"), vec![100, 200, 50]),
(MockApi::default().addr_make("contract_2"), vec![25, 500, 70]),
(MockApi::default().addr_make("contract_3"), vec![1000, 500, 2000]),
(
MockApi::default().addr_make("contract_1"),
vec![100, 200, 50],
),
(
MockApi::default().addr_make("contract_2"),
vec![25, 500, 70],
),
(
MockApi::default().addr_make("contract_3"),
vec![1000, 500, 2000],
),
];

let chain_name: ChainName = "mock-chain".parse().unwrap();
Expand Down Expand Up @@ -1088,7 +1097,10 @@ mod test {
},
];

let verifiers = [MockApi::default().addr_make("verifier-1"), MockApi::default().addr_make("verifier-2")];
let verifiers = [
MockApi::default().addr_make("verifier-1"),
MockApi::default().addr_make("verifier-2"),
];

// simulate two verifiers each participating in two pools
// the first verifier participates in 2 events, and the second in 3 events (out of a total of 3 events)
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/tests/bond_unbond.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cosmwasm_std::{testing::MockApi, BlockInfo};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::BlockInfo;
use integration_tests::contract::Contract;
use service_registry_api::msg::ExecuteMsg;

Expand Down
3 changes: 2 additions & 1 deletion integration-tests/tests/chain_freeze_unfreeze.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cosmwasm_std::{testing::MockApi, HexBinary};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::HexBinary;
use integration_tests::contract::Contract;
use router_api::{CrossChainId, Message};

Expand Down
3 changes: 2 additions & 1 deletion integration-tests/tests/message_routing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use cosmwasm_std::{testing::MockApi, HexBinary, Uint128};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{HexBinary, Uint128};
use integration_tests::contract::Contract;
use router_api::{CrossChainId, Message};

Expand Down
3 changes: 2 additions & 1 deletion packages/axelar-wasm-std/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ impl Snapshot {

#[cfg(test)]
mod tests {
use cosmwasm_std::{from_json, testing::MockApi, to_json_binary, Uint64};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{from_json, to_json_binary, Uint64};

use super::*;
use crate::Threshold;
Expand Down
3 changes: 2 additions & 1 deletion packages/axelar-wasm-std/src/voting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ impl WeightedPoll {

#[cfg(test)]
mod tests {
use cosmwasm_std::{testing::MockApi, Addr, Uint64};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{Addr, Uint64};
use rand::distributions::Alphanumeric;
use rand::Rng;

Expand Down
3 changes: 2 additions & 1 deletion packages/evm-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ mod test {

use axelar_wasm_std::nonempty;
use axelar_wasm_std::snapshot::Participant;
use cosmwasm_std::{testing::MockApi, HexBinary, Uint128};
use cosmwasm_std::testing::MockApi;
use cosmwasm_std::{HexBinary, Uint128};
use multisig::key::PublicKey;
use multisig::verifier_set::VerifierSet;
use router_api::{CrossChainId, Message as RouterMessage};
Expand Down

0 comments on commit a102297

Please sign in to comment.