Closed 9876691 closed 3 years ago
Can you link to the source code, it looks like it should work. It might be different versions of scale-info
: check that the version of scale-info
in the version of ink!
you are using matches with the one in the contract's Cargo.toml
Hi Code is here https://github.com/ianpurton/rust-smart-contract
It's basically what you get when you run cargo contract new flipper
The fork of ink!
you are using depends on scale-info
0.4
, so try updating your version here:
https://github.com/ianpurton/rust-smart-contract/blob/master/Cargo.toml#L15
Thanks that worked.
So the issue is that cargo contract new
is using the wrong version of scale-info
Indeed it is. Once ink!
3.0 is stabilized we will provide a new cargo-contract
release which has the correct version of scale-info
in the template. In the meantime you will have to manually correct it.
I'm having trouble with the following contract. It builds OK with
cargo +nightly contract build
but I can't run the tests withcargo +nightly test
So is the issue that I'm trying to store a struct in the storage?
I couldn't find an example anywhere of anyone trying to do this.
Thanks
Compilation errors