/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
  BaseContract,
  BigNumber,
  BigNumberish,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  PopulatedTransaction,
  Signer,
  utils,
} from "ethers";
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
import { Listener, Provider } from "@ethersproject/providers";
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";

export declare namespace ITokenERC721 {
  export type MintRequestStruct = {
    to: string;
    uri: string;
    price: BigNumberish;
    currency: string;
    validityStartTimestamp: BigNumberish;
    validityEndTimestamp: BigNumberish;
    uid: BytesLike;
  };

  export type MintRequestStructOutput = [
    string,
    string,
    BigNumber,
    string,
    BigNumber,
    BigNumber,
    string
  ] & {
    to: string;
    uri: string;
    price: BigNumber;
    currency: string;
    validityStartTimestamp: BigNumber;
    validityEndTimestamp: BigNumber;
    uid: string;
  };
}

export interface ITokenERC721Interface extends utils.Interface {
  contractName: "ITokenERC721";
  functions: {
    "mintTo(address,string)": FunctionFragment;
    "mintWithSignature((address,string,uint256,address,uint128,uint128,bytes32),bytes)": FunctionFragment;
    "verify((address,string,uint256,address,uint128,uint128,bytes32),bytes)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "mintTo",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "mintWithSignature",
    values: [ITokenERC721.MintRequestStruct, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "verify",
    values: [ITokenERC721.MintRequestStruct, BytesLike]
  ): string;

  decodeFunctionResult(functionFragment: "mintTo", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "mintWithSignature",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "verify", data: BytesLike): Result;

  events: {
    "EtherReceived(address,uint256)": EventFragment;
    "FundsWithdrawn(address,address,uint256,uint256)": EventFragment;
    "MintWithSignature(address,address,uint256,tuple)": EventFragment;
    "NewOwner(address,address)": EventFragment;
    "NewPrimarySaleRecipient(address)": EventFragment;
    "PlatformFeeUpdates(address,uint256)": EventFragment;
    "RoyaltyUpdated(address,uint256)": EventFragment;
    "TokenMinted(address,uint256,string)": EventFragment;
    "TransfersRestricted(bool)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "EtherReceived"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "FundsWithdrawn"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "MintWithSignature"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewOwner"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewPrimarySaleRecipient"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PlatformFeeUpdates"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "RoyaltyUpdated"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TokenMinted"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TransfersRestricted"): EventFragment;
}

export type EtherReceivedEvent = TypedEvent<
  [string, BigNumber],
  { sender: string; amount: BigNumber }
>;

export type EtherReceivedEventFilter = TypedEventFilter<EtherReceivedEvent>;

export type FundsWithdrawnEvent = TypedEvent<
  [string, string, BigNumber, BigNumber],
  {
    paymentReceiver: string;
    feeRecipient: string;
    totalAmount: BigNumber;
    feeCollected: BigNumber;
  }
>;

export type FundsWithdrawnEventFilter = TypedEventFilter<FundsWithdrawnEvent>;

export type MintWithSignatureEvent = TypedEvent<
  [string, string, BigNumber, ITokenERC721.MintRequestStructOutput],
  {
    signer: string;
    mintedTo: string;
    tokenIdMinted: BigNumber;
    mintRequest: ITokenERC721.MintRequestStructOutput;
  }
>;

export type MintWithSignatureEventFilter =
  TypedEventFilter<MintWithSignatureEvent>;

export type NewOwnerEvent = TypedEvent<
  [string, string],
  { prevOwner: string; newOwner: string }
>;

export type NewOwnerEventFilter = TypedEventFilter<NewOwnerEvent>;

export type NewPrimarySaleRecipientEvent = TypedEvent<
  [string],
  { recipient: string }
>;

export type NewPrimarySaleRecipientEventFilter =
  TypedEventFilter<NewPrimarySaleRecipientEvent>;

export type PlatformFeeUpdatesEvent = TypedEvent<
  [string, BigNumber],
  { platformFeeRecipient: string; platformFeeBps: BigNumber }
>;

export type PlatformFeeUpdatesEventFilter =
  TypedEventFilter<PlatformFeeUpdatesEvent>;

export type RoyaltyUpdatedEvent = TypedEvent<
  [string, BigNumber],
  { newRoyaltyRecipient: string; newRoyaltyBps: BigNumber }
>;

export type RoyaltyUpdatedEventFilter = TypedEventFilter<RoyaltyUpdatedEvent>;

export type TokenMintedEvent = TypedEvent<
  [string, BigNumber, string],
  { mintedTo: string; tokenIdMinted: BigNumber; uri: string }
>;

export type TokenMintedEventFilter = TypedEventFilter<TokenMintedEvent>;

export type TransfersRestrictedEvent = TypedEvent<
  [boolean],
  { restricted: boolean }
>;

export type TransfersRestrictedEventFilter =
  TypedEventFilter<TransfersRestrictedEvent>;

export interface ITokenERC721 extends BaseContract {
  contractName: "ITokenERC721";
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  interface: ITokenERC721Interface;

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

