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

feat: add wasm http provider support #403

Merged
merged 6 commits into from
Aug 23, 2021
Merged

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Aug 23, 2021

Motivation

Followup from #390

Solution

  • enable Http Provider in wasm.
  • Http support in contract-derive-abigen remains disabled, because wasm http requires async. however this is not a limitation to the actual abigen! macro which doesn't get executed with wasm anyways.
  • fixed the double execute issue with webpack. Since I couldn't immediately find how to manually bundle wasm-pack output I kept it for now. But yarn serve doesn't throw errors anymore

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 - one minor nit. Feel free to merge!

Comment on lines 33 to 39
/// some keys of ganache with custom seed `ethers-wasm-seed`
pub const KEYS: [&str; 4] = [
"817169e55f14ede54f4fd6a4f2ab4209db14aeeb1b9972b3b28f1560af0a061a",
"375715b8ced8bd9b7386ba5dc72efa518aa4379d6a4676d3e26d8f5ff5e7469c",
"de7c5d8e884fbe9f0915703ff2c123f4cda56f148eb22ca46d47392acf52bcec",
"0bd6bf22f84f96b39258a46ac2a7c482d0b8e1c5f8af0c07fa304a8d875158ec",
];
Copy link
Owner

Choose a reason for hiding this comment

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

FWIW you can also use the Mnemonic if you want to make this a bit more robust

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

used mnemonic instead.

@gakonst gakonst merged commit d35444c into gakonst:master Aug 23, 2021
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* Add `mockCall` cheatcode

* Test that mocking works for internal calls

* Add `clearMockedCalls` cheatcode

* Allow mocking of entire selectors

* Add `expectCall`

* Don't expect selectors to be a thing

* Update docs

* Make clippy happy

* Debugger integration
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