viem 2.43.5 → 2.44.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/CHANGELOG.md +42 -0
- package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js +11 -1
- package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
- package/_cjs/actions/wallet/sendTransactionSync.js +1 -0
- package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
- package/_cjs/chains/definitions/codex.js +47 -0
- package/_cjs/chains/definitions/codex.js.map +1 -0
- package/_cjs/chains/definitions/codexTestnet.js +47 -0
- package/_cjs/chains/definitions/codexTestnet.js.map +1 -0
- package/_cjs/chains/definitions/paseoPassetHub.js +26 -0
- package/_cjs/chains/definitions/paseoPassetHub.js.map +1 -0
- package/_cjs/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +5 -5
- package/_cjs/chains/definitions/tempoAndantino.js.map +1 -0
- package/_cjs/chains/definitions/tempoDevnet.js +6 -0
- package/_cjs/chains/definitions/tempoDevnet.js.map +1 -1
- package/_cjs/chains/definitions/tempoModerato.js +28 -0
- package/_cjs/chains/definitions/tempoModerato.js.map +1 -0
- package/_cjs/chains/index.js +23 -14
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/tempo/Abis.js +610 -752
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -2
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js +5 -5
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/actions/amm.js +4 -38
- package/_cjs/tempo/actions/amm.js.map +1 -1
- package/_cjs/tempo/actions/dex.js +98 -46
- package/_cjs/tempo/actions/dex.js.map +1 -1
- package/_cjs/tempo/actions/nonce.js +0 -35
- package/_cjs/tempo/actions/nonce.js.map +1 -1
- package/_cjs/tempo/actions/reward.js +81 -62
- package/_cjs/tempo/actions/reward.js.map +1 -1
- package/_cjs/tempo/actions/token.js +11 -2
- package/_cjs/tempo/actions/token.js.map +1 -1
- package/_cjs/tempo/chainConfig.js +5 -10
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/index.js +2 -1
- package/_cjs/tempo/index.js.map +1 -1
- package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +16 -2
- package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
- package/_esm/actions/wallet/sendTransactionSync.js +1 -0
- package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
- package/_esm/chains/definitions/codex.js +44 -0
- package/_esm/chains/definitions/codex.js.map +1 -0
- package/_esm/chains/definitions/codexTestnet.js +44 -0
- package/_esm/chains/definitions/codexTestnet.js.map +1 -0
- package/_esm/chains/definitions/paseoPassetHub.js +23 -0
- package/_esm/chains/definitions/paseoPassetHub.js.map +1 -0
- package/_esm/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +4 -4
- package/_esm/chains/definitions/tempoAndantino.js.map +1 -0
- package/_esm/chains/definitions/tempoDevnet.js +6 -0
- package/_esm/chains/definitions/tempoDevnet.js.map +1 -1
- package/_esm/chains/definitions/tempoModerato.js +25 -0
- package/_esm/chains/definitions/tempoModerato.js.map +1 -0
- package/_esm/chains/index.js +9 -1
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/tempo/Abis.js +609 -751
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +1 -1
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js +5 -5
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/actions/amm.js +4 -62
- package/_esm/tempo/actions/amm.js.map +1 -1
- package/_esm/tempo/actions/dex.js +192 -48
- package/_esm/tempo/actions/dex.js.map +1 -1
- package/_esm/tempo/actions/nonce.js +0 -94
- package/_esm/tempo/actions/nonce.js.map +1 -1
- package/_esm/tempo/actions/reward.js +227 -189
- package/_esm/tempo/actions/reward.js.map +1 -1
- package/_esm/tempo/actions/token.js +11 -2
- package/_esm/tempo/actions/token.js.map +1 -1
- package/_esm/tempo/chainConfig.js +2 -7
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/index.js +1 -1
- package/_esm/tempo/index.js.map +1 -1
- package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
- package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +22 -22
- package/_types/celo/formatters.d.ts +11 -11
- package/_types/chains/definitions/abstract.d.ts +14 -14
- package/_types/chains/definitions/abstractTestnet.d.ts +14 -14
- package/_types/chains/definitions/ancient8.d.ts +3 -3
- package/_types/chains/definitions/ancient8Sepolia.d.ts +3 -3
- package/_types/chains/definitions/base.d.ts +6 -6
- package/_types/chains/definitions/baseGoerli.d.ts +3 -3
- package/_types/chains/definitions/baseSepolia.d.ts +6 -6
- package/_types/chains/definitions/blast.d.ts +3 -3
- package/_types/chains/definitions/bob.d.ts +3 -3
- package/_types/chains/definitions/bobSepolia.d.ts +3 -3
- package/_types/chains/definitions/celo.d.ts +22 -22
- package/_types/chains/definitions/celoAlfajores.d.ts +22 -22
- package/_types/chains/definitions/celoSepolia.d.ts +22 -22
- package/_types/chains/definitions/codex.d.ts +310 -0
- package/_types/chains/definitions/codex.d.ts.map +1 -0
- package/_types/chains/definitions/codexTestnet.d.ts +310 -0
- package/_types/chains/definitions/codexTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/dchain.d.ts +3 -3
- package/_types/chains/definitions/dchainTestnet.d.ts +3 -3
- package/_types/chains/definitions/elysiumTestnet.d.ts +3 -3
- package/_types/chains/definitions/fraxtal.d.ts +3 -3
- package/_types/chains/definitions/fraxtalTestnet.d.ts +3 -3
- package/_types/chains/definitions/funkiMainnet.d.ts +3 -3
- package/_types/chains/definitions/funkiSepolia.d.ts +3 -3
- package/_types/chains/definitions/garnet.d.ts +3 -3
- package/_types/chains/definitions/giwaSepolia.d.ts +6 -6
- package/_types/chains/definitions/ink.d.ts +3 -3
- package/_types/chains/definitions/inkSepolia.d.ts +3 -3
- package/_types/chains/definitions/lisk.d.ts +3 -3
- package/_types/chains/definitions/liskSepolia.d.ts +3 -3
- package/_types/chains/definitions/metalL2.d.ts +3 -3
- package/_types/chains/definitions/mode.d.ts +3 -3
- package/_types/chains/definitions/modeTestnet.d.ts +3 -3
- package/_types/chains/definitions/optimism.d.ts +3 -3
- package/_types/chains/definitions/optimismGoerli.d.ts +3 -3
- package/_types/chains/definitions/optimismSepolia.d.ts +3 -3
- package/_types/chains/definitions/paseoPassetHub.d.ts +48 -0
- package/_types/chains/definitions/paseoPassetHub.d.ts.map +1 -0
- package/_types/chains/definitions/pgn.d.ts +3 -3
- package/_types/chains/definitions/pgnTestnet.d.ts +3 -3
- package/_types/chains/definitions/playfiAlbireo.d.ts +14 -14
- package/_types/chains/definitions/pyrope.d.ts +3 -3
- package/_types/chains/definitions/redstone.d.ts +3 -3
- package/_types/chains/definitions/rss3.d.ts +3 -3
- package/_types/chains/definitions/rss3Sepolia.d.ts +3 -3
- package/_types/chains/definitions/shape.d.ts +3 -3
- package/_types/chains/definitions/shapeSepolia.d.ts +3 -3
- package/_types/chains/definitions/snax.d.ts +3 -3
- package/_types/chains/definitions/snaxTestnet.d.ts +3 -3
- package/_types/chains/definitions/soneium.d.ts +3 -3
- package/_types/chains/definitions/soneiumMinato.d.ts +3 -3
- package/_types/chains/definitions/sophon.d.ts +14 -14
- package/_types/chains/definitions/sophonTestnet.d.ts +14 -14
- package/_types/chains/definitions/superseed.d.ts +3 -3
- package/_types/chains/definitions/superseedSepolia.d.ts +3 -3
- package/_types/chains/definitions/swellchain.d.ts +3 -3
- package/_types/chains/definitions/swellchainTestnet.d.ts +3 -3
- package/_types/chains/definitions/{tempoTestnet.d.ts → tempoAndantino.d.ts} +36 -40
- package/_types/chains/definitions/{tempoTestnet.d.ts.map → tempoAndantino.d.ts.map} +1 -1
- package/_types/chains/definitions/tempoDevnet.d.ts +41 -45
- package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoLocalnet.d.ts +30 -34
- package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
- package/_types/chains/definitions/tempoModerato.d.ts +912 -0
- package/_types/chains/definitions/tempoModerato.d.ts.map +1 -0
- package/_types/chains/definitions/treasure.d.ts +14 -14
- package/_types/chains/definitions/treasureTopaz.d.ts +14 -14
- package/_types/chains/definitions/unichain.d.ts +3 -3
- package/_types/chains/definitions/unichainSepolia.d.ts +3 -3
- package/_types/chains/definitions/worldchain.d.ts +3 -3
- package/_types/chains/definitions/worldchainSepolia.d.ts +3 -3
- package/_types/chains/definitions/zircuit.d.ts +3 -3
- package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +3 -3
- package/_types/chains/definitions/zircuitTestnet.d.ts +3 -3
- package/_types/chains/definitions/zksync.d.ts +14 -14
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +14 -14
- package/_types/chains/definitions/zksyncLocalNode.d.ts +14 -14
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +14 -14
- package/_types/chains/definitions/zora.d.ts +3 -3
- package/_types/chains/definitions/zoraSepolia.d.ts +3 -3
- package/_types/chains/definitions/zoraTestnet.d.ts +3 -3
- package/_types/chains/index.d.ts +9 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +3 -3
- package/_types/op-stack/formatters.d.ts +3 -3
- package/_types/tempo/Abis.d.ts +937 -1194
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +1 -1
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +91 -85
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/actions/amm.d.ts +19 -360
- package/_types/tempo/actions/amm.d.ts.map +1 -1
- package/_types/tempo/actions/dex.d.ts +765 -237
- package/_types/tempo/actions/dex.d.ts.map +1 -1
- package/_types/tempo/actions/fee.d.ts +30 -11
- package/_types/tempo/actions/fee.d.ts.map +1 -1
- package/_types/tempo/actions/nonce.d.ts +0 -105
- package/_types/tempo/actions/nonce.d.ts.map +1 -1
- package/_types/tempo/actions/policy.d.ts +60 -0
- package/_types/tempo/actions/policy.d.ts.map +1 -1
- package/_types/tempo/actions/reward.d.ts +350 -526
- package/_types/tempo/actions/reward.d.ts.map +1 -1
- package/_types/tempo/actions/token.d.ts +368 -1984
- package/_types/tempo/actions/token.d.ts.map +1 -1
- package/_types/tempo/chainConfig.d.ts +16 -19
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/index.d.ts +1 -1
- package/_types/tempo/index.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/zksync/chainConfig.d.ts +14 -14
- package/_types/zksync/formatters.d.ts +14 -14
- package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +17 -2
- package/actions/wallet/sendTransactionSync.ts +1 -0
- package/chains/definitions/codex.ts +45 -0
- package/chains/definitions/codexTestnet.ts +45 -0
- package/chains/definitions/paseoPassetHub.ts +23 -0
- package/chains/definitions/{tempoTestnet.ts → tempoAndantino.ts} +3 -3
- package/chains/definitions/tempoDevnet.ts +6 -0
- package/chains/definitions/tempoModerato.ts +25 -0
- package/chains/index.ts +10 -1
- package/errors/version.ts +1 -1
- package/index.ts +9 -0
- package/package.json +2 -2
- package/tempo/Abis.ts +607 -752
- package/tempo/Addresses.ts +1 -1
- package/tempo/Decorator.ts +115 -106
- package/tempo/actions/amm.ts +13 -115
- package/tempo/actions/dex.ts +274 -72
- package/tempo/actions/nonce.ts +0 -148
- package/tempo/actions/reward.ts +310 -257
- package/tempo/actions/token.ts +16 -2
- package/tempo/chainConfig.ts +2 -9
- package/tempo/index.ts +1 -1
- package/_cjs/chains/definitions/tempoTestnet.js.map +0 -1
- package/_esm/chains/definitions/tempoTestnet.js.map +0 -1
|
@@ -328,10 +328,670 @@ export declare namespace cancel {
|
|
|
328
328
|
}];
|
|
329
329
|
readonly outputs: readonly [];
|
|
330
330
|
}, {
|
|
331
|
-
readonly name: "
|
|
331
|
+
readonly name: "cancelStaleOrder";
|
|
332
332
|
readonly type: "function";
|
|
333
333
|
readonly stateMutability: "nonpayable";
|
|
334
|
+
readonly inputs: readonly [{
|
|
335
|
+
readonly type: "uint128";
|
|
336
|
+
readonly name: "orderId";
|
|
337
|
+
}];
|
|
338
|
+
readonly outputs: readonly [];
|
|
339
|
+
}, {
|
|
340
|
+
readonly name: "swapExactAmountIn";
|
|
341
|
+
readonly type: "function";
|
|
342
|
+
readonly stateMutability: "nonpayable";
|
|
343
|
+
readonly inputs: readonly [{
|
|
344
|
+
readonly type: "address";
|
|
345
|
+
readonly name: "tokenIn";
|
|
346
|
+
}, {
|
|
347
|
+
readonly type: "address";
|
|
348
|
+
readonly name: "tokenOut";
|
|
349
|
+
}, {
|
|
350
|
+
readonly type: "uint128";
|
|
351
|
+
readonly name: "amountIn";
|
|
352
|
+
}, {
|
|
353
|
+
readonly type: "uint128";
|
|
354
|
+
readonly name: "minAmountOut";
|
|
355
|
+
}];
|
|
356
|
+
readonly outputs: readonly [{
|
|
357
|
+
readonly type: "uint128";
|
|
358
|
+
readonly name: "amountOut";
|
|
359
|
+
}];
|
|
360
|
+
}, {
|
|
361
|
+
readonly name: "swapExactAmountOut";
|
|
362
|
+
readonly type: "function";
|
|
363
|
+
readonly stateMutability: "nonpayable";
|
|
364
|
+
readonly inputs: readonly [{
|
|
365
|
+
readonly type: "address";
|
|
366
|
+
readonly name: "tokenIn";
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "address";
|
|
369
|
+
readonly name: "tokenOut";
|
|
370
|
+
}, {
|
|
371
|
+
readonly type: "uint128";
|
|
372
|
+
readonly name: "amountOut";
|
|
373
|
+
}, {
|
|
374
|
+
readonly type: "uint128";
|
|
375
|
+
readonly name: "maxAmountIn";
|
|
376
|
+
}];
|
|
377
|
+
readonly outputs: readonly [{
|
|
378
|
+
readonly type: "uint128";
|
|
379
|
+
readonly name: "amountIn";
|
|
380
|
+
}];
|
|
381
|
+
}, {
|
|
382
|
+
readonly name: "quoteSwapExactAmountIn";
|
|
383
|
+
readonly type: "function";
|
|
384
|
+
readonly stateMutability: "view";
|
|
385
|
+
readonly inputs: readonly [{
|
|
386
|
+
readonly type: "address";
|
|
387
|
+
readonly name: "tokenIn";
|
|
388
|
+
}, {
|
|
389
|
+
readonly type: "address";
|
|
390
|
+
readonly name: "tokenOut";
|
|
391
|
+
}, {
|
|
392
|
+
readonly type: "uint128";
|
|
393
|
+
readonly name: "amountIn";
|
|
394
|
+
}];
|
|
395
|
+
readonly outputs: readonly [{
|
|
396
|
+
readonly type: "uint128";
|
|
397
|
+
readonly name: "amountOut";
|
|
398
|
+
}];
|
|
399
|
+
}, {
|
|
400
|
+
readonly name: "quoteSwapExactAmountOut";
|
|
401
|
+
readonly type: "function";
|
|
402
|
+
readonly stateMutability: "view";
|
|
403
|
+
readonly inputs: readonly [{
|
|
404
|
+
readonly type: "address";
|
|
405
|
+
readonly name: "tokenIn";
|
|
406
|
+
}, {
|
|
407
|
+
readonly type: "address";
|
|
408
|
+
readonly name: "tokenOut";
|
|
409
|
+
}, {
|
|
410
|
+
readonly type: "uint128";
|
|
411
|
+
readonly name: "amountOut";
|
|
412
|
+
}];
|
|
413
|
+
readonly outputs: readonly [{
|
|
414
|
+
readonly type: "uint128";
|
|
415
|
+
readonly name: "amountIn";
|
|
416
|
+
}];
|
|
417
|
+
}, {
|
|
418
|
+
readonly name: "balanceOf";
|
|
419
|
+
readonly type: "function";
|
|
420
|
+
readonly stateMutability: "view";
|
|
421
|
+
readonly inputs: readonly [{
|
|
422
|
+
readonly type: "address";
|
|
423
|
+
readonly name: "user";
|
|
424
|
+
}, {
|
|
425
|
+
readonly type: "address";
|
|
426
|
+
readonly name: "token";
|
|
427
|
+
}];
|
|
428
|
+
readonly outputs: readonly [{
|
|
429
|
+
readonly type: "uint128";
|
|
430
|
+
}];
|
|
431
|
+
}, {
|
|
432
|
+
readonly name: "withdraw";
|
|
433
|
+
readonly type: "function";
|
|
434
|
+
readonly stateMutability: "nonpayable";
|
|
435
|
+
readonly inputs: readonly [{
|
|
436
|
+
readonly type: "address";
|
|
437
|
+
readonly name: "token";
|
|
438
|
+
}, {
|
|
439
|
+
readonly type: "uint128";
|
|
440
|
+
readonly name: "amount";
|
|
441
|
+
}];
|
|
442
|
+
readonly outputs: readonly [];
|
|
443
|
+
}, {
|
|
444
|
+
readonly name: "getOrder";
|
|
445
|
+
readonly type: "function";
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
readonly inputs: readonly [{
|
|
448
|
+
readonly type: "uint128";
|
|
449
|
+
readonly name: "orderId";
|
|
450
|
+
}];
|
|
451
|
+
readonly outputs: readonly [{
|
|
452
|
+
readonly type: "tuple";
|
|
453
|
+
readonly components: readonly [{
|
|
454
|
+
readonly type: "uint128";
|
|
455
|
+
readonly name: "orderId";
|
|
456
|
+
}, {
|
|
457
|
+
readonly type: "address";
|
|
458
|
+
readonly name: "maker";
|
|
459
|
+
}, {
|
|
460
|
+
readonly type: "bytes32";
|
|
461
|
+
readonly name: "bookKey";
|
|
462
|
+
}, {
|
|
463
|
+
readonly type: "bool";
|
|
464
|
+
readonly name: "isBid";
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "int16";
|
|
467
|
+
readonly name: "tick";
|
|
468
|
+
}, {
|
|
469
|
+
readonly type: "uint128";
|
|
470
|
+
readonly name: "amount";
|
|
471
|
+
}, {
|
|
472
|
+
readonly type: "uint128";
|
|
473
|
+
readonly name: "remaining";
|
|
474
|
+
}, {
|
|
475
|
+
readonly type: "uint128";
|
|
476
|
+
readonly name: "prev";
|
|
477
|
+
}, {
|
|
478
|
+
readonly type: "uint128";
|
|
479
|
+
readonly name: "next";
|
|
480
|
+
}, {
|
|
481
|
+
readonly type: "bool";
|
|
482
|
+
readonly name: "isFlip";
|
|
483
|
+
}, {
|
|
484
|
+
readonly type: "int16";
|
|
485
|
+
readonly name: "flipTick";
|
|
486
|
+
}];
|
|
487
|
+
}];
|
|
488
|
+
}, {
|
|
489
|
+
readonly name: "getTickLevel";
|
|
490
|
+
readonly type: "function";
|
|
491
|
+
readonly stateMutability: "view";
|
|
492
|
+
readonly inputs: readonly [{
|
|
493
|
+
readonly type: "address";
|
|
494
|
+
readonly name: "base";
|
|
495
|
+
}, {
|
|
496
|
+
readonly type: "int16";
|
|
497
|
+
readonly name: "tick";
|
|
498
|
+
}, {
|
|
499
|
+
readonly type: "bool";
|
|
500
|
+
readonly name: "isBid";
|
|
501
|
+
}];
|
|
502
|
+
readonly outputs: readonly [{
|
|
503
|
+
readonly type: "uint128";
|
|
504
|
+
readonly name: "head";
|
|
505
|
+
}, {
|
|
506
|
+
readonly type: "uint128";
|
|
507
|
+
readonly name: "tail";
|
|
508
|
+
}, {
|
|
509
|
+
readonly type: "uint128";
|
|
510
|
+
readonly name: "totalLiquidity";
|
|
511
|
+
}];
|
|
512
|
+
}, {
|
|
513
|
+
readonly name: "pairKey";
|
|
514
|
+
readonly type: "function";
|
|
515
|
+
readonly stateMutability: "pure";
|
|
516
|
+
readonly inputs: readonly [{
|
|
517
|
+
readonly type: "address";
|
|
518
|
+
readonly name: "tokenA";
|
|
519
|
+
}, {
|
|
520
|
+
readonly type: "address";
|
|
521
|
+
readonly name: "tokenB";
|
|
522
|
+
}];
|
|
523
|
+
readonly outputs: readonly [{
|
|
524
|
+
readonly type: "bytes32";
|
|
525
|
+
}];
|
|
526
|
+
}, {
|
|
527
|
+
readonly name: "nextOrderId";
|
|
528
|
+
readonly type: "function";
|
|
529
|
+
readonly stateMutability: "view";
|
|
530
|
+
readonly inputs: readonly [];
|
|
531
|
+
readonly outputs: readonly [{
|
|
532
|
+
readonly type: "uint128";
|
|
533
|
+
}];
|
|
534
|
+
}, {
|
|
535
|
+
readonly name: "books";
|
|
536
|
+
readonly type: "function";
|
|
537
|
+
readonly stateMutability: "view";
|
|
538
|
+
readonly inputs: readonly [{
|
|
539
|
+
readonly type: "bytes32";
|
|
540
|
+
readonly name: "pairKey";
|
|
541
|
+
}];
|
|
542
|
+
readonly outputs: readonly [{
|
|
543
|
+
readonly type: "tuple";
|
|
544
|
+
readonly components: readonly [{
|
|
545
|
+
readonly type: "address";
|
|
546
|
+
readonly name: "base";
|
|
547
|
+
}, {
|
|
548
|
+
readonly type: "address";
|
|
549
|
+
readonly name: "quote";
|
|
550
|
+
}, {
|
|
551
|
+
readonly type: "int16";
|
|
552
|
+
readonly name: "bestBidTick";
|
|
553
|
+
}, {
|
|
554
|
+
readonly type: "int16";
|
|
555
|
+
readonly name: "bestAskTick";
|
|
556
|
+
}];
|
|
557
|
+
}];
|
|
558
|
+
}, {
|
|
559
|
+
readonly name: "MIN_TICK";
|
|
560
|
+
readonly type: "function";
|
|
561
|
+
readonly stateMutability: "pure";
|
|
562
|
+
readonly inputs: readonly [];
|
|
563
|
+
readonly outputs: readonly [{
|
|
564
|
+
readonly type: "int16";
|
|
565
|
+
}];
|
|
566
|
+
}, {
|
|
567
|
+
readonly name: "MAX_TICK";
|
|
568
|
+
readonly type: "function";
|
|
569
|
+
readonly stateMutability: "pure";
|
|
570
|
+
readonly inputs: readonly [];
|
|
571
|
+
readonly outputs: readonly [{
|
|
572
|
+
readonly type: "int16";
|
|
573
|
+
}];
|
|
574
|
+
}, {
|
|
575
|
+
readonly name: "TICK_SPACING";
|
|
576
|
+
readonly type: "function";
|
|
577
|
+
readonly stateMutability: "pure";
|
|
578
|
+
readonly inputs: readonly [];
|
|
579
|
+
readonly outputs: readonly [{
|
|
580
|
+
readonly type: "int16";
|
|
581
|
+
}];
|
|
582
|
+
}, {
|
|
583
|
+
readonly name: "PRICE_SCALE";
|
|
584
|
+
readonly type: "function";
|
|
585
|
+
readonly stateMutability: "pure";
|
|
586
|
+
readonly inputs: readonly [];
|
|
587
|
+
readonly outputs: readonly [{
|
|
588
|
+
readonly type: "uint32";
|
|
589
|
+
}];
|
|
590
|
+
}, {
|
|
591
|
+
readonly name: "MIN_ORDER_AMOUNT";
|
|
592
|
+
readonly type: "function";
|
|
593
|
+
readonly stateMutability: "pure";
|
|
594
|
+
readonly inputs: readonly [];
|
|
595
|
+
readonly outputs: readonly [{
|
|
596
|
+
readonly type: "uint128";
|
|
597
|
+
}];
|
|
598
|
+
}, {
|
|
599
|
+
readonly name: "MIN_PRICE";
|
|
600
|
+
readonly type: "function";
|
|
601
|
+
readonly stateMutability: "pure";
|
|
602
|
+
readonly inputs: readonly [];
|
|
603
|
+
readonly outputs: readonly [{
|
|
604
|
+
readonly type: "uint32";
|
|
605
|
+
}];
|
|
606
|
+
}, {
|
|
607
|
+
readonly name: "MAX_PRICE";
|
|
608
|
+
readonly type: "function";
|
|
609
|
+
readonly stateMutability: "pure";
|
|
610
|
+
readonly inputs: readonly [];
|
|
611
|
+
readonly outputs: readonly [{
|
|
612
|
+
readonly type: "uint32";
|
|
613
|
+
}];
|
|
614
|
+
}, {
|
|
615
|
+
readonly name: "tickToPrice";
|
|
616
|
+
readonly type: "function";
|
|
617
|
+
readonly stateMutability: "pure";
|
|
618
|
+
readonly inputs: readonly [{
|
|
619
|
+
readonly type: "int16";
|
|
620
|
+
readonly name: "tick";
|
|
621
|
+
}];
|
|
622
|
+
readonly outputs: readonly [{
|
|
623
|
+
readonly type: "uint32";
|
|
624
|
+
readonly name: "price";
|
|
625
|
+
}];
|
|
626
|
+
}, {
|
|
627
|
+
readonly name: "priceToTick";
|
|
628
|
+
readonly type: "function";
|
|
629
|
+
readonly stateMutability: "pure";
|
|
630
|
+
readonly inputs: readonly [{
|
|
631
|
+
readonly type: "uint32";
|
|
632
|
+
readonly name: "price";
|
|
633
|
+
}];
|
|
634
|
+
readonly outputs: readonly [{
|
|
635
|
+
readonly type: "int16";
|
|
636
|
+
readonly name: "tick";
|
|
637
|
+
}];
|
|
638
|
+
}, {
|
|
639
|
+
readonly name: "PairCreated";
|
|
640
|
+
readonly type: "event";
|
|
641
|
+
readonly inputs: readonly [{
|
|
642
|
+
readonly type: "bytes32";
|
|
643
|
+
readonly name: "key";
|
|
644
|
+
readonly indexed: true;
|
|
645
|
+
}, {
|
|
646
|
+
readonly type: "address";
|
|
647
|
+
readonly name: "base";
|
|
648
|
+
readonly indexed: true;
|
|
649
|
+
}, {
|
|
650
|
+
readonly type: "address";
|
|
651
|
+
readonly name: "quote";
|
|
652
|
+
readonly indexed: true;
|
|
653
|
+
}];
|
|
654
|
+
}, {
|
|
655
|
+
readonly name: "OrderPlaced";
|
|
656
|
+
readonly type: "event";
|
|
657
|
+
readonly inputs: readonly [{
|
|
658
|
+
readonly type: "uint128";
|
|
659
|
+
readonly name: "orderId";
|
|
660
|
+
readonly indexed: true;
|
|
661
|
+
}, {
|
|
662
|
+
readonly type: "address";
|
|
663
|
+
readonly name: "maker";
|
|
664
|
+
readonly indexed: true;
|
|
665
|
+
}, {
|
|
666
|
+
readonly type: "address";
|
|
667
|
+
readonly name: "token";
|
|
668
|
+
readonly indexed: true;
|
|
669
|
+
}, {
|
|
670
|
+
readonly type: "uint128";
|
|
671
|
+
readonly name: "amount";
|
|
672
|
+
}, {
|
|
673
|
+
readonly type: "bool";
|
|
674
|
+
readonly name: "isBid";
|
|
675
|
+
}, {
|
|
676
|
+
readonly type: "int16";
|
|
677
|
+
readonly name: "tick";
|
|
678
|
+
}, {
|
|
679
|
+
readonly type: "bool";
|
|
680
|
+
readonly name: "isFlipOrder";
|
|
681
|
+
}, {
|
|
682
|
+
readonly type: "int16";
|
|
683
|
+
readonly name: "flipTick";
|
|
684
|
+
}];
|
|
685
|
+
}, {
|
|
686
|
+
readonly name: "OrderFilled";
|
|
687
|
+
readonly type: "event";
|
|
688
|
+
readonly inputs: readonly [{
|
|
689
|
+
readonly type: "uint128";
|
|
690
|
+
readonly name: "orderId";
|
|
691
|
+
readonly indexed: true;
|
|
692
|
+
}, {
|
|
693
|
+
readonly type: "address";
|
|
694
|
+
readonly name: "maker";
|
|
695
|
+
readonly indexed: true;
|
|
696
|
+
}, {
|
|
697
|
+
readonly type: "address";
|
|
698
|
+
readonly name: "taker";
|
|
699
|
+
readonly indexed: true;
|
|
700
|
+
}, {
|
|
701
|
+
readonly type: "uint128";
|
|
702
|
+
readonly name: "amountFilled";
|
|
703
|
+
}, {
|
|
704
|
+
readonly type: "bool";
|
|
705
|
+
readonly name: "partialFill";
|
|
706
|
+
}];
|
|
707
|
+
}, {
|
|
708
|
+
readonly name: "OrderCancelled";
|
|
709
|
+
readonly type: "event";
|
|
710
|
+
readonly inputs: readonly [{
|
|
711
|
+
readonly type: "uint128";
|
|
712
|
+
readonly name: "orderId";
|
|
713
|
+
readonly indexed: true;
|
|
714
|
+
}];
|
|
715
|
+
}, {
|
|
716
|
+
readonly name: "Unauthorized";
|
|
717
|
+
readonly type: "error";
|
|
718
|
+
readonly inputs: readonly [];
|
|
719
|
+
}, {
|
|
720
|
+
readonly name: "PairDoesNotExist";
|
|
721
|
+
readonly type: "error";
|
|
722
|
+
readonly inputs: readonly [];
|
|
723
|
+
}, {
|
|
724
|
+
readonly name: "PairAlreadyExists";
|
|
725
|
+
readonly type: "error";
|
|
726
|
+
readonly inputs: readonly [];
|
|
727
|
+
}, {
|
|
728
|
+
readonly name: "OrderDoesNotExist";
|
|
729
|
+
readonly type: "error";
|
|
730
|
+
readonly inputs: readonly [];
|
|
731
|
+
}, {
|
|
732
|
+
readonly name: "IdenticalTokens";
|
|
733
|
+
readonly type: "error";
|
|
734
|
+
readonly inputs: readonly [];
|
|
735
|
+
}, {
|
|
736
|
+
readonly name: "InvalidToken";
|
|
737
|
+
readonly type: "error";
|
|
738
|
+
readonly inputs: readonly [];
|
|
739
|
+
}, {
|
|
740
|
+
readonly name: "TickOutOfBounds";
|
|
741
|
+
readonly type: "error";
|
|
742
|
+
readonly inputs: readonly [{
|
|
743
|
+
readonly type: "int16";
|
|
744
|
+
readonly name: "tick";
|
|
745
|
+
}];
|
|
746
|
+
}, {
|
|
747
|
+
readonly name: "InvalidTick";
|
|
748
|
+
readonly type: "error";
|
|
749
|
+
readonly inputs: readonly [];
|
|
750
|
+
}, {
|
|
751
|
+
readonly name: "InvalidFlipTick";
|
|
752
|
+
readonly type: "error";
|
|
753
|
+
readonly inputs: readonly [];
|
|
754
|
+
}, {
|
|
755
|
+
readonly name: "InsufficientBalance";
|
|
756
|
+
readonly type: "error";
|
|
757
|
+
readonly inputs: readonly [];
|
|
758
|
+
}, {
|
|
759
|
+
readonly name: "InsufficientLiquidity";
|
|
760
|
+
readonly type: "error";
|
|
761
|
+
readonly inputs: readonly [];
|
|
762
|
+
}, {
|
|
763
|
+
readonly name: "InsufficientOutput";
|
|
764
|
+
readonly type: "error";
|
|
765
|
+
readonly inputs: readonly [];
|
|
766
|
+
}, {
|
|
767
|
+
readonly name: "MaxInputExceeded";
|
|
768
|
+
readonly type: "error";
|
|
769
|
+
readonly inputs: readonly [];
|
|
770
|
+
}, {
|
|
771
|
+
readonly name: "BelowMinimumOrderSize";
|
|
772
|
+
readonly type: "error";
|
|
773
|
+
readonly inputs: readonly [{
|
|
774
|
+
readonly type: "uint128";
|
|
775
|
+
readonly name: "amount";
|
|
776
|
+
}];
|
|
777
|
+
}, {
|
|
778
|
+
readonly name: "InvalidBaseToken";
|
|
779
|
+
readonly type: "error";
|
|
780
|
+
readonly inputs: readonly [];
|
|
781
|
+
}, {
|
|
782
|
+
readonly name: "OrderNotStale";
|
|
783
|
+
readonly type: "error";
|
|
334
784
|
readonly inputs: readonly [];
|
|
785
|
+
}], "OrderCancelled">;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Cancels an order from the orderbook.
|
|
789
|
+
*
|
|
790
|
+
* @example
|
|
791
|
+
* ```ts
|
|
792
|
+
* import { createClient, http } from 'viem'
|
|
793
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
794
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
795
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
796
|
+
*
|
|
797
|
+
* const client = createClient({
|
|
798
|
+
* account: privateKeyToAccount('0x...'),
|
|
799
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
800
|
+
* transport: http(),
|
|
801
|
+
* })
|
|
802
|
+
*
|
|
803
|
+
* const result = await Actions.dex.cancelSync(client, {
|
|
804
|
+
* orderId: 123n,
|
|
805
|
+
* })
|
|
806
|
+
* ```
|
|
807
|
+
*
|
|
808
|
+
* @param client - Client.
|
|
809
|
+
* @param parameters - Parameters.
|
|
810
|
+
* @returns The transaction receipt and event data.
|
|
811
|
+
*/
|
|
812
|
+
export declare function cancelSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: cancelSync.Parameters<chain, account>): Promise<cancelSync.ReturnValue>;
|
|
813
|
+
export declare namespace cancelSync {
|
|
814
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = cancel.Parameters<chain, account>;
|
|
815
|
+
type Args = cancel.Args;
|
|
816
|
+
type ReturnValue = Compute<GetEventArgs<typeof Abis.stablecoinDex, 'OrderCancelled', {
|
|
817
|
+
IndexedOnly: false;
|
|
818
|
+
Required: true;
|
|
819
|
+
}> & {
|
|
820
|
+
/** Transaction receipt. */
|
|
821
|
+
receipt: TransactionReceipt;
|
|
822
|
+
}>;
|
|
823
|
+
type ErrorType = BaseErrorType;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Cancels a stale order from the orderbook.
|
|
827
|
+
*
|
|
828
|
+
* A stale order is one where the owner's balance or allowance has dropped
|
|
829
|
+
* below the order amount.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* ```ts
|
|
833
|
+
* import { createClient, http } from 'viem'
|
|
834
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
835
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
836
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
837
|
+
*
|
|
838
|
+
* const client = createClient({
|
|
839
|
+
* account: privateKeyToAccount('0x...'),
|
|
840
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
841
|
+
* transport: http(),
|
|
842
|
+
* })
|
|
843
|
+
*
|
|
844
|
+
* const hash = await Actions.dex.cancelStale(client, {
|
|
845
|
+
* orderId: 123n,
|
|
846
|
+
* })
|
|
847
|
+
* ```
|
|
848
|
+
*
|
|
849
|
+
* @param client - Client.
|
|
850
|
+
* @param parameters - Parameters.
|
|
851
|
+
* @returns The transaction hash.
|
|
852
|
+
*/
|
|
853
|
+
export declare function cancelStale<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: cancelStale.Parameters<chain, account>): Promise<cancelStale.ReturnValue>;
|
|
854
|
+
export declare namespace cancelStale {
|
|
855
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
856
|
+
type Args = {
|
|
857
|
+
/** Order ID to cancel. */
|
|
858
|
+
orderId: bigint;
|
|
859
|
+
};
|
|
860
|
+
type ReturnValue = WriteContractReturnType;
|
|
861
|
+
type ErrorType = BaseErrorType;
|
|
862
|
+
/** @internal */
|
|
863
|
+
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: cancelStale.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
864
|
+
/**
|
|
865
|
+
* Defines a call to the `cancelStaleOrder` function.
|
|
866
|
+
*
|
|
867
|
+
* Can be passed as a parameter to:
|
|
868
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
869
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
870
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
871
|
+
*
|
|
872
|
+
* @example
|
|
873
|
+
* ```ts
|
|
874
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
875
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
876
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
877
|
+
*
|
|
878
|
+
* const client = createClient({
|
|
879
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
880
|
+
* transport: http(),
|
|
881
|
+
* }).extend(walletActions)
|
|
882
|
+
*
|
|
883
|
+
* const { result } = await client.sendCalls({
|
|
884
|
+
* calls: [
|
|
885
|
+
* Actions.dex.cancelStale.call({
|
|
886
|
+
* orderId: 123n,
|
|
887
|
+
* }),
|
|
888
|
+
* ]
|
|
889
|
+
* })
|
|
890
|
+
* ```
|
|
891
|
+
*
|
|
892
|
+
* @param args - Arguments.
|
|
893
|
+
* @returns The call.
|
|
894
|
+
*/
|
|
895
|
+
function call(args: Args): {
|
|
896
|
+
abi: [{
|
|
897
|
+
readonly name: "cancelStaleOrder";
|
|
898
|
+
readonly type: "function";
|
|
899
|
+
readonly stateMutability: "nonpayable";
|
|
900
|
+
readonly inputs: readonly [{
|
|
901
|
+
readonly type: "uint128";
|
|
902
|
+
readonly name: "orderId";
|
|
903
|
+
}];
|
|
904
|
+
readonly outputs: readonly [];
|
|
905
|
+
}];
|
|
906
|
+
functionName: "cancelStaleOrder";
|
|
907
|
+
} & {
|
|
908
|
+
args: readonly [orderId: bigint];
|
|
909
|
+
} & {
|
|
910
|
+
address: Address;
|
|
911
|
+
} & {
|
|
912
|
+
data: import("../../index.js").Hex;
|
|
913
|
+
to: Address;
|
|
914
|
+
};
|
|
915
|
+
/**
|
|
916
|
+
* Extracts the `OrderCancelled` event from logs.
|
|
917
|
+
*
|
|
918
|
+
* @param logs - The logs.
|
|
919
|
+
* @returns The `OrderCancelled` event.
|
|
920
|
+
*/
|
|
921
|
+
function extractEvent(logs: viem_Log[]): viem_Log<bigint, number, false, undefined, true, readonly [{
|
|
922
|
+
readonly name: "createPair";
|
|
923
|
+
readonly type: "function";
|
|
924
|
+
readonly stateMutability: "nonpayable";
|
|
925
|
+
readonly inputs: readonly [{
|
|
926
|
+
readonly type: "address";
|
|
927
|
+
readonly name: "base";
|
|
928
|
+
}];
|
|
929
|
+
readonly outputs: readonly [{
|
|
930
|
+
readonly type: "bytes32";
|
|
931
|
+
readonly name: "key";
|
|
932
|
+
}];
|
|
933
|
+
}, {
|
|
934
|
+
readonly name: "place";
|
|
935
|
+
readonly type: "function";
|
|
936
|
+
readonly stateMutability: "nonpayable";
|
|
937
|
+
readonly inputs: readonly [{
|
|
938
|
+
readonly type: "address";
|
|
939
|
+
readonly name: "token";
|
|
940
|
+
}, {
|
|
941
|
+
readonly type: "uint128";
|
|
942
|
+
readonly name: "amount";
|
|
943
|
+
}, {
|
|
944
|
+
readonly type: "bool";
|
|
945
|
+
readonly name: "isBid";
|
|
946
|
+
}, {
|
|
947
|
+
readonly type: "int16";
|
|
948
|
+
readonly name: "tick";
|
|
949
|
+
}];
|
|
950
|
+
readonly outputs: readonly [{
|
|
951
|
+
readonly type: "uint128";
|
|
952
|
+
readonly name: "orderId";
|
|
953
|
+
}];
|
|
954
|
+
}, {
|
|
955
|
+
readonly name: "placeFlip";
|
|
956
|
+
readonly type: "function";
|
|
957
|
+
readonly stateMutability: "nonpayable";
|
|
958
|
+
readonly inputs: readonly [{
|
|
959
|
+
readonly type: "address";
|
|
960
|
+
readonly name: "token";
|
|
961
|
+
}, {
|
|
962
|
+
readonly type: "uint128";
|
|
963
|
+
readonly name: "amount";
|
|
964
|
+
}, {
|
|
965
|
+
readonly type: "bool";
|
|
966
|
+
readonly name: "isBid";
|
|
967
|
+
}, {
|
|
968
|
+
readonly type: "int16";
|
|
969
|
+
readonly name: "tick";
|
|
970
|
+
}, {
|
|
971
|
+
readonly type: "int16";
|
|
972
|
+
readonly name: "flipTick";
|
|
973
|
+
}];
|
|
974
|
+
readonly outputs: readonly [{
|
|
975
|
+
readonly type: "uint128";
|
|
976
|
+
readonly name: "orderId";
|
|
977
|
+
}];
|
|
978
|
+
}, {
|
|
979
|
+
readonly name: "cancel";
|
|
980
|
+
readonly type: "function";
|
|
981
|
+
readonly stateMutability: "nonpayable";
|
|
982
|
+
readonly inputs: readonly [{
|
|
983
|
+
readonly type: "uint128";
|
|
984
|
+
readonly name: "orderId";
|
|
985
|
+
}];
|
|
986
|
+
readonly outputs: readonly [];
|
|
987
|
+
}, {
|
|
988
|
+
readonly name: "cancelStaleOrder";
|
|
989
|
+
readonly type: "function";
|
|
990
|
+
readonly stateMutability: "nonpayable";
|
|
991
|
+
readonly inputs: readonly [{
|
|
992
|
+
readonly type: "uint128";
|
|
993
|
+
readonly name: "orderId";
|
|
994
|
+
}];
|
|
335
995
|
readonly outputs: readonly [];
|
|
336
996
|
}, {
|
|
337
997
|
readonly name: "swapExactAmountIn";
|
|
@@ -521,15 +1181,7 @@ export declare namespace cancel {
|
|
|
521
1181
|
readonly type: "bytes32";
|
|
522
1182
|
}];
|
|
523
1183
|
}, {
|
|
524
|
-
readonly name: "
|
|
525
|
-
readonly type: "function";
|
|
526
|
-
readonly stateMutability: "view";
|
|
527
|
-
readonly inputs: readonly [];
|
|
528
|
-
readonly outputs: readonly [{
|
|
529
|
-
readonly type: "uint128";
|
|
530
|
-
}];
|
|
531
|
-
}, {
|
|
532
|
-
readonly name: "pendingOrderId";
|
|
1184
|
+
readonly name: "nextOrderId";
|
|
533
1185
|
readonly type: "function";
|
|
534
1186
|
readonly stateMutability: "view";
|
|
535
1187
|
readonly inputs: readonly [];
|
|
@@ -592,6 +1244,14 @@ export declare namespace cancel {
|
|
|
592
1244
|
readonly outputs: readonly [{
|
|
593
1245
|
readonly type: "uint32";
|
|
594
1246
|
}];
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly name: "MIN_ORDER_AMOUNT";
|
|
1249
|
+
readonly type: "function";
|
|
1250
|
+
readonly stateMutability: "pure";
|
|
1251
|
+
readonly inputs: readonly [];
|
|
1252
|
+
readonly outputs: readonly [{
|
|
1253
|
+
readonly type: "uint128";
|
|
1254
|
+
}];
|
|
595
1255
|
}, {
|
|
596
1256
|
readonly name: "MIN_PRICE";
|
|
597
1257
|
readonly type: "function";
|
|
@@ -672,53 +1332,13 @@ export declare namespace cancel {
|
|
|
672
1332
|
}, {
|
|
673
1333
|
readonly type: "int16";
|
|
674
1334
|
readonly name: "tick";
|
|
675
|
-
}];
|
|
676
|
-
}, {
|
|
677
|
-
readonly name: "FlipOrderPlaced";
|
|
678
|
-
readonly type: "event";
|
|
679
|
-
readonly inputs: readonly [{
|
|
680
|
-
readonly type: "uint128";
|
|
681
|
-
readonly name: "orderId";
|
|
682
|
-
readonly indexed: true;
|
|
683
|
-
}, {
|
|
684
|
-
readonly type: "address";
|
|
685
|
-
readonly name: "maker";
|
|
686
|
-
readonly indexed: true;
|
|
687
|
-
}, {
|
|
688
|
-
readonly type: "address";
|
|
689
|
-
readonly name: "token";
|
|
690
|
-
readonly indexed: true;
|
|
691
|
-
}, {
|
|
692
|
-
readonly type: "uint128";
|
|
693
|
-
readonly name: "amount";
|
|
694
1335
|
}, {
|
|
695
1336
|
readonly type: "bool";
|
|
696
|
-
readonly name: "
|
|
697
|
-
}, {
|
|
698
|
-
readonly type: "int16";
|
|
699
|
-
readonly name: "tick";
|
|
1337
|
+
readonly name: "isFlipOrder";
|
|
700
1338
|
}, {
|
|
701
1339
|
readonly type: "int16";
|
|
702
1340
|
readonly name: "flipTick";
|
|
703
1341
|
}];
|
|
704
|
-
}, {
|
|
705
|
-
readonly name: "OrderFilled";
|
|
706
|
-
readonly type: "event";
|
|
707
|
-
readonly inputs: readonly [{
|
|
708
|
-
readonly type: "uint128";
|
|
709
|
-
readonly name: "orderId";
|
|
710
|
-
readonly indexed: true;
|
|
711
|
-
}, {
|
|
712
|
-
readonly type: "address";
|
|
713
|
-
readonly name: "maker";
|
|
714
|
-
readonly indexed: true;
|
|
715
|
-
}, {
|
|
716
|
-
readonly type: "uint128";
|
|
717
|
-
readonly name: "amountFilled";
|
|
718
|
-
}, {
|
|
719
|
-
readonly type: "bool";
|
|
720
|
-
readonly name: "partialFill";
|
|
721
|
-
}];
|
|
722
1342
|
}, {
|
|
723
1343
|
readonly name: "OrderFilled";
|
|
724
1344
|
readonly type: "event";
|
|
@@ -815,10 +1435,17 @@ export declare namespace cancel {
|
|
|
815
1435
|
readonly name: "InvalidBaseToken";
|
|
816
1436
|
readonly type: "error";
|
|
817
1437
|
readonly inputs: readonly [];
|
|
1438
|
+
}, {
|
|
1439
|
+
readonly name: "OrderNotStale";
|
|
1440
|
+
readonly type: "error";
|
|
1441
|
+
readonly inputs: readonly [];
|
|
818
1442
|
}], "OrderCancelled">;
|
|
819
1443
|
}
|
|
820
1444
|
/**
|
|
821
|
-
* Cancels
|
|
1445
|
+
* Cancels a stale order from the orderbook and waits for confirmation.
|
|
1446
|
+
*
|
|
1447
|
+
* A stale order is one where the owner's balance or allowance has dropped
|
|
1448
|
+
* below the order amount.
|
|
822
1449
|
*
|
|
823
1450
|
* @example
|
|
824
1451
|
* ```ts
|
|
@@ -833,7 +1460,7 @@ export declare namespace cancel {
|
|
|
833
1460
|
* transport: http(),
|
|
834
1461
|
* })
|
|
835
1462
|
*
|
|
836
|
-
* const result = await Actions.dex.
|
|
1463
|
+
* const result = await Actions.dex.cancelStaleSync(client, {
|
|
837
1464
|
* orderId: 123n,
|
|
838
1465
|
* })
|
|
839
1466
|
* ```
|
|
@@ -842,11 +1469,11 @@ export declare namespace cancel {
|
|
|
842
1469
|
* @param parameters - Parameters.
|
|
843
1470
|
* @returns The transaction receipt and event data.
|
|
844
1471
|
*/
|
|
845
|
-
export declare function
|
|
846
|
-
export declare namespace
|
|
847
|
-
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> =
|
|
848
|
-
type Args =
|
|
849
|
-
type ReturnValue = Compute<GetEventArgs<typeof Abis.
|
|
1472
|
+
export declare function cancelStaleSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: cancelStaleSync.Parameters<chain, account>): Promise<cancelStaleSync.ReturnValue>;
|
|
1473
|
+
export declare namespace cancelStaleSync {
|
|
1474
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = cancelStale.Parameters<chain, account>;
|
|
1475
|
+
type Args = cancelStale.Args;
|
|
1476
|
+
type ReturnValue = Compute<GetEventArgs<typeof Abis.stablecoinDex, 'OrderCancelled', {
|
|
850
1477
|
IndexedOnly: false;
|
|
851
1478
|
Required: true;
|
|
852
1479
|
}> & {
|
|
@@ -1018,10 +1645,13 @@ export declare namespace createPair {
|
|
|
1018
1645
|
}];
|
|
1019
1646
|
readonly outputs: readonly [];
|
|
1020
1647
|
}, {
|
|
1021
|
-
readonly name: "
|
|
1648
|
+
readonly name: "cancelStaleOrder";
|
|
1022
1649
|
readonly type: "function";
|
|
1023
1650
|
readonly stateMutability: "nonpayable";
|
|
1024
|
-
readonly inputs: readonly [
|
|
1651
|
+
readonly inputs: readonly [{
|
|
1652
|
+
readonly type: "uint128";
|
|
1653
|
+
readonly name: "orderId";
|
|
1654
|
+
}];
|
|
1025
1655
|
readonly outputs: readonly [];
|
|
1026
1656
|
}, {
|
|
1027
1657
|
readonly name: "swapExactAmountIn";
|
|
@@ -1211,15 +1841,7 @@ export declare namespace createPair {
|
|
|
1211
1841
|
readonly type: "bytes32";
|
|
1212
1842
|
}];
|
|
1213
1843
|
}, {
|
|
1214
|
-
readonly name: "
|
|
1215
|
-
readonly type: "function";
|
|
1216
|
-
readonly stateMutability: "view";
|
|
1217
|
-
readonly inputs: readonly [];
|
|
1218
|
-
readonly outputs: readonly [{
|
|
1219
|
-
readonly type: "uint128";
|
|
1220
|
-
}];
|
|
1221
|
-
}, {
|
|
1222
|
-
readonly name: "pendingOrderId";
|
|
1844
|
+
readonly name: "nextOrderId";
|
|
1223
1845
|
readonly type: "function";
|
|
1224
1846
|
readonly stateMutability: "view";
|
|
1225
1847
|
readonly inputs: readonly [];
|
|
@@ -1282,6 +1904,14 @@ export declare namespace createPair {
|
|
|
1282
1904
|
readonly outputs: readonly [{
|
|
1283
1905
|
readonly type: "uint32";
|
|
1284
1906
|
}];
|
|
1907
|
+
}, {
|
|
1908
|
+
readonly name: "MIN_ORDER_AMOUNT";
|
|
1909
|
+
readonly type: "function";
|
|
1910
|
+
readonly stateMutability: "pure";
|
|
1911
|
+
readonly inputs: readonly [];
|
|
1912
|
+
readonly outputs: readonly [{
|
|
1913
|
+
readonly type: "uint128";
|
|
1914
|
+
}];
|
|
1285
1915
|
}, {
|
|
1286
1916
|
readonly name: "MIN_PRICE";
|
|
1287
1917
|
readonly type: "function";
|
|
@@ -1362,53 +1992,13 @@ export declare namespace createPair {
|
|
|
1362
1992
|
}, {
|
|
1363
1993
|
readonly type: "int16";
|
|
1364
1994
|
readonly name: "tick";
|
|
1365
|
-
}];
|
|
1366
|
-
}, {
|
|
1367
|
-
readonly name: "FlipOrderPlaced";
|
|
1368
|
-
readonly type: "event";
|
|
1369
|
-
readonly inputs: readonly [{
|
|
1370
|
-
readonly type: "uint128";
|
|
1371
|
-
readonly name: "orderId";
|
|
1372
|
-
readonly indexed: true;
|
|
1373
|
-
}, {
|
|
1374
|
-
readonly type: "address";
|
|
1375
|
-
readonly name: "maker";
|
|
1376
|
-
readonly indexed: true;
|
|
1377
|
-
}, {
|
|
1378
|
-
readonly type: "address";
|
|
1379
|
-
readonly name: "token";
|
|
1380
|
-
readonly indexed: true;
|
|
1381
|
-
}, {
|
|
1382
|
-
readonly type: "uint128";
|
|
1383
|
-
readonly name: "amount";
|
|
1384
1995
|
}, {
|
|
1385
1996
|
readonly type: "bool";
|
|
1386
|
-
readonly name: "
|
|
1387
|
-
}, {
|
|
1388
|
-
readonly type: "int16";
|
|
1389
|
-
readonly name: "tick";
|
|
1997
|
+
readonly name: "isFlipOrder";
|
|
1390
1998
|
}, {
|
|
1391
1999
|
readonly type: "int16";
|
|
1392
2000
|
readonly name: "flipTick";
|
|
1393
2001
|
}];
|
|
1394
|
-
}, {
|
|
1395
|
-
readonly name: "OrderFilled";
|
|
1396
|
-
readonly type: "event";
|
|
1397
|
-
readonly inputs: readonly [{
|
|
1398
|
-
readonly type: "uint128";
|
|
1399
|
-
readonly name: "orderId";
|
|
1400
|
-
readonly indexed: true;
|
|
1401
|
-
}, {
|
|
1402
|
-
readonly type: "address";
|
|
1403
|
-
readonly name: "maker";
|
|
1404
|
-
readonly indexed: true;
|
|
1405
|
-
}, {
|
|
1406
|
-
readonly type: "uint128";
|
|
1407
|
-
readonly name: "amountFilled";
|
|
1408
|
-
}, {
|
|
1409
|
-
readonly type: "bool";
|
|
1410
|
-
readonly name: "partialFill";
|
|
1411
|
-
}];
|
|
1412
2002
|
}, {
|
|
1413
2003
|
readonly name: "OrderFilled";
|
|
1414
2004
|
readonly type: "event";
|
|
@@ -1505,6 +2095,10 @@ export declare namespace createPair {
|
|
|
1505
2095
|
readonly name: "InvalidBaseToken";
|
|
1506
2096
|
readonly type: "error";
|
|
1507
2097
|
readonly inputs: readonly [];
|
|
2098
|
+
}, {
|
|
2099
|
+
readonly name: "OrderNotStale";
|
|
2100
|
+
readonly type: "error";
|
|
2101
|
+
readonly inputs: readonly [];
|
|
1508
2102
|
}], "PairCreated">;
|
|
1509
2103
|
}
|
|
1510
2104
|
/**
|
|
@@ -1536,7 +2130,7 @@ export declare function createPairSync<chain extends Chain | undefined, account
|
|
|
1536
2130
|
export declare namespace createPairSync {
|
|
1537
2131
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = createPair.Parameters<chain, account>;
|
|
1538
2132
|
type Args = createPair.Args;
|
|
1539
|
-
type ReturnValue = Compute<GetEventArgs<typeof Abis.
|
|
2133
|
+
type ReturnValue = Compute<GetEventArgs<typeof Abis.stablecoinDex, 'PairCreated', {
|
|
1540
2134
|
IndexedOnly: false;
|
|
1541
2135
|
Required: true;
|
|
1542
2136
|
}> & {
|
|
@@ -1578,7 +2172,7 @@ export declare namespace getBalance {
|
|
|
1578
2172
|
/** Address of the token. */
|
|
1579
2173
|
token: Address;
|
|
1580
2174
|
};
|
|
1581
|
-
type ReturnValue = ReadContractReturnType<typeof Abis.
|
|
2175
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinDex, 'balanceOf', never>;
|
|
1582
2176
|
/**
|
|
1583
2177
|
* Defines a call to the `balanceOf` function.
|
|
1584
2178
|
*
|
|
@@ -1647,7 +2241,7 @@ export declare namespace getBuyQuote {
|
|
|
1647
2241
|
/** Address of the token to buy. */
|
|
1648
2242
|
tokenOut: Address;
|
|
1649
2243
|
};
|
|
1650
|
-
type ReturnValue = ReadContractReturnType<typeof Abis.
|
|
2244
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinDex, 'quoteSwapExactAmountOut', never>;
|
|
1651
2245
|
/**
|
|
1652
2246
|
* Defines a call to the `quoteSwapExactAmountOut` function.
|
|
1653
2247
|
*
|
|
@@ -1714,7 +2308,7 @@ export declare namespace getOrder {
|
|
|
1714
2308
|
/** Order ID to query. */
|
|
1715
2309
|
orderId: bigint;
|
|
1716
2310
|
};
|
|
1717
|
-
type ReturnValue = ReadContractReturnType<typeof Abis.
|
|
2311
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinDex, 'getOrder', never>;
|
|
1718
2312
|
/**
|
|
1719
2313
|
* Defines a call to the `getOrder` function.
|
|
1720
2314
|
*
|
|
@@ -1811,7 +2405,7 @@ export declare namespace getOrderbook {
|
|
|
1811
2405
|
/** Address of the quote token. */
|
|
1812
2406
|
quote: Address;
|
|
1813
2407
|
};
|
|
1814
|
-
type ReturnValue = ReadContractReturnType<typeof Abis.
|
|
2408
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinDex, 'books', never>;
|
|
1815
2409
|
/**
|
|
1816
2410
|
* Defines a call to the `books` function.
|
|
1817
2411
|
*
|
|
@@ -1976,7 +2570,7 @@ export declare namespace getSellQuote {
|
|
|
1976
2570
|
/** Address of the token to receive. */
|
|
1977
2571
|
tokenOut: Address;
|
|
1978
2572
|
};
|
|
1979
|
-
type ReturnValue = ReadContractReturnType<typeof Abis.
|
|
2573
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.stablecoinDex, 'quoteSwapExactAmountIn', never>;
|
|
1980
2574
|
/**
|
|
1981
2575
|
* Defines a call to the `quoteSwapExactAmountIn` function.
|
|
1982
2576
|
*
|
|
@@ -2197,10 +2791,13 @@ export declare namespace place {
|
|
|
2197
2791
|
}];
|
|
2198
2792
|
readonly outputs: readonly [];
|
|
2199
2793
|
}, {
|
|
2200
|
-
readonly name: "
|
|
2794
|
+
readonly name: "cancelStaleOrder";
|
|
2201
2795
|
readonly type: "function";
|
|
2202
2796
|
readonly stateMutability: "nonpayable";
|
|
2203
|
-
readonly inputs: readonly [
|
|
2797
|
+
readonly inputs: readonly [{
|
|
2798
|
+
readonly type: "uint128";
|
|
2799
|
+
readonly name: "orderId";
|
|
2800
|
+
}];
|
|
2204
2801
|
readonly outputs: readonly [];
|
|
2205
2802
|
}, {
|
|
2206
2803
|
readonly name: "swapExactAmountIn";
|
|
@@ -2390,15 +2987,7 @@ export declare namespace place {
|
|
|
2390
2987
|
readonly type: "bytes32";
|
|
2391
2988
|
}];
|
|
2392
2989
|
}, {
|
|
2393
|
-
readonly name: "
|
|
2394
|
-
readonly type: "function";
|
|
2395
|
-
readonly stateMutability: "view";
|
|
2396
|
-
readonly inputs: readonly [];
|
|
2397
|
-
readonly outputs: readonly [{
|
|
2398
|
-
readonly type: "uint128";
|
|
2399
|
-
}];
|
|
2400
|
-
}, {
|
|
2401
|
-
readonly name: "pendingOrderId";
|
|
2990
|
+
readonly name: "nextOrderId";
|
|
2402
2991
|
readonly type: "function";
|
|
2403
2992
|
readonly stateMutability: "view";
|
|
2404
2993
|
readonly inputs: readonly [];
|
|
@@ -2461,6 +3050,14 @@ export declare namespace place {
|
|
|
2461
3050
|
readonly outputs: readonly [{
|
|
2462
3051
|
readonly type: "uint32";
|
|
2463
3052
|
}];
|
|
3053
|
+
}, {
|
|
3054
|
+
readonly name: "MIN_ORDER_AMOUNT";
|
|
3055
|
+
readonly type: "function";
|
|
3056
|
+
readonly stateMutability: "pure";
|
|
3057
|
+
readonly inputs: readonly [];
|
|
3058
|
+
readonly outputs: readonly [{
|
|
3059
|
+
readonly type: "uint128";
|
|
3060
|
+
}];
|
|
2464
3061
|
}, {
|
|
2465
3062
|
readonly name: "MIN_PRICE";
|
|
2466
3063
|
readonly type: "function";
|
|
@@ -2541,53 +3138,13 @@ export declare namespace place {
|
|
|
2541
3138
|
}, {
|
|
2542
3139
|
readonly type: "int16";
|
|
2543
3140
|
readonly name: "tick";
|
|
2544
|
-
}];
|
|
2545
|
-
}, {
|
|
2546
|
-
readonly name: "FlipOrderPlaced";
|
|
2547
|
-
readonly type: "event";
|
|
2548
|
-
readonly inputs: readonly [{
|
|
2549
|
-
readonly type: "uint128";
|
|
2550
|
-
readonly name: "orderId";
|
|
2551
|
-
readonly indexed: true;
|
|
2552
|
-
}, {
|
|
2553
|
-
readonly type: "address";
|
|
2554
|
-
readonly name: "maker";
|
|
2555
|
-
readonly indexed: true;
|
|
2556
|
-
}, {
|
|
2557
|
-
readonly type: "address";
|
|
2558
|
-
readonly name: "token";
|
|
2559
|
-
readonly indexed: true;
|
|
2560
|
-
}, {
|
|
2561
|
-
readonly type: "uint128";
|
|
2562
|
-
readonly name: "amount";
|
|
2563
3141
|
}, {
|
|
2564
3142
|
readonly type: "bool";
|
|
2565
|
-
readonly name: "
|
|
2566
|
-
}, {
|
|
2567
|
-
readonly type: "int16";
|
|
2568
|
-
readonly name: "tick";
|
|
3143
|
+
readonly name: "isFlipOrder";
|
|
2569
3144
|
}, {
|
|
2570
3145
|
readonly type: "int16";
|
|
2571
3146
|
readonly name: "flipTick";
|
|
2572
3147
|
}];
|
|
2573
|
-
}, {
|
|
2574
|
-
readonly name: "OrderFilled";
|
|
2575
|
-
readonly type: "event";
|
|
2576
|
-
readonly inputs: readonly [{
|
|
2577
|
-
readonly type: "uint128";
|
|
2578
|
-
readonly name: "orderId";
|
|
2579
|
-
readonly indexed: true;
|
|
2580
|
-
}, {
|
|
2581
|
-
readonly type: "address";
|
|
2582
|
-
readonly name: "maker";
|
|
2583
|
-
readonly indexed: true;
|
|
2584
|
-
}, {
|
|
2585
|
-
readonly type: "uint128";
|
|
2586
|
-
readonly name: "amountFilled";
|
|
2587
|
-
}, {
|
|
2588
|
-
readonly type: "bool";
|
|
2589
|
-
readonly name: "partialFill";
|
|
2590
|
-
}];
|
|
2591
3148
|
}, {
|
|
2592
3149
|
readonly name: "OrderFilled";
|
|
2593
3150
|
readonly type: "event";
|
|
@@ -2684,6 +3241,10 @@ export declare namespace place {
|
|
|
2684
3241
|
readonly name: "InvalidBaseToken";
|
|
2685
3242
|
readonly type: "error";
|
|
2686
3243
|
readonly inputs: readonly [];
|
|
3244
|
+
}, {
|
|
3245
|
+
readonly name: "OrderNotStale";
|
|
3246
|
+
readonly type: "error";
|
|
3247
|
+
readonly inputs: readonly [];
|
|
2687
3248
|
}], "OrderPlaced">;
|
|
2688
3249
|
}
|
|
2689
3250
|
/**
|
|
@@ -2805,10 +3366,10 @@ export declare namespace placeFlip {
|
|
|
2805
3366
|
to: Address;
|
|
2806
3367
|
};
|
|
2807
3368
|
/**
|
|
2808
|
-
* Extracts the `
|
|
3369
|
+
* Extracts the `OrderPlaced` event (with `isFlipOrder: true`) from logs.
|
|
2809
3370
|
*
|
|
2810
3371
|
* @param logs - The logs.
|
|
2811
|
-
* @returns The `
|
|
3372
|
+
* @returns The `OrderPlaced` event for a flip order.
|
|
2812
3373
|
*/
|
|
2813
3374
|
function extractEvent(logs: viem_Log[]): viem_Log<bigint, number, false, undefined, true, readonly [{
|
|
2814
3375
|
readonly name: "createPair";
|
|
@@ -2877,10 +3438,13 @@ export declare namespace placeFlip {
|
|
|
2877
3438
|
}];
|
|
2878
3439
|
readonly outputs: readonly [];
|
|
2879
3440
|
}, {
|
|
2880
|
-
readonly name: "
|
|
3441
|
+
readonly name: "cancelStaleOrder";
|
|
2881
3442
|
readonly type: "function";
|
|
2882
3443
|
readonly stateMutability: "nonpayable";
|
|
2883
|
-
readonly inputs: readonly [
|
|
3444
|
+
readonly inputs: readonly [{
|
|
3445
|
+
readonly type: "uint128";
|
|
3446
|
+
readonly name: "orderId";
|
|
3447
|
+
}];
|
|
2884
3448
|
readonly outputs: readonly [];
|
|
2885
3449
|
}, {
|
|
2886
3450
|
readonly name: "swapExactAmountIn";
|
|
@@ -3070,15 +3634,7 @@ export declare namespace placeFlip {
|
|
|
3070
3634
|
readonly type: "bytes32";
|
|
3071
3635
|
}];
|
|
3072
3636
|
}, {
|
|
3073
|
-
readonly name: "
|
|
3074
|
-
readonly type: "function";
|
|
3075
|
-
readonly stateMutability: "view";
|
|
3076
|
-
readonly inputs: readonly [];
|
|
3077
|
-
readonly outputs: readonly [{
|
|
3078
|
-
readonly type: "uint128";
|
|
3079
|
-
}];
|
|
3080
|
-
}, {
|
|
3081
|
-
readonly name: "pendingOrderId";
|
|
3637
|
+
readonly name: "nextOrderId";
|
|
3082
3638
|
readonly type: "function";
|
|
3083
3639
|
readonly stateMutability: "view";
|
|
3084
3640
|
readonly inputs: readonly [];
|
|
@@ -3141,6 +3697,14 @@ export declare namespace placeFlip {
|
|
|
3141
3697
|
readonly outputs: readonly [{
|
|
3142
3698
|
readonly type: "uint32";
|
|
3143
3699
|
}];
|
|
3700
|
+
}, {
|
|
3701
|
+
readonly name: "MIN_ORDER_AMOUNT";
|
|
3702
|
+
readonly type: "function";
|
|
3703
|
+
readonly stateMutability: "pure";
|
|
3704
|
+
readonly inputs: readonly [];
|
|
3705
|
+
readonly outputs: readonly [{
|
|
3706
|
+
readonly type: "uint128";
|
|
3707
|
+
}];
|
|
3144
3708
|
}, {
|
|
3145
3709
|
readonly name: "MIN_PRICE";
|
|
3146
3710
|
readonly type: "function";
|
|
@@ -3221,53 +3785,13 @@ export declare namespace placeFlip {
|
|
|
3221
3785
|
}, {
|
|
3222
3786
|
readonly type: "int16";
|
|
3223
3787
|
readonly name: "tick";
|
|
3224
|
-
}];
|
|
3225
|
-
}, {
|
|
3226
|
-
readonly name: "FlipOrderPlaced";
|
|
3227
|
-
readonly type: "event";
|
|
3228
|
-
readonly inputs: readonly [{
|
|
3229
|
-
readonly type: "uint128";
|
|
3230
|
-
readonly name: "orderId";
|
|
3231
|
-
readonly indexed: true;
|
|
3232
|
-
}, {
|
|
3233
|
-
readonly type: "address";
|
|
3234
|
-
readonly name: "maker";
|
|
3235
|
-
readonly indexed: true;
|
|
3236
|
-
}, {
|
|
3237
|
-
readonly type: "address";
|
|
3238
|
-
readonly name: "token";
|
|
3239
|
-
readonly indexed: true;
|
|
3240
|
-
}, {
|
|
3241
|
-
readonly type: "uint128";
|
|
3242
|
-
readonly name: "amount";
|
|
3243
3788
|
}, {
|
|
3244
3789
|
readonly type: "bool";
|
|
3245
|
-
readonly name: "
|
|
3246
|
-
}, {
|
|
3247
|
-
readonly type: "int16";
|
|
3248
|
-
readonly name: "tick";
|
|
3790
|
+
readonly name: "isFlipOrder";
|
|
3249
3791
|
}, {
|
|
3250
3792
|
readonly type: "int16";
|
|
3251
3793
|
readonly name: "flipTick";
|
|
3252
3794
|
}];
|
|
3253
|
-
}, {
|
|
3254
|
-
readonly name: "OrderFilled";
|
|
3255
|
-
readonly type: "event";
|
|
3256
|
-
readonly inputs: readonly [{
|
|
3257
|
-
readonly type: "uint128";
|
|
3258
|
-
readonly name: "orderId";
|
|
3259
|
-
readonly indexed: true;
|
|
3260
|
-
}, {
|
|
3261
|
-
readonly type: "address";
|
|
3262
|
-
readonly name: "maker";
|
|
3263
|
-
readonly indexed: true;
|
|
3264
|
-
}, {
|
|
3265
|
-
readonly type: "uint128";
|
|
3266
|
-
readonly name: "amountFilled";
|
|
3267
|
-
}, {
|
|
3268
|
-
readonly type: "bool";
|
|
3269
|
-
readonly name: "partialFill";
|
|
3270
|
-
}];
|
|
3271
3795
|
}, {
|
|
3272
3796
|
readonly name: "OrderFilled";
|
|
3273
3797
|
readonly type: "event";
|
|
@@ -3364,7 +3888,11 @@ export declare namespace placeFlip {
|
|
|
3364
3888
|
readonly name: "InvalidBaseToken";
|
|
3365
3889
|
readonly type: "error";
|
|
3366
3890
|
readonly inputs: readonly [];
|
|
3367
|
-
}
|
|
3891
|
+
}, {
|
|
3892
|
+
readonly name: "OrderNotStale";
|
|
3893
|
+
readonly type: "error";
|
|
3894
|
+
readonly inputs: readonly [];
|
|
3895
|
+
}], "OrderPlaced">;
|
|
3368
3896
|
}
|
|
3369
3897
|
/**
|
|
3370
3898
|
* Places a flip order that automatically flips when filled.
|
|
@@ -3399,7 +3927,7 @@ export declare function placeFlipSync<chain extends Chain | undefined, account e
|
|
|
3399
3927
|
export declare namespace placeFlipSync {
|
|
3400
3928
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = placeFlip.Parameters<chain, account>;
|
|
3401
3929
|
type Args = placeFlip.Args;
|
|
3402
|
-
type ReturnValue = Compute<GetEventArgs<typeof Abis.
|
|
3930
|
+
type ReturnValue = Compute<GetEventArgs<typeof Abis.stablecoinDex, 'OrderPlaced', {
|
|
3403
3931
|
IndexedOnly: false;
|
|
3404
3932
|
Required: true;
|
|
3405
3933
|
}> & {
|
|
@@ -3440,7 +3968,7 @@ export declare function placeSync<chain extends Chain | undefined, account exten
|
|
|
3440
3968
|
export declare namespace placeSync {
|
|
3441
3969
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = place.Parameters<chain, account>;
|
|
3442
3970
|
type Args = place.Args;
|
|
3443
|
-
type ReturnValue = Compute<GetEventArgs<typeof Abis.
|
|
3971
|
+
type ReturnValue = Compute<GetEventArgs<typeof Abis.stablecoinDex, 'OrderPlaced', {
|
|
3444
3972
|
IndexedOnly: false;
|
|
3445
3973
|
Required: true;
|
|
3446
3974
|
}> & {
|
|
@@ -3626,12 +4154,12 @@ export declare namespace sellSync {
|
|
|
3626
4154
|
*/
|
|
3627
4155
|
export declare function watchFlipOrderPlaced<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchFlipOrderPlaced.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
|
|
3628
4156
|
export declare namespace watchFlipOrderPlaced {
|
|
3629
|
-
type Args = GetEventArgs<typeof Abis.
|
|
4157
|
+
type Args = GetEventArgs<typeof Abis.stablecoinDex, 'OrderPlaced', {
|
|
3630
4158
|
IndexedOnly: false;
|
|
3631
4159
|
Required: true;
|
|
3632
4160
|
}>;
|
|
3633
|
-
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.
|
|
3634
|
-
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.
|
|
4161
|
+
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.stablecoinDex, 'OrderPlaced'>, true>;
|
|
4162
|
+
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.stablecoinDex, 'OrderPlaced', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
|
|
3635
4163
|
/** Address of the maker to filter events. */
|
|
3636
4164
|
maker?: Address | undefined;
|
|
3637
4165
|
/** Callback to invoke when a flip order is placed. */
|
|
@@ -3667,12 +4195,12 @@ export declare namespace watchFlipOrderPlaced {
|
|
|
3667
4195
|
*/
|
|
3668
4196
|
export declare function watchOrderCancelled<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchOrderCancelled.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
|
|
3669
4197
|
export declare namespace watchOrderCancelled {
|
|
3670
|
-
type Args = GetEventArgs<typeof Abis.
|
|
4198
|
+
type Args = GetEventArgs<typeof Abis.stablecoinDex, 'OrderCancelled', {
|
|
3671
4199
|
IndexedOnly: false;
|
|
3672
4200
|
Required: true;
|
|
3673
4201
|
}>;
|
|
3674
|
-
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.
|
|
3675
|
-
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.
|
|
4202
|
+
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.stablecoinDex, 'OrderCancelled'>, true>;
|
|
4203
|
+
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.stablecoinDex, 'OrderCancelled', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
|
|
3676
4204
|
/** Callback to invoke when an order is cancelled. */
|
|
3677
4205
|
onOrderCancelled: (args: Args, log: Log) => void;
|
|
3678
4206
|
/** Order ID to filter events. */
|
|
@@ -3706,12 +4234,12 @@ export declare namespace watchOrderCancelled {
|
|
|
3706
4234
|
*/
|
|
3707
4235
|
export declare function watchOrderFilled<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchOrderFilled.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
|
|
3708
4236
|
export declare namespace watchOrderFilled {
|
|
3709
|
-
type Args = GetEventArgs<typeof Abis.
|
|
4237
|
+
type Args = GetEventArgs<typeof Abis.stablecoinDex, 'OrderFilled', {
|
|
3710
4238
|
IndexedOnly: false;
|
|
3711
4239
|
Required: true;
|
|
3712
4240
|
}>;
|
|
3713
|
-
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.
|
|
3714
|
-
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.
|
|
4241
|
+
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.stablecoinDex, 'OrderFilled'>, true>;
|
|
4242
|
+
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.stablecoinDex, 'OrderFilled', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
|
|
3715
4243
|
/** Address of the maker to filter events. */
|
|
3716
4244
|
maker?: Address | undefined;
|
|
3717
4245
|
/** Callback to invoke when an order is filled. */
|
|
@@ -3749,12 +4277,12 @@ export declare namespace watchOrderFilled {
|
|
|
3749
4277
|
*/
|
|
3750
4278
|
export declare function watchOrderPlaced<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: watchOrderPlaced.Parameters): import("../../actions/public/watchContractEvent.js").WatchContractEventReturnType;
|
|
3751
4279
|
export declare namespace watchOrderPlaced {
|
|
3752
|
-
type Args = GetEventArgs<typeof Abis.
|
|
4280
|
+
type Args = GetEventArgs<typeof Abis.stablecoinDex, 'OrderPlaced', {
|
|
3753
4281
|
IndexedOnly: false;
|
|
3754
4282
|
Required: true;
|
|
3755
4283
|
}>;
|
|
3756
|
-
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.
|
|
3757
|
-
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.
|
|
4284
|
+
type Log = viem_Log<bigint, number, false, ExtractAbiItem<typeof Abis.stablecoinDex, 'OrderPlaced'>, true>;
|
|
4285
|
+
type Parameters = UnionOmit<WatchContractEventParameters<typeof Abis.stablecoinDex, 'OrderPlaced', true>, 'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'> & {
|
|
3758
4286
|
/** Address of the maker to filter events. */
|
|
3759
4287
|
maker?: Address | undefined;
|
|
3760
4288
|
/** Callback to invoke when an order is placed. */
|