Open joelamouche opened 1 year ago
When using npx hardhat compile --verbose in a hardhat repo that uses IState I get:
npx hardhat compile --verbose
hardhat:core:compilation-job File '/Users/antoineestienne/GithubRepositories/NexeraID/node_modules/.pnpm/@iden3+contracts@1.1.0/node_modules/@iden3/contracts/interfaces/IState.sol' will be compiled with version '0.8.16' +0ms hardhat:core:hre Running task compile:solidity:handle-compilation-jobs-failures +0ms hardhat:core:hre Running task compile:solidity:filter-compilation-jobs +0ms hardhat:core:tasks:compile force flag enabled, not filtering +6ms hardhat:core:hre Running task compile:solidity:merge-compilation-jobs +0ms hardhat:core:hre Running task compile:solidity:compile-jobs +3ms hardhat:core:hre Running compile:solidity:compile-jobs's super +0ms hardhat:core:tasks:compile Compiling 1 jobs +3ms hardhat:core:hre Running task compile:solidity:compile-job +1ms hardhat:core:tasks:compile Compiling job with version '0.8.16' +1ms hardhat:core:hre Running task compile:solidity:get-compiler-input +0ms hardhat:core:hre Running compile:solidity:get-compiler-input's super +0ms hardhat:core:hre Running task compile:solidity:compile +0ms hardhat:core:hre Running compile:solidity:compile's super +1ms hardhat:core:hre Running task compile:solidity:solc:compile +0ms hardhat:core:hre Running task compile:solidity:solc:get-build +0ms hardhat:core:tasks:compile Native solc binary doesn't work, using solcjs instead. Try running npx hardhat clean --global +3ms hardhat:core:hre Running task compile:solidity:log:run-compiler-start +2ms hardhat:core:hre Running task compile:solidity:solcjs:run +0ms hardhat:core:hre Running task compile:solidity:log:run-compiler-end +2s hardhat:core:hre Running compile:solidity:compile's super +2ms hardhat:core:hre Running task compile:solidity:solc:compile +0ms hardhat:core:hre Running task compile:solidity:solc:get-build +0ms hardhat:core:tasks:compile Native solc binary doesn't work, using solcjs instead. Try running npx hardhat clean --global +2s hardhat:core:hre Running task compile:solidity:log:run-compiler-start +2ms hardhat:core:hre Running task compile:solidity:solcjs:run +0ms hardhat:core:hre Running task compile:solidity:log:run-compiler-end +23ms An unexpected error occurred: Error: Failed to compile modified contracts for namespaced storage: TypeError: Array with zero length specified. --> @iden3/contracts/interfaces/IState.sol:59:17: | 59 | uint256[MAX_SMT_DEPTH] siblings; | ^^^^^^^^^^^^^ Please report this at https://zpl.in/upgrades/report. If possible, include the source code for the contracts mentioned in the errors above.
This is how it is used in contract: import {StateV2} from "@iden3/contracts/state/StateV2.sol";
import {StateV2} from "@iden3/contracts/state/StateV2.sol";
Hi, @joelamouche. As a quick fix you can try to install native the solc binary. It works with the binary from my side.
When using
npx hardhat compile --verbose
in a hardhat repo that uses IState I get:This is how it is used in contract:
import {StateV2} from "@iden3/contracts/state/StateV2.sol";