forked from th4s/ethane
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I26 wasm add async #38
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- faster if I just test this crate alone.
- tried to implement an umbrella trait for them, but for some reason, that didn't work. - it might be worth investigating why tho
- however, when constructing an `EthereumType` from an integer, a reference to an integer is required which might be a bit inconvenient.
However - client is cloned every time a call is made (not sure how fast this is)
- Untrack `www` folder - show decimal equivalent of some hex numbers
`Parameter` stores data in a `H256` type, but it wasn't converted to an `Address`, when displaying it. This means, that instead of 20 bytes, 32 bytes were displayed.
PumpkinSeed
approved these changes
May 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempts to resolve #36, resolve #26.
Description
There are quite some proposed changes in this pull request and they originate from the following issues.
It was required to compile
Ethane
in such way that it is supported bywasm
applications. However, we bumped into weird errors similar to this and this. Thus we decided to get rid of as many dependencies as possible in order to find the culprit which turned out to be theureq
package.Therefore, the
Http
client was modified to usereqwest::blocking::Client
to handle blocking http requests without futures and multiple threads. However, this opened a new issue, namelywasm
doesn't support blocking requests. Thus, a blocking and a non-blocking (async)Http
client was added toEthane
.Currently the crate has a
blocking
and anon-blocking
feature flag that compiles only the more lightweight sync or the more complex asyncHttp
client respectively. Then, there is a blocking and a non-blockingConnection
through which theRPC
requests are sent and processed. Furthermore, the contractCaller
was also split into a blocking and non-blocking object to handleeth
contract calls.Ethane types
In this great "purge", the
ethereum-type
crate was also dismissed from the dependencies andEthane
's own implementation was added. You can find theAddress
,Bloom
,U256
, etc types compiled locally, with slightly different API methods.WASM
ethane-wasm
contains a very basicwasm
-compatible implementation of anRPC
interface. It is an exploratory implementation only in order to test compatibility issues and tweaks to call ethane viawasm
.