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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  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 RegistryInterface extends ethers.utils.Interface {
  functions: {
    "fungibleTokenManager()": FunctionFragment;
    "getAssetAddress(uint256)": FunctionFragment;
    "getAssetId(address)": FunctionFragment;
    "getProposalNonce()": FunctionFragment;
    "idToWrappedAsset(uint256)": FunctionFragment;
    "initialize(address,address,address,address,address)": FunctionFragment;
    "initialized()": FunctionFragment;
    "maspVAnchor()": FunctionFragment;
    "masterFeeRecipient()": FunctionFragment;
    "nonFungibleTokenManager()": FunctionFragment;
    "proposalNonce()": FunctionFragment;
    "registerNftToken(uint32,address,uint256,string,bytes32)": FunctionFragment;
    "registerToken(uint32,address,uint256,string,string,bytes32,uint256,uint16,bool)": FunctionFragment;
    "registryHandler()": FunctionFragment;
    "wrappedAssetToId(address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "fungibleTokenManager",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getAssetAddress",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "getAssetId", values: [string]): string;
  encodeFunctionData(
    functionFragment: "getProposalNonce",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "idToWrappedAsset",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [string, string, string, string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "initialized",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "maspVAnchor",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "masterFeeRecipient",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "nonFungibleTokenManager",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "proposalNonce",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "registerNftToken",
    values: [BigNumberish, string, BigNumberish, string, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "registerToken",
    values: [
      BigNumberish,
      string,
      BigNumberish,
      string,
      string,
      BytesLike,
      BigNumberish,
      BigNumberish,
      boolean
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "registryHandler",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "wrappedAssetToId",
    values: [string]
  ): string;

  decodeFunctionResult(
    functionFragment: "fungibleTokenManager",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAssetAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getAssetId", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getProposalNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "idToWrappedAsset",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "initialized",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "maspVAnchor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "masterFeeRecipient",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "nonFungibleTokenManager",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "proposalNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerNftToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registryHandler",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "wrappedAssetToId",
    data: BytesLike
  ): Result;

  events: {
    "TokenRegistered(address,address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "TokenRegistered"): EventFragment;
}

export type TokenRegisteredEvent = TypedEvent<
  [string, string, BigNumber] & {
    token: string;
    handler: string;
    assetId: BigNumber;
  }
>;

export class Registry 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: RegistryInterface;

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

    getAssetAddress(
      _assetId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string]>;

    getAssetId(
      _address: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

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

    idToWrappedAsset(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string]>;

    initialize(
      _fungibleTokenManager: string,
      _nonFungibleTokenManager: string,
      _handler: string,
      _masterFeeRecipient: string,
      _maspVAnchor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

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

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

    registerNftToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _uri: string,
      _salt: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    registerToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _name: string,
      _symbol: string,
      _salt: BytesLike,
      _limit: BigNumberish,
      _feePercentage: BigNumberish,
      _isNativeAllowed: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    wrappedAssetToId(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;
  };

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

  getAssetAddress(
    _assetId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<string>;

  getAssetId(_address: string, overrides?: CallOverrides): Promise<BigNumber>;

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

  idToWrappedAsset(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<string>;

  initialize(
    _fungibleTokenManager: string,
    _nonFungibleTokenManager: string,
    _handler: string,
    _masterFeeRecipient: string,
    _maspVAnchor: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

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

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

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

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

  registerNftToken(
    _nonce: BigNumberish,
    _tokenHandler: string,
    _assetIdentifier: BigNumberish,
    _uri: string,
    _salt: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  registerToken(
    _nonce: BigNumberish,
    _tokenHandler: string,
    _assetIdentifier: BigNumberish,
    _name: string,
    _symbol: string,
    _salt: BytesLike,
    _limit: BigNumberish,
    _feePercentage: BigNumberish,
    _isNativeAllowed: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  wrappedAssetToId(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

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

    getAssetAddress(
      _assetId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    getAssetId(_address: string, overrides?: CallOverrides): Promise<BigNumber>;

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

    idToWrappedAsset(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    initialize(
      _fungibleTokenManager: string,
      _nonFungibleTokenManager: string,
      _handler: string,
      _masterFeeRecipient: string,
      _maspVAnchor: string,
      overrides?: CallOverrides
    ): Promise<void>;

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

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

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

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

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

    registerNftToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _uri: string,
      _salt: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    registerToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _name: string,
      _symbol: string,
      _salt: BytesLike,
      _limit: BigNumberish,
      _feePercentage: BigNumberish,
      _isNativeAllowed: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

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

    wrappedAssetToId(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  filters: {
    "TokenRegistered(address,address,uint256)"(
      token?: string | null,
      handler?: string | null,
      assetId?: BigNumberish | null
    ): TypedEventFilter<
      [string, string, BigNumber],
      { token: string; handler: string; assetId: BigNumber }
    >;

    TokenRegistered(
      token?: string | null,
      handler?: string | null,
      assetId?: BigNumberish | null
    ): TypedEventFilter<
      [string, string, BigNumber],
      { token: string; handler: string; assetId: BigNumber }
    >;
  };

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

    getAssetAddress(
      _assetId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getAssetId(_address: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

    initialize(
      _fungibleTokenManager: string,
      _nonFungibleTokenManager: string,
      _handler: string,
      _masterFeeRecipient: string,
      _maspVAnchor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

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

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

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

    registerNftToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _uri: string,
      _salt: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    registerToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _name: string,
      _symbol: string,
      _salt: BytesLike,
      _limit: BigNumberish,
      _feePercentage: BigNumberish,
      _isNativeAllowed: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    wrappedAssetToId(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

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

    getAssetAddress(
      _assetId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getAssetId(
      _address: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    initialize(
      _fungibleTokenManager: string,
      _nonFungibleTokenManager: string,
      _handler: string,
      _masterFeeRecipient: string,
      _maspVAnchor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

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

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

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

    registerNftToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _uri: string,
      _salt: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    registerToken(
      _nonce: BigNumberish,
      _tokenHandler: string,
      _assetIdentifier: BigNumberish,
      _name: string,
      _symbol: string,
      _salt: BytesLike,
      _limit: BigNumberish,
      _feePercentage: BigNumberish,
      _isNativeAllowed: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    wrappedAssetToId(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
