import { utils, BigNumberish, BytesLike, BigNumber, BaseContract, Signer, CallOverrides, Overrides, ContractTransaction, PopulatedTransaction } from 'ethers';
import { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
import { Provider, Listener } from '@ethersproject/providers';
import { TypedEvent, TypedEventFilter, TypedListener, OnEvent } from './common.js';

interface TWFeeInterface extends utils.Interface {
    contractName: string | "TWFee";
    functions: {
        "DEFAULT_ADMIN_ROLE()": FunctionFragment;
        "MAX_FEE_BPS()": FunctionFragment;
        "factory()": FunctionFragment;
        "feeInfo(uint256,uint256)": FunctionFragment;
        "getFeeInfo(address,uint256)": FunctionFragment;
        "getFeeTier(address,address)": FunctionFragment;
        "getRoleAdmin(bytes32)": FunctionFragment;
        "getRoleMember(bytes32,uint256)": FunctionFragment;
        "getRoleMemberCount(bytes32)": FunctionFragment;
        "grantRole(bytes32,address)": FunctionFragment;
        "hasRole(bytes32,address)": FunctionFragment;
        "isTrustedForwarder(address)": FunctionFragment;
        "multicall(bytes[])": FunctionFragment;
        "renounceRole(bytes32,address)": FunctionFragment;
        "revokeRole(bytes32,address)": FunctionFragment;
        "setFeeInfoForTier(uint256,uint256,address,uint256)": FunctionFragment;
        "setFeeTierPlacementExtension(address)": FunctionFragment;
        "setTier(address,uint128,uint128)": FunctionFragment;
        "supportsInterface(bytes4)": FunctionFragment;
        "tierPlacementExtension()": FunctionFragment;
    };
    encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
    encodeFunctionData(functionFragment: "MAX_FEE_BPS", values?: undefined): string;
    encodeFunctionData(functionFragment: "factory", values?: undefined): string;
    encodeFunctionData(functionFragment: "feeInfo", values: [BigNumberish, BigNumberish]): string;
    encodeFunctionData(functionFragment: "getFeeInfo", values: [string, BigNumberish]): string;
    encodeFunctionData(functionFragment: "getFeeTier", values: [string, string]): string;
    encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
    encodeFunctionData(functionFragment: "getRoleMember", values: [BytesLike, BigNumberish]): string;
    encodeFunctionData(functionFragment: "getRoleMemberCount", values: [BytesLike]): string;
    encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, string]): string;
    encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, string]): string;
    encodeFunctionData(functionFragment: "isTrustedForwarder", values: [string]): string;
    encodeFunctionData(functionFragment: "multicall", values: [BytesLike[]]): string;
    encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, string]): string;
    encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, string]): string;
    encodeFunctionData(functionFragment: "setFeeInfoForTier", values: [BigNumberish, BigNumberish, string, BigNumberish]): string;
    encodeFunctionData(functionFragment: "setFeeTierPlacementExtension", values: [string]): string;
    encodeFunctionData(functionFragment: "setTier", values: [string, BigNumberish, BigNumberish]): string;
    encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
    encodeFunctionData(functionFragment: "tierPlacementExtension", values?: undefined): string;
    decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "MAX_FEE_BPS", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "feeInfo", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getFeeInfo", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getFeeTier", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getRoleMember", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getRoleMemberCount", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "isTrustedForwarder", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setFeeInfoForTier", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setFeeTierPlacementExtension", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setTier", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "tierPlacementExtension", data: BytesLike): Result;
    events: {
        "FeeTierUpdated(uint256,uint256,address,uint256)": EventFragment;
        "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment;
        "RoleGranted(bytes32,address,address)": EventFragment;
        "RoleRevoked(bytes32,address,address)": EventFragment;
        "TierUpdated(address,uint256,uint256)": EventFragment;
    };
    getEvent(nameOrSignatureOrTopic: "FeeTierUpdated"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "TierUpdated"): EventFragment;
}
declare type FeeTierUpdatedEvent = TypedEvent<[
    BigNumber,
    BigNumber,
    string,
    BigNumber
], {
    tierId: BigNumber;
    feeType: BigNumber;
    recipient: string;
    bps: BigNumber;
}>;
declare type FeeTierUpdatedEventFilter = TypedEventFilter<FeeTierUpdatedEvent>;
declare type RoleAdminChangedEvent = TypedEvent<[
    string,
    string,
    string
], {
    role: string;
    previousAdminRole: string;
    newAdminRole: string;
}>;
declare type RoleAdminChangedEventFilter = TypedEventFilter<RoleAdminChangedEvent>;
declare type RoleGrantedEvent = TypedEvent<[
    string,
    string,
    string
], {
    role: string;
    account: string;
    sender: string;
}>;
declare type RoleGrantedEventFilter = TypedEventFilter<RoleGrantedEvent>;
declare type RoleRevokedEvent = TypedEvent<[
    string,
    string,
    string
], {
    role: string;
    account: string;
    sender: string;
}>;
declare type RoleRevokedEventFilter = TypedEventFilter<RoleRevokedEvent>;
declare type TierUpdatedEvent = TypedEvent<[
    string,
    BigNumber,
    BigNumber
], {
    proxyOrDeployer: string;
    tierId: BigNumber;
    validUntilTimestamp: BigNumber;
}>;
declare type TierUpdatedEventFilter = TypedEventFilter<TierUpdatedEvent>;
interface TWFee extends BaseContract {
    contractName: string | "TWFee";
    connect(signerOrProvider: Signer | Provider | string): this;
    attach(addressOrName: string): this;
    deployed(): Promise<this>;
    interface: TWFeeInterface;
    queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
    listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
    listeners(eventName?: string): Array<Listener>;
    removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
    removeAllListeners(eventName?: string): this;
    off: OnEvent<this>;
    on: OnEvent<this>;
    once: OnEvent<this>;
    removeListener: OnEvent<this>;
    functions: {
        DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>;
        MAX_FEE_BPS(overrides?: CallOverrides): Promise<[BigNumber]>;
        factory(overrides?: CallOverrides): Promise<[string]>;
        feeInfo(arg0: BigNumberish, arg1: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber, string] & {
            bps: BigNumber;
            recipient: string;
        }>;
        getFeeInfo(_proxy: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber] & {
            recipient: string;
            bps: BigNumber;
        }>;
        getFeeTier(_deployer: string, _proxy: string, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber
        ] & {
            tierId: BigNumber;
            validUntilTimestamp: BigNumber;
        }>;
        getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>;
        getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
        getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<[BigNumber]>;
        grantRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<[boolean]>;
        isTrustedForwarder(forwarder: string, overrides?: CallOverrides): Promise<[boolean]>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        renounceRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        revokeRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setFeeInfoForTier(_tierId: BigNumberish, _feeBps: BigNumberish, _feeRecipient: string, _feeType: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setFeeTierPlacementExtension(_extension: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setTier(_proxyOrDeployer: string, _tierId: BigNumberish, _validUntilTimestamp: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
        tierPlacementExtension(overrides?: CallOverrides): Promise<[string]>;
    };
    DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<string>;
    MAX_FEE_BPS(overrides?: CallOverrides): Promise<BigNumber>;
    factory(overrides?: CallOverrides): Promise<string>;
    feeInfo(arg0: BigNumberish, arg1: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber, string] & {
        bps: BigNumber;
        recipient: string;
    }>;
    getFeeInfo(_proxy: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber] & {
        recipient: string;
        bps: BigNumber;
    }>;
    getFeeTier(_deployer: string, _proxy: string, overrides?: CallOverrides): Promise<[
        BigNumber,
        BigNumber
    ] & {
        tierId: BigNumber;
        validUntilTimestamp: BigNumber;
    }>;
    getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<string>;
    getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<string>;
    getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
    grantRole(role: BytesLike, account: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<boolean>;
    isTrustedForwarder(forwarder: string, overrides?: CallOverrides): Promise<boolean>;
    multicall(data: BytesLike[], overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    renounceRole(role: BytesLike, account: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    revokeRole(role: BytesLike, account: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setFeeInfoForTier(_tierId: BigNumberish, _feeBps: BigNumberish, _feeRecipient: string, _feeType: BigNumberish, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setFeeTierPlacementExtension(_extension: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setTier(_proxyOrDeployer: string, _tierId: BigNumberish, _validUntilTimestamp: BigNumberish, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<boolean>;
    tierPlacementExtension(overrides?: CallOverrides): Promise<string>;
    callStatic: {
        DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<string>;
        MAX_FEE_BPS(overrides?: CallOverrides): Promise<BigNumber>;
        factory(overrides?: CallOverrides): Promise<string>;
        feeInfo(arg0: BigNumberish, arg1: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber, string] & {
            bps: BigNumber;
            recipient: string;
        }>;
        getFeeInfo(_proxy: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<[string, BigNumber] & {
            recipient: string;
            bps: BigNumber;
        }>;
        getFeeTier(_deployer: string, _proxy: string, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber
        ] & {
            tierId: BigNumber;
            validUntilTimestamp: BigNumber;
        }>;
        getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<string>;
        getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<string>;
        getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        grantRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<void>;
        hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<boolean>;
        isTrustedForwarder(forwarder: string, overrides?: CallOverrides): Promise<boolean>;
        multicall(data: BytesLike[], overrides?: CallOverrides): Promise<string[]>;
        renounceRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<void>;
        revokeRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<void>;
        setFeeInfoForTier(_tierId: BigNumberish, _feeBps: BigNumberish, _feeRecipient: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<void>;
        setFeeTierPlacementExtension(_extension: string, overrides?: CallOverrides): Promise<void>;
        setTier(_proxyOrDeployer: string, _tierId: BigNumberish, _validUntilTimestamp: BigNumberish, overrides?: CallOverrides): Promise<void>;
        supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<boolean>;
        tierPlacementExtension(overrides?: CallOverrides): Promise<string>;
    };
    filters: {
        "FeeTierUpdated(uint256,uint256,address,uint256)"(tierId?: BigNumberish | null, feeType?: BigNumberish | null, recipient?: null, bps?: null): FeeTierUpdatedEventFilter;
        FeeTierUpdated(tierId?: BigNumberish | null, feeType?: BigNumberish | null, recipient?: null, bps?: null): FeeTierUpdatedEventFilter;
        "RoleAdminChanged(bytes32,bytes32,bytes32)"(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter;
        RoleAdminChanged(role?: BytesLike | null, previousAdminRole?: BytesLike | null, newAdminRole?: BytesLike | null): RoleAdminChangedEventFilter;
        "RoleGranted(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter;
        RoleGranted(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleGrantedEventFilter;
        "RoleRevoked(bytes32,address,address)"(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter;
        RoleRevoked(role?: BytesLike | null, account?: string | null, sender?: string | null): RoleRevokedEventFilter;
        "TierUpdated(address,uint256,uint256)"(proxyOrDeployer?: string | null, tierId?: null, validUntilTimestamp?: null): TierUpdatedEventFilter;
        TierUpdated(proxyOrDeployer?: string | null, tierId?: null, validUntilTimestamp?: null): TierUpdatedEventFilter;
    };
    estimateGas: {
        DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<BigNumber>;
        MAX_FEE_BPS(overrides?: CallOverrides): Promise<BigNumber>;
        factory(overrides?: CallOverrides): Promise<BigNumber>;
        feeInfo(arg0: BigNumberish, arg1: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        getFeeInfo(_proxy: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        getFeeTier(_deployer: string, _proxy: string, overrides?: CallOverrides): Promise<BigNumber>;
        getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        grantRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<BigNumber>;
        isTrustedForwarder(forwarder: string, overrides?: CallOverrides): Promise<BigNumber>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        renounceRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        revokeRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setFeeInfoForTier(_tierId: BigNumberish, _feeBps: BigNumberish, _feeRecipient: string, _feeType: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setFeeTierPlacementExtension(_extension: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setTier(_proxyOrDeployer: string, _tierId: BigNumberish, _validUntilTimestamp: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        tierPlacementExtension(overrides?: CallOverrides): Promise<BigNumber>;
    };
    populateTransaction: {
        DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        MAX_FEE_BPS(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        factory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        feeInfo(arg0: BigNumberish, arg1: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getFeeInfo(_proxy: string, _feeType: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getFeeTier(_deployer: string, _proxy: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getRoleMember(role: BytesLike, index: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        getRoleMemberCount(role: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        grantRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        hasRole(role: BytesLike, account: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        isTrustedForwarder(forwarder: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        multicall(data: BytesLike[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        renounceRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        revokeRole(role: BytesLike, account: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setFeeInfoForTier(_tierId: BigNumberish, _feeBps: BigNumberish, _feeRecipient: string, _feeType: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setFeeTierPlacementExtension(_extension: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setTier(_proxyOrDeployer: string, _tierId: BigNumberish, _validUntilTimestamp: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        supportsInterface(interfaceId: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        tierPlacementExtension(overrides?: CallOverrides): Promise<PopulatedTransaction>;
    };
}

export { FeeTierUpdatedEvent, FeeTierUpdatedEventFilter, RoleAdminChangedEvent, RoleAdminChangedEventFilter, RoleGrantedEvent, RoleGrantedEventFilter, RoleRevokedEvent, RoleRevokedEventFilter, TWFee, TWFeeInterface, TierUpdatedEvent, TierUpdatedEventFilter };
