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

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

interface PoolTokensInterface extends ethers.utils.Interface {
  functions: {
    "WETH()": FunctionFragment;
    "batchSwap(uint8,tuple[],address[],tuple,int256[],uint256)": FunctionFragment;
    "changeAuthorizer(address)": FunctionFragment;
    "deregisterTokens(bytes32,address[])": FunctionFragment;
    "exitPool(bytes32,address,address,tuple)": FunctionFragment;
    "flashLoan(address,address[],uint256[],bytes)": FunctionFragment;
    "getActionId(bytes4)": FunctionFragment;
    "getAuthorizer()": FunctionFragment;
    "getDomainSeparator()": FunctionFragment;
    "getInternalBalance(address,address[])": FunctionFragment;
    "getNextNonce(address)": FunctionFragment;
    "getPausedState()": FunctionFragment;
    "getPool(bytes32)": FunctionFragment;
    "getPoolTokenInfo(bytes32,address)": FunctionFragment;
    "getPoolTokens(bytes32)": FunctionFragment;
    "getProtocolFeesCollector()": FunctionFragment;
    "hasApprovedRelayer(address,address)": FunctionFragment;
    "joinPool(bytes32,address,address,tuple)": FunctionFragment;
    "managePoolBalance(tuple[])": FunctionFragment;
    "manageUserBalance(tuple[])": FunctionFragment;
    "queryBatchSwap(uint8,tuple[],address[],tuple)": FunctionFragment;
    "registerPool(uint8)": FunctionFragment;
    "registerTokens(bytes32,address[],address[])": FunctionFragment;
    "setPaused(bool)": FunctionFragment;
    "setRelayerApproval(address,address,bool)": FunctionFragment;
    "swap(tuple,tuple,uint256,uint256)": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "WETH", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "batchSwap",
    values: [
      BigNumberish,
      {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      string[],
      {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      BigNumberish[],
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "changeAuthorizer",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "deregisterTokens",
    values: [BytesLike, string[]]
  ): string;
  encodeFunctionData(
    functionFragment: "exitPool",
    values: [
      BytesLike,
      string,
      string,
      {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "flashLoan",
    values: [string, string[], BigNumberish[], BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getActionId",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getAuthorizer",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getDomainSeparator",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getInternalBalance",
    values: [string, string[]]
  ): string;
  encodeFunctionData(
    functionFragment: "getNextNonce",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getPausedState",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "getPool", values: [BytesLike]): string;
  encodeFunctionData(
    functionFragment: "getPoolTokenInfo",
    values: [BytesLike, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getPoolTokens",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getProtocolFeesCollector",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "hasApprovedRelayer",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "joinPool",
    values: [
      BytesLike,
      string,
      string,
      {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "managePoolBalance",
    values: [
      {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "manageUserBalance",
    values: [
      {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "queryBatchSwap",
    values: [
      BigNumberish,
      {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      string[],
      {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "registerPool",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "registerTokens",
    values: [BytesLike, string[], string[]]
  ): string;
  encodeFunctionData(functionFragment: "setPaused", values: [boolean]): string;
  encodeFunctionData(
    functionFragment: "setRelayerApproval",
    values: [string, string, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "swap",
    values: [
      {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      BigNumberish,
      BigNumberish
    ]
  ): string;

  decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "batchSwap", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "changeAuthorizer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "deregisterTokens",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "exitPool", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getActionId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAuthorizer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getDomainSeparator",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getInternalBalance",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getNextNonce",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getPausedState",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getPool", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getPoolTokenInfo",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getPoolTokens",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getProtocolFeesCollector",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "hasApprovedRelayer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "joinPool", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "managePoolBalance",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "manageUserBalance",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "queryBatchSwap",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerPool",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "registerTokens",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setRelayerApproval",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result;

  events: {
    "AuthorizerChanged(address,address)": EventFragment;
    "ExternalBalanceTransfer(address,address,address,uint256)": EventFragment;
    "InternalBalanceChanged(address,address,int256)": EventFragment;
    "PausedStateChanged(bool)": EventFragment;
    "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])": EventFragment;
    "PoolBalanceManaged(bytes32,address,address,int256,int256)": EventFragment;
    "PoolRegistered(bytes32)": EventFragment;
    "RelayerApprovalChanged(address,address,bool)": EventFragment;
    "Swap(bytes32,address,address,uint256,uint256)": EventFragment;
    "TokensDeregistered(bytes32,address[])": EventFragment;
    "TokensRegistered(bytes32,address[],address[])": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "AuthorizerChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ExternalBalanceTransfer"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "InternalBalanceChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PoolBalanceChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PoolBalanceManaged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PoolRegistered"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "RelayerApprovalChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TokensDeregistered"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "TokensRegistered"): EventFragment;
}

export class PoolTokens extends Contract {
  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: PoolTokensInterface;

  functions: {
    WETH(overrides?: CallOverrides): Promise<[string]>;

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

    batchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "batchSwap(uint8,tuple[],address[],(address,bool,address,bool),int256[],uint256)"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    "changeAuthorizer(address)"(
      newAuthorizer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    deregisterTokens(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "deregisterTokens(bytes32,address[])"(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    exitPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    flashLoan(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "flashLoan(address,address[],uint256[],bytes)"(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    getActionId(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string]>;

    "getActionId(bytes4)"(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string]>;

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

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

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

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

    getInternalBalance(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<[BigNumber[]]>;

    "getInternalBalance(address,address[])"(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<[BigNumber[]]>;

    getNextNonce(user: string, overrides?: CallOverrides): Promise<[BigNumber]>;

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

    getPausedState(
      overrides?: CallOverrides
    ): Promise<
      [boolean, BigNumber, BigNumber] & {
        paused: boolean;
        pauseWindowEndTime: BigNumber;
        bufferPeriodEndTime: BigNumber;
      }
    >;

    "getPausedState()"(
      overrides?: CallOverrides
    ): Promise<
      [boolean, BigNumber, BigNumber] & {
        paused: boolean;
        pauseWindowEndTime: BigNumber;
        bufferPeriodEndTime: BigNumber;
      }
    >;

    getPool(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string, number]>;

    "getPool(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string, number]>;

    getPoolTokenInfo(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        cash: BigNumber;
        managed: BigNumber;
        lastChangeBlock: BigNumber;
        assetManager: string;
      }
    >;

    "getPoolTokenInfo(bytes32,address)"(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        cash: BigNumber;
        managed: BigNumber;
        lastChangeBlock: BigNumber;
        assetManager: string;
      }
    >;

    getPoolTokens(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string[], BigNumber[], BigNumber] & {
        tokens: string[];
        balances: BigNumber[];
        lastChangeBlock: BigNumber;
      }
    >;

    "getPoolTokens(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string[], BigNumber[], BigNumber] & {
        tokens: string[];
        balances: BigNumber[];
        lastChangeBlock: BigNumber;
      }
    >;

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

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

    hasApprovedRelayer(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    "hasApprovedRelayer(address,address)"(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    joinPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    managePoolBalance(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "managePoolBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    manageUserBalance(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "manageUserBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    queryBatchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "queryBatchSwap(uint8,tuple[],address[],(address,bool,address,bool))"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    "registerPool(uint8)"(
      specialization: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    registerTokens(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "registerTokens(bytes32,address[],address[])"(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setPaused(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "setPaused(bool)"(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setRelayerApproval(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "setRelayerApproval(address,address,bool)"(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    swap(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

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

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

  batchSwap(
    kind: BigNumberish,
    swaps: {
      poolId: BytesLike;
      assetInIndex: BigNumberish;
      assetOutIndex: BigNumberish;
      amount: BigNumberish;
      userData: BytesLike;
    }[],
    assets: string[],
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    limits: BigNumberish[],
    deadline: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "batchSwap(uint8,tuple[],address[],(address,bool,address,bool),int256[],uint256)"(
    kind: BigNumberish,
    swaps: {
      poolId: BytesLike;
      assetInIndex: BigNumberish;
      assetOutIndex: BigNumberish;
      amount: BigNumberish;
      userData: BytesLike;
    }[],
    assets: string[],
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    limits: BigNumberish[],
    deadline: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  "changeAuthorizer(address)"(
    newAuthorizer: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  deregisterTokens(
    poolId: BytesLike,
    tokens: string[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "deregisterTokens(bytes32,address[])"(
    poolId: BytesLike,
    tokens: string[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  exitPool(
    poolId: BytesLike,
    sender: string,
    recipient: string,
    request: {
      assets: string[];
      minAmountsOut: BigNumberish[];
      userData: BytesLike;
      toInternalBalance: boolean;
    },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
    poolId: BytesLike,
    sender: string,
    recipient: string,
    request: {
      assets: string[];
      minAmountsOut: BigNumberish[];
      userData: BytesLike;
      toInternalBalance: boolean;
    },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  flashLoan(
    recipient: string,
    tokens: string[],
    amounts: BigNumberish[],
    userData: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "flashLoan(address,address[],uint256[],bytes)"(
    recipient: string,
    tokens: string[],
    amounts: BigNumberish[],
    userData: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  getActionId(selector: BytesLike, overrides?: CallOverrides): Promise<string>;

  "getActionId(bytes4)"(
    selector: BytesLike,
    overrides?: CallOverrides
  ): Promise<string>;

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

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

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

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

  getInternalBalance(
    user: string,
    tokens: string[],
    overrides?: CallOverrides
  ): Promise<BigNumber[]>;

  "getInternalBalance(address,address[])"(
    user: string,
    tokens: string[],
    overrides?: CallOverrides
  ): Promise<BigNumber[]>;

  getNextNonce(user: string, overrides?: CallOverrides): Promise<BigNumber>;

  "getNextNonce(address)"(
    user: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getPausedState(
    overrides?: CallOverrides
  ): Promise<
    [boolean, BigNumber, BigNumber] & {
      paused: boolean;
      pauseWindowEndTime: BigNumber;
      bufferPeriodEndTime: BigNumber;
    }
  >;

  "getPausedState()"(
    overrides?: CallOverrides
  ): Promise<
    [boolean, BigNumber, BigNumber] & {
      paused: boolean;
      pauseWindowEndTime: BigNumber;
      bufferPeriodEndTime: BigNumber;
    }
  >;

  getPool(
    poolId: BytesLike,
    overrides?: CallOverrides
  ): Promise<[string, number]>;

  "getPool(bytes32)"(
    poolId: BytesLike,
    overrides?: CallOverrides
  ): Promise<[string, number]>;

  getPoolTokenInfo(
    poolId: BytesLike,
    token: string,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber, string] & {
      cash: BigNumber;
      managed: BigNumber;
      lastChangeBlock: BigNumber;
      assetManager: string;
    }
  >;

  "getPoolTokenInfo(bytes32,address)"(
    poolId: BytesLike,
    token: string,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber, string] & {
      cash: BigNumber;
      managed: BigNumber;
      lastChangeBlock: BigNumber;
      assetManager: string;
    }
  >;

  getPoolTokens(
    poolId: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string[], BigNumber[], BigNumber] & {
      tokens: string[];
      balances: BigNumber[];
      lastChangeBlock: BigNumber;
    }
  >;

  "getPoolTokens(bytes32)"(
    poolId: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string[], BigNumber[], BigNumber] & {
      tokens: string[];
      balances: BigNumber[];
      lastChangeBlock: BigNumber;
    }
  >;

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

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

  hasApprovedRelayer(
    user: string,
    relayer: string,
    overrides?: CallOverrides
  ): Promise<boolean>;

  "hasApprovedRelayer(address,address)"(
    user: string,
    relayer: string,
    overrides?: CallOverrides
  ): Promise<boolean>;

  joinPool(
    poolId: BytesLike,
    sender: string,
    recipient: string,
    request: {
      assets: string[];
      maxAmountsIn: BigNumberish[];
      userData: BytesLike;
      fromInternalBalance: boolean;
    },
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
    poolId: BytesLike,
    sender: string,
    recipient: string,
    request: {
      assets: string[];
      maxAmountsIn: BigNumberish[];
      userData: BytesLike;
      fromInternalBalance: boolean;
    },
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  managePoolBalance(
    ops: {
      kind: BigNumberish;
      poolId: BytesLike;
      token: string;
      amount: BigNumberish;
    }[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "managePoolBalance(tuple[])"(
    ops: {
      kind: BigNumberish;
      poolId: BytesLike;
      token: string;
      amount: BigNumberish;
    }[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  manageUserBalance(
    ops: {
      kind: BigNumberish;
      asset: string;
      amount: BigNumberish;
      sender: string;
      recipient: string;
    }[],
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "manageUserBalance(tuple[])"(
    ops: {
      kind: BigNumberish;
      asset: string;
      amount: BigNumberish;
      sender: string;
      recipient: string;
    }[],
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  queryBatchSwap(
    kind: BigNumberish,
    swaps: {
      poolId: BytesLike;
      assetInIndex: BigNumberish;
      assetOutIndex: BigNumberish;
      amount: BigNumberish;
      userData: BytesLike;
    }[],
    assets: string[],
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "queryBatchSwap(uint8,tuple[],address[],(address,bool,address,bool))"(
    kind: BigNumberish,
    swaps: {
      poolId: BytesLike;
      assetInIndex: BigNumberish;
      assetOutIndex: BigNumberish;
      amount: BigNumberish;
      userData: BytesLike;
    }[],
    assets: string[],
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  "registerPool(uint8)"(
    specialization: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  registerTokens(
    poolId: BytesLike,
    tokens: string[],
    assetManagers: string[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "registerTokens(bytes32,address[],address[])"(
    poolId: BytesLike,
    tokens: string[],
    assetManagers: string[],
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setPaused(
    paused: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "setPaused(bool)"(
    paused: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setRelayerApproval(
    sender: string,
    relayer: string,
    approved: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "setRelayerApproval(address,address,bool)"(
    sender: string,
    relayer: string,
    approved: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  swap(
    singleSwap: {
      poolId: BytesLike;
      kind: BigNumberish;
      assetIn: string;
      assetOut: string;
      amount: BigNumberish;
      userData: BytesLike;
    },
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    limit: BigNumberish,
    deadline: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
    singleSwap: {
      poolId: BytesLike;
      kind: BigNumberish;
      assetIn: string;
      assetOut: string;
      amount: BigNumberish;
      userData: BytesLike;
    },
    funds: {
      sender: string;
      fromInternalBalance: boolean;
      recipient: string;
      toInternalBalance: boolean;
    },
    limit: BigNumberish,
    deadline: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    WETH(overrides?: CallOverrides): Promise<string>;

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

    batchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    "batchSwap(uint8,tuple[],address[],(address,bool,address,bool),int256[],uint256)"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    changeAuthorizer(
      newAuthorizer: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "changeAuthorizer(address)"(
      newAuthorizer: string,
      overrides?: CallOverrides
    ): Promise<void>;

    deregisterTokens(
      poolId: BytesLike,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<void>;

    "deregisterTokens(bytes32,address[])"(
      poolId: BytesLike,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<void>;

    exitPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    flashLoan(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "flashLoan(address,address[],uint256[],bytes)"(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    getActionId(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<string>;

    "getActionId(bytes4)"(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<string>;

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

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

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

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

    getInternalBalance(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    "getInternalBalance(address,address[])"(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    getNextNonce(user: string, overrides?: CallOverrides): Promise<BigNumber>;

    "getNextNonce(address)"(
      user: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getPausedState(
      overrides?: CallOverrides
    ): Promise<
      [boolean, BigNumber, BigNumber] & {
        paused: boolean;
        pauseWindowEndTime: BigNumber;
        bufferPeriodEndTime: BigNumber;
      }
    >;

    "getPausedState()"(
      overrides?: CallOverrides
    ): Promise<
      [boolean, BigNumber, BigNumber] & {
        paused: boolean;
        pauseWindowEndTime: BigNumber;
        bufferPeriodEndTime: BigNumber;
      }
    >;

    getPool(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string, number]>;

    "getPool(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string, number]>;

    getPoolTokenInfo(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        cash: BigNumber;
        managed: BigNumber;
        lastChangeBlock: BigNumber;
        assetManager: string;
      }
    >;

    "getPoolTokenInfo(bytes32,address)"(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, string] & {
        cash: BigNumber;
        managed: BigNumber;
        lastChangeBlock: BigNumber;
        assetManager: string;
      }
    >;

    getPoolTokens(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string[], BigNumber[], BigNumber] & {
        tokens: string[];
        balances: BigNumber[];
        lastChangeBlock: BigNumber;
      }
    >;

    "getPoolTokens(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string[], BigNumber[], BigNumber] & {
        tokens: string[];
        balances: BigNumber[];
        lastChangeBlock: BigNumber;
      }
    >;

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

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

    hasApprovedRelayer(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<boolean>;

    "hasApprovedRelayer(address,address)"(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<boolean>;

    joinPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<void>;

    managePoolBalance(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: CallOverrides
    ): Promise<void>;

    "managePoolBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: CallOverrides
    ): Promise<void>;

    manageUserBalance(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: CallOverrides
    ): Promise<void>;

    "manageUserBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: CallOverrides
    ): Promise<void>;

    queryBatchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    "queryBatchSwap(uint8,tuple[],address[],(address,bool,address,bool))"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber[]>;

    registerPool(
      specialization: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    "registerPool(uint8)"(
      specialization: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    registerTokens(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: CallOverrides
    ): Promise<void>;

    "registerTokens(bytes32,address[],address[])"(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: CallOverrides
    ): Promise<void>;

    setPaused(paused: boolean, overrides?: CallOverrides): Promise<void>;

    "setPaused(bool)"(
      paused: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    setRelayerApproval(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    "setRelayerApproval(address,address,bool)"(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    swap(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  filters: {
    AuthorizerChanged(
      oldAuthorizer: string | null,
      newAuthorizer: string | null
    ): TypedEventFilter<
      [string, string],
      { oldAuthorizer: string; newAuthorizer: string }
    >;

    ExternalBalanceTransfer(
      token: string | null,
      sender: string | null,
      recipient: null,
      amount: null
    ): TypedEventFilter<
      [string, string, string, BigNumber],
      { token: string; sender: string; recipient: string; amount: BigNumber }
    >;

    InternalBalanceChanged(
      user: string | null,
      token: string | null,
      delta: null
    ): TypedEventFilter<
      [string, string, BigNumber],
      { user: string; token: string; delta: BigNumber }
    >;

    PausedStateChanged(
      paused: null
    ): TypedEventFilter<[boolean], { paused: boolean }>;

    PoolBalanceChanged(
      poolId: BytesLike | null,
      liquidityProvider: string | null,
      tokens: null,
      deltas: null,
      protocolFeeAmounts: null
    ): TypedEventFilter<
      [string, string, string[], BigNumber[], BigNumber[]],
      {
        poolId: string;
        liquidityProvider: string;
        tokens: string[];
        deltas: BigNumber[];
        protocolFeeAmounts: BigNumber[];
      }
    >;

    PoolBalanceManaged(
      poolId: BytesLike | null,
      assetManager: string | null,
      token: string | null,
      cashDelta: null,
      managedDelta: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        poolId: string;
        assetManager: string;
        token: string;
        cashDelta: BigNumber;
        managedDelta: BigNumber;
      }
    >;

    PoolRegistered(
      poolId: null
    ): TypedEventFilter<[string], { poolId: string }>;

    RelayerApprovalChanged(
      relayer: string | null,
      sender: string | null,
      approved: null
    ): TypedEventFilter<
      [string, string, boolean],
      { relayer: string; sender: string; approved: boolean }
    >;

    Swap(
      poolId: BytesLike | null,
      tokenIn: string | null,
      tokenOut: string | null,
      amountIn: null,
      amountOut: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        poolId: string;
        tokenIn: string;
        tokenOut: string;
        amountIn: BigNumber;
        amountOut: BigNumber;
      }
    >;

    TokensDeregistered(
      poolId: null,
      tokens: null
    ): TypedEventFilter<
      [string, string[]],
      { poolId: string; tokens: string[] }
    >;

    TokensRegistered(
      poolId: null,
      tokens: null,
      assetManagers: null
    ): TypedEventFilter<
      [string, string[], string[]],
      { poolId: string; tokens: string[]; assetManagers: string[] }
    >;
  };

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

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

    batchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "batchSwap(uint8,tuple[],address[],(address,bool,address,bool),int256[],uint256)"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    "changeAuthorizer(address)"(
      newAuthorizer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    deregisterTokens(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "deregisterTokens(bytes32,address[])"(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    exitPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    flashLoan(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "flashLoan(address,address[],uint256[],bytes)"(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    getActionId(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getActionId(bytes4)"(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

    getInternalBalance(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getInternalBalance(address,address[])"(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getNextNonce(user: string, overrides?: CallOverrides): Promise<BigNumber>;

    "getNextNonce(address)"(
      user: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

    getPool(poolId: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;

    "getPool(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getPoolTokenInfo(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getPoolTokenInfo(bytes32,address)"(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getPoolTokens(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getPoolTokens(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

    hasApprovedRelayer(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "hasApprovedRelayer(address,address)"(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    joinPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    managePoolBalance(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "managePoolBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    manageUserBalance(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "manageUserBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    queryBatchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "queryBatchSwap(uint8,tuple[],address[],(address,bool,address,bool))"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    "registerPool(uint8)"(
      specialization: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    registerTokens(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "registerTokens(bytes32,address[],address[])"(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setPaused(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "setPaused(bool)"(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setRelayerApproval(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "setRelayerApproval(address,address,bool)"(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    swap(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

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

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

    batchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "batchSwap(uint8,tuple[],address[],(address,bool,address,bool),int256[],uint256)"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limits: BigNumberish[],
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    "changeAuthorizer(address)"(
      newAuthorizer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    deregisterTokens(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "deregisterTokens(bytes32,address[])"(
      poolId: BytesLike,
      tokens: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    exitPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        minAmountsOut: BigNumberish[];
        userData: BytesLike;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    flashLoan(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "flashLoan(address,address[],uint256[],bytes)"(
      recipient: string,
      tokens: string[],
      amounts: BigNumberish[],
      userData: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    getActionId(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getActionId(bytes4)"(
      selector: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

    getInternalBalance(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getInternalBalance(address,address[])"(
      user: string,
      tokens: string[],
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getNextNonce(
      user: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getNextNonce(address)"(
      user: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    getPool(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getPool(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getPoolTokenInfo(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getPoolTokenInfo(bytes32,address)"(
      poolId: BytesLike,
      token: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getPoolTokens(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getPoolTokens(bytes32)"(
      poolId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    hasApprovedRelayer(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "hasApprovedRelayer(address,address)"(
      user: string,
      relayer: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    joinPool(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))"(
      poolId: BytesLike,
      sender: string,
      recipient: string,
      request: {
        assets: string[];
        maxAmountsIn: BigNumberish[];
        userData: BytesLike;
        fromInternalBalance: boolean;
      },
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    managePoolBalance(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "managePoolBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        poolId: BytesLike;
        token: string;
        amount: BigNumberish;
      }[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    manageUserBalance(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "manageUserBalance(tuple[])"(
      ops: {
        kind: BigNumberish;
        asset: string;
        amount: BigNumberish;
        sender: string;
        recipient: string;
      }[],
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    queryBatchSwap(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "queryBatchSwap(uint8,tuple[],address[],(address,bool,address,bool))"(
      kind: BigNumberish,
      swaps: {
        poolId: BytesLike;
        assetInIndex: BigNumberish;
        assetOutIndex: BigNumberish;
        amount: BigNumberish;
        userData: BytesLike;
      }[],
      assets: string[],
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    "registerPool(uint8)"(
      specialization: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    registerTokens(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "registerTokens(bytes32,address[],address[])"(
      poolId: BytesLike,
      tokens: string[],
      assetManagers: string[],
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setPaused(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "setPaused(bool)"(
      paused: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setRelayerApproval(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "setRelayerApproval(address,address,bool)"(
      sender: string,
      relayer: string,
      approved: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    swap(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"(
      singleSwap: {
        poolId: BytesLike;
        kind: BigNumberish;
        assetIn: string;
        assetOut: string;
        amount: BigNumberish;
        userData: BytesLike;
      },
      funds: {
        sender: string;
        fromInternalBalance: boolean;
        recipient: string;
        toInternalBalance: boolean;
      },
      limit: BigNumberish,
      deadline: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
