Problem
When executing the following command, an error occurred.
cargo contract build
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.
Environment
- OS: Ubuntu 20.04 wsl
- cargo-contract: 2.0.0-alpha.3-unknown-x86_64-unknown-linux-gnu
- ink:
ink = { version = "4.0.0-alpha.3", default-features = false } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
- rustc: 1.66.0-nightly
Code
The template code
cargo contract new alpha403
I have checked the version of parity-scale-codec
, it is version 3
in both my ink! project and in the ink package of version 4.0.0-alpha.3
.
Environment
as yours exceptOS: macOS Monterey
and I haven't faced issue.