I am using:
ethereum-type version = "0.12", codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"]}
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
And latest substrate-node-template
of branch polkadot-v0.9.19
.
So I am trying to build the code , and for the above ethereum_types, getting WrapperTypeEncode
error.
Can you help me to resolve the above error?
Complete error list:
the trait bound `ethereum_types::U256: WrapperTypeEncode` is not satisfied
--> pallets/light-client/src/lib.rs:101:1
|
101 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::U256`
|
= note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::U256`
note: required by a bound in `EncodeLike`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25
|
73 | pub trait EncodeLike<T: Encode = Self>: Sized + Encode {}
| ^^^^^^ required by this bound in `EncodeLike`
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `ethereum_types::H256: WrapperTypeEncode` is not satisfied
--> pallets/light-client/src/lib.rs:101:1
|
101 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `ethereum_types::H256`
|
= note: required because of the requirements on the impl of `parity_scale_codec::Encode` for `ethereum_types::H256`
note: required by a bound in `EncodeLike`
--> .cargo/registry/src/github.com-1ecc6299db9ec823/parity-scale-codec-3.1.2/src/encode_like.rs:73:25
|
73 | pub trait EncodeLike<T: Encode = Self>: Sized + Encode {}
| ^^^^^^ required by this bound in `EncodeLike`
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
warning: `pallet-eth-light-client` (lib) generated 7 warnings
error: could not compile `pallet-eth-light-client` due to 2 previous errors; 7 warnings emitted