-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zk contract deploy failed #597
Comments
Compilation Errors in Rust rust rust rust rust rust Warnings: Unused Imports rust rust Solution: Ensure Typechain Installation: Make sure Typechain is installed in your project. You can add it via npm or yarn if it's missing: bash After installation, you may need to generate or regenerate Typechain artifacts. This typically involves a command like: Check Typechain Configuration: Ensure your project's configuration files (like tsconfig.json for TypeScript) are set up to include the Typechain output directories and that these are correctly referenced in your deployment scripts. |
When I finished "zk init", use the "zk contract deploy", it returns can't find typechain, the returns:
error[E0277]: the size for values of type
[u8]
cannot be known at compilation time--> core/lib/storage/src/chain/operations_ext/mod.rs:1444:15
|
1444 | .map(|account| (start_account, Address::from_slice(&account)))
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait
Sized
is not implemented for[u8]
= note: all function arguments must have a statically known size
error[E0282]: type annotations needed for
Vec<T>
--> core/lib/storage/src/chain/state/mod.rs:623:17
|
623 | let mut account_diff = Vec::new();
| ^^^^^^^^^^^^^^^^
...
642 | .map(|acc| acc.block_number())
| ------------ type must be known at this point
|
help: consider giving
account_diff
an explicit type, where the type for type parameterT
is specified|
623 | let mut account_diff: Vec = Vec::new();
| ++++++++
error[E0609]: no field
from_block
on type&_
--> core/lib/storage/src/ethereum/mod.rs:520:46
|
520 | ... let (from_block, to_block) = (op.from_block as u32, op.to_block a...
| ^^^^^^^^^^
warning: unused import:
num::bigint::ToBigInt
--> core/lib/storage/src/chain/account/mod.rs:24:5
|
24 | use num::bigint::ToBigInt;
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused import:
num::ToPrimitive
--> core/lib/storage/src/misc/mod.rs:9:5
|
9 | use num::ToPrimitive;
| ^^^^^^^^^^^^^^^^
Some errors have detailed explanations: E0277, E0282, E0609.
For more information about an error, try
rustc --explain E0277
.warning:
zksync_storage
(lib) generated 21 warningserror: could not compile
zksync_storage
(lib) due to 319 previous errors; 21 warnings emittedThe text was updated successfully, but these errors were encountered: