簡體   English   中英

metis 示例有一個錯誤 [發現了 `parity-scale-codec` 的不匹配版本!]

[英]metis example has an error [Mismatching versions of `parity-scale-codec` were found!]

  • 我想嘗試用“patractlabs/metis”編譯智能合約。
  • 首先,我下載了示例項目並嘗試編譯。
  • 但是我收到如下錯誤。
  • 我從“https://github.com/patractlabs/metis/tree/master/example”下載
% npx redspot compile
compiler version: 0.14.0
toolchain: nightly
ink: 24 matches

===== Compile access_control =====

error: There are multiple `parity-scale-codec` packages in your project, and the specification `parity-scale-codec` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  parity-scale-codec:2.3.1
  parity-scale-codec:3.1.2
ERROR: Mismatching versions of `parity-scale-codec` were found!
Please ensure that your contract and your ink! dependencies use a compatible version of this package.
An unexpected error occurred:
  • 請讓我知道如何解決此錯誤。

墨水有重大變化。 RC-9。 即使您不使用 rc-9,其中一些也是有效的。 不知道你是否知道這一點。

https://github.com/paritytech/ink/blob/v3.0.0-rc9/RELEASES.md

其中一個變化是關於規模的依賴性。 依賴項應更新如下:

scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM