tempo.ts 0.1.4 → 0.2.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 +33 -2
- package/dist/chains.d.ts +509 -115
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +18 -9
- package/dist/chains.js.map +1 -1
- package/dist/ox/Order.d.ts +92 -0
- package/dist/ox/Order.d.ts.map +1 -0
- package/dist/ox/Order.js +88 -0
- package/dist/ox/Order.js.map +1 -0
- package/dist/ox/OrdersFilters.d.ts +72 -0
- package/dist/ox/OrdersFilters.d.ts.map +1 -0
- package/dist/ox/OrdersFilters.js +100 -0
- package/dist/ox/OrdersFilters.js.map +1 -0
- package/dist/ox/Pagination.d.ts +128 -0
- package/dist/ox/Pagination.d.ts.map +1 -0
- package/dist/ox/Pagination.js +78 -0
- package/dist/ox/Pagination.js.map +1 -0
- package/dist/ox/PoolId.d.ts +18 -0
- package/dist/ox/PoolId.d.ts.map +1 -0
- package/dist/ox/PoolId.js +13 -0
- package/dist/ox/PoolId.js.map +1 -0
- package/dist/ox/RpcSchema.d.ts +32 -0
- package/dist/ox/RpcSchema.d.ts.map +1 -0
- package/dist/ox/RpcSchema.js +2 -0
- package/dist/ox/RpcSchema.js.map +1 -0
- package/dist/ox/SignatureEnvelope.d.ts +1 -1
- package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
- package/dist/ox/SignatureEnvelope.js.map +1 -1
- package/dist/{viem → ox}/Tick.d.ts +4 -0
- package/dist/ox/Tick.d.ts.map +1 -0
- package/dist/ox/Tick.js.map +1 -0
- package/dist/ox/Transaction.d.ts.map +1 -1
- package/dist/ox/Transaction.js +2 -1
- package/dist/ox/Transaction.js.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.d.ts +6 -6
- package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.js +4 -2
- package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
- package/dist/ox/TransactionRequest.d.ts +4 -0
- package/dist/ox/TransactionRequest.d.ts.map +1 -1
- package/dist/ox/TransactionRequest.js.map +1 -1
- package/dist/ox/index.d.ts +6 -0
- package/dist/ox/index.d.ts.map +1 -1
- package/dist/ox/index.js +6 -0
- package/dist/ox/index.js.map +1 -1
- package/dist/prool/Instance.d.ts +5 -0
- package/dist/prool/Instance.d.ts.map +1 -1
- package/dist/prool/Instance.js +32 -8
- package/dist/prool/Instance.js.map +1 -1
- package/dist/viem/Abis.d.ts +1469 -1082
- package/dist/viem/Abis.d.ts.map +1 -1
- package/dist/viem/Abis.js +932 -671
- package/dist/viem/Abis.js.map +1 -1
- package/dist/viem/Account.d.ts +150 -0
- package/dist/viem/Account.d.ts.map +1 -0
- package/dist/viem/Account.js +221 -0
- package/dist/viem/Account.js.map +1 -0
- package/dist/viem/Actions/amm.d.ts +80 -118
- package/dist/viem/Actions/amm.d.ts.map +1 -1
- package/dist/viem/Actions/amm.js +47 -116
- package/dist/viem/Actions/amm.js.map +1 -1
- package/dist/viem/Actions/dex.d.ts +889 -633
- package/dist/viem/Actions/dex.d.ts.map +1 -1
- package/dist/viem/Actions/dex.js +99 -0
- package/dist/viem/Actions/dex.js.map +1 -1
- package/dist/viem/Actions/fee.d.ts +3 -17
- package/dist/viem/Actions/fee.d.ts.map +1 -1
- package/dist/viem/Actions/fee.js.map +1 -1
- package/dist/viem/Actions/index.d.ts +1 -0
- package/dist/viem/Actions/index.d.ts.map +1 -1
- package/dist/viem/Actions/index.js +1 -0
- package/dist/viem/Actions/index.js.map +1 -1
- package/dist/viem/Actions/reward.d.ts +3236 -0
- package/dist/viem/Actions/reward.d.ts.map +1 -0
- package/dist/viem/Actions/reward.js +725 -0
- package/dist/viem/Actions/reward.js.map +1 -0
- package/dist/viem/Actions/token.d.ts +4295 -2646
- package/dist/viem/Actions/token.d.ts.map +1 -1
- package/dist/viem/Actions/token.js +214 -335
- package/dist/viem/Actions/token.js.map +1 -1
- package/dist/viem/Addresses.d.ts +1 -2
- package/dist/viem/Addresses.d.ts.map +1 -1
- package/dist/viem/Addresses.js +1 -2
- package/dist/viem/Addresses.js.map +1 -1
- package/dist/viem/Chain.d.ts +38 -12
- package/dist/viem/Chain.d.ts.map +1 -1
- package/dist/viem/Chain.js +27 -18
- package/dist/viem/Chain.js.map +1 -1
- package/dist/viem/Decorator.d.ts +959 -405
- package/dist/viem/Decorator.d.ts.map +1 -1
- package/dist/viem/Decorator.js +13 -5
- package/dist/viem/Decorator.js.map +1 -1
- package/dist/viem/Formatters.d.ts +8 -1
- package/dist/viem/Formatters.d.ts.map +1 -1
- package/dist/viem/Formatters.js +17 -0
- package/dist/viem/Formatters.js.map +1 -1
- package/dist/viem/P256.d.ts +2 -0
- package/dist/viem/P256.d.ts.map +1 -0
- package/dist/viem/P256.js +2 -0
- package/dist/viem/P256.js.map +1 -0
- package/dist/viem/Secp256k1.d.ts +2 -0
- package/dist/viem/Secp256k1.d.ts.map +1 -0
- package/dist/viem/Secp256k1.js +2 -0
- package/dist/viem/Secp256k1.js.map +1 -0
- package/dist/viem/TokenIds.d.ts +1 -2
- package/dist/viem/TokenIds.d.ts.map +1 -1
- package/dist/viem/TokenIds.js +1 -2
- package/dist/viem/TokenIds.js.map +1 -1
- package/dist/viem/Transaction.d.ts +1 -1
- package/dist/viem/Transaction.d.ts.map +1 -1
- package/dist/viem/Transaction.js +46 -5
- package/dist/viem/Transaction.js.map +1 -1
- package/dist/viem/WebAuthnP256.d.ts +79 -0
- package/dist/viem/WebAuthnP256.d.ts.map +1 -0
- package/dist/viem/WebAuthnP256.js +95 -0
- package/dist/viem/WebAuthnP256.js.map +1 -0
- package/dist/viem/WebCryptoP256.d.ts +2 -0
- package/dist/viem/WebCryptoP256.d.ts.map +1 -0
- package/dist/viem/WebCryptoP256.js +2 -0
- package/dist/viem/WebCryptoP256.js.map +1 -0
- package/dist/viem/index.d.ts +6 -3
- package/dist/viem/index.d.ts.map +1 -1
- package/dist/viem/index.js +6 -3
- package/dist/viem/index.js.map +1 -1
- package/dist/viem/internal/account.d.ts +24 -0
- package/dist/viem/internal/account.d.ts.map +1 -0
- package/dist/viem/internal/account.js +68 -0
- package/dist/viem/internal/account.js.map +1 -0
- package/dist/viem/internal/types.d.ts +10 -0
- package/dist/viem/internal/types.d.ts.map +1 -1
- package/dist/wagmi/Actions/amm.d.ts +428 -0
- package/dist/wagmi/Actions/amm.d.ts.map +1 -0
- package/dist/wagmi/Actions/amm.js +472 -0
- package/dist/wagmi/Actions/amm.js.map +1 -0
- package/dist/wagmi/Actions/dex.d.ts +908 -0
- package/dist/wagmi/Actions/dex.d.ts.map +1 -0
- package/dist/wagmi/Actions/dex.js +1023 -0
- package/dist/wagmi/Actions/dex.js.map +1 -0
- package/dist/wagmi/Actions/fee.d.ts +111 -0
- package/dist/wagmi/Actions/fee.d.ts.map +1 -0
- package/dist/wagmi/Actions/fee.js +126 -0
- package/dist/wagmi/Actions/fee.js.map +1 -0
- package/dist/wagmi/Actions/index.d.ts +6 -0
- package/dist/wagmi/Actions/index.d.ts.map +1 -0
- package/dist/wagmi/Actions/index.js +6 -0
- package/dist/wagmi/Actions/index.js.map +1 -0
- package/dist/wagmi/Actions/reward.d.ts +348 -0
- package/dist/wagmi/Actions/reward.d.ts.map +1 -0
- package/dist/wagmi/Actions/reward.js +388 -0
- package/dist/wagmi/Actions/reward.js.map +1 -0
- package/dist/wagmi/Actions/token.d.ts +1546 -0
- package/dist/wagmi/Actions/token.d.ts.map +1 -0
- package/dist/wagmi/Actions/token.js +1712 -0
- package/dist/wagmi/Actions/token.js.map +1 -0
- package/dist/wagmi/Connector.d.ts +73 -0
- package/dist/wagmi/Connector.d.ts.map +1 -0
- package/dist/wagmi/Connector.js +249 -0
- package/dist/wagmi/Connector.js.map +1 -0
- package/dist/wagmi/Hooks/amm.d.ts +421 -0
- package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
- package/dist/wagmi/Hooks/amm.js +504 -0
- package/dist/wagmi/Hooks/amm.js.map +1 -0
- package/dist/wagmi/Hooks/dex.d.ts +816 -0
- package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
- package/dist/wagmi/Hooks/dex.js +973 -0
- package/dist/wagmi/Hooks/dex.js.map +1 -0
- package/dist/wagmi/Hooks/fee.d.ts +97 -0
- package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
- package/dist/wagmi/Hooks/fee.js +109 -0
- package/dist/wagmi/Hooks/fee.js.map +1 -0
- package/dist/wagmi/Hooks/index.d.ts +6 -0
- package/dist/wagmi/Hooks/index.d.ts.map +1 -0
- package/dist/wagmi/Hooks/index.js +6 -0
- package/dist/wagmi/Hooks/index.js.map +1 -0
- package/dist/wagmi/Hooks/reward.d.ts +307 -0
- package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
- package/dist/wagmi/Hooks/reward.js +349 -0
- package/dist/wagmi/Hooks/reward.js.map +1 -0
- package/dist/wagmi/Hooks/token.d.ts +1388 -0
- package/dist/wagmi/Hooks/token.d.ts.map +1 -0
- package/dist/wagmi/Hooks/token.js +1657 -0
- package/dist/wagmi/Hooks/token.js.map +1 -0
- package/dist/wagmi/index.d.ts +4 -0
- package/dist/wagmi/index.d.ts.map +1 -0
- package/dist/wagmi/index.js +4 -0
- package/dist/wagmi/index.js.map +1 -0
- package/package.json +54 -10
- package/src/chains.ts +19 -9
- package/src/ox/Order.test.ts +78 -0
- package/src/ox/Order.ts +125 -0
- package/src/ox/OrdersFilters.test.ts +182 -0
- package/src/ox/OrdersFilters.ts +125 -0
- package/src/ox/Pagination.test.ts +162 -0
- package/src/ox/Pagination.ts +164 -0
- package/src/ox/PoolId.test.ts +33 -0
- package/src/ox/PoolId.ts +27 -0
- package/src/ox/RpcSchema.ts +35 -0
- package/src/ox/SignatureEnvelope.ts +3 -1
- package/src/{viem → ox}/Tick.test.ts +1 -1
- package/src/{viem → ox}/Tick.ts +5 -0
- package/src/ox/Transaction.test.ts +1 -1
- package/src/ox/Transaction.ts +2 -1
- package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
- package/src/ox/TransactionEnvelopeAA.ts +9 -7
- package/src/ox/TransactionRequest.ts +4 -0
- package/src/ox/index.ts +6 -0
- package/src/prool/Instance.ts +75 -38
- package/src/prool/internal/chain.json +104 -52
- package/src/tsconfig.json +9 -0
- package/src/viem/Abis.ts +972 -710
- package/src/viem/Account.ts +279 -0
- package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
- package/src/viem/Actions/amm.test.ts +98 -169
- package/src/viem/Actions/amm.ts +68 -155
- package/src/viem/Actions/dex.test.ts +563 -484
- package/src/viem/Actions/dex.ts +173 -0
- package/src/viem/Actions/fee.test.ts +23 -34
- package/src/viem/Actions/fee.ts +7 -0
- package/src/viem/Actions/index.ts +1 -0
- package/src/viem/Actions/policy.test.ts +19 -33
- package/src/viem/Actions/reward.test.ts +457 -0
- package/src/viem/Actions/reward.ts +999 -0
- package/src/viem/Actions/token.test.ts +453 -287
- package/src/viem/Actions/token.ts +452 -540
- package/src/viem/Addresses.ts +1 -2
- package/src/viem/Chain.ts +70 -20
- package/src/viem/Decorator.test.ts +2 -1
- package/src/viem/Decorator.ts +996 -421
- package/src/viem/Formatters.ts +31 -5
- package/src/viem/P256.ts +1 -0
- package/src/viem/Secp256k1.ts +1 -0
- package/src/viem/TokenIds.ts +1 -2
- package/src/viem/Transaction.ts +53 -7
- package/src/viem/WebAuthnP256.ts +140 -0
- package/src/viem/WebCryptoP256.ts +1 -0
- package/src/viem/e2e.test.ts +1126 -297
- package/src/viem/index.ts +6 -3
- package/src/viem/internal/account.ts +107 -0
- package/src/viem/internal/types.ts +9 -0
- package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
- package/src/wagmi/Actions/amm.test.ts +198 -0
- package/src/wagmi/Actions/amm.ts +691 -0
- package/src/wagmi/Actions/dex.test.ts +1507 -0
- package/src/wagmi/Actions/dex.ts +1640 -0
- package/src/wagmi/Actions/fee.test.ts +63 -0
- package/src/wagmi/Actions/fee.ts +208 -0
- package/src/wagmi/Actions/index.ts +5 -0
- package/src/wagmi/Actions/reward.test.ts +210 -0
- package/src/wagmi/Actions/reward.ts +632 -0
- package/src/wagmi/Actions/token.test.ts +1308 -0
- package/src/wagmi/Actions/token.ts +2613 -0
- package/src/wagmi/Connector.test.ts +53 -0
- package/src/wagmi/Connector.ts +367 -0
- package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
- package/src/wagmi/Hooks/amm.test.ts +424 -0
- package/src/wagmi/Hooks/amm.ts +806 -0
- package/src/wagmi/Hooks/dex.test.ts +1017 -0
- package/src/wagmi/Hooks/dex.ts +1685 -0
- package/src/wagmi/Hooks/fee.test.ts +166 -0
- package/src/wagmi/Hooks/fee.ts +206 -0
- package/src/wagmi/Hooks/index.ts +5 -0
- package/src/wagmi/Hooks/reward.test.ts +219 -0
- package/src/wagmi/Hooks/reward.ts +672 -0
- package/src/wagmi/Hooks/token.test.ts +1670 -0
- package/src/wagmi/Hooks/token.ts +2906 -0
- package/src/wagmi/index.ts +3 -0
- package/src/wagmi/internal/types.ts +16 -0
- package/dist/viem/Client.d.ts +0 -27
- package/dist/viem/Client.d.ts.map +0 -1
- package/dist/viem/Client.js +0 -28
- package/dist/viem/Client.js.map +0 -1
- package/dist/viem/Tick.d.ts.map +0 -1
- package/dist/viem/Tick.js.map +0 -1
- package/src/viem/Client.bench-d.ts +0 -8
- package/src/viem/Client.test.ts +0 -178
- package/src/viem/Client.ts +0 -91
- /package/dist/{viem → ox}/Tick.js +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { type Account, type Address, type Chain, type Client, type ExtractAbiItem, type GetEventArgs, type Log, type ReadContractReturnType, type TransactionReceipt, type Transport, type Log as viem_Log, type WatchContractEventParameters, type WriteContractReturnType } from 'viem';
|
|
1
|
+
import { type Account, type Address, type BaseErrorType, type Chain, type Client, type ExtractAbiItem, type GetEventArgs, type Log, type ReadContractReturnType, type TransactionReceipt, type Transport, type Log as viem_Log, type WatchContractEventParameters, type WriteContractReturnType } from 'viem';
|
|
2
2
|
import { writeContract, writeContractSync } from 'viem/actions';
|
|
3
3
|
import type { Compute, UnionOmit } from '../../internal/types.js';
|
|
4
|
+
import * as Order from '../../ox/Order.js';
|
|
5
|
+
import * as OrdersFilters from '../../ox/OrdersFilters.js';
|
|
6
|
+
import * as Pagination from '../../ox/Pagination.js';
|
|
4
7
|
import * as Abis from '../Abis.js';
|
|
5
8
|
import type { GetAccountParameter, ReadParameters, WriteParameters } from '../internal/types.js';
|
|
6
9
|
/**
|
|
@@ -49,6 +52,7 @@ export declare namespace buy {
|
|
|
49
52
|
tokenOut: Address;
|
|
50
53
|
};
|
|
51
54
|
type ReturnValue = WriteContractReturnType;
|
|
55
|
+
type ErrorType = BaseErrorType;
|
|
52
56
|
/** @internal */
|
|
53
57
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: buy.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
54
58
|
/**
|
|
@@ -155,6 +159,7 @@ export declare namespace buySync {
|
|
|
155
159
|
/** Transaction receipt. */
|
|
156
160
|
receipt: TransactionReceipt;
|
|
157
161
|
}>;
|
|
162
|
+
type ErrorType = BaseErrorType;
|
|
158
163
|
}
|
|
159
164
|
/**
|
|
160
165
|
* Cancels an order from the orderbook.
|
|
@@ -189,6 +194,7 @@ export declare namespace cancel {
|
|
|
189
194
|
orderId: bigint;
|
|
190
195
|
};
|
|
191
196
|
type ReturnValue = WriteContractReturnType;
|
|
197
|
+
type ErrorType = BaseErrorType;
|
|
192
198
|
/** @internal */
|
|
193
199
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: cancel.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
194
200
|
/**
|
|
@@ -250,23 +256,81 @@ export declare namespace cancel {
|
|
|
250
256
|
* @returns The `OrderCancelled` event.
|
|
251
257
|
*/
|
|
252
258
|
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
253
|
-
readonly name: "
|
|
259
|
+
readonly name: "createPair";
|
|
254
260
|
readonly type: "function";
|
|
255
|
-
readonly stateMutability: "
|
|
261
|
+
readonly stateMutability: "nonpayable";
|
|
256
262
|
readonly inputs: readonly [{
|
|
257
263
|
readonly type: "address";
|
|
258
|
-
readonly name: "
|
|
264
|
+
readonly name: "base";
|
|
265
|
+
}];
|
|
266
|
+
readonly outputs: readonly [{
|
|
267
|
+
readonly type: "bytes32";
|
|
268
|
+
readonly name: "key";
|
|
269
|
+
}];
|
|
270
|
+
}, {
|
|
271
|
+
readonly name: "place";
|
|
272
|
+
readonly type: "function";
|
|
273
|
+
readonly stateMutability: "nonpayable";
|
|
274
|
+
readonly inputs: readonly [{
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
readonly name: "token";
|
|
259
277
|
}, {
|
|
278
|
+
readonly type: "uint128";
|
|
279
|
+
readonly name: "amount";
|
|
280
|
+
}, {
|
|
281
|
+
readonly type: "bool";
|
|
282
|
+
readonly name: "isBid";
|
|
283
|
+
}, {
|
|
284
|
+
readonly type: "int16";
|
|
285
|
+
readonly name: "tick";
|
|
286
|
+
}];
|
|
287
|
+
readonly outputs: readonly [{
|
|
288
|
+
readonly type: "uint128";
|
|
289
|
+
readonly name: "orderId";
|
|
290
|
+
}];
|
|
291
|
+
}, {
|
|
292
|
+
readonly name: "placeFlip";
|
|
293
|
+
readonly type: "function";
|
|
294
|
+
readonly stateMutability: "nonpayable";
|
|
295
|
+
readonly inputs: readonly [{
|
|
260
296
|
readonly type: "address";
|
|
261
297
|
readonly name: "token";
|
|
298
|
+
}, {
|
|
299
|
+
readonly type: "uint128";
|
|
300
|
+
readonly name: "amount";
|
|
301
|
+
}, {
|
|
302
|
+
readonly type: "bool";
|
|
303
|
+
readonly name: "isBid";
|
|
304
|
+
}, {
|
|
305
|
+
readonly type: "int16";
|
|
306
|
+
readonly name: "tick";
|
|
307
|
+
}, {
|
|
308
|
+
readonly type: "int16";
|
|
309
|
+
readonly name: "flipTick";
|
|
262
310
|
}];
|
|
263
311
|
readonly outputs: readonly [{
|
|
264
312
|
readonly type: "uint128";
|
|
313
|
+
readonly name: "orderId";
|
|
265
314
|
}];
|
|
266
315
|
}, {
|
|
267
|
-
readonly name: "
|
|
316
|
+
readonly name: "cancel";
|
|
268
317
|
readonly type: "function";
|
|
269
|
-
readonly stateMutability: "
|
|
318
|
+
readonly stateMutability: "nonpayable";
|
|
319
|
+
readonly inputs: readonly [{
|
|
320
|
+
readonly type: "uint128";
|
|
321
|
+
readonly name: "orderId";
|
|
322
|
+
}];
|
|
323
|
+
readonly outputs: readonly [];
|
|
324
|
+
}, {
|
|
325
|
+
readonly name: "executeBlock";
|
|
326
|
+
readonly type: "function";
|
|
327
|
+
readonly stateMutability: "nonpayable";
|
|
328
|
+
readonly inputs: readonly [];
|
|
329
|
+
readonly outputs: readonly [];
|
|
330
|
+
}, {
|
|
331
|
+
readonly name: "swapExactAmountIn";
|
|
332
|
+
readonly type: "function";
|
|
333
|
+
readonly stateMutability: "nonpayable";
|
|
270
334
|
readonly inputs: readonly [{
|
|
271
335
|
readonly type: "address";
|
|
272
336
|
readonly name: "tokenIn";
|
|
@@ -275,16 +339,19 @@ export declare namespace cancel {
|
|
|
275
339
|
readonly name: "tokenOut";
|
|
276
340
|
}, {
|
|
277
341
|
readonly type: "uint128";
|
|
278
|
-
readonly name: "
|
|
342
|
+
readonly name: "amountIn";
|
|
343
|
+
}, {
|
|
344
|
+
readonly type: "uint128";
|
|
345
|
+
readonly name: "minAmountOut";
|
|
279
346
|
}];
|
|
280
347
|
readonly outputs: readonly [{
|
|
281
348
|
readonly type: "uint128";
|
|
282
|
-
readonly name: "
|
|
349
|
+
readonly name: "amountOut";
|
|
283
350
|
}];
|
|
284
351
|
}, {
|
|
285
|
-
readonly name: "
|
|
352
|
+
readonly name: "swapExactAmountOut";
|
|
286
353
|
readonly type: "function";
|
|
287
|
-
readonly stateMutability: "
|
|
354
|
+
readonly stateMutability: "nonpayable";
|
|
288
355
|
readonly inputs: readonly [{
|
|
289
356
|
readonly type: "address";
|
|
290
357
|
readonly name: "tokenIn";
|
|
@@ -293,71 +360,77 @@ export declare namespace cancel {
|
|
|
293
360
|
readonly name: "tokenOut";
|
|
294
361
|
}, {
|
|
295
362
|
readonly type: "uint128";
|
|
296
|
-
readonly name: "
|
|
363
|
+
readonly name: "amountOut";
|
|
364
|
+
}, {
|
|
365
|
+
readonly type: "uint128";
|
|
366
|
+
readonly name: "maxAmountIn";
|
|
297
367
|
}];
|
|
298
368
|
readonly outputs: readonly [{
|
|
299
369
|
readonly type: "uint128";
|
|
300
|
-
readonly name: "
|
|
370
|
+
readonly name: "amountIn";
|
|
301
371
|
}];
|
|
302
372
|
}, {
|
|
303
|
-
readonly name: "
|
|
373
|
+
readonly name: "quoteSwapExactAmountIn";
|
|
304
374
|
readonly type: "function";
|
|
305
|
-
readonly stateMutability: "
|
|
375
|
+
readonly stateMutability: "view";
|
|
306
376
|
readonly inputs: readonly [{
|
|
307
377
|
readonly type: "address";
|
|
308
|
-
readonly name: "
|
|
378
|
+
readonly name: "tokenIn";
|
|
309
379
|
}, {
|
|
310
380
|
readonly type: "address";
|
|
311
|
-
readonly name: "
|
|
381
|
+
readonly name: "tokenOut";
|
|
382
|
+
}, {
|
|
383
|
+
readonly type: "uint128";
|
|
384
|
+
readonly name: "amountIn";
|
|
312
385
|
}];
|
|
313
386
|
readonly outputs: readonly [{
|
|
314
|
-
readonly type: "
|
|
315
|
-
readonly name: "
|
|
387
|
+
readonly type: "uint128";
|
|
388
|
+
readonly name: "amountOut";
|
|
316
389
|
}];
|
|
317
390
|
}, {
|
|
318
|
-
readonly name: "
|
|
391
|
+
readonly name: "quoteSwapExactAmountOut";
|
|
319
392
|
readonly type: "function";
|
|
320
393
|
readonly stateMutability: "view";
|
|
321
394
|
readonly inputs: readonly [{
|
|
322
395
|
readonly type: "address";
|
|
323
|
-
readonly name: "
|
|
396
|
+
readonly name: "tokenIn";
|
|
324
397
|
}, {
|
|
325
|
-
readonly type: "
|
|
326
|
-
readonly name: "
|
|
398
|
+
readonly type: "address";
|
|
399
|
+
readonly name: "tokenOut";
|
|
327
400
|
}, {
|
|
328
|
-
readonly type: "
|
|
329
|
-
readonly name: "
|
|
401
|
+
readonly type: "uint128";
|
|
402
|
+
readonly name: "amountOut";
|
|
330
403
|
}];
|
|
331
404
|
readonly outputs: readonly [{
|
|
332
|
-
readonly type: "
|
|
333
|
-
readonly name: "
|
|
334
|
-
readonly components: readonly [{
|
|
335
|
-
readonly type: "uint128";
|
|
336
|
-
readonly name: "head";
|
|
337
|
-
}, {
|
|
338
|
-
readonly type: "uint128";
|
|
339
|
-
readonly name: "tail";
|
|
340
|
-
}, {
|
|
341
|
-
readonly type: "uint128";
|
|
342
|
-
readonly name: "totalLiquidity";
|
|
343
|
-
}];
|
|
405
|
+
readonly type: "uint128";
|
|
406
|
+
readonly name: "amountIn";
|
|
344
407
|
}];
|
|
345
408
|
}, {
|
|
346
|
-
readonly name: "
|
|
409
|
+
readonly name: "balanceOf";
|
|
347
410
|
readonly type: "function";
|
|
348
411
|
readonly stateMutability: "view";
|
|
349
|
-
readonly inputs: readonly [
|
|
412
|
+
readonly inputs: readonly [{
|
|
413
|
+
readonly type: "address";
|
|
414
|
+
readonly name: "user";
|
|
415
|
+
}, {
|
|
416
|
+
readonly type: "address";
|
|
417
|
+
readonly name: "token";
|
|
418
|
+
}];
|
|
350
419
|
readonly outputs: readonly [{
|
|
351
420
|
readonly type: "uint128";
|
|
352
421
|
}];
|
|
353
422
|
}, {
|
|
354
|
-
readonly name: "
|
|
423
|
+
readonly name: "withdraw";
|
|
355
424
|
readonly type: "function";
|
|
356
|
-
readonly stateMutability: "
|
|
357
|
-
readonly inputs: readonly [
|
|
358
|
-
|
|
425
|
+
readonly stateMutability: "nonpayable";
|
|
426
|
+
readonly inputs: readonly [{
|
|
427
|
+
readonly type: "address";
|
|
428
|
+
readonly name: "token";
|
|
429
|
+
}, {
|
|
359
430
|
readonly type: "uint128";
|
|
431
|
+
readonly name: "amount";
|
|
360
432
|
}];
|
|
433
|
+
readonly outputs: readonly [];
|
|
361
434
|
}, {
|
|
362
435
|
readonly name: "getOrder";
|
|
363
436
|
readonly type: "function";
|
|
@@ -369,6 +442,9 @@ export declare namespace cancel {
|
|
|
369
442
|
readonly outputs: readonly [{
|
|
370
443
|
readonly type: "tuple";
|
|
371
444
|
readonly components: readonly [{
|
|
445
|
+
readonly type: "uint128";
|
|
446
|
+
readonly name: "orderId";
|
|
447
|
+
}, {
|
|
372
448
|
readonly type: "address";
|
|
373
449
|
readonly name: "maker";
|
|
374
450
|
}, {
|
|
@@ -401,131 +477,86 @@ export declare namespace cancel {
|
|
|
401
477
|
}];
|
|
402
478
|
}];
|
|
403
479
|
}, {
|
|
404
|
-
readonly name: "
|
|
480
|
+
readonly name: "getPriceLevel";
|
|
405
481
|
readonly type: "function";
|
|
406
|
-
readonly stateMutability: "
|
|
482
|
+
readonly stateMutability: "view";
|
|
407
483
|
readonly inputs: readonly [{
|
|
408
484
|
readonly type: "address";
|
|
409
485
|
readonly name: "base";
|
|
410
|
-
}];
|
|
411
|
-
readonly outputs: readonly [{
|
|
412
|
-
readonly type: "bytes32";
|
|
413
|
-
readonly name: "key";
|
|
414
|
-
}];
|
|
415
|
-
}, {
|
|
416
|
-
readonly name: "swapExactAmountIn";
|
|
417
|
-
readonly type: "function";
|
|
418
|
-
readonly stateMutability: "nonpayable";
|
|
419
|
-
readonly inputs: readonly [{
|
|
420
|
-
readonly type: "address";
|
|
421
|
-
readonly name: "tokenIn";
|
|
422
486
|
}, {
|
|
423
|
-
readonly type: "
|
|
424
|
-
readonly name: "
|
|
425
|
-
}, {
|
|
426
|
-
readonly type: "uint128";
|
|
427
|
-
readonly name: "amountIn";
|
|
487
|
+
readonly type: "int16";
|
|
488
|
+
readonly name: "tick";
|
|
428
489
|
}, {
|
|
429
|
-
readonly type: "
|
|
430
|
-
readonly name: "
|
|
490
|
+
readonly type: "bool";
|
|
491
|
+
readonly name: "isBid";
|
|
431
492
|
}];
|
|
432
493
|
readonly outputs: readonly [{
|
|
433
|
-
readonly type: "
|
|
434
|
-
readonly
|
|
494
|
+
readonly type: "tuple";
|
|
495
|
+
readonly components: readonly [{
|
|
496
|
+
readonly type: "uint128";
|
|
497
|
+
readonly name: "head";
|
|
498
|
+
}, {
|
|
499
|
+
readonly type: "uint128";
|
|
500
|
+
readonly name: "tail";
|
|
501
|
+
}, {
|
|
502
|
+
readonly type: "uint128";
|
|
503
|
+
readonly name: "totalLiquidity";
|
|
504
|
+
}];
|
|
435
505
|
}];
|
|
436
506
|
}, {
|
|
437
|
-
readonly name: "
|
|
507
|
+
readonly name: "pairKey";
|
|
438
508
|
readonly type: "function";
|
|
439
|
-
readonly stateMutability: "
|
|
509
|
+
readonly stateMutability: "view";
|
|
440
510
|
readonly inputs: readonly [{
|
|
441
511
|
readonly type: "address";
|
|
442
|
-
readonly name: "
|
|
512
|
+
readonly name: "tokenA";
|
|
443
513
|
}, {
|
|
444
514
|
readonly type: "address";
|
|
445
|
-
readonly name: "
|
|
446
|
-
}, {
|
|
447
|
-
readonly type: "uint128";
|
|
448
|
-
readonly name: "amountOut";
|
|
449
|
-
}, {
|
|
450
|
-
readonly type: "uint128";
|
|
451
|
-
readonly name: "maxAmountIn";
|
|
515
|
+
readonly name: "tokenB";
|
|
452
516
|
}];
|
|
453
517
|
readonly outputs: readonly [{
|
|
454
|
-
readonly type: "
|
|
455
|
-
readonly name: "amountIn";
|
|
518
|
+
readonly type: "bytes32";
|
|
456
519
|
}];
|
|
457
520
|
}, {
|
|
458
|
-
readonly name: "
|
|
521
|
+
readonly name: "activeOrderId";
|
|
459
522
|
readonly type: "function";
|
|
460
|
-
readonly stateMutability: "
|
|
461
|
-
readonly inputs: readonly [
|
|
462
|
-
readonly type: "address";
|
|
463
|
-
readonly name: "token";
|
|
464
|
-
}, {
|
|
465
|
-
readonly type: "uint128";
|
|
466
|
-
readonly name: "amount";
|
|
467
|
-
}, {
|
|
468
|
-
readonly type: "bool";
|
|
469
|
-
readonly name: "isBid";
|
|
470
|
-
}, {
|
|
471
|
-
readonly type: "int16";
|
|
472
|
-
readonly name: "tick";
|
|
473
|
-
}];
|
|
523
|
+
readonly stateMutability: "view";
|
|
524
|
+
readonly inputs: readonly [];
|
|
474
525
|
readonly outputs: readonly [{
|
|
475
526
|
readonly type: "uint128";
|
|
476
|
-
readonly name: "orderId";
|
|
477
527
|
}];
|
|
478
528
|
}, {
|
|
479
|
-
readonly name: "
|
|
529
|
+
readonly name: "pendingOrderId";
|
|
480
530
|
readonly type: "function";
|
|
481
|
-
readonly stateMutability: "
|
|
482
|
-
readonly inputs: readonly [
|
|
483
|
-
readonly type: "address";
|
|
484
|
-
readonly name: "token";
|
|
485
|
-
}, {
|
|
486
|
-
readonly type: "uint128";
|
|
487
|
-
readonly name: "amount";
|
|
488
|
-
}, {
|
|
489
|
-
readonly type: "bool";
|
|
490
|
-
readonly name: "isBid";
|
|
491
|
-
}, {
|
|
492
|
-
readonly type: "int16";
|
|
493
|
-
readonly name: "tick";
|
|
494
|
-
}, {
|
|
495
|
-
readonly type: "int16";
|
|
496
|
-
readonly name: "flipTick";
|
|
497
|
-
}];
|
|
531
|
+
readonly stateMutability: "view";
|
|
532
|
+
readonly inputs: readonly [];
|
|
498
533
|
readonly outputs: readonly [{
|
|
499
534
|
readonly type: "uint128";
|
|
500
|
-
readonly name: "orderId";
|
|
501
535
|
}];
|
|
502
536
|
}, {
|
|
503
|
-
readonly name: "
|
|
537
|
+
readonly name: "books";
|
|
504
538
|
readonly type: "function";
|
|
505
|
-
readonly stateMutability: "
|
|
539
|
+
readonly stateMutability: "view";
|
|
506
540
|
readonly inputs: readonly [{
|
|
507
|
-
readonly type: "
|
|
508
|
-
readonly name: "
|
|
541
|
+
readonly type: "bytes32";
|
|
542
|
+
readonly name: "pairKey";
|
|
509
543
|
}];
|
|
510
|
-
readonly outputs: readonly [
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
544
|
+
readonly outputs: readonly [{
|
|
545
|
+
readonly type: "tuple";
|
|
546
|
+
readonly components: readonly [{
|
|
547
|
+
readonly type: "address";
|
|
548
|
+
readonly name: "base";
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "address";
|
|
551
|
+
readonly name: "quote";
|
|
552
|
+
}, {
|
|
553
|
+
readonly type: "int16";
|
|
554
|
+
readonly name: "bestBidTick";
|
|
555
|
+
}, {
|
|
556
|
+
readonly type: "int16";
|
|
557
|
+
readonly name: "bestAskTick";
|
|
558
|
+
}];
|
|
521
559
|
}];
|
|
522
|
-
readonly outputs: readonly [];
|
|
523
|
-
}, {
|
|
524
|
-
readonly name: "executeBlock";
|
|
525
|
-
readonly type: "function";
|
|
526
|
-
readonly stateMutability: "nonpayable";
|
|
527
|
-
readonly inputs: readonly [];
|
|
528
|
-
readonly outputs: readonly [];
|
|
529
560
|
}, {
|
|
530
561
|
readonly name: "PairCreated";
|
|
531
562
|
readonly type: "event";
|
|
@@ -595,14 +626,6 @@ export declare namespace cancel {
|
|
|
595
626
|
readonly type: "int16";
|
|
596
627
|
readonly name: "flipTick";
|
|
597
628
|
}];
|
|
598
|
-
}, {
|
|
599
|
-
readonly name: "OrderCancelled";
|
|
600
|
-
readonly type: "event";
|
|
601
|
-
readonly inputs: readonly [{
|
|
602
|
-
readonly type: "uint128";
|
|
603
|
-
readonly name: "orderId";
|
|
604
|
-
readonly indexed: true;
|
|
605
|
-
}];
|
|
606
629
|
}, {
|
|
607
630
|
readonly name: "OrderFilled";
|
|
608
631
|
readonly type: "event";
|
|
@@ -622,27 +645,31 @@ export declare namespace cancel {
|
|
|
622
645
|
readonly name: "partialFill";
|
|
623
646
|
}];
|
|
624
647
|
}, {
|
|
625
|
-
readonly name: "
|
|
626
|
-
readonly type: "
|
|
627
|
-
readonly inputs: readonly [
|
|
648
|
+
readonly name: "OrderCancelled";
|
|
649
|
+
readonly type: "event";
|
|
650
|
+
readonly inputs: readonly [{
|
|
651
|
+
readonly type: "uint128";
|
|
652
|
+
readonly name: "orderId";
|
|
653
|
+
readonly indexed: true;
|
|
654
|
+
}];
|
|
628
655
|
}, {
|
|
629
656
|
readonly name: "Unauthorized";
|
|
630
657
|
readonly type: "error";
|
|
631
658
|
readonly inputs: readonly [];
|
|
632
659
|
}, {
|
|
633
|
-
readonly name: "
|
|
660
|
+
readonly name: "PairDoesNotExist";
|
|
634
661
|
readonly type: "error";
|
|
635
662
|
readonly inputs: readonly [];
|
|
636
663
|
}, {
|
|
637
|
-
readonly name: "
|
|
664
|
+
readonly name: "PairAlreadyExists";
|
|
638
665
|
readonly type: "error";
|
|
639
666
|
readonly inputs: readonly [];
|
|
640
667
|
}, {
|
|
641
|
-
readonly name: "
|
|
668
|
+
readonly name: "OrderDoesNotExist";
|
|
642
669
|
readonly type: "error";
|
|
643
670
|
readonly inputs: readonly [];
|
|
644
671
|
}, {
|
|
645
|
-
readonly name: "
|
|
672
|
+
readonly name: "IdenticalTokens";
|
|
646
673
|
readonly type: "error";
|
|
647
674
|
readonly inputs: readonly [];
|
|
648
675
|
}, {
|
|
@@ -653,25 +680,36 @@ export declare namespace cancel {
|
|
|
653
680
|
readonly name: "tick";
|
|
654
681
|
}];
|
|
655
682
|
}, {
|
|
656
|
-
readonly name: "
|
|
683
|
+
readonly name: "InvalidTick";
|
|
657
684
|
readonly type: "error";
|
|
658
685
|
readonly inputs: readonly [];
|
|
659
686
|
}, {
|
|
660
|
-
readonly name: "
|
|
687
|
+
readonly name: "InvalidFlipTick";
|
|
661
688
|
readonly type: "error";
|
|
662
689
|
readonly inputs: readonly [];
|
|
663
690
|
}, {
|
|
664
|
-
readonly name: "
|
|
691
|
+
readonly name: "InsufficientBalance";
|
|
665
692
|
readonly type: "error";
|
|
666
693
|
readonly inputs: readonly [];
|
|
667
694
|
}, {
|
|
668
|
-
readonly name: "
|
|
695
|
+
readonly name: "InsufficientLiquidity";
|
|
669
696
|
readonly type: "error";
|
|
670
697
|
readonly inputs: readonly [];
|
|
671
698
|
}, {
|
|
672
|
-
readonly name: "
|
|
699
|
+
readonly name: "InsufficientOutput";
|
|
700
|
+
readonly type: "error";
|
|
701
|
+
readonly inputs: readonly [];
|
|
702
|
+
}, {
|
|
703
|
+
readonly name: "MaxInputExceeded";
|
|
673
704
|
readonly type: "error";
|
|
674
705
|
readonly inputs: readonly [];
|
|
706
|
+
}, {
|
|
707
|
+
readonly name: "BelowMinimumOrderSize";
|
|
708
|
+
readonly type: "error";
|
|
709
|
+
readonly inputs: readonly [{
|
|
710
|
+
readonly type: "uint128";
|
|
711
|
+
readonly name: "amount";
|
|
712
|
+
}];
|
|
675
713
|
}], "OrderCancelled">;
|
|
676
714
|
}
|
|
677
715
|
/**
|
|
@@ -710,6 +748,7 @@ export declare namespace cancelSync {
|
|
|
710
748
|
/** Transaction receipt. */
|
|
711
749
|
receipt: TransactionReceipt;
|
|
712
750
|
}>;
|
|
751
|
+
type ErrorType = BaseErrorType;
|
|
713
752
|
}
|
|
714
753
|
/**
|
|
715
754
|
* Creates a new trading pair on the DEX.
|
|
@@ -744,6 +783,7 @@ export declare namespace createPair {
|
|
|
744
783
|
base: Address;
|
|
745
784
|
};
|
|
746
785
|
type ReturnValue = WriteContractReturnType;
|
|
786
|
+
type ErrorType = BaseErrorType;
|
|
747
787
|
/** @internal */
|
|
748
788
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: createPair.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
749
789
|
/**
|
|
@@ -791,40 +831,119 @@ export declare namespace createPair {
|
|
|
791
831
|
readonly name: "key";
|
|
792
832
|
}];
|
|
793
833
|
}];
|
|
794
|
-
functionName: "createPair";
|
|
795
|
-
args?: readonly [`0x${string}`] | undefined;
|
|
796
|
-
} & {
|
|
797
|
-
args: readonly [`0x${string}`];
|
|
798
|
-
} & {
|
|
799
|
-
address: Address;
|
|
800
|
-
} & {
|
|
801
|
-
data: import("viem").Hex;
|
|
802
|
-
to: Address;
|
|
803
|
-
};
|
|
804
|
-
/**
|
|
805
|
-
* Extracts the `PairCreated` event from logs.
|
|
806
|
-
*
|
|
807
|
-
* @param logs - The logs.
|
|
808
|
-
* @returns The `PairCreated` event.
|
|
809
|
-
*/
|
|
810
|
-
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
811
|
-
readonly name: "
|
|
834
|
+
functionName: "createPair";
|
|
835
|
+
args?: readonly [`0x${string}`] | undefined;
|
|
836
|
+
} & {
|
|
837
|
+
args: readonly [`0x${string}`];
|
|
838
|
+
} & {
|
|
839
|
+
address: Address;
|
|
840
|
+
} & {
|
|
841
|
+
data: import("viem").Hex;
|
|
842
|
+
to: Address;
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* Extracts the `PairCreated` event from logs.
|
|
846
|
+
*
|
|
847
|
+
* @param logs - The logs.
|
|
848
|
+
* @returns The `PairCreated` event.
|
|
849
|
+
*/
|
|
850
|
+
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
851
|
+
readonly name: "createPair";
|
|
852
|
+
readonly type: "function";
|
|
853
|
+
readonly stateMutability: "nonpayable";
|
|
854
|
+
readonly inputs: readonly [{
|
|
855
|
+
readonly type: "address";
|
|
856
|
+
readonly name: "base";
|
|
857
|
+
}];
|
|
858
|
+
readonly outputs: readonly [{
|
|
859
|
+
readonly type: "bytes32";
|
|
860
|
+
readonly name: "key";
|
|
861
|
+
}];
|
|
862
|
+
}, {
|
|
863
|
+
readonly name: "place";
|
|
864
|
+
readonly type: "function";
|
|
865
|
+
readonly stateMutability: "nonpayable";
|
|
866
|
+
readonly inputs: readonly [{
|
|
867
|
+
readonly type: "address";
|
|
868
|
+
readonly name: "token";
|
|
869
|
+
}, {
|
|
870
|
+
readonly type: "uint128";
|
|
871
|
+
readonly name: "amount";
|
|
872
|
+
}, {
|
|
873
|
+
readonly type: "bool";
|
|
874
|
+
readonly name: "isBid";
|
|
875
|
+
}, {
|
|
876
|
+
readonly type: "int16";
|
|
877
|
+
readonly name: "tick";
|
|
878
|
+
}];
|
|
879
|
+
readonly outputs: readonly [{
|
|
880
|
+
readonly type: "uint128";
|
|
881
|
+
readonly name: "orderId";
|
|
882
|
+
}];
|
|
883
|
+
}, {
|
|
884
|
+
readonly name: "placeFlip";
|
|
885
|
+
readonly type: "function";
|
|
886
|
+
readonly stateMutability: "nonpayable";
|
|
887
|
+
readonly inputs: readonly [{
|
|
888
|
+
readonly type: "address";
|
|
889
|
+
readonly name: "token";
|
|
890
|
+
}, {
|
|
891
|
+
readonly type: "uint128";
|
|
892
|
+
readonly name: "amount";
|
|
893
|
+
}, {
|
|
894
|
+
readonly type: "bool";
|
|
895
|
+
readonly name: "isBid";
|
|
896
|
+
}, {
|
|
897
|
+
readonly type: "int16";
|
|
898
|
+
readonly name: "tick";
|
|
899
|
+
}, {
|
|
900
|
+
readonly type: "int16";
|
|
901
|
+
readonly name: "flipTick";
|
|
902
|
+
}];
|
|
903
|
+
readonly outputs: readonly [{
|
|
904
|
+
readonly type: "uint128";
|
|
905
|
+
readonly name: "orderId";
|
|
906
|
+
}];
|
|
907
|
+
}, {
|
|
908
|
+
readonly name: "cancel";
|
|
909
|
+
readonly type: "function";
|
|
910
|
+
readonly stateMutability: "nonpayable";
|
|
911
|
+
readonly inputs: readonly [{
|
|
912
|
+
readonly type: "uint128";
|
|
913
|
+
readonly name: "orderId";
|
|
914
|
+
}];
|
|
915
|
+
readonly outputs: readonly [];
|
|
916
|
+
}, {
|
|
917
|
+
readonly name: "executeBlock";
|
|
812
918
|
readonly type: "function";
|
|
813
|
-
readonly stateMutability: "
|
|
919
|
+
readonly stateMutability: "nonpayable";
|
|
920
|
+
readonly inputs: readonly [];
|
|
921
|
+
readonly outputs: readonly [];
|
|
922
|
+
}, {
|
|
923
|
+
readonly name: "swapExactAmountIn";
|
|
924
|
+
readonly type: "function";
|
|
925
|
+
readonly stateMutability: "nonpayable";
|
|
814
926
|
readonly inputs: readonly [{
|
|
815
927
|
readonly type: "address";
|
|
816
|
-
readonly name: "
|
|
928
|
+
readonly name: "tokenIn";
|
|
817
929
|
}, {
|
|
818
930
|
readonly type: "address";
|
|
819
|
-
readonly name: "
|
|
931
|
+
readonly name: "tokenOut";
|
|
932
|
+
}, {
|
|
933
|
+
readonly type: "uint128";
|
|
934
|
+
readonly name: "amountIn";
|
|
935
|
+
}, {
|
|
936
|
+
readonly type: "uint128";
|
|
937
|
+
readonly name: "minAmountOut";
|
|
820
938
|
}];
|
|
821
939
|
readonly outputs: readonly [{
|
|
822
940
|
readonly type: "uint128";
|
|
941
|
+
readonly name: "amountOut";
|
|
823
942
|
}];
|
|
824
943
|
}, {
|
|
825
|
-
readonly name: "
|
|
944
|
+
readonly name: "swapExactAmountOut";
|
|
826
945
|
readonly type: "function";
|
|
827
|
-
readonly stateMutability: "
|
|
946
|
+
readonly stateMutability: "nonpayable";
|
|
828
947
|
readonly inputs: readonly [{
|
|
829
948
|
readonly type: "address";
|
|
830
949
|
readonly name: "tokenIn";
|
|
@@ -834,6 +953,9 @@ export declare namespace createPair {
|
|
|
834
953
|
}, {
|
|
835
954
|
readonly type: "uint128";
|
|
836
955
|
readonly name: "amountOut";
|
|
956
|
+
}, {
|
|
957
|
+
readonly type: "uint128";
|
|
958
|
+
readonly name: "maxAmountIn";
|
|
837
959
|
}];
|
|
838
960
|
readonly outputs: readonly [{
|
|
839
961
|
readonly type: "uint128";
|
|
@@ -858,64 +980,49 @@ export declare namespace createPair {
|
|
|
858
980
|
readonly name: "amountOut";
|
|
859
981
|
}];
|
|
860
982
|
}, {
|
|
861
|
-
readonly name: "
|
|
983
|
+
readonly name: "quoteSwapExactAmountOut";
|
|
862
984
|
readonly type: "function";
|
|
863
|
-
readonly stateMutability: "
|
|
985
|
+
readonly stateMutability: "view";
|
|
864
986
|
readonly inputs: readonly [{
|
|
865
987
|
readonly type: "address";
|
|
866
|
-
readonly name: "
|
|
988
|
+
readonly name: "tokenIn";
|
|
867
989
|
}, {
|
|
868
990
|
readonly type: "address";
|
|
869
|
-
readonly name: "
|
|
991
|
+
readonly name: "tokenOut";
|
|
992
|
+
}, {
|
|
993
|
+
readonly type: "uint128";
|
|
994
|
+
readonly name: "amountOut";
|
|
870
995
|
}];
|
|
871
996
|
readonly outputs: readonly [{
|
|
872
|
-
readonly type: "
|
|
873
|
-
readonly name: "
|
|
997
|
+
readonly type: "uint128";
|
|
998
|
+
readonly name: "amountIn";
|
|
874
999
|
}];
|
|
875
1000
|
}, {
|
|
876
|
-
readonly name: "
|
|
1001
|
+
readonly name: "balanceOf";
|
|
877
1002
|
readonly type: "function";
|
|
878
1003
|
readonly stateMutability: "view";
|
|
879
1004
|
readonly inputs: readonly [{
|
|
880
1005
|
readonly type: "address";
|
|
881
|
-
readonly name: "
|
|
882
|
-
}, {
|
|
883
|
-
readonly type: "int16";
|
|
884
|
-
readonly name: "tick";
|
|
1006
|
+
readonly name: "user";
|
|
885
1007
|
}, {
|
|
886
|
-
readonly type: "
|
|
887
|
-
readonly name: "
|
|
888
|
-
}];
|
|
889
|
-
readonly outputs: readonly [{
|
|
890
|
-
readonly type: "tuple";
|
|
891
|
-
readonly name: "level";
|
|
892
|
-
readonly components: readonly [{
|
|
893
|
-
readonly type: "uint128";
|
|
894
|
-
readonly name: "head";
|
|
895
|
-
}, {
|
|
896
|
-
readonly type: "uint128";
|
|
897
|
-
readonly name: "tail";
|
|
898
|
-
}, {
|
|
899
|
-
readonly type: "uint128";
|
|
900
|
-
readonly name: "totalLiquidity";
|
|
901
|
-
}];
|
|
1008
|
+
readonly type: "address";
|
|
1009
|
+
readonly name: "token";
|
|
902
1010
|
}];
|
|
903
|
-
}, {
|
|
904
|
-
readonly name: "activeOrderId";
|
|
905
|
-
readonly type: "function";
|
|
906
|
-
readonly stateMutability: "view";
|
|
907
|
-
readonly inputs: readonly [];
|
|
908
1011
|
readonly outputs: readonly [{
|
|
909
1012
|
readonly type: "uint128";
|
|
910
1013
|
}];
|
|
911
1014
|
}, {
|
|
912
|
-
readonly name: "
|
|
1015
|
+
readonly name: "withdraw";
|
|
913
1016
|
readonly type: "function";
|
|
914
|
-
readonly stateMutability: "
|
|
915
|
-
readonly inputs: readonly [
|
|
916
|
-
|
|
1017
|
+
readonly stateMutability: "nonpayable";
|
|
1018
|
+
readonly inputs: readonly [{
|
|
1019
|
+
readonly type: "address";
|
|
1020
|
+
readonly name: "token";
|
|
1021
|
+
}, {
|
|
917
1022
|
readonly type: "uint128";
|
|
1023
|
+
readonly name: "amount";
|
|
918
1024
|
}];
|
|
1025
|
+
readonly outputs: readonly [];
|
|
919
1026
|
}, {
|
|
920
1027
|
readonly name: "getOrder";
|
|
921
1028
|
readonly type: "function";
|
|
@@ -927,6 +1034,9 @@ export declare namespace createPair {
|
|
|
927
1034
|
readonly outputs: readonly [{
|
|
928
1035
|
readonly type: "tuple";
|
|
929
1036
|
readonly components: readonly [{
|
|
1037
|
+
readonly type: "uint128";
|
|
1038
|
+
readonly name: "orderId";
|
|
1039
|
+
}, {
|
|
930
1040
|
readonly type: "address";
|
|
931
1041
|
readonly name: "maker";
|
|
932
1042
|
}, {
|
|
@@ -959,131 +1069,86 @@ export declare namespace createPair {
|
|
|
959
1069
|
}];
|
|
960
1070
|
}];
|
|
961
1071
|
}, {
|
|
962
|
-
readonly name: "
|
|
1072
|
+
readonly name: "getPriceLevel";
|
|
963
1073
|
readonly type: "function";
|
|
964
|
-
readonly stateMutability: "
|
|
1074
|
+
readonly stateMutability: "view";
|
|
965
1075
|
readonly inputs: readonly [{
|
|
966
1076
|
readonly type: "address";
|
|
967
1077
|
readonly name: "base";
|
|
968
|
-
}];
|
|
969
|
-
readonly outputs: readonly [{
|
|
970
|
-
readonly type: "bytes32";
|
|
971
|
-
readonly name: "key";
|
|
972
|
-
}];
|
|
973
|
-
}, {
|
|
974
|
-
readonly name: "swapExactAmountIn";
|
|
975
|
-
readonly type: "function";
|
|
976
|
-
readonly stateMutability: "nonpayable";
|
|
977
|
-
readonly inputs: readonly [{
|
|
978
|
-
readonly type: "address";
|
|
979
|
-
readonly name: "tokenIn";
|
|
980
|
-
}, {
|
|
981
|
-
readonly type: "address";
|
|
982
|
-
readonly name: "tokenOut";
|
|
983
1078
|
}, {
|
|
984
|
-
readonly type: "
|
|
985
|
-
readonly name: "
|
|
1079
|
+
readonly type: "int16";
|
|
1080
|
+
readonly name: "tick";
|
|
986
1081
|
}, {
|
|
987
|
-
readonly type: "
|
|
988
|
-
readonly name: "
|
|
1082
|
+
readonly type: "bool";
|
|
1083
|
+
readonly name: "isBid";
|
|
989
1084
|
}];
|
|
990
1085
|
readonly outputs: readonly [{
|
|
991
|
-
readonly type: "
|
|
992
|
-
readonly
|
|
1086
|
+
readonly type: "tuple";
|
|
1087
|
+
readonly components: readonly [{
|
|
1088
|
+
readonly type: "uint128";
|
|
1089
|
+
readonly name: "head";
|
|
1090
|
+
}, {
|
|
1091
|
+
readonly type: "uint128";
|
|
1092
|
+
readonly name: "tail";
|
|
1093
|
+
}, {
|
|
1094
|
+
readonly type: "uint128";
|
|
1095
|
+
readonly name: "totalLiquidity";
|
|
1096
|
+
}];
|
|
993
1097
|
}];
|
|
994
1098
|
}, {
|
|
995
|
-
readonly name: "
|
|
1099
|
+
readonly name: "pairKey";
|
|
996
1100
|
readonly type: "function";
|
|
997
|
-
readonly stateMutability: "
|
|
1101
|
+
readonly stateMutability: "view";
|
|
998
1102
|
readonly inputs: readonly [{
|
|
999
1103
|
readonly type: "address";
|
|
1000
|
-
readonly name: "
|
|
1104
|
+
readonly name: "tokenA";
|
|
1001
1105
|
}, {
|
|
1002
1106
|
readonly type: "address";
|
|
1003
|
-
readonly name: "
|
|
1004
|
-
}, {
|
|
1005
|
-
readonly type: "uint128";
|
|
1006
|
-
readonly name: "amountOut";
|
|
1007
|
-
}, {
|
|
1008
|
-
readonly type: "uint128";
|
|
1009
|
-
readonly name: "maxAmountIn";
|
|
1107
|
+
readonly name: "tokenB";
|
|
1010
1108
|
}];
|
|
1011
1109
|
readonly outputs: readonly [{
|
|
1012
|
-
readonly type: "
|
|
1013
|
-
readonly name: "amountIn";
|
|
1110
|
+
readonly type: "bytes32";
|
|
1014
1111
|
}];
|
|
1015
1112
|
}, {
|
|
1016
|
-
readonly name: "
|
|
1113
|
+
readonly name: "activeOrderId";
|
|
1017
1114
|
readonly type: "function";
|
|
1018
|
-
readonly stateMutability: "
|
|
1019
|
-
readonly inputs: readonly [
|
|
1020
|
-
readonly type: "address";
|
|
1021
|
-
readonly name: "token";
|
|
1022
|
-
}, {
|
|
1023
|
-
readonly type: "uint128";
|
|
1024
|
-
readonly name: "amount";
|
|
1025
|
-
}, {
|
|
1026
|
-
readonly type: "bool";
|
|
1027
|
-
readonly name: "isBid";
|
|
1028
|
-
}, {
|
|
1029
|
-
readonly type: "int16";
|
|
1030
|
-
readonly name: "tick";
|
|
1031
|
-
}];
|
|
1115
|
+
readonly stateMutability: "view";
|
|
1116
|
+
readonly inputs: readonly [];
|
|
1032
1117
|
readonly outputs: readonly [{
|
|
1033
1118
|
readonly type: "uint128";
|
|
1034
|
-
readonly name: "orderId";
|
|
1035
1119
|
}];
|
|
1036
1120
|
}, {
|
|
1037
|
-
readonly name: "
|
|
1121
|
+
readonly name: "pendingOrderId";
|
|
1038
1122
|
readonly type: "function";
|
|
1039
|
-
readonly stateMutability: "
|
|
1040
|
-
readonly inputs: readonly [
|
|
1041
|
-
readonly type: "address";
|
|
1042
|
-
readonly name: "token";
|
|
1043
|
-
}, {
|
|
1044
|
-
readonly type: "uint128";
|
|
1045
|
-
readonly name: "amount";
|
|
1046
|
-
}, {
|
|
1047
|
-
readonly type: "bool";
|
|
1048
|
-
readonly name: "isBid";
|
|
1049
|
-
}, {
|
|
1050
|
-
readonly type: "int16";
|
|
1051
|
-
readonly name: "tick";
|
|
1052
|
-
}, {
|
|
1053
|
-
readonly type: "int16";
|
|
1054
|
-
readonly name: "flipTick";
|
|
1055
|
-
}];
|
|
1123
|
+
readonly stateMutability: "view";
|
|
1124
|
+
readonly inputs: readonly [];
|
|
1056
1125
|
readonly outputs: readonly [{
|
|
1057
1126
|
readonly type: "uint128";
|
|
1058
|
-
readonly name: "orderId";
|
|
1059
1127
|
}];
|
|
1060
1128
|
}, {
|
|
1061
|
-
readonly name: "
|
|
1129
|
+
readonly name: "books";
|
|
1062
1130
|
readonly type: "function";
|
|
1063
|
-
readonly stateMutability: "
|
|
1131
|
+
readonly stateMutability: "view";
|
|
1064
1132
|
readonly inputs: readonly [{
|
|
1065
|
-
readonly type: "
|
|
1066
|
-
readonly name: "
|
|
1133
|
+
readonly type: "bytes32";
|
|
1134
|
+
readonly name: "pairKey";
|
|
1067
1135
|
}];
|
|
1068
|
-
readonly outputs: readonly [
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1136
|
+
readonly outputs: readonly [{
|
|
1137
|
+
readonly type: "tuple";
|
|
1138
|
+
readonly components: readonly [{
|
|
1139
|
+
readonly type: "address";
|
|
1140
|
+
readonly name: "base";
|
|
1141
|
+
}, {
|
|
1142
|
+
readonly type: "address";
|
|
1143
|
+
readonly name: "quote";
|
|
1144
|
+
}, {
|
|
1145
|
+
readonly type: "int16";
|
|
1146
|
+
readonly name: "bestBidTick";
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly type: "int16";
|
|
1149
|
+
readonly name: "bestAskTick";
|
|
1150
|
+
}];
|
|
1079
1151
|
}];
|
|
1080
|
-
readonly outputs: readonly [];
|
|
1081
|
-
}, {
|
|
1082
|
-
readonly name: "executeBlock";
|
|
1083
|
-
readonly type: "function";
|
|
1084
|
-
readonly stateMutability: "nonpayable";
|
|
1085
|
-
readonly inputs: readonly [];
|
|
1086
|
-
readonly outputs: readonly [];
|
|
1087
1152
|
}, {
|
|
1088
1153
|
readonly name: "PairCreated";
|
|
1089
1154
|
readonly type: "event";
|
|
@@ -1153,14 +1218,6 @@ export declare namespace createPair {
|
|
|
1153
1218
|
readonly type: "int16";
|
|
1154
1219
|
readonly name: "flipTick";
|
|
1155
1220
|
}];
|
|
1156
|
-
}, {
|
|
1157
|
-
readonly name: "OrderCancelled";
|
|
1158
|
-
readonly type: "event";
|
|
1159
|
-
readonly inputs: readonly [{
|
|
1160
|
-
readonly type: "uint128";
|
|
1161
|
-
readonly name: "orderId";
|
|
1162
|
-
readonly indexed: true;
|
|
1163
|
-
}];
|
|
1164
1221
|
}, {
|
|
1165
1222
|
readonly name: "OrderFilled";
|
|
1166
1223
|
readonly type: "event";
|
|
@@ -1180,27 +1237,31 @@ export declare namespace createPair {
|
|
|
1180
1237
|
readonly name: "partialFill";
|
|
1181
1238
|
}];
|
|
1182
1239
|
}, {
|
|
1183
|
-
readonly name: "
|
|
1184
|
-
readonly type: "
|
|
1185
|
-
readonly inputs: readonly [
|
|
1240
|
+
readonly name: "OrderCancelled";
|
|
1241
|
+
readonly type: "event";
|
|
1242
|
+
readonly inputs: readonly [{
|
|
1243
|
+
readonly type: "uint128";
|
|
1244
|
+
readonly name: "orderId";
|
|
1245
|
+
readonly indexed: true;
|
|
1246
|
+
}];
|
|
1186
1247
|
}, {
|
|
1187
1248
|
readonly name: "Unauthorized";
|
|
1188
1249
|
readonly type: "error";
|
|
1189
1250
|
readonly inputs: readonly [];
|
|
1190
1251
|
}, {
|
|
1191
|
-
readonly name: "
|
|
1252
|
+
readonly name: "PairDoesNotExist";
|
|
1192
1253
|
readonly type: "error";
|
|
1193
1254
|
readonly inputs: readonly [];
|
|
1194
1255
|
}, {
|
|
1195
|
-
readonly name: "
|
|
1256
|
+
readonly name: "PairAlreadyExists";
|
|
1196
1257
|
readonly type: "error";
|
|
1197
1258
|
readonly inputs: readonly [];
|
|
1198
1259
|
}, {
|
|
1199
|
-
readonly name: "
|
|
1260
|
+
readonly name: "OrderDoesNotExist";
|
|
1200
1261
|
readonly type: "error";
|
|
1201
1262
|
readonly inputs: readonly [];
|
|
1202
1263
|
}, {
|
|
1203
|
-
readonly name: "
|
|
1264
|
+
readonly name: "IdenticalTokens";
|
|
1204
1265
|
readonly type: "error";
|
|
1205
1266
|
readonly inputs: readonly [];
|
|
1206
1267
|
}, {
|
|
@@ -1211,25 +1272,36 @@ export declare namespace createPair {
|
|
|
1211
1272
|
readonly name: "tick";
|
|
1212
1273
|
}];
|
|
1213
1274
|
}, {
|
|
1214
|
-
readonly name: "
|
|
1275
|
+
readonly name: "InvalidTick";
|
|
1215
1276
|
readonly type: "error";
|
|
1216
1277
|
readonly inputs: readonly [];
|
|
1217
1278
|
}, {
|
|
1218
|
-
readonly name: "
|
|
1279
|
+
readonly name: "InvalidFlipTick";
|
|
1219
1280
|
readonly type: "error";
|
|
1220
1281
|
readonly inputs: readonly [];
|
|
1221
1282
|
}, {
|
|
1222
|
-
readonly name: "
|
|
1283
|
+
readonly name: "InsufficientBalance";
|
|
1223
1284
|
readonly type: "error";
|
|
1224
1285
|
readonly inputs: readonly [];
|
|
1225
1286
|
}, {
|
|
1226
|
-
readonly name: "
|
|
1287
|
+
readonly name: "InsufficientLiquidity";
|
|
1227
1288
|
readonly type: "error";
|
|
1228
1289
|
readonly inputs: readonly [];
|
|
1229
1290
|
}, {
|
|
1230
|
-
readonly name: "
|
|
1291
|
+
readonly name: "InsufficientOutput";
|
|
1292
|
+
readonly type: "error";
|
|
1293
|
+
readonly inputs: readonly [];
|
|
1294
|
+
}, {
|
|
1295
|
+
readonly name: "MaxInputExceeded";
|
|
1231
1296
|
readonly type: "error";
|
|
1232
1297
|
readonly inputs: readonly [];
|
|
1298
|
+
}, {
|
|
1299
|
+
readonly name: "BelowMinimumOrderSize";
|
|
1300
|
+
readonly type: "error";
|
|
1301
|
+
readonly inputs: readonly [{
|
|
1302
|
+
readonly type: "uint128";
|
|
1303
|
+
readonly name: "amount";
|
|
1304
|
+
}];
|
|
1233
1305
|
}], "PairCreated">;
|
|
1234
1306
|
}
|
|
1235
1307
|
/**
|
|
@@ -1268,6 +1340,7 @@ export declare namespace createPairSync {
|
|
|
1268
1340
|
/** Transaction receipt. */
|
|
1269
1341
|
receipt: TransactionReceipt;
|
|
1270
1342
|
}>;
|
|
1343
|
+
type ErrorType = BaseErrorType;
|
|
1271
1344
|
}
|
|
1272
1345
|
/**
|
|
1273
1346
|
* Gets a user's token balance on the DEX.
|
|
@@ -1459,6 +1532,9 @@ export declare namespace getOrder {
|
|
|
1459
1532
|
readonly outputs: readonly [{
|
|
1460
1533
|
readonly type: "tuple";
|
|
1461
1534
|
readonly components: readonly [{
|
|
1535
|
+
readonly type: "uint128";
|
|
1536
|
+
readonly name: "orderId";
|
|
1537
|
+
}, {
|
|
1462
1538
|
readonly type: "address";
|
|
1463
1539
|
readonly name: "maker";
|
|
1464
1540
|
}, {
|
|
@@ -1502,6 +1578,115 @@ export declare namespace getOrder {
|
|
|
1502
1578
|
to: Address;
|
|
1503
1579
|
};
|
|
1504
1580
|
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Gets paginated orders from the orderbook.
|
|
1583
|
+
*
|
|
1584
|
+
* @example
|
|
1585
|
+
* ```ts
|
|
1586
|
+
* import { createClient, http } from 'viem'
|
|
1587
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1588
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1589
|
+
*
|
|
1590
|
+
* const client = createClient({
|
|
1591
|
+
* chain: tempo,
|
|
1592
|
+
* transport: http(),
|
|
1593
|
+
* })
|
|
1594
|
+
*
|
|
1595
|
+
* const { items, nextCursor } = await Actions.dex.getOrders(client, {
|
|
1596
|
+
* limit: 100,
|
|
1597
|
+
* filters: {
|
|
1598
|
+
* baseToken: '0x20c0...',
|
|
1599
|
+
* isBid: true,
|
|
1600
|
+
* }
|
|
1601
|
+
* })
|
|
1602
|
+
* ```
|
|
1603
|
+
*
|
|
1604
|
+
* @param client - Client.
|
|
1605
|
+
* @param parameters - Parameters.
|
|
1606
|
+
* @returns Paginated orders and next cursor.
|
|
1607
|
+
*/
|
|
1608
|
+
export declare function getOrders<chain extends Chain | undefined>(client: Client<Transport, chain>, parameters?: getOrders.Parameters): Promise<getOrders.ReturnValue>;
|
|
1609
|
+
export declare namespace getOrders {
|
|
1610
|
+
type Parameters = Pagination.Params<OrdersFilters.OrdersFilters>;
|
|
1611
|
+
type ReturnValue = Pagination.Response<'orders', Order.Order>;
|
|
1612
|
+
}
|
|
1613
|
+
/**
|
|
1614
|
+
* Gets orderbook information for a trading pair.
|
|
1615
|
+
*
|
|
1616
|
+
* @example
|
|
1617
|
+
* ```ts
|
|
1618
|
+
* import { createClient, http } from 'viem'
|
|
1619
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1620
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1621
|
+
*
|
|
1622
|
+
* const client = createClient({
|
|
1623
|
+
* chain: tempo,
|
|
1624
|
+
* transport: http(),
|
|
1625
|
+
* })
|
|
1626
|
+
*
|
|
1627
|
+
* const book = await Actions.dex.getOrderbook(client, {
|
|
1628
|
+
* base: '0x20c...11',
|
|
1629
|
+
* quote: '0x20c...20',
|
|
1630
|
+
* })
|
|
1631
|
+
* ```
|
|
1632
|
+
*
|
|
1633
|
+
* @param client - Client.
|
|
1634
|
+
* @param parameters - Parameters.
|
|
1635
|
+
* @returns The orderbook information.
|
|
1636
|
+
*/
|
|
1637
|
+
export declare function getOrderbook<chain extends Chain | undefined>(client: Client<Transport, chain>, parameters: getOrderbook.Parameters): Promise<getOrderbook.ReturnValue>;
|
|
1638
|
+
export declare namespace getOrderbook {
|
|
1639
|
+
type Parameters = ReadParameters & Args;
|
|
1640
|
+
type Args = {
|
|
1641
|
+
/** Address of the base token. */
|
|
1642
|
+
base: Address;
|
|
1643
|
+
/** Address of the quote token. */
|
|
1644
|
+
quote: Address;
|
|
1645
|
+
};
|
|
1646
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinExchange, 'books', never>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Defines a call to the `books` function.
|
|
1649
|
+
*
|
|
1650
|
+
* @param args - Arguments.
|
|
1651
|
+
* @returns The call.
|
|
1652
|
+
*/
|
|
1653
|
+
function call(args: Args): {
|
|
1654
|
+
abi: [{
|
|
1655
|
+
readonly name: "books";
|
|
1656
|
+
readonly type: "function";
|
|
1657
|
+
readonly stateMutability: "view";
|
|
1658
|
+
readonly inputs: readonly [{
|
|
1659
|
+
readonly type: "bytes32";
|
|
1660
|
+
readonly name: "pairKey";
|
|
1661
|
+
}];
|
|
1662
|
+
readonly outputs: readonly [{
|
|
1663
|
+
readonly type: "tuple";
|
|
1664
|
+
readonly components: readonly [{
|
|
1665
|
+
readonly type: "address";
|
|
1666
|
+
readonly name: "base";
|
|
1667
|
+
}, {
|
|
1668
|
+
readonly type: "address";
|
|
1669
|
+
readonly name: "quote";
|
|
1670
|
+
}, {
|
|
1671
|
+
readonly type: "int16";
|
|
1672
|
+
readonly name: "bestBidTick";
|
|
1673
|
+
}, {
|
|
1674
|
+
readonly type: "int16";
|
|
1675
|
+
readonly name: "bestAskTick";
|
|
1676
|
+
}];
|
|
1677
|
+
}];
|
|
1678
|
+
}];
|
|
1679
|
+
functionName: "books";
|
|
1680
|
+
args?: readonly [`0x${string}`] | undefined;
|
|
1681
|
+
} & {
|
|
1682
|
+
args: readonly [`0x${string}`];
|
|
1683
|
+
} & {
|
|
1684
|
+
address: Address;
|
|
1685
|
+
} & {
|
|
1686
|
+
data: import("viem").Hex;
|
|
1687
|
+
to: Address;
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1505
1690
|
/**
|
|
1506
1691
|
* Gets the price level information at a specific tick.
|
|
1507
1692
|
*
|
|
@@ -1562,7 +1747,6 @@ export declare namespace getPriceLevel {
|
|
|
1562
1747
|
}];
|
|
1563
1748
|
readonly outputs: readonly [{
|
|
1564
1749
|
readonly type: "tuple";
|
|
1565
|
-
readonly name: "level";
|
|
1566
1750
|
readonly components: readonly [{
|
|
1567
1751
|
readonly type: "uint128";
|
|
1568
1752
|
readonly name: "head";
|
|
@@ -1702,6 +1886,7 @@ export declare namespace place {
|
|
|
1702
1886
|
type: OrderType;
|
|
1703
1887
|
};
|
|
1704
1888
|
type ReturnValue = WriteContractReturnType;
|
|
1889
|
+
type ErrorType = BaseErrorType;
|
|
1705
1890
|
/** @internal */
|
|
1706
1891
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: place.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
1707
1892
|
/**
|
|
@@ -1778,23 +1963,81 @@ export declare namespace place {
|
|
|
1778
1963
|
* @returns The `OrderPlaced` event.
|
|
1779
1964
|
*/
|
|
1780
1965
|
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
1781
|
-
readonly name: "
|
|
1966
|
+
readonly name: "createPair";
|
|
1782
1967
|
readonly type: "function";
|
|
1783
|
-
readonly stateMutability: "
|
|
1968
|
+
readonly stateMutability: "nonpayable";
|
|
1784
1969
|
readonly inputs: readonly [{
|
|
1785
1970
|
readonly type: "address";
|
|
1786
|
-
readonly name: "
|
|
1971
|
+
readonly name: "base";
|
|
1972
|
+
}];
|
|
1973
|
+
readonly outputs: readonly [{
|
|
1974
|
+
readonly type: "bytes32";
|
|
1975
|
+
readonly name: "key";
|
|
1976
|
+
}];
|
|
1977
|
+
}, {
|
|
1978
|
+
readonly name: "place";
|
|
1979
|
+
readonly type: "function";
|
|
1980
|
+
readonly stateMutability: "nonpayable";
|
|
1981
|
+
readonly inputs: readonly [{
|
|
1982
|
+
readonly type: "address";
|
|
1983
|
+
readonly name: "token";
|
|
1787
1984
|
}, {
|
|
1985
|
+
readonly type: "uint128";
|
|
1986
|
+
readonly name: "amount";
|
|
1987
|
+
}, {
|
|
1988
|
+
readonly type: "bool";
|
|
1989
|
+
readonly name: "isBid";
|
|
1990
|
+
}, {
|
|
1991
|
+
readonly type: "int16";
|
|
1992
|
+
readonly name: "tick";
|
|
1993
|
+
}];
|
|
1994
|
+
readonly outputs: readonly [{
|
|
1995
|
+
readonly type: "uint128";
|
|
1996
|
+
readonly name: "orderId";
|
|
1997
|
+
}];
|
|
1998
|
+
}, {
|
|
1999
|
+
readonly name: "placeFlip";
|
|
2000
|
+
readonly type: "function";
|
|
2001
|
+
readonly stateMutability: "nonpayable";
|
|
2002
|
+
readonly inputs: readonly [{
|
|
1788
2003
|
readonly type: "address";
|
|
1789
2004
|
readonly name: "token";
|
|
2005
|
+
}, {
|
|
2006
|
+
readonly type: "uint128";
|
|
2007
|
+
readonly name: "amount";
|
|
2008
|
+
}, {
|
|
2009
|
+
readonly type: "bool";
|
|
2010
|
+
readonly name: "isBid";
|
|
2011
|
+
}, {
|
|
2012
|
+
readonly type: "int16";
|
|
2013
|
+
readonly name: "tick";
|
|
2014
|
+
}, {
|
|
2015
|
+
readonly type: "int16";
|
|
2016
|
+
readonly name: "flipTick";
|
|
1790
2017
|
}];
|
|
1791
2018
|
readonly outputs: readonly [{
|
|
1792
2019
|
readonly type: "uint128";
|
|
2020
|
+
readonly name: "orderId";
|
|
1793
2021
|
}];
|
|
1794
2022
|
}, {
|
|
1795
|
-
readonly name: "
|
|
2023
|
+
readonly name: "cancel";
|
|
1796
2024
|
readonly type: "function";
|
|
1797
|
-
readonly stateMutability: "
|
|
2025
|
+
readonly stateMutability: "nonpayable";
|
|
2026
|
+
readonly inputs: readonly [{
|
|
2027
|
+
readonly type: "uint128";
|
|
2028
|
+
readonly name: "orderId";
|
|
2029
|
+
}];
|
|
2030
|
+
readonly outputs: readonly [];
|
|
2031
|
+
}, {
|
|
2032
|
+
readonly name: "executeBlock";
|
|
2033
|
+
readonly type: "function";
|
|
2034
|
+
readonly stateMutability: "nonpayable";
|
|
2035
|
+
readonly inputs: readonly [];
|
|
2036
|
+
readonly outputs: readonly [];
|
|
2037
|
+
}, {
|
|
2038
|
+
readonly name: "swapExactAmountIn";
|
|
2039
|
+
readonly type: "function";
|
|
2040
|
+
readonly stateMutability: "nonpayable";
|
|
1798
2041
|
readonly inputs: readonly [{
|
|
1799
2042
|
readonly type: "address";
|
|
1800
2043
|
readonly name: "tokenIn";
|
|
@@ -1803,16 +2046,19 @@ export declare namespace place {
|
|
|
1803
2046
|
readonly name: "tokenOut";
|
|
1804
2047
|
}, {
|
|
1805
2048
|
readonly type: "uint128";
|
|
1806
|
-
readonly name: "
|
|
2049
|
+
readonly name: "amountIn";
|
|
2050
|
+
}, {
|
|
2051
|
+
readonly type: "uint128";
|
|
2052
|
+
readonly name: "minAmountOut";
|
|
1807
2053
|
}];
|
|
1808
2054
|
readonly outputs: readonly [{
|
|
1809
2055
|
readonly type: "uint128";
|
|
1810
|
-
readonly name: "
|
|
2056
|
+
readonly name: "amountOut";
|
|
1811
2057
|
}];
|
|
1812
2058
|
}, {
|
|
1813
|
-
readonly name: "
|
|
2059
|
+
readonly name: "swapExactAmountOut";
|
|
1814
2060
|
readonly type: "function";
|
|
1815
|
-
readonly stateMutability: "
|
|
2061
|
+
readonly stateMutability: "nonpayable";
|
|
1816
2062
|
readonly inputs: readonly [{
|
|
1817
2063
|
readonly type: "address";
|
|
1818
2064
|
readonly name: "tokenIn";
|
|
@@ -1821,71 +2067,77 @@ export declare namespace place {
|
|
|
1821
2067
|
readonly name: "tokenOut";
|
|
1822
2068
|
}, {
|
|
1823
2069
|
readonly type: "uint128";
|
|
1824
|
-
readonly name: "
|
|
2070
|
+
readonly name: "amountOut";
|
|
2071
|
+
}, {
|
|
2072
|
+
readonly type: "uint128";
|
|
2073
|
+
readonly name: "maxAmountIn";
|
|
1825
2074
|
}];
|
|
1826
2075
|
readonly outputs: readonly [{
|
|
1827
2076
|
readonly type: "uint128";
|
|
1828
|
-
readonly name: "
|
|
2077
|
+
readonly name: "amountIn";
|
|
1829
2078
|
}];
|
|
1830
2079
|
}, {
|
|
1831
|
-
readonly name: "
|
|
2080
|
+
readonly name: "quoteSwapExactAmountIn";
|
|
1832
2081
|
readonly type: "function";
|
|
1833
|
-
readonly stateMutability: "
|
|
2082
|
+
readonly stateMutability: "view";
|
|
1834
2083
|
readonly inputs: readonly [{
|
|
1835
2084
|
readonly type: "address";
|
|
1836
|
-
readonly name: "
|
|
2085
|
+
readonly name: "tokenIn";
|
|
1837
2086
|
}, {
|
|
1838
2087
|
readonly type: "address";
|
|
1839
|
-
readonly name: "
|
|
2088
|
+
readonly name: "tokenOut";
|
|
2089
|
+
}, {
|
|
2090
|
+
readonly type: "uint128";
|
|
2091
|
+
readonly name: "amountIn";
|
|
1840
2092
|
}];
|
|
1841
2093
|
readonly outputs: readonly [{
|
|
1842
|
-
readonly type: "
|
|
1843
|
-
readonly name: "
|
|
2094
|
+
readonly type: "uint128";
|
|
2095
|
+
readonly name: "amountOut";
|
|
1844
2096
|
}];
|
|
1845
2097
|
}, {
|
|
1846
|
-
readonly name: "
|
|
2098
|
+
readonly name: "quoteSwapExactAmountOut";
|
|
1847
2099
|
readonly type: "function";
|
|
1848
2100
|
readonly stateMutability: "view";
|
|
1849
2101
|
readonly inputs: readonly [{
|
|
1850
2102
|
readonly type: "address";
|
|
1851
|
-
readonly name: "
|
|
2103
|
+
readonly name: "tokenIn";
|
|
1852
2104
|
}, {
|
|
1853
|
-
readonly type: "
|
|
1854
|
-
readonly name: "
|
|
2105
|
+
readonly type: "address";
|
|
2106
|
+
readonly name: "tokenOut";
|
|
1855
2107
|
}, {
|
|
1856
|
-
readonly type: "
|
|
1857
|
-
readonly name: "
|
|
2108
|
+
readonly type: "uint128";
|
|
2109
|
+
readonly name: "amountOut";
|
|
1858
2110
|
}];
|
|
1859
2111
|
readonly outputs: readonly [{
|
|
1860
|
-
readonly type: "
|
|
1861
|
-
readonly name: "
|
|
1862
|
-
readonly components: readonly [{
|
|
1863
|
-
readonly type: "uint128";
|
|
1864
|
-
readonly name: "head";
|
|
1865
|
-
}, {
|
|
1866
|
-
readonly type: "uint128";
|
|
1867
|
-
readonly name: "tail";
|
|
1868
|
-
}, {
|
|
1869
|
-
readonly type: "uint128";
|
|
1870
|
-
readonly name: "totalLiquidity";
|
|
1871
|
-
}];
|
|
2112
|
+
readonly type: "uint128";
|
|
2113
|
+
readonly name: "amountIn";
|
|
1872
2114
|
}];
|
|
1873
2115
|
}, {
|
|
1874
|
-
readonly name: "
|
|
2116
|
+
readonly name: "balanceOf";
|
|
1875
2117
|
readonly type: "function";
|
|
1876
2118
|
readonly stateMutability: "view";
|
|
1877
|
-
readonly inputs: readonly [
|
|
2119
|
+
readonly inputs: readonly [{
|
|
2120
|
+
readonly type: "address";
|
|
2121
|
+
readonly name: "user";
|
|
2122
|
+
}, {
|
|
2123
|
+
readonly type: "address";
|
|
2124
|
+
readonly name: "token";
|
|
2125
|
+
}];
|
|
1878
2126
|
readonly outputs: readonly [{
|
|
1879
2127
|
readonly type: "uint128";
|
|
1880
2128
|
}];
|
|
1881
2129
|
}, {
|
|
1882
|
-
readonly name: "
|
|
2130
|
+
readonly name: "withdraw";
|
|
1883
2131
|
readonly type: "function";
|
|
1884
|
-
readonly stateMutability: "
|
|
1885
|
-
readonly inputs: readonly [
|
|
1886
|
-
|
|
2132
|
+
readonly stateMutability: "nonpayable";
|
|
2133
|
+
readonly inputs: readonly [{
|
|
2134
|
+
readonly type: "address";
|
|
2135
|
+
readonly name: "token";
|
|
2136
|
+
}, {
|
|
1887
2137
|
readonly type: "uint128";
|
|
2138
|
+
readonly name: "amount";
|
|
1888
2139
|
}];
|
|
2140
|
+
readonly outputs: readonly [];
|
|
1889
2141
|
}, {
|
|
1890
2142
|
readonly name: "getOrder";
|
|
1891
2143
|
readonly type: "function";
|
|
@@ -1897,6 +2149,9 @@ export declare namespace place {
|
|
|
1897
2149
|
readonly outputs: readonly [{
|
|
1898
2150
|
readonly type: "tuple";
|
|
1899
2151
|
readonly components: readonly [{
|
|
2152
|
+
readonly type: "uint128";
|
|
2153
|
+
readonly name: "orderId";
|
|
2154
|
+
}, {
|
|
1900
2155
|
readonly type: "address";
|
|
1901
2156
|
readonly name: "maker";
|
|
1902
2157
|
}, {
|
|
@@ -1929,131 +2184,86 @@ export declare namespace place {
|
|
|
1929
2184
|
}];
|
|
1930
2185
|
}];
|
|
1931
2186
|
}, {
|
|
1932
|
-
readonly name: "
|
|
2187
|
+
readonly name: "getPriceLevel";
|
|
1933
2188
|
readonly type: "function";
|
|
1934
|
-
readonly stateMutability: "
|
|
2189
|
+
readonly stateMutability: "view";
|
|
1935
2190
|
readonly inputs: readonly [{
|
|
1936
2191
|
readonly type: "address";
|
|
1937
2192
|
readonly name: "base";
|
|
1938
|
-
}];
|
|
1939
|
-
readonly outputs: readonly [{
|
|
1940
|
-
readonly type: "bytes32";
|
|
1941
|
-
readonly name: "key";
|
|
1942
|
-
}];
|
|
1943
|
-
}, {
|
|
1944
|
-
readonly name: "swapExactAmountIn";
|
|
1945
|
-
readonly type: "function";
|
|
1946
|
-
readonly stateMutability: "nonpayable";
|
|
1947
|
-
readonly inputs: readonly [{
|
|
1948
|
-
readonly type: "address";
|
|
1949
|
-
readonly name: "tokenIn";
|
|
1950
2193
|
}, {
|
|
1951
|
-
readonly type: "
|
|
1952
|
-
readonly name: "
|
|
1953
|
-
}, {
|
|
1954
|
-
readonly type: "uint128";
|
|
1955
|
-
readonly name: "amountIn";
|
|
2194
|
+
readonly type: "int16";
|
|
2195
|
+
readonly name: "tick";
|
|
1956
2196
|
}, {
|
|
1957
|
-
readonly type: "
|
|
1958
|
-
readonly name: "
|
|
2197
|
+
readonly type: "bool";
|
|
2198
|
+
readonly name: "isBid";
|
|
1959
2199
|
}];
|
|
1960
2200
|
readonly outputs: readonly [{
|
|
1961
|
-
readonly type: "
|
|
1962
|
-
readonly
|
|
2201
|
+
readonly type: "tuple";
|
|
2202
|
+
readonly components: readonly [{
|
|
2203
|
+
readonly type: "uint128";
|
|
2204
|
+
readonly name: "head";
|
|
2205
|
+
}, {
|
|
2206
|
+
readonly type: "uint128";
|
|
2207
|
+
readonly name: "tail";
|
|
2208
|
+
}, {
|
|
2209
|
+
readonly type: "uint128";
|
|
2210
|
+
readonly name: "totalLiquidity";
|
|
2211
|
+
}];
|
|
1963
2212
|
}];
|
|
1964
2213
|
}, {
|
|
1965
|
-
readonly name: "
|
|
2214
|
+
readonly name: "pairKey";
|
|
1966
2215
|
readonly type: "function";
|
|
1967
|
-
readonly stateMutability: "
|
|
2216
|
+
readonly stateMutability: "view";
|
|
1968
2217
|
readonly inputs: readonly [{
|
|
1969
2218
|
readonly type: "address";
|
|
1970
|
-
readonly name: "
|
|
2219
|
+
readonly name: "tokenA";
|
|
1971
2220
|
}, {
|
|
1972
2221
|
readonly type: "address";
|
|
1973
|
-
readonly name: "
|
|
1974
|
-
}, {
|
|
1975
|
-
readonly type: "uint128";
|
|
1976
|
-
readonly name: "amountOut";
|
|
1977
|
-
}, {
|
|
1978
|
-
readonly type: "uint128";
|
|
1979
|
-
readonly name: "maxAmountIn";
|
|
2222
|
+
readonly name: "tokenB";
|
|
1980
2223
|
}];
|
|
1981
2224
|
readonly outputs: readonly [{
|
|
1982
|
-
readonly type: "
|
|
1983
|
-
readonly name: "amountIn";
|
|
2225
|
+
readonly type: "bytes32";
|
|
1984
2226
|
}];
|
|
1985
2227
|
}, {
|
|
1986
|
-
readonly name: "
|
|
2228
|
+
readonly name: "activeOrderId";
|
|
1987
2229
|
readonly type: "function";
|
|
1988
|
-
readonly stateMutability: "
|
|
1989
|
-
readonly inputs: readonly [
|
|
1990
|
-
readonly type: "address";
|
|
1991
|
-
readonly name: "token";
|
|
1992
|
-
}, {
|
|
1993
|
-
readonly type: "uint128";
|
|
1994
|
-
readonly name: "amount";
|
|
1995
|
-
}, {
|
|
1996
|
-
readonly type: "bool";
|
|
1997
|
-
readonly name: "isBid";
|
|
1998
|
-
}, {
|
|
1999
|
-
readonly type: "int16";
|
|
2000
|
-
readonly name: "tick";
|
|
2001
|
-
}];
|
|
2230
|
+
readonly stateMutability: "view";
|
|
2231
|
+
readonly inputs: readonly [];
|
|
2002
2232
|
readonly outputs: readonly [{
|
|
2003
2233
|
readonly type: "uint128";
|
|
2004
|
-
readonly name: "orderId";
|
|
2005
2234
|
}];
|
|
2006
2235
|
}, {
|
|
2007
|
-
readonly name: "
|
|
2236
|
+
readonly name: "pendingOrderId";
|
|
2008
2237
|
readonly type: "function";
|
|
2009
|
-
readonly stateMutability: "
|
|
2010
|
-
readonly inputs: readonly [
|
|
2011
|
-
readonly type: "address";
|
|
2012
|
-
readonly name: "token";
|
|
2013
|
-
}, {
|
|
2014
|
-
readonly type: "uint128";
|
|
2015
|
-
readonly name: "amount";
|
|
2016
|
-
}, {
|
|
2017
|
-
readonly type: "bool";
|
|
2018
|
-
readonly name: "isBid";
|
|
2019
|
-
}, {
|
|
2020
|
-
readonly type: "int16";
|
|
2021
|
-
readonly name: "tick";
|
|
2022
|
-
}, {
|
|
2023
|
-
readonly type: "int16";
|
|
2024
|
-
readonly name: "flipTick";
|
|
2025
|
-
}];
|
|
2238
|
+
readonly stateMutability: "view";
|
|
2239
|
+
readonly inputs: readonly [];
|
|
2026
2240
|
readonly outputs: readonly [{
|
|
2027
2241
|
readonly type: "uint128";
|
|
2028
|
-
readonly name: "orderId";
|
|
2029
2242
|
}];
|
|
2030
2243
|
}, {
|
|
2031
|
-
readonly name: "
|
|
2244
|
+
readonly name: "books";
|
|
2032
2245
|
readonly type: "function";
|
|
2033
|
-
readonly stateMutability: "
|
|
2246
|
+
readonly stateMutability: "view";
|
|
2034
2247
|
readonly inputs: readonly [{
|
|
2035
|
-
readonly type: "
|
|
2036
|
-
readonly name: "
|
|
2248
|
+
readonly type: "bytes32";
|
|
2249
|
+
readonly name: "pairKey";
|
|
2037
2250
|
}];
|
|
2038
|
-
readonly outputs: readonly [
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2251
|
+
readonly outputs: readonly [{
|
|
2252
|
+
readonly type: "tuple";
|
|
2253
|
+
readonly components: readonly [{
|
|
2254
|
+
readonly type: "address";
|
|
2255
|
+
readonly name: "base";
|
|
2256
|
+
}, {
|
|
2257
|
+
readonly type: "address";
|
|
2258
|
+
readonly name: "quote";
|
|
2259
|
+
}, {
|
|
2260
|
+
readonly type: "int16";
|
|
2261
|
+
readonly name: "bestBidTick";
|
|
2262
|
+
}, {
|
|
2263
|
+
readonly type: "int16";
|
|
2264
|
+
readonly name: "bestAskTick";
|
|
2265
|
+
}];
|
|
2049
2266
|
}];
|
|
2050
|
-
readonly outputs: readonly [];
|
|
2051
|
-
}, {
|
|
2052
|
-
readonly name: "executeBlock";
|
|
2053
|
-
readonly type: "function";
|
|
2054
|
-
readonly stateMutability: "nonpayable";
|
|
2055
|
-
readonly inputs: readonly [];
|
|
2056
|
-
readonly outputs: readonly [];
|
|
2057
2267
|
}, {
|
|
2058
2268
|
readonly name: "PairCreated";
|
|
2059
2269
|
readonly type: "event";
|
|
@@ -2123,14 +2333,6 @@ export declare namespace place {
|
|
|
2123
2333
|
readonly type: "int16";
|
|
2124
2334
|
readonly name: "flipTick";
|
|
2125
2335
|
}];
|
|
2126
|
-
}, {
|
|
2127
|
-
readonly name: "OrderCancelled";
|
|
2128
|
-
readonly type: "event";
|
|
2129
|
-
readonly inputs: readonly [{
|
|
2130
|
-
readonly type: "uint128";
|
|
2131
|
-
readonly name: "orderId";
|
|
2132
|
-
readonly indexed: true;
|
|
2133
|
-
}];
|
|
2134
2336
|
}, {
|
|
2135
2337
|
readonly name: "OrderFilled";
|
|
2136
2338
|
readonly type: "event";
|
|
@@ -2150,27 +2352,31 @@ export declare namespace place {
|
|
|
2150
2352
|
readonly name: "partialFill";
|
|
2151
2353
|
}];
|
|
2152
2354
|
}, {
|
|
2153
|
-
readonly name: "
|
|
2154
|
-
readonly type: "
|
|
2155
|
-
readonly inputs: readonly [
|
|
2355
|
+
readonly name: "OrderCancelled";
|
|
2356
|
+
readonly type: "event";
|
|
2357
|
+
readonly inputs: readonly [{
|
|
2358
|
+
readonly type: "uint128";
|
|
2359
|
+
readonly name: "orderId";
|
|
2360
|
+
readonly indexed: true;
|
|
2361
|
+
}];
|
|
2156
2362
|
}, {
|
|
2157
2363
|
readonly name: "Unauthorized";
|
|
2158
2364
|
readonly type: "error";
|
|
2159
2365
|
readonly inputs: readonly [];
|
|
2160
2366
|
}, {
|
|
2161
|
-
readonly name: "
|
|
2367
|
+
readonly name: "PairDoesNotExist";
|
|
2162
2368
|
readonly type: "error";
|
|
2163
2369
|
readonly inputs: readonly [];
|
|
2164
2370
|
}, {
|
|
2165
|
-
readonly name: "
|
|
2371
|
+
readonly name: "PairAlreadyExists";
|
|
2166
2372
|
readonly type: "error";
|
|
2167
2373
|
readonly inputs: readonly [];
|
|
2168
2374
|
}, {
|
|
2169
|
-
readonly name: "
|
|
2375
|
+
readonly name: "OrderDoesNotExist";
|
|
2170
2376
|
readonly type: "error";
|
|
2171
2377
|
readonly inputs: readonly [];
|
|
2172
2378
|
}, {
|
|
2173
|
-
readonly name: "
|
|
2379
|
+
readonly name: "IdenticalTokens";
|
|
2174
2380
|
readonly type: "error";
|
|
2175
2381
|
readonly inputs: readonly [];
|
|
2176
2382
|
}, {
|
|
@@ -2181,25 +2387,36 @@ export declare namespace place {
|
|
|
2181
2387
|
readonly name: "tick";
|
|
2182
2388
|
}];
|
|
2183
2389
|
}, {
|
|
2184
|
-
readonly name: "
|
|
2390
|
+
readonly name: "InvalidTick";
|
|
2185
2391
|
readonly type: "error";
|
|
2186
2392
|
readonly inputs: readonly [];
|
|
2187
2393
|
}, {
|
|
2188
|
-
readonly name: "
|
|
2394
|
+
readonly name: "InvalidFlipTick";
|
|
2189
2395
|
readonly type: "error";
|
|
2190
2396
|
readonly inputs: readonly [];
|
|
2191
2397
|
}, {
|
|
2192
|
-
readonly name: "
|
|
2398
|
+
readonly name: "InsufficientBalance";
|
|
2193
2399
|
readonly type: "error";
|
|
2194
2400
|
readonly inputs: readonly [];
|
|
2195
2401
|
}, {
|
|
2196
|
-
readonly name: "
|
|
2402
|
+
readonly name: "InsufficientLiquidity";
|
|
2197
2403
|
readonly type: "error";
|
|
2198
2404
|
readonly inputs: readonly [];
|
|
2199
2405
|
}, {
|
|
2200
|
-
readonly name: "
|
|
2406
|
+
readonly name: "InsufficientOutput";
|
|
2407
|
+
readonly type: "error";
|
|
2408
|
+
readonly inputs: readonly [];
|
|
2409
|
+
}, {
|
|
2410
|
+
readonly name: "MaxInputExceeded";
|
|
2201
2411
|
readonly type: "error";
|
|
2202
2412
|
readonly inputs: readonly [];
|
|
2413
|
+
}, {
|
|
2414
|
+
readonly name: "BelowMinimumOrderSize";
|
|
2415
|
+
readonly type: "error";
|
|
2416
|
+
readonly inputs: readonly [{
|
|
2417
|
+
readonly type: "uint128";
|
|
2418
|
+
readonly name: "amount";
|
|
2419
|
+
}];
|
|
2203
2420
|
}], "OrderPlaced">;
|
|
2204
2421
|
}
|
|
2205
2422
|
/**
|
|
@@ -2247,6 +2464,7 @@ export declare namespace placeFlip {
|
|
|
2247
2464
|
type: OrderType;
|
|
2248
2465
|
};
|
|
2249
2466
|
type ReturnValue = WriteContractReturnType;
|
|
2467
|
+
type ErrorType = BaseErrorType;
|
|
2250
2468
|
/** @internal */
|
|
2251
2469
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: placeFlip.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
2252
2470
|
/**
|
|
@@ -2327,23 +2545,102 @@ export declare namespace placeFlip {
|
|
|
2327
2545
|
* @returns The `FlipOrderPlaced` event.
|
|
2328
2546
|
*/
|
|
2329
2547
|
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
2330
|
-
readonly name: "
|
|
2548
|
+
readonly name: "createPair";
|
|
2549
|
+
readonly type: "function";
|
|
2550
|
+
readonly stateMutability: "nonpayable";
|
|
2551
|
+
readonly inputs: readonly [{
|
|
2552
|
+
readonly type: "address";
|
|
2553
|
+
readonly name: "base";
|
|
2554
|
+
}];
|
|
2555
|
+
readonly outputs: readonly [{
|
|
2556
|
+
readonly type: "bytes32";
|
|
2557
|
+
readonly name: "key";
|
|
2558
|
+
}];
|
|
2559
|
+
}, {
|
|
2560
|
+
readonly name: "place";
|
|
2561
|
+
readonly type: "function";
|
|
2562
|
+
readonly stateMutability: "nonpayable";
|
|
2563
|
+
readonly inputs: readonly [{
|
|
2564
|
+
readonly type: "address";
|
|
2565
|
+
readonly name: "token";
|
|
2566
|
+
}, {
|
|
2567
|
+
readonly type: "uint128";
|
|
2568
|
+
readonly name: "amount";
|
|
2569
|
+
}, {
|
|
2570
|
+
readonly type: "bool";
|
|
2571
|
+
readonly name: "isBid";
|
|
2572
|
+
}, {
|
|
2573
|
+
readonly type: "int16";
|
|
2574
|
+
readonly name: "tick";
|
|
2575
|
+
}];
|
|
2576
|
+
readonly outputs: readonly [{
|
|
2577
|
+
readonly type: "uint128";
|
|
2578
|
+
readonly name: "orderId";
|
|
2579
|
+
}];
|
|
2580
|
+
}, {
|
|
2581
|
+
readonly name: "placeFlip";
|
|
2582
|
+
readonly type: "function";
|
|
2583
|
+
readonly stateMutability: "nonpayable";
|
|
2584
|
+
readonly inputs: readonly [{
|
|
2585
|
+
readonly type: "address";
|
|
2586
|
+
readonly name: "token";
|
|
2587
|
+
}, {
|
|
2588
|
+
readonly type: "uint128";
|
|
2589
|
+
readonly name: "amount";
|
|
2590
|
+
}, {
|
|
2591
|
+
readonly type: "bool";
|
|
2592
|
+
readonly name: "isBid";
|
|
2593
|
+
}, {
|
|
2594
|
+
readonly type: "int16";
|
|
2595
|
+
readonly name: "tick";
|
|
2596
|
+
}, {
|
|
2597
|
+
readonly type: "int16";
|
|
2598
|
+
readonly name: "flipTick";
|
|
2599
|
+
}];
|
|
2600
|
+
readonly outputs: readonly [{
|
|
2601
|
+
readonly type: "uint128";
|
|
2602
|
+
readonly name: "orderId";
|
|
2603
|
+
}];
|
|
2604
|
+
}, {
|
|
2605
|
+
readonly name: "cancel";
|
|
2606
|
+
readonly type: "function";
|
|
2607
|
+
readonly stateMutability: "nonpayable";
|
|
2608
|
+
readonly inputs: readonly [{
|
|
2609
|
+
readonly type: "uint128";
|
|
2610
|
+
readonly name: "orderId";
|
|
2611
|
+
}];
|
|
2612
|
+
readonly outputs: readonly [];
|
|
2613
|
+
}, {
|
|
2614
|
+
readonly name: "executeBlock";
|
|
2615
|
+
readonly type: "function";
|
|
2616
|
+
readonly stateMutability: "nonpayable";
|
|
2617
|
+
readonly inputs: readonly [];
|
|
2618
|
+
readonly outputs: readonly [];
|
|
2619
|
+
}, {
|
|
2620
|
+
readonly name: "swapExactAmountIn";
|
|
2331
2621
|
readonly type: "function";
|
|
2332
|
-
readonly stateMutability: "
|
|
2622
|
+
readonly stateMutability: "nonpayable";
|
|
2333
2623
|
readonly inputs: readonly [{
|
|
2334
2624
|
readonly type: "address";
|
|
2335
|
-
readonly name: "
|
|
2625
|
+
readonly name: "tokenIn";
|
|
2336
2626
|
}, {
|
|
2337
2627
|
readonly type: "address";
|
|
2338
|
-
readonly name: "
|
|
2628
|
+
readonly name: "tokenOut";
|
|
2629
|
+
}, {
|
|
2630
|
+
readonly type: "uint128";
|
|
2631
|
+
readonly name: "amountIn";
|
|
2632
|
+
}, {
|
|
2633
|
+
readonly type: "uint128";
|
|
2634
|
+
readonly name: "minAmountOut";
|
|
2339
2635
|
}];
|
|
2340
2636
|
readonly outputs: readonly [{
|
|
2341
2637
|
readonly type: "uint128";
|
|
2638
|
+
readonly name: "amountOut";
|
|
2342
2639
|
}];
|
|
2343
2640
|
}, {
|
|
2344
|
-
readonly name: "
|
|
2641
|
+
readonly name: "swapExactAmountOut";
|
|
2345
2642
|
readonly type: "function";
|
|
2346
|
-
readonly stateMutability: "
|
|
2643
|
+
readonly stateMutability: "nonpayable";
|
|
2347
2644
|
readonly inputs: readonly [{
|
|
2348
2645
|
readonly type: "address";
|
|
2349
2646
|
readonly name: "tokenIn";
|
|
@@ -2353,6 +2650,9 @@ export declare namespace placeFlip {
|
|
|
2353
2650
|
}, {
|
|
2354
2651
|
readonly type: "uint128";
|
|
2355
2652
|
readonly name: "amountOut";
|
|
2653
|
+
}, {
|
|
2654
|
+
readonly type: "uint128";
|
|
2655
|
+
readonly name: "maxAmountIn";
|
|
2356
2656
|
}];
|
|
2357
2657
|
readonly outputs: readonly [{
|
|
2358
2658
|
readonly type: "uint128";
|
|
@@ -2377,64 +2677,49 @@ export declare namespace placeFlip {
|
|
|
2377
2677
|
readonly name: "amountOut";
|
|
2378
2678
|
}];
|
|
2379
2679
|
}, {
|
|
2380
|
-
readonly name: "
|
|
2680
|
+
readonly name: "quoteSwapExactAmountOut";
|
|
2381
2681
|
readonly type: "function";
|
|
2382
|
-
readonly stateMutability: "
|
|
2682
|
+
readonly stateMutability: "view";
|
|
2383
2683
|
readonly inputs: readonly [{
|
|
2384
2684
|
readonly type: "address";
|
|
2385
|
-
readonly name: "
|
|
2685
|
+
readonly name: "tokenIn";
|
|
2386
2686
|
}, {
|
|
2387
2687
|
readonly type: "address";
|
|
2388
|
-
readonly name: "
|
|
2688
|
+
readonly name: "tokenOut";
|
|
2689
|
+
}, {
|
|
2690
|
+
readonly type: "uint128";
|
|
2691
|
+
readonly name: "amountOut";
|
|
2389
2692
|
}];
|
|
2390
2693
|
readonly outputs: readonly [{
|
|
2391
|
-
readonly type: "
|
|
2392
|
-
readonly name: "
|
|
2694
|
+
readonly type: "uint128";
|
|
2695
|
+
readonly name: "amountIn";
|
|
2393
2696
|
}];
|
|
2394
2697
|
}, {
|
|
2395
|
-
readonly name: "
|
|
2698
|
+
readonly name: "balanceOf";
|
|
2396
2699
|
readonly type: "function";
|
|
2397
2700
|
readonly stateMutability: "view";
|
|
2398
2701
|
readonly inputs: readonly [{
|
|
2399
2702
|
readonly type: "address";
|
|
2400
|
-
readonly name: "
|
|
2401
|
-
}, {
|
|
2402
|
-
readonly type: "int16";
|
|
2403
|
-
readonly name: "tick";
|
|
2703
|
+
readonly name: "user";
|
|
2404
2704
|
}, {
|
|
2405
|
-
readonly type: "
|
|
2406
|
-
readonly name: "
|
|
2407
|
-
}];
|
|
2408
|
-
readonly outputs: readonly [{
|
|
2409
|
-
readonly type: "tuple";
|
|
2410
|
-
readonly name: "level";
|
|
2411
|
-
readonly components: readonly [{
|
|
2412
|
-
readonly type: "uint128";
|
|
2413
|
-
readonly name: "head";
|
|
2414
|
-
}, {
|
|
2415
|
-
readonly type: "uint128";
|
|
2416
|
-
readonly name: "tail";
|
|
2417
|
-
}, {
|
|
2418
|
-
readonly type: "uint128";
|
|
2419
|
-
readonly name: "totalLiquidity";
|
|
2420
|
-
}];
|
|
2705
|
+
readonly type: "address";
|
|
2706
|
+
readonly name: "token";
|
|
2421
2707
|
}];
|
|
2422
|
-
}, {
|
|
2423
|
-
readonly name: "activeOrderId";
|
|
2424
|
-
readonly type: "function";
|
|
2425
|
-
readonly stateMutability: "view";
|
|
2426
|
-
readonly inputs: readonly [];
|
|
2427
2708
|
readonly outputs: readonly [{
|
|
2428
2709
|
readonly type: "uint128";
|
|
2429
2710
|
}];
|
|
2430
2711
|
}, {
|
|
2431
|
-
readonly name: "
|
|
2712
|
+
readonly name: "withdraw";
|
|
2432
2713
|
readonly type: "function";
|
|
2433
|
-
readonly stateMutability: "
|
|
2434
|
-
readonly inputs: readonly [
|
|
2435
|
-
|
|
2714
|
+
readonly stateMutability: "nonpayable";
|
|
2715
|
+
readonly inputs: readonly [{
|
|
2716
|
+
readonly type: "address";
|
|
2717
|
+
readonly name: "token";
|
|
2718
|
+
}, {
|
|
2436
2719
|
readonly type: "uint128";
|
|
2720
|
+
readonly name: "amount";
|
|
2437
2721
|
}];
|
|
2722
|
+
readonly outputs: readonly [];
|
|
2438
2723
|
}, {
|
|
2439
2724
|
readonly name: "getOrder";
|
|
2440
2725
|
readonly type: "function";
|
|
@@ -2446,6 +2731,9 @@ export declare namespace placeFlip {
|
|
|
2446
2731
|
readonly outputs: readonly [{
|
|
2447
2732
|
readonly type: "tuple";
|
|
2448
2733
|
readonly components: readonly [{
|
|
2734
|
+
readonly type: "uint128";
|
|
2735
|
+
readonly name: "orderId";
|
|
2736
|
+
}, {
|
|
2449
2737
|
readonly type: "address";
|
|
2450
2738
|
readonly name: "maker";
|
|
2451
2739
|
}, {
|
|
@@ -2478,131 +2766,86 @@ export declare namespace placeFlip {
|
|
|
2478
2766
|
}];
|
|
2479
2767
|
}];
|
|
2480
2768
|
}, {
|
|
2481
|
-
readonly name: "
|
|
2769
|
+
readonly name: "getPriceLevel";
|
|
2482
2770
|
readonly type: "function";
|
|
2483
|
-
readonly stateMutability: "
|
|
2771
|
+
readonly stateMutability: "view";
|
|
2484
2772
|
readonly inputs: readonly [{
|
|
2485
2773
|
readonly type: "address";
|
|
2486
2774
|
readonly name: "base";
|
|
2487
|
-
}];
|
|
2488
|
-
readonly outputs: readonly [{
|
|
2489
|
-
readonly type: "bytes32";
|
|
2490
|
-
readonly name: "key";
|
|
2491
|
-
}];
|
|
2492
|
-
}, {
|
|
2493
|
-
readonly name: "swapExactAmountIn";
|
|
2494
|
-
readonly type: "function";
|
|
2495
|
-
readonly stateMutability: "nonpayable";
|
|
2496
|
-
readonly inputs: readonly [{
|
|
2497
|
-
readonly type: "address";
|
|
2498
|
-
readonly name: "tokenIn";
|
|
2499
|
-
}, {
|
|
2500
|
-
readonly type: "address";
|
|
2501
|
-
readonly name: "tokenOut";
|
|
2502
2775
|
}, {
|
|
2503
|
-
readonly type: "
|
|
2504
|
-
readonly name: "
|
|
2776
|
+
readonly type: "int16";
|
|
2777
|
+
readonly name: "tick";
|
|
2505
2778
|
}, {
|
|
2506
|
-
readonly type: "
|
|
2507
|
-
readonly name: "
|
|
2779
|
+
readonly type: "bool";
|
|
2780
|
+
readonly name: "isBid";
|
|
2508
2781
|
}];
|
|
2509
2782
|
readonly outputs: readonly [{
|
|
2510
|
-
readonly type: "
|
|
2511
|
-
readonly
|
|
2783
|
+
readonly type: "tuple";
|
|
2784
|
+
readonly components: readonly [{
|
|
2785
|
+
readonly type: "uint128";
|
|
2786
|
+
readonly name: "head";
|
|
2787
|
+
}, {
|
|
2788
|
+
readonly type: "uint128";
|
|
2789
|
+
readonly name: "tail";
|
|
2790
|
+
}, {
|
|
2791
|
+
readonly type: "uint128";
|
|
2792
|
+
readonly name: "totalLiquidity";
|
|
2793
|
+
}];
|
|
2512
2794
|
}];
|
|
2513
2795
|
}, {
|
|
2514
|
-
readonly name: "
|
|
2796
|
+
readonly name: "pairKey";
|
|
2515
2797
|
readonly type: "function";
|
|
2516
|
-
readonly stateMutability: "
|
|
2798
|
+
readonly stateMutability: "view";
|
|
2517
2799
|
readonly inputs: readonly [{
|
|
2518
2800
|
readonly type: "address";
|
|
2519
|
-
readonly name: "
|
|
2801
|
+
readonly name: "tokenA";
|
|
2520
2802
|
}, {
|
|
2521
2803
|
readonly type: "address";
|
|
2522
|
-
readonly name: "
|
|
2523
|
-
}, {
|
|
2524
|
-
readonly type: "uint128";
|
|
2525
|
-
readonly name: "amountOut";
|
|
2526
|
-
}, {
|
|
2527
|
-
readonly type: "uint128";
|
|
2528
|
-
readonly name: "maxAmountIn";
|
|
2804
|
+
readonly name: "tokenB";
|
|
2529
2805
|
}];
|
|
2530
2806
|
readonly outputs: readonly [{
|
|
2531
|
-
readonly type: "
|
|
2532
|
-
readonly name: "amountIn";
|
|
2807
|
+
readonly type: "bytes32";
|
|
2533
2808
|
}];
|
|
2534
2809
|
}, {
|
|
2535
|
-
readonly name: "
|
|
2810
|
+
readonly name: "activeOrderId";
|
|
2536
2811
|
readonly type: "function";
|
|
2537
|
-
readonly stateMutability: "
|
|
2538
|
-
readonly inputs: readonly [
|
|
2539
|
-
readonly type: "address";
|
|
2540
|
-
readonly name: "token";
|
|
2541
|
-
}, {
|
|
2542
|
-
readonly type: "uint128";
|
|
2543
|
-
readonly name: "amount";
|
|
2544
|
-
}, {
|
|
2545
|
-
readonly type: "bool";
|
|
2546
|
-
readonly name: "isBid";
|
|
2547
|
-
}, {
|
|
2548
|
-
readonly type: "int16";
|
|
2549
|
-
readonly name: "tick";
|
|
2550
|
-
}];
|
|
2812
|
+
readonly stateMutability: "view";
|
|
2813
|
+
readonly inputs: readonly [];
|
|
2551
2814
|
readonly outputs: readonly [{
|
|
2552
2815
|
readonly type: "uint128";
|
|
2553
|
-
readonly name: "orderId";
|
|
2554
2816
|
}];
|
|
2555
2817
|
}, {
|
|
2556
|
-
readonly name: "
|
|
2818
|
+
readonly name: "pendingOrderId";
|
|
2557
2819
|
readonly type: "function";
|
|
2558
|
-
readonly stateMutability: "
|
|
2559
|
-
readonly inputs: readonly [
|
|
2560
|
-
readonly type: "address";
|
|
2561
|
-
readonly name: "token";
|
|
2562
|
-
}, {
|
|
2563
|
-
readonly type: "uint128";
|
|
2564
|
-
readonly name: "amount";
|
|
2565
|
-
}, {
|
|
2566
|
-
readonly type: "bool";
|
|
2567
|
-
readonly name: "isBid";
|
|
2568
|
-
}, {
|
|
2569
|
-
readonly type: "int16";
|
|
2570
|
-
readonly name: "tick";
|
|
2571
|
-
}, {
|
|
2572
|
-
readonly type: "int16";
|
|
2573
|
-
readonly name: "flipTick";
|
|
2574
|
-
}];
|
|
2820
|
+
readonly stateMutability: "view";
|
|
2821
|
+
readonly inputs: readonly [];
|
|
2575
2822
|
readonly outputs: readonly [{
|
|
2576
2823
|
readonly type: "uint128";
|
|
2577
|
-
readonly name: "orderId";
|
|
2578
2824
|
}];
|
|
2579
2825
|
}, {
|
|
2580
|
-
readonly name: "
|
|
2826
|
+
readonly name: "books";
|
|
2581
2827
|
readonly type: "function";
|
|
2582
|
-
readonly stateMutability: "
|
|
2828
|
+
readonly stateMutability: "view";
|
|
2583
2829
|
readonly inputs: readonly [{
|
|
2584
|
-
readonly type: "
|
|
2585
|
-
readonly name: "
|
|
2830
|
+
readonly type: "bytes32";
|
|
2831
|
+
readonly name: "pairKey";
|
|
2586
2832
|
}];
|
|
2587
|
-
readonly outputs: readonly [
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2833
|
+
readonly outputs: readonly [{
|
|
2834
|
+
readonly type: "tuple";
|
|
2835
|
+
readonly components: readonly [{
|
|
2836
|
+
readonly type: "address";
|
|
2837
|
+
readonly name: "base";
|
|
2838
|
+
}, {
|
|
2839
|
+
readonly type: "address";
|
|
2840
|
+
readonly name: "quote";
|
|
2841
|
+
}, {
|
|
2842
|
+
readonly type: "int16";
|
|
2843
|
+
readonly name: "bestBidTick";
|
|
2844
|
+
}, {
|
|
2845
|
+
readonly type: "int16";
|
|
2846
|
+
readonly name: "bestAskTick";
|
|
2847
|
+
}];
|
|
2598
2848
|
}];
|
|
2599
|
-
readonly outputs: readonly [];
|
|
2600
|
-
}, {
|
|
2601
|
-
readonly name: "executeBlock";
|
|
2602
|
-
readonly type: "function";
|
|
2603
|
-
readonly stateMutability: "nonpayable";
|
|
2604
|
-
readonly inputs: readonly [];
|
|
2605
|
-
readonly outputs: readonly [];
|
|
2606
2849
|
}, {
|
|
2607
2850
|
readonly name: "PairCreated";
|
|
2608
2851
|
readonly type: "event";
|
|
@@ -2672,14 +2915,6 @@ export declare namespace placeFlip {
|
|
|
2672
2915
|
readonly type: "int16";
|
|
2673
2916
|
readonly name: "flipTick";
|
|
2674
2917
|
}];
|
|
2675
|
-
}, {
|
|
2676
|
-
readonly name: "OrderCancelled";
|
|
2677
|
-
readonly type: "event";
|
|
2678
|
-
readonly inputs: readonly [{
|
|
2679
|
-
readonly type: "uint128";
|
|
2680
|
-
readonly name: "orderId";
|
|
2681
|
-
readonly indexed: true;
|
|
2682
|
-
}];
|
|
2683
2918
|
}, {
|
|
2684
2919
|
readonly name: "OrderFilled";
|
|
2685
2920
|
readonly type: "event";
|
|
@@ -2699,27 +2934,31 @@ export declare namespace placeFlip {
|
|
|
2699
2934
|
readonly name: "partialFill";
|
|
2700
2935
|
}];
|
|
2701
2936
|
}, {
|
|
2702
|
-
readonly name: "
|
|
2703
|
-
readonly type: "
|
|
2704
|
-
readonly inputs: readonly [
|
|
2937
|
+
readonly name: "OrderCancelled";
|
|
2938
|
+
readonly type: "event";
|
|
2939
|
+
readonly inputs: readonly [{
|
|
2940
|
+
readonly type: "uint128";
|
|
2941
|
+
readonly name: "orderId";
|
|
2942
|
+
readonly indexed: true;
|
|
2943
|
+
}];
|
|
2705
2944
|
}, {
|
|
2706
2945
|
readonly name: "Unauthorized";
|
|
2707
2946
|
readonly type: "error";
|
|
2708
2947
|
readonly inputs: readonly [];
|
|
2709
2948
|
}, {
|
|
2710
|
-
readonly name: "
|
|
2949
|
+
readonly name: "PairDoesNotExist";
|
|
2711
2950
|
readonly type: "error";
|
|
2712
2951
|
readonly inputs: readonly [];
|
|
2713
2952
|
}, {
|
|
2714
|
-
readonly name: "
|
|
2953
|
+
readonly name: "PairAlreadyExists";
|
|
2715
2954
|
readonly type: "error";
|
|
2716
2955
|
readonly inputs: readonly [];
|
|
2717
2956
|
}, {
|
|
2718
|
-
readonly name: "
|
|
2957
|
+
readonly name: "OrderDoesNotExist";
|
|
2719
2958
|
readonly type: "error";
|
|
2720
2959
|
readonly inputs: readonly [];
|
|
2721
2960
|
}, {
|
|
2722
|
-
readonly name: "
|
|
2961
|
+
readonly name: "IdenticalTokens";
|
|
2723
2962
|
readonly type: "error";
|
|
2724
2963
|
readonly inputs: readonly [];
|
|
2725
2964
|
}, {
|
|
@@ -2730,25 +2969,36 @@ export declare namespace placeFlip {
|
|
|
2730
2969
|
readonly name: "tick";
|
|
2731
2970
|
}];
|
|
2732
2971
|
}, {
|
|
2733
|
-
readonly name: "
|
|
2972
|
+
readonly name: "InvalidTick";
|
|
2734
2973
|
readonly type: "error";
|
|
2735
2974
|
readonly inputs: readonly [];
|
|
2736
2975
|
}, {
|
|
2737
|
-
readonly name: "
|
|
2976
|
+
readonly name: "InvalidFlipTick";
|
|
2738
2977
|
readonly type: "error";
|
|
2739
2978
|
readonly inputs: readonly [];
|
|
2740
2979
|
}, {
|
|
2741
|
-
readonly name: "
|
|
2980
|
+
readonly name: "InsufficientBalance";
|
|
2742
2981
|
readonly type: "error";
|
|
2743
2982
|
readonly inputs: readonly [];
|
|
2744
2983
|
}, {
|
|
2745
|
-
readonly name: "
|
|
2984
|
+
readonly name: "InsufficientLiquidity";
|
|
2746
2985
|
readonly type: "error";
|
|
2747
2986
|
readonly inputs: readonly [];
|
|
2748
2987
|
}, {
|
|
2749
|
-
readonly name: "
|
|
2988
|
+
readonly name: "InsufficientOutput";
|
|
2989
|
+
readonly type: "error";
|
|
2990
|
+
readonly inputs: readonly [];
|
|
2991
|
+
}, {
|
|
2992
|
+
readonly name: "MaxInputExceeded";
|
|
2750
2993
|
readonly type: "error";
|
|
2751
2994
|
readonly inputs: readonly [];
|
|
2995
|
+
}, {
|
|
2996
|
+
readonly name: "BelowMinimumOrderSize";
|
|
2997
|
+
readonly type: "error";
|
|
2998
|
+
readonly inputs: readonly [{
|
|
2999
|
+
readonly type: "uint128";
|
|
3000
|
+
readonly name: "amount";
|
|
3001
|
+
}];
|
|
2752
3002
|
}], "FlipOrderPlaced">;
|
|
2753
3003
|
}
|
|
2754
3004
|
/**
|
|
@@ -2791,6 +3041,7 @@ export declare namespace placeFlipSync {
|
|
|
2791
3041
|
/** Transaction receipt. */
|
|
2792
3042
|
receipt: TransactionReceipt;
|
|
2793
3043
|
}>;
|
|
3044
|
+
type ErrorType = BaseErrorType;
|
|
2794
3045
|
}
|
|
2795
3046
|
/**
|
|
2796
3047
|
* Places a limit order on the orderbook.
|
|
@@ -2831,6 +3082,7 @@ export declare namespace placeSync {
|
|
|
2831
3082
|
/** Transaction receipt. */
|
|
2832
3083
|
receipt: TransactionReceipt;
|
|
2833
3084
|
}>;
|
|
3085
|
+
type ErrorType = BaseErrorType;
|
|
2834
3086
|
}
|
|
2835
3087
|
/**
|
|
2836
3088
|
* Sells a specific amount of tokens.
|
|
@@ -2874,6 +3126,7 @@ export declare namespace sell {
|
|
|
2874
3126
|
tokenOut: Address;
|
|
2875
3127
|
};
|
|
2876
3128
|
type ReturnValue = WriteContractReturnType;
|
|
3129
|
+
type ErrorType = BaseErrorType;
|
|
2877
3130
|
/** @internal */
|
|
2878
3131
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: sell.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
2879
3132
|
/**
|
|
@@ -2980,6 +3233,7 @@ export declare namespace sellSync {
|
|
|
2980
3233
|
/** Transaction receipt. */
|
|
2981
3234
|
receipt: TransactionReceipt;
|
|
2982
3235
|
}>;
|
|
3236
|
+
type ErrorType = BaseErrorType;
|
|
2983
3237
|
}
|
|
2984
3238
|
/**
|
|
2985
3239
|
* Watches for flip order placed events.
|
|
@@ -3181,6 +3435,7 @@ export declare namespace withdraw {
|
|
|
3181
3435
|
token: Address;
|
|
3182
3436
|
};
|
|
3183
3437
|
type ReturnValue = WriteContractReturnType;
|
|
3438
|
+
type ErrorType = BaseErrorType;
|
|
3184
3439
|
/** @internal */
|
|
3185
3440
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: withdraw.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
3186
3441
|
/**
|
|
@@ -3274,6 +3529,7 @@ export declare namespace withdrawSync {
|
|
|
3274
3529
|
/** Transaction receipt. */
|
|
3275
3530
|
receipt: TransactionReceipt;
|
|
3276
3531
|
}>;
|
|
3532
|
+
type ErrorType = BaseErrorType;
|
|
3277
3533
|
}
|
|
3278
3534
|
export {};
|
|
3279
3535
|
//# sourceMappingURL=dex.d.ts.map
|