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

fp-account: No function or associated item named from_str found for struct H160 #1501

Open
MohsenNz opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MohsenNz
Copy link

MohsenNz commented Sep 5, 2024

Description

A bug in fp-account in stable2407 branch.

Steps to Reproduce

Adding fp-account = { git = "https://github.com/polkadot-evm/frontier.git", branch = "stable2407", default-features = false } to your project dependencies. Then try to compile.

Environment

  • Operating system: Ubuntu Linux 24.04
  • Project version/tag: stable2407
  • Rust version (run rustup show): 1.77.0

Logs, Errors or Screenshots

After adding fp-account = { git = "https://github.com/polkadot-evm/frontier.git", branch = "stable2407", default-features = false } to my project, I encountered this error:

  error[E0599]: no function or associated item named `from_str` found for struct `H160` in the current scope
    --> /home/mohsen/.cargo/git/checkouts/frontier-3fa7ec73eeffbe18/2e219e1/primitives/account/src/lib.rs:51:9
     |
  51 |         H160::from_str(s)
     |               ^^^^^^^^ function or associated item not found in `H160`
     |
  note: if you're trying to build a new `H160` consider using one of the following associated functions:
        H160::repeat_byte
        H160::zero
        H160::from_slice
    --> /home/mohsen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/primitive-types-0.12.2/src/lib.rs:55:1
     |
  55 | / construct_fixed_hash! {
  56 | |     /// Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
  57 | |     #[cfg_attr(feature = "scale-info", derive(TypeInfo))]
  58 | |     pub struct H160(20);
  59 | | }
     | |_^
     = note: this error originates in the macro `construct_fixed_hash` (in Nightly builds, run with -Z macro-backtrace for more info)

I was pinned all polkadot-skd dependencies to "stable2407" and the same for frontier dependencies.

It's a typical cargo.toml

Additional Information

Finally, after changing fp-account branch to the master the problem solved.

@MohsenNz MohsenNz added the bug Something isn't working label Sep 5, 2024
@boundless-forest
Copy link
Collaborator

because the stable2407 doesn't contain #1496

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants