1

外部パラメーター宣言で次の構造体を使用しようとしています:

pub struct PriceUpdate {
    pub source_currency: Vec<u8>,
    pub target_currency: Vec<u8>,
    pub provider: Vec<u8>,
    pub price: i64,
}

外部宣言は次のとおりです。

pub fn new_price(origin: OriginFor<T>, price_update: PriceUpdate) -> DispatchResult {

これにより、コンパイル エラーが発生します。

^^^^^^^^^^^ the trait `WrapperTypeEncode` is not implemented for `PriceUpdate`

structs/vecs/structs/etc の vecs などの複雑な型に関する外部パラメーターの要件について誰かが説明できますか? 私は WrapperTypeEncode ドキュメントを見てきましたhttps://docs.rs/parity-scale-codec/2.2.0/parity_scale_codec/trait.WrapperTypeEncode.htmlしかし、それらはそのような情報を詳しく説明していません。

どうもありがとう!

4

1 に答える 1