  listeners<TEvent extends TypedEvent>(
    eventFilter?: TypedEventFilter<TEvent>
  ): Array<TypedListener<TEvent>>;
  listeners(eventName?: string): Array<Listener>;
  removeAllListeners<TEvent extends TypedEvent>(
    eventFilter: TypedEventFilter<TEvent>
  ): this;
  removeAllListeners(eventName?: string): this;
  off: OnEvent<this>;
  on: OnEvent<this>;
  once: OnEvent<this>;
  removeListener: OnEvent<this>;

  functions: {
    mintTo(
      to: string,
      uri: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    mintWithSignature(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    verify(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { success: boolean; signer: string }>;
  };

  mintTo(
    to: string,
    uri: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  mintWithSignature(
    req: ITokenERC721.MintRequestStruct,
    signature: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  verify(
    req: ITokenERC721.MintRequestStruct,
    signature: BytesLike,
    overrides?: CallOverrides
  ): Promise<[boolean, string] & { success: boolean; signer: string }>;

  callStatic: {
    mintTo(
      to: string,
      uri: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    mintWithSignature(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    verify(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { success: boolean; signer: string }>;
  };

  filters: {
    "EtherReceived(address,uint256)"(
      sender?: null,
      amount?: null
    ): EtherReceivedEventFilter;
    EtherReceived(sender?: null, amount?: null): EtherReceivedEventFilter;

    "FundsWithdrawn(address,address,uint256,uint256)"(
      paymentReceiver?: string | null,
      feeRecipient?: null,
      totalAmount?: null,
      feeCollected?: null
    ): FundsWithdrawnEventFilter;
    FundsWithdrawn(
      paymentReceiver?: string | null,
      feeRecipient?: null,
      totalAmount?: null,
      feeCollected?: null
    ): FundsWithdrawnEventFilter;

    "MintWithSignature(address,address,uint256,tuple)"(
      signer?: string | null,
      mintedTo?: string | null,
      tokenIdMinted?: BigNumberish | null,
      mintRequest?: null
    ): MintWithSignatureEventFilter;
    MintWithSignature(
      signer?: string | null,
      mintedTo?: string | null,
      tokenIdMinted?: BigNumberish | null,
      mintRequest?: null
    ): MintWithSignatureEventFilter;

    "NewOwner(address,address)"(
      prevOwner?: null,
      newOwner?: null
    ): NewOwnerEventFilter;
    NewOwner(prevOwner?: null, newOwner?: null): NewOwnerEventFilter;

    "NewPrimarySaleRecipient(address)"(
      recipient?: string | null
    ): NewPrimarySaleRecipientEventFilter;
    NewPrimarySaleRecipient(
      recipient?: string | null
    ): NewPrimarySaleRecipientEventFilter;

    "PlatformFeeUpdates(address,uint256)"(
      platformFeeRecipient?: null,
      platformFeeBps?: null
    ): PlatformFeeUpdatesEventFilter;
    PlatformFeeUpdates(
      platformFeeRecipient?: null,
      platformFeeBps?: null
    ): PlatformFeeUpdatesEventFilter;

    "RoyaltyUpdated(address,uint256)"(
      newRoyaltyRecipient?: null,
      newRoyaltyBps?: null
    ): RoyaltyUpdatedEventFilter;
    RoyaltyUpdated(
      newRoyaltyRecipient?: null,
      newRoyaltyBps?: null
    ): RoyaltyUpdatedEventFilter;

    "TokenMinted(address,uint256,string)"(
      mintedTo?: string | null,
      tokenIdMinted?: BigNumberish | null,
      uri?: null
    ): TokenMintedEventFilter;
    TokenMinted(
      mintedTo?: string | null,
      tokenIdMinted?: BigNumberish | null,
      uri?: null
    ): TokenMintedEventFilter;

    "TransfersRestricted(bool)"(
      restricted?: null
    ): TransfersRestrictedEventFilter;
    TransfersRestricted(restricted?: null): TransfersRestrictedEventFilter;
  };

  estimateGas: {
    mintTo(
      to: string,
      uri: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    mintWithSignature(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    verify(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    mintTo(
      to: string,
      uri: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    mintWithSignature(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    verify(
      req: ITokenERC721.MintRequestStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
