-
Notifications
You must be signed in to change notification settings - Fork 217
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
Issues wrapping ethereum types and deriving scale-codec methods #679
Comments
A similar thing happens with a trait for
If I try implementing the trait myself: impl Encode for $name {
fn encode(&self) -> Vec<u8> {
self.0.encode()
}
} I get the following error as well:
|
From what I can see, this is a general rust question. The compiler is your friend and it tells you what's wrong:
In your implementation of the macro, you assume that Take a look at how codec is implemented in https://github.com/paritytech/parity-common/blob/master/primitive-types/impls/codec/src/lib.rs. Note the #[doc(hidden)]
pub use parity_scale_codec as codec; |
I'm trying to implement wrapper types for
ethereum_types
types in order to provide other traits necessary for making my code compatible with https://github.com/sigp/lighthouse dependencies and Substrate. The following snippet demonstrates my intention.Unfortunately, I keep fighting with the compiler who doesn't think that these types can implement Encode/Decode even though I am importing the package with those features. My TOML is below:
Errors
The text was updated successfully, but these errors were encountered: