@imtbl/dex-sdk 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +176 -0
- package/README.md +3 -0
- package/dist/browser/index.js +2 -0
- package/dist/node/index.cjs +2 -0
- package/dist/node/index.js +2 -0
- package/dist/types/config/config.test.d.ts +1 -0
- package/dist/types/config/index.d.ts +18 -0
- package/dist/types/constants/chains/immutable-mainnet.d.ts +2 -0
- package/dist/types/constants/chains/immutable-testnet.d.ts +2 -0
- package/dist/types/constants/chains/index.d.ts +2 -0
- package/dist/types/constants/index.d.ts +3 -0
- package/dist/types/constants/router.d.ts +8 -0
- package/dist/types/constants/tokens/immutable-mainnet.d.ts +5 -0
- package/dist/types/constants/tokens/immutable-testnet.d.ts +4 -0
- package/dist/types/constants/tokens/index.d.ts +2 -0
- package/dist/types/constants/wrapping.d.ts +2 -0
- package/dist/types/contracts/types/ERC20.d.ts +141 -0
- package/dist/types/contracts/types/ImmutableSwapProxy.d.ts +469 -0
- package/dist/types/contracts/types/Multicall.d.ts +83 -0
- package/dist/types/contracts/types/QuoterV2.d.ts +219 -0
- package/dist/types/contracts/types/UniswapV3Pool.d.ts +732 -0
- package/dist/types/contracts/types/WIMX.d.ts +179 -0
- package/dist/types/contracts/types/common.d.ts +50 -0
- package/dist/types/contracts/types/factories/ERC20__factory.d.ts +174 -0
- package/dist/types/contracts/types/factories/ImmutableSwapProxy__factory.d.ts +612 -0
- package/dist/types/contracts/types/factories/Multicall__factory.d.ts +90 -0
- package/dist/types/contracts/types/factories/QuoterV2__factory.d.ts +226 -0
- package/dist/types/contracts/types/factories/UniswapV3Pool__factory.d.ts +795 -0
- package/dist/types/contracts/types/factories/WIMX__factory.d.ts +219 -0
- package/dist/types/contracts/types/factories/index.d.ts +6 -0
- package/dist/types/contracts/types/index.d.ts +13 -0
- package/dist/types/errors/exchangeError.d.ts +61 -0
- package/dist/types/errors/index.d.ts +1 -0
- package/dist/types/exchange.d.ts +50 -0
- package/dist/types/exchange.getUnsignedSwapTxFromAmountIn.test.d.ts +1 -0
- package/dist/types/exchange.getUnsignedSwapTxFromAmountOut.test.d.ts +1 -0
- package/dist/types/exchange.test.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/lib/fees.d.ts +16 -0
- package/dist/types/lib/fees.test.d.ts +1 -0
- package/dist/types/lib/getQuotesForRoutes.d.ts +14 -0
- package/dist/types/lib/getQuotesForRoutes.test.d.ts +1 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/dist/types/lib/multicall.d.ts +12 -0
- package/dist/types/lib/multicall.test.d.ts +1 -0
- package/dist/types/lib/nativeTokenService.d.ts +13 -0
- package/dist/types/lib/nativeTokenService.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/computePoolAddress.d.ts +9 -0
- package/dist/types/lib/poolUtils/ensureCorrectERC20AddressOrder.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/fetchValidPools.d.ts +14 -0
- package/dist/types/lib/poolUtils/fetchValidPools.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generateAllAcyclicPaths.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generateERC20Pairs.d.ts +7 -0
- package/dist/types/lib/poolUtils/generateERC20Pairs.test.d.ts +1 -0
- package/dist/types/lib/poolUtils/generatePossiblePoolsFromERC20Pairs.d.ts +11 -0
- package/dist/types/lib/poolUtils/generatePossiblePoolsFromERC20Pairs.test.d.ts +1 -0
- package/dist/types/lib/router.d.ts +24 -0
- package/dist/types/lib/router.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/approval.d.ts +25 -0
- package/dist/types/lib/transactionUtils/approval.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/gas.d.ts +18 -0
- package/dist/types/lib/transactionUtils/gas.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/getQuote.d.ts +13 -0
- package/dist/types/lib/transactionUtils/getQuote.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/slippage.d.ts +2 -0
- package/dist/types/lib/transactionUtils/slippage.test.d.ts +1 -0
- package/dist/types/lib/transactionUtils/swap.d.ts +16 -0
- package/dist/types/lib/transactionUtils/swap.test.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +60 -0
- package/dist/types/lib/utils.test.d.ts +1 -0
- package/dist/types/test/utils.d.ts +134 -0
- package/dist/types/test/utils.test.d.ts +1 -0
- package/dist/types/types/index.d.ts +174 -0
- package/package.json +74 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
|
|
3
|
+
export declare namespace IImmutableSwapProxy {
|
|
4
|
+
type SecondaryFeeParamsStruct = {
|
|
5
|
+
recipient: AddressLike;
|
|
6
|
+
feeBasisPoints: BigNumberish;
|
|
7
|
+
};
|
|
8
|
+
type SecondaryFeeParamsStructOutput = [
|
|
9
|
+
recipient: string,
|
|
10
|
+
feeBasisPoints: bigint
|
|
11
|
+
] & {
|
|
12
|
+
recipient: string;
|
|
13
|
+
feeBasisPoints: bigint;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare namespace IV3SwapRouter {
|
|
17
|
+
type ExactInputSingleParamsStruct = {
|
|
18
|
+
tokenIn: AddressLike;
|
|
19
|
+
tokenOut: AddressLike;
|
|
20
|
+
fee: BigNumberish;
|
|
21
|
+
recipient: AddressLike;
|
|
22
|
+
amountIn: BigNumberish;
|
|
23
|
+
amountOutMinimum: BigNumberish;
|
|
24
|
+
sqrtPriceLimitX96: BigNumberish;
|
|
25
|
+
};
|
|
26
|
+
type ExactInputSingleParamsStructOutput = [
|
|
27
|
+
tokenIn: string,
|
|
28
|
+
tokenOut: string,
|
|
29
|
+
fee: bigint,
|
|
30
|
+
recipient: string,
|
|
31
|
+
amountIn: bigint,
|
|
32
|
+
amountOutMinimum: bigint,
|
|
33
|
+
sqrtPriceLimitX96: bigint
|
|
34
|
+
] & {
|
|
35
|
+
tokenIn: string;
|
|
36
|
+
tokenOut: string;
|
|
37
|
+
fee: bigint;
|
|
38
|
+
recipient: string;
|
|
39
|
+
amountIn: bigint;
|
|
40
|
+
amountOutMinimum: bigint;
|
|
41
|
+
sqrtPriceLimitX96: bigint;
|
|
42
|
+
};
|
|
43
|
+
type ExactInputParamsStruct = {
|
|
44
|
+
path: BytesLike;
|
|
45
|
+
recipient: AddressLike;
|
|
46
|
+
amountIn: BigNumberish;
|
|
47
|
+
amountOutMinimum: BigNumberish;
|
|
48
|
+
};
|
|
49
|
+
type ExactInputParamsStructOutput = [
|
|
50
|
+
path: string,
|
|
51
|
+
recipient: string,
|
|
52
|
+
amountIn: bigint,
|
|
53
|
+
amountOutMinimum: bigint
|
|
54
|
+
] & {
|
|
55
|
+
path: string;
|
|
56
|
+
recipient: string;
|
|
57
|
+
amountIn: bigint;
|
|
58
|
+
amountOutMinimum: bigint;
|
|
59
|
+
};
|
|
60
|
+
type ExactOutputSingleParamsStruct = {
|
|
61
|
+
tokenIn: AddressLike;
|
|
62
|
+
tokenOut: AddressLike;
|
|
63
|
+
fee: BigNumberish;
|
|
64
|
+
recipient: AddressLike;
|
|
65
|
+
amountOut: BigNumberish;
|
|
66
|
+
amountInMaximum: BigNumberish;
|
|
67
|
+
sqrtPriceLimitX96: BigNumberish;
|
|
68
|
+
};
|
|
69
|
+
type ExactOutputSingleParamsStructOutput = [
|
|
70
|
+
tokenIn: string,
|
|
71
|
+
tokenOut: string,
|
|
72
|
+
fee: bigint,
|
|
73
|
+
recipient: string,
|
|
74
|
+
amountOut: bigint,
|
|
75
|
+
amountInMaximum: bigint,
|
|
76
|
+
sqrtPriceLimitX96: bigint
|
|
77
|
+
] & {
|
|
78
|
+
tokenIn: string;
|
|
79
|
+
tokenOut: string;
|
|
80
|
+
fee: bigint;
|
|
81
|
+
recipient: string;
|
|
82
|
+
amountOut: bigint;
|
|
83
|
+
amountInMaximum: bigint;
|
|
84
|
+
sqrtPriceLimitX96: bigint;
|
|
85
|
+
};
|
|
86
|
+
type ExactOutputParamsStruct = {
|
|
87
|
+
path: BytesLike;
|
|
88
|
+
recipient: AddressLike;
|
|
89
|
+
amountOut: BigNumberish;
|
|
90
|
+
amountInMaximum: BigNumberish;
|
|
91
|
+
};
|
|
92
|
+
type ExactOutputParamsStructOutput = [
|
|
93
|
+
path: string,
|
|
94
|
+
recipient: string,
|
|
95
|
+
amountOut: bigint,
|
|
96
|
+
amountInMaximum: bigint
|
|
97
|
+
] & {
|
|
98
|
+
path: string;
|
|
99
|
+
recipient: string;
|
|
100
|
+
amountOut: bigint;
|
|
101
|
+
amountInMaximum: bigint;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface ImmutableSwapProxyInterface extends Interface {
|
|
105
|
+
getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE" | "exactInputSingleWithSecondaryFee" | "exactInputWithSecondaryFee" | "exactOutputSingleWithSecondaryFee" | "exactOutputWithSecondaryFee" | "getRoleAdmin" | "grantRole" | "hasRole" | "multicall(uint256,bytes[])" | "multicall(bytes[])" | "pause" | "paused" | "renounceRole" | "revokeRole" | "supportsInterface" | "unpause" | "unwrapNativeToken" | "withdrawFunds(address,address)" | "withdrawFunds(address)"): FunctionFragment;
|
|
106
|
+
getEvent(nameOrSignatureOrTopic: "FeeTaken(address,address,address,uint256)" | "FeeTaken(address,address,uint256)" | "Paused" | "RoleAdminChanged" | "RoleGranted" | "RoleRevoked" | "Unpaused"): EventFragment;
|
|
107
|
+
encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
|
|
108
|
+
encodeFunctionData(functionFragment: "exactInputSingleWithSecondaryFee", values: [
|
|
109
|
+
IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
110
|
+
IV3SwapRouter.ExactInputSingleParamsStruct
|
|
111
|
+
]): string;
|
|
112
|
+
encodeFunctionData(functionFragment: "exactInputWithSecondaryFee", values: [
|
|
113
|
+
IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
114
|
+
IV3SwapRouter.ExactInputParamsStruct
|
|
115
|
+
]): string;
|
|
116
|
+
encodeFunctionData(functionFragment: "exactOutputSingleWithSecondaryFee", values: [
|
|
117
|
+
IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
118
|
+
IV3SwapRouter.ExactOutputSingleParamsStruct
|
|
119
|
+
]): string;
|
|
120
|
+
encodeFunctionData(functionFragment: "exactOutputWithSecondaryFee", values: [
|
|
121
|
+
IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
122
|
+
IV3SwapRouter.ExactOutputParamsStruct
|
|
123
|
+
]): string;
|
|
124
|
+
encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
|
|
125
|
+
encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, AddressLike]): string;
|
|
126
|
+
encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, AddressLike]): string;
|
|
127
|
+
encodeFunctionData(functionFragment: "multicall(uint256,bytes[])", values: [BigNumberish, BytesLike[]]): string;
|
|
128
|
+
encodeFunctionData(functionFragment: "multicall(bytes[])", values: [BytesLike[]]): string;
|
|
129
|
+
encodeFunctionData(functionFragment: "pause", values?: undefined): string;
|
|
130
|
+
encodeFunctionData(functionFragment: "paused", values?: undefined): string;
|
|
131
|
+
encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, AddressLike]): string;
|
|
132
|
+
encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, AddressLike]): string;
|
|
133
|
+
encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
|
|
134
|
+
encodeFunctionData(functionFragment: "unpause", values?: undefined): string;
|
|
135
|
+
encodeFunctionData(functionFragment: "unwrapNativeToken", values: [BigNumberish]): string;
|
|
136
|
+
encodeFunctionData(functionFragment: "withdrawFunds(address,address)", values: [AddressLike, AddressLike]): string;
|
|
137
|
+
encodeFunctionData(functionFragment: "withdrawFunds(address)", values: [AddressLike]): string;
|
|
138
|
+
decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result;
|
|
139
|
+
decodeFunctionResult(functionFragment: "exactInputSingleWithSecondaryFee", data: BytesLike): Result;
|
|
140
|
+
decodeFunctionResult(functionFragment: "exactInputWithSecondaryFee", data: BytesLike): Result;
|
|
141
|
+
decodeFunctionResult(functionFragment: "exactOutputSingleWithSecondaryFee", data: BytesLike): Result;
|
|
142
|
+
decodeFunctionResult(functionFragment: "exactOutputWithSecondaryFee", data: BytesLike): Result;
|
|
143
|
+
decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
|
|
144
|
+
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
|
|
145
|
+
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
|
|
146
|
+
decodeFunctionResult(functionFragment: "multicall(uint256,bytes[])", data: BytesLike): Result;
|
|
147
|
+
decodeFunctionResult(functionFragment: "multicall(bytes[])", data: BytesLike): Result;
|
|
148
|
+
decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result;
|
|
149
|
+
decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result;
|
|
150
|
+
decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result;
|
|
151
|
+
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
|
|
152
|
+
decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
|
|
153
|
+
decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result;
|
|
154
|
+
decodeFunctionResult(functionFragment: "unwrapNativeToken", data: BytesLike): Result;
|
|
155
|
+
decodeFunctionResult(functionFragment: "withdrawFunds(address,address)", data: BytesLike): Result;
|
|
156
|
+
decodeFunctionResult(functionFragment: "withdrawFunds(address)", data: BytesLike): Result;
|
|
157
|
+
}
|
|
158
|
+
export declare namespace FeeTaken_address_address_address_uint256_Event {
|
|
159
|
+
type InputTuple = [
|
|
160
|
+
feeToken: AddressLike,
|
|
161
|
+
feePayer: AddressLike,
|
|
162
|
+
feeRecipient: AddressLike,
|
|
163
|
+
feeAmount: BigNumberish
|
|
164
|
+
];
|
|
165
|
+
type OutputTuple = [
|
|
166
|
+
feeToken: string,
|
|
167
|
+
feePayer: string,
|
|
168
|
+
feeRecipient: string,
|
|
169
|
+
feeAmount: bigint
|
|
170
|
+
];
|
|
171
|
+
interface OutputObject {
|
|
172
|
+
feeToken: string;
|
|
173
|
+
feePayer: string;
|
|
174
|
+
feeRecipient: string;
|
|
175
|
+
feeAmount: bigint;
|
|
176
|
+
}
|
|
177
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
178
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
179
|
+
type Log = TypedEventLog<Event>;
|
|
180
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
181
|
+
}
|
|
182
|
+
export declare namespace FeeTaken_address_address_uint256_Event {
|
|
183
|
+
type InputTuple = [
|
|
184
|
+
feePayer: AddressLike,
|
|
185
|
+
feeRecipient: AddressLike,
|
|
186
|
+
feeAmount: BigNumberish
|
|
187
|
+
];
|
|
188
|
+
type OutputTuple = [
|
|
189
|
+
feePayer: string,
|
|
190
|
+
feeRecipient: string,
|
|
191
|
+
feeAmount: bigint
|
|
192
|
+
];
|
|
193
|
+
interface OutputObject {
|
|
194
|
+
feePayer: string;
|
|
195
|
+
feeRecipient: string;
|
|
196
|
+
feeAmount: bigint;
|
|
197
|
+
}
|
|
198
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
199
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
200
|
+
type Log = TypedEventLog<Event>;
|
|
201
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
202
|
+
}
|
|
203
|
+
export declare namespace PausedEvent {
|
|
204
|
+
type InputTuple = [account: AddressLike];
|
|
205
|
+
type OutputTuple = [account: string];
|
|
206
|
+
interface OutputObject {
|
|
207
|
+
account: string;
|
|
208
|
+
}
|
|
209
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
210
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
211
|
+
type Log = TypedEventLog<Event>;
|
|
212
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
213
|
+
}
|
|
214
|
+
export declare namespace RoleAdminChangedEvent {
|
|
215
|
+
type InputTuple = [
|
|
216
|
+
role: BytesLike,
|
|
217
|
+
previousAdminRole: BytesLike,
|
|
218
|
+
newAdminRole: BytesLike
|
|
219
|
+
];
|
|
220
|
+
type OutputTuple = [
|
|
221
|
+
role: string,
|
|
222
|
+
previousAdminRole: string,
|
|
223
|
+
newAdminRole: string
|
|
224
|
+
];
|
|
225
|
+
interface OutputObject {
|
|
226
|
+
role: string;
|
|
227
|
+
previousAdminRole: string;
|
|
228
|
+
newAdminRole: string;
|
|
229
|
+
}
|
|
230
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
231
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
232
|
+
type Log = TypedEventLog<Event>;
|
|
233
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
234
|
+
}
|
|
235
|
+
export declare namespace RoleGrantedEvent {
|
|
236
|
+
type InputTuple = [
|
|
237
|
+
role: BytesLike,
|
|
238
|
+
account: AddressLike,
|
|
239
|
+
sender: AddressLike
|
|
240
|
+
];
|
|
241
|
+
type OutputTuple = [role: string, account: string, sender: string];
|
|
242
|
+
interface OutputObject {
|
|
243
|
+
role: string;
|
|
244
|
+
account: string;
|
|
245
|
+
sender: string;
|
|
246
|
+
}
|
|
247
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
248
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
249
|
+
type Log = TypedEventLog<Event>;
|
|
250
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
251
|
+
}
|
|
252
|
+
export declare namespace RoleRevokedEvent {
|
|
253
|
+
type InputTuple = [
|
|
254
|
+
role: BytesLike,
|
|
255
|
+
account: AddressLike,
|
|
256
|
+
sender: AddressLike
|
|
257
|
+
];
|
|
258
|
+
type OutputTuple = [role: string, account: string, sender: string];
|
|
259
|
+
interface OutputObject {
|
|
260
|
+
role: string;
|
|
261
|
+
account: string;
|
|
262
|
+
sender: string;
|
|
263
|
+
}
|
|
264
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
265
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
266
|
+
type Log = TypedEventLog<Event>;
|
|
267
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
268
|
+
}
|
|
269
|
+
export declare namespace UnpausedEvent {
|
|
270
|
+
type InputTuple = [account: AddressLike];
|
|
271
|
+
type OutputTuple = [account: string];
|
|
272
|
+
interface OutputObject {
|
|
273
|
+
account: string;
|
|
274
|
+
}
|
|
275
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
276
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
277
|
+
type Log = TypedEventLog<Event>;
|
|
278
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
279
|
+
}
|
|
280
|
+
export interface ImmutableSwapProxy extends BaseContract {
|
|
281
|
+
connect(runner?: ContractRunner | null): ImmutableSwapProxy;
|
|
282
|
+
waitForDeployment(): Promise<this>;
|
|
283
|
+
interface: ImmutableSwapProxyInterface;
|
|
284
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
285
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
286
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
287
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
288
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
289
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
290
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
291
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
292
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
293
|
+
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
|
|
294
|
+
exactInputSingleWithSecondaryFee: TypedContractMethod<[
|
|
295
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
296
|
+
swapParams: IV3SwapRouter.ExactInputSingleParamsStruct
|
|
297
|
+
], [
|
|
298
|
+
bigint
|
|
299
|
+
], "payable">;
|
|
300
|
+
exactInputWithSecondaryFee: TypedContractMethod<[
|
|
301
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
302
|
+
swapParams: IV3SwapRouter.ExactInputParamsStruct
|
|
303
|
+
], [
|
|
304
|
+
bigint
|
|
305
|
+
], "payable">;
|
|
306
|
+
exactOutputSingleWithSecondaryFee: TypedContractMethod<[
|
|
307
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
308
|
+
swapParams: IV3SwapRouter.ExactOutputSingleParamsStruct
|
|
309
|
+
], [
|
|
310
|
+
bigint
|
|
311
|
+
], "payable">;
|
|
312
|
+
exactOutputWithSecondaryFee: TypedContractMethod<[
|
|
313
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
314
|
+
swapParams: IV3SwapRouter.ExactOutputParamsStruct
|
|
315
|
+
], [
|
|
316
|
+
bigint
|
|
317
|
+
], "payable">;
|
|
318
|
+
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
|
|
319
|
+
grantRole: TypedContractMethod<[
|
|
320
|
+
role: BytesLike,
|
|
321
|
+
account: AddressLike
|
|
322
|
+
], [
|
|
323
|
+
void
|
|
324
|
+
], "nonpayable">;
|
|
325
|
+
hasRole: TypedContractMethod<[
|
|
326
|
+
role: BytesLike,
|
|
327
|
+
account: AddressLike
|
|
328
|
+
], [
|
|
329
|
+
boolean
|
|
330
|
+
], "view">;
|
|
331
|
+
"multicall(uint256,bytes[])": TypedContractMethod<[
|
|
332
|
+
deadline: BigNumberish,
|
|
333
|
+
data: BytesLike[]
|
|
334
|
+
], [
|
|
335
|
+
string[]
|
|
336
|
+
], "payable">;
|
|
337
|
+
"multicall(bytes[])": TypedContractMethod<[
|
|
338
|
+
data: BytesLike[]
|
|
339
|
+
], [
|
|
340
|
+
string[]
|
|
341
|
+
], "nonpayable">;
|
|
342
|
+
pause: TypedContractMethod<[], [void], "nonpayable">;
|
|
343
|
+
paused: TypedContractMethod<[], [boolean], "view">;
|
|
344
|
+
renounceRole: TypedContractMethod<[
|
|
345
|
+
role: BytesLike,
|
|
346
|
+
account: AddressLike
|
|
347
|
+
], [
|
|
348
|
+
void
|
|
349
|
+
], "nonpayable">;
|
|
350
|
+
revokeRole: TypedContractMethod<[
|
|
351
|
+
role: BytesLike,
|
|
352
|
+
account: AddressLike
|
|
353
|
+
], [
|
|
354
|
+
void
|
|
355
|
+
], "nonpayable">;
|
|
356
|
+
supportsInterface: TypedContractMethod<[
|
|
357
|
+
interfaceId: BytesLike
|
|
358
|
+
], [
|
|
359
|
+
boolean
|
|
360
|
+
], "view">;
|
|
361
|
+
unpause: TypedContractMethod<[], [void], "nonpayable">;
|
|
362
|
+
unwrapNativeToken: TypedContractMethod<[
|
|
363
|
+
amountMinimum: BigNumberish
|
|
364
|
+
], [
|
|
365
|
+
void
|
|
366
|
+
], "payable">;
|
|
367
|
+
"withdrawFunds(address,address)": TypedContractMethod<[
|
|
368
|
+
to: AddressLike,
|
|
369
|
+
erc20: AddressLike
|
|
370
|
+
], [
|
|
371
|
+
void
|
|
372
|
+
], "nonpayable">;
|
|
373
|
+
"withdrawFunds(address)": TypedContractMethod<[
|
|
374
|
+
to: AddressLike
|
|
375
|
+
], [
|
|
376
|
+
void
|
|
377
|
+
], "nonpayable">;
|
|
378
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
379
|
+
getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE"): TypedContractMethod<[], [string], "view">;
|
|
380
|
+
getFunction(nameOrSignature: "exactInputSingleWithSecondaryFee"): TypedContractMethod<[
|
|
381
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
382
|
+
swapParams: IV3SwapRouter.ExactInputSingleParamsStruct
|
|
383
|
+
], [
|
|
384
|
+
bigint
|
|
385
|
+
], "payable">;
|
|
386
|
+
getFunction(nameOrSignature: "exactInputWithSecondaryFee"): TypedContractMethod<[
|
|
387
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
388
|
+
swapParams: IV3SwapRouter.ExactInputParamsStruct
|
|
389
|
+
], [
|
|
390
|
+
bigint
|
|
391
|
+
], "payable">;
|
|
392
|
+
getFunction(nameOrSignature: "exactOutputSingleWithSecondaryFee"): TypedContractMethod<[
|
|
393
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
394
|
+
swapParams: IV3SwapRouter.ExactOutputSingleParamsStruct
|
|
395
|
+
], [
|
|
396
|
+
bigint
|
|
397
|
+
], "payable">;
|
|
398
|
+
getFunction(nameOrSignature: "exactOutputWithSecondaryFee"): TypedContractMethod<[
|
|
399
|
+
secondaryFees: IImmutableSwapProxy.SecondaryFeeParamsStruct[],
|
|
400
|
+
swapParams: IV3SwapRouter.ExactOutputParamsStruct
|
|
401
|
+
], [
|
|
402
|
+
bigint
|
|
403
|
+
], "payable">;
|
|
404
|
+
getFunction(nameOrSignature: "getRoleAdmin"): TypedContractMethod<[role: BytesLike], [string], "view">;
|
|
405
|
+
getFunction(nameOrSignature: "grantRole"): TypedContractMethod<[
|
|
406
|
+
role: BytesLike,
|
|
407
|
+
account: AddressLike
|
|
408
|
+
], [
|
|
409
|
+
void
|
|
410
|
+
], "nonpayable">;
|
|
411
|
+
getFunction(nameOrSignature: "hasRole"): TypedContractMethod<[
|
|
412
|
+
role: BytesLike,
|
|
413
|
+
account: AddressLike
|
|
414
|
+
], [
|
|
415
|
+
boolean
|
|
416
|
+
], "view">;
|
|
417
|
+
getFunction(nameOrSignature: "multicall(uint256,bytes[])"): TypedContractMethod<[
|
|
418
|
+
deadline: BigNumberish,
|
|
419
|
+
data: BytesLike[]
|
|
420
|
+
], [
|
|
421
|
+
string[]
|
|
422
|
+
], "payable">;
|
|
423
|
+
getFunction(nameOrSignature: "multicall(bytes[])"): TypedContractMethod<[data: BytesLike[]], [string[]], "nonpayable">;
|
|
424
|
+
getFunction(nameOrSignature: "pause"): TypedContractMethod<[], [void], "nonpayable">;
|
|
425
|
+
getFunction(nameOrSignature: "paused"): TypedContractMethod<[], [boolean], "view">;
|
|
426
|
+
getFunction(nameOrSignature: "renounceRole"): TypedContractMethod<[
|
|
427
|
+
role: BytesLike,
|
|
428
|
+
account: AddressLike
|
|
429
|
+
], [
|
|
430
|
+
void
|
|
431
|
+
], "nonpayable">;
|
|
432
|
+
getFunction(nameOrSignature: "revokeRole"): TypedContractMethod<[
|
|
433
|
+
role: BytesLike,
|
|
434
|
+
account: AddressLike
|
|
435
|
+
], [
|
|
436
|
+
void
|
|
437
|
+
], "nonpayable">;
|
|
438
|
+
getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
|
|
439
|
+
getFunction(nameOrSignature: "unpause"): TypedContractMethod<[], [void], "nonpayable">;
|
|
440
|
+
getFunction(nameOrSignature: "unwrapNativeToken"): TypedContractMethod<[amountMinimum: BigNumberish], [void], "payable">;
|
|
441
|
+
getFunction(nameOrSignature: "withdrawFunds(address,address)"): TypedContractMethod<[
|
|
442
|
+
to: AddressLike,
|
|
443
|
+
erc20: AddressLike
|
|
444
|
+
], [
|
|
445
|
+
void
|
|
446
|
+
], "nonpayable">;
|
|
447
|
+
getFunction(nameOrSignature: "withdrawFunds(address)"): TypedContractMethod<[to: AddressLike], [void], "nonpayable">;
|
|
448
|
+
getEvent(key: "FeeTaken(address,address,address,uint256)"): TypedContractEvent<FeeTaken_address_address_address_uint256_Event.InputTuple, FeeTaken_address_address_address_uint256_Event.OutputTuple, FeeTaken_address_address_address_uint256_Event.OutputObject>;
|
|
449
|
+
getEvent(key: "FeeTaken(address,address,uint256)"): TypedContractEvent<FeeTaken_address_address_uint256_Event.InputTuple, FeeTaken_address_address_uint256_Event.OutputTuple, FeeTaken_address_address_uint256_Event.OutputObject>;
|
|
450
|
+
getEvent(key: "Paused"): TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
451
|
+
getEvent(key: "RoleAdminChanged"): TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
|
452
|
+
getEvent(key: "RoleGranted"): TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
|
453
|
+
getEvent(key: "RoleRevoked"): TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
|
454
|
+
getEvent(key: "Unpaused"): TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
455
|
+
filters: {
|
|
456
|
+
"FeeTaken(address,address,address,uint256)": TypedContractEvent<FeeTaken_address_address_address_uint256_Event.InputTuple, FeeTaken_address_address_address_uint256_Event.OutputTuple, FeeTaken_address_address_address_uint256_Event.OutputObject>;
|
|
457
|
+
"FeeTaken(address,address,uint256)": TypedContractEvent<FeeTaken_address_address_uint256_Event.InputTuple, FeeTaken_address_address_uint256_Event.OutputTuple, FeeTaken_address_address_uint256_Event.OutputObject>;
|
|
458
|
+
"Paused(address)": TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
459
|
+
Paused: TypedContractEvent<PausedEvent.InputTuple, PausedEvent.OutputTuple, PausedEvent.OutputObject>;
|
|
460
|
+
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
|
461
|
+
RoleAdminChanged: TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
|
462
|
+
"RoleGranted(bytes32,address,address)": TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
|
463
|
+
RoleGranted: TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
|
464
|
+
"RoleRevoked(bytes32,address,address)": TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
|
465
|
+
RoleRevoked: TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
|
466
|
+
"Unpaused(address)": TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
467
|
+
Unpaused: TypedContractEvent<UnpausedEvent.InputTuple, UnpausedEvent.OutputTuple, UnpausedEvent.OutputObject>;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "./common";
|
|
3
|
+
export declare namespace UniswapInterfaceMulticall {
|
|
4
|
+
type CallStruct = {
|
|
5
|
+
target: AddressLike;
|
|
6
|
+
gasLimit: BigNumberish;
|
|
7
|
+
callData: BytesLike;
|
|
8
|
+
};
|
|
9
|
+
type CallStructOutput = [
|
|
10
|
+
target: string,
|
|
11
|
+
gasLimit: bigint,
|
|
12
|
+
callData: string
|
|
13
|
+
] & {
|
|
14
|
+
target: string;
|
|
15
|
+
gasLimit: bigint;
|
|
16
|
+
callData: string;
|
|
17
|
+
};
|
|
18
|
+
type ResultStruct = {
|
|
19
|
+
success: boolean;
|
|
20
|
+
gasUsed: BigNumberish;
|
|
21
|
+
returnData: BytesLike;
|
|
22
|
+
};
|
|
23
|
+
type ResultStructOutput = [
|
|
24
|
+
success: boolean,
|
|
25
|
+
gasUsed: bigint,
|
|
26
|
+
returnData: string
|
|
27
|
+
] & {
|
|
28
|
+
success: boolean;
|
|
29
|
+
gasUsed: bigint;
|
|
30
|
+
returnData: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface MulticallInterface extends Interface {
|
|
34
|
+
getFunction(nameOrSignature: "getCurrentBlockTimestamp" | "getEthBalance" | "multicall"): FunctionFragment;
|
|
35
|
+
encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string;
|
|
36
|
+
encodeFunctionData(functionFragment: "getEthBalance", values: [AddressLike]): string;
|
|
37
|
+
encodeFunctionData(functionFragment: "multicall", values: [UniswapInterfaceMulticall.CallStruct[]]): string;
|
|
38
|
+
decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result;
|
|
39
|
+
decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result;
|
|
40
|
+
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
|
41
|
+
}
|
|
42
|
+
export interface Multicall extends BaseContract {
|
|
43
|
+
connect(runner?: ContractRunner | null): Multicall;
|
|
44
|
+
waitForDeployment(): Promise<this>;
|
|
45
|
+
interface: MulticallInterface;
|
|
46
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
47
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
48
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
49
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
50
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
51
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
52
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
53
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
54
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
55
|
+
getCurrentBlockTimestamp: TypedContractMethod<[], [bigint], "view">;
|
|
56
|
+
getEthBalance: TypedContractMethod<[addr: AddressLike], [bigint], "view">;
|
|
57
|
+
multicall: TypedContractMethod<[
|
|
58
|
+
calls: UniswapInterfaceMulticall.CallStruct[]
|
|
59
|
+
], [
|
|
60
|
+
[
|
|
61
|
+
bigint,
|
|
62
|
+
UniswapInterfaceMulticall.ResultStructOutput[]
|
|
63
|
+
] & {
|
|
64
|
+
blockNumber: bigint;
|
|
65
|
+
returnData: UniswapInterfaceMulticall.ResultStructOutput[];
|
|
66
|
+
}
|
|
67
|
+
], "nonpayable">;
|
|
68
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
69
|
+
getFunction(nameOrSignature: "getCurrentBlockTimestamp"): TypedContractMethod<[], [bigint], "view">;
|
|
70
|
+
getFunction(nameOrSignature: "getEthBalance"): TypedContractMethod<[addr: AddressLike], [bigint], "view">;
|
|
71
|
+
getFunction(nameOrSignature: "multicall"): TypedContractMethod<[
|
|
72
|
+
calls: UniswapInterfaceMulticall.CallStruct[]
|
|
73
|
+
], [
|
|
74
|
+
[
|
|
75
|
+
bigint,
|
|
76
|
+
UniswapInterfaceMulticall.ResultStructOutput[]
|
|
77
|
+
] & {
|
|
78
|
+
blockNumber: bigint;
|
|
79
|
+
returnData: UniswapInterfaceMulticall.ResultStructOutput[];
|
|
80
|
+
}
|
|
81
|
+
], "nonpayable">;
|
|
82
|
+
filters: {};
|
|
83
|
+
}
|