Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feature: ethers-core wasm32 arch compatibility #38

Merged
merged 2 commits into from
Jun 23, 2020
Merged
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions ethers-core/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/// Utilities for launching a ganache-cli testnet instance
#[cfg(not(target_arch = "wasm32"))]
mod ganache;
#[cfg(not(target_arch = "wasm32"))]
pub use ganache::{Ganache, GanacheInstance};

/// Solidity compiler bindings
#[cfg(not(target_arch = "wasm32"))]
mod solc;

#[cfg(not(target_arch = "wasm32"))]
pub use solc::{CompiledContract, Solc};

mod hash;
Expand All @@ -15,8 +20,8 @@ pub use rlp;
use crate::types::{Address, Bytes, U256};
use std::convert::TryInto;

/// 1 Ether = 1e18 Wei
pub const WEI_IN_ETHER: usize = 1000000000000000000;
/// 1 Ether = 1e18 Wei == 0x0de0b6b3a7640000 Wei
pub const WEI_IN_ETHER: U256 = U256([0x0, 0x0, 0x0, 0x0de0b6b3a7640000]);

/// Format the output for the user which prefer to see values
/// in ether (instead of wei)
Expand Down