Skip to content
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

TypeError: Array with zero length specified. #184

Open
joelamouche opened this issue Oct 9, 2023 · 1 comment
Open

TypeError: Array with zero length specified. #184

joelamouche opened this issue Oct 9, 2023 · 1 comment

Comments

@joelamouche
Copy link

When using npx hardhat compile --verbose in a hardhat repo that uses IState I get:

  hardhat:core:compilation-job File '/Users/antoineestienne/GithubRepositories/NexeraID/node_modules/.pnpm/@[email protected]/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";

@AndriianChestnykh
Copy link
Collaborator

Hi, @joelamouche. As a quick fix you can try to install native the solc binary. It works with the binary from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants