@latchprotocol/widgets 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +649 -0
- package/dist/adapters/binDistribution.d.ts +19 -0
- package/dist/adapters/binDistribution.d.ts.map +1 -0
- package/dist/adapters/protocol.d.ts +409 -0
- package/dist/adapters/protocol.d.ts.map +1 -0
- package/dist/adapters/sale.d.ts +142 -0
- package/dist/adapters/sale.d.ts.map +1 -0
- package/dist/adapters/viem.d.ts +89 -0
- package/dist/adapters/viem.d.ts.map +1 -0
- package/dist/callpath/constants.d.ts +218 -0
- package/dist/callpath/constants.d.ts.map +1 -0
- package/dist/callpath/launch.d.ts +1979 -0
- package/dist/callpath/launch.d.ts.map +1 -0
- package/dist/callpath/liquidity.d.ts +103 -0
- package/dist/callpath/liquidity.d.ts.map +1 -0
- package/dist/callpath/plan.d.ts +34 -0
- package/dist/callpath/plan.d.ts.map +1 -0
- package/dist/callpath/swap.d.ts +129 -0
- package/dist/callpath/swap.d.ts.map +1 -0
- package/dist/chunks/SwapWidget-DgyHAVc8.js +2404 -0
- package/dist/chunks/SwapWidget-DgyHAVc8.js.map +1 -0
- package/dist/chunks/scan-Dhu7f4Nl.js +2497 -0
- package/dist/chunks/scan-Dhu7f4Nl.js.map +1 -0
- package/dist/chunks/useLocker-D1c_NTk-.js +1613 -0
- package/dist/chunks/useLocker-D1c_NTk-.js.map +1 -0
- package/dist/components/LaunchWidget.d.ts +117 -0
- package/dist/components/LaunchWidget.d.ts.map +1 -0
- package/dist/components/LiquidityWidget.d.ts +33 -0
- package/dist/components/LiquidityWidget.d.ts.map +1 -0
- package/dist/components/LockerWidget.d.ts +51 -0
- package/dist/components/LockerWidget.d.ts.map +1 -0
- package/dist/components/LocksWidgets.d.ts +61 -0
- package/dist/components/LocksWidgets.d.ts.map +1 -0
- package/dist/components/SwapWidget.d.ts +165 -0
- package/dist/components/SwapWidget.d.ts.map +1 -0
- package/dist/components/TokenTrustPanel.d.ts +32 -0
- package/dist/components/TokenTrustPanel.d.ts.map +1 -0
- package/dist/components/lockCharts.d.ts +29 -0
- package/dist/components/lockCharts.d.ts.map +1 -0
- package/dist/components/portal.d.ts +10 -0
- package/dist/components/portal.d.ts.map +1 -0
- package/dist/components/primitives.d.ts +139 -0
- package/dist/components/primitives.d.ts.map +1 -0
- package/dist/components/swap/SwapSettings.d.ts +12 -0
- package/dist/components/swap/SwapSettings.d.ts.map +1 -0
- package/dist/components/swap/TokenSelect.d.ts +61 -0
- package/dist/components/swap/TokenSelect.d.ts.map +1 -0
- package/dist/components/swap/state.d.ts +208 -0
- package/dist/components/swap/state.d.ts.map +1 -0
- package/dist/config/chain.d.ts +163 -0
- package/dist/config/chain.d.ts.map +1 -0
- package/dist/config/integrator.d.ts +121 -0
- package/dist/config/integrator.d.ts.map +1 -0
- package/dist/context/WidgetProvider.d.ts +78 -0
- package/dist/context/WidgetProvider.d.ts.map +1 -0
- package/dist/core/clMath.d.ts +98 -0
- package/dist/core/clMath.d.ts.map +1 -0
- package/dist/core/errors.d.ts +18 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/format.d.ts +47 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/liquidityGuards.d.ts +53 -0
- package/dist/core/liquidityGuards.d.ts.map +1 -0
- package/dist/core/liquidityRefresh.d.ts +35 -0
- package/dist/core/liquidityRefresh.d.ts.map +1 -0
- package/dist/core/math.d.ts +129 -0
- package/dist/core/math.d.ts.map +1 -0
- package/dist/core/pool.d.ts +33 -0
- package/dist/core/pool.d.ts.map +1 -0
- package/dist/core/tokenLists.d.ts +46 -0
- package/dist/core/tokenLists.d.ts.map +1 -0
- package/dist/embed/iframe.d.ts +185 -0
- package/dist/embed/iframe.d.ts.map +1 -0
- package/dist/embed/lockBadge.d.ts +55 -0
- package/dist/embed/lockBadge.d.ts.map +1 -0
- package/dist/embed/webComponent.d.ts +83 -0
- package/dist/embed/webComponent.d.ts.map +1 -0
- package/dist/embed.d.ts +25 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +543 -0
- package/dist/embed.js.map +1 -0
- package/dist/headless.d.ts +60 -0
- package/dist/headless.d.ts.map +1 -0
- package/dist/headless.js +223 -0
- package/dist/headless.js.map +1 -0
- package/dist/hooks/useAsyncResource.d.ts +38 -0
- package/dist/hooks/useAsyncResource.d.ts.map +1 -0
- package/dist/hooks/useLaunch.d.ts +140 -0
- package/dist/hooks/useLaunch.d.ts.map +1 -0
- package/dist/hooks/useLiquidity.d.ts +91 -0
- package/dist/hooks/useLiquidity.d.ts.map +1 -0
- package/dist/hooks/useLocker.d.ts +77 -0
- package/dist/hooks/useLocker.d.ts.map +1 -0
- package/dist/hooks/useLocks.d.ts +33 -0
- package/dist/hooks/useLocks.d.ts.map +1 -0
- package/dist/hooks/useSwapExecute.d.ts +46 -0
- package/dist/hooks/useSwapExecute.d.ts.map +1 -0
- package/dist/hooks/useSwapQuote.d.ts +51 -0
- package/dist/hooks/useSwapQuote.d.ts.map +1 -0
- package/dist/hooks/useTokenLists.d.ts +26 -0
- package/dist/hooks/useTokenLists.d.ts.map +1 -0
- package/dist/hooks/useTokenTrust.d.ts +40 -0
- package/dist/hooks/useTokenTrust.d.ts.map +1 -0
- package/dist/hooks/useTokens.d.ts +15 -0
- package/dist/hooks/useTokens.d.ts.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1052 -0
- package/dist/index.js.map +1 -0
- package/dist/latch-embed.d.ts +19 -0
- package/dist/latch-embed.d.ts.map +1 -0
- package/dist/latch-embed.js +950 -0
- package/dist/latch-embed.js.map +1 -0
- package/dist/latch-embed.mjs +13162 -0
- package/dist/latch-embed.mjs.map +1 -0
- package/dist/locker/model.d.ts +73 -0
- package/dist/locker/model.d.ts.map +1 -0
- package/dist/locks/embedModel.d.ts +22 -0
- package/dist/locks/embedModel.d.ts.map +1 -0
- package/dist/locks/fetch.d.ts +60 -0
- package/dist/locks/fetch.d.ts.map +1 -0
- package/dist/locks/model.d.ts +143 -0
- package/dist/locks/model.d.ts.map +1 -0
- package/dist/locks/scan.d.ts +25 -0
- package/dist/locks/scan.d.ts.map +1 -0
- package/dist/styles/css.d.ts +32 -0
- package/dist/styles/css.d.ts.map +1 -0
- package/dist/styles.css +895 -0
- package/dist/trust/model.d.ts +48 -0
- package/dist/trust/model.d.ts.map +1 -0
- package/package.json +102 -0
|
@@ -0,0 +1,1979 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launch call path.
|
|
3
|
+
*
|
|
4
|
+
* ## A Latch launch is a pool, and buying into one is a swap
|
|
5
|
+
*
|
|
6
|
+
* There is no Latch sale contract. No `buy`, no soft cap, no hard cap, no
|
|
7
|
+
* allocation, no claim, no per-wallet limit. A launch is an ordinary
|
|
8
|
+
* concentrated-liquidity pool with `LaunchGuardHook` named in its `PoolKey`,
|
|
9
|
+
* a **dynamic** LP fee, and a fee schedule that decays from `initialFeeBips`
|
|
10
|
+
* to `finalFeeBips` over a window starting at the launch's start.
|
|
11
|
+
*
|
|
12
|
+
* ## Two clocks, two hook generations
|
|
13
|
+
*
|
|
14
|
+
* The `LaunchGuardHook` built from current source measures in `block.timestamp`
|
|
15
|
+
* seconds (`startTime`, `decaySeconds`). The one still deployed on Robinhood
|
|
16
|
+
* (0x8b4F…575c) measures in the EVM's `block.number` (`startBlock`,
|
|
17
|
+
* `decayBlocks`), which on Arbitrum Nitro is Ethereum's block, not the RPC's.
|
|
18
|
+
* Their structs line up word for word, so the wrong ABI returns plausible
|
|
19
|
+
* numbers rather than an error. Every record here therefore carries its
|
|
20
|
+
* `durationClock`, and every comparison takes "now" on that same clock: the
|
|
21
|
+
* latest block's timestamp, or `readContractBlockNumber`.
|
|
22
|
+
*
|
|
23
|
+
* That single design decision is what shapes this file. From the hook's own
|
|
24
|
+
* source (`packages/hooks/src/launch/LaunchGuardHook.sol`):
|
|
25
|
+
*
|
|
26
|
+
* > THE `sender` ARGUMENT OF EVERY HOOK CALLBACK IS THE LOCKER, NOT THE END
|
|
27
|
+
* > USER. […] Consequence: NO identity-based protection is implementable at
|
|
28
|
+
* > this layer. There are no per-wallet caps, no allowlists, and no "one buy
|
|
29
|
+
* > per address" rules in this hook, because none of them could be enforced
|
|
30
|
+
* > honestly.
|
|
31
|
+
*
|
|
32
|
+
* So there is nothing per-account to read and nothing per-account to display.
|
|
33
|
+
* Everything the hook knows is keyed by `PoolId`, and the only write path is
|
|
34
|
+
* a swap through the router — which this package already encodes correctly in
|
|
35
|
+
* {@link ./swap.js}. {@link buildLaunchBuyCall} therefore does not invent a
|
|
36
|
+
* second call path: it checks the gates the hook will check, and then delegates
|
|
37
|
+
* to `buildSwapCall`.
|
|
38
|
+
*
|
|
39
|
+
* ## What this file reads
|
|
40
|
+
*
|
|
41
|
+
* `LAUNCH_GUARD_HOOK_ABI` comes from `@latchprotocol/sdk`, which generates it
|
|
42
|
+
* from compiled artifacts rather than from the GPL Solidity sources, so nothing
|
|
43
|
+
* here puts an MIT consumer inside the core contracts' licence.
|
|
44
|
+
*
|
|
45
|
+
* Three views on the hook matter to a UI, all keyed by pool id:
|
|
46
|
+
*
|
|
47
|
+
* ```solidity
|
|
48
|
+
* function getLaunch(PoolId poolId) external view returns (Launch memory);
|
|
49
|
+
* function currentFee(PoolId poolId) external view returns (uint24);
|
|
50
|
+
* function feeAt(PoolId poolId, uint256 timestampOrBlock) external view returns (uint24);
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ## A naming trap worth stating once
|
|
54
|
+
*
|
|
55
|
+
* The struct fields are called `initialFeeBips` and `finalFeeBips`, but the
|
|
56
|
+
* hook's own denominator is
|
|
57
|
+
*
|
|
58
|
+
* ```solidity
|
|
59
|
+
* uint24 public constant FEE_DENOMINATOR = LPFeeLibrary.ONE_HUNDRED_PERCENT_FEE; // 1_000_000
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* so the unit is **pips** (hundredths of a basis point), not bips: `3_000` is
|
|
63
|
+
* 0.30%, not 30%. The ABI keeps the contract's spelling because that is the
|
|
64
|
+
* ABI; the TypeScript below says `Pips`, because that is what the number means.
|
|
65
|
+
* Rendering these with a bps formatter would overstate every launch fee 100x.
|
|
66
|
+
*/
|
|
67
|
+
import { type Address } from "viem";
|
|
68
|
+
import { LAUNCH_GUARD_HOOK_ABI, LAUNCH_GUARD_HOOK_BLOCK_ABI, type DurationClock } from "@latchprotocol/sdk";
|
|
69
|
+
import { type BuildSwapCallArgs, type EncodedSwapCall, type SwapHop } from "./swap.js";
|
|
70
|
+
/**
|
|
71
|
+
* The hook's ABIs, re-exported so callers need not depend on the SDK directly.
|
|
72
|
+
* `LAUNCH_GUARD_HOOK_ABI` is the timestamp generation; `LAUNCH_GUARD_HOOK_BLOCK_ABI`
|
|
73
|
+
* the block-numbered one still deployed. Select with {@link launchGuardAbiFor}.
|
|
74
|
+
*/
|
|
75
|
+
export { LAUNCH_GUARD_HOOK_ABI, LAUNCH_GUARD_HOOK_BLOCK_ABI };
|
|
76
|
+
export type { DurationClock };
|
|
77
|
+
/** The ABI that decodes a hook of this clock correctly. */
|
|
78
|
+
export declare function launchGuardAbiFor(clock: DurationClock): readonly [{
|
|
79
|
+
readonly type: "error";
|
|
80
|
+
readonly name: "BuyExceedsMaxPerTx";
|
|
81
|
+
readonly inputs: readonly [{
|
|
82
|
+
readonly name: "amountIn";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
readonly internalType: "uint256";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "maxBuyPerTx";
|
|
87
|
+
readonly type: "uint128";
|
|
88
|
+
readonly internalType: "uint128";
|
|
89
|
+
}];
|
|
90
|
+
}, {
|
|
91
|
+
readonly type: "error";
|
|
92
|
+
readonly name: "CurrencyHasNoCode";
|
|
93
|
+
readonly inputs: readonly [{
|
|
94
|
+
readonly name: "currency";
|
|
95
|
+
readonly type: "address";
|
|
96
|
+
readonly internalType: "address";
|
|
97
|
+
}];
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "error";
|
|
100
|
+
readonly name: "ExactOutputBuyBlockedDuringLaunch";
|
|
101
|
+
readonly inputs: readonly [];
|
|
102
|
+
}, {
|
|
103
|
+
readonly type: "error";
|
|
104
|
+
readonly name: "HookMismatch";
|
|
105
|
+
readonly inputs: readonly [{
|
|
106
|
+
readonly name: "declared";
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
readonly internalType: "address";
|
|
109
|
+
}];
|
|
110
|
+
}, {
|
|
111
|
+
readonly type: "error";
|
|
112
|
+
readonly name: "HookNotImplemented";
|
|
113
|
+
readonly inputs: readonly [];
|
|
114
|
+
}, {
|
|
115
|
+
readonly type: "error";
|
|
116
|
+
readonly name: "InsufficientBackedBalance";
|
|
117
|
+
readonly inputs: readonly [{
|
|
118
|
+
readonly name: "currency";
|
|
119
|
+
readonly type: "address";
|
|
120
|
+
readonly internalType: "Currency";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "needed";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
readonly internalType: "uint256";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "available";
|
|
127
|
+
readonly type: "uint256";
|
|
128
|
+
readonly internalType: "uint256";
|
|
129
|
+
}];
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "error";
|
|
132
|
+
readonly name: "InvalidDecaySeconds";
|
|
133
|
+
readonly inputs: readonly [{
|
|
134
|
+
readonly name: "decaySeconds";
|
|
135
|
+
readonly type: "uint32";
|
|
136
|
+
readonly internalType: "uint32";
|
|
137
|
+
}];
|
|
138
|
+
}, {
|
|
139
|
+
readonly type: "error";
|
|
140
|
+
readonly name: "InvalidFeeSchedule";
|
|
141
|
+
readonly inputs: readonly [{
|
|
142
|
+
readonly name: "initialFeeBips";
|
|
143
|
+
readonly type: "uint24";
|
|
144
|
+
readonly internalType: "uint24";
|
|
145
|
+
}, {
|
|
146
|
+
readonly name: "finalFeeBips";
|
|
147
|
+
readonly type: "uint24";
|
|
148
|
+
readonly internalType: "uint24";
|
|
149
|
+
}];
|
|
150
|
+
}, {
|
|
151
|
+
readonly type: "error";
|
|
152
|
+
readonly name: "InvalidRecipient";
|
|
153
|
+
readonly inputs: readonly [];
|
|
154
|
+
}, {
|
|
155
|
+
readonly type: "error";
|
|
156
|
+
readonly name: "InvalidStartTime";
|
|
157
|
+
readonly inputs: readonly [{
|
|
158
|
+
readonly name: "startTime";
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
readonly internalType: "uint256";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "currentTime";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
}];
|
|
166
|
+
}, {
|
|
167
|
+
readonly type: "error";
|
|
168
|
+
readonly name: "InvalidTaxRecipient";
|
|
169
|
+
readonly inputs: readonly [{
|
|
170
|
+
readonly name: "recipient";
|
|
171
|
+
readonly type: "address";
|
|
172
|
+
readonly internalType: "address";
|
|
173
|
+
}];
|
|
174
|
+
}, {
|
|
175
|
+
readonly type: "error";
|
|
176
|
+
readonly name: "LaunchAlreadyStarted";
|
|
177
|
+
readonly inputs: readonly [{
|
|
178
|
+
readonly name: "poolId";
|
|
179
|
+
readonly type: "bytes32";
|
|
180
|
+
readonly internalType: "PoolId";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "startTime";
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
readonly internalType: "uint256";
|
|
185
|
+
}];
|
|
186
|
+
}, {
|
|
187
|
+
readonly type: "error";
|
|
188
|
+
readonly name: "LaunchNotConfigured";
|
|
189
|
+
readonly inputs: readonly [{
|
|
190
|
+
readonly name: "poolId";
|
|
191
|
+
readonly type: "bytes32";
|
|
192
|
+
readonly internalType: "PoolId";
|
|
193
|
+
}];
|
|
194
|
+
}, {
|
|
195
|
+
readonly type: "error";
|
|
196
|
+
readonly name: "LaunchPoolReserved";
|
|
197
|
+
readonly inputs: readonly [{
|
|
198
|
+
readonly name: "token";
|
|
199
|
+
readonly type: "address";
|
|
200
|
+
readonly internalType: "address";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "creator";
|
|
203
|
+
readonly type: "address";
|
|
204
|
+
readonly internalType: "address";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "caller";
|
|
207
|
+
readonly type: "address";
|
|
208
|
+
readonly internalType: "address";
|
|
209
|
+
}];
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "error";
|
|
212
|
+
readonly name: "NativeNotAccepted";
|
|
213
|
+
readonly inputs: readonly [];
|
|
214
|
+
}, {
|
|
215
|
+
readonly type: "error";
|
|
216
|
+
readonly name: "NotLaunchOwner";
|
|
217
|
+
readonly inputs: readonly [{
|
|
218
|
+
readonly name: "poolId";
|
|
219
|
+
readonly type: "bytes32";
|
|
220
|
+
readonly internalType: "PoolId";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "caller";
|
|
223
|
+
readonly type: "address";
|
|
224
|
+
readonly internalType: "address";
|
|
225
|
+
}];
|
|
226
|
+
}, {
|
|
227
|
+
readonly type: "error";
|
|
228
|
+
readonly name: "NotPoolManager";
|
|
229
|
+
readonly inputs: readonly [];
|
|
230
|
+
}, {
|
|
231
|
+
readonly type: "error";
|
|
232
|
+
readonly name: "NotTokenCreator";
|
|
233
|
+
readonly inputs: readonly [{
|
|
234
|
+
readonly name: "token";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "caller";
|
|
239
|
+
readonly type: "address";
|
|
240
|
+
readonly internalType: "address";
|
|
241
|
+
}];
|
|
242
|
+
}, {
|
|
243
|
+
readonly type: "error";
|
|
244
|
+
readonly name: "NothingToClaim";
|
|
245
|
+
readonly inputs: readonly [];
|
|
246
|
+
}, {
|
|
247
|
+
readonly type: "error";
|
|
248
|
+
readonly name: "NothingToSkim";
|
|
249
|
+
readonly inputs: readonly [{
|
|
250
|
+
readonly name: "currency";
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
readonly internalType: "Currency";
|
|
253
|
+
}];
|
|
254
|
+
}, {
|
|
255
|
+
readonly type: "error";
|
|
256
|
+
readonly name: "PermissionDependencyMissing";
|
|
257
|
+
readonly inputs: readonly [{
|
|
258
|
+
readonly name: "declared";
|
|
259
|
+
readonly type: "uint16";
|
|
260
|
+
readonly internalType: "uint16";
|
|
261
|
+
}];
|
|
262
|
+
}, {
|
|
263
|
+
readonly type: "error";
|
|
264
|
+
readonly name: "PoolManagerMismatch";
|
|
265
|
+
readonly inputs: readonly [{
|
|
266
|
+
readonly name: "declared";
|
|
267
|
+
readonly type: "address";
|
|
268
|
+
readonly internalType: "address";
|
|
269
|
+
}];
|
|
270
|
+
}, {
|
|
271
|
+
readonly type: "error";
|
|
272
|
+
readonly name: "PoolMustUseDynamicFee";
|
|
273
|
+
readonly inputs: readonly [{
|
|
274
|
+
readonly name: "fee";
|
|
275
|
+
readonly type: "uint24";
|
|
276
|
+
readonly internalType: "uint24";
|
|
277
|
+
}];
|
|
278
|
+
}, {
|
|
279
|
+
readonly type: "error";
|
|
280
|
+
readonly name: "ReentrancyGuardReentrantCall";
|
|
281
|
+
readonly inputs: readonly [];
|
|
282
|
+
}, {
|
|
283
|
+
readonly type: "error";
|
|
284
|
+
readonly name: "ReservedBitsSet";
|
|
285
|
+
readonly inputs: readonly [{
|
|
286
|
+
readonly name: "declared";
|
|
287
|
+
readonly type: "uint16";
|
|
288
|
+
readonly internalType: "uint16";
|
|
289
|
+
}];
|
|
290
|
+
}, {
|
|
291
|
+
readonly type: "error";
|
|
292
|
+
readonly name: "TaxExpiryOutOfRange";
|
|
293
|
+
readonly inputs: readonly [{
|
|
294
|
+
readonly name: "expiresAt";
|
|
295
|
+
readonly type: "uint40";
|
|
296
|
+
readonly internalType: "uint40";
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "currentTime";
|
|
299
|
+
readonly type: "uint256";
|
|
300
|
+
readonly internalType: "uint256";
|
|
301
|
+
}];
|
|
302
|
+
}, {
|
|
303
|
+
readonly type: "error";
|
|
304
|
+
readonly name: "TaxIntegratorShareTooHigh";
|
|
305
|
+
readonly inputs: readonly [{
|
|
306
|
+
readonly name: "bps";
|
|
307
|
+
readonly type: "uint16";
|
|
308
|
+
readonly internalType: "uint16";
|
|
309
|
+
}];
|
|
310
|
+
}, {
|
|
311
|
+
readonly type: "error";
|
|
312
|
+
readonly name: "TaxProtocolShareOutOfBounds";
|
|
313
|
+
readonly inputs: readonly [{
|
|
314
|
+
readonly name: "bps";
|
|
315
|
+
readonly type: "uint16";
|
|
316
|
+
readonly internalType: "uint16";
|
|
317
|
+
}];
|
|
318
|
+
}, {
|
|
319
|
+
readonly type: "error";
|
|
320
|
+
readonly name: "TaxRateTooHigh";
|
|
321
|
+
readonly inputs: readonly [{
|
|
322
|
+
readonly name: "bps";
|
|
323
|
+
readonly type: "uint16";
|
|
324
|
+
readonly internalType: "uint16";
|
|
325
|
+
}];
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "error";
|
|
328
|
+
readonly name: "TaxRecipientMismatch";
|
|
329
|
+
readonly inputs: readonly [{
|
|
330
|
+
readonly name: "recipient";
|
|
331
|
+
readonly type: "address";
|
|
332
|
+
readonly internalType: "address";
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "bps";
|
|
335
|
+
readonly type: "uint16";
|
|
336
|
+
readonly internalType: "uint16";
|
|
337
|
+
}];
|
|
338
|
+
}, {
|
|
339
|
+
readonly type: "error";
|
|
340
|
+
readonly name: "TaxSplitDoesNotSum";
|
|
341
|
+
readonly inputs: readonly [{
|
|
342
|
+
readonly name: "sum";
|
|
343
|
+
readonly type: "uint256";
|
|
344
|
+
readonly internalType: "uint256";
|
|
345
|
+
}];
|
|
346
|
+
}, {
|
|
347
|
+
readonly type: "error";
|
|
348
|
+
readonly name: "TaxWithoutRate";
|
|
349
|
+
readonly inputs: readonly [];
|
|
350
|
+
}, {
|
|
351
|
+
readonly type: "error";
|
|
352
|
+
readonly name: "TradingNotOpen";
|
|
353
|
+
readonly inputs: readonly [{
|
|
354
|
+
readonly name: "poolId";
|
|
355
|
+
readonly type: "bytes32";
|
|
356
|
+
readonly internalType: "PoolId";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "startTime";
|
|
359
|
+
readonly type: "uint256";
|
|
360
|
+
readonly internalType: "uint256";
|
|
361
|
+
}, {
|
|
362
|
+
readonly name: "currentTime";
|
|
363
|
+
readonly type: "uint256";
|
|
364
|
+
readonly internalType: "uint256";
|
|
365
|
+
}];
|
|
366
|
+
}, {
|
|
367
|
+
readonly type: "error";
|
|
368
|
+
readonly name: "UnexpectedLockCallback";
|
|
369
|
+
readonly inputs: readonly [];
|
|
370
|
+
}, {
|
|
371
|
+
readonly type: "error";
|
|
372
|
+
readonly name: "ZeroAddress";
|
|
373
|
+
readonly inputs: readonly [];
|
|
374
|
+
}, {
|
|
375
|
+
readonly type: "event";
|
|
376
|
+
readonly name: "LaunchClaimed";
|
|
377
|
+
readonly inputs: readonly [{
|
|
378
|
+
readonly name: "poolId";
|
|
379
|
+
readonly type: "bytes32";
|
|
380
|
+
readonly indexed: true;
|
|
381
|
+
readonly internalType: "PoolId";
|
|
382
|
+
}, {
|
|
383
|
+
readonly name: "owner";
|
|
384
|
+
readonly type: "address";
|
|
385
|
+
readonly indexed: true;
|
|
386
|
+
readonly internalType: "address";
|
|
387
|
+
}];
|
|
388
|
+
readonly anonymous: false;
|
|
389
|
+
}, {
|
|
390
|
+
readonly type: "event";
|
|
391
|
+
readonly name: "LaunchClaimerSet";
|
|
392
|
+
readonly inputs: readonly [{
|
|
393
|
+
readonly name: "token";
|
|
394
|
+
readonly type: "address";
|
|
395
|
+
readonly indexed: true;
|
|
396
|
+
readonly internalType: "address";
|
|
397
|
+
}, {
|
|
398
|
+
readonly name: "creator";
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
readonly indexed: true;
|
|
401
|
+
readonly internalType: "address";
|
|
402
|
+
}, {
|
|
403
|
+
readonly name: "claimer";
|
|
404
|
+
readonly type: "address";
|
|
405
|
+
readonly indexed: true;
|
|
406
|
+
readonly internalType: "address";
|
|
407
|
+
}];
|
|
408
|
+
readonly anonymous: false;
|
|
409
|
+
}, {
|
|
410
|
+
readonly type: "event";
|
|
411
|
+
readonly name: "LaunchConfigured";
|
|
412
|
+
readonly inputs: readonly [{
|
|
413
|
+
readonly name: "poolId";
|
|
414
|
+
readonly type: "bytes32";
|
|
415
|
+
readonly indexed: true;
|
|
416
|
+
readonly internalType: "PoolId";
|
|
417
|
+
}, {
|
|
418
|
+
readonly name: "owner";
|
|
419
|
+
readonly type: "address";
|
|
420
|
+
readonly indexed: true;
|
|
421
|
+
readonly internalType: "address";
|
|
422
|
+
}, {
|
|
423
|
+
readonly name: "startTime";
|
|
424
|
+
readonly type: "uint40";
|
|
425
|
+
readonly indexed: false;
|
|
426
|
+
readonly internalType: "uint40";
|
|
427
|
+
}, {
|
|
428
|
+
readonly name: "decaySeconds";
|
|
429
|
+
readonly type: "uint32";
|
|
430
|
+
readonly indexed: false;
|
|
431
|
+
readonly internalType: "uint32";
|
|
432
|
+
}, {
|
|
433
|
+
readonly name: "initialFeeBips";
|
|
434
|
+
readonly type: "uint24";
|
|
435
|
+
readonly indexed: false;
|
|
436
|
+
readonly internalType: "uint24";
|
|
437
|
+
}, {
|
|
438
|
+
readonly name: "finalFeeBips";
|
|
439
|
+
readonly type: "uint24";
|
|
440
|
+
readonly indexed: false;
|
|
441
|
+
readonly internalType: "uint24";
|
|
442
|
+
}, {
|
|
443
|
+
readonly name: "maxBuyPerTx";
|
|
444
|
+
readonly type: "uint128";
|
|
445
|
+
readonly indexed: false;
|
|
446
|
+
readonly internalType: "uint128";
|
|
447
|
+
}, {
|
|
448
|
+
readonly name: "launchTokenIsCurrency0";
|
|
449
|
+
readonly type: "bool";
|
|
450
|
+
readonly indexed: false;
|
|
451
|
+
readonly internalType: "bool";
|
|
452
|
+
}, {
|
|
453
|
+
readonly name: "enabled";
|
|
454
|
+
readonly type: "bool";
|
|
455
|
+
readonly indexed: false;
|
|
456
|
+
readonly internalType: "bool";
|
|
457
|
+
}];
|
|
458
|
+
readonly anonymous: false;
|
|
459
|
+
}, {
|
|
460
|
+
readonly type: "event";
|
|
461
|
+
readonly name: "LaunchStarted";
|
|
462
|
+
readonly inputs: readonly [{
|
|
463
|
+
readonly name: "poolId";
|
|
464
|
+
readonly type: "bytes32";
|
|
465
|
+
readonly indexed: true;
|
|
466
|
+
readonly internalType: "PoolId";
|
|
467
|
+
}, {
|
|
468
|
+
readonly name: "timestamp";
|
|
469
|
+
readonly type: "uint256";
|
|
470
|
+
readonly indexed: false;
|
|
471
|
+
readonly internalType: "uint256";
|
|
472
|
+
}];
|
|
473
|
+
readonly anonymous: false;
|
|
474
|
+
}, {
|
|
475
|
+
readonly type: "event";
|
|
476
|
+
readonly name: "TaxClaimed";
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly name: "account";
|
|
479
|
+
readonly type: "address";
|
|
480
|
+
readonly indexed: true;
|
|
481
|
+
readonly internalType: "address";
|
|
482
|
+
}, {
|
|
483
|
+
readonly name: "currency";
|
|
484
|
+
readonly type: "address";
|
|
485
|
+
readonly indexed: true;
|
|
486
|
+
readonly internalType: "Currency";
|
|
487
|
+
}, {
|
|
488
|
+
readonly name: "to";
|
|
489
|
+
readonly type: "address";
|
|
490
|
+
readonly indexed: false;
|
|
491
|
+
readonly internalType: "address";
|
|
492
|
+
}, {
|
|
493
|
+
readonly name: "amount";
|
|
494
|
+
readonly type: "uint256";
|
|
495
|
+
readonly indexed: false;
|
|
496
|
+
readonly internalType: "uint256";
|
|
497
|
+
}];
|
|
498
|
+
readonly anonymous: false;
|
|
499
|
+
}, {
|
|
500
|
+
readonly type: "event";
|
|
501
|
+
readonly name: "TaxConfigured";
|
|
502
|
+
readonly inputs: readonly [{
|
|
503
|
+
readonly name: "poolId";
|
|
504
|
+
readonly type: "bytes32";
|
|
505
|
+
readonly indexed: true;
|
|
506
|
+
readonly internalType: "PoolId";
|
|
507
|
+
}, {
|
|
508
|
+
readonly name: "buyBps";
|
|
509
|
+
readonly type: "uint16";
|
|
510
|
+
readonly indexed: false;
|
|
511
|
+
readonly internalType: "uint16";
|
|
512
|
+
}, {
|
|
513
|
+
readonly name: "sellBps";
|
|
514
|
+
readonly type: "uint16";
|
|
515
|
+
readonly indexed: false;
|
|
516
|
+
readonly internalType: "uint16";
|
|
517
|
+
}, {
|
|
518
|
+
readonly name: "expiresAt";
|
|
519
|
+
readonly type: "uint40";
|
|
520
|
+
readonly indexed: false;
|
|
521
|
+
readonly internalType: "uint40";
|
|
522
|
+
}, {
|
|
523
|
+
readonly name: "creator";
|
|
524
|
+
readonly type: "address";
|
|
525
|
+
readonly indexed: false;
|
|
526
|
+
readonly internalType: "address";
|
|
527
|
+
}, {
|
|
528
|
+
readonly name: "integrator";
|
|
529
|
+
readonly type: "address";
|
|
530
|
+
readonly indexed: false;
|
|
531
|
+
readonly internalType: "address";
|
|
532
|
+
}, {
|
|
533
|
+
readonly name: "creatorBps";
|
|
534
|
+
readonly type: "uint16";
|
|
535
|
+
readonly indexed: false;
|
|
536
|
+
readonly internalType: "uint16";
|
|
537
|
+
}, {
|
|
538
|
+
readonly name: "protocolBps";
|
|
539
|
+
readonly type: "uint16";
|
|
540
|
+
readonly indexed: false;
|
|
541
|
+
readonly internalType: "uint16";
|
|
542
|
+
}, {
|
|
543
|
+
readonly name: "integratorBps";
|
|
544
|
+
readonly type: "uint16";
|
|
545
|
+
readonly indexed: false;
|
|
546
|
+
readonly internalType: "uint16";
|
|
547
|
+
}];
|
|
548
|
+
readonly anonymous: false;
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "event";
|
|
551
|
+
readonly name: "TaxRedeemed";
|
|
552
|
+
readonly inputs: readonly [{
|
|
553
|
+
readonly name: "currency";
|
|
554
|
+
readonly type: "address";
|
|
555
|
+
readonly indexed: true;
|
|
556
|
+
readonly internalType: "Currency";
|
|
557
|
+
}, {
|
|
558
|
+
readonly name: "amount";
|
|
559
|
+
readonly type: "uint256";
|
|
560
|
+
readonly indexed: false;
|
|
561
|
+
readonly internalType: "uint256";
|
|
562
|
+
}];
|
|
563
|
+
readonly anonymous: false;
|
|
564
|
+
}, {
|
|
565
|
+
readonly type: "event";
|
|
566
|
+
readonly name: "TaxSettled";
|
|
567
|
+
readonly inputs: readonly [{
|
|
568
|
+
readonly name: "poolId";
|
|
569
|
+
readonly type: "bytes32";
|
|
570
|
+
readonly indexed: true;
|
|
571
|
+
readonly internalType: "PoolId";
|
|
572
|
+
}, {
|
|
573
|
+
readonly name: "currency";
|
|
574
|
+
readonly type: "address";
|
|
575
|
+
readonly indexed: true;
|
|
576
|
+
readonly internalType: "Currency";
|
|
577
|
+
}, {
|
|
578
|
+
readonly name: "toCreator";
|
|
579
|
+
readonly type: "uint256";
|
|
580
|
+
readonly indexed: false;
|
|
581
|
+
readonly internalType: "uint256";
|
|
582
|
+
}, {
|
|
583
|
+
readonly name: "toProtocol";
|
|
584
|
+
readonly type: "uint256";
|
|
585
|
+
readonly indexed: false;
|
|
586
|
+
readonly internalType: "uint256";
|
|
587
|
+
}, {
|
|
588
|
+
readonly name: "toIntegrator";
|
|
589
|
+
readonly type: "uint256";
|
|
590
|
+
readonly indexed: false;
|
|
591
|
+
readonly internalType: "uint256";
|
|
592
|
+
}];
|
|
593
|
+
readonly anonymous: false;
|
|
594
|
+
}, {
|
|
595
|
+
readonly type: "event";
|
|
596
|
+
readonly name: "TaxSkimmed";
|
|
597
|
+
readonly inputs: readonly [{
|
|
598
|
+
readonly name: "currency";
|
|
599
|
+
readonly type: "address";
|
|
600
|
+
readonly indexed: true;
|
|
601
|
+
readonly internalType: "Currency";
|
|
602
|
+
}, {
|
|
603
|
+
readonly name: "caller";
|
|
604
|
+
readonly type: "address";
|
|
605
|
+
readonly indexed: true;
|
|
606
|
+
readonly internalType: "address";
|
|
607
|
+
}, {
|
|
608
|
+
readonly name: "amount";
|
|
609
|
+
readonly type: "uint256";
|
|
610
|
+
readonly indexed: false;
|
|
611
|
+
readonly internalType: "uint256";
|
|
612
|
+
}];
|
|
613
|
+
readonly anonymous: false;
|
|
614
|
+
}, {
|
|
615
|
+
readonly type: "event";
|
|
616
|
+
readonly name: "TaxTaken";
|
|
617
|
+
readonly inputs: readonly [{
|
|
618
|
+
readonly name: "poolId";
|
|
619
|
+
readonly type: "bytes32";
|
|
620
|
+
readonly indexed: true;
|
|
621
|
+
readonly internalType: "PoolId";
|
|
622
|
+
}, {
|
|
623
|
+
readonly name: "currency";
|
|
624
|
+
readonly type: "address";
|
|
625
|
+
readonly indexed: true;
|
|
626
|
+
readonly internalType: "Currency";
|
|
627
|
+
}, {
|
|
628
|
+
readonly name: "isBuy";
|
|
629
|
+
readonly type: "bool";
|
|
630
|
+
readonly indexed: false;
|
|
631
|
+
readonly internalType: "bool";
|
|
632
|
+
}, {
|
|
633
|
+
readonly name: "amount";
|
|
634
|
+
readonly type: "uint256";
|
|
635
|
+
readonly indexed: false;
|
|
636
|
+
readonly internalType: "uint256";
|
|
637
|
+
}];
|
|
638
|
+
readonly anonymous: false;
|
|
639
|
+
}, {
|
|
640
|
+
readonly type: "function";
|
|
641
|
+
readonly name: "CLOCK_MODE";
|
|
642
|
+
readonly inputs: readonly [];
|
|
643
|
+
readonly outputs: readonly [{
|
|
644
|
+
readonly name: "";
|
|
645
|
+
readonly type: "string";
|
|
646
|
+
readonly internalType: "string";
|
|
647
|
+
}];
|
|
648
|
+
readonly stateMutability: "view";
|
|
649
|
+
}, {
|
|
650
|
+
readonly type: "function";
|
|
651
|
+
readonly name: "LAUNCH_TOKEN_FACTORY";
|
|
652
|
+
readonly inputs: readonly [];
|
|
653
|
+
readonly outputs: readonly [{
|
|
654
|
+
readonly name: "";
|
|
655
|
+
readonly type: "address";
|
|
656
|
+
readonly internalType: "contract ILaunchTokenOrigin";
|
|
657
|
+
}];
|
|
658
|
+
readonly stateMutability: "view";
|
|
659
|
+
}, {
|
|
660
|
+
readonly type: "function";
|
|
661
|
+
readonly name: "MAX_DECAY_SECONDS";
|
|
662
|
+
readonly inputs: readonly [];
|
|
663
|
+
readonly outputs: readonly [{
|
|
664
|
+
readonly name: "";
|
|
665
|
+
readonly type: "uint32";
|
|
666
|
+
readonly internalType: "uint32";
|
|
667
|
+
}];
|
|
668
|
+
readonly stateMutability: "view";
|
|
669
|
+
}, {
|
|
670
|
+
readonly type: "function";
|
|
671
|
+
readonly name: "MAX_FINAL_FEE";
|
|
672
|
+
readonly inputs: readonly [];
|
|
673
|
+
readonly outputs: readonly [{
|
|
674
|
+
readonly name: "";
|
|
675
|
+
readonly type: "uint24";
|
|
676
|
+
readonly internalType: "uint24";
|
|
677
|
+
}];
|
|
678
|
+
readonly stateMutability: "view";
|
|
679
|
+
}, {
|
|
680
|
+
readonly type: "function";
|
|
681
|
+
readonly name: "MAX_INITIAL_FEE";
|
|
682
|
+
readonly inputs: readonly [];
|
|
683
|
+
readonly outputs: readonly [{
|
|
684
|
+
readonly name: "";
|
|
685
|
+
readonly type: "uint24";
|
|
686
|
+
readonly internalType: "uint24";
|
|
687
|
+
}];
|
|
688
|
+
readonly stateMutability: "view";
|
|
689
|
+
}, {
|
|
690
|
+
readonly type: "function";
|
|
691
|
+
readonly name: "MAX_INTEGRATOR_BPS";
|
|
692
|
+
readonly inputs: readonly [];
|
|
693
|
+
readonly outputs: readonly [{
|
|
694
|
+
readonly name: "";
|
|
695
|
+
readonly type: "uint16";
|
|
696
|
+
readonly internalType: "uint16";
|
|
697
|
+
}];
|
|
698
|
+
readonly stateMutability: "view";
|
|
699
|
+
}, {
|
|
700
|
+
readonly type: "function";
|
|
701
|
+
readonly name: "MAX_PROTOCOL_BPS";
|
|
702
|
+
readonly inputs: readonly [];
|
|
703
|
+
readonly outputs: readonly [{
|
|
704
|
+
readonly name: "";
|
|
705
|
+
readonly type: "uint16";
|
|
706
|
+
readonly internalType: "uint16";
|
|
707
|
+
}];
|
|
708
|
+
readonly stateMutability: "view";
|
|
709
|
+
}, {
|
|
710
|
+
readonly type: "function";
|
|
711
|
+
readonly name: "MAX_START_DELAY_SECONDS";
|
|
712
|
+
readonly inputs: readonly [];
|
|
713
|
+
readonly outputs: readonly [{
|
|
714
|
+
readonly name: "";
|
|
715
|
+
readonly type: "uint40";
|
|
716
|
+
readonly internalType: "uint40";
|
|
717
|
+
}];
|
|
718
|
+
readonly stateMutability: "view";
|
|
719
|
+
}, {
|
|
720
|
+
readonly type: "function";
|
|
721
|
+
readonly name: "MAX_TAX_BPS";
|
|
722
|
+
readonly inputs: readonly [];
|
|
723
|
+
readonly outputs: readonly [{
|
|
724
|
+
readonly name: "";
|
|
725
|
+
readonly type: "uint16";
|
|
726
|
+
readonly internalType: "uint16";
|
|
727
|
+
}];
|
|
728
|
+
readonly stateMutability: "view";
|
|
729
|
+
}, {
|
|
730
|
+
readonly type: "function";
|
|
731
|
+
readonly name: "MAX_TAX_DURATION_SECONDS";
|
|
732
|
+
readonly inputs: readonly [];
|
|
733
|
+
readonly outputs: readonly [{
|
|
734
|
+
readonly name: "";
|
|
735
|
+
readonly type: "uint40";
|
|
736
|
+
readonly internalType: "uint40";
|
|
737
|
+
}];
|
|
738
|
+
readonly stateMutability: "view";
|
|
739
|
+
}, {
|
|
740
|
+
readonly type: "function";
|
|
741
|
+
readonly name: "MIN_DECAY_SECONDS";
|
|
742
|
+
readonly inputs: readonly [];
|
|
743
|
+
readonly outputs: readonly [{
|
|
744
|
+
readonly name: "";
|
|
745
|
+
readonly type: "uint32";
|
|
746
|
+
readonly internalType: "uint32";
|
|
747
|
+
}];
|
|
748
|
+
readonly stateMutability: "view";
|
|
749
|
+
}, {
|
|
750
|
+
readonly type: "function";
|
|
751
|
+
readonly name: "MIN_PROTOCOL_BPS";
|
|
752
|
+
readonly inputs: readonly [];
|
|
753
|
+
readonly outputs: readonly [{
|
|
754
|
+
readonly name: "";
|
|
755
|
+
readonly type: "uint16";
|
|
756
|
+
readonly internalType: "uint16";
|
|
757
|
+
}];
|
|
758
|
+
readonly stateMutability: "view";
|
|
759
|
+
}, {
|
|
760
|
+
readonly type: "function";
|
|
761
|
+
readonly name: "backing";
|
|
762
|
+
readonly inputs: readonly [{
|
|
763
|
+
readonly name: "currency";
|
|
764
|
+
readonly type: "address";
|
|
765
|
+
readonly internalType: "Currency";
|
|
766
|
+
}];
|
|
767
|
+
readonly outputs: readonly [{
|
|
768
|
+
readonly name: "";
|
|
769
|
+
readonly type: "uint256";
|
|
770
|
+
readonly internalType: "uint256";
|
|
771
|
+
}];
|
|
772
|
+
readonly stateMutability: "view";
|
|
773
|
+
}, {
|
|
774
|
+
readonly type: "function";
|
|
775
|
+
readonly name: "claim";
|
|
776
|
+
readonly inputs: readonly [{
|
|
777
|
+
readonly name: "currency";
|
|
778
|
+
readonly type: "address";
|
|
779
|
+
readonly internalType: "Currency";
|
|
780
|
+
}, {
|
|
781
|
+
readonly name: "to";
|
|
782
|
+
readonly type: "address";
|
|
783
|
+
readonly internalType: "address";
|
|
784
|
+
}];
|
|
785
|
+
readonly outputs: readonly [{
|
|
786
|
+
readonly name: "amount";
|
|
787
|
+
readonly type: "uint256";
|
|
788
|
+
readonly internalType: "uint256";
|
|
789
|
+
}];
|
|
790
|
+
readonly stateMutability: "nonpayable";
|
|
791
|
+
}, {
|
|
792
|
+
readonly type: "function";
|
|
793
|
+
readonly name: "claimFrom";
|
|
794
|
+
readonly inputs: readonly [{
|
|
795
|
+
readonly name: "pools";
|
|
796
|
+
readonly type: "bytes32[]";
|
|
797
|
+
readonly internalType: "PoolId[]";
|
|
798
|
+
}, {
|
|
799
|
+
readonly name: "currency";
|
|
800
|
+
readonly type: "address";
|
|
801
|
+
readonly internalType: "Currency";
|
|
802
|
+
}, {
|
|
803
|
+
readonly name: "to";
|
|
804
|
+
readonly type: "address";
|
|
805
|
+
readonly internalType: "address";
|
|
806
|
+
}];
|
|
807
|
+
readonly outputs: readonly [{
|
|
808
|
+
readonly name: "amount";
|
|
809
|
+
readonly type: "uint256";
|
|
810
|
+
readonly internalType: "uint256";
|
|
811
|
+
}];
|
|
812
|
+
readonly stateMutability: "nonpayable";
|
|
813
|
+
}, {
|
|
814
|
+
readonly type: "function";
|
|
815
|
+
readonly name: "claimable";
|
|
816
|
+
readonly inputs: readonly [{
|
|
817
|
+
readonly name: "account";
|
|
818
|
+
readonly type: "address";
|
|
819
|
+
readonly internalType: "address";
|
|
820
|
+
}, {
|
|
821
|
+
readonly name: "currency";
|
|
822
|
+
readonly type: "address";
|
|
823
|
+
readonly internalType: "Currency";
|
|
824
|
+
}];
|
|
825
|
+
readonly outputs: readonly [{
|
|
826
|
+
readonly name: "";
|
|
827
|
+
readonly type: "uint256";
|
|
828
|
+
readonly internalType: "uint256";
|
|
829
|
+
}];
|
|
830
|
+
readonly stateMutability: "view";
|
|
831
|
+
}, {
|
|
832
|
+
readonly type: "function";
|
|
833
|
+
readonly name: "clock";
|
|
834
|
+
readonly inputs: readonly [];
|
|
835
|
+
readonly outputs: readonly [{
|
|
836
|
+
readonly name: "";
|
|
837
|
+
readonly type: "uint48";
|
|
838
|
+
readonly internalType: "uint48";
|
|
839
|
+
}];
|
|
840
|
+
readonly stateMutability: "view";
|
|
841
|
+
}, {
|
|
842
|
+
readonly type: "function";
|
|
843
|
+
readonly name: "configureLaunch";
|
|
844
|
+
readonly inputs: readonly [{
|
|
845
|
+
readonly name: "key";
|
|
846
|
+
readonly type: "tuple";
|
|
847
|
+
readonly internalType: "struct PoolKey";
|
|
848
|
+
readonly components: readonly [{
|
|
849
|
+
readonly name: "currency0";
|
|
850
|
+
readonly type: "address";
|
|
851
|
+
readonly internalType: "Currency";
|
|
852
|
+
}, {
|
|
853
|
+
readonly name: "currency1";
|
|
854
|
+
readonly type: "address";
|
|
855
|
+
readonly internalType: "Currency";
|
|
856
|
+
}, {
|
|
857
|
+
readonly name: "hooks";
|
|
858
|
+
readonly type: "address";
|
|
859
|
+
readonly internalType: "contract IHooks";
|
|
860
|
+
}, {
|
|
861
|
+
readonly name: "poolManager";
|
|
862
|
+
readonly type: "address";
|
|
863
|
+
readonly internalType: "contract IPoolManager";
|
|
864
|
+
}, {
|
|
865
|
+
readonly name: "fee";
|
|
866
|
+
readonly type: "uint24";
|
|
867
|
+
readonly internalType: "uint24";
|
|
868
|
+
}, {
|
|
869
|
+
readonly name: "parameters";
|
|
870
|
+
readonly type: "bytes32";
|
|
871
|
+
readonly internalType: "bytes32";
|
|
872
|
+
}];
|
|
873
|
+
}, {
|
|
874
|
+
readonly name: "cfg";
|
|
875
|
+
readonly type: "tuple";
|
|
876
|
+
readonly internalType: "struct LaunchGuardHook.LaunchConfig";
|
|
877
|
+
readonly components: readonly [{
|
|
878
|
+
readonly name: "startTime";
|
|
879
|
+
readonly type: "uint40";
|
|
880
|
+
readonly internalType: "uint40";
|
|
881
|
+
}, {
|
|
882
|
+
readonly name: "decaySeconds";
|
|
883
|
+
readonly type: "uint32";
|
|
884
|
+
readonly internalType: "uint32";
|
|
885
|
+
}, {
|
|
886
|
+
readonly name: "initialFeeBips";
|
|
887
|
+
readonly type: "uint24";
|
|
888
|
+
readonly internalType: "uint24";
|
|
889
|
+
}, {
|
|
890
|
+
readonly name: "finalFeeBips";
|
|
891
|
+
readonly type: "uint24";
|
|
892
|
+
readonly internalType: "uint24";
|
|
893
|
+
}, {
|
|
894
|
+
readonly name: "maxBuyPerTx";
|
|
895
|
+
readonly type: "uint128";
|
|
896
|
+
readonly internalType: "uint128";
|
|
897
|
+
}, {
|
|
898
|
+
readonly name: "launchTokenIsCurrency0";
|
|
899
|
+
readonly type: "bool";
|
|
900
|
+
readonly internalType: "bool";
|
|
901
|
+
}, {
|
|
902
|
+
readonly name: "enabled";
|
|
903
|
+
readonly type: "bool";
|
|
904
|
+
readonly internalType: "bool";
|
|
905
|
+
}];
|
|
906
|
+
}];
|
|
907
|
+
readonly outputs: readonly [];
|
|
908
|
+
readonly stateMutability: "nonpayable";
|
|
909
|
+
}, {
|
|
910
|
+
readonly type: "function";
|
|
911
|
+
readonly name: "configureTax";
|
|
912
|
+
readonly inputs: readonly [{
|
|
913
|
+
readonly name: "key";
|
|
914
|
+
readonly type: "tuple";
|
|
915
|
+
readonly internalType: "struct PoolKey";
|
|
916
|
+
readonly components: readonly [{
|
|
917
|
+
readonly name: "currency0";
|
|
918
|
+
readonly type: "address";
|
|
919
|
+
readonly internalType: "Currency";
|
|
920
|
+
}, {
|
|
921
|
+
readonly name: "currency1";
|
|
922
|
+
readonly type: "address";
|
|
923
|
+
readonly internalType: "Currency";
|
|
924
|
+
}, {
|
|
925
|
+
readonly name: "hooks";
|
|
926
|
+
readonly type: "address";
|
|
927
|
+
readonly internalType: "contract IHooks";
|
|
928
|
+
}, {
|
|
929
|
+
readonly name: "poolManager";
|
|
930
|
+
readonly type: "address";
|
|
931
|
+
readonly internalType: "contract IPoolManager";
|
|
932
|
+
}, {
|
|
933
|
+
readonly name: "fee";
|
|
934
|
+
readonly type: "uint24";
|
|
935
|
+
readonly internalType: "uint24";
|
|
936
|
+
}, {
|
|
937
|
+
readonly name: "parameters";
|
|
938
|
+
readonly type: "bytes32";
|
|
939
|
+
readonly internalType: "bytes32";
|
|
940
|
+
}];
|
|
941
|
+
}, {
|
|
942
|
+
readonly name: "cfg";
|
|
943
|
+
readonly type: "tuple";
|
|
944
|
+
readonly internalType: "struct LaunchTaxModule.TaxConfig";
|
|
945
|
+
readonly components: readonly [{
|
|
946
|
+
readonly name: "buyBps";
|
|
947
|
+
readonly type: "uint16";
|
|
948
|
+
readonly internalType: "uint16";
|
|
949
|
+
}, {
|
|
950
|
+
readonly name: "sellBps";
|
|
951
|
+
readonly type: "uint16";
|
|
952
|
+
readonly internalType: "uint16";
|
|
953
|
+
}, {
|
|
954
|
+
readonly name: "expiresAt";
|
|
955
|
+
readonly type: "uint40";
|
|
956
|
+
readonly internalType: "uint40";
|
|
957
|
+
}, {
|
|
958
|
+
readonly name: "creator";
|
|
959
|
+
readonly type: "address";
|
|
960
|
+
readonly internalType: "address";
|
|
961
|
+
}, {
|
|
962
|
+
readonly name: "integrator";
|
|
963
|
+
readonly type: "address";
|
|
964
|
+
readonly internalType: "address";
|
|
965
|
+
}, {
|
|
966
|
+
readonly name: "creatorBps";
|
|
967
|
+
readonly type: "uint16";
|
|
968
|
+
readonly internalType: "uint16";
|
|
969
|
+
}, {
|
|
970
|
+
readonly name: "protocolBps";
|
|
971
|
+
readonly type: "uint16";
|
|
972
|
+
readonly internalType: "uint16";
|
|
973
|
+
}, {
|
|
974
|
+
readonly name: "integratorBps";
|
|
975
|
+
readonly type: "uint16";
|
|
976
|
+
readonly internalType: "uint16";
|
|
977
|
+
}];
|
|
978
|
+
}];
|
|
979
|
+
readonly outputs: readonly [];
|
|
980
|
+
readonly stateMutability: "nonpayable";
|
|
981
|
+
}, {
|
|
982
|
+
readonly type: "function";
|
|
983
|
+
readonly name: "currentFee";
|
|
984
|
+
readonly inputs: readonly [{
|
|
985
|
+
readonly name: "poolId";
|
|
986
|
+
readonly type: "bytes32";
|
|
987
|
+
readonly internalType: "PoolId";
|
|
988
|
+
}];
|
|
989
|
+
readonly outputs: readonly [{
|
|
990
|
+
readonly name: "";
|
|
991
|
+
readonly type: "uint24";
|
|
992
|
+
readonly internalType: "uint24";
|
|
993
|
+
}];
|
|
994
|
+
readonly stateMutability: "view";
|
|
995
|
+
}, {
|
|
996
|
+
readonly type: "function";
|
|
997
|
+
readonly name: "currentTaxRates";
|
|
998
|
+
readonly inputs: readonly [{
|
|
999
|
+
readonly name: "poolId";
|
|
1000
|
+
readonly type: "bytes32";
|
|
1001
|
+
readonly internalType: "PoolId";
|
|
1002
|
+
}];
|
|
1003
|
+
readonly outputs: readonly [{
|
|
1004
|
+
readonly name: "buyBps";
|
|
1005
|
+
readonly type: "uint16";
|
|
1006
|
+
readonly internalType: "uint16";
|
|
1007
|
+
}, {
|
|
1008
|
+
readonly name: "sellBps";
|
|
1009
|
+
readonly type: "uint16";
|
|
1010
|
+
readonly internalType: "uint16";
|
|
1011
|
+
}];
|
|
1012
|
+
readonly stateMutability: "view";
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly type: "function";
|
|
1015
|
+
readonly name: "feeAt";
|
|
1016
|
+
readonly inputs: readonly [{
|
|
1017
|
+
readonly name: "poolId";
|
|
1018
|
+
readonly type: "bytes32";
|
|
1019
|
+
readonly internalType: "PoolId";
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly name: "timestamp";
|
|
1022
|
+
readonly type: "uint256";
|
|
1023
|
+
readonly internalType: "uint256";
|
|
1024
|
+
}];
|
|
1025
|
+
readonly outputs: readonly [{
|
|
1026
|
+
readonly name: "";
|
|
1027
|
+
readonly type: "uint24";
|
|
1028
|
+
readonly internalType: "uint24";
|
|
1029
|
+
}];
|
|
1030
|
+
readonly stateMutability: "view";
|
|
1031
|
+
}, {
|
|
1032
|
+
readonly type: "function";
|
|
1033
|
+
readonly name: "getHooksRegistrationBitmap";
|
|
1034
|
+
readonly inputs: readonly [];
|
|
1035
|
+
readonly outputs: readonly [{
|
|
1036
|
+
readonly name: "";
|
|
1037
|
+
readonly type: "uint16";
|
|
1038
|
+
readonly internalType: "uint16";
|
|
1039
|
+
}];
|
|
1040
|
+
readonly stateMutability: "pure";
|
|
1041
|
+
}, {
|
|
1042
|
+
readonly type: "function";
|
|
1043
|
+
readonly name: "getLaunch";
|
|
1044
|
+
readonly inputs: readonly [{
|
|
1045
|
+
readonly name: "poolId";
|
|
1046
|
+
readonly type: "bytes32";
|
|
1047
|
+
readonly internalType: "PoolId";
|
|
1048
|
+
}];
|
|
1049
|
+
readonly outputs: readonly [{
|
|
1050
|
+
readonly name: "";
|
|
1051
|
+
readonly type: "tuple";
|
|
1052
|
+
readonly internalType: "struct LaunchGuardHook.Launch";
|
|
1053
|
+
readonly components: readonly [{
|
|
1054
|
+
readonly name: "owner";
|
|
1055
|
+
readonly type: "address";
|
|
1056
|
+
readonly internalType: "address";
|
|
1057
|
+
}, {
|
|
1058
|
+
readonly name: "startTime";
|
|
1059
|
+
readonly type: "uint40";
|
|
1060
|
+
readonly internalType: "uint40";
|
|
1061
|
+
}, {
|
|
1062
|
+
readonly name: "decaySeconds";
|
|
1063
|
+
readonly type: "uint32";
|
|
1064
|
+
readonly internalType: "uint32";
|
|
1065
|
+
}, {
|
|
1066
|
+
readonly name: "enabled";
|
|
1067
|
+
readonly type: "bool";
|
|
1068
|
+
readonly internalType: "bool";
|
|
1069
|
+
}, {
|
|
1070
|
+
readonly name: "initialFeeBips";
|
|
1071
|
+
readonly type: "uint24";
|
|
1072
|
+
readonly internalType: "uint24";
|
|
1073
|
+
}, {
|
|
1074
|
+
readonly name: "finalFeeBips";
|
|
1075
|
+
readonly type: "uint24";
|
|
1076
|
+
readonly internalType: "uint24";
|
|
1077
|
+
}, {
|
|
1078
|
+
readonly name: "maxBuyPerTx";
|
|
1079
|
+
readonly type: "uint128";
|
|
1080
|
+
readonly internalType: "uint128";
|
|
1081
|
+
}, {
|
|
1082
|
+
readonly name: "launchTokenIsCurrency0";
|
|
1083
|
+
readonly type: "bool";
|
|
1084
|
+
readonly internalType: "bool";
|
|
1085
|
+
}, {
|
|
1086
|
+
readonly name: "launched";
|
|
1087
|
+
readonly type: "bool";
|
|
1088
|
+
readonly internalType: "bool";
|
|
1089
|
+
}];
|
|
1090
|
+
}];
|
|
1091
|
+
readonly stateMutability: "view";
|
|
1092
|
+
}, {
|
|
1093
|
+
readonly type: "function";
|
|
1094
|
+
readonly name: "getTax";
|
|
1095
|
+
readonly inputs: readonly [{
|
|
1096
|
+
readonly name: "poolId";
|
|
1097
|
+
readonly type: "bytes32";
|
|
1098
|
+
readonly internalType: "PoolId";
|
|
1099
|
+
}];
|
|
1100
|
+
readonly outputs: readonly [{
|
|
1101
|
+
readonly name: "";
|
|
1102
|
+
readonly type: "tuple";
|
|
1103
|
+
readonly internalType: "struct LaunchTaxModule.Tax";
|
|
1104
|
+
readonly components: readonly [{
|
|
1105
|
+
readonly name: "creator";
|
|
1106
|
+
readonly type: "address";
|
|
1107
|
+
readonly internalType: "address";
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly name: "buyBps";
|
|
1110
|
+
readonly type: "uint16";
|
|
1111
|
+
readonly internalType: "uint16";
|
|
1112
|
+
}, {
|
|
1113
|
+
readonly name: "sellBps";
|
|
1114
|
+
readonly type: "uint16";
|
|
1115
|
+
readonly internalType: "uint16";
|
|
1116
|
+
}, {
|
|
1117
|
+
readonly name: "expiresAt";
|
|
1118
|
+
readonly type: "uint40";
|
|
1119
|
+
readonly internalType: "uint40";
|
|
1120
|
+
}, {
|
|
1121
|
+
readonly name: "creatorBps";
|
|
1122
|
+
readonly type: "uint16";
|
|
1123
|
+
readonly internalType: "uint16";
|
|
1124
|
+
}, {
|
|
1125
|
+
readonly name: "integrator";
|
|
1126
|
+
readonly type: "address";
|
|
1127
|
+
readonly internalType: "address";
|
|
1128
|
+
}, {
|
|
1129
|
+
readonly name: "protocolBps";
|
|
1130
|
+
readonly type: "uint16";
|
|
1131
|
+
readonly internalType: "uint16";
|
|
1132
|
+
}, {
|
|
1133
|
+
readonly name: "integratorBps";
|
|
1134
|
+
readonly type: "uint16";
|
|
1135
|
+
readonly internalType: "uint16";
|
|
1136
|
+
}];
|
|
1137
|
+
}];
|
|
1138
|
+
readonly stateMutability: "view";
|
|
1139
|
+
}, {
|
|
1140
|
+
readonly type: "function";
|
|
1141
|
+
readonly name: "launchClaimerOf";
|
|
1142
|
+
readonly inputs: readonly [{
|
|
1143
|
+
readonly name: "token";
|
|
1144
|
+
readonly type: "address";
|
|
1145
|
+
readonly internalType: "address";
|
|
1146
|
+
}];
|
|
1147
|
+
readonly outputs: readonly [{
|
|
1148
|
+
readonly name: "claimer";
|
|
1149
|
+
readonly type: "address";
|
|
1150
|
+
readonly internalType: "address";
|
|
1151
|
+
}];
|
|
1152
|
+
readonly stateMutability: "view";
|
|
1153
|
+
}, {
|
|
1154
|
+
readonly type: "function";
|
|
1155
|
+
readonly name: "launchOwner";
|
|
1156
|
+
readonly inputs: readonly [{
|
|
1157
|
+
readonly name: "poolId";
|
|
1158
|
+
readonly type: "bytes32";
|
|
1159
|
+
readonly internalType: "PoolId";
|
|
1160
|
+
}];
|
|
1161
|
+
readonly outputs: readonly [{
|
|
1162
|
+
readonly name: "";
|
|
1163
|
+
readonly type: "address";
|
|
1164
|
+
readonly internalType: "address";
|
|
1165
|
+
}];
|
|
1166
|
+
readonly stateMutability: "view";
|
|
1167
|
+
}, {
|
|
1168
|
+
readonly type: "function";
|
|
1169
|
+
readonly name: "pendingTax";
|
|
1170
|
+
readonly inputs: readonly [{
|
|
1171
|
+
readonly name: "poolId";
|
|
1172
|
+
readonly type: "bytes32";
|
|
1173
|
+
readonly internalType: "PoolId";
|
|
1174
|
+
}, {
|
|
1175
|
+
readonly name: "currency";
|
|
1176
|
+
readonly type: "address";
|
|
1177
|
+
readonly internalType: "Currency";
|
|
1178
|
+
}];
|
|
1179
|
+
readonly outputs: readonly [{
|
|
1180
|
+
readonly name: "";
|
|
1181
|
+
readonly type: "uint256";
|
|
1182
|
+
readonly internalType: "uint256";
|
|
1183
|
+
}];
|
|
1184
|
+
readonly stateMutability: "view";
|
|
1185
|
+
}, {
|
|
1186
|
+
readonly type: "function";
|
|
1187
|
+
readonly name: "poolManager";
|
|
1188
|
+
readonly inputs: readonly [];
|
|
1189
|
+
readonly outputs: readonly [{
|
|
1190
|
+
readonly name: "";
|
|
1191
|
+
readonly type: "address";
|
|
1192
|
+
readonly internalType: "contract ICLPoolManager";
|
|
1193
|
+
}];
|
|
1194
|
+
readonly stateMutability: "view";
|
|
1195
|
+
}, {
|
|
1196
|
+
readonly type: "function";
|
|
1197
|
+
readonly name: "protocolRecipient";
|
|
1198
|
+
readonly inputs: readonly [];
|
|
1199
|
+
readonly outputs: readonly [{
|
|
1200
|
+
readonly name: "";
|
|
1201
|
+
readonly type: "address";
|
|
1202
|
+
readonly internalType: "address";
|
|
1203
|
+
}];
|
|
1204
|
+
readonly stateMutability: "view";
|
|
1205
|
+
}, {
|
|
1206
|
+
readonly type: "function";
|
|
1207
|
+
readonly name: "redeem";
|
|
1208
|
+
readonly inputs: readonly [{
|
|
1209
|
+
readonly name: "currency";
|
|
1210
|
+
readonly type: "address";
|
|
1211
|
+
readonly internalType: "Currency";
|
|
1212
|
+
}];
|
|
1213
|
+
readonly outputs: readonly [{
|
|
1214
|
+
readonly name: "amount";
|
|
1215
|
+
readonly type: "uint256";
|
|
1216
|
+
readonly internalType: "uint256";
|
|
1217
|
+
}];
|
|
1218
|
+
readonly stateMutability: "nonpayable";
|
|
1219
|
+
}, {
|
|
1220
|
+
readonly type: "function";
|
|
1221
|
+
readonly name: "setLaunchClaimer";
|
|
1222
|
+
readonly inputs: readonly [{
|
|
1223
|
+
readonly name: "token";
|
|
1224
|
+
readonly type: "address";
|
|
1225
|
+
readonly internalType: "address";
|
|
1226
|
+
}, {
|
|
1227
|
+
readonly name: "claimer";
|
|
1228
|
+
readonly type: "address";
|
|
1229
|
+
readonly internalType: "address";
|
|
1230
|
+
}];
|
|
1231
|
+
readonly outputs: readonly [];
|
|
1232
|
+
readonly stateMutability: "nonpayable";
|
|
1233
|
+
}, {
|
|
1234
|
+
readonly type: "function";
|
|
1235
|
+
readonly name: "settleTax";
|
|
1236
|
+
readonly inputs: readonly [{
|
|
1237
|
+
readonly name: "poolId";
|
|
1238
|
+
readonly type: "bytes32";
|
|
1239
|
+
readonly internalType: "PoolId";
|
|
1240
|
+
}, {
|
|
1241
|
+
readonly name: "currency";
|
|
1242
|
+
readonly type: "address";
|
|
1243
|
+
readonly internalType: "Currency";
|
|
1244
|
+
}];
|
|
1245
|
+
readonly outputs: readonly [];
|
|
1246
|
+
readonly stateMutability: "nonpayable";
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly type: "function";
|
|
1249
|
+
readonly name: "skim";
|
|
1250
|
+
readonly inputs: readonly [{
|
|
1251
|
+
readonly name: "currency";
|
|
1252
|
+
readonly type: "address";
|
|
1253
|
+
readonly internalType: "Currency";
|
|
1254
|
+
}];
|
|
1255
|
+
readonly outputs: readonly [{
|
|
1256
|
+
readonly name: "surplus";
|
|
1257
|
+
readonly type: "uint256";
|
|
1258
|
+
readonly internalType: "uint256";
|
|
1259
|
+
}];
|
|
1260
|
+
readonly stateMutability: "nonpayable";
|
|
1261
|
+
}, {
|
|
1262
|
+
readonly type: "function";
|
|
1263
|
+
readonly name: "taxRatesAt";
|
|
1264
|
+
readonly inputs: readonly [{
|
|
1265
|
+
readonly name: "poolId";
|
|
1266
|
+
readonly type: "bytes32";
|
|
1267
|
+
readonly internalType: "PoolId";
|
|
1268
|
+
}, {
|
|
1269
|
+
readonly name: "timestamp";
|
|
1270
|
+
readonly type: "uint256";
|
|
1271
|
+
readonly internalType: "uint256";
|
|
1272
|
+
}];
|
|
1273
|
+
readonly outputs: readonly [{
|
|
1274
|
+
readonly name: "buyBps";
|
|
1275
|
+
readonly type: "uint16";
|
|
1276
|
+
readonly internalType: "uint16";
|
|
1277
|
+
}, {
|
|
1278
|
+
readonly name: "sellBps";
|
|
1279
|
+
readonly type: "uint16";
|
|
1280
|
+
readonly internalType: "uint16";
|
|
1281
|
+
}];
|
|
1282
|
+
readonly stateMutability: "view";
|
|
1283
|
+
}, {
|
|
1284
|
+
readonly type: "function";
|
|
1285
|
+
readonly name: "totalOwed";
|
|
1286
|
+
readonly inputs: readonly [{
|
|
1287
|
+
readonly name: "currency";
|
|
1288
|
+
readonly type: "address";
|
|
1289
|
+
readonly internalType: "Currency";
|
|
1290
|
+
}];
|
|
1291
|
+
readonly outputs: readonly [{
|
|
1292
|
+
readonly name: "";
|
|
1293
|
+
readonly type: "uint256";
|
|
1294
|
+
readonly internalType: "uint256";
|
|
1295
|
+
}];
|
|
1296
|
+
readonly stateMutability: "view";
|
|
1297
|
+
}, {
|
|
1298
|
+
readonly type: "function";
|
|
1299
|
+
readonly name: "vault";
|
|
1300
|
+
readonly inputs: readonly [];
|
|
1301
|
+
readonly outputs: readonly [{
|
|
1302
|
+
readonly name: "";
|
|
1303
|
+
readonly type: "address";
|
|
1304
|
+
readonly internalType: "contract IVault";
|
|
1305
|
+
}];
|
|
1306
|
+
readonly stateMutability: "view";
|
|
1307
|
+
}] | readonly [{
|
|
1308
|
+
readonly type: "error";
|
|
1309
|
+
readonly name: "BuyExceedsMaxPerTx";
|
|
1310
|
+
readonly inputs: readonly [{
|
|
1311
|
+
readonly name: "amountIn";
|
|
1312
|
+
readonly type: "uint256";
|
|
1313
|
+
readonly internalType: "uint256";
|
|
1314
|
+
}, {
|
|
1315
|
+
readonly name: "maxBuyPerTx";
|
|
1316
|
+
readonly type: "uint128";
|
|
1317
|
+
readonly internalType: "uint128";
|
|
1318
|
+
}];
|
|
1319
|
+
}, {
|
|
1320
|
+
readonly type: "error";
|
|
1321
|
+
readonly name: "ExactOutputBuyBlockedDuringLaunch";
|
|
1322
|
+
readonly inputs: readonly [];
|
|
1323
|
+
}, {
|
|
1324
|
+
readonly type: "error";
|
|
1325
|
+
readonly name: "HookMismatch";
|
|
1326
|
+
readonly inputs: readonly [{
|
|
1327
|
+
readonly name: "declared";
|
|
1328
|
+
readonly type: "address";
|
|
1329
|
+
readonly internalType: "address";
|
|
1330
|
+
}];
|
|
1331
|
+
}, {
|
|
1332
|
+
readonly type: "error";
|
|
1333
|
+
readonly name: "HookNotImplemented";
|
|
1334
|
+
readonly inputs: readonly [];
|
|
1335
|
+
}, {
|
|
1336
|
+
readonly type: "error";
|
|
1337
|
+
readonly name: "InvalidBlockTime";
|
|
1338
|
+
readonly inputs: readonly [{
|
|
1339
|
+
readonly name: "blockTimeCentis";
|
|
1340
|
+
readonly type: "uint32";
|
|
1341
|
+
readonly internalType: "uint32";
|
|
1342
|
+
}];
|
|
1343
|
+
}, {
|
|
1344
|
+
readonly type: "error";
|
|
1345
|
+
readonly name: "InvalidDecayBlocks";
|
|
1346
|
+
readonly inputs: readonly [{
|
|
1347
|
+
readonly name: "decayBlocks";
|
|
1348
|
+
readonly type: "uint32";
|
|
1349
|
+
readonly internalType: "uint32";
|
|
1350
|
+
}];
|
|
1351
|
+
}, {
|
|
1352
|
+
readonly type: "error";
|
|
1353
|
+
readonly name: "InvalidFeeSchedule";
|
|
1354
|
+
readonly inputs: readonly [{
|
|
1355
|
+
readonly name: "initialFeeBips";
|
|
1356
|
+
readonly type: "uint24";
|
|
1357
|
+
readonly internalType: "uint24";
|
|
1358
|
+
}, {
|
|
1359
|
+
readonly name: "finalFeeBips";
|
|
1360
|
+
readonly type: "uint24";
|
|
1361
|
+
readonly internalType: "uint24";
|
|
1362
|
+
}];
|
|
1363
|
+
}, {
|
|
1364
|
+
readonly type: "error";
|
|
1365
|
+
readonly name: "InvalidStartBlock";
|
|
1366
|
+
readonly inputs: readonly [{
|
|
1367
|
+
readonly name: "startBlock";
|
|
1368
|
+
readonly type: "uint256";
|
|
1369
|
+
readonly internalType: "uint256";
|
|
1370
|
+
}, {
|
|
1371
|
+
readonly name: "currentBlock";
|
|
1372
|
+
readonly type: "uint256";
|
|
1373
|
+
readonly internalType: "uint256";
|
|
1374
|
+
}];
|
|
1375
|
+
}, {
|
|
1376
|
+
readonly type: "error";
|
|
1377
|
+
readonly name: "LaunchAlreadyStarted";
|
|
1378
|
+
readonly inputs: readonly [{
|
|
1379
|
+
readonly name: "poolId";
|
|
1380
|
+
readonly type: "bytes32";
|
|
1381
|
+
readonly internalType: "PoolId";
|
|
1382
|
+
}, {
|
|
1383
|
+
readonly name: "startBlock";
|
|
1384
|
+
readonly type: "uint256";
|
|
1385
|
+
readonly internalType: "uint256";
|
|
1386
|
+
}];
|
|
1387
|
+
}, {
|
|
1388
|
+
readonly type: "error";
|
|
1389
|
+
readonly name: "LaunchNotConfigured";
|
|
1390
|
+
readonly inputs: readonly [{
|
|
1391
|
+
readonly name: "poolId";
|
|
1392
|
+
readonly type: "bytes32";
|
|
1393
|
+
readonly internalType: "PoolId";
|
|
1394
|
+
}];
|
|
1395
|
+
}, {
|
|
1396
|
+
readonly type: "error";
|
|
1397
|
+
readonly name: "LaunchWindowOutOfRange";
|
|
1398
|
+
readonly inputs: readonly [{
|
|
1399
|
+
readonly name: "realSeconds";
|
|
1400
|
+
readonly type: "uint256";
|
|
1401
|
+
readonly internalType: "uint256";
|
|
1402
|
+
}, {
|
|
1403
|
+
readonly name: "minSeconds";
|
|
1404
|
+
readonly type: "uint256";
|
|
1405
|
+
readonly internalType: "uint256";
|
|
1406
|
+
}, {
|
|
1407
|
+
readonly name: "maxSeconds";
|
|
1408
|
+
readonly type: "uint256";
|
|
1409
|
+
readonly internalType: "uint256";
|
|
1410
|
+
}];
|
|
1411
|
+
}, {
|
|
1412
|
+
readonly type: "error";
|
|
1413
|
+
readonly name: "NotLaunchOwner";
|
|
1414
|
+
readonly inputs: readonly [{
|
|
1415
|
+
readonly name: "poolId";
|
|
1416
|
+
readonly type: "bytes32";
|
|
1417
|
+
readonly internalType: "PoolId";
|
|
1418
|
+
}, {
|
|
1419
|
+
readonly name: "caller";
|
|
1420
|
+
readonly type: "address";
|
|
1421
|
+
readonly internalType: "address";
|
|
1422
|
+
}];
|
|
1423
|
+
}, {
|
|
1424
|
+
readonly type: "error";
|
|
1425
|
+
readonly name: "NotPoolManager";
|
|
1426
|
+
readonly inputs: readonly [];
|
|
1427
|
+
}, {
|
|
1428
|
+
readonly type: "error";
|
|
1429
|
+
readonly name: "PermissionDependencyMissing";
|
|
1430
|
+
readonly inputs: readonly [{
|
|
1431
|
+
readonly name: "declared";
|
|
1432
|
+
readonly type: "uint16";
|
|
1433
|
+
readonly internalType: "uint16";
|
|
1434
|
+
}];
|
|
1435
|
+
}, {
|
|
1436
|
+
readonly type: "error";
|
|
1437
|
+
readonly name: "PoolManagerMismatch";
|
|
1438
|
+
readonly inputs: readonly [{
|
|
1439
|
+
readonly name: "declared";
|
|
1440
|
+
readonly type: "address";
|
|
1441
|
+
readonly internalType: "address";
|
|
1442
|
+
}];
|
|
1443
|
+
}, {
|
|
1444
|
+
readonly type: "error";
|
|
1445
|
+
readonly name: "PoolMustUseDynamicFee";
|
|
1446
|
+
readonly inputs: readonly [{
|
|
1447
|
+
readonly name: "fee";
|
|
1448
|
+
readonly type: "uint24";
|
|
1449
|
+
readonly internalType: "uint24";
|
|
1450
|
+
}];
|
|
1451
|
+
}, {
|
|
1452
|
+
readonly type: "error";
|
|
1453
|
+
readonly name: "ReservedBitsSet";
|
|
1454
|
+
readonly inputs: readonly [{
|
|
1455
|
+
readonly name: "declared";
|
|
1456
|
+
readonly type: "uint16";
|
|
1457
|
+
readonly internalType: "uint16";
|
|
1458
|
+
}];
|
|
1459
|
+
}, {
|
|
1460
|
+
readonly type: "error";
|
|
1461
|
+
readonly name: "TradingNotOpen";
|
|
1462
|
+
readonly inputs: readonly [{
|
|
1463
|
+
readonly name: "poolId";
|
|
1464
|
+
readonly type: "bytes32";
|
|
1465
|
+
readonly internalType: "PoolId";
|
|
1466
|
+
}, {
|
|
1467
|
+
readonly name: "startBlock";
|
|
1468
|
+
readonly type: "uint256";
|
|
1469
|
+
readonly internalType: "uint256";
|
|
1470
|
+
}, {
|
|
1471
|
+
readonly name: "currentBlock";
|
|
1472
|
+
readonly type: "uint256";
|
|
1473
|
+
readonly internalType: "uint256";
|
|
1474
|
+
}];
|
|
1475
|
+
}, {
|
|
1476
|
+
readonly type: "event";
|
|
1477
|
+
readonly name: "LaunchClaimed";
|
|
1478
|
+
readonly inputs: readonly [{
|
|
1479
|
+
readonly name: "poolId";
|
|
1480
|
+
readonly type: "bytes32";
|
|
1481
|
+
readonly indexed: true;
|
|
1482
|
+
readonly internalType: "PoolId";
|
|
1483
|
+
}, {
|
|
1484
|
+
readonly name: "owner";
|
|
1485
|
+
readonly type: "address";
|
|
1486
|
+
readonly indexed: true;
|
|
1487
|
+
readonly internalType: "address";
|
|
1488
|
+
}];
|
|
1489
|
+
readonly anonymous: false;
|
|
1490
|
+
}, {
|
|
1491
|
+
readonly type: "event";
|
|
1492
|
+
readonly name: "LaunchConfigured";
|
|
1493
|
+
readonly inputs: readonly [{
|
|
1494
|
+
readonly name: "poolId";
|
|
1495
|
+
readonly type: "bytes32";
|
|
1496
|
+
readonly indexed: true;
|
|
1497
|
+
readonly internalType: "PoolId";
|
|
1498
|
+
}, {
|
|
1499
|
+
readonly name: "owner";
|
|
1500
|
+
readonly type: "address";
|
|
1501
|
+
readonly indexed: true;
|
|
1502
|
+
readonly internalType: "address";
|
|
1503
|
+
}, {
|
|
1504
|
+
readonly name: "startBlock";
|
|
1505
|
+
readonly type: "uint48";
|
|
1506
|
+
readonly indexed: false;
|
|
1507
|
+
readonly internalType: "uint48";
|
|
1508
|
+
}, {
|
|
1509
|
+
readonly name: "decayBlocks";
|
|
1510
|
+
readonly type: "uint32";
|
|
1511
|
+
readonly indexed: false;
|
|
1512
|
+
readonly internalType: "uint32";
|
|
1513
|
+
}, {
|
|
1514
|
+
readonly name: "initialFeeBips";
|
|
1515
|
+
readonly type: "uint24";
|
|
1516
|
+
readonly indexed: false;
|
|
1517
|
+
readonly internalType: "uint24";
|
|
1518
|
+
}, {
|
|
1519
|
+
readonly name: "finalFeeBips";
|
|
1520
|
+
readonly type: "uint24";
|
|
1521
|
+
readonly indexed: false;
|
|
1522
|
+
readonly internalType: "uint24";
|
|
1523
|
+
}, {
|
|
1524
|
+
readonly name: "maxBuyPerTx";
|
|
1525
|
+
readonly type: "uint128";
|
|
1526
|
+
readonly indexed: false;
|
|
1527
|
+
readonly internalType: "uint128";
|
|
1528
|
+
}, {
|
|
1529
|
+
readonly name: "launchTokenIsCurrency0";
|
|
1530
|
+
readonly type: "bool";
|
|
1531
|
+
readonly indexed: false;
|
|
1532
|
+
readonly internalType: "bool";
|
|
1533
|
+
}, {
|
|
1534
|
+
readonly name: "enabled";
|
|
1535
|
+
readonly type: "bool";
|
|
1536
|
+
readonly indexed: false;
|
|
1537
|
+
readonly internalType: "bool";
|
|
1538
|
+
}];
|
|
1539
|
+
readonly anonymous: false;
|
|
1540
|
+
}, {
|
|
1541
|
+
readonly type: "event";
|
|
1542
|
+
readonly name: "LaunchStarted";
|
|
1543
|
+
readonly inputs: readonly [{
|
|
1544
|
+
readonly name: "poolId";
|
|
1545
|
+
readonly type: "bytes32";
|
|
1546
|
+
readonly indexed: true;
|
|
1547
|
+
readonly internalType: "PoolId";
|
|
1548
|
+
}, {
|
|
1549
|
+
readonly name: "blockNumber";
|
|
1550
|
+
readonly type: "uint256";
|
|
1551
|
+
readonly indexed: false;
|
|
1552
|
+
readonly internalType: "uint256";
|
|
1553
|
+
}];
|
|
1554
|
+
readonly anonymous: false;
|
|
1555
|
+
}, {
|
|
1556
|
+
readonly type: "function";
|
|
1557
|
+
readonly name: "MAX_DECAY_BLOCKS";
|
|
1558
|
+
readonly inputs: readonly [];
|
|
1559
|
+
readonly outputs: readonly [{
|
|
1560
|
+
readonly name: "";
|
|
1561
|
+
readonly type: "uint32";
|
|
1562
|
+
readonly internalType: "uint32";
|
|
1563
|
+
}];
|
|
1564
|
+
readonly stateMutability: "view";
|
|
1565
|
+
}, {
|
|
1566
|
+
readonly type: "function";
|
|
1567
|
+
readonly name: "MAX_FINAL_FEE";
|
|
1568
|
+
readonly inputs: readonly [];
|
|
1569
|
+
readonly outputs: readonly [{
|
|
1570
|
+
readonly name: "";
|
|
1571
|
+
readonly type: "uint24";
|
|
1572
|
+
readonly internalType: "uint24";
|
|
1573
|
+
}];
|
|
1574
|
+
readonly stateMutability: "view";
|
|
1575
|
+
}, {
|
|
1576
|
+
readonly type: "function";
|
|
1577
|
+
readonly name: "MAX_INITIAL_FEE";
|
|
1578
|
+
readonly inputs: readonly [];
|
|
1579
|
+
readonly outputs: readonly [{
|
|
1580
|
+
readonly name: "";
|
|
1581
|
+
readonly type: "uint24";
|
|
1582
|
+
readonly internalType: "uint24";
|
|
1583
|
+
}];
|
|
1584
|
+
readonly stateMutability: "view";
|
|
1585
|
+
}, {
|
|
1586
|
+
readonly type: "function";
|
|
1587
|
+
readonly name: "MAX_START_DELAY";
|
|
1588
|
+
readonly inputs: readonly [];
|
|
1589
|
+
readonly outputs: readonly [{
|
|
1590
|
+
readonly name: "";
|
|
1591
|
+
readonly type: "uint48";
|
|
1592
|
+
readonly internalType: "uint48";
|
|
1593
|
+
}];
|
|
1594
|
+
readonly stateMutability: "view";
|
|
1595
|
+
}, {
|
|
1596
|
+
readonly type: "function";
|
|
1597
|
+
readonly name: "configureLaunch";
|
|
1598
|
+
readonly inputs: readonly [{
|
|
1599
|
+
readonly name: "key";
|
|
1600
|
+
readonly type: "tuple";
|
|
1601
|
+
readonly internalType: "struct PoolKey";
|
|
1602
|
+
readonly components: readonly [{
|
|
1603
|
+
readonly name: "currency0";
|
|
1604
|
+
readonly type: "address";
|
|
1605
|
+
readonly internalType: "Currency";
|
|
1606
|
+
}, {
|
|
1607
|
+
readonly name: "currency1";
|
|
1608
|
+
readonly type: "address";
|
|
1609
|
+
readonly internalType: "Currency";
|
|
1610
|
+
}, {
|
|
1611
|
+
readonly name: "hooks";
|
|
1612
|
+
readonly type: "address";
|
|
1613
|
+
readonly internalType: "contract IHooks";
|
|
1614
|
+
}, {
|
|
1615
|
+
readonly name: "poolManager";
|
|
1616
|
+
readonly type: "address";
|
|
1617
|
+
readonly internalType: "contract IPoolManager";
|
|
1618
|
+
}, {
|
|
1619
|
+
readonly name: "fee";
|
|
1620
|
+
readonly type: "uint24";
|
|
1621
|
+
readonly internalType: "uint24";
|
|
1622
|
+
}, {
|
|
1623
|
+
readonly name: "parameters";
|
|
1624
|
+
readonly type: "bytes32";
|
|
1625
|
+
readonly internalType: "bytes32";
|
|
1626
|
+
}];
|
|
1627
|
+
}, {
|
|
1628
|
+
readonly name: "cfg";
|
|
1629
|
+
readonly type: "tuple";
|
|
1630
|
+
readonly internalType: "struct LaunchGuardHook.LaunchConfig";
|
|
1631
|
+
readonly components: readonly [{
|
|
1632
|
+
readonly name: "startBlock";
|
|
1633
|
+
readonly type: "uint48";
|
|
1634
|
+
readonly internalType: "uint48";
|
|
1635
|
+
}, {
|
|
1636
|
+
readonly name: "decayBlocks";
|
|
1637
|
+
readonly type: "uint32";
|
|
1638
|
+
readonly internalType: "uint32";
|
|
1639
|
+
}, {
|
|
1640
|
+
readonly name: "initialFeeBips";
|
|
1641
|
+
readonly type: "uint24";
|
|
1642
|
+
readonly internalType: "uint24";
|
|
1643
|
+
}, {
|
|
1644
|
+
readonly name: "finalFeeBips";
|
|
1645
|
+
readonly type: "uint24";
|
|
1646
|
+
readonly internalType: "uint24";
|
|
1647
|
+
}, {
|
|
1648
|
+
readonly name: "maxBuyPerTx";
|
|
1649
|
+
readonly type: "uint128";
|
|
1650
|
+
readonly internalType: "uint128";
|
|
1651
|
+
}, {
|
|
1652
|
+
readonly name: "launchTokenIsCurrency0";
|
|
1653
|
+
readonly type: "bool";
|
|
1654
|
+
readonly internalType: "bool";
|
|
1655
|
+
}, {
|
|
1656
|
+
readonly name: "enabled";
|
|
1657
|
+
readonly type: "bool";
|
|
1658
|
+
readonly internalType: "bool";
|
|
1659
|
+
}];
|
|
1660
|
+
}];
|
|
1661
|
+
readonly outputs: readonly [];
|
|
1662
|
+
readonly stateMutability: "nonpayable";
|
|
1663
|
+
}, {
|
|
1664
|
+
readonly type: "function";
|
|
1665
|
+
readonly name: "currentFee";
|
|
1666
|
+
readonly inputs: readonly [{
|
|
1667
|
+
readonly name: "poolId";
|
|
1668
|
+
readonly type: "bytes32";
|
|
1669
|
+
readonly internalType: "PoolId";
|
|
1670
|
+
}];
|
|
1671
|
+
readonly outputs: readonly [{
|
|
1672
|
+
readonly name: "";
|
|
1673
|
+
readonly type: "uint24";
|
|
1674
|
+
readonly internalType: "uint24";
|
|
1675
|
+
}];
|
|
1676
|
+
readonly stateMutability: "view";
|
|
1677
|
+
}, {
|
|
1678
|
+
readonly type: "function";
|
|
1679
|
+
readonly name: "feeAt";
|
|
1680
|
+
readonly inputs: readonly [{
|
|
1681
|
+
readonly name: "poolId";
|
|
1682
|
+
readonly type: "bytes32";
|
|
1683
|
+
readonly internalType: "PoolId";
|
|
1684
|
+
}, {
|
|
1685
|
+
readonly name: "blockNumber";
|
|
1686
|
+
readonly type: "uint256";
|
|
1687
|
+
readonly internalType: "uint256";
|
|
1688
|
+
}];
|
|
1689
|
+
readonly outputs: readonly [{
|
|
1690
|
+
readonly name: "";
|
|
1691
|
+
readonly type: "uint24";
|
|
1692
|
+
readonly internalType: "uint24";
|
|
1693
|
+
}];
|
|
1694
|
+
readonly stateMutability: "view";
|
|
1695
|
+
}, {
|
|
1696
|
+
readonly type: "function";
|
|
1697
|
+
readonly name: "getHooksRegistrationBitmap";
|
|
1698
|
+
readonly inputs: readonly [];
|
|
1699
|
+
readonly outputs: readonly [{
|
|
1700
|
+
readonly name: "";
|
|
1701
|
+
readonly type: "uint16";
|
|
1702
|
+
readonly internalType: "uint16";
|
|
1703
|
+
}];
|
|
1704
|
+
readonly stateMutability: "pure";
|
|
1705
|
+
}, {
|
|
1706
|
+
readonly type: "function";
|
|
1707
|
+
readonly name: "getLaunch";
|
|
1708
|
+
readonly inputs: readonly [{
|
|
1709
|
+
readonly name: "poolId";
|
|
1710
|
+
readonly type: "bytes32";
|
|
1711
|
+
readonly internalType: "PoolId";
|
|
1712
|
+
}];
|
|
1713
|
+
readonly outputs: readonly [{
|
|
1714
|
+
readonly name: "";
|
|
1715
|
+
readonly type: "tuple";
|
|
1716
|
+
readonly internalType: "struct LaunchGuardHook.Launch";
|
|
1717
|
+
readonly components: readonly [{
|
|
1718
|
+
readonly name: "owner";
|
|
1719
|
+
readonly type: "address";
|
|
1720
|
+
readonly internalType: "address";
|
|
1721
|
+
}, {
|
|
1722
|
+
readonly name: "startBlock";
|
|
1723
|
+
readonly type: "uint48";
|
|
1724
|
+
readonly internalType: "uint48";
|
|
1725
|
+
}, {
|
|
1726
|
+
readonly name: "decayBlocks";
|
|
1727
|
+
readonly type: "uint32";
|
|
1728
|
+
readonly internalType: "uint32";
|
|
1729
|
+
}, {
|
|
1730
|
+
readonly name: "enabled";
|
|
1731
|
+
readonly type: "bool";
|
|
1732
|
+
readonly internalType: "bool";
|
|
1733
|
+
}, {
|
|
1734
|
+
readonly name: "initialFeeBips";
|
|
1735
|
+
readonly type: "uint24";
|
|
1736
|
+
readonly internalType: "uint24";
|
|
1737
|
+
}, {
|
|
1738
|
+
readonly name: "finalFeeBips";
|
|
1739
|
+
readonly type: "uint24";
|
|
1740
|
+
readonly internalType: "uint24";
|
|
1741
|
+
}, {
|
|
1742
|
+
readonly name: "maxBuyPerTx";
|
|
1743
|
+
readonly type: "uint128";
|
|
1744
|
+
readonly internalType: "uint128";
|
|
1745
|
+
}, {
|
|
1746
|
+
readonly name: "launchTokenIsCurrency0";
|
|
1747
|
+
readonly type: "bool";
|
|
1748
|
+
readonly internalType: "bool";
|
|
1749
|
+
}, {
|
|
1750
|
+
readonly name: "launched";
|
|
1751
|
+
readonly type: "bool";
|
|
1752
|
+
readonly internalType: "bool";
|
|
1753
|
+
}];
|
|
1754
|
+
}];
|
|
1755
|
+
readonly stateMutability: "view";
|
|
1756
|
+
}, {
|
|
1757
|
+
readonly type: "function";
|
|
1758
|
+
readonly name: "launchOwner";
|
|
1759
|
+
readonly inputs: readonly [{
|
|
1760
|
+
readonly name: "poolId";
|
|
1761
|
+
readonly type: "bytes32";
|
|
1762
|
+
readonly internalType: "PoolId";
|
|
1763
|
+
}];
|
|
1764
|
+
readonly outputs: readonly [{
|
|
1765
|
+
readonly name: "";
|
|
1766
|
+
readonly type: "address";
|
|
1767
|
+
readonly internalType: "address";
|
|
1768
|
+
}];
|
|
1769
|
+
readonly stateMutability: "view";
|
|
1770
|
+
}, {
|
|
1771
|
+
readonly type: "function";
|
|
1772
|
+
readonly name: "poolManager";
|
|
1773
|
+
readonly inputs: readonly [];
|
|
1774
|
+
readonly outputs: readonly [{
|
|
1775
|
+
readonly name: "";
|
|
1776
|
+
readonly type: "address";
|
|
1777
|
+
readonly internalType: "contract ICLPoolManager";
|
|
1778
|
+
}];
|
|
1779
|
+
readonly stateMutability: "view";
|
|
1780
|
+
}];
|
|
1781
|
+
/**
|
|
1782
|
+
* `LaunchGuardHook.FEE_DENOMINATOR`. 1_000_000 == 100%.
|
|
1783
|
+
*
|
|
1784
|
+
* Identical to the protocol-wide pips denominator, which is why a launch fee
|
|
1785
|
+
* can be rendered with the same formatter as any other LP fee.
|
|
1786
|
+
*/
|
|
1787
|
+
export declare const LAUNCH_FEE_DENOMINATOR = 1000000;
|
|
1788
|
+
/**
|
|
1789
|
+
* A decoded `LaunchGuardHook.Launch` record, from either hook generation.
|
|
1790
|
+
*
|
|
1791
|
+
* Field-for-field the struct, with three changes: the clock is recorded,
|
|
1792
|
+
* `start` / `window` are named for what they are on EITHER clock, and the fee
|
|
1793
|
+
* fields are renamed to the unit they are actually in.
|
|
1794
|
+
*/
|
|
1795
|
+
export interface LaunchGuard {
|
|
1796
|
+
/** `timestamp`: `start` and `window` are seconds. `contract-block`: contract blocks. */
|
|
1797
|
+
readonly durationClock: DurationClock;
|
|
1798
|
+
/** Launch owner. The zero address means the pool id has never been claimed. */
|
|
1799
|
+
readonly owner: Address;
|
|
1800
|
+
/** First point (`startTime` or `startBlock`) at which swaps are permitted. */
|
|
1801
|
+
readonly start: bigint;
|
|
1802
|
+
/** Length of the decay window from `start`, in the clock's unit (`decaySeconds` or `decayBlocks`). */
|
|
1803
|
+
readonly window: number;
|
|
1804
|
+
/**
|
|
1805
|
+
* When false the hook applies no gate and no tax: it overrides the fee with
|
|
1806
|
+
* `finalFeePips` and nothing else. It does NOT mean "no hook".
|
|
1807
|
+
*/
|
|
1808
|
+
readonly enabled: boolean;
|
|
1809
|
+
/** Fee at `start`, in pips. */
|
|
1810
|
+
readonly initialFeePips: number;
|
|
1811
|
+
/** Fee at and after `start + window`, in pips. */
|
|
1812
|
+
readonly finalFeePips: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* Per-TRANSACTION cap on the input amount of a buy, in the quote currency.
|
|
1815
|
+
* `0` disables it. This is not a per-wallet cap and cannot be made into one.
|
|
1816
|
+
*/
|
|
1817
|
+
readonly maxBuyPerTx: bigint;
|
|
1818
|
+
/** Which side of the pool is the token being launched. */
|
|
1819
|
+
readonly launchTokenIsCurrency0: boolean;
|
|
1820
|
+
/** Set by the hook on the first swap at or after `start`. */
|
|
1821
|
+
readonly launched: boolean;
|
|
1822
|
+
}
|
|
1823
|
+
/** The tuple shape `getLaunch` returns, as viem decodes it, for either generation. */
|
|
1824
|
+
export interface RawLaunchGuard {
|
|
1825
|
+
readonly owner: Address;
|
|
1826
|
+
/** Timestamp generation. */
|
|
1827
|
+
readonly startTime?: number | bigint;
|
|
1828
|
+
readonly decaySeconds?: number;
|
|
1829
|
+
/** Block-numbered generation. */
|
|
1830
|
+
readonly startBlock?: number | bigint;
|
|
1831
|
+
readonly decayBlocks?: number;
|
|
1832
|
+
readonly enabled: boolean;
|
|
1833
|
+
readonly initialFeeBips: number;
|
|
1834
|
+
readonly finalFeeBips: number;
|
|
1835
|
+
readonly maxBuyPerTx: bigint;
|
|
1836
|
+
readonly launchTokenIsCurrency0: boolean;
|
|
1837
|
+
readonly launched: boolean;
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Normalises a `getLaunch` result into a {@link LaunchGuard}.
|
|
1841
|
+
*
|
|
1842
|
+
* `clock` must be the clock of the ABI the result was decoded with. A record
|
|
1843
|
+
* whose fields do not match that generation throws rather than defaulting.
|
|
1844
|
+
*/
|
|
1845
|
+
export declare function decodeLaunchGuard(raw: RawLaunchGuard, clock: DurationClock): LaunchGuard;
|
|
1846
|
+
/** `false` when the pool id has never been claimed, i.e. there is no launch. */
|
|
1847
|
+
export declare function isLaunchConfigured(guard: LaunchGuard): boolean;
|
|
1848
|
+
/**
|
|
1849
|
+
* Where a launch is in its schedule.
|
|
1850
|
+
*
|
|
1851
|
+
* - `unclaimed` — no launch record. Every view on the hook reverts
|
|
1852
|
+
* `LaunchNotConfigured`, and the pool could not have been initialized.
|
|
1853
|
+
* - `disabled` — `enabled == false`. No gate, no tax; the hook only pins the
|
|
1854
|
+
* fee at `finalFeePips`. Trading is open.
|
|
1855
|
+
* - `pending` — now < `start`. Every swap reverts `TradingNotOpen`. The owner
|
|
1856
|
+
* may still move the start.
|
|
1857
|
+
* - `decaying` — inside `[start, start + window)`. The fee is
|
|
1858
|
+
* above `finalFeePips` and `maxBuyPerTx` is enforced if it is set.
|
|
1859
|
+
* - `settled` — at or past `start + window`. The fee is exactly
|
|
1860
|
+
* `finalFeePips` and the per-transaction cap no longer applies.
|
|
1861
|
+
*/
|
|
1862
|
+
export type LaunchPhase = "unclaimed" | "disabled" | "pending" | "decaying" | "settled";
|
|
1863
|
+
/** The schedule as of one point on the hook's clock. Pure; nothing here is interpolated. */
|
|
1864
|
+
export interface LaunchSchedule {
|
|
1865
|
+
readonly phase: LaunchPhase;
|
|
1866
|
+
/** The unit of `now`, `start`, `end`, `untilOpen` and `remaining`. */
|
|
1867
|
+
readonly durationClock: DurationClock;
|
|
1868
|
+
/** The point this view was computed for: a timestamp or a contract block. */
|
|
1869
|
+
readonly now: bigint;
|
|
1870
|
+
readonly start: bigint | null;
|
|
1871
|
+
/** `start + window`, the first point at the final fee. */
|
|
1872
|
+
readonly end: bigint | null;
|
|
1873
|
+
/** Units until trading opens, or `null` when it already has. */
|
|
1874
|
+
readonly untilOpen: bigint | null;
|
|
1875
|
+
/** Units left in the decay window, or `null` outside it. */
|
|
1876
|
+
readonly remaining: bigint | null;
|
|
1877
|
+
/** Progress through the decay window in bps, or `null` outside it. */
|
|
1878
|
+
readonly decayProgressBps: number | null;
|
|
1879
|
+
/** Fee a swap at `now` pays, in pips. `null` when unclaimed. */
|
|
1880
|
+
readonly feePips: number | null;
|
|
1881
|
+
readonly initialFeePips: number | null;
|
|
1882
|
+
readonly finalFeePips: number | null;
|
|
1883
|
+
/** `true` when a swap at `now` would be accepted by the hook. */
|
|
1884
|
+
readonly tradingOpen: boolean;
|
|
1885
|
+
/** The configured cap, or `null` when none is set. */
|
|
1886
|
+
readonly maxBuyPerTx: bigint | null;
|
|
1887
|
+
/** `true` only while the hook would actually check that cap. */
|
|
1888
|
+
readonly maxBuyPerTxEnforced: boolean;
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* The fee a swap at `now` pays, in pips — an exact mirror of
|
|
1892
|
+
* `LaunchGuardHook.feeAt` including its rounding. `now` is on the guard's own
|
|
1893
|
+
* clock: the latest block's timestamp, or the CONTRACT block number.
|
|
1894
|
+
*
|
|
1895
|
+
* The subtracted discount is floored, so the fee rounds **up**, toward the LPs
|
|
1896
|
+
* and away from the sniper. Reproducing that direction matters: a UI that
|
|
1897
|
+
* rounded the other way would quote a fee lower than the one charged.
|
|
1898
|
+
*
|
|
1899
|
+
* Returns `null` for an unclaimed pool, where the contract reverts. Before the
|
|
1900
|
+
* start it returns `initialFeePips`, matching the contract —
|
|
1901
|
+
* though such a swap would in fact revert, so read that value as "the fee at
|
|
1902
|
+
* the open" rather than as a fee anyone can pay.
|
|
1903
|
+
*/
|
|
1904
|
+
export declare function launchFeeAt(guard: LaunchGuard, now: bigint): number | null;
|
|
1905
|
+
/** Derives the whole schedule at one point on the guard's clock. Pure. */
|
|
1906
|
+
export declare function launchScheduleAt(guard: LaunchGuard, now: bigint): LaunchSchedule;
|
|
1907
|
+
/**
|
|
1908
|
+
* Why the hook would reject this buy. `null` means it would not.
|
|
1909
|
+
*
|
|
1910
|
+
* Each value names an actual revert in `LaunchGuardHook`, so a blocked button
|
|
1911
|
+
* here corresponds to a transaction that would have failed rather than to a
|
|
1912
|
+
* rule the widget made up.
|
|
1913
|
+
*/
|
|
1914
|
+
export type LaunchBuyBlockReason = "not-configured" | "trading-not-open" | "exceeds-max-buy-per-tx" | null;
|
|
1915
|
+
/** Result of {@link evaluateLaunchBuy}. */
|
|
1916
|
+
export interface LaunchBuyGate {
|
|
1917
|
+
readonly reason: LaunchBuyBlockReason;
|
|
1918
|
+
/** A message suitable for a disabled button, or `null` when not blocked. */
|
|
1919
|
+
readonly message: string | null;
|
|
1920
|
+
/** The contract error this would surface as, or `null`. */
|
|
1921
|
+
readonly revert: string | null;
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* Evaluates the gates `LaunchGuardHook._beforeSwap` will evaluate.
|
|
1925
|
+
*
|
|
1926
|
+
* `amountIn` is the input amount of the swap, denominated in the **quote**
|
|
1927
|
+
* currency, which is the denomination `maxBuyPerTx` uses. Pass `null` while the
|
|
1928
|
+
* amount field is empty: the schedule gates are still checked, the cap is not.
|
|
1929
|
+
*
|
|
1930
|
+
* This covers only the hook. Balance, allowance and slippage are the swap
|
|
1931
|
+
* path's business and are evaluated there.
|
|
1932
|
+
*/
|
|
1933
|
+
export declare function evaluateLaunchBuy(args: {
|
|
1934
|
+
readonly guard: LaunchGuard;
|
|
1935
|
+
/** Now, on the guard's own clock. */
|
|
1936
|
+
readonly now: bigint;
|
|
1937
|
+
readonly amountIn: bigint | null;
|
|
1938
|
+
}): LaunchBuyGate;
|
|
1939
|
+
/**
|
|
1940
|
+
* `true` when this hop buys the launch token, i.e. its input is the quote
|
|
1941
|
+
* currency.
|
|
1942
|
+
*
|
|
1943
|
+
* Mirrors the hook: `isBuy = launchTokenIsCurrency0 ? !zeroForOne : zeroForOne`.
|
|
1944
|
+
* Only a buy is subject to `maxBuyPerTx`; a sell is uncapped by design.
|
|
1945
|
+
*/
|
|
1946
|
+
export declare function hopIsLaunchBuy(hop: SwapHop, guard: LaunchGuard): boolean;
|
|
1947
|
+
/** Arguments for {@link buildLaunchBuyCall}. */
|
|
1948
|
+
export interface BuildLaunchBuyArgs extends Omit<BuildSwapCallArgs, "hops"> {
|
|
1949
|
+
/**
|
|
1950
|
+
* The launch pool. A single hop: the hook governs one pool, and routing a
|
|
1951
|
+
* launch buy through an intermediate pool would leave the guard un-consulted
|
|
1952
|
+
* on the leg that matters.
|
|
1953
|
+
*/
|
|
1954
|
+
readonly hop: SwapHop;
|
|
1955
|
+
/** The launch record read from the hook, used to check the gates. */
|
|
1956
|
+
readonly guard: LaunchGuard;
|
|
1957
|
+
/** Now, on the guard's clock, that the gates are evaluated against — the latest read from chain. */
|
|
1958
|
+
readonly now: bigint;
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Encodes a launch buy.
|
|
1962
|
+
*
|
|
1963
|
+
* This is {@link buildSwapCall} with the hook's preconditions checked first. It
|
|
1964
|
+
* is not a different transaction and there is no launch-specific calldata: the
|
|
1965
|
+
* router, the action plan and the integrator fee step are all exactly the swap
|
|
1966
|
+
* path's, because buying into a launch is a swap.
|
|
1967
|
+
*
|
|
1968
|
+
* Throws rather than encoding when the hook would revert. A launch fails in
|
|
1969
|
+
* `beforeSwap`, which is inside the vault lock, so the user pays gas for the
|
|
1970
|
+
* whole plan before finding out — refusing here is strictly cheaper than
|
|
1971
|
+
* letting them send it.
|
|
1972
|
+
*
|
|
1973
|
+
* Exact-output is not encodable at all: `beforeSwap` cannot know the input
|
|
1974
|
+
* amount of an exact-output swap, so the hook rejects one outright while the
|
|
1975
|
+
* cap is live (`ExactOutputBuyBlockedDuringLaunch`). This package only encodes
|
|
1976
|
+
* exact-input swaps, so the case cannot arise here.
|
|
1977
|
+
*/
|
|
1978
|
+
export declare function buildLaunchBuyCall(args: BuildLaunchBuyArgs): EncodedSwapCall;
|
|
1979
|
+
//# sourceMappingURL=launch.d.ts.map
|