@uniswap/universal-router
Version:
Smart contracts for Universal Router
540 lines (457 loc) • 13.7 kB
TypeScript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
} from "ethers";
import {
Contract,
ContractTransaction,
Overrides,
CallOverrides,
} from "@ethersproject/contracts";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
interface ProtocolFeesInterface extends ethers.utils.Interface {
functions: {
"collectProtocolFees(address,address,uint256)": FunctionFragment;
"owner()": FunctionFragment;
"protocolFeeController()": FunctionFragment;
"protocolFeesAccrued(address)": FunctionFragment;
"setProtocolFee(tuple,uint24)": FunctionFragment;
"setProtocolFeeController(address)": FunctionFragment;
"transferOwnership(address)": FunctionFragment;
};
encodeFunctionData(
functionFragment: "collectProtocolFees",
values: [string, string, BigNumberish]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "protocolFeeController",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "protocolFeesAccrued",
values: [string]
): string;
encodeFunctionData(
functionFragment: "setProtocolFee",
values: [
{
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
BigNumberish
]
): string;
encodeFunctionData(
functionFragment: "setProtocolFeeController",
values: [string]
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [string]
): string;
decodeFunctionResult(
functionFragment: "collectProtocolFees",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "protocolFeeController",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "protocolFeesAccrued",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setProtocolFee",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setProtocolFeeController",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
events: {
"OwnershipTransferred(address,address)": EventFragment;
"ProtocolFeeControllerUpdated(address)": EventFragment;
"ProtocolFeeUpdated(bytes32,uint24)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
getEvent(
nameOrSignatureOrTopic: "ProtocolFeeControllerUpdated"
): EventFragment;
getEvent(nameOrSignatureOrTopic: "ProtocolFeeUpdated"): EventFragment;
}
export class ProtocolFees extends Contract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
on(event: EventFilter | string, listener: Listener): this;
once(event: EventFilter | string, listener: Listener): this;
addListener(eventName: EventFilter | string, listener: Listener): this;
removeAllListeners(eventName: EventFilter | string): this;
removeListener(eventName: any, listener: Listener): this;
interface: ProtocolFeesInterface;
functions: {
collectProtocolFees(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
"collectProtocolFees(address,address,uint256)"(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<{
0: string;
}>;
"owner()"(overrides?: CallOverrides): Promise<{
0: string;
}>;
protocolFeeController(overrides?: CallOverrides): Promise<{
0: string;
}>;
"protocolFeeController()"(overrides?: CallOverrides): Promise<{
0: string;
}>;
protocolFeesAccrued(
currency: string,
overrides?: CallOverrides
): Promise<{
amount: BigNumber;
0: BigNumber;
}>;
"protocolFeesAccrued(address)"(
currency: string,
overrides?: CallOverrides
): Promise<{
amount: BigNumber;
0: BigNumber;
}>;
setProtocolFee(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
"setProtocolFee((address,address,uint24,int24,address),uint24)"(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
setProtocolFeeController(
controller: string,
overrides?: Overrides
): Promise<ContractTransaction>;
"setProtocolFeeController(address)"(
controller: string,
overrides?: Overrides
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides
): Promise<ContractTransaction>;
"transferOwnership(address)"(
newOwner: string,
overrides?: Overrides
): Promise<ContractTransaction>;
};
collectProtocolFees(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
"collectProtocolFees(address,address,uint256)"(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<string>;
"owner()"(overrides?: CallOverrides): Promise<string>;
protocolFeeController(overrides?: CallOverrides): Promise<string>;
"protocolFeeController()"(overrides?: CallOverrides): Promise<string>;
protocolFeesAccrued(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
"protocolFeesAccrued(address)"(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setProtocolFee(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
"setProtocolFee((address,address,uint24,int24,address),uint24)"(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<ContractTransaction>;
setProtocolFeeController(
controller: string,
overrides?: Overrides
): Promise<ContractTransaction>;
"setProtocolFeeController(address)"(
controller: string,
overrides?: Overrides
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides
): Promise<ContractTransaction>;
"transferOwnership(address)"(
newOwner: string,
overrides?: Overrides
): Promise<ContractTransaction>;
callStatic: {
collectProtocolFees(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
"collectProtocolFees(address,address,uint256)"(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<string>;
"owner()"(overrides?: CallOverrides): Promise<string>;
protocolFeeController(overrides?: CallOverrides): Promise<string>;
"protocolFeeController()"(overrides?: CallOverrides): Promise<string>;
protocolFeesAccrued(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
"protocolFeesAccrued(address)"(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setProtocolFee(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
"setProtocolFee((address,address,uint24,int24,address),uint24)"(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
setProtocolFeeController(
controller: string,
overrides?: CallOverrides
): Promise<void>;
"setProtocolFeeController(address)"(
controller: string,
overrides?: CallOverrides
): Promise<void>;
transferOwnership(
newOwner: string,
overrides?: CallOverrides
): Promise<void>;
"transferOwnership(address)"(
newOwner: string,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
OwnershipTransferred(
user: string | null,
newOwner: string | null
): EventFilter;
ProtocolFeeControllerUpdated(
protocolFeeController: string | null
): EventFilter;
ProtocolFeeUpdated(id: BytesLike | null, protocolFee: null): EventFilter;
};
estimateGas: {
collectProtocolFees(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<BigNumber>;
"collectProtocolFees(address,address,uint256)"(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
"owner()"(overrides?: CallOverrides): Promise<BigNumber>;
protocolFeeController(overrides?: CallOverrides): Promise<BigNumber>;
"protocolFeeController()"(overrides?: CallOverrides): Promise<BigNumber>;
protocolFeesAccrued(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
"protocolFeesAccrued(address)"(
currency: string,
overrides?: CallOverrides
): Promise<BigNumber>;
setProtocolFee(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<BigNumber>;
"setProtocolFee((address,address,uint24,int24,address),uint24)"(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<BigNumber>;
setProtocolFeeController(
controller: string,
overrides?: Overrides
): Promise<BigNumber>;
"setProtocolFeeController(address)"(
controller: string,
overrides?: Overrides
): Promise<BigNumber>;
transferOwnership(
newOwner: string,
overrides?: Overrides
): Promise<BigNumber>;
"transferOwnership(address)"(
newOwner: string,
overrides?: Overrides
): Promise<BigNumber>;
};
populateTransaction: {
collectProtocolFees(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<PopulatedTransaction>;
"collectProtocolFees(address,address,uint256)"(
recipient: string,
currency: string,
amount: BigNumberish,
overrides?: Overrides
): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
"owner()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
protocolFeeController(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
"protocolFeeController()"(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
protocolFeesAccrued(
currency: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
"protocolFeesAccrued(address)"(
currency: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
setProtocolFee(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<PopulatedTransaction>;
"setProtocolFee((address,address,uint24,int24,address),uint24)"(
key: {
currency0: string;
currency1: string;
fee: BigNumberish;
tickSpacing: BigNumberish;
hooks: string;
},
newProtocolFee: BigNumberish,
overrides?: Overrides
): Promise<PopulatedTransaction>;
setProtocolFeeController(
controller: string,
overrides?: Overrides
): Promise<PopulatedTransaction>;
"setProtocolFeeController(address)"(
controller: string,
overrides?: Overrides
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides
): Promise<PopulatedTransaction>;
"transferOwnership(address)"(
newOwner: string,
overrides?: Overrides
): Promise<PopulatedTransaction>;
};
}