/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import type { TypedEventFilter, TypedEvent, TypedListener } from "./common";

interface MultiAssetVAnchorInterface extends ethers.utils.Interface {
  functions: {
    "EVM_CHAIN_ID_TYPE()": FunctionFragment;
    "FIELD_SIZE()": FunctionFragment;
    "MAX_EXT_AMOUNT()": FunctionFragment;
    "MAX_FEE()": FunctionFragment;
    "ROOT_HISTORY_SIZE()": FunctionFragment;
    "ZERO_VALUE()": FunctionFragment;
    "_executeWrapping(address,address,uint256)": FunctionFragment;
    "_withdrawAndUnwrap(address,address,address,uint256)": FunctionFragment;
    "calculatePublicAmount(int256,uint256)": FunctionFragment;
    "commitments(uint256)": FunctionFragment;
    "configureMaximumDepositLimit(uint256,uint32)": FunctionFragment;
    "configureMinimalWithdrawalLimit(uint256,uint32)": FunctionFragment;
    "currentNeighborRootIndex(uint256)": FunctionFragment;
    "edgeExistsForChain(uint256)": FunctionFragment;
    "edgeIndex(uint256)": FunctionFragment;
    "edgeList(uint256)": FunctionFragment;
    "filledSubtrees(uint256)": FunctionFragment;
    "getChainId()": FunctionFragment;
    "getChainIdType()": FunctionFragment;
    "getHasher()": FunctionFragment;
    "getLastRoot()": FunctionFragment;
    "getLatestNeighborEdges()": FunctionFragment;
    "getLatestNeighborRoots()": FunctionFragment;
    "getLevels()": FunctionFragment;
    "getNextIndex()": FunctionFragment;
    "getProposalNonce()": FunctionFragment;
    "getZeroHash(uint32)": FunctionFragment;
    "handler()": FunctionFragment;
    "hasEdge(uint256)": FunctionFragment;
    "hashLeftRight(uint256,uint256)": FunctionFragment;
    "initialize(uint256,uint256)": FunctionFragment;
    "initialized()": FunctionFragment;
    "isKnownNeighborRoot(uint256,uint256)": FunctionFragment;
    "isKnownRoot(uint256)": FunctionFragment;
    "isSpent(uint256)": FunctionFragment;
    "isSpentArray(uint256[])": FunctionFragment;
    "isValidRoots(uint256[])": FunctionFragment;
    "lastBalance()": FunctionFragment;
    "maxEdges()": FunctionFragment;
    "maximumDepositAmount()": FunctionFragment;
    "minimalWithdrawalAmount()": FunctionFragment;
    "neighborRoots(uint256,uint32)": FunctionFragment;
    "nullifierHashes(uint256)": FunctionFragment;
    "outerLevels()": FunctionFragment;
    "parseChainIdFromResourceId(bytes32)": FunctionFragment;
    "proposalNonce()": FunctionFragment;
    "register((address,bytes))": FunctionFragment;
    "registerAndTransact((address,bytes),bytes,bytes,(address,int256,address,uint256,uint256,address),(bytes,bytes,uint256[],uint256[2],uint256,uint256),(bytes,bytes))": FunctionFragment;
    "registry()": FunctionFragment;
    "roots(uint256)": FunctionFragment;
    "setHandler(address,uint32)": FunctionFragment;
    "setVerifier(address,uint32)": FunctionFragment;
    "transact(bytes,bytes,(address,int256,address,uint256,uint256,address),(bytes,bytes,uint256[],uint256[2],uint256,uint256),(bytes,bytes))": FunctionFragment;
    "unpackProof(uint256[8])": FunctionFragment;
    "updateEdge(uint256,uint32,bytes32)": FunctionFragment;
    "verifier()": FunctionFragment;
    "wrapAndDepositERC20(address,address,uint256,bytes32,bytes)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "EVM_CHAIN_ID_TYPE",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "FIELD_SIZE",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "MAX_EXT_AMOUNT",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "MAX_FEE", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "ROOT_HISTORY_SIZE",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "ZERO_VALUE",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "_executeWrapping",
    values: [string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "_withdrawAndUnwrap",
    values: [string, string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "calculatePublicAmount",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "commitments",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "configureMaximumDepositLimit",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "configureMinimalWithdrawalLimit",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "currentNeighborRootIndex",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "edgeExistsForChain",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "edgeIndex",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "edgeList",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "filledSubtrees",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getChainId",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getChainIdType",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "getHasher", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getLastRoot",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getLatestNeighborEdges",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getLatestNeighborRoots",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "getLevels", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getNextIndex",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getProposalNonce",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getZeroHash",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "handler", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "hasEdge",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "hashLeftRight",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "initialized",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "isKnownNeighborRoot",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "isKnownRoot",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "isSpent",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "isSpentArray",
    values: [BigNumberish[]]
  ): string;
  encodeFunctionData(
    functionFragment: "isValidRoots",
    values: [BigNumberish[]]
  ): string;
  encodeFunctionData(
    functionFragment: "lastBalance",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "maxEdges", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "maximumDepositAmount",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "minimalWithdrawalAmount",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "neighborRoots",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "nullifierHashes",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "outerLevels",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "parseChainIdFromResourceId",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "proposalNonce",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "register",
    values: [{ owner: string; keyData: BytesLike }]
  ): string;
  encodeFunctionData(
    functionFragment: "registerAndTransact",
    values: [
      { owner: string; keyData: BytesLike },
      BytesLike,
      BytesLike,
      {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike }
    ]
  ): string;
  encodeFunctionData(functionFragment: "registry", values?: undefined): string;
  encodeFunctionData(functionFragment: "roots", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "setHandler",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setVerifier",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "transact",
    values: [
      BytesLike,
      BytesLike,
      {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "unpackProof",
    values: [
      [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
      ]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "updateEdge",
    values: [BigNumberish, BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "verifier", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "wrapAndDepositERC20",
    values: [string, string, BigNumberish, BytesLike, BytesLike]
  ): string;

  decodeFunctionResult(
    functionFragment: "EVM_CHAIN_ID_TYPE",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "FIELD_SIZE", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "MAX_EXT_AMOUNT",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "MAX_FEE", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "ROOT_HISTORY_SIZE",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "ZERO_VALUE", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "_executeWrapping",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "_withdrawAndUnwrap",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "calculatePublicAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "commitments",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "configureMaximumDepositLimit",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "configureMinimalWithdrawalLimit",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "currentNeighborRootIndex",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "edgeExistsForChain",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "edgeIndex", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "edgeList", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "filledSubtrees",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getChainIdType",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getHasher", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getLastRoot",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getLatestNeighborEdges",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getLatestNeighborRoots",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getLevels", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getNextIndex",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getProposalNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getZeroHash",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "handler", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "hasEdge", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "hashLeftRight",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "initialized",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "isKnownNeighborRoot",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "isKnownRoot",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "isSpent", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isSpentArray",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "isValidRoots",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "lastBalance",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "maxEdges", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "maximumDepositAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "minimalWithdrawalAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "neighborRoots",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "nullifierHashes",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "outerLevels",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseChainIdFromResourceId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "proposalNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "registerAndTransact",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setVerifier",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "transact", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "unpackProof",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "updateEdge", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "verifier", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "wrapAndDepositERC20",
    data: BytesLike
  ): Result;

  events: {
    "EdgeAddition(uint256,uint256,uint256)": EventFragment;
    "EdgeUpdate(uint256,uint256,uint256)": EventFragment;
    "Insertion(uint256,uint32,uint256)": EventFragment;
    "NewCommitment(uint256,uint256,uint256,bytes)": EventFragment;
    "NewNullifier(uint256)": EventFragment;
    "PublicKey(address,bytes)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "EdgeAddition"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "EdgeUpdate"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Insertion"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewCommitment"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewNullifier"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PublicKey"): EventFragment;
}

export type EdgeAdditionEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber] & {
    chainID: BigNumber;
    latestLeafIndex: BigNumber;
    merkleRoot: BigNumber;
  }
>;

export type EdgeUpdateEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber] & {
    chainID: BigNumber;
    latestLeafIndex: BigNumber;
    merkleRoot: BigNumber;
  }
>;

export type InsertionEvent = TypedEvent<
  [BigNumber, number, BigNumber] & {
    commitment: BigNumber;
    leafIndex: number;
    timestamp: BigNumber;
  }
>;

export type NewCommitmentEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber, string] & {
    commitment: BigNumber;
    subTreeIndex: BigNumber;
    leafIndex: BigNumber;
    encryptedOutput: string;
  }
>;

export type NewNullifierEvent = TypedEvent<
  [BigNumber] & { nullifier: BigNumber }
>;

export type PublicKeyEvent = TypedEvent<
  [string, string] & { owner: string; key: string }
>;

export class MultiAssetVAnchor extends BaseContract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  listeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;
  off<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  on<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  once<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): this;

  listeners(eventName?: string): Array<Listener>;
  off(eventName: string, listener: Listener): this;
  on(eventName: string, listener: Listener): this;
  once(eventName: string, listener: Listener): this;
  removeListener(eventName: string, listener: Listener): this;
  removeAllListeners(eventName?: string): this;

  queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
    event: TypedEventFilter<EventArgsArray, EventArgsObject>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

  interface: MultiAssetVAnchorInterface;

  functions: {
    EVM_CHAIN_ID_TYPE(overrides?: CallOverrides): Promise<[string]>;

    FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>;

    MAX_EXT_AMOUNT(overrides?: CallOverrides): Promise<[BigNumber]>;

    MAX_FEE(overrides?: CallOverrides): Promise<[BigNumber]>;

    ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>;

    ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;

    _executeWrapping(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _extAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    _withdrawAndUnwrap(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _recipient: string,
      _minusExtAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    calculatePublicAmount(
      _extAmount: BigNumberish,
      _fee: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    commitments(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    configureMaximumDepositLimit(
      _maximumDepositAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    configureMinimalWithdrawalLimit(
      _minimalWithdrawalAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    currentNeighborRootIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[number]>;

    edgeExistsForChain(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    edgeIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    edgeList(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        chainID: BigNumber;
        root: BigNumber;
        latestLeafIndex: BigNumber;
        srcResourceID: string;
      }
    >;

    filledSubtrees(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getChainId(overrides?: CallOverrides): Promise<[BigNumber]>;

    getChainIdType(overrides?: CallOverrides): Promise<[number]>;

    getHasher(overrides?: CallOverrides): Promise<[string]>;

    getLastRoot(overrides?: CallOverrides): Promise<[BigNumber]>;

    getLatestNeighborEdges(
      overrides?: CallOverrides
    ): Promise<
      [
        ([BigNumber, BigNumber, BigNumber, string] & {
          chainID: BigNumber;
          root: BigNumber;
          latestLeafIndex: BigNumber;
          srcResourceID: string;
        })[]
      ]
    >;

    getLatestNeighborRoots(overrides?: CallOverrides): Promise<[BigNumber[]]>;

    getLevels(overrides?: CallOverrides): Promise<[number]>;

    getNextIndex(overrides?: CallOverrides): Promise<[number]>;

    getProposalNonce(overrides?: CallOverrides): Promise<[BigNumber]>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    handler(overrides?: CallOverrides): Promise<[string]>;

    hasEdge(
      _chainID: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    hashLeftRight(
      _left: BigNumberish,
      _right: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    initialize(
      _minimalWithdrawalAmount: BigNumberish,
      _maximumDepositAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    initialized(overrides?: CallOverrides): Promise<[boolean]>;

    isKnownNeighborRoot(
      _neighborChainID: BigNumberish,
      _root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    isSpent(
      _nullifierHash: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    isSpentArray(
      _nullifierHashes: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<[boolean[]]>;

    isValidRoots(
      _roots: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    lastBalance(overrides?: CallOverrides): Promise<[BigNumber]>;

    maxEdges(overrides?: CallOverrides): Promise<[number]>;

    maximumDepositAmount(overrides?: CallOverrides): Promise<[BigNumber]>;

    minimalWithdrawalAmount(overrides?: CallOverrides): Promise<[BigNumber]>;

    neighborRoots(
      arg0: BigNumberish,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    nullifierHashes(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    outerLevels(overrides?: CallOverrides): Promise<[number]>;

    parseChainIdFromResourceId(
      _resourceId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    proposalNonce(overrides?: CallOverrides): Promise<[BigNumber]>;

    register(
      _account: { owner: string; keyData: BytesLike },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    registerAndTransact(
      _account: { owner: string; keyData: BytesLike },
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    registry(overrides?: CallOverrides): Promise<[string]>;

    roots(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, number] & { root: BigNumber; latestLeafindex: number }
    >;

    setHandler(
      _handler: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setVerifier(
      _verifier: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    transact(
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    unpackProof(
      _proof: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
      ],
      overrides?: CallOverrides
    ): Promise<
      [
        [BigNumber, BigNumber],
        [[BigNumber, BigNumber], [BigNumber, BigNumber]],
        [BigNumber, BigNumber]
      ]
    >;

    updateEdge(
      _root: BigNumberish,
      _leafIndex: BigNumberish,
      _srcResourceID: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    verifier(overrides?: CallOverrides): Promise<[string]>;

    wrapAndDepositERC20(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _amount: BigNumberish,
      partialCommitment: BytesLike,
      encryptedCommitment: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  EVM_CHAIN_ID_TYPE(overrides?: CallOverrides): Promise<string>;

  FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;

  MAX_EXT_AMOUNT(overrides?: CallOverrides): Promise<BigNumber>;

  MAX_FEE(overrides?: CallOverrides): Promise<BigNumber>;

  ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;

  ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;

  _executeWrapping(
    _fromTokenAddress: string,
    _toTokenAddress: string,
    _extAmount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  _withdrawAndUnwrap(
    _fromTokenAddress: string,
    _toTokenAddress: string,
    _recipient: string,
    _minusExtAmount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  calculatePublicAmount(
    _extAmount: BigNumberish,
    _fee: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  commitments(arg0: BigNumberish, overrides?: CallOverrides): Promise<boolean>;

  configureMaximumDepositLimit(
    _maximumDepositAmount: BigNumberish,
    _nonce: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  configureMinimalWithdrawalLimit(
    _minimalWithdrawalAmount: BigNumberish,
    _nonce: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  currentNeighborRootIndex(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<number>;

  edgeExistsForChain(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  edgeIndex(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

  edgeList(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber, string] & {
      chainID: BigNumber;
      root: BigNumber;
      latestLeafIndex: BigNumber;
      srcResourceID: string;
    }
  >;

  filledSubtrees(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getChainId(overrides?: CallOverrides): Promise<BigNumber>;

  getChainIdType(overrides?: CallOverrides): Promise<number>;

  getHasher(overrides?: CallOverrides): Promise<string>;

  getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;

  getLatestNeighborEdges(
    overrides?: CallOverrides
  ): Promise<
    ([BigNumber, BigNumber, BigNumber, string] & {
      chainID: BigNumber;
      root: BigNumber;
      latestLeafIndex: BigNumber;
      srcResourceID: string;
    })[]
  >;

  getLatestNeighborRoots(overrides?: CallOverrides): Promise<BigNumber[]>;

  getLevels(overrides?: CallOverrides): Promise<number>;

  getNextIndex(overrides?: CallOverrides): Promise<number>;

  getProposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

  getZeroHash(
    index: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  handler(overrides?: CallOverrides): Promise<string>;

  hasEdge(_chainID: BigNumberish, overrides?: CallOverrides): Promise<boolean>;

  hashLeftRight(
    _left: BigNumberish,
    _right: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  initialize(
    _minimalWithdrawalAmount: BigNumberish,
    _maximumDepositAmount: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  initialized(overrides?: CallOverrides): Promise<boolean>;

  isKnownNeighborRoot(
    _neighborChainID: BigNumberish,
    _root: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  isKnownRoot(root: BigNumberish, overrides?: CallOverrides): Promise<boolean>;

  isSpent(
    _nullifierHash: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  isSpentArray(
    _nullifierHashes: BigNumberish[],
    overrides?: CallOverrides
  ): Promise<boolean[]>;

  isValidRoots(
    _roots: BigNumberish[],
    overrides?: CallOverrides
  ): Promise<boolean>;

  lastBalance(overrides?: CallOverrides): Promise<BigNumber>;

  maxEdges(overrides?: CallOverrides): Promise<number>;

  maximumDepositAmount(overrides?: CallOverrides): Promise<BigNumber>;

  minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;

  neighborRoots(
    arg0: BigNumberish,
    arg1: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  nullifierHashes(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  outerLevels(overrides?: CallOverrides): Promise<number>;

  parseChainIdFromResourceId(
    _resourceId: BytesLike,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  proposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

  register(
    _account: { owner: string; keyData: BytesLike },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  registerAndTransact(
    _account: { owner: string; keyData: BytesLike },
    _proof: BytesLike,
    _auxPublicInputs: BytesLike,
    _externalData: {
      recipient: string;
      extAmount: BigNumberish;
      relayer: string;
      fee: BigNumberish;
      refund: BigNumberish;
      token: string;
    },
    _publicInputs: {
      roots: BytesLike;
      extensionRoots: BytesLike;
      inputNullifiers: BigNumberish[];
      outputCommitments: [BigNumberish, BigNumberish];
      publicAmount: BigNumberish;
      extDataHash: BigNumberish;
    },
    _encryptions: { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike },
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  registry(overrides?: CallOverrides): Promise<string>;

  roots(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, number] & { root: BigNumber; latestLeafindex: number }
  >;

  setHandler(
    _handler: string,
    _nonce: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setVerifier(
    _verifier: string,
    _nonce: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  transact(
    _proof: BytesLike,
    _auxPublicInputs: BytesLike,
    _externalData: {
      recipient: string;
      extAmount: BigNumberish;
      relayer: string;
      fee: BigNumberish;
      refund: BigNumberish;
      token: string;
    },
    _publicInputs: {
      roots: BytesLike;
      extensionRoots: BytesLike;
      inputNullifiers: BigNumberish[];
      outputCommitments: [BigNumberish, BigNumberish];
      publicAmount: BigNumberish;
      extDataHash: BigNumberish;
    },
    _encryptions: { encryptedOutput1: BytesLike; encryptedOutput2: BytesLike },
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  unpackProof(
    _proof: [
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ],
    overrides?: CallOverrides
  ): Promise<
    [
      [BigNumber, BigNumber],
      [[BigNumber, BigNumber], [BigNumber, BigNumber]],
      [BigNumber, BigNumber]
    ]
  >;

  updateEdge(
    _root: BigNumberish,
    _leafIndex: BigNumberish,
    _srcResourceID: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  verifier(overrides?: CallOverrides): Promise<string>;

  wrapAndDepositERC20(
    _fromTokenAddress: string,
    _toTokenAddress: string,
    _amount: BigNumberish,
    partialCommitment: BytesLike,
    encryptedCommitment: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    EVM_CHAIN_ID_TYPE(overrides?: CallOverrides): Promise<string>;

    FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;

    MAX_EXT_AMOUNT(overrides?: CallOverrides): Promise<BigNumber>;

    MAX_FEE(overrides?: CallOverrides): Promise<BigNumber>;

    ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;

    ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;

    _executeWrapping(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _extAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    _withdrawAndUnwrap(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _recipient: string,
      _minusExtAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    calculatePublicAmount(
      _extAmount: BigNumberish,
      _fee: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    commitments(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    configureMaximumDepositLimit(
      _maximumDepositAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    configureMinimalWithdrawalLimit(
      _minimalWithdrawalAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    currentNeighborRootIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<number>;

    edgeExistsForChain(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    edgeIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    edgeList(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        chainID: BigNumber;
        root: BigNumber;
        latestLeafIndex: BigNumber;
        srcResourceID: string;
      }
    >;

    filledSubtrees(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getChainId(overrides?: CallOverrides): Promise<BigNumber>;

    getChainIdType(overrides?: CallOverrides): Promise<number>;

    getHasher(overrides?: CallOverrides): Promise<string>;

    getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;

    getLatestNeighborEdges(
      overrides?: CallOverrides
    ): Promise<
      ([BigNumber, BigNumber, BigNumber, string] & {
        chainID: BigNumber;
        root: BigNumber;
        latestLeafIndex: BigNumber;
        srcResourceID: string;
      })[]
    >;

    getLatestNeighborRoots(overrides?: CallOverrides): Promise<BigNumber[]>;

    getLevels(overrides?: CallOverrides): Promise<number>;

    getNextIndex(overrides?: CallOverrides): Promise<number>;

    getProposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    handler(overrides?: CallOverrides): Promise<string>;

    hasEdge(
      _chainID: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    hashLeftRight(
      _left: BigNumberish,
      _right: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    initialize(
      _minimalWithdrawalAmount: BigNumberish,
      _maximumDepositAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    initialized(overrides?: CallOverrides): Promise<boolean>;

    isKnownNeighborRoot(
      _neighborChainID: BigNumberish,
      _root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    isSpent(
      _nullifierHash: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    isSpentArray(
      _nullifierHashes: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<boolean[]>;

    isValidRoots(
      _roots: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<boolean>;

    lastBalance(overrides?: CallOverrides): Promise<BigNumber>;

    maxEdges(overrides?: CallOverrides): Promise<number>;

    maximumDepositAmount(overrides?: CallOverrides): Promise<BigNumber>;

    minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;

    neighborRoots(
      arg0: BigNumberish,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    nullifierHashes(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    outerLevels(overrides?: CallOverrides): Promise<number>;

    parseChainIdFromResourceId(
      _resourceId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    proposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

    register(
      _account: { owner: string; keyData: BytesLike },
      overrides?: CallOverrides
    ): Promise<void>;

    registerAndTransact(
      _account: { owner: string; keyData: BytesLike },
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    registry(overrides?: CallOverrides): Promise<string>;

    roots(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, number] & { root: BigNumber; latestLeafindex: number }
    >;

    setHandler(
      _handler: string,
      _nonce: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setVerifier(
      _verifier: string,
      _nonce: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    transact(
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    unpackProof(
      _proof: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
      ],
      overrides?: CallOverrides
    ): Promise<
      [
        [BigNumber, BigNumber],
        [[BigNumber, BigNumber], [BigNumber, BigNumber]],
        [BigNumber, BigNumber]
      ]
    >;

    updateEdge(
      _root: BigNumberish,
      _leafIndex: BigNumberish,
      _srcResourceID: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    verifier(overrides?: CallOverrides): Promise<string>;

    wrapAndDepositERC20(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _amount: BigNumberish,
      partialCommitment: BytesLike,
      encryptedCommitment: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    "EdgeAddition(uint256,uint256,uint256)"(
      chainID?: null,
      latestLeafIndex?: null,
      merkleRoot?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { chainID: BigNumber; latestLeafIndex: BigNumber; merkleRoot: BigNumber }
    >;

    EdgeAddition(
      chainID?: null,
      latestLeafIndex?: null,
      merkleRoot?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { chainID: BigNumber; latestLeafIndex: BigNumber; merkleRoot: BigNumber }
    >;

    "EdgeUpdate(uint256,uint256,uint256)"(
      chainID?: null,
      latestLeafIndex?: null,
      merkleRoot?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { chainID: BigNumber; latestLeafIndex: BigNumber; merkleRoot: BigNumber }
    >;

    EdgeUpdate(
      chainID?: null,
      latestLeafIndex?: null,
      merkleRoot?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { chainID: BigNumber; latestLeafIndex: BigNumber; merkleRoot: BigNumber }
    >;

    "Insertion(uint256,uint32,uint256)"(
      commitment?: BigNumberish | null,
      leafIndex?: null,
      timestamp?: null
    ): TypedEventFilter<
      [BigNumber, number, BigNumber],
      { commitment: BigNumber; leafIndex: number; timestamp: BigNumber }
    >;

    Insertion(
      commitment?: BigNumberish | null,
      leafIndex?: null,
      timestamp?: null
    ): TypedEventFilter<
      [BigNumber, number, BigNumber],
      { commitment: BigNumber; leafIndex: number; timestamp: BigNumber }
    >;

    "NewCommitment(uint256,uint256,uint256,bytes)"(
      commitment?: null,
      subTreeIndex?: null,
      leafIndex?: null,
      encryptedOutput?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber, string],
      {
        commitment: BigNumber;
        subTreeIndex: BigNumber;
        leafIndex: BigNumber;
        encryptedOutput: string;
      }
    >;

    NewCommitment(
      commitment?: null,
      subTreeIndex?: null,
      leafIndex?: null,
      encryptedOutput?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber, string],
      {
        commitment: BigNumber;
        subTreeIndex: BigNumber;
        leafIndex: BigNumber;
        encryptedOutput: string;
      }
    >;

    "NewNullifier(uint256)"(
      nullifier?: null
    ): TypedEventFilter<[BigNumber], { nullifier: BigNumber }>;

    NewNullifier(
      nullifier?: null
    ): TypedEventFilter<[BigNumber], { nullifier: BigNumber }>;

    "PublicKey(address,bytes)"(
      owner?: string | null,
      key?: null
    ): TypedEventFilter<[string, string], { owner: string; key: string }>;

    PublicKey(
      owner?: string | null,
      key?: null
    ): TypedEventFilter<[string, string], { owner: string; key: string }>;
  };

  estimateGas: {
    EVM_CHAIN_ID_TYPE(overrides?: CallOverrides): Promise<BigNumber>;

    FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;

    MAX_EXT_AMOUNT(overrides?: CallOverrides): Promise<BigNumber>;

    MAX_FEE(overrides?: CallOverrides): Promise<BigNumber>;

    ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<BigNumber>;

    ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;

    _executeWrapping(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _extAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    _withdrawAndUnwrap(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _recipient: string,
      _minusExtAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    calculatePublicAmount(
      _extAmount: BigNumberish,
      _fee: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    commitments(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    configureMaximumDepositLimit(
      _maximumDepositAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    configureMinimalWithdrawalLimit(
      _minimalWithdrawalAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    currentNeighborRootIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    edgeExistsForChain(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    edgeIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    edgeList(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

    filledSubtrees(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getChainId(overrides?: CallOverrides): Promise<BigNumber>;

    getChainIdType(overrides?: CallOverrides): Promise<BigNumber>;

    getHasher(overrides?: CallOverrides): Promise<BigNumber>;

    getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;

    getLatestNeighborEdges(overrides?: CallOverrides): Promise<BigNumber>;

    getLatestNeighborRoots(overrides?: CallOverrides): Promise<BigNumber>;

    getLevels(overrides?: CallOverrides): Promise<BigNumber>;

    getNextIndex(overrides?: CallOverrides): Promise<BigNumber>;

    getProposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    handler(overrides?: CallOverrides): Promise<BigNumber>;

    hasEdge(
      _chainID: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    hashLeftRight(
      _left: BigNumberish,
      _right: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    initialize(
      _minimalWithdrawalAmount: BigNumberish,
      _maximumDepositAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    initialized(overrides?: CallOverrides): Promise<BigNumber>;

    isKnownNeighborRoot(
      _neighborChainID: BigNumberish,
      _root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isSpent(
      _nullifierHash: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isSpentArray(
      _nullifierHashes: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isValidRoots(
      _roots: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    lastBalance(overrides?: CallOverrides): Promise<BigNumber>;

    maxEdges(overrides?: CallOverrides): Promise<BigNumber>;

    maximumDepositAmount(overrides?: CallOverrides): Promise<BigNumber>;

    minimalWithdrawalAmount(overrides?: CallOverrides): Promise<BigNumber>;

    neighborRoots(
      arg0: BigNumberish,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    nullifierHashes(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    outerLevels(overrides?: CallOverrides): Promise<BigNumber>;

    parseChainIdFromResourceId(
      _resourceId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    proposalNonce(overrides?: CallOverrides): Promise<BigNumber>;

    register(
      _account: { owner: string; keyData: BytesLike },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    registerAndTransact(
      _account: { owner: string; keyData: BytesLike },
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    registry(overrides?: CallOverrides): Promise<BigNumber>;

    roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

    setHandler(
      _handler: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setVerifier(
      _verifier: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    transact(
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    unpackProof(
      _proof: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
      ],
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    updateEdge(
      _root: BigNumberish,
      _leafIndex: BigNumberish,
      _srcResourceID: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    verifier(overrides?: CallOverrides): Promise<BigNumber>;

    wrapAndDepositERC20(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _amount: BigNumberish,
      partialCommitment: BytesLike,
      encryptedCommitment: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    EVM_CHAIN_ID_TYPE(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    FIELD_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    MAX_EXT_AMOUNT(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    MAX_FEE(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    _executeWrapping(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _extAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    _withdrawAndUnwrap(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _recipient: string,
      _minusExtAmount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    calculatePublicAmount(
      _extAmount: BigNumberish,
      _fee: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    commitments(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    configureMaximumDepositLimit(
      _maximumDepositAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    configureMinimalWithdrawalLimit(
      _minimalWithdrawalAmount: BigNumberish,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    currentNeighborRootIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    edgeExistsForChain(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    edgeIndex(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    edgeList(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    filledSubtrees(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getChainId(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getChainIdType(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getHasher(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getLatestNeighborEdges(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getLatestNeighborRoots(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getLevels(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getNextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getProposalNonce(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    handler(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    hasEdge(
      _chainID: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    hashLeftRight(
      _left: BigNumberish,
      _right: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    initialize(
      _minimalWithdrawalAmount: BigNumberish,
      _maximumDepositAmount: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    initialized(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    isKnownNeighborRoot(
      _neighborChainID: BigNumberish,
      _root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    isSpent(
      _nullifierHash: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    isSpentArray(
      _nullifierHashes: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    isValidRoots(
      _roots: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    lastBalance(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    maxEdges(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    maximumDepositAmount(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    minimalWithdrawalAmount(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    neighborRoots(
      arg0: BigNumberish,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    nullifierHashes(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    outerLevels(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    parseChainIdFromResourceId(
      _resourceId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    proposalNonce(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    register(
      _account: { owner: string; keyData: BytesLike },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    registerAndTransact(
      _account: { owner: string; keyData: BytesLike },
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    registry(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    roots(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    setHandler(
      _handler: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setVerifier(
      _verifier: string,
      _nonce: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    transact(
      _proof: BytesLike,
      _auxPublicInputs: BytesLike,
      _externalData: {
        recipient: string;
        extAmount: BigNumberish;
        relayer: string;
        fee: BigNumberish;
        refund: BigNumberish;
        token: string;
      },
      _publicInputs: {
        roots: BytesLike;
        extensionRoots: BytesLike;
        inputNullifiers: BigNumberish[];
        outputCommitments: [BigNumberish, BigNumberish];
        publicAmount: BigNumberish;
        extDataHash: BigNumberish;
      },
      _encryptions: {
        encryptedOutput1: BytesLike;
        encryptedOutput2: BytesLike;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    unpackProof(
      _proof: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
      ],
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    updateEdge(
      _root: BigNumberish,
      _leafIndex: BigNumberish,
      _srcResourceID: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    verifier(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    wrapAndDepositERC20(
      _fromTokenAddress: string,
      _toTokenAddress: string,
      _amount: BigNumberish,
      partialCommitment: BytesLike,
      encryptedCommitment: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
