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

import BN from "bn.js";

export type TxID = { transactionId: string };

export interface RarumEscrow {
  ADMIN_ROLE(): Promise<string>;

  DEFAULT_ADMIN_ROLE(): Promise<string>;

  OPERATOR_ROLE(): Promise<string>;

  UPGRADER_ROLE(): Promise<string>;

  allowedERC721({ arg0 }: { arg0: string }): Promise<boolean>;

  allowedPaymentTokens({ arg0 }: { arg0: string }): Promise<boolean>;

  execute: {
    ({ _index }: { _index: number | BN | string }): Promise<TxID>;
  };

  executedOrders({ arg0 }: { arg0: number | BN | string }): Promise<boolean>;

  getEscrow({
    _index,
  }: {
    _index: number | BN | string;
  }): Promise<{
    index: BN;
    order: {
      direction: BN;
      maker: string;
      taker: string;
      expiry: BN;
      nonce: BN;
      erc20Token: string;
      erc20TokenAmount: BN;
      fees: { recipient: string; amount: BN; feeData: string }[];
      erc721Token: string;
      erc721TokenId: BN;
      erc721TokenProperties: {
        propertyValidator: string;
        propertyData: string;
      }[];
    };
    totalFees: BN;
    buyer: string;
    active: boolean;
  }>;

  getRoleAdmin({ role }: { role: string }): Promise<string>;

  getRoleMember({
    role,
    index,
  }: {
    role: string;
    index: number | BN | string;
  }): Promise<string>;

  getRoleMemberCount({ role }: { role: string }): Promise<BN>;

  grantRole: {
    ({ role, account }: { role: string; account: string }): Promise<TxID>;
  };

  hasRole({
    role,
    account,
  }: {
    role: string;
    account: string;
  }): Promise<boolean>;

  initialize: {
    ({
      _zeroExExchange,
      _allowedPaymentTokens,
      _allowedERC721,
      _defaultAdmin,
    }: {
      _zeroExExchange: string;
      _allowedPaymentTokens: string[];
      _allowedERC721: string[];
      _defaultAdmin: string;
    }): Promise<TxID>;
  };

  isValidOrder({
    _order,
    _signature,
  }: {
    _order: {
      direction: number | BN | string;
      maker: string;
      taker: string;
      expiry: number | BN | string;
      nonce: number | BN | string;
      erc20Token: string;
      erc20TokenAmount: number | BN | string;
      fees: {
        recipient: string;
        amount: number | BN | string;
        feeData: string;
      }[];
      erc721Token: string;
      erc721TokenId: number | BN | string;
      erc721TokenProperties: {
        propertyValidator: string;
        propertyData: string;
      }[];
    };
    _signature: {
      signatureType: number | BN | string;
      v: number | BN | string;
      r: string;
      s: string;
    };
  }): Promise<boolean>;

  lock: {
    ({
      _sellOrder,
      _signature,
      _additionalFees,
      _additionalFeeRecipient,
    }: {
      _sellOrder: {
        direction: number | BN | string;
        maker: string;
        taker: string;
        expiry: number | BN | string;
        nonce: number | BN | string;
        erc20Token: string;
        erc20TokenAmount: number | BN | string;
        fees: {
          recipient: string;
          amount: number | BN | string;
          feeData: string;
        }[];
        erc721Token: string;
        erc721TokenId: number | BN | string;
        erc721TokenProperties: {
          propertyValidator: string;
          propertyData: string;
        }[];
      };
      _signature: {
        signatureType: number | BN | string;
        v: number | BN | string;
        r: string;
        s: string;
      };
      _additionalFees: number | BN | string;
      _additionalFeeRecipient: string;
    }): Promise<TxID>;
  };

  proxiableUUID(): Promise<string>;

  renounceRole: {
    ({ role, account }: { role: string; account: string }): Promise<TxID>;
  };

  revokeRole: {
    ({ role, account }: { role: string; account: string }): Promise<TxID>;
  };

  supportsInterface({ interfaceId }: { interfaceId: string }): Promise<boolean>;

  toggleERC721: {
    ({
      _token,
      _allowed,
    }: {
      _token: string;
      _allowed: boolean;
    }): Promise<TxID>;
  };

  togglePaymentToken: {
    ({
      _token,
      _allowed,
    }: {
      _token: string;
      _allowed: boolean;
    }): Promise<TxID>;
  };

  undo: {
    ({ _index }: { _index: number | BN | string }): Promise<TxID>;
  };

  upgradeTo: {
    ({ newImplementation }: { newImplementation: string }): Promise<TxID>;
  };

  upgradeToAndCall: {
    ({
      newImplementation,
      data,
    }: {
      newImplementation: string;
      data: string;
    }): Promise<TxID>;
  };

  zeroExExchange(): Promise<string>;
}
