Skip to content

Commit

Permalink
EthClient: fix tests. (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
sept-en authored Jun 24, 2021
1 parent af8b5bd commit 0a20a93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion contracts/near/eth-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ ethash = { git = "https://github.com/nearprotocol/rust-ethash" }
hex = "0.4.0"
rustc-hex = "2.1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# serde's Serialize and Deserialize traits are required for `near_bindgen` macro for non-wasm32 targets
serde = { version = "1.0", features = ["derive"] }

[dev-dependencies]
web3 = "0.8.0"
lazy_static = "1.4.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
indicatif = "0.14"

Expand Down
4 changes: 2 additions & 2 deletions contracts/near/eth-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use near_sdk::collections::UnorderedMap;
use near_sdk::AccountId;
use near_sdk::{env, near_bindgen, PanicOnDefault};

#[cfg(test)]
#[cfg(not(target_arch = "wasm32"))]
use serde::{Deserialize, Serialize};

near_sdk::setup_alloc!();
Expand All @@ -15,7 +15,7 @@ near_sdk::setup_alloc!();
mod tests;

#[derive(Default, Debug, Clone, BorshDeserialize, BorshSerialize)]
#[cfg_attr(test, derive(Serialize, Deserialize))]
#[cfg_attr(not(target_arch = "wasm32"), derive(Serialize, Deserialize))]
pub struct DoubleNodeWithMerkleProof {
pub dag_nodes: Vec<H512>, // [H512; 2]
pub proof: Vec<H128>,
Expand Down

0 comments on commit 0a20a93

Please sign in to comment.