tempo.ts 0.0.6 → 0.1.1
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/dist/chains.d.ts +244 -541
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +10 -23
- package/dist/chains.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ox/SignatureEnvelope.d.ts +245 -0
- package/dist/ox/SignatureEnvelope.d.ts.map +1 -0
- package/dist/ox/SignatureEnvelope.js +437 -0
- package/dist/ox/SignatureEnvelope.js.map +1 -0
- package/dist/ox/Transaction.d.ts +61 -24
- package/dist/ox/Transaction.d.ts.map +1 -1
- package/dist/ox/Transaction.js +63 -18
- package/dist/ox/Transaction.js.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.d.ts +461 -0
- package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -0
- package/dist/ox/TransactionEnvelopeAA.js +528 -0
- package/dist/ox/TransactionEnvelopeAA.js.map +1 -0
- package/dist/ox/TransactionRequest.d.ts +7 -5
- package/dist/ox/TransactionRequest.d.ts.map +1 -1
- package/dist/ox/TransactionRequest.js +21 -12
- package/dist/ox/TransactionRequest.js.map +1 -1
- package/dist/ox/index.d.ts +5 -4
- package/dist/ox/index.d.ts.map +1 -1
- package/dist/ox/index.js +5 -4
- package/dist/ox/index.js.map +1 -1
- package/dist/prool/Instance.d.ts +0 -4
- package/dist/prool/Instance.d.ts.map +1 -1
- package/dist/prool/Instance.js +7 -7
- package/dist/prool/Instance.js.map +1 -1
- package/dist/prool/index.d.ts +1 -1
- package/dist/prool/index.d.ts.map +1 -1
- package/dist/prool/index.js +1 -1
- package/dist/prool/index.js.map +1 -1
- package/dist/viem/{abis.d.ts → Abis.d.ts} +523 -9
- package/dist/viem/Abis.d.ts.map +1 -0
- package/dist/viem/{abis.js → Abis.js} +321 -9
- package/dist/viem/Abis.js.map +1 -0
- package/dist/viem/{actions → Actions}/amm.d.ts +21 -21
- package/dist/viem/Actions/amm.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/amm.js +55 -43
- package/dist/viem/Actions/amm.js.map +1 -0
- package/dist/viem/Actions/dex.d.ts +3263 -0
- package/dist/viem/Actions/dex.d.ts.map +1 -0
- package/dist/viem/Actions/dex.js +1357 -0
- package/dist/viem/Actions/dex.js.map +1 -0
- package/dist/viem/{actions → Actions}/fee.d.ts +8 -8
- package/dist/viem/Actions/fee.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/fee.js +14 -13
- package/dist/viem/Actions/fee.js.map +1 -0
- package/dist/viem/Actions/index.d.ts +6 -0
- package/dist/viem/Actions/index.d.ts.map +1 -0
- package/dist/viem/Actions/index.js +6 -0
- package/dist/viem/Actions/index.js.map +1 -0
- package/dist/viem/{actions → Actions}/policy.d.ts +19 -19
- package/dist/viem/Actions/policy.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/policy.js +59 -46
- package/dist/viem/Actions/policy.js.map +1 -0
- package/dist/viem/{actions → Actions}/token.d.ts +3275 -698
- package/dist/viem/Actions/token.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/token.js +458 -84
- package/dist/viem/Actions/token.js.map +1 -0
- package/dist/viem/Addresses.d.ts +9 -0
- package/dist/viem/Addresses.d.ts.map +1 -0
- package/dist/viem/Addresses.js +9 -0
- package/dist/viem/Addresses.js.map +1 -0
- package/dist/viem/{chain.d.ts → Chain.d.ts} +81 -57
- package/dist/viem/Chain.d.ts.map +1 -0
- package/dist/viem/{chain.js → Chain.js} +7 -7
- package/dist/viem/Chain.js.map +1 -0
- package/dist/viem/{client.d.ts → Client.d.ts} +4 -4
- package/dist/viem/Client.d.ts.map +1 -0
- package/dist/viem/{client.js → Client.js} +3 -3
- package/dist/viem/Client.js.map +1 -0
- package/dist/viem/{decorator.d.ts → Decorator.d.ts} +507 -5
- package/dist/viem/Decorator.d.ts.map +1 -0
- package/dist/viem/{decorator.js → Decorator.js} +31 -5
- package/dist/viem/Decorator.js.map +1 -0
- package/dist/viem/{formatters.d.ts → Formatters.d.ts} +2 -2
- package/dist/viem/Formatters.d.ts.map +1 -0
- package/dist/viem/{formatters.js → Formatters.js} +24 -17
- package/dist/viem/Formatters.js.map +1 -0
- package/dist/viem/Tick.d.ts +111 -0
- package/dist/viem/Tick.d.ts.map +1 -0
- package/dist/viem/Tick.js +127 -0
- package/dist/viem/Tick.js.map +1 -0
- package/dist/viem/TokenIds.d.ts +3 -0
- package/dist/viem/TokenIds.d.ts.map +1 -0
- package/dist/viem/TokenIds.js +3 -0
- package/dist/viem/TokenIds.js.map +1 -0
- package/dist/viem/Transaction.d.ts +57 -0
- package/dist/viem/Transaction.d.ts.map +1 -0
- package/dist/viem/Transaction.js +137 -0
- package/dist/viem/Transaction.js.map +1 -0
- package/dist/viem/{transport.d.ts → Transport.d.ts} +3 -3
- package/dist/viem/Transport.d.ts.map +1 -0
- package/dist/viem/{transport.js → Transport.js} +3 -3
- package/dist/viem/Transport.js.map +1 -0
- package/dist/viem/index.d.ts +13 -9
- package/dist/viem/index.d.ts.map +1 -1
- package/dist/viem/index.js +13 -9
- package/dist/viem/index.js.map +1 -1
- package/dist/viem/{types.d.ts → internal/types.d.ts} +3 -3
- package/dist/viem/internal/types.d.ts.map +1 -0
- package/dist/viem/{types.js.map → internal/types.js.map} +1 -1
- package/dist/viem/internal/utils.d.ts.map +1 -0
- package/dist/viem/internal/utils.js.map +1 -0
- package/package.json +87 -101
- package/src/chains.ts +10 -24
- package/src/ox/SignatureEnvelope.test.ts +1252 -0
- package/src/ox/SignatureEnvelope.ts +709 -0
- package/src/ox/Transaction.test.ts +144 -89
- package/src/ox/Transaction.ts +104 -29
- package/src/ox/TransactionEnvelopeAA.test.ts +1533 -0
- package/src/ox/TransactionEnvelopeAA.ts +858 -0
- package/src/ox/TransactionRequest.ts +25 -17
- package/src/ox/index.ts +2 -1
- package/src/prool/Instance.ts +6 -14
- package/src/prool/internal/chain.json +101 -27
- package/src/viem/{abis.ts → Abis.ts} +322 -8
- package/src/viem/{actions → Actions}/amm.test.ts +65 -68
- package/src/viem/{actions → Actions}/amm.ts +72 -60
- package/src/viem/Actions/dex.test.ts +1608 -0
- package/src/viem/Actions/dex.ts +2026 -0
- package/src/viem/{actions → Actions}/fee.test.ts +34 -36
- package/src/viem/{actions → Actions}/fee.ts +18 -17
- package/src/viem/{actions → Actions}/index.ts +1 -0
- package/src/viem/{actions → Actions}/policy.test.ts +2 -2
- package/src/viem/{actions → Actions}/policy.ts +77 -64
- package/src/viem/{actions → Actions}/token.test.ts +419 -64
- package/src/viem/{actions → Actions}/token.ts +751 -145
- package/src/viem/Addresses.ts +9 -0
- package/src/viem/{chain.ts → Chain.ts} +6 -6
- package/src/viem/{client.bench-d.ts → Client.bench-d.ts} +2 -2
- package/src/viem/{client.test.ts → Client.test.ts} +31 -6
- package/src/viem/{client.ts → Client.ts} +1 -1
- package/src/viem/{decorator.bench-d.ts → Decorator.bench-d.ts} +2 -2
- package/src/viem/{decorator.test.ts → Decorator.test.ts} +1 -0
- package/src/viem/{decorator.ts → Decorator.ts} +586 -4
- package/src/viem/{formatters.ts → Formatters.ts} +31 -20
- package/src/viem/Tick.test.ts +281 -0
- package/src/viem/Tick.ts +176 -0
- package/src/viem/TokenIds.ts +2 -0
- package/src/viem/Transaction.ts +303 -0
- package/src/viem/{transport.ts → Transport.ts} +5 -5
- package/src/viem/e2e.test.ts +153 -78
- package/src/viem/index.ts +13 -9
- package/src/viem/{types.ts → internal/types.ts} +3 -3
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts +0 -393
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts.map +0 -1
- package/dist/ox/TransactionEnvelopeFeeToken.js +0 -452
- package/dist/ox/TransactionEnvelopeFeeToken.js.map +0 -1
- package/dist/viem/abis.d.ts.map +0 -1
- package/dist/viem/abis.js.map +0 -1
- package/dist/viem/actions/amm.d.ts.map +0 -1
- package/dist/viem/actions/amm.js.map +0 -1
- package/dist/viem/actions/fee.d.ts.map +0 -1
- package/dist/viem/actions/fee.js.map +0 -1
- package/dist/viem/actions/index.d.ts +0 -5
- package/dist/viem/actions/index.d.ts.map +0 -1
- package/dist/viem/actions/index.js +0 -5
- package/dist/viem/actions/index.js.map +0 -1
- package/dist/viem/actions/policy.d.ts.map +0 -1
- package/dist/viem/actions/policy.js.map +0 -1
- package/dist/viem/actions/token.d.ts.map +0 -1
- package/dist/viem/actions/token.js.map +0 -1
- package/dist/viem/addresses.d.ts +0 -8
- package/dist/viem/addresses.d.ts.map +0 -1
- package/dist/viem/addresses.js +0 -8
- package/dist/viem/addresses.js.map +0 -1
- package/dist/viem/chain.d.ts.map +0 -1
- package/dist/viem/chain.js.map +0 -1
- package/dist/viem/client.d.ts.map +0 -1
- package/dist/viem/client.js.map +0 -1
- package/dist/viem/decorator.d.ts.map +0 -1
- package/dist/viem/decorator.js.map +0 -1
- package/dist/viem/formatters.d.ts.map +0 -1
- package/dist/viem/formatters.js.map +0 -1
- package/dist/viem/transaction.d.ts +0 -54
- package/dist/viem/transaction.d.ts.map +0 -1
- package/dist/viem/transaction.js +0 -108
- package/dist/viem/transaction.js.map +0 -1
- package/dist/viem/transport.d.ts.map +0 -1
- package/dist/viem/transport.js.map +0 -1
- package/dist/viem/types.d.ts.map +0 -1
- package/dist/viem/utils.d.ts.map +0 -1
- package/dist/viem/utils.js.map +0 -1
- package/src/ox/TransactionEnvelopeFeeToken.test.ts +0 -1119
- package/src/ox/TransactionEnvelopeFeeToken.ts +0 -717
- package/src/prool/internal/consensus.toml +0 -32
- package/src/viem/addresses.ts +0 -10
- package/src/viem/transaction.ts +0 -253
- /package/dist/viem/{types.js → internal/types.js} +0 -0
- /package/dist/viem/{utils.d.ts → internal/utils.d.ts} +0 -0
- /package/dist/viem/{utils.js → internal/utils.js} +0 -0
- /package/src/viem/{utils.ts → internal/utils.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated with `bun run gen:abis`. Do not modify manually.
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const tip20 = [
|
|
4
4
|
{
|
|
5
5
|
name: 'name',
|
|
6
6
|
type: 'function',
|
|
@@ -29,6 +29,20 @@ export const tip20Abi = [
|
|
|
29
29
|
inputs: [],
|
|
30
30
|
outputs: [{ type: 'uint256' }],
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
name: 'quoteToken',
|
|
34
|
+
type: 'function',
|
|
35
|
+
stateMutability: 'view',
|
|
36
|
+
inputs: [],
|
|
37
|
+
outputs: [{ type: 'address' }],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'nextQuoteToken',
|
|
41
|
+
type: 'function',
|
|
42
|
+
stateMutability: 'view',
|
|
43
|
+
inputs: [],
|
|
44
|
+
outputs: [{ type: 'address' }],
|
|
45
|
+
},
|
|
32
46
|
{
|
|
33
47
|
name: 'balanceOf',
|
|
34
48
|
type: 'function',
|
|
@@ -191,7 +205,7 @@ export const tip20Abi = [
|
|
|
191
205
|
{ type: 'uint256', name: 'amount' },
|
|
192
206
|
{ type: 'bytes32', name: 'memo' },
|
|
193
207
|
],
|
|
194
|
-
outputs: [],
|
|
208
|
+
outputs: [{ type: 'bool' }],
|
|
195
209
|
},
|
|
196
210
|
{
|
|
197
211
|
name: 'changeTransferPolicyId',
|
|
@@ -221,6 +235,20 @@ export const tip20Abi = [
|
|
|
221
235
|
inputs: [],
|
|
222
236
|
outputs: [],
|
|
223
237
|
},
|
|
238
|
+
{
|
|
239
|
+
name: 'updateQuoteToken',
|
|
240
|
+
type: 'function',
|
|
241
|
+
stateMutability: 'nonpayable',
|
|
242
|
+
inputs: [{ type: 'address', name: 'newQuoteToken' }],
|
|
243
|
+
outputs: [],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'finalizeQuoteTokenUpdate',
|
|
247
|
+
type: 'function',
|
|
248
|
+
stateMutability: 'nonpayable',
|
|
249
|
+
inputs: [],
|
|
250
|
+
outputs: [],
|
|
251
|
+
},
|
|
224
252
|
{
|
|
225
253
|
name: 'permit',
|
|
226
254
|
type: 'function',
|
|
@@ -319,6 +347,22 @@ export const tip20Abi = [
|
|
|
319
347
|
{ type: 'bool', name: 'isPaused' },
|
|
320
348
|
],
|
|
321
349
|
},
|
|
350
|
+
{
|
|
351
|
+
name: 'UpdateQuoteToken',
|
|
352
|
+
type: 'event',
|
|
353
|
+
inputs: [
|
|
354
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
355
|
+
{ type: 'address', name: 'newQuoteToken', indexed: true },
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'QuoteTokenUpdateFinalized',
|
|
360
|
+
type: 'event',
|
|
361
|
+
inputs: [
|
|
362
|
+
{ type: 'address', name: 'updater', indexed: true },
|
|
363
|
+
{ type: 'address', name: 'newQuoteToken', indexed: true },
|
|
364
|
+
],
|
|
365
|
+
},
|
|
322
366
|
{ name: 'InsufficientBalance', type: 'error', inputs: [] },
|
|
323
367
|
{ name: 'InsufficientAllowance', type: 'error', inputs: [] },
|
|
324
368
|
{ name: 'SupplyCapExceeded', type: 'error', inputs: [] },
|
|
@@ -332,6 +376,8 @@ export const tip20Abi = [
|
|
|
332
376
|
{ name: 'SaltAlreadyUsed', type: 'error', inputs: [] },
|
|
333
377
|
{ name: 'ContractPaused', type: 'error', inputs: [] },
|
|
334
378
|
{ name: 'InvalidCurrency', type: 'error', inputs: [] },
|
|
379
|
+
{ name: 'InvalidQuoteToken', type: 'error', inputs: [] },
|
|
380
|
+
{ name: 'TransfersDisabled', type: 'error', inputs: [] },
|
|
335
381
|
{
|
|
336
382
|
name: 'grantRole',
|
|
337
383
|
type: 'function',
|
|
@@ -408,7 +454,7 @@ export const tip20Abi = [
|
|
|
408
454
|
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
409
455
|
] as const
|
|
410
456
|
|
|
411
|
-
export const
|
|
457
|
+
export const tip20Factory = [
|
|
412
458
|
{
|
|
413
459
|
name: 'createToken',
|
|
414
460
|
type: 'function',
|
|
@@ -417,6 +463,7 @@ export const tip20FactoryAbi = [
|
|
|
417
463
|
{ type: 'string', name: 'name' },
|
|
418
464
|
{ type: 'string', name: 'symbol' },
|
|
419
465
|
{ type: 'string', name: 'currency' },
|
|
466
|
+
{ type: 'address', name: 'quoteToken' },
|
|
420
467
|
{ type: 'address', name: 'admin' },
|
|
421
468
|
],
|
|
422
469
|
outputs: [{ type: 'uint256' }],
|
|
@@ -442,7 +489,7 @@ export const tip20FactoryAbi = [
|
|
|
442
489
|
},
|
|
443
490
|
] as const
|
|
444
491
|
|
|
445
|
-
export const
|
|
492
|
+
export const tip403Registry = [
|
|
446
493
|
{
|
|
447
494
|
name: 'policyIdCounter',
|
|
448
495
|
type: 'function',
|
|
@@ -566,7 +613,7 @@ export const tip403RegistryAbi = [
|
|
|
566
613
|
{ name: 'SelfOwnedPolicyMustBeWhitelist', type: 'error', inputs: [] },
|
|
567
614
|
] as const
|
|
568
615
|
|
|
569
|
-
export const
|
|
616
|
+
export const tip4217Registry = [
|
|
570
617
|
{
|
|
571
618
|
name: 'getCurrencyDecimals',
|
|
572
619
|
type: 'function',
|
|
@@ -576,7 +623,27 @@ export const tip4217RegistryAbi = [
|
|
|
576
623
|
},
|
|
577
624
|
] as const
|
|
578
625
|
|
|
579
|
-
export const
|
|
626
|
+
export const nonce = [
|
|
627
|
+
{
|
|
628
|
+
name: 'getNonce',
|
|
629
|
+
type: 'function',
|
|
630
|
+
stateMutability: 'view',
|
|
631
|
+
inputs: [
|
|
632
|
+
{ type: 'address', name: 'account' },
|
|
633
|
+
{ type: 'uint64', name: 'nonceKey' },
|
|
634
|
+
],
|
|
635
|
+
outputs: [{ type: 'uint64' }],
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
name: 'getActiveNonceKeyCount',
|
|
639
|
+
type: 'function',
|
|
640
|
+
stateMutability: 'view',
|
|
641
|
+
inputs: [{ type: 'address', name: 'account' }],
|
|
642
|
+
outputs: [{ type: 'uint256' }],
|
|
643
|
+
},
|
|
644
|
+
] as const
|
|
645
|
+
|
|
646
|
+
export const tipAccountRegistrar = [
|
|
580
647
|
{
|
|
581
648
|
name: 'delegateToDefault',
|
|
582
649
|
type: 'function',
|
|
@@ -599,7 +666,7 @@ export const tipAccountRegistrarAbi = [
|
|
|
599
666
|
{ name: 'NonceNotZero', type: 'error', inputs: [] },
|
|
600
667
|
] as const
|
|
601
668
|
|
|
602
|
-
export const
|
|
669
|
+
export const feeAmm = [
|
|
603
670
|
{
|
|
604
671
|
name: 'getPoolId',
|
|
605
672
|
type: 'function',
|
|
@@ -779,7 +846,7 @@ export const feeAmmAbi = [
|
|
|
779
846
|
{ name: 'InternalError', type: 'error', inputs: [] },
|
|
780
847
|
] as const
|
|
781
848
|
|
|
782
|
-
export const
|
|
849
|
+
export const feeManager = [
|
|
783
850
|
{
|
|
784
851
|
name: 'BASIS_POINTS',
|
|
785
852
|
type: 'function',
|
|
@@ -865,3 +932,250 @@ export const feeManagerAbi = [
|
|
|
865
932
|
{ name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
|
|
866
933
|
{ name: 'TokenPolicyForbids', type: 'error', inputs: [] },
|
|
867
934
|
] as const
|
|
935
|
+
|
|
936
|
+
export const stablecoinExchange = [
|
|
937
|
+
{
|
|
938
|
+
name: 'balanceOf',
|
|
939
|
+
type: 'function',
|
|
940
|
+
stateMutability: 'view',
|
|
941
|
+
inputs: [
|
|
942
|
+
{ type: 'address', name: 'user' },
|
|
943
|
+
{ type: 'address', name: 'token' },
|
|
944
|
+
],
|
|
945
|
+
outputs: [{ type: 'uint128' }],
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: 'quoteSwapExactAmountOut',
|
|
949
|
+
type: 'function',
|
|
950
|
+
stateMutability: 'view',
|
|
951
|
+
inputs: [
|
|
952
|
+
{ type: 'address', name: 'tokenIn' },
|
|
953
|
+
{ type: 'address', name: 'tokenOut' },
|
|
954
|
+
{ type: 'uint128', name: 'amountOut' },
|
|
955
|
+
],
|
|
956
|
+
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
name: 'quoteSwapExactAmountIn',
|
|
960
|
+
type: 'function',
|
|
961
|
+
stateMutability: 'view',
|
|
962
|
+
inputs: [
|
|
963
|
+
{ type: 'address', name: 'tokenIn' },
|
|
964
|
+
{ type: 'address', name: 'tokenOut' },
|
|
965
|
+
{ type: 'uint128', name: 'amountIn' },
|
|
966
|
+
],
|
|
967
|
+
outputs: [{ type: 'uint128', name: 'amountOut' }],
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
name: 'pairKey',
|
|
971
|
+
type: 'function',
|
|
972
|
+
stateMutability: 'pure',
|
|
973
|
+
inputs: [
|
|
974
|
+
{ type: 'address', name: 'tokenA' },
|
|
975
|
+
{ type: 'address', name: 'tokenB' },
|
|
976
|
+
],
|
|
977
|
+
outputs: [{ type: 'bytes32', name: 'key' }],
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
name: 'getPriceLevel',
|
|
981
|
+
type: 'function',
|
|
982
|
+
stateMutability: 'view',
|
|
983
|
+
inputs: [
|
|
984
|
+
{ type: 'address', name: 'base' },
|
|
985
|
+
{ type: 'int16', name: 'tick' },
|
|
986
|
+
{ type: 'bool', name: 'isBid' },
|
|
987
|
+
],
|
|
988
|
+
outputs: [
|
|
989
|
+
{
|
|
990
|
+
type: 'tuple',
|
|
991
|
+
name: 'level',
|
|
992
|
+
components: [
|
|
993
|
+
{ type: 'uint128', name: 'head' },
|
|
994
|
+
{ type: 'uint128', name: 'tail' },
|
|
995
|
+
{ type: 'uint128', name: 'totalLiquidity' },
|
|
996
|
+
],
|
|
997
|
+
},
|
|
998
|
+
],
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: 'activeOrderId',
|
|
1002
|
+
type: 'function',
|
|
1003
|
+
stateMutability: 'view',
|
|
1004
|
+
inputs: [],
|
|
1005
|
+
outputs: [{ type: 'uint128' }],
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: 'pendingOrderId',
|
|
1009
|
+
type: 'function',
|
|
1010
|
+
stateMutability: 'view',
|
|
1011
|
+
inputs: [],
|
|
1012
|
+
outputs: [{ type: 'uint128' }],
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
name: 'getOrder',
|
|
1016
|
+
type: 'function',
|
|
1017
|
+
stateMutability: 'view',
|
|
1018
|
+
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1019
|
+
outputs: [
|
|
1020
|
+
{
|
|
1021
|
+
type: 'tuple',
|
|
1022
|
+
components: [
|
|
1023
|
+
{ type: 'address', name: 'maker' },
|
|
1024
|
+
{ type: 'bytes32', name: 'bookKey' },
|
|
1025
|
+
{ type: 'bool', name: 'isBid' },
|
|
1026
|
+
{ type: 'int16', name: 'tick' },
|
|
1027
|
+
{ type: 'uint128', name: 'amount' },
|
|
1028
|
+
{ type: 'uint128', name: 'remaining' },
|
|
1029
|
+
{ type: 'uint128', name: 'prev' },
|
|
1030
|
+
{ type: 'uint128', name: 'next' },
|
|
1031
|
+
{ type: 'bool', name: 'isFlip' },
|
|
1032
|
+
{ type: 'int16', name: 'flipTick' },
|
|
1033
|
+
],
|
|
1034
|
+
},
|
|
1035
|
+
],
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
name: 'createPair',
|
|
1039
|
+
type: 'function',
|
|
1040
|
+
stateMutability: 'nonpayable',
|
|
1041
|
+
inputs: [{ type: 'address', name: 'base' }],
|
|
1042
|
+
outputs: [{ type: 'bytes32', name: 'key' }],
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
name: 'swapExactAmountIn',
|
|
1046
|
+
type: 'function',
|
|
1047
|
+
stateMutability: 'nonpayable',
|
|
1048
|
+
inputs: [
|
|
1049
|
+
{ type: 'address', name: 'tokenIn' },
|
|
1050
|
+
{ type: 'address', name: 'tokenOut' },
|
|
1051
|
+
{ type: 'uint128', name: 'amountIn' },
|
|
1052
|
+
{ type: 'uint128', name: 'minAmountOut' },
|
|
1053
|
+
],
|
|
1054
|
+
outputs: [{ type: 'uint128', name: 'amountOut' }],
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: 'swapExactAmountOut',
|
|
1058
|
+
type: 'function',
|
|
1059
|
+
stateMutability: 'nonpayable',
|
|
1060
|
+
inputs: [
|
|
1061
|
+
{ type: 'address', name: 'tokenIn' },
|
|
1062
|
+
{ type: 'address', name: 'tokenOut' },
|
|
1063
|
+
{ type: 'uint128', name: 'amountOut' },
|
|
1064
|
+
{ type: 'uint128', name: 'maxAmountIn' },
|
|
1065
|
+
],
|
|
1066
|
+
outputs: [{ type: 'uint128', name: 'amountIn' }],
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
name: 'place',
|
|
1070
|
+
type: 'function',
|
|
1071
|
+
stateMutability: 'nonpayable',
|
|
1072
|
+
inputs: [
|
|
1073
|
+
{ type: 'address', name: 'token' },
|
|
1074
|
+
{ type: 'uint128', name: 'amount' },
|
|
1075
|
+
{ type: 'bool', name: 'isBid' },
|
|
1076
|
+
{ type: 'int16', name: 'tick' },
|
|
1077
|
+
],
|
|
1078
|
+
outputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: 'placeFlip',
|
|
1082
|
+
type: 'function',
|
|
1083
|
+
stateMutability: 'nonpayable',
|
|
1084
|
+
inputs: [
|
|
1085
|
+
{ type: 'address', name: 'token' },
|
|
1086
|
+
{ type: 'uint128', name: 'amount' },
|
|
1087
|
+
{ type: 'bool', name: 'isBid' },
|
|
1088
|
+
{ type: 'int16', name: 'tick' },
|
|
1089
|
+
{ type: 'int16', name: 'flipTick' },
|
|
1090
|
+
],
|
|
1091
|
+
outputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
name: 'cancel',
|
|
1095
|
+
type: 'function',
|
|
1096
|
+
stateMutability: 'nonpayable',
|
|
1097
|
+
inputs: [{ type: 'uint128', name: 'orderId' }],
|
|
1098
|
+
outputs: [],
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
name: 'withdraw',
|
|
1102
|
+
type: 'function',
|
|
1103
|
+
stateMutability: 'nonpayable',
|
|
1104
|
+
inputs: [
|
|
1105
|
+
{ type: 'address', name: 'token' },
|
|
1106
|
+
{ type: 'uint128', name: 'amount' },
|
|
1107
|
+
],
|
|
1108
|
+
outputs: [],
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
name: 'executeBlock',
|
|
1112
|
+
type: 'function',
|
|
1113
|
+
stateMutability: 'nonpayable',
|
|
1114
|
+
inputs: [],
|
|
1115
|
+
outputs: [],
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
name: 'PairCreated',
|
|
1119
|
+
type: 'event',
|
|
1120
|
+
inputs: [
|
|
1121
|
+
{ type: 'bytes32', name: 'key', indexed: true },
|
|
1122
|
+
{ type: 'address', name: 'base', indexed: true },
|
|
1123
|
+
{ type: 'address', name: 'quote', indexed: true },
|
|
1124
|
+
],
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
name: 'OrderPlaced',
|
|
1128
|
+
type: 'event',
|
|
1129
|
+
inputs: [
|
|
1130
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
1131
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
1132
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
1133
|
+
{ type: 'uint128', name: 'amount' },
|
|
1134
|
+
{ type: 'bool', name: 'isBid' },
|
|
1135
|
+
{ type: 'int16', name: 'tick' },
|
|
1136
|
+
],
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
name: 'FlipOrderPlaced',
|
|
1140
|
+
type: 'event',
|
|
1141
|
+
inputs: [
|
|
1142
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
1143
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
1144
|
+
{ type: 'address', name: 'token', indexed: true },
|
|
1145
|
+
{ type: 'uint128', name: 'amount' },
|
|
1146
|
+
{ type: 'bool', name: 'isBid' },
|
|
1147
|
+
{ type: 'int16', name: 'tick' },
|
|
1148
|
+
{ type: 'int16', name: 'flipTick' },
|
|
1149
|
+
],
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
name: 'OrderCancelled',
|
|
1153
|
+
type: 'event',
|
|
1154
|
+
inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
name: 'OrderFilled',
|
|
1158
|
+
type: 'event',
|
|
1159
|
+
inputs: [
|
|
1160
|
+
{ type: 'uint128', name: 'orderId', indexed: true },
|
|
1161
|
+
{ type: 'address', name: 'maker', indexed: true },
|
|
1162
|
+
{ type: 'uint128', name: 'amountFilled' },
|
|
1163
|
+
{ type: 'bool', name: 'partialFill' },
|
|
1164
|
+
],
|
|
1165
|
+
},
|
|
1166
|
+
{ name: 'OrderDoesNotExist', type: 'error', inputs: [] },
|
|
1167
|
+
{ name: 'Unauthorized', type: 'error', inputs: [] },
|
|
1168
|
+
{ name: 'FillFailed', type: 'error', inputs: [] },
|
|
1169
|
+
{ name: 'InvalidTick', type: 'error', inputs: [] },
|
|
1170
|
+
{ name: 'InsufficientBalance', type: 'error', inputs: [] },
|
|
1171
|
+
{ name: 'InvalidFlipTick', type: 'error', inputs: [] },
|
|
1172
|
+
{
|
|
1173
|
+
name: 'TickOutOfBounds',
|
|
1174
|
+
type: 'error',
|
|
1175
|
+
inputs: [{ type: 'int16', name: 'tick' }],
|
|
1176
|
+
},
|
|
1177
|
+
{ name: 'InsufficientLiquidity', type: 'error', inputs: [] },
|
|
1178
|
+
{ name: 'MaxInputExceeded', type: 'error', inputs: [] },
|
|
1179
|
+
{ name: 'InsufficientOutput', type: 'error', inputs: [] },
|
|
1180
|
+
{ name: 'PairDoesNotExist', type: 'error', inputs: [] },
|
|
1181
|
+
] as const
|