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

feature: ethers-core wasm32 arch compatibility #38

merged 2 commits into from
Jun 23, 2020

Conversation

prestwich
Copy link
Collaborator

Adds wasm compatibility for the ethers-core crate.

Motivation

Core functionality (abi encoding etc) should be usable in more environments (e.g a browser).

Solution

  1. Update the following constant in crate::utils:
    • pub const WEI_IN_ETHER: U256 = U256([0x0, 0x0, 0x0, 0x0de0b6b3a7640000]);
  2. Remove ganache and solc utils when compiling for wasm32

building this way should work now:
$ cargo build --target wasm32-unknown-unknown

@prestwich prestwich requested a review from gakonst June 23, 2020 00:08
@prestwich
Copy link
Collaborator Author

Note that we're a long way off from wasm compatibility for any other part of the crate

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Let's see what the CI situation is..

@gakonst gakonst merged commit d218dba into master Jun 23, 2020
@gakonst gakonst deleted the core-wasm branch June 23, 2020 07:15
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants