@blazephoenix/sdk 0.5.2 → 1.0.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/README.md +133 -153
- package/dist/index.cjs +6288 -441
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3955 -470
- package/dist/index.d.ts +3955 -470
- package/dist/index.js +6239 -436
- package/dist/index.js.map +1 -1
- package/package.json +10 -11
package/dist/index.d.cts
CHANGED
|
@@ -1,45 +1,58 @@
|
|
|
1
|
+
import { Transport, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
|
|
3
|
+
declare const API_BASE = "https://blazephoenix.xyz";
|
|
4
|
+
/** Where the live, versioned deployment registry is published. Static JSON —
|
|
5
|
+
* no RPC is ever performed on your behalf by the site. */
|
|
6
|
+
declare const DEPLOYMENTS_URL = "https://blazephoenix.xyz/api/deployments";
|
|
7
|
+
type SupportedChainId = 1 | 8453 | 10 | 42161 | 4663;
|
|
8
|
+
declare const SUPPORTED_CHAIN_IDS: readonly SupportedChainId[];
|
|
9
|
+
interface ChainInfo {
|
|
10
|
+
chainId: SupportedChainId;
|
|
11
|
+
name: string;
|
|
12
|
+
/** Short env-var friendly key: BASE, ETHEREUM, OPTIMISM, ARBITRUM, ROBINHOOD. */
|
|
13
|
+
key: string;
|
|
14
|
+
explorer: string;
|
|
15
|
+
weth: `0x${string}`;
|
|
16
|
+
/** The chain's canonical dollar asset (USDG on Robinhood Chain). */
|
|
17
|
+
usdc: `0x${string}`;
|
|
18
|
+
bzpx?: `0x${string}`;
|
|
19
|
+
/** BlazePhoenix staking engine, where live. */
|
|
20
|
+
staking?: `0x${string}`;
|
|
21
|
+
/** Approximate seconds per block — used to size log scans. */
|
|
22
|
+
blockTime: number;
|
|
23
|
+
}
|
|
24
|
+
declare const CHAINS: Record<SupportedChainId, ChainInfo>;
|
|
25
|
+
/** Accepts a chain id (number or numeric string) or a human alias. */
|
|
26
|
+
declare function resolveChain(chain: number | string): SupportedChainId;
|
|
27
|
+
declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000";
|
|
28
|
+
/** The native-ETH sentinel accepted anywhere a token is (the Router trades
|
|
29
|
+
* ERC-20s: native input is wrapped by `swapExactInNative` on 2.x routers). */
|
|
30
|
+
declare const NATIVE_TOKEN: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
31
|
+
/** Canonical Permit2 (same address on every chain; the Router's default). */
|
|
32
|
+
declare const PERMIT2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
33
|
+
/** Protocol fee in bps. Since 2026-08-22 it is charged ONCE per route on the
|
|
34
|
+
* first bridge currency the Router holds; `preview.protocolFee` reports its
|
|
35
|
+
* effect on the output in tokenOut. */
|
|
36
|
+
declare const FEE_BPS = 28;
|
|
37
|
+
/** Router event topic0 hashes. Verified against the ABIs by `npm test`. */
|
|
38
|
+
declare const SWAP_TOPIC0: "0xd6d34547c69c5ee3d2667625c188acf1006abb93e0ee7cf03925c67cf7760413";
|
|
39
|
+
/** 1.x routers only — the fee-exempt surplus promise died with the 2.x fee model. */
|
|
40
|
+
declare const SURPLUS_TOPIC0: "0x1a3afef0f067eb51a6bfec6ab3625a4408dd8c3571b72836483e68feb70d1026";
|
|
41
|
+
/** 2.x routers: quoted vs realised vs floor, emitted beside every Swap. */
|
|
42
|
+
declare const EXECUTION_PROOF_TOPIC0: "0xb5a62bcb8753e37706da20862f2a32a16831ef0144567eb15b1da49547e9f84c";
|
|
43
|
+
/** 2.x routers: what was charged, in which token, split between treasuries. */
|
|
44
|
+
declare const FEE_TOPIC0: "0x18fa25e22e0f1f39ef2130081363ba86a1259e598e669558683dabfc15bfe731";
|
|
45
|
+
|
|
1
46
|
type Address = `0x${string}`;
|
|
2
47
|
type Hex = `0x${string}`;
|
|
3
48
|
/** Chain selector: id (1, 8453, 10, 42161, 4663) or name ("base", "eth",
|
|
4
49
|
* "optimism", "arbitrum", "robinhood", …). */
|
|
5
50
|
type ChainRef = number | string;
|
|
6
|
-
/** Token selector: 0x-address,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `resolved`. Pass 0x addresses when you need precision; the batch endpoint
|
|
10
|
-
* takes addresses/built-in symbols only. */
|
|
51
|
+
/** Token selector: 0x-address, or one of the universal symbols every chain
|
|
52
|
+
* carries: ETH (native), WETH, USDC (the chain's dollar asset), BZPX (Base).
|
|
53
|
+
* Everything else: pass the 0x address — the SDK never guesses a token. */
|
|
11
54
|
type TokenRef = string;
|
|
12
|
-
interface
|
|
13
|
-
chain: ChainRef;
|
|
14
|
-
tokenIn: TokenRef;
|
|
15
|
-
tokenOut: TokenRef;
|
|
16
|
-
/** Input amount in the token's base units (wei-style). */
|
|
17
|
-
amountIn: bigint | string;
|
|
18
|
-
/** When set, the response includes ready-to-send `tx` calldata. */
|
|
19
|
-
recipient?: Address;
|
|
20
|
-
/** 0–5000. Default: the protocol's own execution floor (effectiveMinOut). */
|
|
21
|
-
slippageBps?: number;
|
|
22
|
-
/** 10–3600 seconds. Default 120. */
|
|
23
|
-
deadlineSec?: number;
|
|
24
|
-
/** Execution-grade re-quote (previewPlanExact) — slower, sharper. */
|
|
25
|
-
exact?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* YOUR OWN https RPC endpoint. When set, the API performs the read through
|
|
28
|
-
* your node instead of its shared pool.
|
|
29
|
-
*
|
|
30
|
-
* The service is free either way and always has been — this exists so that
|
|
31
|
-
* sustained automation can carry its own read volume, which is what keeps the
|
|
32
|
-
* free path viable for callers who cannot. Your node is tried first and the
|
|
33
|
-
* public pool remains the fallback, so supplying one can only make the call
|
|
34
|
-
* more reliable, never less. `meta.rpc` in the response reads "byo" when your
|
|
35
|
-
* node answered and "shared" when it did not.
|
|
36
|
-
*
|
|
37
|
-
* Set it once on the client (`new BlazePhoenix({ rpc })`) rather than per
|
|
38
|
-
* call, unless a particular request needs a different node.
|
|
39
|
-
*/
|
|
40
|
-
rpc?: string;
|
|
41
|
-
}
|
|
42
|
-
interface QuoteLeg {
|
|
55
|
+
interface Leg {
|
|
43
56
|
pool: Address;
|
|
44
57
|
hooks: Address;
|
|
45
58
|
kind: number;
|
|
@@ -47,252 +60,604 @@ interface QuoteLeg {
|
|
|
47
60
|
tickSpacing: number;
|
|
48
61
|
zeroForOne: boolean;
|
|
49
62
|
stable: boolean;
|
|
50
|
-
amountIn:
|
|
51
|
-
expectedOut:
|
|
63
|
+
amountIn: bigint;
|
|
64
|
+
expectedOut: bigint;
|
|
52
65
|
auxId: Hex;
|
|
53
66
|
}
|
|
54
|
-
interface
|
|
67
|
+
interface Hop {
|
|
55
68
|
tokenIn: Address;
|
|
56
69
|
tokenOut: Address;
|
|
57
|
-
amountIn:
|
|
58
|
-
expectedOut:
|
|
59
|
-
legs:
|
|
60
|
-
}
|
|
61
|
-
interface
|
|
62
|
-
hops:
|
|
63
|
-
totalOut:
|
|
64
|
-
singleOut:
|
|
65
|
-
singleOutFloor:
|
|
66
|
-
expectedImpactBps:
|
|
67
|
-
confidenceWad:
|
|
68
|
-
estGas:
|
|
70
|
+
amountIn: bigint;
|
|
71
|
+
expectedOut: bigint;
|
|
72
|
+
legs: readonly Leg[];
|
|
73
|
+
}
|
|
74
|
+
interface Route {
|
|
75
|
+
hops: readonly Hop[];
|
|
76
|
+
totalOut: bigint;
|
|
77
|
+
singleOut: bigint;
|
|
78
|
+
singleOutFloor: bigint;
|
|
79
|
+
expectedImpactBps: bigint;
|
|
80
|
+
confidenceWad: bigint;
|
|
81
|
+
estGas: bigint;
|
|
69
82
|
hasSurplus: boolean;
|
|
70
83
|
isV4Bundle: boolean;
|
|
71
84
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
/** The Quoter's Preview struct, verbatim. */
|
|
86
|
+
interface Preview {
|
|
87
|
+
route: Route;
|
|
88
|
+
grossOut: bigint;
|
|
89
|
+
/** The EFFECT of the protocol fee on the output, in tokenOut. */
|
|
90
|
+
protocolFee: bigint;
|
|
91
|
+
safetyBuffer: bigint;
|
|
92
|
+
/** grossOut · (1 − fee) · (1 − safety) — the number to compare across venues. */
|
|
93
|
+
netOut: bigint;
|
|
94
|
+
/** Output floor supplied by the Solver (the Iron Law floor). */
|
|
95
|
+
ironFloor: bigint;
|
|
96
|
+
userMinOut: bigint;
|
|
97
|
+
/** max(userMinOut, ironFloor) — what the Router is asked to honour at least. */
|
|
98
|
+
effectiveMinOut: bigint;
|
|
99
|
+
estGas: bigint;
|
|
100
|
+
hops: bigint;
|
|
101
|
+
legs: bigint;
|
|
102
|
+
/** 0 direct, 1 via one bridge, 2 via two. */
|
|
103
|
+
topology: number;
|
|
104
|
+
bridgeUsed: Address;
|
|
82
105
|
canExecute: boolean;
|
|
83
|
-
hasSurplus: boolean;
|
|
84
|
-
feeBps: number;
|
|
85
106
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
value: '0';
|
|
90
|
-
}
|
|
91
|
-
/** Phoenix Check — deterministic quote invariants, derived on-chain, that an
|
|
92
|
-
* agent can act on. Fails closed: `verdict` is never greener than its weakest
|
|
93
|
-
* invariant (blocked | danger | caution | ok). */
|
|
107
|
+
type Verdict = 'blocked' | 'danger' | 'caution' | 'ok';
|
|
108
|
+
/** Phoenix Check — deterministic invariants derived from the on-chain preview.
|
|
109
|
+
* Fails closed: `verdict` is never greener than its weakest invariant. */
|
|
94
110
|
interface QuoteChecks {
|
|
95
|
-
verdict:
|
|
111
|
+
verdict: Verdict;
|
|
96
112
|
priceImpact: {
|
|
97
113
|
bps: number;
|
|
98
|
-
verdict:
|
|
114
|
+
verdict: Verdict;
|
|
99
115
|
hardLineBps: number;
|
|
116
|
+
cautionBps: number;
|
|
100
117
|
note: string;
|
|
101
118
|
};
|
|
102
119
|
ironFloor: {
|
|
103
|
-
enforcedOnChain:
|
|
120
|
+
enforcedOnChain: true;
|
|
104
121
|
armed: boolean;
|
|
105
|
-
ironFloor:
|
|
106
|
-
effectiveMinOut:
|
|
122
|
+
ironFloor: bigint;
|
|
123
|
+
effectiveMinOut: bigint;
|
|
124
|
+
note: string;
|
|
125
|
+
};
|
|
126
|
+
routeShape: {
|
|
127
|
+
consistent: boolean;
|
|
128
|
+
hops: number;
|
|
129
|
+
legs: number;
|
|
107
130
|
note: string;
|
|
108
131
|
};
|
|
109
132
|
crossCheck: {
|
|
110
133
|
basis: string;
|
|
111
|
-
reproducible:
|
|
134
|
+
reproducible: true;
|
|
112
135
|
note: string;
|
|
113
136
|
};
|
|
114
137
|
disclaimer: string;
|
|
115
138
|
}
|
|
116
|
-
interface
|
|
117
|
-
|
|
118
|
-
|
|
139
|
+
interface QuoteRequest {
|
|
140
|
+
/** Optional when your client has a single RPC: the node's own chain is used. */
|
|
141
|
+
chain?: ChainRef;
|
|
142
|
+
tokenIn: TokenRef;
|
|
143
|
+
tokenOut: TokenRef;
|
|
144
|
+
/** Input in base units (bigint, or an integer string). */
|
|
145
|
+
amountIn?: bigint | string;
|
|
146
|
+
/** Input in HUMAN units ("1.5"); decimals are read from the token on your RPC. */
|
|
147
|
+
amount?: string;
|
|
148
|
+
/** Tighten the on-chain floor with your own minimum (base units of tokenOut). */
|
|
149
|
+
userMinOut?: bigint | string;
|
|
150
|
+
/** Protocol version for this call (default: the client's, itself 'latest'). */
|
|
151
|
+
version?: string;
|
|
152
|
+
/** Pin the read to a block (reproducibility / verification of past fills). */
|
|
153
|
+
blockNumber?: bigint;
|
|
154
|
+
}
|
|
155
|
+
interface Quote {
|
|
119
156
|
chainId: number;
|
|
157
|
+
version: string;
|
|
158
|
+
quoter: Address;
|
|
159
|
+
router: Address;
|
|
160
|
+
/** Where the contract set came from: embedded pin, remote registry, or your override. */
|
|
161
|
+
deploymentSource: 'embedded' | 'remote' | 'override';
|
|
162
|
+
/** As the Router sees them (native ETH already mapped to WETH). */
|
|
120
163
|
tokenIn: Address;
|
|
121
164
|
tokenOut: Address;
|
|
122
|
-
amountIn:
|
|
123
|
-
/**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
resolved?: Record<string, {
|
|
136
|
-
symbol: string;
|
|
137
|
-
address: Address;
|
|
138
|
-
name?: string;
|
|
139
|
-
liquidityUsd: number;
|
|
140
|
-
}>;
|
|
141
|
-
resolvedNote?: string;
|
|
142
|
-
executeWith?: {
|
|
143
|
-
router: Address;
|
|
144
|
-
function: string;
|
|
145
|
-
note: string;
|
|
146
|
-
};
|
|
147
|
-
meta: {
|
|
148
|
-
quotedAt: number;
|
|
149
|
-
latencyMs: number;
|
|
150
|
-
rpcTried: number;
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
interface ApiErrorBody {
|
|
154
|
-
ok: false;
|
|
155
|
-
code: string;
|
|
156
|
-
error: string;
|
|
157
|
-
chainId?: number;
|
|
165
|
+
amountIn: bigint;
|
|
166
|
+
/** Caller asked with ETH in: 2.x routes it via swapExactInNative (no pre-wrap). */
|
|
167
|
+
nativeIn: boolean;
|
|
168
|
+
/** Caller asked for ETH out: the Router delivers WETH — unwrap is yours. */
|
|
169
|
+
nativeOut: boolean;
|
|
170
|
+
/** Net output after the protocol fee and safety buffer (= preview.netOut). */
|
|
171
|
+
amountOut: bigint;
|
|
172
|
+
preview: Preview;
|
|
173
|
+
route: Route;
|
|
174
|
+
fallbackRoute?: Route;
|
|
175
|
+
checks: QuoteChecks;
|
|
176
|
+
blockNumber?: bigint;
|
|
177
|
+
quotedAt: number;
|
|
158
178
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
interface ExactQuote {
|
|
180
|
+
chainId: number;
|
|
181
|
+
version: string;
|
|
182
|
+
tokenIn: Address;
|
|
183
|
+
tokenOut: Address;
|
|
184
|
+
amountIn: bigint;
|
|
185
|
+
/** Execution-grade NET output (every concentrated leg dry-run on the pool). */
|
|
186
|
+
exactOut: bigint;
|
|
187
|
+
route: Route;
|
|
188
|
+
quotedAt: number;
|
|
164
189
|
}
|
|
165
|
-
interface
|
|
190
|
+
interface TxRequest {
|
|
166
191
|
chainId: number;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
contracts: {
|
|
171
|
-
hub: Address;
|
|
172
|
-
solver: Address;
|
|
173
|
-
router: Address;
|
|
174
|
-
quoter: Address;
|
|
175
|
-
staking: Address;
|
|
176
|
-
};
|
|
177
|
-
weth: Address;
|
|
178
|
-
usdc: Address;
|
|
179
|
-
bzpx?: Address;
|
|
192
|
+
to: Address;
|
|
193
|
+
data: Hex;
|
|
194
|
+
value: bigint;
|
|
180
195
|
}
|
|
181
|
-
interface
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
topic0: Hex;
|
|
200
|
-
}>;
|
|
201
|
-
contact: string;
|
|
196
|
+
interface SwapRequest extends QuoteRequest {
|
|
197
|
+
/** Who receives tokenOut. */
|
|
198
|
+
recipient: Address;
|
|
199
|
+
/** The account that will send the swap — enables the allowance check and simulation. */
|
|
200
|
+
from?: Address;
|
|
201
|
+
/** Default 50 (0.5%). minOut = netOut − slippage, never below the on-chain floor. */
|
|
202
|
+
slippageBps?: number;
|
|
203
|
+
/** Seconds from now (default 120, 10–3600) — or pass an absolute `deadline`. */
|
|
204
|
+
deadlineSec?: number;
|
|
205
|
+
deadline?: bigint;
|
|
206
|
+
/**
|
|
207
|
+
* 'route' (default) — execute exactly the route the Quoter returned.
|
|
208
|
+
* 'best' — 2.x only: Router.swapBestExactIn re-solves in the same transaction
|
|
209
|
+
* (no quote-to-execution seam; costs the solve on top).
|
|
210
|
+
*/
|
|
211
|
+
mode?: 'route' | 'best';
|
|
212
|
+
/** Allowance to request when approval is needed: 'exact' (default) or 'max'. */
|
|
213
|
+
approve?: 'exact' | 'max';
|
|
202
214
|
}
|
|
203
|
-
interface
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
name: string;
|
|
211
|
-
live: boolean;
|
|
212
|
-
}[];
|
|
215
|
+
interface ApprovalStep {
|
|
216
|
+
token: Address;
|
|
217
|
+
spender: Address;
|
|
218
|
+
amount: bigint;
|
|
219
|
+
/** Current allowance, when `from` was given (undefined = not checked). */
|
|
220
|
+
current?: bigint;
|
|
221
|
+
tx: TxRequest;
|
|
213
222
|
}
|
|
214
|
-
|
|
223
|
+
interface SwapPlan {
|
|
224
|
+
quote: Quote;
|
|
225
|
+
entry: 'swapExactIn' | 'swapExactInNative' | 'swapBestExactIn';
|
|
226
|
+
/** 'quoter': the bytes are the Quoter's own previewAndEncode output (2.x),
|
|
227
|
+
* verified field-by-field against what you asked; 'sdk': encoded locally. */
|
|
228
|
+
encodedBy: 'quoter' | 'sdk';
|
|
229
|
+
tx: TxRequest;
|
|
230
|
+
recipient: Address;
|
|
231
|
+
minOut: bigint;
|
|
232
|
+
deadline: bigint;
|
|
233
|
+
slippageBps: number;
|
|
234
|
+
/** null → no approval needed (native input, or allowance already sufficient). */
|
|
235
|
+
approval: ApprovalStep | null;
|
|
236
|
+
/** tokenOut was ETH: the Router delivered WETH — `buildUnwrapTx` to finish. */
|
|
237
|
+
unwrapAfter: boolean;
|
|
238
|
+
/** Ordered transactions to send: [approval?, swap]. */
|
|
239
|
+
steps: TxRequest[];
|
|
240
|
+
}
|
|
241
|
+
interface SimulationResult {
|
|
242
|
+
ok: boolean;
|
|
243
|
+
amountOut?: bigint;
|
|
244
|
+
error?: DecodedError;
|
|
245
|
+
}
|
|
246
|
+
interface DecodedError {
|
|
247
|
+
contract: 'Router' | 'Quoter' | 'Solver' | 'Hub' | 'unknown';
|
|
248
|
+
name: string;
|
|
249
|
+
code?: number;
|
|
250
|
+
reason: string;
|
|
251
|
+
}
|
|
252
|
+
/** A decoded on-chain fill (Router `Swap`, plus the 2.x `ExecutionProof`). */
|
|
215
253
|
interface Fill {
|
|
216
254
|
txHash: Hex;
|
|
217
255
|
blockNumber: bigint;
|
|
256
|
+
logIndex: number;
|
|
218
257
|
user: Address;
|
|
219
258
|
tokenIn: Address;
|
|
220
259
|
tokenOut: Address;
|
|
221
260
|
amountIn: bigint;
|
|
222
261
|
amountOut: bigint;
|
|
223
262
|
legs: bigint;
|
|
263
|
+
proof?: {
|
|
264
|
+
quoted: bigint;
|
|
265
|
+
realized: bigint;
|
|
266
|
+
floorUsed: bigint;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
interface TokenInfo {
|
|
270
|
+
chainId: number;
|
|
271
|
+
address: Address;
|
|
272
|
+
symbol: string;
|
|
273
|
+
name: string;
|
|
274
|
+
decimals: number;
|
|
275
|
+
native: boolean;
|
|
276
|
+
}
|
|
277
|
+
interface SolvencyReport {
|
|
278
|
+
chainId: number;
|
|
279
|
+
staking: Address;
|
|
280
|
+
isSolvent: boolean;
|
|
281
|
+
backing: bigint;
|
|
282
|
+
owed: bigint;
|
|
283
|
+
surplus: bigint;
|
|
284
|
+
deficit: bigint;
|
|
285
|
+
collateralRatioWad: bigint;
|
|
286
|
+
totalStaked: bigint;
|
|
287
|
+
totalDebt: bigint;
|
|
288
|
+
rewardReserve: bigint;
|
|
289
|
+
protocolReserve: bigint;
|
|
290
|
+
pendingDistribution: bigint;
|
|
291
|
+
totalBadDebt: bigint;
|
|
292
|
+
totalUncollectedInterest: bigint;
|
|
293
|
+
blockNumber: bigint;
|
|
224
294
|
}
|
|
225
295
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
296
|
+
interface ContractSet {
|
|
297
|
+
/** BlazePhoenixCore — the deployed library the Solver/Quoter/Router link.
|
|
298
|
+
* Zero on 1.x (no separately published Core address). */
|
|
299
|
+
core: Address;
|
|
300
|
+
hub: Address;
|
|
301
|
+
solver: Address;
|
|
302
|
+
router: Address;
|
|
303
|
+
quoter: Address;
|
|
230
304
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
305
|
+
type DeploymentStatus = 'live' | 'pending' | 'deprecated';
|
|
306
|
+
interface DeploymentVersion {
|
|
307
|
+
/** Protocol semver, e.g. "2.0.0" — what the contracts' VERSION() returns (2.x). */
|
|
308
|
+
version: string;
|
|
309
|
+
status: DeploymentStatus;
|
|
310
|
+
/** BlazePhoenix-Dex revision the bytecode was built from, when known. */
|
|
311
|
+
source?: string;
|
|
312
|
+
notes?: string;
|
|
313
|
+
chains: Partial<Record<SupportedChainId, ContractSet>>;
|
|
314
|
+
}
|
|
315
|
+
interface DeploymentRegistry {
|
|
316
|
+
schema: 1;
|
|
317
|
+
updatedAt?: string;
|
|
318
|
+
versions: DeploymentVersion[];
|
|
319
|
+
}
|
|
320
|
+
/** The snapshot shipped with this SDK release. */
|
|
321
|
+
declare const EMBEDDED_DEPLOYMENTS: DeploymentRegistry;
|
|
322
|
+
declare const CONTRACT_KEYS: readonly ["core", "hub", "solver", "router", "quoter"];
|
|
323
|
+
type ContractKey = (typeof CONTRACT_KEYS)[number];
|
|
324
|
+
/** A set is executable once its Router and Quoter exist. */
|
|
325
|
+
declare function isDeployed(set: Partial<ContractSet> | undefined): set is ContractSet;
|
|
326
|
+
declare function compareVersions(a: string, b: string): number;
|
|
327
|
+
/**
|
|
328
|
+
* Version selector:
|
|
329
|
+
* 'latest' — the highest version DEPLOYED on the chain (default)
|
|
330
|
+
* '2' | '2.0' — the highest deployed 2.x / 2.0.x
|
|
331
|
+
* '2.0.0' — exactly that version
|
|
332
|
+
*/
|
|
333
|
+
type VersionSelector = 'latest' | (string & {});
|
|
334
|
+
declare function matchesSelector(version: string, selector: VersionSelector): boolean;
|
|
335
|
+
/** What a protocol version can do — the SDK adapts its calls to it. */
|
|
336
|
+
interface VersionFeatures {
|
|
337
|
+
/** Quoter.previewAndEncode[WithMinOut]: preview + ready Router calldata in one call. */
|
|
338
|
+
previewAndEncode: boolean;
|
|
339
|
+
/** Quoter.batchQuote: up to 32 previews in one eth_call. */
|
|
340
|
+
batchQuote: boolean;
|
|
341
|
+
/** Router.swapExactInNative: pay with native ETH, no pre-wrap. */
|
|
342
|
+
nativeEntry: boolean;
|
|
343
|
+
/** Router.swapBestExactIn: solve + execute in the same transaction. */
|
|
344
|
+
swapBest: boolean;
|
|
345
|
+
/** VERSION(), hub(), solver() getters used for on-chain verification. */
|
|
346
|
+
introspection: boolean;
|
|
347
|
+
/** Router emits ExecutionProof (2.x) vs Surplus (1.x). */
|
|
348
|
+
executionProof: boolean;
|
|
349
|
+
}
|
|
350
|
+
declare function featuresOf(version: string): VersionFeatures;
|
|
351
|
+
/** Strict structural validation of a registry document (remote input). */
|
|
352
|
+
declare function validateRegistry(raw: unknown): {
|
|
353
|
+
ok: true;
|
|
354
|
+
registry: DeploymentRegistry;
|
|
355
|
+
} | {
|
|
356
|
+
ok: false;
|
|
357
|
+
error: string;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
type DeploymentSource = 'embedded' | 'remote' | 'override';
|
|
361
|
+
interface ResolvedDeployment {
|
|
362
|
+
chainId: SupportedChainId;
|
|
363
|
+
version: string;
|
|
364
|
+
status: DeploymentStatus | 'custom';
|
|
365
|
+
contracts: ContractSet;
|
|
366
|
+
/** Where the router/quoter pair came from — the part you send money to. */
|
|
367
|
+
source: DeploymentSource;
|
|
368
|
+
}
|
|
369
|
+
interface ContractOverride extends Partial<ContractSet> {
|
|
370
|
+
/** Protocol version these contracts speak (selects the ABI features). */
|
|
371
|
+
version?: string;
|
|
372
|
+
}
|
|
373
|
+
type ContractOverrides = {
|
|
374
|
+
readonly [chain: string]: ContractOverride | undefined;
|
|
375
|
+
};
|
|
376
|
+
interface RegistryOptions {
|
|
377
|
+
/** 'auto' (default): embedded + the site's registry, refreshed every ttlMs.
|
|
378
|
+
* 'embedded': never touch the network — only this SDK's snapshot + overrides. */
|
|
379
|
+
mode?: 'auto' | 'embedded';
|
|
380
|
+
url?: string;
|
|
381
|
+
/** Refresh interval for the remote document (default 10 min). */
|
|
382
|
+
ttlMs?: number;
|
|
235
383
|
fetchFn?: typeof fetch;
|
|
236
|
-
/**
|
|
384
|
+
/** Fetch timeout (default 3000 ms). Only the FIRST fetch of a process can
|
|
385
|
+
* delay a call, and by at most this much; later refreshes run in the
|
|
386
|
+
* background (stale-while-revalidate). */
|
|
387
|
+
timeoutMs?: number;
|
|
388
|
+
/** Called for every pin conflict or rejected document — never silently. */
|
|
389
|
+
onWarning?: (msg: string) => void;
|
|
390
|
+
}
|
|
391
|
+
declare class Registry {
|
|
392
|
+
private doc;
|
|
393
|
+
private fieldSource;
|
|
394
|
+
private fetchedAt;
|
|
395
|
+
private lastError?;
|
|
396
|
+
private readonly mode;
|
|
397
|
+
private readonly url;
|
|
398
|
+
private readonly ttlMs;
|
|
399
|
+
private readonly fetchFn?;
|
|
400
|
+
private readonly timeoutMs;
|
|
401
|
+
private readonly warn;
|
|
402
|
+
private readonly overrides;
|
|
403
|
+
constructor(opts?: RegistryOptions, overrides?: ContractOverrides);
|
|
404
|
+
/** Before a lookup: the first time, wait for the remote document (bounded
|
|
405
|
+
* by timeoutMs); afterwards serve the current state and revalidate in the
|
|
406
|
+
* background when stale. Never throws. */
|
|
407
|
+
ready(): Promise<void>;
|
|
408
|
+
/** Fetch the remote document when stale (mode 'auto'). Never throws: a
|
|
409
|
+
* failed fetch keeps the last good state and is reported via onWarning. */
|
|
410
|
+
refresh(force?: boolean): Promise<void>;
|
|
411
|
+
/** Merge a registry document under the pinning rules. Exposed for tests and
|
|
412
|
+
* for callers who distribute the registry through their own channel. */
|
|
413
|
+
merge(raw: unknown): void;
|
|
414
|
+
/** The merged document (embedded + remote), overrides NOT applied. */
|
|
415
|
+
snapshot(): DeploymentRegistry;
|
|
416
|
+
status(): {
|
|
417
|
+
mode: 'auto' | 'embedded';
|
|
418
|
+
url: string;
|
|
419
|
+
fetchedAt: number | null;
|
|
420
|
+
lastError?: string;
|
|
421
|
+
};
|
|
422
|
+
/** Every deployed version on a chain, newest first. */
|
|
423
|
+
versionsOn(chainId: SupportedChainId): string[];
|
|
424
|
+
resolve(chainId: SupportedChainId, selector?: VersionSelector): ResolvedDeployment;
|
|
425
|
+
private latestKnownVersion;
|
|
426
|
+
/** chains × versions table (for dashboards, the MCP, debugging). */
|
|
427
|
+
table(): {
|
|
428
|
+
chainId: SupportedChainId;
|
|
429
|
+
version: string;
|
|
430
|
+
status: string;
|
|
431
|
+
contracts: ContractSet;
|
|
432
|
+
source: DeploymentSource;
|
|
433
|
+
}[];
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/** Anything with an EIP-1193 `request` — a wallet provider, a hardware bridge… */
|
|
437
|
+
interface Eip1193Like {
|
|
438
|
+
request: (args: {
|
|
439
|
+
method: string;
|
|
440
|
+
params?: unknown;
|
|
441
|
+
}) => Promise<unknown>;
|
|
442
|
+
}
|
|
443
|
+
type RpcSource = string | readonly string[] | Eip1193Like | Transport;
|
|
444
|
+
type RpcConfig = RpcSource | {
|
|
445
|
+
readonly [chain: string]: RpcSource | undefined;
|
|
446
|
+
};
|
|
447
|
+
interface TransportOptions {
|
|
448
|
+
/** Per-request timeout in ms (default 10000). */
|
|
237
449
|
timeoutMs?: number;
|
|
238
|
-
/**
|
|
239
|
-
* the server's retry-after. Default 2. Set 0 to disable. */
|
|
450
|
+
/** Retries per endpoint on transient failures (default 2). */
|
|
240
451
|
retries?: number;
|
|
241
|
-
/**
|
|
242
|
-
|
|
243
|
-
|
|
452
|
+
/** JSON-RPC batching on http endpoints (default false — not every provider supports it). */
|
|
453
|
+
batch?: boolean;
|
|
454
|
+
}
|
|
455
|
+
/** A URL we are willing to talk to: https/wss anywhere, http/ws only on a
|
|
456
|
+
* local node (your own anvil / geth on localhost). Never javascript:, data:… */
|
|
457
|
+
declare function isAllowedRpcUrl(url: string): boolean;
|
|
458
|
+
/** Keys live in RPC URLs (…/v2/KEY). Never print them. */
|
|
459
|
+
declare function redact(url: string): string;
|
|
460
|
+
declare function transportFrom(src: RpcSource, opts?: TransportOptions): Transport;
|
|
461
|
+
/** Resolves chain → PublicClient over the user's configured RPC, verifying the
|
|
462
|
+
* node's chain id once per source. */
|
|
463
|
+
declare class RpcRouter {
|
|
464
|
+
private readonly perChain;
|
|
465
|
+
private readonly single?;
|
|
466
|
+
private readonly opts;
|
|
467
|
+
constructor(config: RpcConfig | undefined, opts?: TransportOptions);
|
|
468
|
+
/** Chains with an explicitly configured RPC (a single source reports none). */
|
|
469
|
+
configuredChains(): SupportedChainId[];
|
|
470
|
+
hasAny(): boolean;
|
|
471
|
+
/** The chain to use when a request names none: the only configured one. */
|
|
472
|
+
defaultChain(): Promise<SupportedChainId>;
|
|
473
|
+
private slotFor;
|
|
474
|
+
private clientOf;
|
|
475
|
+
private verify;
|
|
476
|
+
/** A PublicClient for `chain`, over YOUR node, after checking it really is that chain. */
|
|
477
|
+
client(chain: SupportedChainId | number | string): Promise<PublicClient>;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Read RPC configuration from environment variables (Node, Workers, CI):
|
|
481
|
+
*
|
|
482
|
+
* BLAZEPHOENIX_RPC_BASE / _ETHEREUM / _OPTIMISM / _ARBITRUM / _ROBINHOOD
|
|
483
|
+
* BLAZEPHOENIX_RPC_8453 (by id works too)
|
|
484
|
+
* BLAZEPHOENIX_RPC_URL — a single node (answers for the chain it reports)
|
|
485
|
+
*
|
|
486
|
+
* Each value may hold several URLs separated by commas (your fallback order).
|
|
487
|
+
*/
|
|
488
|
+
declare function rpcFromEnv(env?: Record<string, string | undefined>): RpcConfig | undefined;
|
|
489
|
+
|
|
490
|
+
interface ClientOptions extends TransportOptions {
|
|
244
491
|
/**
|
|
245
|
-
* YOUR
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* automation carries its own read volume, which is what keeps the free path
|
|
250
|
-
* viable for callers who cannot bring a node. Your node is tried first and
|
|
251
|
-
* ours remain the fallback, so this can only improve reliability. If you are
|
|
252
|
-
* running a bot, this is the single most considerate line you can add.
|
|
492
|
+
* YOUR RPC — required for anything on-chain. A URL, a list of URLs (your
|
|
493
|
+
* fallback order), an EIP-1193 provider (the user's wallet), a viem
|
|
494
|
+
* Transport, or a per-chain map of any of those. When omitted, the
|
|
495
|
+
* BLAZEPHOENIX_RPC_* environment variables are read (see rpcFromEnv).
|
|
253
496
|
*/
|
|
254
|
-
rpc?:
|
|
497
|
+
rpc?: RpcConfig;
|
|
498
|
+
/** Protocol version to use: 'latest' (default, per chain), '1', '2', '2.0.0'… */
|
|
499
|
+
version?: VersionSelector;
|
|
500
|
+
/** Your own contract addresses per chain — always win over the registry. */
|
|
501
|
+
contracts?: ContractOverrides;
|
|
502
|
+
/** Deployment registry behaviour (remote refresh on/off, URL, TTL, warnings). */
|
|
503
|
+
registry?: RegistryOptions;
|
|
504
|
+
/** Cross-check remote-sourced deployments on your RPC before first use (default true). */
|
|
505
|
+
verifyRemoteDeployments?: boolean;
|
|
506
|
+
/** Micro-cache for identical PREVIEW quotes, in ms (default 1000; 0 disables).
|
|
507
|
+
* Never applied to buildSwap — execution data is always fresh. */
|
|
508
|
+
cacheTtlMs?: number;
|
|
509
|
+
/** Default slippage for buildSwap in bps (default 50 = 0.5%). */
|
|
510
|
+
slippageBps?: number;
|
|
511
|
+
/** Default deadline horizon for buildSwap in seconds (default 120). */
|
|
512
|
+
deadlineSec?: number;
|
|
513
|
+
/** Max chunk for 2.x on-chain batchQuote (default 8; nodes cap eth_call gas). */
|
|
514
|
+
batchChunk?: number;
|
|
515
|
+
}
|
|
516
|
+
type BatchItem = {
|
|
517
|
+
ok: true;
|
|
518
|
+
quote: Quote;
|
|
519
|
+
} | {
|
|
520
|
+
ok: false;
|
|
521
|
+
error: {
|
|
522
|
+
code: string;
|
|
523
|
+
message: string;
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
interface ExecuteOptions {
|
|
527
|
+
/** A viem WalletClient with an account (local key, injected wallet, …). */
|
|
528
|
+
wallet: WalletClient;
|
|
529
|
+
/** A plan from buildSwap — or pass `request` and the plan is built now. */
|
|
530
|
+
plan?: SwapPlan;
|
|
531
|
+
request?: SwapRequest;
|
|
532
|
+
/** Rebuild the plan when it is older than this (default 30s). */
|
|
533
|
+
maxQuoteAgeMs?: number;
|
|
534
|
+
/** eth_call the swap from your account before sending (default true). */
|
|
535
|
+
simulate?: boolean;
|
|
536
|
+
/** Wait for receipts (default true). */
|
|
537
|
+
wait?: boolean;
|
|
538
|
+
}
|
|
539
|
+
interface ExecuteResult {
|
|
540
|
+
plan: SwapPlan;
|
|
541
|
+
approvalHash?: Hex;
|
|
542
|
+
hash: Hex;
|
|
543
|
+
status?: 'success' | 'reverted';
|
|
544
|
+
/** Realised output read from the Router's Swap event (when waited). */
|
|
545
|
+
amountOut?: bigint;
|
|
546
|
+
blockNumber?: bigint;
|
|
547
|
+
}
|
|
548
|
+
interface DeploymentCheck {
|
|
549
|
+
name: string;
|
|
550
|
+
ok: boolean;
|
|
551
|
+
detail: string;
|
|
552
|
+
}
|
|
553
|
+
interface DeploymentReport {
|
|
554
|
+
ok: boolean;
|
|
555
|
+
chainId: number;
|
|
556
|
+
version: string;
|
|
557
|
+
source: string;
|
|
558
|
+
contracts: ResolvedDeployment['contracts'];
|
|
559
|
+
checks: DeploymentCheck[];
|
|
255
560
|
}
|
|
256
561
|
declare class BlazePhoenix {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
private readonly
|
|
260
|
-
private readonly
|
|
562
|
+
readonly registry: Registry;
|
|
563
|
+
readonly rpc: RpcRouter;
|
|
564
|
+
private readonly version;
|
|
565
|
+
private readonly verifyRemote;
|
|
261
566
|
private readonly cacheTtlMs;
|
|
262
|
-
|
|
263
|
-
private readonly
|
|
567
|
+
private readonly slippageBps;
|
|
568
|
+
private readonly deadlineSec;
|
|
569
|
+
private readonly batchChunk;
|
|
570
|
+
private readonly verified;
|
|
571
|
+
private readonly decimals;
|
|
264
572
|
constructor(opts?: ClientOptions);
|
|
265
|
-
|
|
266
|
-
private
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
573
|
+
private ctx;
|
|
574
|
+
private ensureVerified;
|
|
575
|
+
/** Cross-check a deployment on YOUR RPC: code at every address and, on 2.x,
|
|
576
|
+
* VERSION() and the Hub/Solver wiring of the Quoter, Router and Solver. */
|
|
577
|
+
verifyDeployment(req?: {
|
|
578
|
+
chain?: string | number;
|
|
579
|
+
version?: string;
|
|
580
|
+
}): Promise<DeploymentReport>;
|
|
581
|
+
private checkDeployment;
|
|
582
|
+
private resolveToken;
|
|
583
|
+
private decimalsOf;
|
|
584
|
+
private amountOf;
|
|
585
|
+
private pair;
|
|
586
|
+
private wrapReadError;
|
|
587
|
+
private buildQuote;
|
|
588
|
+
private readPreview;
|
|
589
|
+
/** The Quoter's preview, read on your RPC. Throws BlazeError('no_route') when
|
|
590
|
+
* the Solver finds no executable path. */
|
|
591
|
+
quote(req: QuoteRequest): Promise<Quote>;
|
|
592
|
+
/** Execution-grade re-quote (previewPlanExact): every concentrated leg is
|
|
593
|
+
* dry-run on the pool itself. Slower; derive a tight userMinOut from it. */
|
|
594
|
+
quoteExact(req: QuoteRequest): Promise<ExactQuote>;
|
|
595
|
+
/** Many quotes. 2.x deployments answer in chunks of on-chain batchQuote
|
|
596
|
+
* (one eth_call per chunk); anything else, or a failed chunk, falls back
|
|
597
|
+
* to individual previews. Per-item failures come back inline. */
|
|
598
|
+
quoteBatch(reqs: QuoteRequest[]): Promise<BatchItem[]>;
|
|
599
|
+
/**
|
|
600
|
+
* Quote and prepare the swap transaction(s): the exact calldata to send, the
|
|
601
|
+
* minimum it enforces, and the approval step when one is needed. Nothing is
|
|
602
|
+
* signed or sent — `execute` does that with YOUR wallet.
|
|
603
|
+
*/
|
|
604
|
+
buildSwap(req: SwapRequest): Promise<SwapPlan>;
|
|
605
|
+
/** eth_call the swap from `from` on your RPC: the realised amountOut if it
|
|
606
|
+
* would settle now, or the decoded reason it would revert. */
|
|
607
|
+
simulate(plan: SwapPlan, from: Address): Promise<SimulationResult>;
|
|
608
|
+
/**
|
|
609
|
+
* Execute with YOUR wallet: approve when needed (exact amount by default),
|
|
610
|
+
* simulate, send the swap, and read the realised output from the receipt.
|
|
611
|
+
* The SDK never holds or asks for a key — the WalletClient signs.
|
|
612
|
+
*/
|
|
613
|
+
execute(opts: ExecuteOptions): Promise<ExecuteResult>;
|
|
614
|
+
/** symbol / name / decimals, read on your RPC. */
|
|
615
|
+
tokenInfo(chain: string | number | undefined, token: string): Promise<TokenInfo>;
|
|
616
|
+
/** The staking engine's live proof-of-solvency (Base), read on your RPC. */
|
|
617
|
+
solvency(chain?: string | number): Promise<SolvencyReport>;
|
|
618
|
+
/** Router fills over a block range (Swap events; 2.x adds ExecutionProof).
|
|
619
|
+
* The range is read in chunks (`chunkBlocks`, default 2000) because most
|
|
620
|
+
* providers cap eth_getLogs ranges — especially on free tiers. */
|
|
621
|
+
getFills(opts: {
|
|
622
|
+
chain?: string | number;
|
|
623
|
+
version?: string;
|
|
624
|
+
fromBlock?: bigint;
|
|
625
|
+
toBlock?: bigint;
|
|
626
|
+
lookbackBlocks?: bigint;
|
|
627
|
+
chunkBlocks?: bigint;
|
|
628
|
+
}): Promise<Fill[]>;
|
|
629
|
+
/** Stream fills as they land (polling your RPC). Returns an unwatch function. */
|
|
630
|
+
watchFills(opts: {
|
|
631
|
+
chain?: string | number;
|
|
632
|
+
version?: string;
|
|
633
|
+
pollMs?: number;
|
|
634
|
+
onFill: (f: Fill) => void;
|
|
635
|
+
onError?: (e: unknown) => void;
|
|
636
|
+
}): Promise<() => void>;
|
|
637
|
+
/** The chains × versions table this client sees (embedded + registry + overrides). */
|
|
638
|
+
deployments(): Promise<{
|
|
639
|
+
registry: {
|
|
640
|
+
mode: "auto" | "embedded";
|
|
641
|
+
url: string;
|
|
642
|
+
fetchedAt: number | null;
|
|
643
|
+
lastError?: string;
|
|
644
|
+
};
|
|
645
|
+
rows: {
|
|
646
|
+
chainId: SupportedChainId;
|
|
647
|
+
version: string;
|
|
648
|
+
status: string;
|
|
649
|
+
contracts: ContractSet;
|
|
650
|
+
source: DeploymentSource;
|
|
651
|
+
}[];
|
|
652
|
+
}>;
|
|
653
|
+
/** Which deployment a request would use right now (no RPC). */
|
|
654
|
+
resolveDeployment(req: {
|
|
655
|
+
chain: string | number;
|
|
656
|
+
version?: string;
|
|
657
|
+
}): Promise<ResolvedDeployment & {
|
|
658
|
+
features: VersionFeatures;
|
|
659
|
+
}>;
|
|
288
660
|
}
|
|
289
|
-
/** Poll a pair and get called back with each fresh quote — the heartbeat of a
|
|
290
|
-
* price bot in one line. Overlap-safe (a slow tick is skipped, not stacked).
|
|
291
|
-
* Returns a stop function. */
|
|
292
|
-
declare function pollQuote(client: BlazePhoenix, req: QuoteRequest, onQuote: (q: QuoteResponse) => void, opts?: PollOptions): () => void;
|
|
293
|
-
/** The ready-to-broadcast transaction from a quote (requires `recipient` in the
|
|
294
|
-
* request and an ERC-20 input). Throws with a precise reason otherwise. */
|
|
295
|
-
declare function buildSwapTx(q: QuoteResponse): QuoteTx;
|
|
296
661
|
interface DeepLinkOptions {
|
|
297
662
|
chain?: number | string;
|
|
298
663
|
tokenIn?: string;
|
|
@@ -302,82 +667,2837 @@ interface DeepLinkOptions {
|
|
|
302
667
|
tab?: 'home' | 'swap' | 'staking' | 'airdrop' | 'api';
|
|
303
668
|
baseUrl?: string;
|
|
304
669
|
}
|
|
305
|
-
/** A
|
|
670
|
+
/** A link that opens the site pre-filled — bot buttons, referral posts. */
|
|
306
671
|
declare function deepLink(opts?: DeepLinkOptions): string;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
/** Extra attempts after the first (default 2). */
|
|
312
|
-
retries?: number;
|
|
313
|
-
/** Base backoff in ms; grows ×3 per attempt with jitter (default 250). */
|
|
314
|
-
backoffMs?: number;
|
|
315
|
-
timeoutMs?: number;
|
|
316
|
-
}
|
|
317
|
-
/** fetch with timeout + polite retries. Returns the final Response (which may
|
|
318
|
-
* still be an error status — non-transient statuses are never retried). */
|
|
319
|
-
declare function resilientFetch(fetchFn: typeof fetch, url: string, init: RequestInit | undefined, opts?: RetryOptions): Promise<Response>;
|
|
320
|
-
|
|
321
|
-
declare const API_BASE = "https://blazephoenix.xyz";
|
|
322
|
-
type SupportedChainId = 1 | 8453 | 10 | 42161 | 4663;
|
|
323
|
-
interface ChainInfo {
|
|
324
|
-
chainId: SupportedChainId;
|
|
325
|
-
name: string;
|
|
326
|
-
explorer: string;
|
|
327
|
-
weth: `0x${string}`;
|
|
328
|
-
usdc: `0x${string}`;
|
|
329
|
-
bzpx?: `0x${string}`;
|
|
330
|
-
contracts: {
|
|
331
|
-
hub: `0x${string}`;
|
|
332
|
-
solver: `0x${string}`;
|
|
333
|
-
router: `0x${string}`;
|
|
334
|
-
quoter: `0x${string}`;
|
|
335
|
-
};
|
|
672
|
+
interface PollOptions {
|
|
673
|
+
/** Tick interval in ms (min 500, default 4000). */
|
|
674
|
+
intervalMs?: number;
|
|
675
|
+
onError?: (e: unknown) => void;
|
|
336
676
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
declare function resolveChain(chain: number | string): SupportedChainId;
|
|
340
|
-
/** Public, KEYLESS RPC endpoints per chain — community infrastructure, no
|
|
341
|
-
* providers, no keys (enforced by tests). They make the on-chain module work
|
|
342
|
-
* with ZERO configuration; production integrations should still bring their
|
|
343
|
-
* own `rpcUrl` for guaranteed throughput. */
|
|
344
|
-
declare const PUBLIC_RPCS: Record<SupportedChainId, string[]>;
|
|
345
|
-
/** Protocol fee (bps) applied to quoted output; execution surplus is fee-exempt. */
|
|
346
|
-
declare const FEE_BPS = 28;
|
|
347
|
-
/** Router event topic0 hashes (one `Swap` per fill — index everything with them).
|
|
348
|
-
* Verified against the ABIs by `npm test` (viem toEventSelector). */
|
|
349
|
-
declare const SWAP_TOPIC0: "0xd6d34547c69c5ee3d2667625c188acf1006abb93e0ee7cf03925c67cf7760413";
|
|
350
|
-
declare const SURPLUS_TOPIC0: "0x1a3afef0f067eb51a6bfec6ab3625a4408dd8c3571b72836483e68feb70d1026";
|
|
677
|
+
/** Poll a pair on your RPC; overlap-safe (a slow tick is skipped, not stacked). */
|
|
678
|
+
declare function pollQuote(client: BlazePhoenix, req: QuoteRequest, onQuote: (q: Quote) => void, opts?: PollOptions): () => void;
|
|
351
679
|
|
|
352
|
-
declare const
|
|
353
|
-
readonly type: "function";
|
|
354
|
-
readonly name: "previewPlan";
|
|
355
|
-
readonly stateMutability: "view";
|
|
680
|
+
declare const CORE_ABI: readonly [{
|
|
356
681
|
readonly inputs: readonly [{
|
|
357
|
-
readonly name: "
|
|
682
|
+
readonly name: "factory";
|
|
358
683
|
readonly type: "address";
|
|
359
684
|
}, {
|
|
360
|
-
readonly name: "
|
|
685
|
+
readonly name: "tA";
|
|
686
|
+
readonly type: "address";
|
|
687
|
+
}, {
|
|
688
|
+
readonly name: "tB";
|
|
689
|
+
readonly type: "address";
|
|
690
|
+
}, {
|
|
691
|
+
readonly name: "fee";
|
|
692
|
+
readonly type: "uint24";
|
|
693
|
+
}, {
|
|
694
|
+
readonly name: "stable";
|
|
695
|
+
readonly type: "bool";
|
|
696
|
+
}, {
|
|
697
|
+
readonly name: "tickSpacing";
|
|
698
|
+
readonly type: "int24";
|
|
699
|
+
}, {
|
|
700
|
+
readonly name: "mode";
|
|
701
|
+
readonly type: "uint8";
|
|
702
|
+
}, {
|
|
703
|
+
readonly name: "initCodeHash";
|
|
704
|
+
readonly type: "bytes32";
|
|
705
|
+
}];
|
|
706
|
+
readonly name: "deriveAddress";
|
|
707
|
+
readonly outputs: readonly [{
|
|
708
|
+
readonly name: "pool";
|
|
361
709
|
readonly type: "address";
|
|
710
|
+
}];
|
|
711
|
+
readonly stateMutability: "view";
|
|
712
|
+
readonly type: "function";
|
|
713
|
+
}, {
|
|
714
|
+
readonly inputs: readonly [{
|
|
715
|
+
readonly name: "amountIn";
|
|
716
|
+
readonly type: "uint256";
|
|
717
|
+
}, {
|
|
718
|
+
readonly name: "sqrtP";
|
|
719
|
+
readonly type: "uint160";
|
|
720
|
+
}, {
|
|
721
|
+
readonly name: "liq";
|
|
722
|
+
readonly type: "uint128";
|
|
723
|
+
}, {
|
|
724
|
+
readonly name: "feePpm";
|
|
725
|
+
readonly type: "uint24";
|
|
726
|
+
}, {
|
|
727
|
+
readonly name: "zeroForOne";
|
|
728
|
+
readonly type: "bool";
|
|
729
|
+
}];
|
|
730
|
+
readonly name: "impactV3Bps";
|
|
731
|
+
readonly outputs: readonly [{
|
|
732
|
+
readonly name: "";
|
|
733
|
+
readonly type: "uint256";
|
|
734
|
+
}];
|
|
735
|
+
readonly stateMutability: "pure";
|
|
736
|
+
readonly type: "function";
|
|
737
|
+
}, {
|
|
738
|
+
readonly inputs: readonly [{
|
|
739
|
+
readonly name: "out";
|
|
740
|
+
readonly type: "uint256";
|
|
362
741
|
}, {
|
|
363
742
|
readonly name: "amountIn";
|
|
364
743
|
readonly type: "uint256";
|
|
744
|
+
}, {
|
|
745
|
+
readonly name: "sqrtP";
|
|
746
|
+
readonly type: "uint160";
|
|
747
|
+
}, {
|
|
748
|
+
readonly name: "zeroForOne";
|
|
749
|
+
readonly type: "bool";
|
|
750
|
+
}];
|
|
751
|
+
readonly name: "impactV3FromOut";
|
|
752
|
+
readonly outputs: readonly [{
|
|
753
|
+
readonly name: "";
|
|
754
|
+
readonly type: "uint256";
|
|
755
|
+
}];
|
|
756
|
+
readonly stateMutability: "pure";
|
|
757
|
+
readonly type: "function";
|
|
758
|
+
}, {
|
|
759
|
+
readonly inputs: readonly [{
|
|
760
|
+
readonly name: "ain";
|
|
761
|
+
readonly type: "uint256";
|
|
762
|
+
}, {
|
|
763
|
+
readonly name: "rIn";
|
|
764
|
+
readonly type: "uint256";
|
|
765
|
+
}, {
|
|
766
|
+
readonly name: "rOut";
|
|
767
|
+
readonly type: "uint256";
|
|
768
|
+
}, {
|
|
769
|
+
readonly name: "fee";
|
|
770
|
+
readonly type: "uint256";
|
|
771
|
+
}, {
|
|
772
|
+
readonly name: "stable";
|
|
773
|
+
readonly type: "bool";
|
|
774
|
+
}];
|
|
775
|
+
readonly name: "outSolidly";
|
|
776
|
+
readonly outputs: readonly [{
|
|
777
|
+
readonly name: "";
|
|
778
|
+
readonly type: "uint256";
|
|
779
|
+
}];
|
|
780
|
+
readonly stateMutability: "pure";
|
|
781
|
+
readonly type: "function";
|
|
782
|
+
}, {
|
|
783
|
+
readonly inputs: readonly [{
|
|
784
|
+
readonly name: "pool";
|
|
785
|
+
readonly type: "address";
|
|
786
|
+
}, {
|
|
787
|
+
readonly name: "kind";
|
|
788
|
+
readonly type: "uint8";
|
|
789
|
+
}];
|
|
790
|
+
readonly name: "provenShape";
|
|
791
|
+
readonly outputs: readonly [{
|
|
792
|
+
readonly name: "ok";
|
|
793
|
+
readonly type: "bool";
|
|
794
|
+
}, {
|
|
795
|
+
readonly name: "k";
|
|
796
|
+
readonly type: "uint8";
|
|
797
|
+
}, {
|
|
798
|
+
readonly name: "fee";
|
|
799
|
+
readonly type: "uint24";
|
|
800
|
+
}];
|
|
801
|
+
readonly stateMutability: "view";
|
|
802
|
+
readonly type: "function";
|
|
803
|
+
}, {
|
|
804
|
+
readonly inputs: readonly [{
|
|
805
|
+
readonly name: "pool";
|
|
806
|
+
readonly type: "address";
|
|
807
|
+
}, {
|
|
808
|
+
readonly name: "stable";
|
|
809
|
+
readonly type: "bool";
|
|
810
|
+
}, {
|
|
811
|
+
readonly name: "cfgFee";
|
|
812
|
+
readonly type: "uint256";
|
|
813
|
+
}];
|
|
814
|
+
readonly name: "readDynamicFee";
|
|
815
|
+
readonly outputs: readonly [{
|
|
816
|
+
readonly name: "fee";
|
|
817
|
+
readonly type: "uint256";
|
|
818
|
+
}];
|
|
819
|
+
readonly stateMutability: "view";
|
|
820
|
+
readonly type: "function";
|
|
821
|
+
}, {
|
|
822
|
+
readonly inputs: readonly [{
|
|
823
|
+
readonly name: "pool";
|
|
824
|
+
readonly type: "address";
|
|
825
|
+
}, {
|
|
826
|
+
readonly name: "kind";
|
|
827
|
+
readonly type: "uint8";
|
|
828
|
+
}, {
|
|
829
|
+
readonly name: "t0";
|
|
830
|
+
readonly type: "address";
|
|
831
|
+
}, {
|
|
832
|
+
readonly name: "t1";
|
|
833
|
+
readonly type: "address";
|
|
834
|
+
}, {
|
|
835
|
+
readonly name: "v4mgr";
|
|
836
|
+
readonly type: "address";
|
|
837
|
+
}, {
|
|
838
|
+
readonly name: "pid";
|
|
839
|
+
readonly type: "bytes32";
|
|
840
|
+
}];
|
|
841
|
+
readonly name: "registryDepth18";
|
|
842
|
+
readonly outputs: readonly [{
|
|
843
|
+
readonly name: "depth";
|
|
844
|
+
readonly type: "uint256";
|
|
845
|
+
}];
|
|
846
|
+
readonly stateMutability: "view";
|
|
847
|
+
readonly type: "function";
|
|
848
|
+
}, {
|
|
849
|
+
readonly inputs: readonly [{
|
|
850
|
+
readonly name: "pool";
|
|
851
|
+
readonly type: "address";
|
|
852
|
+
}, {
|
|
853
|
+
readonly name: "amountIn";
|
|
854
|
+
readonly type: "uint256";
|
|
855
|
+
}, {
|
|
856
|
+
readonly name: "tokenIn";
|
|
857
|
+
readonly type: "address";
|
|
858
|
+
}, {
|
|
859
|
+
readonly name: "zeroForOne";
|
|
860
|
+
readonly type: "bool";
|
|
861
|
+
}, {
|
|
862
|
+
readonly name: "stable";
|
|
863
|
+
readonly type: "bool";
|
|
864
|
+
}, {
|
|
865
|
+
readonly name: "cfgFee";
|
|
866
|
+
readonly type: "uint256";
|
|
867
|
+
}];
|
|
868
|
+
readonly name: "solidlyAskOut";
|
|
869
|
+
readonly outputs: readonly [{
|
|
870
|
+
readonly name: "out";
|
|
871
|
+
readonly type: "uint256";
|
|
872
|
+
}];
|
|
873
|
+
readonly stateMutability: "view";
|
|
874
|
+
readonly type: "function";
|
|
875
|
+
}, {
|
|
876
|
+
readonly inputs: readonly [{
|
|
877
|
+
readonly name: "pool";
|
|
878
|
+
readonly type: "address";
|
|
879
|
+
}, {
|
|
880
|
+
readonly name: "ain";
|
|
881
|
+
readonly type: "uint256";
|
|
882
|
+
}, {
|
|
883
|
+
readonly name: "rIn";
|
|
884
|
+
readonly type: "uint256";
|
|
885
|
+
}, {
|
|
886
|
+
readonly name: "rOut";
|
|
887
|
+
readonly type: "uint256";
|
|
888
|
+
}, {
|
|
889
|
+
readonly name: "stable";
|
|
890
|
+
readonly type: "bool";
|
|
891
|
+
}, {
|
|
892
|
+
readonly name: "cfgFee";
|
|
893
|
+
readonly type: "uint256";
|
|
894
|
+
}, {
|
|
895
|
+
readonly name: "tokenIn";
|
|
896
|
+
readonly type: "address";
|
|
897
|
+
}];
|
|
898
|
+
readonly name: "solidlyCurveOut";
|
|
899
|
+
readonly outputs: readonly [{
|
|
900
|
+
readonly name: "";
|
|
901
|
+
readonly type: "uint256";
|
|
902
|
+
}];
|
|
903
|
+
readonly stateMutability: "view";
|
|
904
|
+
readonly type: "function";
|
|
905
|
+
}, {
|
|
906
|
+
readonly inputs: readonly [{
|
|
907
|
+
readonly name: "pool";
|
|
908
|
+
readonly type: "address";
|
|
909
|
+
}, {
|
|
910
|
+
readonly name: "amountIn";
|
|
911
|
+
readonly type: "uint256";
|
|
912
|
+
}, {
|
|
913
|
+
readonly name: "tokenIn";
|
|
914
|
+
readonly type: "address";
|
|
915
|
+
}];
|
|
916
|
+
readonly name: "solidlyGetAmountOut";
|
|
917
|
+
readonly outputs: readonly [{
|
|
918
|
+
readonly name: "out";
|
|
919
|
+
readonly type: "uint256";
|
|
920
|
+
}];
|
|
921
|
+
readonly stateMutability: "view";
|
|
922
|
+
readonly type: "function";
|
|
923
|
+
}, {
|
|
924
|
+
readonly inputs: readonly [{
|
|
925
|
+
readonly components: readonly [{
|
|
926
|
+
readonly name: "kind";
|
|
927
|
+
readonly type: "uint8";
|
|
928
|
+
}, {
|
|
929
|
+
readonly name: "pool";
|
|
930
|
+
readonly type: "address";
|
|
931
|
+
}, {
|
|
932
|
+
readonly name: "zeroForOne";
|
|
933
|
+
readonly type: "bool";
|
|
934
|
+
}, {
|
|
935
|
+
readonly name: "fee";
|
|
936
|
+
readonly type: "uint24";
|
|
937
|
+
}, {
|
|
938
|
+
readonly name: "tickSpacing";
|
|
939
|
+
readonly type: "int24";
|
|
940
|
+
}, {
|
|
941
|
+
readonly name: "stable";
|
|
942
|
+
readonly type: "bool";
|
|
943
|
+
}, {
|
|
944
|
+
readonly name: "tokenIn";
|
|
945
|
+
readonly type: "address";
|
|
946
|
+
}, {
|
|
947
|
+
readonly name: "tokenOther";
|
|
948
|
+
readonly type: "address";
|
|
949
|
+
}, {
|
|
950
|
+
readonly name: "hooks";
|
|
951
|
+
readonly type: "address";
|
|
952
|
+
}, {
|
|
953
|
+
readonly name: "v4Manager";
|
|
954
|
+
readonly type: "address";
|
|
955
|
+
}, {
|
|
956
|
+
readonly name: "decIn1";
|
|
957
|
+
readonly type: "uint8";
|
|
958
|
+
}, {
|
|
959
|
+
readonly name: "decOther1";
|
|
960
|
+
readonly type: "uint8";
|
|
961
|
+
}];
|
|
962
|
+
readonly name: "c";
|
|
963
|
+
readonly type: "tuple";
|
|
964
|
+
}, {
|
|
965
|
+
readonly name: "amountIn";
|
|
966
|
+
readonly type: "uint256";
|
|
967
|
+
}];
|
|
968
|
+
readonly name: "universalQuote";
|
|
969
|
+
readonly outputs: readonly [{
|
|
970
|
+
readonly name: "out";
|
|
971
|
+
readonly type: "uint256";
|
|
972
|
+
}, {
|
|
973
|
+
readonly name: "depthWad";
|
|
974
|
+
readonly type: "uint256";
|
|
975
|
+
}];
|
|
976
|
+
readonly stateMutability: "view";
|
|
977
|
+
readonly type: "function";
|
|
978
|
+
}, {
|
|
979
|
+
readonly inputs: readonly [{
|
|
980
|
+
readonly name: "manager";
|
|
981
|
+
readonly type: "address";
|
|
982
|
+
}, {
|
|
983
|
+
readonly name: "poolId";
|
|
984
|
+
readonly type: "bytes32";
|
|
985
|
+
}, {
|
|
986
|
+
readonly name: "amountIn";
|
|
987
|
+
readonly type: "uint256";
|
|
988
|
+
}, {
|
|
989
|
+
readonly name: "keyFee";
|
|
990
|
+
readonly type: "uint24";
|
|
991
|
+
}, {
|
|
992
|
+
readonly name: "tickSpacing";
|
|
993
|
+
readonly type: "int24";
|
|
994
|
+
}, {
|
|
995
|
+
readonly name: "zeroForOne";
|
|
996
|
+
readonly type: "bool";
|
|
997
|
+
}];
|
|
998
|
+
readonly name: "v4LegOut";
|
|
999
|
+
readonly outputs: readonly [{
|
|
1000
|
+
readonly name: "";
|
|
1001
|
+
readonly type: "uint256";
|
|
1002
|
+
}];
|
|
1003
|
+
readonly stateMutability: "view";
|
|
1004
|
+
readonly type: "function";
|
|
1005
|
+
}, {
|
|
1006
|
+
readonly inputs: readonly [{
|
|
1007
|
+
readonly name: "manager";
|
|
1008
|
+
readonly type: "address";
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly name: "poolId";
|
|
1011
|
+
readonly type: "bytes32";
|
|
1012
|
+
}];
|
|
1013
|
+
readonly name: "v4SqrtAndLiq";
|
|
1014
|
+
readonly outputs: readonly [{
|
|
1015
|
+
readonly name: "sqrtP";
|
|
1016
|
+
readonly type: "uint160";
|
|
1017
|
+
}, {
|
|
1018
|
+
readonly name: "liq";
|
|
1019
|
+
readonly type: "uint128";
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly name: "lpFee";
|
|
1022
|
+
readonly type: "uint24";
|
|
1023
|
+
}, {
|
|
1024
|
+
readonly name: "protoFee";
|
|
1025
|
+
readonly type: "uint24";
|
|
1026
|
+
}, {
|
|
1027
|
+
readonly name: "tick";
|
|
1028
|
+
readonly type: "int24";
|
|
1029
|
+
}];
|
|
1030
|
+
readonly stateMutability: "view";
|
|
1031
|
+
readonly type: "function";
|
|
1032
|
+
}, {
|
|
1033
|
+
readonly inputs: readonly [{
|
|
1034
|
+
readonly name: "manager";
|
|
1035
|
+
readonly type: "address";
|
|
1036
|
+
}, {
|
|
1037
|
+
readonly name: "poolId";
|
|
1038
|
+
readonly type: "bytes32";
|
|
1039
|
+
}, {
|
|
1040
|
+
readonly name: "amountIn";
|
|
1041
|
+
readonly type: "uint256";
|
|
1042
|
+
}, {
|
|
1043
|
+
readonly name: "fee";
|
|
1044
|
+
readonly type: "uint24";
|
|
1045
|
+
}, {
|
|
1046
|
+
readonly name: "tickSpacing";
|
|
1047
|
+
readonly type: "int24";
|
|
1048
|
+
}, {
|
|
1049
|
+
readonly name: "zeroForOne";
|
|
1050
|
+
readonly type: "bool";
|
|
1051
|
+
}];
|
|
1052
|
+
readonly name: "v4WalkOut";
|
|
1053
|
+
readonly outputs: readonly [{
|
|
1054
|
+
readonly name: "out";
|
|
1055
|
+
readonly type: "uint256";
|
|
1056
|
+
}];
|
|
1057
|
+
readonly stateMutability: "view";
|
|
1058
|
+
readonly type: "function";
|
|
1059
|
+
}];
|
|
1060
|
+
declare const HUB_ABI: readonly [{
|
|
1061
|
+
readonly inputs: readonly [{
|
|
1062
|
+
readonly name: "code";
|
|
1063
|
+
readonly type: "uint16";
|
|
1064
|
+
}];
|
|
1065
|
+
readonly name: "HubE";
|
|
1066
|
+
readonly type: "error";
|
|
1067
|
+
}, {
|
|
1068
|
+
readonly anonymous: false;
|
|
1069
|
+
readonly inputs: readonly [{
|
|
1070
|
+
readonly indexed: true;
|
|
1071
|
+
readonly name: "token";
|
|
1072
|
+
readonly type: "address";
|
|
1073
|
+
}, {
|
|
1074
|
+
readonly indexed: false;
|
|
1075
|
+
readonly name: "added";
|
|
1076
|
+
readonly type: "bool";
|
|
1077
|
+
}];
|
|
1078
|
+
readonly name: "Bridge_";
|
|
1079
|
+
readonly type: "event";
|
|
1080
|
+
}, {
|
|
1081
|
+
readonly anonymous: false;
|
|
1082
|
+
readonly inputs: readonly [];
|
|
1083
|
+
readonly name: "ControlRenounced";
|
|
1084
|
+
readonly type: "event";
|
|
1085
|
+
}, {
|
|
1086
|
+
readonly anonymous: false;
|
|
1087
|
+
readonly inputs: readonly [{
|
|
1088
|
+
readonly indexed: true;
|
|
1089
|
+
readonly name: "key";
|
|
1090
|
+
readonly type: "bytes32";
|
|
1091
|
+
}, {
|
|
1092
|
+
readonly indexed: true;
|
|
1093
|
+
readonly name: "pool";
|
|
1094
|
+
readonly type: "address";
|
|
1095
|
+
}];
|
|
1096
|
+
readonly name: "Evicted";
|
|
1097
|
+
readonly type: "event";
|
|
1098
|
+
}, {
|
|
1099
|
+
readonly anonymous: false;
|
|
1100
|
+
readonly inputs: readonly [{
|
|
1101
|
+
readonly indexed: true;
|
|
1102
|
+
readonly name: "factory";
|
|
1103
|
+
readonly type: "address";
|
|
1104
|
+
}, {
|
|
1105
|
+
readonly indexed: false;
|
|
1106
|
+
readonly name: "kind";
|
|
1107
|
+
readonly type: "uint8";
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly indexed: false;
|
|
1110
|
+
readonly name: "mode";
|
|
1111
|
+
readonly type: "uint8";
|
|
1112
|
+
}];
|
|
1113
|
+
readonly name: "Factory_";
|
|
1114
|
+
readonly type: "event";
|
|
1115
|
+
}, {
|
|
1116
|
+
readonly anonymous: false;
|
|
1117
|
+
readonly inputs: readonly [{
|
|
1118
|
+
readonly indexed: false;
|
|
1119
|
+
readonly name: "paused";
|
|
1120
|
+
readonly type: "bool";
|
|
1121
|
+
}];
|
|
1122
|
+
readonly name: "PausedSet";
|
|
1123
|
+
readonly type: "event";
|
|
1124
|
+
}, {
|
|
1125
|
+
readonly anonymous: false;
|
|
1126
|
+
readonly inputs: readonly [{
|
|
1127
|
+
readonly indexed: true;
|
|
1128
|
+
readonly name: "key";
|
|
1129
|
+
readonly type: "bytes32";
|
|
1130
|
+
}, {
|
|
1131
|
+
readonly indexed: true;
|
|
1132
|
+
readonly name: "pool";
|
|
1133
|
+
readonly type: "address";
|
|
1134
|
+
}, {
|
|
1135
|
+
readonly indexed: false;
|
|
1136
|
+
readonly name: "kind";
|
|
1137
|
+
readonly type: "uint8";
|
|
1138
|
+
}];
|
|
1139
|
+
readonly name: "Registered";
|
|
1140
|
+
readonly type: "event";
|
|
1141
|
+
}, {
|
|
1142
|
+
readonly anonymous: false;
|
|
1143
|
+
readonly inputs: readonly [{
|
|
1144
|
+
readonly indexed: false;
|
|
1145
|
+
readonly name: "role";
|
|
1146
|
+
readonly type: "uint8";
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly indexed: false;
|
|
1149
|
+
readonly name: "who";
|
|
1150
|
+
readonly type: "address";
|
|
1151
|
+
}];
|
|
1152
|
+
readonly name: "RoleSet";
|
|
1153
|
+
readonly type: "event";
|
|
1154
|
+
}, {
|
|
1155
|
+
readonly anonymous: false;
|
|
1156
|
+
readonly inputs: readonly [{
|
|
1157
|
+
readonly indexed: true;
|
|
1158
|
+
readonly name: "idx";
|
|
1159
|
+
readonly type: "uint256";
|
|
1160
|
+
}, {
|
|
1161
|
+
readonly indexed: false;
|
|
1162
|
+
readonly name: "c0";
|
|
1163
|
+
readonly type: "address";
|
|
1164
|
+
}, {
|
|
1165
|
+
readonly indexed: false;
|
|
1166
|
+
readonly name: "c1";
|
|
1167
|
+
readonly type: "address";
|
|
1168
|
+
}, {
|
|
1169
|
+
readonly indexed: false;
|
|
1170
|
+
readonly name: "fee";
|
|
1171
|
+
readonly type: "uint24";
|
|
1172
|
+
}];
|
|
1173
|
+
readonly name: "V4Add";
|
|
1174
|
+
readonly type: "event";
|
|
1175
|
+
}, {
|
|
1176
|
+
readonly anonymous: false;
|
|
1177
|
+
readonly inputs: readonly [{
|
|
1178
|
+
readonly indexed: true;
|
|
1179
|
+
readonly name: "key";
|
|
1180
|
+
readonly type: "bytes32";
|
|
1181
|
+
}, {
|
|
1182
|
+
readonly indexed: false;
|
|
1183
|
+
readonly name: "amtIn";
|
|
1184
|
+
readonly type: "uint256";
|
|
1185
|
+
}, {
|
|
1186
|
+
readonly indexed: false;
|
|
1187
|
+
readonly name: "amtOut";
|
|
1188
|
+
readonly type: "uint256";
|
|
1189
|
+
}];
|
|
1190
|
+
readonly name: "Volume";
|
|
1191
|
+
readonly type: "event";
|
|
1192
|
+
}, {
|
|
1193
|
+
readonly inputs: readonly [{
|
|
1194
|
+
readonly name: "t";
|
|
1195
|
+
readonly type: "address";
|
|
1196
|
+
}];
|
|
1197
|
+
readonly name: "addBridge";
|
|
1198
|
+
readonly outputs: readonly [];
|
|
1199
|
+
readonly stateMutability: "nonpayable";
|
|
1200
|
+
readonly type: "function";
|
|
1201
|
+
}, {
|
|
1202
|
+
readonly inputs: readonly [{
|
|
1203
|
+
readonly name: "factory";
|
|
1204
|
+
readonly type: "address";
|
|
1205
|
+
}, {
|
|
1206
|
+
readonly name: "kind";
|
|
1207
|
+
readonly type: "uint8";
|
|
1208
|
+
}, {
|
|
1209
|
+
readonly name: "mode";
|
|
1210
|
+
readonly type: "uint8";
|
|
1211
|
+
}, {
|
|
1212
|
+
readonly name: "initHash";
|
|
1213
|
+
readonly type: "bytes32";
|
|
1214
|
+
}, {
|
|
1215
|
+
readonly name: "fees";
|
|
1216
|
+
readonly type: "uint24[]";
|
|
1217
|
+
}, {
|
|
1218
|
+
readonly name: "spacings";
|
|
1219
|
+
readonly type: "int24[]";
|
|
1220
|
+
}];
|
|
1221
|
+
readonly name: "addFactory";
|
|
1222
|
+
readonly outputs: readonly [{
|
|
1223
|
+
readonly name: "";
|
|
1224
|
+
readonly type: "uint8";
|
|
1225
|
+
}];
|
|
1226
|
+
readonly stateMutability: "nonpayable";
|
|
1227
|
+
readonly type: "function";
|
|
1228
|
+
}, {
|
|
1229
|
+
readonly inputs: readonly [{
|
|
1230
|
+
readonly name: "c0";
|
|
1231
|
+
readonly type: "address";
|
|
1232
|
+
}, {
|
|
1233
|
+
readonly name: "c1";
|
|
1234
|
+
readonly type: "address";
|
|
1235
|
+
}, {
|
|
1236
|
+
readonly name: "fee";
|
|
1237
|
+
readonly type: "uint24";
|
|
1238
|
+
}, {
|
|
1239
|
+
readonly name: "tickSpacing";
|
|
1240
|
+
readonly type: "int24";
|
|
1241
|
+
}, {
|
|
1242
|
+
readonly name: "hooks";
|
|
1243
|
+
readonly type: "address";
|
|
1244
|
+
}];
|
|
1245
|
+
readonly name: "addV4";
|
|
1246
|
+
readonly outputs: readonly [{
|
|
1247
|
+
readonly name: "key";
|
|
1248
|
+
readonly type: "bytes32";
|
|
1249
|
+
}];
|
|
1250
|
+
readonly stateMutability: "nonpayable";
|
|
1251
|
+
readonly type: "function";
|
|
1252
|
+
}, {
|
|
1253
|
+
readonly inputs: readonly [{
|
|
1254
|
+
readonly name: "h";
|
|
1255
|
+
readonly type: "address";
|
|
1256
|
+
}, {
|
|
1257
|
+
readonly name: "ok";
|
|
1258
|
+
readonly type: "bool";
|
|
1259
|
+
}];
|
|
1260
|
+
readonly name: "allowHook";
|
|
1261
|
+
readonly outputs: readonly [];
|
|
1262
|
+
readonly stateMutability: "nonpayable";
|
|
1263
|
+
readonly type: "function";
|
|
1264
|
+
}, {
|
|
1265
|
+
readonly inputs: readonly [{
|
|
1266
|
+
readonly name: "i";
|
|
1267
|
+
readonly type: "uint8";
|
|
1268
|
+
}];
|
|
1269
|
+
readonly name: "bridge";
|
|
1270
|
+
readonly outputs: readonly [{
|
|
1271
|
+
readonly name: "";
|
|
1272
|
+
readonly type: "address";
|
|
1273
|
+
}];
|
|
1274
|
+
readonly stateMutability: "view";
|
|
1275
|
+
readonly type: "function";
|
|
1276
|
+
}, {
|
|
1277
|
+
readonly inputs: readonly [];
|
|
1278
|
+
readonly name: "bridgeCount";
|
|
1279
|
+
readonly outputs: readonly [{
|
|
1280
|
+
readonly name: "";
|
|
1281
|
+
readonly type: "uint8";
|
|
1282
|
+
}];
|
|
1283
|
+
readonly stateMutability: "view";
|
|
1284
|
+
readonly type: "function";
|
|
1285
|
+
}, {
|
|
1286
|
+
readonly inputs: readonly [{
|
|
1287
|
+
readonly name: "c0";
|
|
1288
|
+
readonly type: "address";
|
|
1289
|
+
}, {
|
|
1290
|
+
readonly name: "c1";
|
|
1291
|
+
readonly type: "address";
|
|
1292
|
+
}, {
|
|
1293
|
+
readonly name: "fee";
|
|
1294
|
+
readonly type: "uint24";
|
|
1295
|
+
}, {
|
|
1296
|
+
readonly name: "tickSpacing";
|
|
1297
|
+
readonly type: "int24";
|
|
1298
|
+
}];
|
|
1299
|
+
readonly name: "claimV4";
|
|
1300
|
+
readonly outputs: readonly [{
|
|
1301
|
+
readonly name: "key";
|
|
1302
|
+
readonly type: "bytes32";
|
|
1303
|
+
}];
|
|
1304
|
+
readonly stateMutability: "nonpayable";
|
|
1305
|
+
readonly type: "function";
|
|
1306
|
+
}, {
|
|
1307
|
+
readonly inputs: readonly [{
|
|
1308
|
+
readonly name: "tA";
|
|
1309
|
+
readonly type: "address";
|
|
1310
|
+
}, {
|
|
1311
|
+
readonly name: "tB";
|
|
1312
|
+
readonly type: "address";
|
|
1313
|
+
}];
|
|
1314
|
+
readonly name: "discoverFor";
|
|
1315
|
+
readonly outputs: readonly [{
|
|
1316
|
+
readonly components: readonly [{
|
|
1317
|
+
readonly name: "active";
|
|
1318
|
+
readonly type: "bool";
|
|
1319
|
+
}, {
|
|
1320
|
+
readonly name: "stable";
|
|
1321
|
+
readonly type: "bool";
|
|
1322
|
+
}, {
|
|
1323
|
+
readonly name: "kind";
|
|
1324
|
+
readonly type: "uint8";
|
|
1325
|
+
}, {
|
|
1326
|
+
readonly name: "fee";
|
|
1327
|
+
readonly type: "uint24";
|
|
1328
|
+
}, {
|
|
1329
|
+
readonly name: "tickSpacing";
|
|
1330
|
+
readonly type: "int24";
|
|
1331
|
+
}, {
|
|
1332
|
+
readonly name: "token0";
|
|
1333
|
+
readonly type: "address";
|
|
1334
|
+
}, {
|
|
1335
|
+
readonly name: "token1";
|
|
1336
|
+
readonly type: "address";
|
|
1337
|
+
}, {
|
|
1338
|
+
readonly name: "pool";
|
|
1339
|
+
readonly type: "address";
|
|
1340
|
+
}, {
|
|
1341
|
+
readonly name: "hooks";
|
|
1342
|
+
readonly type: "address";
|
|
1343
|
+
}];
|
|
1344
|
+
readonly name: "hits";
|
|
1345
|
+
readonly type: "tuple[]";
|
|
1346
|
+
}];
|
|
1347
|
+
readonly stateMutability: "view";
|
|
1348
|
+
readonly type: "function";
|
|
1349
|
+
}, {
|
|
1350
|
+
readonly inputs: readonly [];
|
|
1351
|
+
readonly name: "factoryCount";
|
|
1352
|
+
readonly outputs: readonly [{
|
|
1353
|
+
readonly name: "";
|
|
1354
|
+
readonly type: "uint256";
|
|
1355
|
+
}];
|
|
1356
|
+
readonly stateMutability: "view";
|
|
1357
|
+
readonly type: "function";
|
|
1358
|
+
}, {
|
|
1359
|
+
readonly inputs: readonly [{
|
|
1360
|
+
readonly name: "tA";
|
|
1361
|
+
readonly type: "address";
|
|
1362
|
+
}, {
|
|
1363
|
+
readonly name: "tB";
|
|
1364
|
+
readonly type: "address";
|
|
1365
|
+
}];
|
|
1366
|
+
readonly name: "getActivePools";
|
|
1367
|
+
readonly outputs: readonly [{
|
|
1368
|
+
readonly components: readonly [{
|
|
1369
|
+
readonly name: "active";
|
|
1370
|
+
readonly type: "bool";
|
|
1371
|
+
}, {
|
|
1372
|
+
readonly name: "stable";
|
|
1373
|
+
readonly type: "bool";
|
|
1374
|
+
}, {
|
|
1375
|
+
readonly name: "kind";
|
|
1376
|
+
readonly type: "uint8";
|
|
1377
|
+
}, {
|
|
1378
|
+
readonly name: "fee";
|
|
1379
|
+
readonly type: "uint24";
|
|
1380
|
+
}, {
|
|
1381
|
+
readonly name: "tickSpacing";
|
|
1382
|
+
readonly type: "int24";
|
|
1383
|
+
}, {
|
|
1384
|
+
readonly name: "token0";
|
|
1385
|
+
readonly type: "address";
|
|
1386
|
+
}, {
|
|
1387
|
+
readonly name: "token1";
|
|
1388
|
+
readonly type: "address";
|
|
1389
|
+
}, {
|
|
1390
|
+
readonly name: "pool";
|
|
1391
|
+
readonly type: "address";
|
|
1392
|
+
}, {
|
|
1393
|
+
readonly name: "hooks";
|
|
1394
|
+
readonly type: "address";
|
|
1395
|
+
}];
|
|
1396
|
+
readonly name: "out";
|
|
1397
|
+
readonly type: "tuple[]";
|
|
1398
|
+
}];
|
|
1399
|
+
readonly stateMutability: "view";
|
|
1400
|
+
readonly type: "function";
|
|
1401
|
+
}, {
|
|
1402
|
+
readonly inputs: readonly [{
|
|
1403
|
+
readonly name: "key";
|
|
1404
|
+
readonly type: "bytes32";
|
|
1405
|
+
}];
|
|
1406
|
+
readonly name: "getPool";
|
|
1407
|
+
readonly outputs: readonly [{
|
|
1408
|
+
readonly name: "";
|
|
1409
|
+
readonly type: "address";
|
|
1410
|
+
}];
|
|
1411
|
+
readonly stateMutability: "view";
|
|
1412
|
+
readonly type: "function";
|
|
1413
|
+
}, {
|
|
1414
|
+
readonly inputs: readonly [{
|
|
1415
|
+
readonly name: "pool";
|
|
1416
|
+
readonly type: "address";
|
|
1417
|
+
}, {
|
|
1418
|
+
readonly name: "tA";
|
|
1419
|
+
readonly type: "address";
|
|
1420
|
+
}, {
|
|
1421
|
+
readonly name: "tB";
|
|
1422
|
+
readonly type: "address";
|
|
1423
|
+
}];
|
|
1424
|
+
readonly name: "getPsi";
|
|
1425
|
+
readonly outputs: readonly [{
|
|
1426
|
+
readonly name: "";
|
|
1427
|
+
readonly type: "uint256";
|
|
1428
|
+
}];
|
|
1429
|
+
readonly stateMutability: "view";
|
|
1430
|
+
readonly type: "function";
|
|
1431
|
+
}, {
|
|
1432
|
+
readonly inputs: readonly [{
|
|
1433
|
+
readonly name: "key";
|
|
1434
|
+
readonly type: "bytes32";
|
|
1435
|
+
}];
|
|
1436
|
+
readonly name: "getSlot";
|
|
1437
|
+
readonly outputs: readonly [{
|
|
1438
|
+
readonly name: "";
|
|
1439
|
+
readonly type: "uint256";
|
|
1440
|
+
}];
|
|
1441
|
+
readonly stateMutability: "view";
|
|
1442
|
+
readonly type: "function";
|
|
1443
|
+
}, {
|
|
1444
|
+
readonly inputs: readonly [{
|
|
1445
|
+
readonly name: "h";
|
|
1446
|
+
readonly type: "address";
|
|
1447
|
+
}];
|
|
1448
|
+
readonly name: "hookPaused";
|
|
1449
|
+
readonly outputs: readonly [{
|
|
1450
|
+
readonly name: "";
|
|
1451
|
+
readonly type: "bool";
|
|
1452
|
+
}];
|
|
1453
|
+
readonly stateMutability: "view";
|
|
1454
|
+
readonly type: "function";
|
|
1455
|
+
}, {
|
|
1456
|
+
readonly inputs: readonly [{
|
|
1457
|
+
readonly name: "admin_";
|
|
1458
|
+
readonly type: "address";
|
|
1459
|
+
}, {
|
|
1460
|
+
readonly name: "v4Manager_";
|
|
1461
|
+
readonly type: "address";
|
|
1462
|
+
}];
|
|
1463
|
+
readonly name: "initialize";
|
|
1464
|
+
readonly outputs: readonly [];
|
|
1465
|
+
readonly stateMutability: "nonpayable";
|
|
1466
|
+
readonly type: "function";
|
|
1467
|
+
}, {
|
|
1468
|
+
readonly inputs: readonly [{
|
|
1469
|
+
readonly name: "t";
|
|
1470
|
+
readonly type: "address";
|
|
1471
|
+
}];
|
|
1472
|
+
readonly name: "isBridgeToken";
|
|
1473
|
+
readonly outputs: readonly [{
|
|
1474
|
+
readonly name: "";
|
|
1475
|
+
readonly type: "bool";
|
|
1476
|
+
}];
|
|
1477
|
+
readonly stateMutability: "view";
|
|
1478
|
+
readonly type: "function";
|
|
1479
|
+
}, {
|
|
1480
|
+
readonly inputs: readonly [{
|
|
1481
|
+
readonly name: "h";
|
|
1482
|
+
readonly type: "address";
|
|
1483
|
+
}];
|
|
1484
|
+
readonly name: "isHookLive";
|
|
1485
|
+
readonly outputs: readonly [{
|
|
1486
|
+
readonly name: "";
|
|
1487
|
+
readonly type: "bool";
|
|
1488
|
+
}];
|
|
1489
|
+
readonly stateMutability: "view";
|
|
1490
|
+
readonly type: "function";
|
|
1491
|
+
}, {
|
|
1492
|
+
readonly inputs: readonly [{
|
|
1493
|
+
readonly name: "t";
|
|
1494
|
+
readonly type: "address";
|
|
1495
|
+
}];
|
|
1496
|
+
readonly name: "isRoutableBridge";
|
|
1497
|
+
readonly outputs: readonly [{
|
|
1498
|
+
readonly name: "";
|
|
1499
|
+
readonly type: "bool";
|
|
1500
|
+
}];
|
|
1501
|
+
readonly stateMutability: "view";
|
|
1502
|
+
readonly type: "function";
|
|
1503
|
+
}, {
|
|
1504
|
+
readonly inputs: readonly [{
|
|
1505
|
+
readonly name: "pool";
|
|
1506
|
+
readonly type: "address";
|
|
1507
|
+
}, {
|
|
1508
|
+
readonly name: "tA";
|
|
1509
|
+
readonly type: "address";
|
|
1510
|
+
}, {
|
|
1511
|
+
readonly name: "tB";
|
|
1512
|
+
readonly type: "address";
|
|
1513
|
+
}];
|
|
1514
|
+
readonly name: "keyOf";
|
|
1515
|
+
readonly outputs: readonly [{
|
|
1516
|
+
readonly name: "";
|
|
1517
|
+
readonly type: "bytes32";
|
|
1518
|
+
}];
|
|
1519
|
+
readonly stateMutability: "pure";
|
|
1520
|
+
readonly type: "function";
|
|
1521
|
+
}, {
|
|
1522
|
+
readonly inputs: readonly [{
|
|
1523
|
+
readonly name: "pools";
|
|
1524
|
+
readonly type: "address[]";
|
|
1525
|
+
}, {
|
|
1526
|
+
readonly name: "tAs";
|
|
1527
|
+
readonly type: "address[]";
|
|
1528
|
+
}, {
|
|
1529
|
+
readonly name: "tBs";
|
|
1530
|
+
readonly type: "address[]";
|
|
1531
|
+
}];
|
|
1532
|
+
readonly name: "psisOf";
|
|
1533
|
+
readonly outputs: readonly [{
|
|
1534
|
+
readonly name: "ps";
|
|
1535
|
+
readonly type: "uint256[]";
|
|
1536
|
+
}];
|
|
1537
|
+
readonly stateMutability: "view";
|
|
1538
|
+
readonly type: "function";
|
|
1539
|
+
}, {
|
|
1540
|
+
readonly inputs: readonly [{
|
|
1541
|
+
readonly name: "pool";
|
|
1542
|
+
readonly type: "address";
|
|
1543
|
+
}, {
|
|
1544
|
+
readonly name: "kind";
|
|
1545
|
+
readonly type: "uint8";
|
|
1546
|
+
}, {
|
|
1547
|
+
readonly name: "fee";
|
|
1548
|
+
readonly type: "uint24";
|
|
1549
|
+
}, {
|
|
1550
|
+
readonly name: "hooks";
|
|
1551
|
+
readonly type: "address";
|
|
1552
|
+
}, {
|
|
1553
|
+
readonly name: "tA";
|
|
1554
|
+
readonly type: "address";
|
|
1555
|
+
}, {
|
|
1556
|
+
readonly name: "tB";
|
|
1557
|
+
readonly type: "address";
|
|
1558
|
+
}, {
|
|
1559
|
+
readonly name: "amtIn";
|
|
1560
|
+
readonly type: "uint256";
|
|
1561
|
+
}, {
|
|
1562
|
+
readonly name: "amtOut";
|
|
1563
|
+
readonly type: "uint256";
|
|
1564
|
+
}, {
|
|
1565
|
+
readonly name: "depthWad";
|
|
1566
|
+
readonly type: "uint256";
|
|
1567
|
+
}];
|
|
1568
|
+
readonly name: "recordSwap";
|
|
1569
|
+
readonly outputs: readonly [];
|
|
1570
|
+
readonly stateMutability: "nonpayable";
|
|
1571
|
+
readonly type: "function";
|
|
1572
|
+
}, {
|
|
1573
|
+
readonly inputs: readonly [{
|
|
1574
|
+
readonly name: "idx";
|
|
1575
|
+
readonly type: "uint8";
|
|
1576
|
+
}];
|
|
1577
|
+
readonly name: "removeBridge";
|
|
1578
|
+
readonly outputs: readonly [];
|
|
1579
|
+
readonly stateMutability: "nonpayable";
|
|
1580
|
+
readonly type: "function";
|
|
1581
|
+
}, {
|
|
1582
|
+
readonly inputs: readonly [];
|
|
1583
|
+
readonly name: "renounceControl";
|
|
1584
|
+
readonly outputs: readonly [];
|
|
1585
|
+
readonly stateMutability: "nonpayable";
|
|
1586
|
+
readonly type: "function";
|
|
1587
|
+
}, {
|
|
1588
|
+
readonly inputs: readonly [{
|
|
1589
|
+
readonly name: "pool";
|
|
1590
|
+
readonly type: "address";
|
|
1591
|
+
}, {
|
|
1592
|
+
readonly name: "kind";
|
|
1593
|
+
readonly type: "uint8";
|
|
1594
|
+
}, {
|
|
1595
|
+
readonly name: "fee";
|
|
1596
|
+
readonly type: "uint24";
|
|
1597
|
+
}, {
|
|
1598
|
+
readonly name: "hooks";
|
|
1599
|
+
readonly type: "address";
|
|
1600
|
+
}, {
|
|
1601
|
+
readonly name: "tA";
|
|
1602
|
+
readonly type: "address";
|
|
1603
|
+
}, {
|
|
1604
|
+
readonly name: "tB";
|
|
1605
|
+
readonly type: "address";
|
|
1606
|
+
}];
|
|
1607
|
+
readonly name: "seedPool";
|
|
1608
|
+
readonly outputs: readonly [{
|
|
1609
|
+
readonly name: "key";
|
|
1610
|
+
readonly type: "bytes32";
|
|
1611
|
+
}];
|
|
1612
|
+
readonly stateMutability: "nonpayable";
|
|
1613
|
+
readonly type: "function";
|
|
1614
|
+
}, {
|
|
1615
|
+
readonly inputs: readonly [{
|
|
1616
|
+
readonly name: "who";
|
|
1617
|
+
readonly type: "address";
|
|
1618
|
+
}, {
|
|
1619
|
+
readonly name: "ok";
|
|
1620
|
+
readonly type: "bool";
|
|
1621
|
+
}];
|
|
1622
|
+
readonly name: "setOperator";
|
|
1623
|
+
readonly outputs: readonly [];
|
|
1624
|
+
readonly stateMutability: "nonpayable";
|
|
1625
|
+
readonly type: "function";
|
|
1626
|
+
}, {
|
|
1627
|
+
readonly inputs: readonly [{
|
|
1628
|
+
readonly name: "b";
|
|
1629
|
+
readonly type: "bool";
|
|
1630
|
+
}];
|
|
1631
|
+
readonly name: "setPaused";
|
|
1632
|
+
readonly outputs: readonly [];
|
|
1633
|
+
readonly stateMutability: "nonpayable";
|
|
1634
|
+
readonly type: "function";
|
|
1635
|
+
}, {
|
|
1636
|
+
readonly inputs: readonly [{
|
|
1637
|
+
readonly name: "r";
|
|
1638
|
+
readonly type: "address";
|
|
1639
|
+
}, {
|
|
1640
|
+
readonly name: "s";
|
|
1641
|
+
readonly type: "address";
|
|
1642
|
+
}, {
|
|
1643
|
+
readonly name: "q";
|
|
1644
|
+
readonly type: "address";
|
|
1645
|
+
}];
|
|
1646
|
+
readonly name: "setRoles";
|
|
1647
|
+
readonly outputs: readonly [];
|
|
1648
|
+
readonly stateMutability: "nonpayable";
|
|
1649
|
+
readonly type: "function";
|
|
1650
|
+
}, {
|
|
1651
|
+
readonly inputs: readonly [{
|
|
1652
|
+
readonly name: "m";
|
|
1653
|
+
readonly type: "address";
|
|
1654
|
+
}];
|
|
1655
|
+
readonly name: "setV4Manager";
|
|
1656
|
+
readonly outputs: readonly [];
|
|
1657
|
+
readonly stateMutability: "nonpayable";
|
|
1658
|
+
readonly type: "function";
|
|
1659
|
+
}, {
|
|
1660
|
+
readonly inputs: readonly [{
|
|
1661
|
+
readonly name: "token";
|
|
1662
|
+
readonly type: "address";
|
|
1663
|
+
}];
|
|
1664
|
+
readonly name: "v4CodeOf";
|
|
1665
|
+
readonly outputs: readonly [{
|
|
1666
|
+
readonly name: "";
|
|
1667
|
+
readonly type: "uint256";
|
|
1668
|
+
}];
|
|
1669
|
+
readonly stateMutability: "view";
|
|
1670
|
+
readonly type: "function";
|
|
1671
|
+
}, {
|
|
1672
|
+
readonly inputs: readonly [];
|
|
1673
|
+
readonly name: "v4EntryCount";
|
|
1674
|
+
readonly outputs: readonly [{
|
|
1675
|
+
readonly name: "";
|
|
1676
|
+
readonly type: "uint256";
|
|
1677
|
+
}];
|
|
1678
|
+
readonly stateMutability: "view";
|
|
1679
|
+
readonly type: "function";
|
|
1680
|
+
}, {
|
|
1681
|
+
readonly inputs: readonly [];
|
|
1682
|
+
readonly name: "v4PoolManager";
|
|
1683
|
+
readonly outputs: readonly [{
|
|
1684
|
+
readonly name: "";
|
|
1685
|
+
readonly type: "address";
|
|
1686
|
+
}];
|
|
1687
|
+
readonly stateMutability: "view";
|
|
1688
|
+
readonly type: "function";
|
|
1689
|
+
}, {
|
|
1690
|
+
readonly inputs: readonly [{
|
|
1691
|
+
readonly name: "code";
|
|
1692
|
+
readonly type: "uint16";
|
|
1693
|
+
}];
|
|
1694
|
+
readonly name: "QuoterE";
|
|
1695
|
+
readonly type: "error";
|
|
1696
|
+
}, {
|
|
1697
|
+
readonly inputs: readonly [{
|
|
1698
|
+
readonly name: "code";
|
|
1699
|
+
readonly type: "uint16";
|
|
1700
|
+
}];
|
|
1701
|
+
readonly name: "SolverE";
|
|
1702
|
+
readonly type: "error";
|
|
1703
|
+
}, {
|
|
1704
|
+
readonly inputs: readonly [{
|
|
1705
|
+
readonly name: "code";
|
|
1706
|
+
readonly type: "uint16";
|
|
1707
|
+
}];
|
|
1708
|
+
readonly name: "RouterE";
|
|
1709
|
+
readonly type: "error";
|
|
1710
|
+
}];
|
|
1711
|
+
declare const SOLVER_ABI: readonly [{
|
|
1712
|
+
readonly inputs: readonly [{
|
|
1713
|
+
readonly name: "code";
|
|
1714
|
+
readonly type: "uint16";
|
|
1715
|
+
}];
|
|
1716
|
+
readonly name: "SolverE";
|
|
1717
|
+
readonly type: "error";
|
|
1718
|
+
}, {
|
|
1719
|
+
readonly inputs: readonly [];
|
|
1720
|
+
readonly name: "VERSION";
|
|
1721
|
+
readonly outputs: readonly [{
|
|
1722
|
+
readonly name: "";
|
|
1723
|
+
readonly type: "string";
|
|
1724
|
+
}];
|
|
1725
|
+
readonly stateMutability: "view";
|
|
1726
|
+
readonly type: "function";
|
|
1727
|
+
}, {
|
|
1728
|
+
readonly inputs: readonly [{
|
|
1729
|
+
readonly name: "tIn";
|
|
1730
|
+
readonly type: "address";
|
|
1731
|
+
}, {
|
|
1732
|
+
readonly name: "tOut";
|
|
1733
|
+
readonly type: "address";
|
|
1734
|
+
}, {
|
|
1735
|
+
readonly name: "amountIn";
|
|
1736
|
+
readonly type: "uint256";
|
|
1737
|
+
}];
|
|
1738
|
+
readonly name: "findBestRoutePlan";
|
|
1739
|
+
readonly outputs: readonly [{
|
|
1740
|
+
readonly components: readonly [{
|
|
1741
|
+
readonly components: readonly [{
|
|
1742
|
+
readonly components: readonly [{
|
|
1743
|
+
readonly name: "tokenIn";
|
|
1744
|
+
readonly type: "address";
|
|
1745
|
+
}, {
|
|
1746
|
+
readonly name: "tokenOut";
|
|
1747
|
+
readonly type: "address";
|
|
1748
|
+
}, {
|
|
1749
|
+
readonly name: "amountIn";
|
|
1750
|
+
readonly type: "uint256";
|
|
1751
|
+
}, {
|
|
1752
|
+
readonly name: "expectedOut";
|
|
1753
|
+
readonly type: "uint256";
|
|
1754
|
+
}, {
|
|
1755
|
+
readonly components: readonly [{
|
|
1756
|
+
readonly name: "pool";
|
|
1757
|
+
readonly type: "address";
|
|
1758
|
+
}, {
|
|
1759
|
+
readonly name: "hooks";
|
|
1760
|
+
readonly type: "address";
|
|
1761
|
+
}, {
|
|
1762
|
+
readonly name: "kind";
|
|
1763
|
+
readonly type: "uint8";
|
|
1764
|
+
}, {
|
|
1765
|
+
readonly name: "fee";
|
|
1766
|
+
readonly type: "uint24";
|
|
1767
|
+
}, {
|
|
1768
|
+
readonly name: "tickSpacing";
|
|
1769
|
+
readonly type: "int24";
|
|
1770
|
+
}, {
|
|
1771
|
+
readonly name: "zeroForOne";
|
|
1772
|
+
readonly type: "bool";
|
|
1773
|
+
}, {
|
|
1774
|
+
readonly name: "stable";
|
|
1775
|
+
readonly type: "bool";
|
|
1776
|
+
}, {
|
|
1777
|
+
readonly name: "amountIn";
|
|
1778
|
+
readonly type: "uint256";
|
|
1779
|
+
}, {
|
|
1780
|
+
readonly name: "expectedOut";
|
|
1781
|
+
readonly type: "uint256";
|
|
1782
|
+
}, {
|
|
1783
|
+
readonly name: "auxId";
|
|
1784
|
+
readonly type: "bytes32";
|
|
1785
|
+
}];
|
|
1786
|
+
readonly name: "legs";
|
|
1787
|
+
readonly type: "tuple[]";
|
|
1788
|
+
}];
|
|
1789
|
+
readonly name: "hops";
|
|
1790
|
+
readonly type: "tuple[]";
|
|
1791
|
+
}, {
|
|
1792
|
+
readonly name: "totalOut";
|
|
1793
|
+
readonly type: "uint256";
|
|
1794
|
+
}, {
|
|
1795
|
+
readonly name: "singleOut";
|
|
1796
|
+
readonly type: "uint256";
|
|
1797
|
+
}, {
|
|
1798
|
+
readonly name: "singleOutFloor";
|
|
1799
|
+
readonly type: "uint256";
|
|
1800
|
+
}, {
|
|
1801
|
+
readonly name: "expectedImpactBps";
|
|
1802
|
+
readonly type: "uint256";
|
|
1803
|
+
}, {
|
|
1804
|
+
readonly name: "confidenceWad";
|
|
1805
|
+
readonly type: "uint256";
|
|
1806
|
+
}, {
|
|
1807
|
+
readonly name: "estGas";
|
|
1808
|
+
readonly type: "uint256";
|
|
1809
|
+
}, {
|
|
1810
|
+
readonly name: "hasSurplus";
|
|
1811
|
+
readonly type: "bool";
|
|
1812
|
+
}, {
|
|
1813
|
+
readonly name: "isV4Bundle";
|
|
1814
|
+
readonly type: "bool";
|
|
1815
|
+
}];
|
|
1816
|
+
readonly name: "best";
|
|
1817
|
+
readonly type: "tuple";
|
|
1818
|
+
}, {
|
|
1819
|
+
readonly components: readonly [{
|
|
1820
|
+
readonly components: readonly [{
|
|
1821
|
+
readonly name: "tokenIn";
|
|
1822
|
+
readonly type: "address";
|
|
1823
|
+
}, {
|
|
1824
|
+
readonly name: "tokenOut";
|
|
1825
|
+
readonly type: "address";
|
|
1826
|
+
}, {
|
|
1827
|
+
readonly name: "amountIn";
|
|
1828
|
+
readonly type: "uint256";
|
|
1829
|
+
}, {
|
|
1830
|
+
readonly name: "expectedOut";
|
|
1831
|
+
readonly type: "uint256";
|
|
1832
|
+
}, {
|
|
1833
|
+
readonly components: readonly [{
|
|
1834
|
+
readonly name: "pool";
|
|
1835
|
+
readonly type: "address";
|
|
1836
|
+
}, {
|
|
1837
|
+
readonly name: "hooks";
|
|
1838
|
+
readonly type: "address";
|
|
1839
|
+
}, {
|
|
1840
|
+
readonly name: "kind";
|
|
1841
|
+
readonly type: "uint8";
|
|
1842
|
+
}, {
|
|
1843
|
+
readonly name: "fee";
|
|
1844
|
+
readonly type: "uint24";
|
|
1845
|
+
}, {
|
|
1846
|
+
readonly name: "tickSpacing";
|
|
1847
|
+
readonly type: "int24";
|
|
1848
|
+
}, {
|
|
1849
|
+
readonly name: "zeroForOne";
|
|
1850
|
+
readonly type: "bool";
|
|
1851
|
+
}, {
|
|
1852
|
+
readonly name: "stable";
|
|
1853
|
+
readonly type: "bool";
|
|
1854
|
+
}, {
|
|
1855
|
+
readonly name: "amountIn";
|
|
1856
|
+
readonly type: "uint256";
|
|
1857
|
+
}, {
|
|
1858
|
+
readonly name: "expectedOut";
|
|
1859
|
+
readonly type: "uint256";
|
|
1860
|
+
}, {
|
|
1861
|
+
readonly name: "auxId";
|
|
1862
|
+
readonly type: "bytes32";
|
|
1863
|
+
}];
|
|
1864
|
+
readonly name: "legs";
|
|
1865
|
+
readonly type: "tuple[]";
|
|
1866
|
+
}];
|
|
1867
|
+
readonly name: "hops";
|
|
1868
|
+
readonly type: "tuple[]";
|
|
1869
|
+
}, {
|
|
1870
|
+
readonly name: "totalOut";
|
|
1871
|
+
readonly type: "uint256";
|
|
1872
|
+
}, {
|
|
1873
|
+
readonly name: "singleOut";
|
|
1874
|
+
readonly type: "uint256";
|
|
1875
|
+
}, {
|
|
1876
|
+
readonly name: "singleOutFloor";
|
|
1877
|
+
readonly type: "uint256";
|
|
1878
|
+
}, {
|
|
1879
|
+
readonly name: "expectedImpactBps";
|
|
1880
|
+
readonly type: "uint256";
|
|
1881
|
+
}, {
|
|
1882
|
+
readonly name: "confidenceWad";
|
|
1883
|
+
readonly type: "uint256";
|
|
1884
|
+
}, {
|
|
1885
|
+
readonly name: "estGas";
|
|
1886
|
+
readonly type: "uint256";
|
|
1887
|
+
}, {
|
|
1888
|
+
readonly name: "hasSurplus";
|
|
1889
|
+
readonly type: "bool";
|
|
1890
|
+
}, {
|
|
1891
|
+
readonly name: "isV4Bundle";
|
|
1892
|
+
readonly type: "bool";
|
|
1893
|
+
}];
|
|
1894
|
+
readonly name: "fallbackRoute";
|
|
1895
|
+
readonly type: "tuple";
|
|
1896
|
+
}, {
|
|
1897
|
+
readonly name: "hasFallback";
|
|
1898
|
+
readonly type: "bool";
|
|
1899
|
+
}];
|
|
1900
|
+
readonly name: "plan";
|
|
1901
|
+
readonly type: "tuple";
|
|
1902
|
+
}];
|
|
1903
|
+
readonly stateMutability: "view";
|
|
1904
|
+
readonly type: "function";
|
|
1905
|
+
}, {
|
|
1906
|
+
readonly inputs: readonly [];
|
|
1907
|
+
readonly name: "hub";
|
|
1908
|
+
readonly outputs: readonly [{
|
|
1909
|
+
readonly name: "";
|
|
1910
|
+
readonly type: "address";
|
|
1911
|
+
}];
|
|
1912
|
+
readonly stateMutability: "view";
|
|
1913
|
+
readonly type: "function";
|
|
1914
|
+
}, {
|
|
1915
|
+
readonly inputs: readonly [{
|
|
1916
|
+
readonly name: "code";
|
|
1917
|
+
readonly type: "uint16";
|
|
1918
|
+
}];
|
|
1919
|
+
readonly name: "QuoterE";
|
|
1920
|
+
readonly type: "error";
|
|
1921
|
+
}, {
|
|
1922
|
+
readonly inputs: readonly [{
|
|
1923
|
+
readonly name: "code";
|
|
1924
|
+
readonly type: "uint16";
|
|
1925
|
+
}];
|
|
1926
|
+
readonly name: "HubE";
|
|
1927
|
+
readonly type: "error";
|
|
1928
|
+
}, {
|
|
1929
|
+
readonly inputs: readonly [{
|
|
1930
|
+
readonly name: "code";
|
|
1931
|
+
readonly type: "uint16";
|
|
1932
|
+
}];
|
|
1933
|
+
readonly name: "RouterE";
|
|
1934
|
+
readonly type: "error";
|
|
1935
|
+
}];
|
|
1936
|
+
declare const QUOTER_ABI: readonly [{
|
|
1937
|
+
readonly inputs: readonly [{
|
|
1938
|
+
readonly name: "code";
|
|
1939
|
+
readonly type: "uint16";
|
|
1940
|
+
}];
|
|
1941
|
+
readonly name: "QuoterE";
|
|
1942
|
+
readonly type: "error";
|
|
1943
|
+
}, {
|
|
1944
|
+
readonly inputs: readonly [];
|
|
1945
|
+
readonly name: "VERSION";
|
|
1946
|
+
readonly outputs: readonly [{
|
|
1947
|
+
readonly name: "";
|
|
1948
|
+
readonly type: "string";
|
|
1949
|
+
}];
|
|
1950
|
+
readonly stateMutability: "view";
|
|
1951
|
+
readonly type: "function";
|
|
1952
|
+
}, {
|
|
1953
|
+
readonly inputs: readonly [{
|
|
1954
|
+
readonly components: readonly [{
|
|
1955
|
+
readonly name: "tIn";
|
|
1956
|
+
readonly type: "address";
|
|
1957
|
+
}, {
|
|
1958
|
+
readonly name: "tOut";
|
|
1959
|
+
readonly type: "address";
|
|
1960
|
+
}, {
|
|
1961
|
+
readonly name: "amountIn";
|
|
1962
|
+
readonly type: "uint256";
|
|
1963
|
+
}, {
|
|
1964
|
+
readonly name: "userMinOut";
|
|
1965
|
+
readonly type: "uint256";
|
|
1966
|
+
}];
|
|
1967
|
+
readonly name: "entries";
|
|
1968
|
+
readonly type: "tuple[]";
|
|
1969
|
+
}];
|
|
1970
|
+
readonly name: "batchQuote";
|
|
1971
|
+
readonly outputs: readonly [{
|
|
1972
|
+
readonly components: readonly [{
|
|
1973
|
+
readonly components: readonly [{
|
|
1974
|
+
readonly components: readonly [{
|
|
1975
|
+
readonly name: "tokenIn";
|
|
1976
|
+
readonly type: "address";
|
|
1977
|
+
}, {
|
|
1978
|
+
readonly name: "tokenOut";
|
|
1979
|
+
readonly type: "address";
|
|
1980
|
+
}, {
|
|
1981
|
+
readonly name: "amountIn";
|
|
1982
|
+
readonly type: "uint256";
|
|
1983
|
+
}, {
|
|
1984
|
+
readonly name: "expectedOut";
|
|
1985
|
+
readonly type: "uint256";
|
|
1986
|
+
}, {
|
|
1987
|
+
readonly components: readonly [{
|
|
1988
|
+
readonly name: "pool";
|
|
1989
|
+
readonly type: "address";
|
|
1990
|
+
}, {
|
|
1991
|
+
readonly name: "hooks";
|
|
1992
|
+
readonly type: "address";
|
|
1993
|
+
}, {
|
|
1994
|
+
readonly name: "kind";
|
|
1995
|
+
readonly type: "uint8";
|
|
1996
|
+
}, {
|
|
1997
|
+
readonly name: "fee";
|
|
1998
|
+
readonly type: "uint24";
|
|
1999
|
+
}, {
|
|
2000
|
+
readonly name: "tickSpacing";
|
|
2001
|
+
readonly type: "int24";
|
|
2002
|
+
}, {
|
|
2003
|
+
readonly name: "zeroForOne";
|
|
2004
|
+
readonly type: "bool";
|
|
2005
|
+
}, {
|
|
2006
|
+
readonly name: "stable";
|
|
2007
|
+
readonly type: "bool";
|
|
2008
|
+
}, {
|
|
2009
|
+
readonly name: "amountIn";
|
|
2010
|
+
readonly type: "uint256";
|
|
2011
|
+
}, {
|
|
2012
|
+
readonly name: "expectedOut";
|
|
2013
|
+
readonly type: "uint256";
|
|
2014
|
+
}, {
|
|
2015
|
+
readonly name: "auxId";
|
|
2016
|
+
readonly type: "bytes32";
|
|
2017
|
+
}];
|
|
2018
|
+
readonly name: "legs";
|
|
2019
|
+
readonly type: "tuple[]";
|
|
2020
|
+
}];
|
|
2021
|
+
readonly name: "hops";
|
|
2022
|
+
readonly type: "tuple[]";
|
|
2023
|
+
}, {
|
|
2024
|
+
readonly name: "totalOut";
|
|
2025
|
+
readonly type: "uint256";
|
|
2026
|
+
}, {
|
|
2027
|
+
readonly name: "singleOut";
|
|
2028
|
+
readonly type: "uint256";
|
|
2029
|
+
}, {
|
|
2030
|
+
readonly name: "singleOutFloor";
|
|
2031
|
+
readonly type: "uint256";
|
|
2032
|
+
}, {
|
|
2033
|
+
readonly name: "expectedImpactBps";
|
|
2034
|
+
readonly type: "uint256";
|
|
2035
|
+
}, {
|
|
2036
|
+
readonly name: "confidenceWad";
|
|
2037
|
+
readonly type: "uint256";
|
|
2038
|
+
}, {
|
|
2039
|
+
readonly name: "estGas";
|
|
2040
|
+
readonly type: "uint256";
|
|
2041
|
+
}, {
|
|
2042
|
+
readonly name: "hasSurplus";
|
|
2043
|
+
readonly type: "bool";
|
|
2044
|
+
}, {
|
|
2045
|
+
readonly name: "isV4Bundle";
|
|
2046
|
+
readonly type: "bool";
|
|
2047
|
+
}];
|
|
2048
|
+
readonly name: "route";
|
|
2049
|
+
readonly type: "tuple";
|
|
2050
|
+
}, {
|
|
2051
|
+
readonly name: "grossOut";
|
|
2052
|
+
readonly type: "uint256";
|
|
2053
|
+
}, {
|
|
2054
|
+
readonly name: "protocolFee";
|
|
2055
|
+
readonly type: "uint256";
|
|
2056
|
+
}, {
|
|
2057
|
+
readonly name: "safetyBuffer";
|
|
2058
|
+
readonly type: "uint256";
|
|
2059
|
+
}, {
|
|
2060
|
+
readonly name: "netOut";
|
|
2061
|
+
readonly type: "uint256";
|
|
2062
|
+
}, {
|
|
2063
|
+
readonly name: "ironFloor";
|
|
2064
|
+
readonly type: "uint256";
|
|
2065
|
+
}, {
|
|
2066
|
+
readonly name: "userMinOut";
|
|
2067
|
+
readonly type: "uint256";
|
|
2068
|
+
}, {
|
|
2069
|
+
readonly name: "effectiveMinOut";
|
|
2070
|
+
readonly type: "uint256";
|
|
2071
|
+
}, {
|
|
2072
|
+
readonly name: "estGas";
|
|
2073
|
+
readonly type: "uint256";
|
|
2074
|
+
}, {
|
|
2075
|
+
readonly name: "hops";
|
|
2076
|
+
readonly type: "uint256";
|
|
2077
|
+
}, {
|
|
2078
|
+
readonly name: "legs";
|
|
2079
|
+
readonly type: "uint256";
|
|
2080
|
+
}, {
|
|
2081
|
+
readonly name: "topology";
|
|
2082
|
+
readonly type: "uint8";
|
|
2083
|
+
}, {
|
|
2084
|
+
readonly name: "bridgeUsed";
|
|
2085
|
+
readonly type: "address";
|
|
2086
|
+
}, {
|
|
2087
|
+
readonly name: "canExecute";
|
|
2088
|
+
readonly type: "bool";
|
|
2089
|
+
}];
|
|
2090
|
+
readonly name: "previews";
|
|
2091
|
+
readonly type: "tuple[]";
|
|
2092
|
+
}];
|
|
2093
|
+
readonly stateMutability: "view";
|
|
2094
|
+
readonly type: "function";
|
|
2095
|
+
}, {
|
|
2096
|
+
readonly inputs: readonly [{
|
|
2097
|
+
readonly name: "i";
|
|
2098
|
+
readonly type: "uint8";
|
|
2099
|
+
}];
|
|
2100
|
+
readonly name: "bridgeAt";
|
|
2101
|
+
readonly outputs: readonly [{
|
|
2102
|
+
readonly name: "";
|
|
2103
|
+
readonly type: "address";
|
|
2104
|
+
}];
|
|
2105
|
+
readonly stateMutability: "view";
|
|
2106
|
+
readonly type: "function";
|
|
2107
|
+
}, {
|
|
2108
|
+
readonly inputs: readonly [];
|
|
2109
|
+
readonly name: "bridgesCount";
|
|
2110
|
+
readonly outputs: readonly [{
|
|
2111
|
+
readonly name: "";
|
|
2112
|
+
readonly type: "uint8";
|
|
2113
|
+
}];
|
|
2114
|
+
readonly stateMutability: "view";
|
|
2115
|
+
readonly type: "function";
|
|
2116
|
+
}, {
|
|
2117
|
+
readonly inputs: readonly [];
|
|
2118
|
+
readonly name: "hub";
|
|
2119
|
+
readonly outputs: readonly [{
|
|
2120
|
+
readonly name: "";
|
|
2121
|
+
readonly type: "address";
|
|
2122
|
+
}];
|
|
2123
|
+
readonly stateMutability: "view";
|
|
2124
|
+
readonly type: "function";
|
|
2125
|
+
}, {
|
|
2126
|
+
readonly inputs: readonly [{
|
|
2127
|
+
readonly name: "t";
|
|
2128
|
+
readonly type: "address";
|
|
2129
|
+
}];
|
|
2130
|
+
readonly name: "isBridge";
|
|
2131
|
+
readonly outputs: readonly [{
|
|
2132
|
+
readonly name: "";
|
|
2133
|
+
readonly type: "bool";
|
|
2134
|
+
}];
|
|
2135
|
+
readonly stateMutability: "view";
|
|
2136
|
+
readonly type: "function";
|
|
2137
|
+
}, {
|
|
2138
|
+
readonly inputs: readonly [{
|
|
2139
|
+
readonly name: "tIn";
|
|
2140
|
+
readonly type: "address";
|
|
2141
|
+
}, {
|
|
2142
|
+
readonly name: "tOut";
|
|
2143
|
+
readonly type: "address";
|
|
2144
|
+
}, {
|
|
2145
|
+
readonly name: "amountIn";
|
|
2146
|
+
readonly type: "uint256";
|
|
2147
|
+
}, {
|
|
2148
|
+
readonly name: "recipient";
|
|
2149
|
+
readonly type: "address";
|
|
2150
|
+
}, {
|
|
2151
|
+
readonly name: "deadline";
|
|
2152
|
+
readonly type: "uint256";
|
|
2153
|
+
}];
|
|
2154
|
+
readonly name: "previewAndEncode";
|
|
2155
|
+
readonly outputs: readonly [{
|
|
2156
|
+
readonly components: readonly [{
|
|
2157
|
+
readonly components: readonly [{
|
|
2158
|
+
readonly components: readonly [{
|
|
2159
|
+
readonly name: "tokenIn";
|
|
2160
|
+
readonly type: "address";
|
|
2161
|
+
}, {
|
|
2162
|
+
readonly name: "tokenOut";
|
|
2163
|
+
readonly type: "address";
|
|
2164
|
+
}, {
|
|
2165
|
+
readonly name: "amountIn";
|
|
2166
|
+
readonly type: "uint256";
|
|
2167
|
+
}, {
|
|
2168
|
+
readonly name: "expectedOut";
|
|
2169
|
+
readonly type: "uint256";
|
|
2170
|
+
}, {
|
|
2171
|
+
readonly components: readonly [{
|
|
2172
|
+
readonly name: "pool";
|
|
2173
|
+
readonly type: "address";
|
|
2174
|
+
}, {
|
|
2175
|
+
readonly name: "hooks";
|
|
2176
|
+
readonly type: "address";
|
|
2177
|
+
}, {
|
|
2178
|
+
readonly name: "kind";
|
|
2179
|
+
readonly type: "uint8";
|
|
2180
|
+
}, {
|
|
2181
|
+
readonly name: "fee";
|
|
2182
|
+
readonly type: "uint24";
|
|
2183
|
+
}, {
|
|
2184
|
+
readonly name: "tickSpacing";
|
|
2185
|
+
readonly type: "int24";
|
|
2186
|
+
}, {
|
|
2187
|
+
readonly name: "zeroForOne";
|
|
2188
|
+
readonly type: "bool";
|
|
2189
|
+
}, {
|
|
2190
|
+
readonly name: "stable";
|
|
2191
|
+
readonly type: "bool";
|
|
2192
|
+
}, {
|
|
2193
|
+
readonly name: "amountIn";
|
|
2194
|
+
readonly type: "uint256";
|
|
2195
|
+
}, {
|
|
2196
|
+
readonly name: "expectedOut";
|
|
2197
|
+
readonly type: "uint256";
|
|
2198
|
+
}, {
|
|
2199
|
+
readonly name: "auxId";
|
|
2200
|
+
readonly type: "bytes32";
|
|
2201
|
+
}];
|
|
2202
|
+
readonly name: "legs";
|
|
2203
|
+
readonly type: "tuple[]";
|
|
2204
|
+
}];
|
|
2205
|
+
readonly name: "hops";
|
|
2206
|
+
readonly type: "tuple[]";
|
|
2207
|
+
}, {
|
|
2208
|
+
readonly name: "totalOut";
|
|
2209
|
+
readonly type: "uint256";
|
|
2210
|
+
}, {
|
|
2211
|
+
readonly name: "singleOut";
|
|
2212
|
+
readonly type: "uint256";
|
|
2213
|
+
}, {
|
|
2214
|
+
readonly name: "singleOutFloor";
|
|
2215
|
+
readonly type: "uint256";
|
|
2216
|
+
}, {
|
|
2217
|
+
readonly name: "expectedImpactBps";
|
|
2218
|
+
readonly type: "uint256";
|
|
2219
|
+
}, {
|
|
2220
|
+
readonly name: "confidenceWad";
|
|
2221
|
+
readonly type: "uint256";
|
|
2222
|
+
}, {
|
|
2223
|
+
readonly name: "estGas";
|
|
2224
|
+
readonly type: "uint256";
|
|
2225
|
+
}, {
|
|
2226
|
+
readonly name: "hasSurplus";
|
|
2227
|
+
readonly type: "bool";
|
|
2228
|
+
}, {
|
|
2229
|
+
readonly name: "isV4Bundle";
|
|
2230
|
+
readonly type: "bool";
|
|
2231
|
+
}];
|
|
2232
|
+
readonly name: "route";
|
|
2233
|
+
readonly type: "tuple";
|
|
2234
|
+
}, {
|
|
2235
|
+
readonly name: "grossOut";
|
|
2236
|
+
readonly type: "uint256";
|
|
2237
|
+
}, {
|
|
2238
|
+
readonly name: "protocolFee";
|
|
2239
|
+
readonly type: "uint256";
|
|
2240
|
+
}, {
|
|
2241
|
+
readonly name: "safetyBuffer";
|
|
2242
|
+
readonly type: "uint256";
|
|
2243
|
+
}, {
|
|
2244
|
+
readonly name: "netOut";
|
|
2245
|
+
readonly type: "uint256";
|
|
2246
|
+
}, {
|
|
2247
|
+
readonly name: "ironFloor";
|
|
2248
|
+
readonly type: "uint256";
|
|
2249
|
+
}, {
|
|
2250
|
+
readonly name: "userMinOut";
|
|
2251
|
+
readonly type: "uint256";
|
|
2252
|
+
}, {
|
|
2253
|
+
readonly name: "effectiveMinOut";
|
|
2254
|
+
readonly type: "uint256";
|
|
2255
|
+
}, {
|
|
2256
|
+
readonly name: "estGas";
|
|
2257
|
+
readonly type: "uint256";
|
|
2258
|
+
}, {
|
|
2259
|
+
readonly name: "hops";
|
|
2260
|
+
readonly type: "uint256";
|
|
2261
|
+
}, {
|
|
2262
|
+
readonly name: "legs";
|
|
2263
|
+
readonly type: "uint256";
|
|
2264
|
+
}, {
|
|
2265
|
+
readonly name: "topology";
|
|
2266
|
+
readonly type: "uint8";
|
|
2267
|
+
}, {
|
|
2268
|
+
readonly name: "bridgeUsed";
|
|
2269
|
+
readonly type: "address";
|
|
2270
|
+
}, {
|
|
2271
|
+
readonly name: "canExecute";
|
|
2272
|
+
readonly type: "bool";
|
|
2273
|
+
}];
|
|
2274
|
+
readonly name: "pv";
|
|
2275
|
+
readonly type: "tuple";
|
|
2276
|
+
}, {
|
|
2277
|
+
readonly name: "call";
|
|
2278
|
+
readonly type: "bytes";
|
|
2279
|
+
}];
|
|
2280
|
+
readonly stateMutability: "view";
|
|
2281
|
+
readonly type: "function";
|
|
2282
|
+
}, {
|
|
2283
|
+
readonly inputs: readonly [{
|
|
2284
|
+
readonly name: "tIn";
|
|
2285
|
+
readonly type: "address";
|
|
2286
|
+
}, {
|
|
2287
|
+
readonly name: "tOut";
|
|
2288
|
+
readonly type: "address";
|
|
2289
|
+
}, {
|
|
2290
|
+
readonly name: "amountIn";
|
|
2291
|
+
readonly type: "uint256";
|
|
2292
|
+
}, {
|
|
2293
|
+
readonly name: "userMinOut";
|
|
2294
|
+
readonly type: "uint256";
|
|
2295
|
+
}, {
|
|
2296
|
+
readonly name: "recipient";
|
|
2297
|
+
readonly type: "address";
|
|
2298
|
+
}, {
|
|
2299
|
+
readonly name: "deadline";
|
|
2300
|
+
readonly type: "uint256";
|
|
2301
|
+
}];
|
|
2302
|
+
readonly name: "previewAndEncodeWithMinOut";
|
|
2303
|
+
readonly outputs: readonly [{
|
|
2304
|
+
readonly components: readonly [{
|
|
2305
|
+
readonly components: readonly [{
|
|
2306
|
+
readonly components: readonly [{
|
|
2307
|
+
readonly name: "tokenIn";
|
|
2308
|
+
readonly type: "address";
|
|
2309
|
+
}, {
|
|
2310
|
+
readonly name: "tokenOut";
|
|
2311
|
+
readonly type: "address";
|
|
2312
|
+
}, {
|
|
2313
|
+
readonly name: "amountIn";
|
|
2314
|
+
readonly type: "uint256";
|
|
2315
|
+
}, {
|
|
2316
|
+
readonly name: "expectedOut";
|
|
2317
|
+
readonly type: "uint256";
|
|
2318
|
+
}, {
|
|
2319
|
+
readonly components: readonly [{
|
|
2320
|
+
readonly name: "pool";
|
|
2321
|
+
readonly type: "address";
|
|
2322
|
+
}, {
|
|
2323
|
+
readonly name: "hooks";
|
|
2324
|
+
readonly type: "address";
|
|
2325
|
+
}, {
|
|
2326
|
+
readonly name: "kind";
|
|
2327
|
+
readonly type: "uint8";
|
|
2328
|
+
}, {
|
|
2329
|
+
readonly name: "fee";
|
|
2330
|
+
readonly type: "uint24";
|
|
2331
|
+
}, {
|
|
2332
|
+
readonly name: "tickSpacing";
|
|
2333
|
+
readonly type: "int24";
|
|
2334
|
+
}, {
|
|
2335
|
+
readonly name: "zeroForOne";
|
|
2336
|
+
readonly type: "bool";
|
|
2337
|
+
}, {
|
|
2338
|
+
readonly name: "stable";
|
|
2339
|
+
readonly type: "bool";
|
|
2340
|
+
}, {
|
|
2341
|
+
readonly name: "amountIn";
|
|
2342
|
+
readonly type: "uint256";
|
|
2343
|
+
}, {
|
|
2344
|
+
readonly name: "expectedOut";
|
|
2345
|
+
readonly type: "uint256";
|
|
2346
|
+
}, {
|
|
2347
|
+
readonly name: "auxId";
|
|
2348
|
+
readonly type: "bytes32";
|
|
2349
|
+
}];
|
|
2350
|
+
readonly name: "legs";
|
|
2351
|
+
readonly type: "tuple[]";
|
|
2352
|
+
}];
|
|
2353
|
+
readonly name: "hops";
|
|
2354
|
+
readonly type: "tuple[]";
|
|
2355
|
+
}, {
|
|
2356
|
+
readonly name: "totalOut";
|
|
2357
|
+
readonly type: "uint256";
|
|
2358
|
+
}, {
|
|
2359
|
+
readonly name: "singleOut";
|
|
2360
|
+
readonly type: "uint256";
|
|
2361
|
+
}, {
|
|
2362
|
+
readonly name: "singleOutFloor";
|
|
2363
|
+
readonly type: "uint256";
|
|
2364
|
+
}, {
|
|
2365
|
+
readonly name: "expectedImpactBps";
|
|
2366
|
+
readonly type: "uint256";
|
|
2367
|
+
}, {
|
|
2368
|
+
readonly name: "confidenceWad";
|
|
2369
|
+
readonly type: "uint256";
|
|
2370
|
+
}, {
|
|
2371
|
+
readonly name: "estGas";
|
|
2372
|
+
readonly type: "uint256";
|
|
2373
|
+
}, {
|
|
2374
|
+
readonly name: "hasSurplus";
|
|
2375
|
+
readonly type: "bool";
|
|
2376
|
+
}, {
|
|
2377
|
+
readonly name: "isV4Bundle";
|
|
2378
|
+
readonly type: "bool";
|
|
2379
|
+
}];
|
|
2380
|
+
readonly name: "route";
|
|
2381
|
+
readonly type: "tuple";
|
|
2382
|
+
}, {
|
|
2383
|
+
readonly name: "grossOut";
|
|
2384
|
+
readonly type: "uint256";
|
|
2385
|
+
}, {
|
|
2386
|
+
readonly name: "protocolFee";
|
|
2387
|
+
readonly type: "uint256";
|
|
2388
|
+
}, {
|
|
2389
|
+
readonly name: "safetyBuffer";
|
|
2390
|
+
readonly type: "uint256";
|
|
2391
|
+
}, {
|
|
2392
|
+
readonly name: "netOut";
|
|
2393
|
+
readonly type: "uint256";
|
|
2394
|
+
}, {
|
|
2395
|
+
readonly name: "ironFloor";
|
|
2396
|
+
readonly type: "uint256";
|
|
2397
|
+
}, {
|
|
2398
|
+
readonly name: "userMinOut";
|
|
2399
|
+
readonly type: "uint256";
|
|
2400
|
+
}, {
|
|
2401
|
+
readonly name: "effectiveMinOut";
|
|
2402
|
+
readonly type: "uint256";
|
|
2403
|
+
}, {
|
|
2404
|
+
readonly name: "estGas";
|
|
2405
|
+
readonly type: "uint256";
|
|
2406
|
+
}, {
|
|
2407
|
+
readonly name: "hops";
|
|
2408
|
+
readonly type: "uint256";
|
|
2409
|
+
}, {
|
|
2410
|
+
readonly name: "legs";
|
|
2411
|
+
readonly type: "uint256";
|
|
2412
|
+
}, {
|
|
2413
|
+
readonly name: "topology";
|
|
2414
|
+
readonly type: "uint8";
|
|
2415
|
+
}, {
|
|
2416
|
+
readonly name: "bridgeUsed";
|
|
2417
|
+
readonly type: "address";
|
|
2418
|
+
}, {
|
|
2419
|
+
readonly name: "canExecute";
|
|
2420
|
+
readonly type: "bool";
|
|
2421
|
+
}];
|
|
2422
|
+
readonly name: "pv";
|
|
2423
|
+
readonly type: "tuple";
|
|
2424
|
+
}, {
|
|
2425
|
+
readonly name: "call";
|
|
2426
|
+
readonly type: "bytes";
|
|
2427
|
+
}];
|
|
2428
|
+
readonly stateMutability: "view";
|
|
2429
|
+
readonly type: "function";
|
|
2430
|
+
}, {
|
|
2431
|
+
readonly inputs: readonly [{
|
|
2432
|
+
readonly name: "tIn";
|
|
2433
|
+
readonly type: "address";
|
|
2434
|
+
}, {
|
|
2435
|
+
readonly name: "tOut";
|
|
2436
|
+
readonly type: "address";
|
|
2437
|
+
}, {
|
|
2438
|
+
readonly name: "amountIn";
|
|
2439
|
+
readonly type: "uint256";
|
|
2440
|
+
}];
|
|
2441
|
+
readonly name: "previewPlan";
|
|
2442
|
+
readonly outputs: readonly [{
|
|
2443
|
+
readonly components: readonly [{
|
|
2444
|
+
readonly components: readonly [{
|
|
2445
|
+
readonly components: readonly [{
|
|
2446
|
+
readonly name: "tokenIn";
|
|
2447
|
+
readonly type: "address";
|
|
2448
|
+
}, {
|
|
2449
|
+
readonly name: "tokenOut";
|
|
2450
|
+
readonly type: "address";
|
|
2451
|
+
}, {
|
|
2452
|
+
readonly name: "amountIn";
|
|
2453
|
+
readonly type: "uint256";
|
|
2454
|
+
}, {
|
|
2455
|
+
readonly name: "expectedOut";
|
|
2456
|
+
readonly type: "uint256";
|
|
2457
|
+
}, {
|
|
2458
|
+
readonly components: readonly [{
|
|
2459
|
+
readonly name: "pool";
|
|
2460
|
+
readonly type: "address";
|
|
2461
|
+
}, {
|
|
2462
|
+
readonly name: "hooks";
|
|
2463
|
+
readonly type: "address";
|
|
2464
|
+
}, {
|
|
2465
|
+
readonly name: "kind";
|
|
2466
|
+
readonly type: "uint8";
|
|
2467
|
+
}, {
|
|
2468
|
+
readonly name: "fee";
|
|
2469
|
+
readonly type: "uint24";
|
|
2470
|
+
}, {
|
|
2471
|
+
readonly name: "tickSpacing";
|
|
2472
|
+
readonly type: "int24";
|
|
2473
|
+
}, {
|
|
2474
|
+
readonly name: "zeroForOne";
|
|
2475
|
+
readonly type: "bool";
|
|
2476
|
+
}, {
|
|
2477
|
+
readonly name: "stable";
|
|
2478
|
+
readonly type: "bool";
|
|
2479
|
+
}, {
|
|
2480
|
+
readonly name: "amountIn";
|
|
2481
|
+
readonly type: "uint256";
|
|
2482
|
+
}, {
|
|
2483
|
+
readonly name: "expectedOut";
|
|
2484
|
+
readonly type: "uint256";
|
|
2485
|
+
}, {
|
|
2486
|
+
readonly name: "auxId";
|
|
2487
|
+
readonly type: "bytes32";
|
|
2488
|
+
}];
|
|
2489
|
+
readonly name: "legs";
|
|
2490
|
+
readonly type: "tuple[]";
|
|
2491
|
+
}];
|
|
2492
|
+
readonly name: "hops";
|
|
2493
|
+
readonly type: "tuple[]";
|
|
2494
|
+
}, {
|
|
2495
|
+
readonly name: "totalOut";
|
|
2496
|
+
readonly type: "uint256";
|
|
2497
|
+
}, {
|
|
2498
|
+
readonly name: "singleOut";
|
|
2499
|
+
readonly type: "uint256";
|
|
2500
|
+
}, {
|
|
2501
|
+
readonly name: "singleOutFloor";
|
|
2502
|
+
readonly type: "uint256";
|
|
2503
|
+
}, {
|
|
2504
|
+
readonly name: "expectedImpactBps";
|
|
2505
|
+
readonly type: "uint256";
|
|
2506
|
+
}, {
|
|
2507
|
+
readonly name: "confidenceWad";
|
|
2508
|
+
readonly type: "uint256";
|
|
2509
|
+
}, {
|
|
2510
|
+
readonly name: "estGas";
|
|
2511
|
+
readonly type: "uint256";
|
|
2512
|
+
}, {
|
|
2513
|
+
readonly name: "hasSurplus";
|
|
2514
|
+
readonly type: "bool";
|
|
2515
|
+
}, {
|
|
2516
|
+
readonly name: "isV4Bundle";
|
|
2517
|
+
readonly type: "bool";
|
|
2518
|
+
}];
|
|
2519
|
+
readonly name: "route";
|
|
2520
|
+
readonly type: "tuple";
|
|
2521
|
+
}, {
|
|
2522
|
+
readonly name: "grossOut";
|
|
2523
|
+
readonly type: "uint256";
|
|
2524
|
+
}, {
|
|
2525
|
+
readonly name: "protocolFee";
|
|
2526
|
+
readonly type: "uint256";
|
|
2527
|
+
}, {
|
|
2528
|
+
readonly name: "safetyBuffer";
|
|
2529
|
+
readonly type: "uint256";
|
|
2530
|
+
}, {
|
|
2531
|
+
readonly name: "netOut";
|
|
2532
|
+
readonly type: "uint256";
|
|
2533
|
+
}, {
|
|
2534
|
+
readonly name: "ironFloor";
|
|
2535
|
+
readonly type: "uint256";
|
|
2536
|
+
}, {
|
|
2537
|
+
readonly name: "userMinOut";
|
|
2538
|
+
readonly type: "uint256";
|
|
2539
|
+
}, {
|
|
2540
|
+
readonly name: "effectiveMinOut";
|
|
2541
|
+
readonly type: "uint256";
|
|
2542
|
+
}, {
|
|
2543
|
+
readonly name: "estGas";
|
|
2544
|
+
readonly type: "uint256";
|
|
2545
|
+
}, {
|
|
2546
|
+
readonly name: "hops";
|
|
2547
|
+
readonly type: "uint256";
|
|
2548
|
+
}, {
|
|
2549
|
+
readonly name: "legs";
|
|
2550
|
+
readonly type: "uint256";
|
|
2551
|
+
}, {
|
|
2552
|
+
readonly name: "topology";
|
|
2553
|
+
readonly type: "uint8";
|
|
2554
|
+
}, {
|
|
2555
|
+
readonly name: "bridgeUsed";
|
|
2556
|
+
readonly type: "address";
|
|
2557
|
+
}, {
|
|
2558
|
+
readonly name: "canExecute";
|
|
2559
|
+
readonly type: "bool";
|
|
2560
|
+
}];
|
|
2561
|
+
readonly name: "pv";
|
|
2562
|
+
readonly type: "tuple";
|
|
2563
|
+
}, {
|
|
2564
|
+
readonly components: readonly [{
|
|
2565
|
+
readonly components: readonly [{
|
|
2566
|
+
readonly name: "tokenIn";
|
|
2567
|
+
readonly type: "address";
|
|
2568
|
+
}, {
|
|
2569
|
+
readonly name: "tokenOut";
|
|
2570
|
+
readonly type: "address";
|
|
2571
|
+
}, {
|
|
2572
|
+
readonly name: "amountIn";
|
|
2573
|
+
readonly type: "uint256";
|
|
2574
|
+
}, {
|
|
2575
|
+
readonly name: "expectedOut";
|
|
2576
|
+
readonly type: "uint256";
|
|
2577
|
+
}, {
|
|
2578
|
+
readonly components: readonly [{
|
|
2579
|
+
readonly name: "pool";
|
|
2580
|
+
readonly type: "address";
|
|
2581
|
+
}, {
|
|
2582
|
+
readonly name: "hooks";
|
|
2583
|
+
readonly type: "address";
|
|
2584
|
+
}, {
|
|
2585
|
+
readonly name: "kind";
|
|
2586
|
+
readonly type: "uint8";
|
|
2587
|
+
}, {
|
|
2588
|
+
readonly name: "fee";
|
|
2589
|
+
readonly type: "uint24";
|
|
2590
|
+
}, {
|
|
2591
|
+
readonly name: "tickSpacing";
|
|
2592
|
+
readonly type: "int24";
|
|
2593
|
+
}, {
|
|
2594
|
+
readonly name: "zeroForOne";
|
|
2595
|
+
readonly type: "bool";
|
|
2596
|
+
}, {
|
|
2597
|
+
readonly name: "stable";
|
|
2598
|
+
readonly type: "bool";
|
|
2599
|
+
}, {
|
|
2600
|
+
readonly name: "amountIn";
|
|
2601
|
+
readonly type: "uint256";
|
|
2602
|
+
}, {
|
|
2603
|
+
readonly name: "expectedOut";
|
|
2604
|
+
readonly type: "uint256";
|
|
2605
|
+
}, {
|
|
2606
|
+
readonly name: "auxId";
|
|
2607
|
+
readonly type: "bytes32";
|
|
2608
|
+
}];
|
|
2609
|
+
readonly name: "legs";
|
|
2610
|
+
readonly type: "tuple[]";
|
|
2611
|
+
}];
|
|
2612
|
+
readonly name: "hops";
|
|
2613
|
+
readonly type: "tuple[]";
|
|
2614
|
+
}, {
|
|
2615
|
+
readonly name: "totalOut";
|
|
2616
|
+
readonly type: "uint256";
|
|
2617
|
+
}, {
|
|
2618
|
+
readonly name: "singleOut";
|
|
2619
|
+
readonly type: "uint256";
|
|
2620
|
+
}, {
|
|
2621
|
+
readonly name: "singleOutFloor";
|
|
2622
|
+
readonly type: "uint256";
|
|
2623
|
+
}, {
|
|
2624
|
+
readonly name: "expectedImpactBps";
|
|
2625
|
+
readonly type: "uint256";
|
|
2626
|
+
}, {
|
|
2627
|
+
readonly name: "confidenceWad";
|
|
2628
|
+
readonly type: "uint256";
|
|
2629
|
+
}, {
|
|
2630
|
+
readonly name: "estGas";
|
|
2631
|
+
readonly type: "uint256";
|
|
2632
|
+
}, {
|
|
2633
|
+
readonly name: "hasSurplus";
|
|
2634
|
+
readonly type: "bool";
|
|
2635
|
+
}, {
|
|
2636
|
+
readonly name: "isV4Bundle";
|
|
2637
|
+
readonly type: "bool";
|
|
2638
|
+
}];
|
|
2639
|
+
readonly name: "fallbackRoute";
|
|
2640
|
+
readonly type: "tuple";
|
|
2641
|
+
}, {
|
|
2642
|
+
readonly name: "hasFallback";
|
|
2643
|
+
readonly type: "bool";
|
|
2644
|
+
}];
|
|
2645
|
+
readonly stateMutability: "view";
|
|
2646
|
+
readonly type: "function";
|
|
2647
|
+
}, {
|
|
2648
|
+
readonly inputs: readonly [{
|
|
2649
|
+
readonly name: "tIn";
|
|
2650
|
+
readonly type: "address";
|
|
2651
|
+
}, {
|
|
2652
|
+
readonly name: "tOut";
|
|
2653
|
+
readonly type: "address";
|
|
2654
|
+
}, {
|
|
2655
|
+
readonly name: "amountIn";
|
|
2656
|
+
readonly type: "uint256";
|
|
2657
|
+
}];
|
|
2658
|
+
readonly name: "previewPlanExact";
|
|
2659
|
+
readonly outputs: readonly [{
|
|
2660
|
+
readonly components: readonly [{
|
|
2661
|
+
readonly components: readonly [{
|
|
2662
|
+
readonly name: "tokenIn";
|
|
2663
|
+
readonly type: "address";
|
|
2664
|
+
}, {
|
|
2665
|
+
readonly name: "tokenOut";
|
|
2666
|
+
readonly type: "address";
|
|
2667
|
+
}, {
|
|
2668
|
+
readonly name: "amountIn";
|
|
2669
|
+
readonly type: "uint256";
|
|
2670
|
+
}, {
|
|
2671
|
+
readonly name: "expectedOut";
|
|
2672
|
+
readonly type: "uint256";
|
|
2673
|
+
}, {
|
|
2674
|
+
readonly components: readonly [{
|
|
2675
|
+
readonly name: "pool";
|
|
2676
|
+
readonly type: "address";
|
|
2677
|
+
}, {
|
|
2678
|
+
readonly name: "hooks";
|
|
2679
|
+
readonly type: "address";
|
|
2680
|
+
}, {
|
|
2681
|
+
readonly name: "kind";
|
|
2682
|
+
readonly type: "uint8";
|
|
2683
|
+
}, {
|
|
2684
|
+
readonly name: "fee";
|
|
2685
|
+
readonly type: "uint24";
|
|
2686
|
+
}, {
|
|
2687
|
+
readonly name: "tickSpacing";
|
|
2688
|
+
readonly type: "int24";
|
|
2689
|
+
}, {
|
|
2690
|
+
readonly name: "zeroForOne";
|
|
2691
|
+
readonly type: "bool";
|
|
2692
|
+
}, {
|
|
2693
|
+
readonly name: "stable";
|
|
2694
|
+
readonly type: "bool";
|
|
2695
|
+
}, {
|
|
2696
|
+
readonly name: "amountIn";
|
|
2697
|
+
readonly type: "uint256";
|
|
2698
|
+
}, {
|
|
2699
|
+
readonly name: "expectedOut";
|
|
2700
|
+
readonly type: "uint256";
|
|
2701
|
+
}, {
|
|
2702
|
+
readonly name: "auxId";
|
|
2703
|
+
readonly type: "bytes32";
|
|
2704
|
+
}];
|
|
2705
|
+
readonly name: "legs";
|
|
2706
|
+
readonly type: "tuple[]";
|
|
2707
|
+
}];
|
|
2708
|
+
readonly name: "hops";
|
|
2709
|
+
readonly type: "tuple[]";
|
|
2710
|
+
}, {
|
|
2711
|
+
readonly name: "totalOut";
|
|
2712
|
+
readonly type: "uint256";
|
|
2713
|
+
}, {
|
|
2714
|
+
readonly name: "singleOut";
|
|
2715
|
+
readonly type: "uint256";
|
|
2716
|
+
}, {
|
|
2717
|
+
readonly name: "singleOutFloor";
|
|
2718
|
+
readonly type: "uint256";
|
|
2719
|
+
}, {
|
|
2720
|
+
readonly name: "expectedImpactBps";
|
|
2721
|
+
readonly type: "uint256";
|
|
2722
|
+
}, {
|
|
2723
|
+
readonly name: "confidenceWad";
|
|
2724
|
+
readonly type: "uint256";
|
|
2725
|
+
}, {
|
|
2726
|
+
readonly name: "estGas";
|
|
2727
|
+
readonly type: "uint256";
|
|
2728
|
+
}, {
|
|
2729
|
+
readonly name: "hasSurplus";
|
|
2730
|
+
readonly type: "bool";
|
|
2731
|
+
}, {
|
|
2732
|
+
readonly name: "isV4Bundle";
|
|
2733
|
+
readonly type: "bool";
|
|
2734
|
+
}];
|
|
2735
|
+
readonly name: "route";
|
|
2736
|
+
readonly type: "tuple";
|
|
2737
|
+
}, {
|
|
2738
|
+
readonly name: "exactOut";
|
|
2739
|
+
readonly type: "uint256";
|
|
2740
|
+
}];
|
|
2741
|
+
readonly stateMutability: "view";
|
|
2742
|
+
readonly type: "function";
|
|
2743
|
+
}, {
|
|
2744
|
+
readonly inputs: readonly [{
|
|
2745
|
+
readonly name: "tIn";
|
|
2746
|
+
readonly type: "address";
|
|
2747
|
+
}, {
|
|
2748
|
+
readonly name: "tOut";
|
|
2749
|
+
readonly type: "address";
|
|
2750
|
+
}, {
|
|
2751
|
+
readonly name: "amountIn";
|
|
2752
|
+
readonly type: "uint256";
|
|
2753
|
+
}, {
|
|
2754
|
+
readonly name: "userMinOut";
|
|
2755
|
+
readonly type: "uint256";
|
|
2756
|
+
}];
|
|
2757
|
+
readonly name: "previewPlanWithMinOut";
|
|
2758
|
+
readonly outputs: readonly [{
|
|
2759
|
+
readonly components: readonly [{
|
|
2760
|
+
readonly components: readonly [{
|
|
2761
|
+
readonly components: readonly [{
|
|
2762
|
+
readonly name: "tokenIn";
|
|
2763
|
+
readonly type: "address";
|
|
2764
|
+
}, {
|
|
2765
|
+
readonly name: "tokenOut";
|
|
2766
|
+
readonly type: "address";
|
|
2767
|
+
}, {
|
|
2768
|
+
readonly name: "amountIn";
|
|
2769
|
+
readonly type: "uint256";
|
|
2770
|
+
}, {
|
|
2771
|
+
readonly name: "expectedOut";
|
|
2772
|
+
readonly type: "uint256";
|
|
2773
|
+
}, {
|
|
2774
|
+
readonly components: readonly [{
|
|
2775
|
+
readonly name: "pool";
|
|
2776
|
+
readonly type: "address";
|
|
2777
|
+
}, {
|
|
2778
|
+
readonly name: "hooks";
|
|
2779
|
+
readonly type: "address";
|
|
2780
|
+
}, {
|
|
2781
|
+
readonly name: "kind";
|
|
2782
|
+
readonly type: "uint8";
|
|
2783
|
+
}, {
|
|
2784
|
+
readonly name: "fee";
|
|
2785
|
+
readonly type: "uint24";
|
|
2786
|
+
}, {
|
|
2787
|
+
readonly name: "tickSpacing";
|
|
2788
|
+
readonly type: "int24";
|
|
2789
|
+
}, {
|
|
2790
|
+
readonly name: "zeroForOne";
|
|
2791
|
+
readonly type: "bool";
|
|
2792
|
+
}, {
|
|
2793
|
+
readonly name: "stable";
|
|
2794
|
+
readonly type: "bool";
|
|
2795
|
+
}, {
|
|
2796
|
+
readonly name: "amountIn";
|
|
2797
|
+
readonly type: "uint256";
|
|
2798
|
+
}, {
|
|
2799
|
+
readonly name: "expectedOut";
|
|
2800
|
+
readonly type: "uint256";
|
|
2801
|
+
}, {
|
|
2802
|
+
readonly name: "auxId";
|
|
2803
|
+
readonly type: "bytes32";
|
|
2804
|
+
}];
|
|
2805
|
+
readonly name: "legs";
|
|
2806
|
+
readonly type: "tuple[]";
|
|
2807
|
+
}];
|
|
2808
|
+
readonly name: "hops";
|
|
2809
|
+
readonly type: "tuple[]";
|
|
2810
|
+
}, {
|
|
2811
|
+
readonly name: "totalOut";
|
|
2812
|
+
readonly type: "uint256";
|
|
2813
|
+
}, {
|
|
2814
|
+
readonly name: "singleOut";
|
|
2815
|
+
readonly type: "uint256";
|
|
2816
|
+
}, {
|
|
2817
|
+
readonly name: "singleOutFloor";
|
|
2818
|
+
readonly type: "uint256";
|
|
2819
|
+
}, {
|
|
2820
|
+
readonly name: "expectedImpactBps";
|
|
2821
|
+
readonly type: "uint256";
|
|
2822
|
+
}, {
|
|
2823
|
+
readonly name: "confidenceWad";
|
|
2824
|
+
readonly type: "uint256";
|
|
2825
|
+
}, {
|
|
2826
|
+
readonly name: "estGas";
|
|
2827
|
+
readonly type: "uint256";
|
|
2828
|
+
}, {
|
|
2829
|
+
readonly name: "hasSurplus";
|
|
2830
|
+
readonly type: "bool";
|
|
2831
|
+
}, {
|
|
2832
|
+
readonly name: "isV4Bundle";
|
|
2833
|
+
readonly type: "bool";
|
|
2834
|
+
}];
|
|
2835
|
+
readonly name: "route";
|
|
2836
|
+
readonly type: "tuple";
|
|
2837
|
+
}, {
|
|
2838
|
+
readonly name: "grossOut";
|
|
2839
|
+
readonly type: "uint256";
|
|
2840
|
+
}, {
|
|
2841
|
+
readonly name: "protocolFee";
|
|
2842
|
+
readonly type: "uint256";
|
|
2843
|
+
}, {
|
|
2844
|
+
readonly name: "safetyBuffer";
|
|
2845
|
+
readonly type: "uint256";
|
|
2846
|
+
}, {
|
|
2847
|
+
readonly name: "netOut";
|
|
2848
|
+
readonly type: "uint256";
|
|
2849
|
+
}, {
|
|
2850
|
+
readonly name: "ironFloor";
|
|
2851
|
+
readonly type: "uint256";
|
|
2852
|
+
}, {
|
|
2853
|
+
readonly name: "userMinOut";
|
|
2854
|
+
readonly type: "uint256";
|
|
2855
|
+
}, {
|
|
2856
|
+
readonly name: "effectiveMinOut";
|
|
2857
|
+
readonly type: "uint256";
|
|
2858
|
+
}, {
|
|
2859
|
+
readonly name: "estGas";
|
|
2860
|
+
readonly type: "uint256";
|
|
2861
|
+
}, {
|
|
2862
|
+
readonly name: "hops";
|
|
2863
|
+
readonly type: "uint256";
|
|
2864
|
+
}, {
|
|
2865
|
+
readonly name: "legs";
|
|
2866
|
+
readonly type: "uint256";
|
|
2867
|
+
}, {
|
|
2868
|
+
readonly name: "topology";
|
|
2869
|
+
readonly type: "uint8";
|
|
2870
|
+
}, {
|
|
2871
|
+
readonly name: "bridgeUsed";
|
|
2872
|
+
readonly type: "address";
|
|
2873
|
+
}, {
|
|
2874
|
+
readonly name: "canExecute";
|
|
2875
|
+
readonly type: "bool";
|
|
2876
|
+
}];
|
|
2877
|
+
readonly name: "pv";
|
|
2878
|
+
readonly type: "tuple";
|
|
2879
|
+
}, {
|
|
2880
|
+
readonly components: readonly [{
|
|
2881
|
+
readonly components: readonly [{
|
|
2882
|
+
readonly name: "tokenIn";
|
|
2883
|
+
readonly type: "address";
|
|
2884
|
+
}, {
|
|
2885
|
+
readonly name: "tokenOut";
|
|
2886
|
+
readonly type: "address";
|
|
2887
|
+
}, {
|
|
2888
|
+
readonly name: "amountIn";
|
|
2889
|
+
readonly type: "uint256";
|
|
2890
|
+
}, {
|
|
2891
|
+
readonly name: "expectedOut";
|
|
2892
|
+
readonly type: "uint256";
|
|
2893
|
+
}, {
|
|
2894
|
+
readonly components: readonly [{
|
|
2895
|
+
readonly name: "pool";
|
|
2896
|
+
readonly type: "address";
|
|
2897
|
+
}, {
|
|
2898
|
+
readonly name: "hooks";
|
|
2899
|
+
readonly type: "address";
|
|
2900
|
+
}, {
|
|
2901
|
+
readonly name: "kind";
|
|
2902
|
+
readonly type: "uint8";
|
|
2903
|
+
}, {
|
|
2904
|
+
readonly name: "fee";
|
|
2905
|
+
readonly type: "uint24";
|
|
2906
|
+
}, {
|
|
2907
|
+
readonly name: "tickSpacing";
|
|
2908
|
+
readonly type: "int24";
|
|
2909
|
+
}, {
|
|
2910
|
+
readonly name: "zeroForOne";
|
|
2911
|
+
readonly type: "bool";
|
|
2912
|
+
}, {
|
|
2913
|
+
readonly name: "stable";
|
|
2914
|
+
readonly type: "bool";
|
|
2915
|
+
}, {
|
|
2916
|
+
readonly name: "amountIn";
|
|
2917
|
+
readonly type: "uint256";
|
|
2918
|
+
}, {
|
|
2919
|
+
readonly name: "expectedOut";
|
|
2920
|
+
readonly type: "uint256";
|
|
2921
|
+
}, {
|
|
2922
|
+
readonly name: "auxId";
|
|
2923
|
+
readonly type: "bytes32";
|
|
2924
|
+
}];
|
|
2925
|
+
readonly name: "legs";
|
|
2926
|
+
readonly type: "tuple[]";
|
|
2927
|
+
}];
|
|
2928
|
+
readonly name: "hops";
|
|
2929
|
+
readonly type: "tuple[]";
|
|
2930
|
+
}, {
|
|
2931
|
+
readonly name: "totalOut";
|
|
2932
|
+
readonly type: "uint256";
|
|
2933
|
+
}, {
|
|
2934
|
+
readonly name: "singleOut";
|
|
2935
|
+
readonly type: "uint256";
|
|
2936
|
+
}, {
|
|
2937
|
+
readonly name: "singleOutFloor";
|
|
2938
|
+
readonly type: "uint256";
|
|
2939
|
+
}, {
|
|
2940
|
+
readonly name: "expectedImpactBps";
|
|
2941
|
+
readonly type: "uint256";
|
|
2942
|
+
}, {
|
|
2943
|
+
readonly name: "confidenceWad";
|
|
2944
|
+
readonly type: "uint256";
|
|
2945
|
+
}, {
|
|
2946
|
+
readonly name: "estGas";
|
|
2947
|
+
readonly type: "uint256";
|
|
2948
|
+
}, {
|
|
2949
|
+
readonly name: "hasSurplus";
|
|
2950
|
+
readonly type: "bool";
|
|
2951
|
+
}, {
|
|
2952
|
+
readonly name: "isV4Bundle";
|
|
2953
|
+
readonly type: "bool";
|
|
2954
|
+
}];
|
|
2955
|
+
readonly name: "fallbackRoute";
|
|
2956
|
+
readonly type: "tuple";
|
|
2957
|
+
}, {
|
|
2958
|
+
readonly name: "hasFallback";
|
|
2959
|
+
readonly type: "bool";
|
|
2960
|
+
}];
|
|
2961
|
+
readonly stateMutability: "view";
|
|
2962
|
+
readonly type: "function";
|
|
2963
|
+
}, {
|
|
2964
|
+
readonly inputs: readonly [{
|
|
2965
|
+
readonly components: readonly [{
|
|
2966
|
+
readonly components: readonly [{
|
|
2967
|
+
readonly name: "tokenIn";
|
|
2968
|
+
readonly type: "address";
|
|
2969
|
+
}, {
|
|
2970
|
+
readonly name: "tokenOut";
|
|
2971
|
+
readonly type: "address";
|
|
2972
|
+
}, {
|
|
2973
|
+
readonly name: "amountIn";
|
|
2974
|
+
readonly type: "uint256";
|
|
2975
|
+
}, {
|
|
2976
|
+
readonly name: "expectedOut";
|
|
2977
|
+
readonly type: "uint256";
|
|
2978
|
+
}, {
|
|
2979
|
+
readonly components: readonly [{
|
|
2980
|
+
readonly name: "pool";
|
|
2981
|
+
readonly type: "address";
|
|
2982
|
+
}, {
|
|
2983
|
+
readonly name: "hooks";
|
|
2984
|
+
readonly type: "address";
|
|
2985
|
+
}, {
|
|
2986
|
+
readonly name: "kind";
|
|
2987
|
+
readonly type: "uint8";
|
|
2988
|
+
}, {
|
|
2989
|
+
readonly name: "fee";
|
|
2990
|
+
readonly type: "uint24";
|
|
2991
|
+
}, {
|
|
2992
|
+
readonly name: "tickSpacing";
|
|
2993
|
+
readonly type: "int24";
|
|
2994
|
+
}, {
|
|
2995
|
+
readonly name: "zeroForOne";
|
|
2996
|
+
readonly type: "bool";
|
|
2997
|
+
}, {
|
|
2998
|
+
readonly name: "stable";
|
|
2999
|
+
readonly type: "bool";
|
|
3000
|
+
}, {
|
|
3001
|
+
readonly name: "amountIn";
|
|
3002
|
+
readonly type: "uint256";
|
|
3003
|
+
}, {
|
|
3004
|
+
readonly name: "expectedOut";
|
|
3005
|
+
readonly type: "uint256";
|
|
3006
|
+
}, {
|
|
3007
|
+
readonly name: "auxId";
|
|
3008
|
+
readonly type: "bytes32";
|
|
3009
|
+
}];
|
|
3010
|
+
readonly name: "legs";
|
|
3011
|
+
readonly type: "tuple[]";
|
|
3012
|
+
}];
|
|
3013
|
+
readonly name: "hops";
|
|
3014
|
+
readonly type: "tuple[]";
|
|
3015
|
+
}, {
|
|
3016
|
+
readonly name: "totalOut";
|
|
3017
|
+
readonly type: "uint256";
|
|
3018
|
+
}, {
|
|
3019
|
+
readonly name: "singleOut";
|
|
3020
|
+
readonly type: "uint256";
|
|
3021
|
+
}, {
|
|
3022
|
+
readonly name: "singleOutFloor";
|
|
3023
|
+
readonly type: "uint256";
|
|
3024
|
+
}, {
|
|
3025
|
+
readonly name: "expectedImpactBps";
|
|
3026
|
+
readonly type: "uint256";
|
|
3027
|
+
}, {
|
|
3028
|
+
readonly name: "confidenceWad";
|
|
3029
|
+
readonly type: "uint256";
|
|
3030
|
+
}, {
|
|
3031
|
+
readonly name: "estGas";
|
|
3032
|
+
readonly type: "uint256";
|
|
3033
|
+
}, {
|
|
3034
|
+
readonly name: "hasSurplus";
|
|
3035
|
+
readonly type: "bool";
|
|
3036
|
+
}, {
|
|
3037
|
+
readonly name: "isV4Bundle";
|
|
3038
|
+
readonly type: "bool";
|
|
3039
|
+
}];
|
|
3040
|
+
readonly name: "route";
|
|
3041
|
+
readonly type: "tuple";
|
|
3042
|
+
}, {
|
|
3043
|
+
readonly name: "userMinOut";
|
|
3044
|
+
readonly type: "uint256";
|
|
3045
|
+
}];
|
|
3046
|
+
readonly name: "previewRoute";
|
|
3047
|
+
readonly outputs: readonly [{
|
|
3048
|
+
readonly components: readonly [{
|
|
3049
|
+
readonly components: readonly [{
|
|
3050
|
+
readonly components: readonly [{
|
|
3051
|
+
readonly name: "tokenIn";
|
|
3052
|
+
readonly type: "address";
|
|
3053
|
+
}, {
|
|
3054
|
+
readonly name: "tokenOut";
|
|
3055
|
+
readonly type: "address";
|
|
3056
|
+
}, {
|
|
3057
|
+
readonly name: "amountIn";
|
|
3058
|
+
readonly type: "uint256";
|
|
3059
|
+
}, {
|
|
3060
|
+
readonly name: "expectedOut";
|
|
3061
|
+
readonly type: "uint256";
|
|
3062
|
+
}, {
|
|
3063
|
+
readonly components: readonly [{
|
|
3064
|
+
readonly name: "pool";
|
|
3065
|
+
readonly type: "address";
|
|
3066
|
+
}, {
|
|
3067
|
+
readonly name: "hooks";
|
|
3068
|
+
readonly type: "address";
|
|
3069
|
+
}, {
|
|
3070
|
+
readonly name: "kind";
|
|
3071
|
+
readonly type: "uint8";
|
|
3072
|
+
}, {
|
|
3073
|
+
readonly name: "fee";
|
|
3074
|
+
readonly type: "uint24";
|
|
3075
|
+
}, {
|
|
3076
|
+
readonly name: "tickSpacing";
|
|
3077
|
+
readonly type: "int24";
|
|
3078
|
+
}, {
|
|
3079
|
+
readonly name: "zeroForOne";
|
|
3080
|
+
readonly type: "bool";
|
|
3081
|
+
}, {
|
|
3082
|
+
readonly name: "stable";
|
|
3083
|
+
readonly type: "bool";
|
|
3084
|
+
}, {
|
|
3085
|
+
readonly name: "amountIn";
|
|
3086
|
+
readonly type: "uint256";
|
|
3087
|
+
}, {
|
|
3088
|
+
readonly name: "expectedOut";
|
|
3089
|
+
readonly type: "uint256";
|
|
3090
|
+
}, {
|
|
3091
|
+
readonly name: "auxId";
|
|
3092
|
+
readonly type: "bytes32";
|
|
3093
|
+
}];
|
|
3094
|
+
readonly name: "legs";
|
|
3095
|
+
readonly type: "tuple[]";
|
|
3096
|
+
}];
|
|
3097
|
+
readonly name: "hops";
|
|
3098
|
+
readonly type: "tuple[]";
|
|
3099
|
+
}, {
|
|
3100
|
+
readonly name: "totalOut";
|
|
3101
|
+
readonly type: "uint256";
|
|
3102
|
+
}, {
|
|
3103
|
+
readonly name: "singleOut";
|
|
3104
|
+
readonly type: "uint256";
|
|
3105
|
+
}, {
|
|
3106
|
+
readonly name: "singleOutFloor";
|
|
3107
|
+
readonly type: "uint256";
|
|
3108
|
+
}, {
|
|
3109
|
+
readonly name: "expectedImpactBps";
|
|
3110
|
+
readonly type: "uint256";
|
|
3111
|
+
}, {
|
|
3112
|
+
readonly name: "confidenceWad";
|
|
3113
|
+
readonly type: "uint256";
|
|
3114
|
+
}, {
|
|
3115
|
+
readonly name: "estGas";
|
|
3116
|
+
readonly type: "uint256";
|
|
3117
|
+
}, {
|
|
3118
|
+
readonly name: "hasSurplus";
|
|
3119
|
+
readonly type: "bool";
|
|
3120
|
+
}, {
|
|
3121
|
+
readonly name: "isV4Bundle";
|
|
3122
|
+
readonly type: "bool";
|
|
3123
|
+
}];
|
|
3124
|
+
readonly name: "route";
|
|
3125
|
+
readonly type: "tuple";
|
|
3126
|
+
}, {
|
|
3127
|
+
readonly name: "grossOut";
|
|
3128
|
+
readonly type: "uint256";
|
|
3129
|
+
}, {
|
|
3130
|
+
readonly name: "protocolFee";
|
|
3131
|
+
readonly type: "uint256";
|
|
3132
|
+
}, {
|
|
3133
|
+
readonly name: "safetyBuffer";
|
|
3134
|
+
readonly type: "uint256";
|
|
3135
|
+
}, {
|
|
3136
|
+
readonly name: "netOut";
|
|
3137
|
+
readonly type: "uint256";
|
|
3138
|
+
}, {
|
|
3139
|
+
readonly name: "ironFloor";
|
|
3140
|
+
readonly type: "uint256";
|
|
3141
|
+
}, {
|
|
3142
|
+
readonly name: "userMinOut";
|
|
3143
|
+
readonly type: "uint256";
|
|
3144
|
+
}, {
|
|
3145
|
+
readonly name: "effectiveMinOut";
|
|
3146
|
+
readonly type: "uint256";
|
|
3147
|
+
}, {
|
|
3148
|
+
readonly name: "estGas";
|
|
3149
|
+
readonly type: "uint256";
|
|
3150
|
+
}, {
|
|
3151
|
+
readonly name: "hops";
|
|
3152
|
+
readonly type: "uint256";
|
|
3153
|
+
}, {
|
|
3154
|
+
readonly name: "legs";
|
|
3155
|
+
readonly type: "uint256";
|
|
3156
|
+
}, {
|
|
3157
|
+
readonly name: "topology";
|
|
3158
|
+
readonly type: "uint8";
|
|
3159
|
+
}, {
|
|
3160
|
+
readonly name: "bridgeUsed";
|
|
3161
|
+
readonly type: "address";
|
|
3162
|
+
}, {
|
|
3163
|
+
readonly name: "canExecute";
|
|
3164
|
+
readonly type: "bool";
|
|
3165
|
+
}];
|
|
3166
|
+
readonly name: "";
|
|
3167
|
+
readonly type: "tuple";
|
|
3168
|
+
}];
|
|
3169
|
+
readonly stateMutability: "view";
|
|
3170
|
+
readonly type: "function";
|
|
3171
|
+
}, {
|
|
3172
|
+
readonly inputs: readonly [];
|
|
3173
|
+
readonly name: "solver";
|
|
3174
|
+
readonly outputs: readonly [{
|
|
3175
|
+
readonly name: "";
|
|
3176
|
+
readonly type: "address";
|
|
3177
|
+
}];
|
|
3178
|
+
readonly stateMutability: "view";
|
|
3179
|
+
readonly type: "function";
|
|
3180
|
+
}, {
|
|
3181
|
+
readonly inputs: readonly [{
|
|
3182
|
+
readonly name: "data";
|
|
3183
|
+
readonly type: "bytes";
|
|
3184
|
+
}];
|
|
3185
|
+
readonly name: "unlockCallback";
|
|
3186
|
+
readonly outputs: readonly [{
|
|
3187
|
+
readonly name: "";
|
|
3188
|
+
readonly type: "bytes";
|
|
3189
|
+
}];
|
|
3190
|
+
readonly stateMutability: "nonpayable";
|
|
3191
|
+
readonly type: "function";
|
|
3192
|
+
}, {
|
|
3193
|
+
readonly inputs: readonly [{
|
|
3194
|
+
readonly name: "code";
|
|
3195
|
+
readonly type: "uint16";
|
|
3196
|
+
}];
|
|
3197
|
+
readonly name: "SolverE";
|
|
3198
|
+
readonly type: "error";
|
|
3199
|
+
}, {
|
|
3200
|
+
readonly inputs: readonly [{
|
|
3201
|
+
readonly name: "code";
|
|
3202
|
+
readonly type: "uint16";
|
|
3203
|
+
}];
|
|
3204
|
+
readonly name: "HubE";
|
|
3205
|
+
readonly type: "error";
|
|
3206
|
+
}, {
|
|
3207
|
+
readonly inputs: readonly [{
|
|
3208
|
+
readonly name: "code";
|
|
3209
|
+
readonly type: "uint16";
|
|
3210
|
+
}];
|
|
3211
|
+
readonly name: "RouterE";
|
|
3212
|
+
readonly type: "error";
|
|
3213
|
+
}];
|
|
3214
|
+
declare const ROUTER_ABI: readonly [{
|
|
3215
|
+
readonly inputs: readonly [{
|
|
3216
|
+
readonly name: "code";
|
|
3217
|
+
readonly type: "uint16";
|
|
3218
|
+
}];
|
|
3219
|
+
readonly name: "RouterE";
|
|
3220
|
+
readonly type: "error";
|
|
3221
|
+
}, {
|
|
3222
|
+
readonly anonymous: false;
|
|
3223
|
+
readonly inputs: readonly [{
|
|
3224
|
+
readonly indexed: false;
|
|
3225
|
+
readonly name: "id";
|
|
3226
|
+
readonly type: "uint8";
|
|
3227
|
+
}, {
|
|
3228
|
+
readonly indexed: false;
|
|
3229
|
+
readonly name: "who";
|
|
3230
|
+
readonly type: "address";
|
|
3231
|
+
}];
|
|
3232
|
+
readonly name: "Cfg";
|
|
3233
|
+
readonly type: "event";
|
|
3234
|
+
}, {
|
|
3235
|
+
readonly anonymous: false;
|
|
3236
|
+
readonly inputs: readonly [{
|
|
3237
|
+
readonly indexed: true;
|
|
3238
|
+
readonly name: "user";
|
|
3239
|
+
readonly type: "address";
|
|
3240
|
+
}, {
|
|
3241
|
+
readonly indexed: true;
|
|
3242
|
+
readonly name: "tokenOut";
|
|
3243
|
+
readonly type: "address";
|
|
3244
|
+
}, {
|
|
3245
|
+
readonly indexed: false;
|
|
3246
|
+
readonly name: "quoted";
|
|
3247
|
+
readonly type: "uint256";
|
|
3248
|
+
}, {
|
|
3249
|
+
readonly indexed: false;
|
|
3250
|
+
readonly name: "realized";
|
|
3251
|
+
readonly type: "uint256";
|
|
3252
|
+
}, {
|
|
3253
|
+
readonly indexed: false;
|
|
3254
|
+
readonly name: "floorUsed";
|
|
3255
|
+
readonly type: "uint256";
|
|
3256
|
+
}, {
|
|
3257
|
+
readonly indexed: false;
|
|
3258
|
+
readonly name: "blockNumber";
|
|
3259
|
+
readonly type: "uint256";
|
|
3260
|
+
}];
|
|
3261
|
+
readonly name: "ExecutionProof";
|
|
3262
|
+
readonly type: "event";
|
|
3263
|
+
}, {
|
|
3264
|
+
readonly anonymous: false;
|
|
3265
|
+
readonly inputs: readonly [{
|
|
3266
|
+
readonly indexed: true;
|
|
3267
|
+
readonly name: "token";
|
|
3268
|
+
readonly type: "address";
|
|
3269
|
+
}, {
|
|
3270
|
+
readonly indexed: false;
|
|
3271
|
+
readonly name: "amount";
|
|
3272
|
+
readonly type: "uint256";
|
|
3273
|
+
}, {
|
|
3274
|
+
readonly indexed: false;
|
|
3275
|
+
readonly name: "toT1";
|
|
3276
|
+
readonly type: "uint256";
|
|
3277
|
+
}, {
|
|
3278
|
+
readonly indexed: false;
|
|
3279
|
+
readonly name: "toT2";
|
|
3280
|
+
readonly type: "uint256";
|
|
3281
|
+
}];
|
|
3282
|
+
readonly name: "Fee";
|
|
3283
|
+
readonly type: "event";
|
|
3284
|
+
}, {
|
|
3285
|
+
readonly anonymous: false;
|
|
3286
|
+
readonly inputs: readonly [{
|
|
3287
|
+
readonly indexed: false;
|
|
3288
|
+
readonly name: "paused";
|
|
3289
|
+
readonly type: "bool";
|
|
3290
|
+
}];
|
|
3291
|
+
readonly name: "PausedSet";
|
|
3292
|
+
readonly type: "event";
|
|
3293
|
+
}, {
|
|
3294
|
+
readonly anonymous: false;
|
|
3295
|
+
readonly inputs: readonly [{
|
|
3296
|
+
readonly indexed: true;
|
|
3297
|
+
readonly name: "token";
|
|
3298
|
+
readonly type: "address";
|
|
3299
|
+
}, {
|
|
3300
|
+
readonly indexed: true;
|
|
3301
|
+
readonly name: "to";
|
|
3302
|
+
readonly type: "address";
|
|
3303
|
+
}, {
|
|
3304
|
+
readonly indexed: false;
|
|
3305
|
+
readonly name: "eta";
|
|
3306
|
+
readonly type: "uint256";
|
|
3307
|
+
}];
|
|
3308
|
+
readonly name: "RescueQueued";
|
|
3309
|
+
readonly type: "event";
|
|
3310
|
+
}, {
|
|
3311
|
+
readonly anonymous: false;
|
|
3312
|
+
readonly inputs: readonly [{
|
|
3313
|
+
readonly indexed: true;
|
|
3314
|
+
readonly name: "token";
|
|
3315
|
+
readonly type: "address";
|
|
3316
|
+
}, {
|
|
3317
|
+
readonly indexed: true;
|
|
3318
|
+
readonly name: "to";
|
|
3319
|
+
readonly type: "address";
|
|
3320
|
+
}, {
|
|
3321
|
+
readonly indexed: false;
|
|
3322
|
+
readonly name: "amount";
|
|
3323
|
+
readonly type: "uint256";
|
|
3324
|
+
}];
|
|
3325
|
+
readonly name: "Rescued";
|
|
3326
|
+
readonly type: "event";
|
|
3327
|
+
}, {
|
|
3328
|
+
readonly anonymous: false;
|
|
3329
|
+
readonly inputs: readonly [{
|
|
3330
|
+
readonly indexed: true;
|
|
3331
|
+
readonly name: "user";
|
|
3332
|
+
readonly type: "address";
|
|
3333
|
+
}, {
|
|
3334
|
+
readonly indexed: true;
|
|
3335
|
+
readonly name: "tokenIn";
|
|
3336
|
+
readonly type: "address";
|
|
3337
|
+
}, {
|
|
3338
|
+
readonly indexed: true;
|
|
3339
|
+
readonly name: "tokenOut";
|
|
3340
|
+
readonly type: "address";
|
|
3341
|
+
}, {
|
|
3342
|
+
readonly indexed: false;
|
|
3343
|
+
readonly name: "amountIn";
|
|
3344
|
+
readonly type: "uint256";
|
|
3345
|
+
}, {
|
|
3346
|
+
readonly indexed: false;
|
|
3347
|
+
readonly name: "amountOut";
|
|
3348
|
+
readonly type: "uint256";
|
|
3349
|
+
}, {
|
|
3350
|
+
readonly indexed: false;
|
|
3351
|
+
readonly name: "legs";
|
|
3352
|
+
readonly type: "uint256";
|
|
3353
|
+
}];
|
|
3354
|
+
readonly name: "Swap";
|
|
3355
|
+
readonly type: "event";
|
|
3356
|
+
}, {
|
|
3357
|
+
readonly inputs: readonly [];
|
|
3358
|
+
readonly name: "VERSION";
|
|
3359
|
+
readonly outputs: readonly [{
|
|
3360
|
+
readonly name: "";
|
|
3361
|
+
readonly type: "string";
|
|
3362
|
+
}];
|
|
3363
|
+
readonly stateMutability: "view";
|
|
3364
|
+
readonly type: "function";
|
|
3365
|
+
}, {
|
|
3366
|
+
readonly inputs: readonly [];
|
|
3367
|
+
readonly name: "admin";
|
|
3368
|
+
readonly outputs: readonly [{
|
|
3369
|
+
readonly name: "";
|
|
3370
|
+
readonly type: "address";
|
|
3371
|
+
}];
|
|
3372
|
+
readonly stateMutability: "view";
|
|
3373
|
+
readonly type: "function";
|
|
3374
|
+
}, {
|
|
3375
|
+
readonly inputs: readonly [{
|
|
3376
|
+
readonly name: "token";
|
|
3377
|
+
readonly type: "address";
|
|
3378
|
+
}, {
|
|
3379
|
+
readonly name: "to";
|
|
3380
|
+
readonly type: "address";
|
|
3381
|
+
}];
|
|
3382
|
+
readonly name: "cancelRescue";
|
|
3383
|
+
readonly outputs: readonly [];
|
|
3384
|
+
readonly stateMutability: "nonpayable";
|
|
3385
|
+
readonly type: "function";
|
|
3386
|
+
}, {
|
|
3387
|
+
readonly inputs: readonly [];
|
|
3388
|
+
readonly name: "controlRenounced";
|
|
3389
|
+
readonly outputs: readonly [{
|
|
3390
|
+
readonly name: "";
|
|
3391
|
+
readonly type: "bool";
|
|
3392
|
+
}];
|
|
3393
|
+
readonly stateMutability: "view";
|
|
3394
|
+
readonly type: "function";
|
|
3395
|
+
}, {
|
|
3396
|
+
readonly inputs: readonly [{
|
|
3397
|
+
readonly name: "token";
|
|
3398
|
+
readonly type: "address";
|
|
3399
|
+
}, {
|
|
3400
|
+
readonly name: "to";
|
|
3401
|
+
readonly type: "address";
|
|
3402
|
+
}];
|
|
3403
|
+
readonly name: "executeRescue";
|
|
3404
|
+
readonly outputs: readonly [];
|
|
3405
|
+
readonly stateMutability: "nonpayable";
|
|
3406
|
+
readonly type: "function";
|
|
3407
|
+
}, {
|
|
3408
|
+
readonly inputs: readonly [];
|
|
3409
|
+
readonly name: "hub";
|
|
3410
|
+
readonly outputs: readonly [{
|
|
3411
|
+
readonly name: "";
|
|
3412
|
+
readonly type: "address";
|
|
3413
|
+
}];
|
|
3414
|
+
readonly stateMutability: "view";
|
|
3415
|
+
readonly type: "function";
|
|
3416
|
+
}, {
|
|
3417
|
+
readonly inputs: readonly [];
|
|
3418
|
+
readonly name: "paused";
|
|
3419
|
+
readonly outputs: readonly [{
|
|
3420
|
+
readonly name: "";
|
|
3421
|
+
readonly type: "bool";
|
|
3422
|
+
}];
|
|
3423
|
+
readonly stateMutability: "view";
|
|
3424
|
+
readonly type: "function";
|
|
3425
|
+
}, {
|
|
3426
|
+
readonly inputs: readonly [];
|
|
3427
|
+
readonly name: "permit2";
|
|
3428
|
+
readonly outputs: readonly [{
|
|
3429
|
+
readonly name: "";
|
|
3430
|
+
readonly type: "address";
|
|
3431
|
+
}];
|
|
3432
|
+
readonly stateMutability: "view";
|
|
3433
|
+
readonly type: "function";
|
|
3434
|
+
}, {
|
|
3435
|
+
readonly inputs: readonly [{
|
|
3436
|
+
readonly name: "token";
|
|
3437
|
+
readonly type: "address";
|
|
3438
|
+
}, {
|
|
3439
|
+
readonly name: "to";
|
|
3440
|
+
readonly type: "address";
|
|
3441
|
+
}];
|
|
3442
|
+
readonly name: "queueRescue";
|
|
3443
|
+
readonly outputs: readonly [];
|
|
3444
|
+
readonly stateMutability: "nonpayable";
|
|
3445
|
+
readonly type: "function";
|
|
3446
|
+
}, {
|
|
3447
|
+
readonly inputs: readonly [];
|
|
3448
|
+
readonly name: "renounceControl";
|
|
3449
|
+
readonly outputs: readonly [];
|
|
3450
|
+
readonly stateMutability: "nonpayable";
|
|
3451
|
+
readonly type: "function";
|
|
3452
|
+
}, {
|
|
3453
|
+
readonly inputs: readonly [{
|
|
3454
|
+
readonly name: "";
|
|
3455
|
+
readonly type: "bytes32";
|
|
365
3456
|
}];
|
|
3457
|
+
readonly name: "rescueEta";
|
|
366
3458
|
readonly outputs: readonly [{
|
|
367
|
-
readonly name: "
|
|
368
|
-
readonly type: "
|
|
3459
|
+
readonly name: "";
|
|
3460
|
+
readonly type: "uint256";
|
|
3461
|
+
}];
|
|
3462
|
+
readonly stateMutability: "view";
|
|
3463
|
+
readonly type: "function";
|
|
3464
|
+
}, {
|
|
3465
|
+
readonly inputs: readonly [{
|
|
369
3466
|
readonly components: readonly [{
|
|
370
|
-
readonly name: "route";
|
|
371
|
-
readonly type: "tuple";
|
|
372
3467
|
readonly components: readonly [{
|
|
373
|
-
readonly name: "
|
|
374
|
-
readonly type: "
|
|
3468
|
+
readonly name: "tokenIn";
|
|
3469
|
+
readonly type: "address";
|
|
3470
|
+
}, {
|
|
3471
|
+
readonly name: "tokenOut";
|
|
3472
|
+
readonly type: "address";
|
|
3473
|
+
}, {
|
|
3474
|
+
readonly name: "amountIn";
|
|
3475
|
+
readonly type: "uint256";
|
|
3476
|
+
}, {
|
|
3477
|
+
readonly name: "expectedOut";
|
|
3478
|
+
readonly type: "uint256";
|
|
3479
|
+
}, {
|
|
375
3480
|
readonly components: readonly [{
|
|
376
|
-
readonly name: "
|
|
3481
|
+
readonly name: "pool";
|
|
377
3482
|
readonly type: "address";
|
|
378
3483
|
}, {
|
|
379
|
-
readonly name: "
|
|
3484
|
+
readonly name: "hooks";
|
|
380
3485
|
readonly type: "address";
|
|
3486
|
+
}, {
|
|
3487
|
+
readonly name: "kind";
|
|
3488
|
+
readonly type: "uint8";
|
|
3489
|
+
}, {
|
|
3490
|
+
readonly name: "fee";
|
|
3491
|
+
readonly type: "uint24";
|
|
3492
|
+
}, {
|
|
3493
|
+
readonly name: "tickSpacing";
|
|
3494
|
+
readonly type: "int24";
|
|
3495
|
+
}, {
|
|
3496
|
+
readonly name: "zeroForOne";
|
|
3497
|
+
readonly type: "bool";
|
|
3498
|
+
}, {
|
|
3499
|
+
readonly name: "stable";
|
|
3500
|
+
readonly type: "bool";
|
|
381
3501
|
}, {
|
|
382
3502
|
readonly name: "amountIn";
|
|
383
3503
|
readonly type: "uint256";
|
|
@@ -385,111 +3505,151 @@ declare const QUOTER_ABI: readonly [{
|
|
|
385
3505
|
readonly name: "expectedOut";
|
|
386
3506
|
readonly type: "uint256";
|
|
387
3507
|
}, {
|
|
388
|
-
readonly name: "
|
|
389
|
-
readonly type: "
|
|
390
|
-
readonly components: readonly [{
|
|
391
|
-
readonly name: "pool";
|
|
392
|
-
readonly type: "address";
|
|
393
|
-
}, {
|
|
394
|
-
readonly name: "hooks";
|
|
395
|
-
readonly type: "address";
|
|
396
|
-
}, {
|
|
397
|
-
readonly name: "kind";
|
|
398
|
-
readonly type: "uint8";
|
|
399
|
-
}, {
|
|
400
|
-
readonly name: "fee";
|
|
401
|
-
readonly type: "uint24";
|
|
402
|
-
}, {
|
|
403
|
-
readonly name: "tickSpacing";
|
|
404
|
-
readonly type: "int24";
|
|
405
|
-
}, {
|
|
406
|
-
readonly name: "zeroForOne";
|
|
407
|
-
readonly type: "bool";
|
|
408
|
-
}, {
|
|
409
|
-
readonly name: "stable";
|
|
410
|
-
readonly type: "bool";
|
|
411
|
-
}, {
|
|
412
|
-
readonly name: "amountIn";
|
|
413
|
-
readonly type: "uint256";
|
|
414
|
-
}, {
|
|
415
|
-
readonly name: "expectedOut";
|
|
416
|
-
readonly type: "uint256";
|
|
417
|
-
}, {
|
|
418
|
-
readonly name: "auxId";
|
|
419
|
-
readonly type: "bytes32";
|
|
420
|
-
}];
|
|
3508
|
+
readonly name: "auxId";
|
|
3509
|
+
readonly type: "bytes32";
|
|
421
3510
|
}];
|
|
422
|
-
|
|
423
|
-
readonly
|
|
424
|
-
readonly type: "uint256";
|
|
425
|
-
}, {
|
|
426
|
-
readonly name: "singleOut";
|
|
427
|
-
readonly type: "uint256";
|
|
428
|
-
}, {
|
|
429
|
-
readonly name: "singleOutFloor";
|
|
430
|
-
readonly type: "uint256";
|
|
431
|
-
}, {
|
|
432
|
-
readonly name: "expectedImpactBps";
|
|
433
|
-
readonly type: "uint256";
|
|
434
|
-
}, {
|
|
435
|
-
readonly name: "confidenceWad";
|
|
436
|
-
readonly type: "uint256";
|
|
437
|
-
}, {
|
|
438
|
-
readonly name: "estGas";
|
|
439
|
-
readonly type: "uint256";
|
|
440
|
-
}, {
|
|
441
|
-
readonly name: "hasSurplus";
|
|
442
|
-
readonly type: "bool";
|
|
443
|
-
}, {
|
|
444
|
-
readonly name: "isV4Bundle";
|
|
445
|
-
readonly type: "bool";
|
|
3511
|
+
readonly name: "legs";
|
|
3512
|
+
readonly type: "tuple[]";
|
|
446
3513
|
}];
|
|
3514
|
+
readonly name: "hops";
|
|
3515
|
+
readonly type: "tuple[]";
|
|
447
3516
|
}, {
|
|
448
|
-
readonly name: "
|
|
449
|
-
readonly type: "uint256";
|
|
450
|
-
}, {
|
|
451
|
-
readonly name: "protocolFee";
|
|
452
|
-
readonly type: "uint256";
|
|
453
|
-
}, {
|
|
454
|
-
readonly name: "safetyBuffer";
|
|
3517
|
+
readonly name: "totalOut";
|
|
455
3518
|
readonly type: "uint256";
|
|
456
3519
|
}, {
|
|
457
|
-
readonly name: "
|
|
3520
|
+
readonly name: "singleOut";
|
|
458
3521
|
readonly type: "uint256";
|
|
459
3522
|
}, {
|
|
460
|
-
readonly name: "
|
|
3523
|
+
readonly name: "singleOutFloor";
|
|
461
3524
|
readonly type: "uint256";
|
|
462
3525
|
}, {
|
|
463
|
-
readonly name: "
|
|
3526
|
+
readonly name: "expectedImpactBps";
|
|
464
3527
|
readonly type: "uint256";
|
|
465
3528
|
}, {
|
|
466
|
-
readonly name: "
|
|
3529
|
+
readonly name: "confidenceWad";
|
|
467
3530
|
readonly type: "uint256";
|
|
468
3531
|
}, {
|
|
469
3532
|
readonly name: "estGas";
|
|
470
3533
|
readonly type: "uint256";
|
|
471
3534
|
}, {
|
|
472
|
-
readonly name: "
|
|
473
|
-
readonly type: "
|
|
474
|
-
}, {
|
|
475
|
-
readonly name: "legs";
|
|
476
|
-
readonly type: "uint256";
|
|
477
|
-
}, {
|
|
478
|
-
readonly name: "topology";
|
|
479
|
-
readonly type: "uint8";
|
|
480
|
-
}, {
|
|
481
|
-
readonly name: "bridgeUsed";
|
|
482
|
-
readonly type: "address";
|
|
3535
|
+
readonly name: "hasSurplus";
|
|
3536
|
+
readonly type: "bool";
|
|
483
3537
|
}, {
|
|
484
|
-
readonly name: "
|
|
3538
|
+
readonly name: "isV4Bundle";
|
|
485
3539
|
readonly type: "bool";
|
|
486
3540
|
}];
|
|
487
|
-
|
|
488
|
-
readonly name: "fallbackRoute";
|
|
3541
|
+
readonly name: "route";
|
|
489
3542
|
readonly type: "tuple";
|
|
3543
|
+
}, {
|
|
3544
|
+
readonly name: "amountIn";
|
|
3545
|
+
readonly type: "uint256";
|
|
3546
|
+
}, {
|
|
3547
|
+
readonly name: "userMinOut";
|
|
3548
|
+
readonly type: "uint256";
|
|
3549
|
+
}, {
|
|
3550
|
+
readonly name: "recipient";
|
|
3551
|
+
readonly type: "address";
|
|
3552
|
+
}, {
|
|
3553
|
+
readonly name: "deadline";
|
|
3554
|
+
readonly type: "uint256";
|
|
3555
|
+
}, {
|
|
3556
|
+
readonly name: "payer";
|
|
3557
|
+
readonly type: "address";
|
|
3558
|
+
}];
|
|
3559
|
+
readonly name: "selfExecutePrePulled";
|
|
3560
|
+
readonly outputs: readonly [{
|
|
3561
|
+
readonly name: "";
|
|
3562
|
+
readonly type: "uint256";
|
|
3563
|
+
}];
|
|
3564
|
+
readonly stateMutability: "nonpayable";
|
|
3565
|
+
readonly type: "function";
|
|
3566
|
+
}, {
|
|
3567
|
+
readonly inputs: readonly [{
|
|
3568
|
+
readonly name: "a";
|
|
3569
|
+
readonly type: "address";
|
|
3570
|
+
}];
|
|
3571
|
+
readonly name: "setAdmin";
|
|
3572
|
+
readonly outputs: readonly [];
|
|
3573
|
+
readonly stateMutability: "nonpayable";
|
|
3574
|
+
readonly type: "function";
|
|
3575
|
+
}, {
|
|
3576
|
+
readonly inputs: readonly [{
|
|
3577
|
+
readonly name: "b";
|
|
3578
|
+
readonly type: "bool";
|
|
3579
|
+
}];
|
|
3580
|
+
readonly name: "setPaused";
|
|
3581
|
+
readonly outputs: readonly [];
|
|
3582
|
+
readonly stateMutability: "nonpayable";
|
|
3583
|
+
readonly type: "function";
|
|
3584
|
+
}, {
|
|
3585
|
+
readonly inputs: readonly [{
|
|
3586
|
+
readonly name: "p";
|
|
3587
|
+
readonly type: "address";
|
|
3588
|
+
}];
|
|
3589
|
+
readonly name: "setPermit2";
|
|
3590
|
+
readonly outputs: readonly [];
|
|
3591
|
+
readonly stateMutability: "nonpayable";
|
|
3592
|
+
readonly type: "function";
|
|
3593
|
+
}, {
|
|
3594
|
+
readonly inputs: readonly [{
|
|
3595
|
+
readonly name: "t1";
|
|
3596
|
+
readonly type: "address";
|
|
3597
|
+
}, {
|
|
3598
|
+
readonly name: "t2";
|
|
3599
|
+
readonly type: "address";
|
|
3600
|
+
}];
|
|
3601
|
+
readonly name: "setTreasuries";
|
|
3602
|
+
readonly outputs: readonly [];
|
|
3603
|
+
readonly stateMutability: "nonpayable";
|
|
3604
|
+
readonly type: "function";
|
|
3605
|
+
}, {
|
|
3606
|
+
readonly inputs: readonly [{
|
|
3607
|
+
readonly name: "w";
|
|
3608
|
+
readonly type: "address";
|
|
3609
|
+
}];
|
|
3610
|
+
readonly name: "setWeth";
|
|
3611
|
+
readonly outputs: readonly [];
|
|
3612
|
+
readonly stateMutability: "nonpayable";
|
|
3613
|
+
readonly type: "function";
|
|
3614
|
+
}, {
|
|
3615
|
+
readonly inputs: readonly [];
|
|
3616
|
+
readonly name: "solver";
|
|
3617
|
+
readonly outputs: readonly [{
|
|
3618
|
+
readonly name: "";
|
|
3619
|
+
readonly type: "address";
|
|
3620
|
+
}];
|
|
3621
|
+
readonly stateMutability: "view";
|
|
3622
|
+
readonly type: "function";
|
|
3623
|
+
}, {
|
|
3624
|
+
readonly inputs: readonly [{
|
|
3625
|
+
readonly name: "tokenIn";
|
|
3626
|
+
readonly type: "address";
|
|
3627
|
+
}, {
|
|
3628
|
+
readonly name: "tokenOut";
|
|
3629
|
+
readonly type: "address";
|
|
3630
|
+
}, {
|
|
3631
|
+
readonly name: "amountIn";
|
|
3632
|
+
readonly type: "uint256";
|
|
3633
|
+
}, {
|
|
3634
|
+
readonly name: "userMinOut";
|
|
3635
|
+
readonly type: "uint256";
|
|
3636
|
+
}, {
|
|
3637
|
+
readonly name: "recipient";
|
|
3638
|
+
readonly type: "address";
|
|
3639
|
+
}, {
|
|
3640
|
+
readonly name: "deadline";
|
|
3641
|
+
readonly type: "uint256";
|
|
3642
|
+
}];
|
|
3643
|
+
readonly name: "swapBestExactIn";
|
|
3644
|
+
readonly outputs: readonly [{
|
|
3645
|
+
readonly name: "";
|
|
3646
|
+
readonly type: "uint256";
|
|
3647
|
+
}];
|
|
3648
|
+
readonly stateMutability: "nonpayable";
|
|
3649
|
+
readonly type: "function";
|
|
3650
|
+
}, {
|
|
3651
|
+
readonly inputs: readonly [{
|
|
490
3652
|
readonly components: readonly [{
|
|
491
|
-
readonly name: "hops";
|
|
492
|
-
readonly type: "tuple[]";
|
|
493
3653
|
readonly components: readonly [{
|
|
494
3654
|
readonly name: "tokenIn";
|
|
495
3655
|
readonly type: "address";
|
|
@@ -503,8 +3663,6 @@ declare const QUOTER_ABI: readonly [{
|
|
|
503
3663
|
readonly name: "expectedOut";
|
|
504
3664
|
readonly type: "uint256";
|
|
505
3665
|
}, {
|
|
506
|
-
readonly name: "legs";
|
|
507
|
-
readonly type: "tuple[]";
|
|
508
3666
|
readonly components: readonly [{
|
|
509
3667
|
readonly name: "pool";
|
|
510
3668
|
readonly type: "address";
|
|
@@ -536,7 +3694,11 @@ declare const QUOTER_ABI: readonly [{
|
|
|
536
3694
|
readonly name: "auxId";
|
|
537
3695
|
readonly type: "bytes32";
|
|
538
3696
|
}];
|
|
3697
|
+
readonly name: "legs";
|
|
3698
|
+
readonly type: "tuple[]";
|
|
539
3699
|
}];
|
|
3700
|
+
readonly name: "hops";
|
|
3701
|
+
readonly type: "tuple[]";
|
|
540
3702
|
}, {
|
|
541
3703
|
readonly name: "totalOut";
|
|
542
3704
|
readonly type: "uint256";
|
|
@@ -562,30 +3724,31 @@ declare const QUOTER_ABI: readonly [{
|
|
|
562
3724
|
readonly name: "isV4Bundle";
|
|
563
3725
|
readonly type: "bool";
|
|
564
3726
|
}];
|
|
3727
|
+
readonly name: "route";
|
|
3728
|
+
readonly type: "tuple";
|
|
565
3729
|
}, {
|
|
566
|
-
readonly name: "
|
|
567
|
-
readonly type: "
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
readonly name: "previewPlanExact";
|
|
572
|
-
readonly stateMutability: "view";
|
|
573
|
-
readonly inputs: readonly [{
|
|
574
|
-
readonly name: "tIn";
|
|
575
|
-
readonly type: "address";
|
|
3730
|
+
readonly name: "amountIn";
|
|
3731
|
+
readonly type: "uint256";
|
|
3732
|
+
}, {
|
|
3733
|
+
readonly name: "userMinOut";
|
|
3734
|
+
readonly type: "uint256";
|
|
576
3735
|
}, {
|
|
577
|
-
readonly name: "
|
|
3736
|
+
readonly name: "recipient";
|
|
578
3737
|
readonly type: "address";
|
|
579
3738
|
}, {
|
|
580
|
-
readonly name: "
|
|
3739
|
+
readonly name: "deadline";
|
|
581
3740
|
readonly type: "uint256";
|
|
582
3741
|
}];
|
|
3742
|
+
readonly name: "swapExactIn";
|
|
583
3743
|
readonly outputs: readonly [{
|
|
584
|
-
readonly name: "
|
|
585
|
-
readonly type: "
|
|
3744
|
+
readonly name: "";
|
|
3745
|
+
readonly type: "uint256";
|
|
3746
|
+
}];
|
|
3747
|
+
readonly stateMutability: "nonpayable";
|
|
3748
|
+
readonly type: "function";
|
|
3749
|
+
}, {
|
|
3750
|
+
readonly inputs: readonly [{
|
|
586
3751
|
readonly components: readonly [{
|
|
587
|
-
readonly name: "hops";
|
|
588
|
-
readonly type: "tuple[]";
|
|
589
3752
|
readonly components: readonly [{
|
|
590
3753
|
readonly name: "tokenIn";
|
|
591
3754
|
readonly type: "address";
|
|
@@ -599,8 +3762,6 @@ declare const QUOTER_ABI: readonly [{
|
|
|
599
3762
|
readonly name: "expectedOut";
|
|
600
3763
|
readonly type: "uint256";
|
|
601
3764
|
}, {
|
|
602
|
-
readonly name: "legs";
|
|
603
|
-
readonly type: "tuple[]";
|
|
604
3765
|
readonly components: readonly [{
|
|
605
3766
|
readonly name: "pool";
|
|
606
3767
|
readonly type: "address";
|
|
@@ -632,7 +3793,11 @@ declare const QUOTER_ABI: readonly [{
|
|
|
632
3793
|
readonly name: "auxId";
|
|
633
3794
|
readonly type: "bytes32";
|
|
634
3795
|
}];
|
|
3796
|
+
readonly name: "legs";
|
|
3797
|
+
readonly type: "tuple[]";
|
|
635
3798
|
}];
|
|
3799
|
+
readonly name: "hops";
|
|
3800
|
+
readonly type: "tuple[]";
|
|
636
3801
|
}, {
|
|
637
3802
|
readonly name: "totalOut";
|
|
638
3803
|
readonly type: "uint256";
|
|
@@ -658,21 +3823,28 @@ declare const QUOTER_ABI: readonly [{
|
|
|
658
3823
|
readonly name: "isV4Bundle";
|
|
659
3824
|
readonly type: "bool";
|
|
660
3825
|
}];
|
|
3826
|
+
readonly name: "route";
|
|
3827
|
+
readonly type: "tuple";
|
|
661
3828
|
}, {
|
|
662
|
-
readonly name: "
|
|
3829
|
+
readonly name: "userMinOut";
|
|
3830
|
+
readonly type: "uint256";
|
|
3831
|
+
}, {
|
|
3832
|
+
readonly name: "recipient";
|
|
3833
|
+
readonly type: "address";
|
|
3834
|
+
}, {
|
|
3835
|
+
readonly name: "deadline";
|
|
663
3836
|
readonly type: "uint256";
|
|
664
3837
|
}];
|
|
665
|
-
|
|
666
|
-
|
|
3838
|
+
readonly name: "swapExactInNative";
|
|
3839
|
+
readonly outputs: readonly [{
|
|
3840
|
+
readonly name: "";
|
|
3841
|
+
readonly type: "uint256";
|
|
3842
|
+
}];
|
|
3843
|
+
readonly stateMutability: "payable";
|
|
667
3844
|
readonly type: "function";
|
|
668
|
-
|
|
669
|
-
readonly stateMutability: "nonpayable";
|
|
3845
|
+
}, {
|
|
670
3846
|
readonly inputs: readonly [{
|
|
671
|
-
readonly name: "route";
|
|
672
|
-
readonly type: "tuple";
|
|
673
3847
|
readonly components: readonly [{
|
|
674
|
-
readonly name: "hops";
|
|
675
|
-
readonly type: "tuple[]";
|
|
676
3848
|
readonly components: readonly [{
|
|
677
3849
|
readonly name: "tokenIn";
|
|
678
3850
|
readonly type: "address";
|
|
@@ -686,8 +3858,6 @@ declare const ROUTER_ABI: readonly [{
|
|
|
686
3858
|
readonly name: "expectedOut";
|
|
687
3859
|
readonly type: "uint256";
|
|
688
3860
|
}, {
|
|
689
|
-
readonly name: "legs";
|
|
690
|
-
readonly type: "tuple[]";
|
|
691
3861
|
readonly components: readonly [{
|
|
692
3862
|
readonly name: "pool";
|
|
693
3863
|
readonly type: "address";
|
|
@@ -719,7 +3889,11 @@ declare const ROUTER_ABI: readonly [{
|
|
|
719
3889
|
readonly name: "auxId";
|
|
720
3890
|
readonly type: "bytes32";
|
|
721
3891
|
}];
|
|
3892
|
+
readonly name: "legs";
|
|
3893
|
+
readonly type: "tuple[]";
|
|
722
3894
|
}];
|
|
3895
|
+
readonly name: "hops";
|
|
3896
|
+
readonly type: "tuple[]";
|
|
723
3897
|
}, {
|
|
724
3898
|
readonly name: "totalOut";
|
|
725
3899
|
readonly type: "uint256";
|
|
@@ -745,6 +3919,8 @@ declare const ROUTER_ABI: readonly [{
|
|
|
745
3919
|
readonly name: "isV4Bundle";
|
|
746
3920
|
readonly type: "bool";
|
|
747
3921
|
}];
|
|
3922
|
+
readonly name: "route";
|
|
3923
|
+
readonly type: "tuple";
|
|
748
3924
|
}, {
|
|
749
3925
|
readonly name: "amountIn";
|
|
750
3926
|
readonly type: "uint256";
|
|
@@ -757,107 +3933,416 @@ declare const ROUTER_ABI: readonly [{
|
|
|
757
3933
|
}, {
|
|
758
3934
|
readonly name: "deadline";
|
|
759
3935
|
readonly type: "uint256";
|
|
3936
|
+
}, {
|
|
3937
|
+
readonly components: readonly [{
|
|
3938
|
+
readonly components: readonly [{
|
|
3939
|
+
readonly name: "token";
|
|
3940
|
+
readonly type: "address";
|
|
3941
|
+
}, {
|
|
3942
|
+
readonly name: "amount";
|
|
3943
|
+
readonly type: "uint256";
|
|
3944
|
+
}];
|
|
3945
|
+
readonly name: "permitted";
|
|
3946
|
+
readonly type: "tuple";
|
|
3947
|
+
}, {
|
|
3948
|
+
readonly name: "nonce";
|
|
3949
|
+
readonly type: "uint256";
|
|
3950
|
+
}, {
|
|
3951
|
+
readonly name: "deadline";
|
|
3952
|
+
readonly type: "uint256";
|
|
3953
|
+
}];
|
|
3954
|
+
readonly name: "permit";
|
|
3955
|
+
readonly type: "tuple";
|
|
3956
|
+
}, {
|
|
3957
|
+
readonly name: "signature";
|
|
3958
|
+
readonly type: "bytes";
|
|
760
3959
|
}];
|
|
3960
|
+
readonly name: "swapExactInWithPermit2";
|
|
761
3961
|
readonly outputs: readonly [{
|
|
762
|
-
readonly name: "
|
|
3962
|
+
readonly name: "";
|
|
763
3963
|
readonly type: "uint256";
|
|
764
3964
|
}];
|
|
3965
|
+
readonly stateMutability: "nonpayable";
|
|
3966
|
+
readonly type: "function";
|
|
765
3967
|
}, {
|
|
766
|
-
readonly
|
|
767
|
-
readonly name: "
|
|
768
|
-
readonly
|
|
769
|
-
readonly name: "
|
|
3968
|
+
readonly inputs: readonly [];
|
|
3969
|
+
readonly name: "treasury1";
|
|
3970
|
+
readonly outputs: readonly [{
|
|
3971
|
+
readonly name: "";
|
|
770
3972
|
readonly type: "address";
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
3973
|
+
}];
|
|
3974
|
+
readonly stateMutability: "view";
|
|
3975
|
+
readonly type: "function";
|
|
3976
|
+
}, {
|
|
3977
|
+
readonly inputs: readonly [];
|
|
3978
|
+
readonly name: "treasury2";
|
|
3979
|
+
readonly outputs: readonly [{
|
|
3980
|
+
readonly name: "";
|
|
774
3981
|
readonly type: "address";
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
3982
|
+
}];
|
|
3983
|
+
readonly stateMutability: "view";
|
|
3984
|
+
readonly type: "function";
|
|
3985
|
+
}, {
|
|
3986
|
+
readonly inputs: readonly [{
|
|
3987
|
+
readonly name: "data";
|
|
3988
|
+
readonly type: "bytes";
|
|
3989
|
+
}];
|
|
3990
|
+
readonly name: "unlockCallback";
|
|
3991
|
+
readonly outputs: readonly [{
|
|
3992
|
+
readonly name: "";
|
|
3993
|
+
readonly type: "bytes";
|
|
3994
|
+
}];
|
|
3995
|
+
readonly stateMutability: "nonpayable";
|
|
3996
|
+
readonly type: "function";
|
|
3997
|
+
}, {
|
|
3998
|
+
readonly inputs: readonly [];
|
|
3999
|
+
readonly name: "weth";
|
|
4000
|
+
readonly outputs: readonly [{
|
|
4001
|
+
readonly name: "";
|
|
778
4002
|
readonly type: "address";
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
readonly
|
|
4003
|
+
}];
|
|
4004
|
+
readonly stateMutability: "view";
|
|
4005
|
+
readonly type: "function";
|
|
4006
|
+
}, {
|
|
4007
|
+
readonly inputs: readonly [{
|
|
4008
|
+
readonly name: "code";
|
|
4009
|
+
readonly type: "uint16";
|
|
4010
|
+
}];
|
|
4011
|
+
readonly name: "QuoterE";
|
|
4012
|
+
readonly type: "error";
|
|
4013
|
+
}, {
|
|
4014
|
+
readonly inputs: readonly [{
|
|
4015
|
+
readonly name: "code";
|
|
4016
|
+
readonly type: "uint16";
|
|
4017
|
+
}];
|
|
4018
|
+
readonly name: "SolverE";
|
|
4019
|
+
readonly type: "error";
|
|
4020
|
+
}, {
|
|
4021
|
+
readonly inputs: readonly [{
|
|
4022
|
+
readonly name: "code";
|
|
4023
|
+
readonly type: "uint16";
|
|
4024
|
+
}];
|
|
4025
|
+
readonly name: "HubE";
|
|
4026
|
+
readonly type: "error";
|
|
4027
|
+
}];
|
|
4028
|
+
declare const BLAZE_ERRORS_ABI: readonly [{
|
|
4029
|
+
readonly inputs: readonly [{
|
|
4030
|
+
readonly name: "code";
|
|
4031
|
+
readonly type: "uint16";
|
|
4032
|
+
}];
|
|
4033
|
+
readonly name: "QuoterE";
|
|
4034
|
+
readonly type: "error";
|
|
4035
|
+
}, {
|
|
4036
|
+
readonly inputs: readonly [{
|
|
4037
|
+
readonly name: "code";
|
|
4038
|
+
readonly type: "uint16";
|
|
4039
|
+
}];
|
|
4040
|
+
readonly name: "SolverE";
|
|
4041
|
+
readonly type: "error";
|
|
4042
|
+
}, {
|
|
4043
|
+
readonly inputs: readonly [{
|
|
4044
|
+
readonly name: "code";
|
|
4045
|
+
readonly type: "uint16";
|
|
4046
|
+
}];
|
|
4047
|
+
readonly name: "HubE";
|
|
4048
|
+
readonly type: "error";
|
|
4049
|
+
}, {
|
|
4050
|
+
readonly inputs: readonly [{
|
|
4051
|
+
readonly name: "code";
|
|
4052
|
+
readonly type: "uint16";
|
|
4053
|
+
}];
|
|
4054
|
+
readonly name: "RouterE";
|
|
4055
|
+
readonly type: "error";
|
|
4056
|
+
}];
|
|
4057
|
+
declare const ABI_SOURCE_REVISION: "07c85636f4116f98ddcfffb66e4477d7da7e9928";
|
|
4058
|
+
|
|
4059
|
+
declare const ERC20_ABI: readonly [{
|
|
4060
|
+
readonly type: "function";
|
|
4061
|
+
readonly name: "decimals";
|
|
4062
|
+
readonly stateMutability: "view";
|
|
4063
|
+
readonly inputs: readonly [];
|
|
4064
|
+
readonly outputs: readonly [{
|
|
4065
|
+
readonly type: "uint8";
|
|
4066
|
+
}];
|
|
4067
|
+
}, {
|
|
4068
|
+
readonly type: "function";
|
|
4069
|
+
readonly name: "symbol";
|
|
4070
|
+
readonly stateMutability: "view";
|
|
4071
|
+
readonly inputs: readonly [];
|
|
4072
|
+
readonly outputs: readonly [{
|
|
4073
|
+
readonly type: "string";
|
|
4074
|
+
}];
|
|
4075
|
+
}, {
|
|
4076
|
+
readonly type: "function";
|
|
4077
|
+
readonly name: "name";
|
|
4078
|
+
readonly stateMutability: "view";
|
|
4079
|
+
readonly inputs: readonly [];
|
|
4080
|
+
readonly outputs: readonly [{
|
|
4081
|
+
readonly type: "string";
|
|
4082
|
+
}];
|
|
4083
|
+
}, {
|
|
4084
|
+
readonly type: "function";
|
|
4085
|
+
readonly name: "balanceOf";
|
|
4086
|
+
readonly stateMutability: "view";
|
|
4087
|
+
readonly inputs: readonly [{
|
|
4088
|
+
readonly name: "owner";
|
|
4089
|
+
readonly type: "address";
|
|
4090
|
+
}];
|
|
4091
|
+
readonly outputs: readonly [{
|
|
786
4092
|
readonly type: "uint256";
|
|
787
|
-
|
|
4093
|
+
}];
|
|
4094
|
+
}, {
|
|
4095
|
+
readonly type: "function";
|
|
4096
|
+
readonly name: "allowance";
|
|
4097
|
+
readonly stateMutability: "view";
|
|
4098
|
+
readonly inputs: readonly [{
|
|
4099
|
+
readonly name: "owner";
|
|
4100
|
+
readonly type: "address";
|
|
788
4101
|
}, {
|
|
789
|
-
readonly name: "
|
|
4102
|
+
readonly name: "spender";
|
|
4103
|
+
readonly type: "address";
|
|
4104
|
+
}];
|
|
4105
|
+
readonly outputs: readonly [{
|
|
790
4106
|
readonly type: "uint256";
|
|
791
|
-
readonly indexed: false;
|
|
792
4107
|
}];
|
|
793
4108
|
}, {
|
|
794
|
-
readonly type: "
|
|
795
|
-
readonly name: "
|
|
4109
|
+
readonly type: "function";
|
|
4110
|
+
readonly name: "approve";
|
|
4111
|
+
readonly stateMutability: "nonpayable";
|
|
796
4112
|
readonly inputs: readonly [{
|
|
797
|
-
readonly name: "
|
|
4113
|
+
readonly name: "spender";
|
|
798
4114
|
readonly type: "address";
|
|
799
|
-
readonly indexed: true;
|
|
800
4115
|
}, {
|
|
801
4116
|
readonly name: "amount";
|
|
802
4117
|
readonly type: "uint256";
|
|
803
|
-
|
|
4118
|
+
}];
|
|
4119
|
+
readonly outputs: readonly [{
|
|
4120
|
+
readonly type: "bool";
|
|
4121
|
+
}];
|
|
4122
|
+
}];
|
|
4123
|
+
declare const WETH_ABI: readonly [{
|
|
4124
|
+
readonly type: "function";
|
|
4125
|
+
readonly name: "deposit";
|
|
4126
|
+
readonly stateMutability: "payable";
|
|
4127
|
+
readonly inputs: readonly [];
|
|
4128
|
+
readonly outputs: readonly [];
|
|
4129
|
+
}, {
|
|
4130
|
+
readonly type: "function";
|
|
4131
|
+
readonly name: "withdraw";
|
|
4132
|
+
readonly stateMutability: "nonpayable";
|
|
4133
|
+
readonly inputs: readonly [{
|
|
4134
|
+
readonly name: "wad";
|
|
4135
|
+
readonly type: "uint256";
|
|
4136
|
+
}];
|
|
4137
|
+
readonly outputs: readonly [];
|
|
4138
|
+
}];
|
|
4139
|
+
/** The staking engine's proof-of-solvency surface (BlazePhoenixStaking 3.x). */
|
|
4140
|
+
declare const STAKING_SOLVENCY_ABI: readonly [{
|
|
4141
|
+
readonly type: "function";
|
|
4142
|
+
readonly name: "solvency";
|
|
4143
|
+
readonly stateMutability: "view";
|
|
4144
|
+
readonly inputs: readonly [];
|
|
4145
|
+
readonly outputs: readonly [{
|
|
4146
|
+
readonly name: "r";
|
|
4147
|
+
readonly type: "tuple";
|
|
4148
|
+
readonly components: readonly [{
|
|
4149
|
+
readonly name: "backing";
|
|
4150
|
+
readonly type: "uint256";
|
|
4151
|
+
}, {
|
|
4152
|
+
readonly name: "owed";
|
|
4153
|
+
readonly type: "uint256";
|
|
4154
|
+
}, {
|
|
4155
|
+
readonly name: "surplus";
|
|
4156
|
+
readonly type: "uint256";
|
|
4157
|
+
}, {
|
|
4158
|
+
readonly name: "deficit";
|
|
4159
|
+
readonly type: "uint256";
|
|
4160
|
+
}, {
|
|
4161
|
+
readonly name: "solvent";
|
|
4162
|
+
readonly type: "bool";
|
|
4163
|
+
}, {
|
|
4164
|
+
readonly name: "collateralRatioWad";
|
|
4165
|
+
readonly type: "uint256";
|
|
4166
|
+
}, {
|
|
4167
|
+
readonly name: "totalStaked";
|
|
4168
|
+
readonly type: "uint256";
|
|
4169
|
+
}, {
|
|
4170
|
+
readonly name: "totalDebt";
|
|
4171
|
+
readonly type: "uint256";
|
|
4172
|
+
}, {
|
|
4173
|
+
readonly name: "rewardReserve";
|
|
4174
|
+
readonly type: "uint256";
|
|
4175
|
+
}, {
|
|
4176
|
+
readonly name: "protocolReserve";
|
|
4177
|
+
readonly type: "uint256";
|
|
4178
|
+
}, {
|
|
4179
|
+
readonly name: "pendingDistribution";
|
|
4180
|
+
readonly type: "uint256";
|
|
4181
|
+
}, {
|
|
4182
|
+
readonly name: "totalBadDebt";
|
|
4183
|
+
readonly type: "uint256";
|
|
4184
|
+
}, {
|
|
4185
|
+
readonly name: "totalUncollectedInterest";
|
|
4186
|
+
readonly type: "uint256";
|
|
4187
|
+
}];
|
|
4188
|
+
}];
|
|
4189
|
+
}, {
|
|
4190
|
+
readonly type: "function";
|
|
4191
|
+
readonly name: "isSolvent";
|
|
4192
|
+
readonly stateMutability: "view";
|
|
4193
|
+
readonly inputs: readonly [];
|
|
4194
|
+
readonly outputs: readonly [{
|
|
4195
|
+
readonly type: "bool";
|
|
804
4196
|
}];
|
|
805
4197
|
}];
|
|
806
4198
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
4199
|
+
declare function encodeSwapExactIn(route: Route, amountIn: bigint, userMinOut: bigint, recipient: Address, deadline: bigint): Hex;
|
|
4200
|
+
declare function encodeSwapExactInNative(route: Route, userMinOut: bigint, recipient: Address, deadline: bigint): Hex;
|
|
4201
|
+
declare function encodeSwapBestExactIn(tokenIn: Address, tokenOut: Address, amountIn: bigint, userMinOut: bigint, recipient: Address, deadline: bigint): Hex;
|
|
4202
|
+
interface DecodedSwapExactIn {
|
|
4203
|
+
route: Route;
|
|
4204
|
+
amountIn: bigint;
|
|
4205
|
+
userMinOut: bigint;
|
|
4206
|
+
recipient: Address;
|
|
4207
|
+
deadline: bigint;
|
|
4208
|
+
}
|
|
4209
|
+
/** Decode swapExactIn calldata (throws on any other selector). */
|
|
4210
|
+
declare function decodeSwapExactIn(data: Hex): DecodedSwapExactIn;
|
|
4211
|
+
/** Deterministic structural fingerprint of a route (bigint-safe). */
|
|
4212
|
+
declare function routeFingerprint(r: Route): string;
|
|
4213
|
+
interface SwapExpectation {
|
|
4214
|
+
tokenIn: Address;
|
|
4215
|
+
tokenOut: Address;
|
|
4216
|
+
amountIn: bigint;
|
|
4217
|
+
recipient: Address;
|
|
4218
|
+
deadline: bigint;
|
|
4219
|
+
/** The encoded minimum must be at least this (the SDK's slippage floor). */
|
|
4220
|
+
minOutAtLeast: bigint;
|
|
4221
|
+
/** When given, the encoded route must be exactly this one (the previewed route). */
|
|
4222
|
+
route?: Route;
|
|
4223
|
+
}
|
|
4224
|
+
/**
|
|
4225
|
+
* Verify Quoter-produced swapExactIn bytes against the caller's intent.
|
|
4226
|
+
* Returns the decoded call; throws `calldata_mismatch` listing every field
|
|
4227
|
+
* that disagrees. Pure — no I/O.
|
|
4228
|
+
*/
|
|
4229
|
+
declare function verifySwapExactIn(data: Hex, want: SwapExpectation): DecodedSwapExactIn;
|
|
4230
|
+
/** Re-encode verified swapExactIn bytes with a TIGHTER minimum. The route and
|
|
4231
|
+
* every other field are carried over from the Quoter's own encoding. */
|
|
4232
|
+
declare function tightenMinOut(data: Hex, minOut: bigint): Hex;
|
|
4233
|
+
/** minOut from a net quote and a slippage tolerance, never below the floor. */
|
|
4234
|
+
declare function minOutFor(netOut: bigint, slippageBps: number, floor: bigint): bigint;
|
|
4235
|
+
|
|
4236
|
+
declare const HARD_IMPACT_BPS = 2000;
|
|
4237
|
+
declare const CAUTION_IMPACT_BPS = 200;
|
|
4238
|
+
/** A route whose first hop does not start in tokenIn, whose last hop does not
|
|
4239
|
+
* end in tokenOut, or whose hops do not chain, is not the swap you asked for. */
|
|
4240
|
+
declare function routeIsConsistent(route: Route, tokenIn: Address, tokenOut: Address): boolean;
|
|
4241
|
+
declare function phoenixCheck(pv: Preview, tokenIn: Address, tokenOut: Address): QuoteChecks;
|
|
4242
|
+
|
|
4243
|
+
type BlazeErrorCode = 'rpc_required' | 'rpc_chain_mismatch' | 'rpc_error' | 'bad_request' | 'not_deployed' | 'unsupported_by_version' | 'no_route' | 'not_executable' | 'calldata_mismatch' | 'deployment_unverified' | 'reverted' | 'wallet_chain_mismatch';
|
|
4244
|
+
declare class BlazeError extends Error {
|
|
4245
|
+
readonly code: BlazeErrorCode;
|
|
4246
|
+
readonly details?: Record<string, unknown>;
|
|
4247
|
+
readonly revert?: DecodedError;
|
|
4248
|
+
constructor(code: BlazeErrorCode, message: string, opts?: {
|
|
4249
|
+
details?: Record<string, unknown>;
|
|
4250
|
+
revert?: DecodedError;
|
|
4251
|
+
cause?: unknown;
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
declare function describeProtocolError(name: string, code?: number): DecodedError;
|
|
4255
|
+
/** Decode raw revert data (0x…) into a protocol error, if it is one of ours. */
|
|
4256
|
+
declare function decodeRevertData(data: Hex | undefined): DecodedError | undefined;
|
|
4257
|
+
/** Walk any error (viem's nested ContractFunctionExecutionError, a raw RPC
|
|
4258
|
+
* error, …) and return the protocol revert inside it, if there is one. */
|
|
4259
|
+
declare function decodeBlazeError(err: unknown): DecodedError | undefined;
|
|
4260
|
+
|
|
4261
|
+
/** Unlimited allowance (2^256 − 1). Prefer EXACT amounts. */
|
|
810
4262
|
declare const MAX_UINT256: bigint;
|
|
811
4263
|
interface ApproveOptions {
|
|
812
|
-
/** ERC-20
|
|
4264
|
+
/** ERC-20 to approve (the swap's tokenIn). */
|
|
813
4265
|
token: Address;
|
|
814
|
-
/** Chain id or name — picks the Router as the default spender. */
|
|
815
4266
|
chain: ChainRef;
|
|
816
4267
|
/** Allowance in base units. Be exact; MAX_UINT256 opts into unlimited. */
|
|
817
4268
|
amount: bigint;
|
|
818
|
-
/**
|
|
4269
|
+
/** Who may pull the tokens. Default: the latest deployed Router in this
|
|
4270
|
+
* SDK's embedded snapshot — when using the client, prefer `plan.approval`,
|
|
4271
|
+
* which names the Router of the version you actually quoted. */
|
|
819
4272
|
spender?: Address;
|
|
820
4273
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
declare function
|
|
824
|
-
/**
|
|
825
|
-
|
|
4274
|
+
declare function buildApproveTx(opts: ApproveOptions): TxRequest;
|
|
4275
|
+
/** Wrap native ETH → WETH (needed on 1.x routers, which have no native entry). */
|
|
4276
|
+
declare function buildWrapTx(chain: ChainRef, amount: bigint): TxRequest;
|
|
4277
|
+
/** Unwrap WETH → native ETH (the Router always delivers WETH for ETH out). */
|
|
4278
|
+
declare function buildUnwrapTx(chain: ChainRef, amount: bigint): TxRequest;
|
|
4279
|
+
declare function randomPermit2Nonce(): bigint;
|
|
4280
|
+
interface Permit2Transfer {
|
|
4281
|
+
permitted: {
|
|
4282
|
+
token: Address;
|
|
4283
|
+
amount: bigint;
|
|
4284
|
+
};
|
|
4285
|
+
nonce: bigint;
|
|
4286
|
+
deadline: bigint;
|
|
4287
|
+
}
|
|
4288
|
+
/** EIP-712 typed data for Permit2 PermitTransferFrom — pass to signTypedData.
|
|
4289
|
+
* The spender is the Router (it becomes msg.sender of permitTransferFrom). */
|
|
4290
|
+
declare function permit2TypedData(args: {
|
|
4291
|
+
chainId: number;
|
|
4292
|
+
token: Address;
|
|
4293
|
+
amount: bigint;
|
|
4294
|
+
spender: Address;
|
|
4295
|
+
nonce: bigint;
|
|
4296
|
+
deadline: bigint;
|
|
4297
|
+
}): {
|
|
4298
|
+
domain: {
|
|
4299
|
+
name: string;
|
|
4300
|
+
chainId: number;
|
|
4301
|
+
verifyingContract: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
4302
|
+
};
|
|
4303
|
+
types: {
|
|
4304
|
+
PermitTransferFrom: {
|
|
4305
|
+
name: string;
|
|
4306
|
+
type: string;
|
|
4307
|
+
}[];
|
|
4308
|
+
TokenPermissions: {
|
|
4309
|
+
name: string;
|
|
4310
|
+
type: string;
|
|
4311
|
+
}[];
|
|
4312
|
+
};
|
|
4313
|
+
primaryType: "PermitTransferFrom";
|
|
4314
|
+
message: {
|
|
4315
|
+
permitted: {
|
|
4316
|
+
token: `0x${string}`;
|
|
4317
|
+
amount: bigint;
|
|
4318
|
+
};
|
|
4319
|
+
spender: `0x${string}`;
|
|
4320
|
+
nonce: bigint;
|
|
4321
|
+
deadline: bigint;
|
|
4322
|
+
};
|
|
4323
|
+
};
|
|
4324
|
+
declare function encodeSwapExactInWithPermit2(route: Route, amountIn: bigint, userMinOut: bigint, recipient: Address, deadline: bigint, permit: Permit2Transfer, signature: Hex): Hex;
|
|
4325
|
+
/** "1.5" + 18 → 1500000000000000000n. Pure string math — no floats. */
|
|
826
4326
|
declare function toBaseUnits(amount: string, decimals: number): bigint;
|
|
827
|
-
/** 1500000000000000000n + 18
|
|
828
|
-
* `maxDp` optionally truncates the fractional part for display. */
|
|
4327
|
+
/** 1500000000000000000n + 18 → "1.5" (trailing zeros trimmed). */
|
|
829
4328
|
declare function fromBaseUnits(v: bigint | string, decimals: number, maxDp?: number): string;
|
|
830
4329
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
interface WatchFillsOptions extends OnChainOptions {
|
|
849
|
-
onFill: (fill: Fill) => void;
|
|
850
|
-
/** Poll interval in ms (default 4000). */
|
|
851
|
-
pollMs?: number;
|
|
852
|
-
}
|
|
853
|
-
/** Stream every BlazePhoenix fill on a chain (one Router `Swap` event per
|
|
854
|
-
* swap). Returns an unwatch function. */
|
|
855
|
-
declare function watchFills(opts: WatchFillsOptions): Promise<() => void>;
|
|
856
|
-
/** Historic fills over a block range (for indexing / the quoted-vs-executed
|
|
857
|
-
* verification pattern documented at https://blazephoenix.xyz/?tab=api). */
|
|
858
|
-
declare function getFills(opts: OnChainOptions & {
|
|
859
|
-
fromBlock: bigint;
|
|
860
|
-
toBlock: bigint;
|
|
861
|
-
}): Promise<Fill[]>;
|
|
4330
|
+
type Jsonify<T> = T extends bigint ? string : T extends (infer U)[] ? Jsonify<U>[] : T extends readonly (infer U)[] ? readonly Jsonify<U>[] : T extends object ? {
|
|
4331
|
+
[K in keyof T]: Jsonify<T[K]>;
|
|
4332
|
+
} : T;
|
|
4333
|
+
declare function toJSON<T>(v: T): Jsonify<T>;
|
|
4334
|
+
|
|
4335
|
+
/** Coalesce concurrent identical work — leader runs, followers share. */
|
|
4336
|
+
declare function singleflight<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
4337
|
+
interface RetryOptions {
|
|
4338
|
+
/** Extra attempts after the first (default 2). */
|
|
4339
|
+
retries?: number;
|
|
4340
|
+
/** Base backoff in ms; grows ×3 per attempt with jitter (default 250). */
|
|
4341
|
+
backoffMs?: number;
|
|
4342
|
+
timeoutMs?: number;
|
|
4343
|
+
}
|
|
4344
|
+
/** fetch with timeout + polite retries. Returns the final Response (which may
|
|
4345
|
+
* still be an error status — non-transient statuses are never retried). */
|
|
4346
|
+
declare function resilientFetch(fetchFn: typeof fetch, url: string, init: RequestInit | undefined, opts?: RetryOptions): Promise<Response>;
|
|
862
4347
|
|
|
863
|
-
export { API_BASE, type Address, type
|
|
4348
|
+
export { ABI_SOURCE_REVISION, API_BASE, type Address, type ApprovalStep, type ApproveOptions, BLAZE_ERRORS_ABI, type BatchItem, BlazeError, type BlazeErrorCode, BlazePhoenix, CAUTION_IMPACT_BPS, CHAINS, CONTRACT_KEYS, CORE_ABI, type ChainInfo, type ChainRef, type ClientOptions, type ContractKey, type ContractOverride, type ContractOverrides, type ContractSet, DEPLOYMENTS_URL, type DecodedError, type DecodedSwapExactIn, type DeepLinkOptions, type DeploymentCheck, type DeploymentRegistry, type DeploymentReport, type DeploymentSource, type DeploymentStatus, type DeploymentVersion, EMBEDDED_DEPLOYMENTS, ERC20_ABI, EXECUTION_PROOF_TOPIC0, type Eip1193Like, type ExactQuote, type ExecuteOptions, type ExecuteResult, FEE_BPS, FEE_TOPIC0, type Fill, HARD_IMPACT_BPS, HUB_ABI, type Hex, type Hop, type Jsonify, type Leg, MAX_UINT256, NATIVE_TOKEN, PERMIT2, type Permit2Transfer, type PollOptions, type Preview, QUOTER_ABI, type Quote, type QuoteChecks, type QuoteRequest, ROUTER_ABI, Registry, type RegistryOptions, type ResolvedDeployment, type RetryOptions, type Route, type RpcConfig, RpcRouter, type RpcSource, SOLVER_ABI, STAKING_SOLVENCY_ABI, SUPPORTED_CHAIN_IDS, SURPLUS_TOPIC0, SWAP_TOPIC0, type SimulationResult, type SolvencyReport, type SupportedChainId, type SwapExpectation, type SwapPlan, type SwapRequest, type TokenInfo, type TokenRef, type TransportOptions, type TxRequest, type Verdict, type VersionFeatures, type VersionSelector, WETH_ABI, ZERO_ADDRESS, buildApproveTx, buildUnwrapTx, buildWrapTx, compareVersions, decodeBlazeError, decodeRevertData, decodeSwapExactIn, deepLink, describeProtocolError, encodeSwapBestExactIn, encodeSwapExactIn, encodeSwapExactInNative, encodeSwapExactInWithPermit2, featuresOf, fromBaseUnits, isAllowedRpcUrl, isDeployed, matchesSelector, minOutFor, permit2TypedData, phoenixCheck, pollQuote, randomPermit2Nonce, redact, resilientFetch, resolveChain, routeFingerprint, routeIsConsistent, rpcFromEnv, singleflight, tightenMinOut, toBaseUnits, toJSON, transportFrom, validateRegistry, verifySwapExactIn };
|