/* 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 IRegistryInterface extends ethers.utils.Interface {
  functions: {
    "getAssetIdFromUnwrappedAddress(address)": FunctionFragment;
    "getAssetIdFromWrappedAddress(address)": FunctionFragment;
    "getUnwrappedAssetAddress(uint256)": FunctionFragment;
    "getWrappedAssetAddress(uint256)": FunctionFragment;
    "registerNftToken(uint32,address,uint256,address,string,bytes32)": FunctionFragment;
    "registerToken(uint32,address,uint256,string,string,bytes32,uint256,uint16,bool)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "getAssetIdFromUnwrappedAddress",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getAssetIdFromWrappedAddress",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getUnwrappedAssetAddress",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getWrappedAssetAddress",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "registerNftToken",
    values: [BigNumberish, string, BigNumberish, string, string, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "registerToken",
    values: [
      BigNumberish,
      string,
      BigNumberish,
      string,
      string,
      BytesLike,
      BigNumberish,
      BigNumberish,
      boolean
    ]
  ): string;

  decodeFunctionResult(
    functionFragment: "getAssetIdFromUnwrappedAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAssetIdFromWrappedAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getUnwrappedAssetAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getWrappedAssetAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerNftToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerToken",
    data: BytesLike
  ): Result;

  events: {};
}

export class IRegistry 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: IRegistryInterface;

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

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

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

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

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

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

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

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

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

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

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

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

  callStatic: {
    getAssetIdFromUnwrappedAddress(
      _address: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

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

  filters: {};

  estimateGas: {
    getAssetIdFromUnwrappedAddress(
      _address: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

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

  populateTransaction: {
    getAssetIdFromUnwrappedAddress(
      _address: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

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