Supercolony-net/openbrush-contracts

cannot find type `MetadataVersioned` in crate `ink_metadata`

Closed this issue · 2 comments

can not compile example with current toolchain

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/ubuntu/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.45.2-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.56.1 (59eed8a2a 2021-11-01)


error[E0412]: cannot find type `MetadataVersioned` in crate `ink_metadata`
 --> .ink/metadata_gen/main.rs:4:48
  |
4 |     fn __ink_generate_metadata() -> ink_metadata::MetadataVersioned;
  |                                                   ^^^^^^^^^^^^^^^^^ not found in `ink_metadata`

For more information about this error, try `rustc --explain E0412`.
error: could not compile `metadata-gen` due to previous error
ERROR: `"/home/ubuntu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "run" "--package" "metadata-gen" "--manifest-path=/tmp/cargo-contract_B5pKA6/Cargo.toml" "--target-dir=/home/ubuntu/Projects/openbrush-contracts/examples/psp22/target/ink" "--release"` failed with exit code: Some(101)

OpenBrush uses an old version of ink!(3.0-rc4) and it requires an old version of cargo-contract.
You can install it cargo install cargo-contract --vers ^0.13 --force --locked.

In near future(after resolving use-ink/ink#982) we will use the latest ink! and everything should be good=)

For now, we will mark that point in the readme.

Should be fixed with #53 =)