Skip to content

TypeError: Array with zero length specified. #184

@joelamouche

Description

@joelamouche

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/@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";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions