Skip to content
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

warning: use of deprecated item 'ethereum_types::H256::from_slice': unconventional API, replaced by new_from_slice in version 0.3 #177

Closed
harishbm34 opened this issue Dec 11, 2018 · 7 comments

Comments

@harishbm34
Copy link

How to resolve this warning ?

I have been using the latest version of the "web3 = "0.5.1" in Cargo.toml.

If I use, "git" path for web3 in the Cargo.toml (web3 = { git = "https://github.com/tomusdrw/rust-web3" }), getting the errors like below:

--> /Users/harisha/.cargo/git/checkouts/rust-web3-ebc1a09fd5a9a2a2/8a2cfff/src/types/traces.rs:4:20
|
4 | use serde_derive::{Deserialize, Serialize};
| ^^^^^^^^^^^ no Deserialize in the root. Did you mean to use Serialize?

@tomusdrw
Copy link
Owner

@harishbm34 please update your Rust compiler, to fix serde_derive imports.
Regarding the warning, can you please post your Cargo.lock file? I'm not sure how you can get this warning, cause from_slice is not realy present in the codebase afaict.

@harishbm34
Copy link
Author

Yes, after updating the Rust compiler I am not getting any error but still I can see the warnings.

Request you to please help me to fix this.

Please find the attachment for the Cargo.lock file :
Cargo_lock.txt

@tomusdrw
Copy link
Owner

Seems that sputnikvm-precompiled-interchaintrx crate is using ethereum-types as well, are you sure there are no occurences of ::from_slice there?

That said: the warnings are currently not fixable (see paritytech/parity-common#90). You need to bump fixed-hash to 0.3, but it requires bumping all crates depending on fixed-hash. The main one would be ethereum-types, which is already updated in the repo, but not yet released on crates.io.
We need to wait for ethereum-types release, and then I can update web3.

@harishbm34
Copy link
Author

Your guess is right, I am using ::from_slice inside the "sputnikvm-precompiled-interchaintrx" crate.

We need to wait for ethereum-types release, and then I can update web3 --> thanks a lot for your help. I was wondering about the warnings. Now realised, that's not the issue with "rust-web3". Let's wait for ethereum-types crate release. You can proceed to close this issue.

@tomusdrw
Copy link
Owner

@harishbm34 ok, cool. Will try to release new web3 as soon as ethereum-types is up on crates.io. Cheers!

@D4nte
Copy link

D4nte commented Apr 7, 2019

Hi @tomusdrw, ethereum-types is now released on crates.io. Version 0.5.2 that depends on fixed-hash 0.3.

Can you please update web3?

@tomusdrw
Copy link
Owner

tomusdrw commented Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants