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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
} from "ethers";
import {
  Contract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  CallOverrides,
} from "@ethersproject/contracts";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";

interface IBreadBoxV1Interface extends ethers.utils.Interface {
  functions: {
    "balanceOf(address,address)": FunctionFragment;
    "batch(bytes[],bool)": FunctionFragment;
    "batchFlashLoan(address,address[],address[],uint256[],bytes)": FunctionFragment;
    "claimOwnership()": FunctionFragment;
    "deploy(address,bytes,bool)": FunctionFragment;
    "deposit(address,address,address,uint256,uint256)": FunctionFragment;
    "flashLoan(address,address,address,uint256,bytes)": FunctionFragment;
    "harvest(address,bool,uint256)": FunctionFragment;
    "masterContractApproved(address,address)": FunctionFragment;
    "masterContractOf(address)": FunctionFragment;
    "nonces(address)": FunctionFragment;
    "owner()": FunctionFragment;
    "pendingOwner()": FunctionFragment;
    "pendingStrategy(address)": FunctionFragment;
    "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
    "registerProtocol()": FunctionFragment;
    "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)": FunctionFragment;
    "setStrategy(address,address)": FunctionFragment;
    "setStrategyTargetPercentage(address,uint64)": FunctionFragment;
    "strategy(address)": FunctionFragment;
    "strategyData(address)": FunctionFragment;
    "toAmount(address,uint256,bool)": FunctionFragment;
    "toShare(address,uint256,bool)": FunctionFragment;
    "totals(address)": FunctionFragment;
    "transfer(address,address,address,uint256)": FunctionFragment;
    "transferMultiple(address,address,address[],uint256[])": FunctionFragment;
    "transferOwnership(address,bool,bool)": FunctionFragment;
    "whitelistMasterContract(address,bool)": FunctionFragment;
    "whitelistedMasterContracts(address)": FunctionFragment;
    "withdraw(address,address,address,uint256,uint256)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "balanceOf",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "batch",
    values: [BytesLike[], boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "batchFlashLoan",
    values: [string, string[], string[], BigNumberish[], BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "claimOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "deploy",
    values: [string, BytesLike, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "deposit",
    values: [string, string, string, BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "flashLoan",
    values: [string, string, string, BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "harvest",
    values: [string, boolean, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "masterContractApproved",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "masterContractOf",
    values: [string]
  ): string;
  encodeFunctionData(functionFragment: "nonces", values: [string]): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "pendingOwner",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "pendingStrategy",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "permitToken",
    values: [
      string,
      string,
      string,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BytesLike,
      BytesLike
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "registerProtocol",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "setMasterContractApproval",
    values: [string, string, boolean, BigNumberish, BytesLike, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "setStrategy",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "setStrategyTargetPercentage",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "strategy", values: [string]): string;
  encodeFunctionData(
    functionFragment: "strategyData",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "toAmount",
    values: [string, BigNumberish, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "toShare",
    values: [string, BigNumberish, boolean]
  ): string;
  encodeFunctionData(functionFragment: "totals", values: [string]): string;
  encodeFunctionData(
    functionFragment: "transfer",
    values: [string, string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "transferMultiple",
    values: [string, string, string[], BigNumberish[]]
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string, boolean, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "whitelistMasterContract",
    values: [string, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "whitelistedMasterContracts",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [string, string, string, BigNumberish, BigNumberish]
  ): string;

  decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "batch", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "batchFlashLoan",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "claimOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "deploy", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "harvest", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "masterContractApproved",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "masterContractOf",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "pendingOwner",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "pendingStrategy",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "permitToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerProtocol",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setMasterContractApproval",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setStrategy",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setStrategyTargetPercentage",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "strategy", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "strategyData",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "toAmount", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "toShare", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "totals", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "transferMultiple",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "whitelistMasterContract",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "whitelistedMasterContracts",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {
    "LogDeploy(address,bytes,address)": EventFragment;
    "LogDeposit(address,address,address,uint256,uint256)": EventFragment;
    "LogFlashLoan(address,address,uint256,uint256,address)": EventFragment;
    "LogRegisterProtocol(address)": EventFragment;
    "LogSetMasterContractApproval(address,address,bool)": EventFragment;
    "LogStrategyDivest(address,uint256)": EventFragment;
    "LogStrategyInvest(address,uint256)": EventFragment;
    "LogStrategyLoss(address,uint256)": EventFragment;
    "LogStrategyProfit(address,uint256)": EventFragment;
    "LogStrategyQueued(address,address)": EventFragment;
    "LogStrategySet(address,address)": EventFragment;
    "LogStrategyTargetPercentage(address,uint256)": EventFragment;
    "LogTransfer(address,address,address,uint256)": EventFragment;
    "LogWhiteListMasterContract(address,bool)": EventFragment;
    "LogWithdraw(address,address,address,uint256,uint256)": EventFragment;
    "OwnershipTransferred(address,address)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "LogDeploy"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogDeposit"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogFlashLoan"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogRegisterProtocol"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "LogSetMasterContractApproval"
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategyDivest"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategyInvest"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategyLoss"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategyProfit"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategyQueued"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogStrategySet"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "LogStrategyTargetPercentage"
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogTransfer"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogWhiteListMasterContract"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogWithdraw"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
}

export class IBreadBoxV1 extends Contract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  on(event: EventFilter | string, listener: Listener): this;
  once(event: EventFilter | string, listener: Listener): this;
  addListener(eventName: EventFilter | string, listener: Listener): this;
  removeAllListeners(eventName: EventFilter | string): this;
  removeListener(eventName: any, listener: Listener): this;

  interface: IBreadBoxV1Interface;

  functions: {
    balanceOf(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "balanceOf(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    batch(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    "batch(bytes[],bool)"(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    batchFlashLoan(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "batchFlashLoan(address,address[],address[],uint256[],bytes)"(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    claimOwnership(overrides?: Overrides): Promise<ContractTransaction>;

    "claimOwnership()"(overrides?: Overrides): Promise<ContractTransaction>;

    deploy(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    "deploy(address,bytes,bool)"(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    deposit(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    "deposit(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<ContractTransaction>;

    flashLoan(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "flashLoan(address,address,address,uint256,bytes)"(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    harvest(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "harvest(address,bool,uint256)"(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

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

    "masterContractApproved(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

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

    "masterContractOf(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

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

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

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

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

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

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

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

    "pendingStrategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

    permitToken(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)"(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    registerProtocol(overrides?: Overrides): Promise<ContractTransaction>;

    "registerProtocol()"(overrides?: Overrides): Promise<ContractTransaction>;

    setMasterContractApproval(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)"(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    setStrategy(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "setStrategy(address,address)"(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    setStrategyTargetPercentage(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "setStrategyTargetPercentage(address,uint64)"(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

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

    "strategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

    strategyData(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber] & {
        strategyStartDate: BigNumber;
        targetPercentage: BigNumber;
        balance: BigNumber;
      }
    >;

    "strategyData(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber] & {
        strategyStartDate: BigNumber;
        targetPercentage: BigNumber;
        balance: BigNumber;
      }
    >;

    toAmount(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { amount: BigNumber }>;

    "toAmount(address,uint256,bool)"(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { amount: BigNumber }>;

    toShare(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { share: BigNumber }>;

    "toShare(address,uint256,bool)"(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { share: BigNumber }>;

    totals(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [[BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }] & {
        totals_: [BigNumber, BigNumber] & {
          elastic: BigNumber;
          base: BigNumber;
        };
      }
    >;

    "totals(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [[BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }] & {
        totals_: [BigNumber, BigNumber] & {
          elastic: BigNumber;
          base: BigNumber;
        };
      }
    >;

    transfer(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "transfer(address,address,address,uint256)"(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    transferMultiple(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "transferMultiple(address,address,address[],uint256[])"(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    transferOwnership(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "transferOwnership(address,bool,bool)"(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    whitelistMasterContract(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "whitelistMasterContract(address,bool)"(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

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

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

    withdraw(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;

    "withdraw(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<ContractTransaction>;
  };

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

  "balanceOf(address,address)"(
    arg0: string,
    arg1: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  batch(
    calls: BytesLike[],
    revertOnFail: boolean,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  "batch(bytes[],bool)"(
    calls: BytesLike[],
    revertOnFail: boolean,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  batchFlashLoan(
    borrower: string,
    receivers: string[],
    tokens: string[],
    amounts: BigNumberish[],
    data: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "batchFlashLoan(address,address[],address[],uint256[],bytes)"(
    borrower: string,
    receivers: string[],
    tokens: string[],
    amounts: BigNumberish[],
    data: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  claimOwnership(overrides?: Overrides): Promise<ContractTransaction>;

  "claimOwnership()"(overrides?: Overrides): Promise<ContractTransaction>;

  deploy(
    masterContract: string,
    data: BytesLike,
    useCreate2: boolean,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  "deploy(address,bytes,bool)"(
    masterContract: string,
    data: BytesLike,
    useCreate2: boolean,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  deposit(
    token_: string,
    from: string,
    to: string,
    amount: BigNumberish,
    share: BigNumberish,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  "deposit(address,address,address,uint256,uint256)"(
    token_: string,
    from: string,
    to: string,
    amount: BigNumberish,
    share: BigNumberish,
    overrides?: PayableOverrides
  ): Promise<ContractTransaction>;

  flashLoan(
    borrower: string,
    receiver: string,
    token: string,
    amount: BigNumberish,
    data: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "flashLoan(address,address,address,uint256,bytes)"(
    borrower: string,
    receiver: string,
    token: string,
    amount: BigNumberish,
    data: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  harvest(
    token: string,
    balance: boolean,
    maxChangeAmount: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "harvest(address,bool,uint256)"(
    token: string,
    balance: boolean,
    maxChangeAmount: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

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

  "masterContractApproved(address,address)"(
    arg0: string,
    arg1: string,
    overrides?: CallOverrides
  ): Promise<boolean>;

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

  "masterContractOf(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<string>;

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

  "nonces(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

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

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

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

  "pendingOwner()"(overrides?: CallOverrides): Promise<string>;

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

  "pendingStrategy(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<string>;

  permitToken(
    token: string,
    from: string,
    to: string,
    amount: BigNumberish,
    deadline: BigNumberish,
    v: BigNumberish,
    r: BytesLike,
    s: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)"(
    token: string,
    from: string,
    to: string,
    amount: BigNumberish,
    deadline: BigNumberish,
    v: BigNumberish,
    r: BytesLike,
    s: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  registerProtocol(overrides?: Overrides): Promise<ContractTransaction>;

  "registerProtocol()"(overrides?: Overrides): Promise<ContractTransaction>;

  setMasterContractApproval(
    user: string,
    masterContract: string,
    approved: boolean,
    v: BigNumberish,
    r: BytesLike,
    s: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)"(
    user: string,
    masterContract: string,
    approved: boolean,
    v: BigNumberish,
    r: BytesLike,
    s: BytesLike,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  setStrategy(
    token: string,
    newStrategy: string,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "setStrategy(address,address)"(
    token: string,
    newStrategy: string,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  setStrategyTargetPercentage(
    token: string,
    targetPercentage_: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "setStrategyTargetPercentage(address,uint64)"(
    token: string,
    targetPercentage_: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

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

  "strategy(address)"(arg0: string, overrides?: CallOverrides): Promise<string>;

  strategyData(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber] & {
      strategyStartDate: BigNumber;
      targetPercentage: BigNumber;
      balance: BigNumber;
    }
  >;

  "strategyData(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber] & {
      strategyStartDate: BigNumber;
      targetPercentage: BigNumber;
      balance: BigNumber;
    }
  >;

  toAmount(
    token: string,
    share: BigNumberish,
    roundUp: boolean,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "toAmount(address,uint256,bool)"(
    token: string,
    share: BigNumberish,
    roundUp: boolean,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  toShare(
    token: string,
    amount: BigNumberish,
    roundUp: boolean,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "toShare(address,uint256,bool)"(
    token: string,
    amount: BigNumberish,
    roundUp: boolean,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  totals(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<[BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }>;

  "totals(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<[BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }>;

  transfer(
    token: string,
    from: string,
    to: string,
    share: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "transfer(address,address,address,uint256)"(
    token: string,
    from: string,
    to: string,
    share: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  transferMultiple(
    token: string,
    from: string,
    tos: string[],
    shares: BigNumberish[],
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "transferMultiple(address,address,address[],uint256[])"(
    token: string,
    from: string,
    tos: string[],
    shares: BigNumberish[],
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  transferOwnership(
    newOwner: string,
    direct: boolean,
    renounce: boolean,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "transferOwnership(address,bool,bool)"(
    newOwner: string,
    direct: boolean,
    renounce: boolean,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  whitelistMasterContract(
    masterContract: string,
    approved: boolean,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "whitelistMasterContract(address,bool)"(
    masterContract: string,
    approved: boolean,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

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

  "whitelistedMasterContracts(address)"(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<boolean>;

  withdraw(
    token_: string,
    from: string,
    to: string,
    amount: BigNumberish,
    share: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  "withdraw(address,address,address,uint256,uint256)"(
    token_: string,
    from: string,
    to: string,
    amount: BigNumberish,
    share: BigNumberish,
    overrides?: Overrides
  ): Promise<ContractTransaction>;

  callStatic: {
    balanceOf(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "balanceOf(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    batch(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: CallOverrides
    ): Promise<
      [boolean[], string[]] & { successes: boolean[]; results: string[] }
    >;

    "batch(bytes[],bool)"(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: CallOverrides
    ): Promise<
      [boolean[], string[]] & { successes: boolean[]; results: string[] }
    >;

    batchFlashLoan(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "batchFlashLoan(address,address[],address[],uint256[],bytes)"(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "claimOwnership()"(overrides?: CallOverrides): Promise<void>;

    deploy(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    "deploy(address,bytes,bool)"(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    deposit(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { amountOut: BigNumber; shareOut: BigNumber }
    >;

    "deposit(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { amountOut: BigNumber; shareOut: BigNumber }
    >;

    flashLoan(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "flashLoan(address,address,address,uint256,bytes)"(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    harvest(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "harvest(address,bool,uint256)"(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "masterContractApproved(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<boolean>;

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

    "masterContractOf(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<string>;

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

    "nonces(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

    "pendingOwner()"(overrides?: CallOverrides): Promise<string>;

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

    "pendingStrategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<string>;

    permitToken(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)"(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "registerProtocol()"(overrides?: CallOverrides): Promise<void>;

    setMasterContractApproval(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)"(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    setStrategy(
      token: string,
      newStrategy: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "setStrategy(address,address)"(
      token: string,
      newStrategy: string,
      overrides?: CallOverrides
    ): Promise<void>;

    setStrategyTargetPercentage(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "setStrategyTargetPercentage(address,uint64)"(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "strategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<string>;

    strategyData(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber] & {
        strategyStartDate: BigNumber;
        targetPercentage: BigNumber;
        balance: BigNumber;
      }
    >;

    "strategyData(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber] & {
        strategyStartDate: BigNumber;
        targetPercentage: BigNumber;
        balance: BigNumber;
      }
    >;

    toAmount(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "toAmount(address,uint256,bool)"(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    toShare(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "toShare(address,uint256,bool)"(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    totals(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }
    >;

    "totals(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { elastic: BigNumber; base: BigNumber }
    >;

    transfer(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "transfer(address,address,address,uint256)"(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    transferMultiple(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<void>;

    "transferMultiple(address,address,address[],uint256[])"(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: CallOverrides
    ): Promise<void>;

    transferOwnership(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    "transferOwnership(address,bool,bool)"(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    whitelistMasterContract(
      masterContract: string,
      approved: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    "whitelistMasterContract(address,bool)"(
      masterContract: string,
      approved: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "whitelistedMasterContracts(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<boolean>;

    withdraw(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { amountOut: BigNumber; shareOut: BigNumber }
    >;

    "withdraw(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber] & { amountOut: BigNumber; shareOut: BigNumber }
    >;
  };

  filters: {
    LogDeploy(
      masterContract: string | null,
      data: null,
      cloneAddress: string | null
    ): EventFilter;

    LogDeposit(
      token: string | null,
      from: string | null,
      to: string | null,
      amount: null,
      share: null
    ): EventFilter;

    LogFlashLoan(
      borrower: string | null,
      token: string | null,
      amount: null,
      feeAmount: null,
      receiver: string | null
    ): EventFilter;

    LogRegisterProtocol(protocol: string | null): EventFilter;

    LogSetMasterContractApproval(
      masterContract: string | null,
      user: string | null,
      approved: null
    ): EventFilter;

    LogStrategyDivest(token: string | null, amount: null): EventFilter;

    LogStrategyInvest(token: string | null, amount: null): EventFilter;

    LogStrategyLoss(token: string | null, amount: null): EventFilter;

    LogStrategyProfit(token: string | null, amount: null): EventFilter;

    LogStrategyQueued(
      token: string | null,
      strategy: string | null
    ): EventFilter;

    LogStrategySet(token: string | null, strategy: string | null): EventFilter;

    LogStrategyTargetPercentage(
      token: string | null,
      targetPercentage: null
    ): EventFilter;

    LogTransfer(
      token: string | null,
      from: string | null,
      to: string | null,
      share: null
    ): EventFilter;

    LogWhiteListMasterContract(
      masterContract: string | null,
      approved: null
    ): EventFilter;

    LogWithdraw(
      token: string | null,
      from: string | null,
      to: string | null,
      amount: null,
      share: null
    ): EventFilter;

    OwnershipTransferred(
      previousOwner: string | null,
      newOwner: string | null
    ): EventFilter;
  };

  estimateGas: {
    balanceOf(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "balanceOf(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    batch(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    "batch(bytes[],bool)"(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    batchFlashLoan(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "batchFlashLoan(address,address[],address[],uint256[],bytes)"(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    claimOwnership(overrides?: Overrides): Promise<BigNumber>;

    "claimOwnership()"(overrides?: Overrides): Promise<BigNumber>;

    deploy(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    "deploy(address,bytes,bool)"(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    deposit(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    "deposit(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<BigNumber>;

    flashLoan(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "flashLoan(address,address,address,uint256,bytes)"(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    harvest(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "harvest(address,bool,uint256)"(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

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

    "masterContractApproved(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    "masterContractOf(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    "nonces(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

    "pendingOwner()"(overrides?: CallOverrides): Promise<BigNumber>;

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

    "pendingStrategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    permitToken(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)"(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    registerProtocol(overrides?: Overrides): Promise<BigNumber>;

    "registerProtocol()"(overrides?: Overrides): Promise<BigNumber>;

    setMasterContractApproval(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)"(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<BigNumber>;

    setStrategy(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "setStrategy(address,address)"(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<BigNumber>;

    setStrategyTargetPercentage(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "setStrategyTargetPercentage(address,uint64)"(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

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

    "strategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    "strategyData(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    toAmount(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "toAmount(address,uint256,bool)"(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    toShare(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "toShare(address,uint256,bool)"(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    "totals(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    transfer(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "transfer(address,address,address,uint256)"(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

    transferMultiple(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<BigNumber>;

    "transferMultiple(address,address,address[],uint256[])"(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<BigNumber>;

    transferOwnership(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "transferOwnership(address,bool,bool)"(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<BigNumber>;

    whitelistMasterContract(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "whitelistMasterContract(address,bool)"(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<BigNumber>;

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

    "whitelistedMasterContracts(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    withdraw(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;

    "withdraw(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    balanceOf(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "balanceOf(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    batch(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    "batch(bytes[],bool)"(
      calls: BytesLike[],
      revertOnFail: boolean,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    batchFlashLoan(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "batchFlashLoan(address,address[],address[],uint256[],bytes)"(
      borrower: string,
      receivers: string[],
      tokens: string[],
      amounts: BigNumberish[],
      data: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    claimOwnership(overrides?: Overrides): Promise<PopulatedTransaction>;

    "claimOwnership()"(overrides?: Overrides): Promise<PopulatedTransaction>;

    deploy(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    "deploy(address,bytes,bool)"(
      masterContract: string,
      data: BytesLike,
      useCreate2: boolean,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    deposit(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    "deposit(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: PayableOverrides
    ): Promise<PopulatedTransaction>;

    flashLoan(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "flashLoan(address,address,address,uint256,bytes)"(
      borrower: string,
      receiver: string,
      token: string,
      amount: BigNumberish,
      data: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    harvest(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "harvest(address,bool,uint256)"(
      token: string,
      balance: boolean,
      maxChangeAmount: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

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

    "masterContractApproved(address,address)"(
      arg0: string,
      arg1: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "masterContractOf(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "nonces(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

    "pendingOwner()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;

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

    "pendingStrategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    permitToken(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "permitToken(address,address,address,uint256,uint256,uint8,bytes32,bytes32)"(
      token: string,
      from: string,
      to: string,
      amount: BigNumberish,
      deadline: BigNumberish,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    registerProtocol(overrides?: Overrides): Promise<PopulatedTransaction>;

    "registerProtocol()"(overrides?: Overrides): Promise<PopulatedTransaction>;

    setMasterContractApproval(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "setMasterContractApproval(address,address,bool,uint8,bytes32,bytes32)"(
      user: string,
      masterContract: string,
      approved: boolean,
      v: BigNumberish,
      r: BytesLike,
      s: BytesLike,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    setStrategy(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "setStrategy(address,address)"(
      token: string,
      newStrategy: string,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    setStrategyTargetPercentage(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "setStrategyTargetPercentage(address,uint64)"(
      token: string,
      targetPercentage_: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

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

    "strategy(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "strategyData(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    toAmount(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "toAmount(address,uint256,bool)"(
      token: string,
      share: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    toShare(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "toShare(address,uint256,bool)"(
      token: string,
      amount: BigNumberish,
      roundUp: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "totals(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    transfer(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "transfer(address,address,address,uint256)"(
      token: string,
      from: string,
      to: string,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    transferMultiple(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "transferMultiple(address,address,address[],uint256[])"(
      token: string,
      from: string,
      tos: string[],
      shares: BigNumberish[],
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    transferOwnership(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "transferOwnership(address,bool,bool)"(
      newOwner: string,
      direct: boolean,
      renounce: boolean,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    whitelistMasterContract(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "whitelistMasterContract(address,bool)"(
      masterContract: string,
      approved: boolean,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

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

    "whitelistedMasterContracts(address)"(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    withdraw(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;

    "withdraw(address,address,address,uint256,uint256)"(
      token_: string,
      from: string,
      to: string,
      amount: BigNumberish,
      share: BigNumberish,
      overrides?: Overrides
    ): Promise<PopulatedTransaction>;
  };
}
