On master branch after merged this PR, I try to build example contract and got this error. Has anyone faced this issue?
It's because of cargo-contract branch hasn't merged and which is in progress, you can view details here
cargo install cargo-contract --version 2.0.0-rc
The above command will install v2 of cargo contract. This includes ink v4 which has renamed the
ink_lang module to
ink. Thus using
cargo-contract before v2 results in the
ink_lang not found error. Other changes have also been made for ink v4, such as
ink::env, so you will need to make the corresponding changes throughout your contract. Here's a link to the cargo-contract v2 release. And here's a link to ink v4's release, which lists the breaking changes.