However, I am getting following errors when trying to build
Compiling proc-macro2 v1.0.86
Compiling static_assertions v1.1.0
Compiling base64 v0.21.7
Compiling hex v0.4.3
Compiling hashbrown v0.11.2
Compiling fnv v1.0.7
Compiling crunchy v0.2.2
Compiling byteorder v1.5.0
error[E0463]: can’t find crate for core
|
= note: the wasm32-unknown-unknown target may not be installed
= help: consider downloading the target with rustup target add wasm32-unknown-unknown
error[E0463]: can’t find crate for std
|
= note: the wasm32-unknown-unknown target may not be installed
= help: consider downloading the target with rustup target add wasm32-unknown-unknown
For more information about this error, try rustc --explain E0463.
error: could not compile hex (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish…
error: could not compile crunchy (lib) due to 1 previous error
error: could not compile fnv (lib) due to 1 previous error
error: could not compile byteorder (lib) due to 1 previous error
error: could not compile base64 (lib) due to 1 previous error
error: could not compile static_assertions (lib) due to 1 previous error
error: could not compile hashbrown (lib) due to 1 previous error
Error: Could not build smart contract.
Caused by:
0: Could not build module schema.
1: Compilation failed.
The contract state no longer needs to implement StateClone trait in order to work with the test infrastructure. You can remove the word StateClone in the smart contract snippet to resolve this error.
Our old test infrastructure (which required StateClone trait) is deprecated in favor of using integration tests. The below library should be used to write integration tests for your smart contract.
You can update your Cargo.toml file to use the integration testing library as follows:
error[E0433]: failed to resolve: use of undeclared crate or module hex
→ src/lib.rs:185:23
|
185 | let hex_res = hex::decode_to_slice(self.hash.to_owned(), &mut hash_bytes);
error[E0609]: no field blacklist on type &mut State
→ src/lib.rs:867:58
|
867 | fn add_blacklist(&mut self, address: Address) { self.blacklist.insert(address); }
| ^^^^^^^^^ unknown field