-
Notifications
You must be signed in to change notification settings - Fork 469
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
Use ethereum-types library for uints and hashes #76
Conversation
isn't it better to go with |
Yes, I'd prefer to go with |
Hmmm would it be possible to FFI with a C/C++ library like this https://sourceforge.net/projects/ttmath/? |
@hswick to be honest I see no point in using |
@debris I agree the C++ lib doesn't belong in this repo, however at some point the lack of crates problem needs to be solved. So wrapping an existing C++ seems like the path of least resistance. |
I'm hesitant about the idea of using Issue #16 proposes breaking the transports out into a separate crate. Perhaps the |
I agree, but this is a bit of a hassle for us to maintain. Not long ago, we had 4 or 5 different implementations of
|
Good point. I can see how that would have serious diminishing returns.
Haha, fair enough. In defense of my sanity, the comment about unnecessary conversions was based on tracing minimum steps from hex to canonical byte repr (from point of view of caller) in current master branches:
|
My 2cents. The goal of
Otherwise people may choose any jsonrpc-client (probably better than web3) since there is not that much we add on top of it. Also Feel free to also contribute to |
@tomusdrw well played :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Please just bump ethabi
to 5.1
, cause version 4.0
is using an old ethereum-types
crate (1.0
)
Also, by bumping you'll be able to remove a lot of unnecessary conversions - from/into
src/contract/tokens.rs
Outdated
@@ -147,13 +147,13 @@ impl Tokenizable for H256 { | |||
impl Tokenizable for Address { | |||
fn from_token(token: Token) -> Result<Self, Error> { | |||
match token { | |||
Token::Address(data) => Ok(types::H160(data)), | |||
Token::Address(data) => Ok(data.into()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in ethabi 5.1
data
is already an Address
, there is no need to call .into()
, docs
Cargo.toml
Outdated
@@ -11,17 +11,18 @@ authors = ["Tomasz Drwięga <tomasz@ethcore.io>"] | |||
|
|||
[dependencies] | |||
arrayvec = "0.3" | |||
error-chain = "0.11.0" | |||
ethabi = "4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please bump ethabi
to 5.1
and let's merge it tomorrow! :) |
there are still some conflicts ;) |
Closes #69
Closes #84