/* 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 ReferralStorageInterface extends ethers.utils.Interface {
  functions: {
    "BASIS_POINTS()": FunctionFragment;
    "codeOwners(bytes32)": FunctionFragment;
    "getTraderReferralInfo(address)": FunctionFragment;
    "govSetCodeOwner(bytes32,address)": FunctionFragment;
    "isHandler(address)": FunctionFragment;
    "owner()": FunctionFragment;
    "referrerDiscountShares(address)": FunctionFragment;
    "referrerTiers(address)": FunctionFragment;
    "registerCode(bytes32)": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "setCodeOwner(bytes32,address)": FunctionFragment;
    "setHandler(address,bool)": FunctionFragment;
    "setReferrerDiscountShare(uint256)": FunctionFragment;
    "setReferrerTier(address,uint256)": FunctionFragment;
    "setTier(uint256,uint256,uint256)": FunctionFragment;
    "setTraderReferralCode(address,bytes32)": FunctionFragment;
    "setTraderReferralCodeByUser(bytes32)": FunctionFragment;
    "tiers(uint256)": FunctionFragment;
    "traderReferralCodes(address)": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "BASIS_POINTS",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "codeOwners",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getTraderReferralInfo",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "govSetCodeOwner",
    values: [BytesLike, string]
  ): string;
  encodeFunctionData(functionFragment: "isHandler", values: [string]): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "referrerDiscountShares",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "referrerTiers",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "registerCode",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "setCodeOwner",
    values: [BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "setHandler",
    values: [string, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "setReferrerDiscountShare",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setReferrerTier",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setTier",
    values: [BigNumberish, BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setTraderReferralCode",
    values: [string, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "setTraderReferralCodeByUser",
    values: [BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "tiers", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "traderReferralCodes",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;

  decodeFunctionResult(
    functionFragment: "BASIS_POINTS",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "codeOwners", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getTraderReferralInfo",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "govSetCodeOwner",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "isHandler", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "referrerDiscountShares",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "referrerTiers",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerCode",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setCodeOwner",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setHandler", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setReferrerDiscountShare",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setReferrerTier",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setTier", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setTraderReferralCode",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setTraderReferralCodeByUser",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "tiers", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "traderReferralCodes",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;

  events: {
    "GovSetCodeOwner(bytes32,address)": EventFragment;
    "OwnershipTransferred(address,address)": EventFragment;
    "RegisterCode(address,bytes32)": EventFragment;
    "SetCodeOwner(address,address,bytes32)": EventFragment;
    "SetHandler(address,bool)": EventFragment;
    "SetReferrerDiscountShare(address,uint256)": EventFragment;
    "SetReferrerTier(address,uint256)": EventFragment;
    "SetTier(uint256,uint256,uint256)": EventFragment;
    "SetTraderReferralCode(address,bytes32)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "GovSetCodeOwner"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "RegisterCode"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetCodeOwner"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetHandler"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetReferrerDiscountShare"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetReferrerTier"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetTier"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetTraderReferralCode"): EventFragment;
}

export type GovSetCodeOwnerEvent = TypedEvent<
  [string, string] & { code: string; newAccount: string }
>;

export type OwnershipTransferredEvent = TypedEvent<
  [string, string] & { previousOwner: string; newOwner: string }
>;

export type RegisterCodeEvent = TypedEvent<
  [string, string] & { account: string; code: string }
>;

export type SetCodeOwnerEvent = TypedEvent<
  [string, string, string] & {
    account: string;
    newAccount: string;
    code: string;
  }
>;

export type SetHandlerEvent = TypedEvent<
  [string, boolean] & { handler: string; isActive: boolean }
>;

export type SetReferrerDiscountShareEvent = TypedEvent<
  [string, BigNumber] & { referrer: string; discountShare: BigNumber }
>;

export type SetReferrerTierEvent = TypedEvent<
  [string, BigNumber] & { referrer: string; tierId: BigNumber }
>;

export type SetTierEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber] & {
    tierId: BigNumber;
    totalRebate: BigNumber;
    discountShare: BigNumber;
  }
>;

export type SetTraderReferralCodeEvent = TypedEvent<
  [string, string] & { account: string; code: string }
>;

export class ReferralStorage 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: ReferralStorageInterface;

  functions: {
    BASIS_POINTS(overrides?: CallOverrides): Promise<[BigNumber]>;

    codeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise<[string]>;

    getTraderReferralInfo(
      _account: string,
      overrides?: CallOverrides
    ): Promise<[string, string]>;

    govSetCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    isHandler(arg0: string, overrides?: CallOverrides): Promise<[boolean]>;

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

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

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

    registerCode(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    setReferrerDiscountShare(
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setReferrerTier(
      _referrer: string,
      _tierId: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setTier(
      _tierId: BigNumberish,
      _totalRebate: BigNumberish,
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    setTraderReferralCodeByUser(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    tiers(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & {
        totalRebate: BigNumber;
        discountShare: BigNumber;
      }
    >;

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

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

  codeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise<string>;

  getTraderReferralInfo(
    _account: string,
    overrides?: CallOverrides
  ): Promise<[string, string]>;

  govSetCodeOwner(
    _code: BytesLike,
    _newAccount: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  isHandler(arg0: string, overrides?: CallOverrides): Promise<boolean>;

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

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

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

  registerCode(
    _code: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  renounceOwnership(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setCodeOwner(
    _code: BytesLike,
    _newAccount: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  setReferrerDiscountShare(
    _discountShare: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setReferrerTier(
    _referrer: string,
    _tierId: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setTier(
    _tierId: BigNumberish,
    _totalRebate: BigNumberish,
    _discountShare: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  setTraderReferralCodeByUser(
    _code: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  tiers(
    arg0: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber] & {
      totalRebate: BigNumber;
      discountShare: BigNumber;
    }
  >;

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

  transferOwnership(
    newOwner: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    BASIS_POINTS(overrides?: CallOverrides): Promise<BigNumber>;

    codeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise<string>;

    getTraderReferralInfo(
      _account: string,
      overrides?: CallOverrides
    ): Promise<[string, string]>;

    govSetCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: CallOverrides
    ): Promise<void>;

    isHandler(arg0: string, overrides?: CallOverrides): Promise<boolean>;

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

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

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

    registerCode(_code: BytesLike, overrides?: CallOverrides): Promise<void>;

    renounceOwnership(overrides?: CallOverrides): Promise<void>;

    setCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: CallOverrides
    ): Promise<void>;

    setHandler(
      _handler: string,
      _isActive: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    setReferrerDiscountShare(
      _discountShare: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setReferrerTier(
      _referrer: string,
      _tierId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setTier(
      _tierId: BigNumberish,
      _totalRebate: BigNumberish,
      _discountShare: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setTraderReferralCode(
      _account: string,
      _code: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    setTraderReferralCodeByUser(
      _code: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    tiers(
      arg0: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & {
        totalRebate: BigNumber;
        discountShare: BigNumber;
      }
    >;

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

    transferOwnership(
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    "GovSetCodeOwner(bytes32,address)"(
      code?: null,
      newAccount?: null
    ): TypedEventFilter<[string, string], { code: string; newAccount: string }>;

    GovSetCodeOwner(
      code?: null,
      newAccount?: null
    ): TypedEventFilter<[string, string], { code: string; newAccount: string }>;

    "OwnershipTransferred(address,address)"(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    OwnershipTransferred(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    "RegisterCode(address,bytes32)"(
      account?: null,
      code?: null
    ): TypedEventFilter<[string, string], { account: string; code: string }>;

    RegisterCode(
      account?: null,
      code?: null
    ): TypedEventFilter<[string, string], { account: string; code: string }>;

    "SetCodeOwner(address,address,bytes32)"(
      account?: null,
      newAccount?: null,
      code?: null
    ): TypedEventFilter<
      [string, string, string],
      { account: string; newAccount: string; code: string }
    >;

    SetCodeOwner(
      account?: null,
      newAccount?: null,
      code?: null
    ): TypedEventFilter<
      [string, string, string],
      { account: string; newAccount: string; code: string }
    >;

    "SetHandler(address,bool)"(
      handler?: null,
      isActive?: null
    ): TypedEventFilter<
      [string, boolean],
      { handler: string; isActive: boolean }
    >;

    SetHandler(
      handler?: null,
      isActive?: null
    ): TypedEventFilter<
      [string, boolean],
      { handler: string; isActive: boolean }
    >;

    "SetReferrerDiscountShare(address,uint256)"(
      referrer?: null,
      discountShare?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { referrer: string; discountShare: BigNumber }
    >;

    SetReferrerDiscountShare(
      referrer?: null,
      discountShare?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { referrer: string; discountShare: BigNumber }
    >;

    "SetReferrerTier(address,uint256)"(
      referrer?: null,
      tierId?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { referrer: string; tierId: BigNumber }
    >;

    SetReferrerTier(
      referrer?: null,
      tierId?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { referrer: string; tierId: BigNumber }
    >;

    "SetTier(uint256,uint256,uint256)"(
      tierId?: null,
      totalRebate?: null,
      discountShare?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { tierId: BigNumber; totalRebate: BigNumber; discountShare: BigNumber }
    >;

    SetTier(
      tierId?: null,
      totalRebate?: null,
      discountShare?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { tierId: BigNumber; totalRebate: BigNumber; discountShare: BigNumber }
    >;

    "SetTraderReferralCode(address,bytes32)"(
      account?: null,
      code?: null
    ): TypedEventFilter<[string, string], { account: string; code: string }>;

    SetTraderReferralCode(
      account?: null,
      code?: null
    ): TypedEventFilter<[string, string], { account: string; code: string }>;
  };

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

    codeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;

    getTraderReferralInfo(
      _account: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    govSetCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

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

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

    registerCode(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    setReferrerDiscountShare(
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setReferrerTier(
      _referrer: string,
      _tierId: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setTier(
      _tierId: BigNumberish,
      _totalRebate: BigNumberish,
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    setTraderReferralCodeByUser(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

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

    codeOwners(
      arg0: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTraderReferralInfo(
      _account: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    govSetCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

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

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

    registerCode(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setCodeOwner(
      _code: BytesLike,
      _newAccount: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    setReferrerDiscountShare(
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setReferrerTier(
      _referrer: string,
      _tierId: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setTier(
      _tierId: BigNumberish,
      _totalRebate: BigNumberish,
      _discountShare: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    setTraderReferralCodeByUser(
      _code: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
