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
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
} from 'viem/actions'
|
|
24
24
|
import type { Compute, UnionOmit } from '../../internal/types.js'
|
|
25
25
|
import * as TokenId from '../../ox/TokenId.js'
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import type { ReadParameters, WriteParameters } from '../types.js'
|
|
29
|
-
import { defineCall } from '../utils.js'
|
|
26
|
+
import * as Abis from '../Abis.js'
|
|
27
|
+
import * as Addresses from '../Addresses.js'
|
|
28
|
+
import type { ReadParameters, WriteParameters } from '../internal/types.js'
|
|
29
|
+
import { defineCall } from '../internal/utils.js'
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Gets the pool ID for a token pair.
|
|
@@ -56,9 +56,10 @@ export async function getPoolId<chain extends Chain | undefined>(
|
|
|
56
56
|
client: Client<Transport, chain>,
|
|
57
57
|
parameters: getPoolId.Parameters,
|
|
58
58
|
): Promise<getPoolId.ReturnValue> {
|
|
59
|
+
const { userToken, validatorToken, ...rest } = parameters
|
|
59
60
|
return readContract(client, {
|
|
60
|
-
...
|
|
61
|
-
...getPoolId.call(
|
|
61
|
+
...rest,
|
|
62
|
+
...getPoolId.call({ userToken, validatorToken }),
|
|
62
63
|
})
|
|
63
64
|
}
|
|
64
65
|
|
|
@@ -73,7 +74,7 @@ export namespace getPoolId {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
export type ReturnValue = ReadContractReturnType<
|
|
76
|
-
typeof
|
|
77
|
+
typeof Abis.feeAmm,
|
|
77
78
|
'getPoolId',
|
|
78
79
|
never
|
|
79
80
|
>
|
|
@@ -87,8 +88,8 @@ export namespace getPoolId {
|
|
|
87
88
|
export function call(args: Args) {
|
|
88
89
|
const { userToken, validatorToken } = args
|
|
89
90
|
return defineCall({
|
|
90
|
-
address:
|
|
91
|
-
abi:
|
|
91
|
+
address: Addresses.feeManager,
|
|
92
|
+
abi: Abis.feeAmm,
|
|
92
93
|
args: [TokenId.toAddress(userToken), TokenId.toAddress(validatorToken)],
|
|
93
94
|
functionName: 'getPoolId',
|
|
94
95
|
})
|
|
@@ -123,9 +124,10 @@ export async function getPool<chain extends Chain | undefined>(
|
|
|
123
124
|
client: Client<Transport, chain>,
|
|
124
125
|
parameters: getPool.Parameters,
|
|
125
126
|
): Promise<getPool.ReturnValue> {
|
|
127
|
+
const { userToken, validatorToken, ...rest } = parameters
|
|
126
128
|
return readContract(client, {
|
|
127
|
-
...
|
|
128
|
-
...getPool.call(
|
|
129
|
+
...rest,
|
|
130
|
+
...getPool.call({ userToken, validatorToken }),
|
|
129
131
|
})
|
|
130
132
|
}
|
|
131
133
|
|
|
@@ -155,8 +157,8 @@ export namespace getPool {
|
|
|
155
157
|
export function call(args: Args) {
|
|
156
158
|
const { userToken, validatorToken } = args
|
|
157
159
|
return defineCall({
|
|
158
|
-
address:
|
|
159
|
-
abi:
|
|
160
|
+
address: Addresses.feeManager,
|
|
161
|
+
abi: Abis.feeAmm,
|
|
160
162
|
args: [TokenId.toAddress(userToken), TokenId.toAddress(validatorToken)],
|
|
161
163
|
functionName: 'getPool',
|
|
162
164
|
})
|
|
@@ -193,9 +195,10 @@ export async function getTotalSupply<chain extends Chain | undefined>(
|
|
|
193
195
|
client: Client<Transport, chain>,
|
|
194
196
|
parameters: getTotalSupply.Parameters,
|
|
195
197
|
): Promise<getTotalSupply.ReturnValue> {
|
|
198
|
+
const { poolId, ...rest } = parameters
|
|
196
199
|
return readContract(client, {
|
|
197
|
-
...
|
|
198
|
-
...getTotalSupply.call(
|
|
200
|
+
...rest,
|
|
201
|
+
...getTotalSupply.call({ poolId }),
|
|
199
202
|
})
|
|
200
203
|
}
|
|
201
204
|
|
|
@@ -208,7 +211,7 @@ export namespace getTotalSupply {
|
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
export type ReturnValue = ReadContractReturnType<
|
|
211
|
-
typeof
|
|
214
|
+
typeof Abis.feeAmm,
|
|
212
215
|
'totalSupply',
|
|
213
216
|
never
|
|
214
217
|
>
|
|
@@ -222,8 +225,8 @@ export namespace getTotalSupply {
|
|
|
222
225
|
export function call(args: Args) {
|
|
223
226
|
const { poolId } = args
|
|
224
227
|
return defineCall({
|
|
225
|
-
address:
|
|
226
|
-
abi:
|
|
228
|
+
address: Addresses.feeManager,
|
|
229
|
+
abi: Abis.feeAmm,
|
|
227
230
|
args: [poolId],
|
|
228
231
|
functionName: 'totalSupply',
|
|
229
232
|
})
|
|
@@ -263,9 +266,10 @@ export async function getLiquidityBalance<chain extends Chain | undefined>(
|
|
|
263
266
|
client: Client<Transport, chain>,
|
|
264
267
|
parameters: getLiquidityBalance.Parameters,
|
|
265
268
|
): Promise<getLiquidityBalance.ReturnValue> {
|
|
269
|
+
const { address, poolId, ...rest } = parameters
|
|
266
270
|
return readContract(client, {
|
|
267
|
-
...
|
|
268
|
-
...getLiquidityBalance.call(
|
|
271
|
+
...rest,
|
|
272
|
+
...getLiquidityBalance.call({ address, poolId }),
|
|
269
273
|
})
|
|
270
274
|
}
|
|
271
275
|
|
|
@@ -280,7 +284,7 @@ export namespace getLiquidityBalance {
|
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
export type ReturnValue = ReadContractReturnType<
|
|
283
|
-
typeof
|
|
287
|
+
typeof Abis.feeAmm,
|
|
284
288
|
'liquidityBalances',
|
|
285
289
|
never
|
|
286
290
|
>
|
|
@@ -294,8 +298,8 @@ export namespace getLiquidityBalance {
|
|
|
294
298
|
export function call(args: Args) {
|
|
295
299
|
const { address, poolId } = args
|
|
296
300
|
return defineCall({
|
|
297
|
-
address:
|
|
298
|
-
abi:
|
|
301
|
+
address: Addresses.feeManager,
|
|
302
|
+
abi: Abis.feeAmm,
|
|
299
303
|
args: [poolId, address],
|
|
300
304
|
functionName: 'liquidityBalances',
|
|
301
305
|
})
|
|
@@ -369,9 +373,15 @@ export namespace rebalanceSwap {
|
|
|
369
373
|
client: Client<Transport, chain, account>,
|
|
370
374
|
parameters: rebalanceSwap.Parameters<chain, account>,
|
|
371
375
|
): Promise<ReturnType<action>> {
|
|
372
|
-
const
|
|
376
|
+
const { userToken, validatorToken, amountOut, to, ...rest } = parameters
|
|
377
|
+
const call = rebalanceSwap.call({
|
|
378
|
+
userToken,
|
|
379
|
+
validatorToken,
|
|
380
|
+
amountOut,
|
|
381
|
+
to,
|
|
382
|
+
})
|
|
373
383
|
return (await action(client, {
|
|
374
|
-
...
|
|
384
|
+
...rest,
|
|
375
385
|
...call,
|
|
376
386
|
} as never)) as never
|
|
377
387
|
}
|
|
@@ -419,8 +429,8 @@ export namespace rebalanceSwap {
|
|
|
419
429
|
export function call(args: Args) {
|
|
420
430
|
const { userToken, validatorToken, amountOut, to } = args
|
|
421
431
|
return defineCall({
|
|
422
|
-
address:
|
|
423
|
-
abi:
|
|
432
|
+
address: Addresses.feeManager,
|
|
433
|
+
abi: Abis.feeAmm,
|
|
424
434
|
functionName: 'rebalanceSwap',
|
|
425
435
|
args: [
|
|
426
436
|
TokenId.toAddress(userToken),
|
|
@@ -439,7 +449,7 @@ export namespace rebalanceSwap {
|
|
|
439
449
|
*/
|
|
440
450
|
export function extractEvent(logs: Log[]) {
|
|
441
451
|
const [log] = parseEventLogs({
|
|
442
|
-
abi:
|
|
452
|
+
abi: Abis.feeAmm,
|
|
443
453
|
logs,
|
|
444
454
|
eventName: 'RebalanceSwap',
|
|
445
455
|
strict: true,
|
|
@@ -506,7 +516,7 @@ export namespace rebalanceSwapSync {
|
|
|
506
516
|
|
|
507
517
|
export type ReturnValue = Compute<
|
|
508
518
|
GetEventArgs<
|
|
509
|
-
typeof
|
|
519
|
+
typeof Abis.feeAmm,
|
|
510
520
|
'RebalanceSwap',
|
|
511
521
|
{ IndexedOnly: false; Required: true }
|
|
512
522
|
> & {
|
|
@@ -596,9 +606,10 @@ export namespace mint {
|
|
|
596
606
|
client: Client<Transport, chain, account>,
|
|
597
607
|
parameters: mint.Parameters<chain, account>,
|
|
598
608
|
): Promise<ReturnType<action>> {
|
|
599
|
-
const
|
|
609
|
+
const { to, userToken, validatorToken, ...rest } = parameters
|
|
610
|
+
const call = mint.call({ to, userToken, validatorToken })
|
|
600
611
|
return (await action(client, {
|
|
601
|
-
...
|
|
612
|
+
...rest,
|
|
602
613
|
...call,
|
|
603
614
|
} as never)) as never
|
|
604
615
|
}
|
|
@@ -656,8 +667,8 @@ export namespace mint {
|
|
|
656
667
|
export function call(args: Args) {
|
|
657
668
|
const { to, userToken, validatorToken } = args
|
|
658
669
|
return defineCall({
|
|
659
|
-
address:
|
|
660
|
-
abi:
|
|
670
|
+
address: Addresses.feeManager,
|
|
671
|
+
abi: Abis.feeAmm,
|
|
661
672
|
functionName: 'mint',
|
|
662
673
|
args: [
|
|
663
674
|
TokenId.toAddress(userToken.address),
|
|
@@ -677,7 +688,7 @@ export namespace mint {
|
|
|
677
688
|
*/
|
|
678
689
|
export function extractEvent(logs: Log[]) {
|
|
679
690
|
const [log] = parseEventLogs({
|
|
680
|
-
abi:
|
|
691
|
+
abi: Abis.feeAmm,
|
|
681
692
|
logs,
|
|
682
693
|
eventName: 'Mint',
|
|
683
694
|
strict: true,
|
|
@@ -749,7 +760,7 @@ export namespace mintSync {
|
|
|
749
760
|
|
|
750
761
|
export type ReturnValue = Compute<
|
|
751
762
|
GetEventArgs<
|
|
752
|
-
typeof
|
|
763
|
+
typeof Abis.feeAmm,
|
|
753
764
|
'Mint',
|
|
754
765
|
{ IndexedOnly: false; Required: true }
|
|
755
766
|
> & {
|
|
@@ -826,9 +837,10 @@ export namespace burn {
|
|
|
826
837
|
client: Client<Transport, chain, account>,
|
|
827
838
|
parameters: burn.Parameters<chain, account>,
|
|
828
839
|
): Promise<ReturnType<action>> {
|
|
829
|
-
const
|
|
840
|
+
const { liquidity, to, userToken, validatorToken, ...rest } = parameters
|
|
841
|
+
const call = burn.call({ liquidity, to, userToken, validatorToken })
|
|
830
842
|
return (await action(client, {
|
|
831
|
-
...
|
|
843
|
+
...rest,
|
|
832
844
|
...call,
|
|
833
845
|
} as never)) as never
|
|
834
846
|
}
|
|
@@ -876,8 +888,8 @@ export namespace burn {
|
|
|
876
888
|
export function call(args: Args) {
|
|
877
889
|
const { liquidity, to, userToken, validatorToken } = args
|
|
878
890
|
return defineCall({
|
|
879
|
-
address:
|
|
880
|
-
abi:
|
|
891
|
+
address: Addresses.feeManager,
|
|
892
|
+
abi: Abis.feeAmm,
|
|
881
893
|
functionName: 'burn',
|
|
882
894
|
args: [
|
|
883
895
|
TokenId.toAddress(userToken),
|
|
@@ -896,7 +908,7 @@ export namespace burn {
|
|
|
896
908
|
*/
|
|
897
909
|
export function extractEvent(logs: Log[]) {
|
|
898
910
|
const [log] = parseEventLogs({
|
|
899
|
-
abi:
|
|
911
|
+
abi: Abis.feeAmm,
|
|
900
912
|
logs,
|
|
901
913
|
eventName: 'Burn',
|
|
902
914
|
strict: true,
|
|
@@ -963,7 +975,7 @@ export namespace burnSync {
|
|
|
963
975
|
|
|
964
976
|
export type ReturnValue = Compute<
|
|
965
977
|
GetEventArgs<
|
|
966
|
-
typeof
|
|
978
|
+
typeof Abis.feeAmm,
|
|
967
979
|
'Burn',
|
|
968
980
|
{ IndexedOnly: false; Required: true }
|
|
969
981
|
> & {
|
|
@@ -1008,8 +1020,8 @@ export function watchRebalanceSwap<
|
|
|
1008
1020
|
const { onRebalanceSwap, userToken, validatorToken, ...rest } = parameters
|
|
1009
1021
|
return watchContractEvent(client, {
|
|
1010
1022
|
...rest,
|
|
1011
|
-
address:
|
|
1012
|
-
abi:
|
|
1023
|
+
address: Addresses.feeManager,
|
|
1024
|
+
abi: Abis.feeAmm,
|
|
1013
1025
|
eventName: 'RebalanceSwap',
|
|
1014
1026
|
args:
|
|
1015
1027
|
userToken !== undefined && validatorToken !== undefined
|
|
@@ -1027,7 +1039,7 @@ export function watchRebalanceSwap<
|
|
|
1027
1039
|
|
|
1028
1040
|
export declare namespace watchRebalanceSwap {
|
|
1029
1041
|
export type Args = GetEventArgs<
|
|
1030
|
-
typeof
|
|
1042
|
+
typeof Abis.feeAmm,
|
|
1031
1043
|
'RebalanceSwap',
|
|
1032
1044
|
{ IndexedOnly: false; Required: true }
|
|
1033
1045
|
>
|
|
@@ -1036,12 +1048,12 @@ export declare namespace watchRebalanceSwap {
|
|
|
1036
1048
|
bigint,
|
|
1037
1049
|
number,
|
|
1038
1050
|
false,
|
|
1039
|
-
ExtractAbiItem<typeof
|
|
1051
|
+
ExtractAbiItem<typeof Abis.feeAmm, 'RebalanceSwap'>,
|
|
1040
1052
|
true
|
|
1041
1053
|
>
|
|
1042
1054
|
|
|
1043
1055
|
export type Parameters = UnionOmit<
|
|
1044
|
-
WatchContractEventParameters<typeof
|
|
1056
|
+
WatchContractEventParameters<typeof Abis.feeAmm, 'RebalanceSwap', true>,
|
|
1045
1057
|
'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'
|
|
1046
1058
|
> & {
|
|
1047
1059
|
/** Callback to invoke when a rebalance swap occurs. */
|
|
@@ -1088,8 +1100,8 @@ export function watchFeeSwap<
|
|
|
1088
1100
|
const { onFeeSwap, userToken, validatorToken, ...rest } = parameters
|
|
1089
1101
|
return watchContractEvent(client, {
|
|
1090
1102
|
...rest,
|
|
1091
|
-
address:
|
|
1092
|
-
abi:
|
|
1103
|
+
address: Addresses.feeManager,
|
|
1104
|
+
abi: Abis.feeAmm,
|
|
1093
1105
|
eventName: 'FeeSwap',
|
|
1094
1106
|
args:
|
|
1095
1107
|
userToken !== undefined && validatorToken !== undefined
|
|
@@ -1107,7 +1119,7 @@ export function watchFeeSwap<
|
|
|
1107
1119
|
|
|
1108
1120
|
export declare namespace watchFeeSwap {
|
|
1109
1121
|
export type Args = GetEventArgs<
|
|
1110
|
-
typeof
|
|
1122
|
+
typeof Abis.feeAmm,
|
|
1111
1123
|
'FeeSwap',
|
|
1112
1124
|
{ IndexedOnly: false; Required: true }
|
|
1113
1125
|
>
|
|
@@ -1116,12 +1128,12 @@ export declare namespace watchFeeSwap {
|
|
|
1116
1128
|
bigint,
|
|
1117
1129
|
number,
|
|
1118
1130
|
false,
|
|
1119
|
-
ExtractAbiItem<typeof
|
|
1131
|
+
ExtractAbiItem<typeof Abis.feeAmm, 'FeeSwap'>,
|
|
1120
1132
|
true
|
|
1121
1133
|
>
|
|
1122
1134
|
|
|
1123
1135
|
export type Parameters = UnionOmit<
|
|
1124
|
-
WatchContractEventParameters<typeof
|
|
1136
|
+
WatchContractEventParameters<typeof Abis.feeAmm, 'FeeSwap', true>,
|
|
1125
1137
|
'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'
|
|
1126
1138
|
> & {
|
|
1127
1139
|
/** Callback to invoke when a fee swap occurs. */
|
|
@@ -1165,8 +1177,8 @@ export function watchMint<
|
|
|
1165
1177
|
const { onMint, sender, userToken, validatorToken, ...rest } = parameters
|
|
1166
1178
|
return watchContractEvent(client, {
|
|
1167
1179
|
...rest,
|
|
1168
|
-
address:
|
|
1169
|
-
abi:
|
|
1180
|
+
address: Addresses.feeManager,
|
|
1181
|
+
abi: Abis.feeAmm,
|
|
1170
1182
|
eventName: 'Mint',
|
|
1171
1183
|
args: {
|
|
1172
1184
|
...(sender !== undefined && {
|
|
@@ -1219,12 +1231,12 @@ export declare namespace watchMint {
|
|
|
1219
1231
|
bigint,
|
|
1220
1232
|
number,
|
|
1221
1233
|
false,
|
|
1222
|
-
ExtractAbiItem<typeof
|
|
1234
|
+
ExtractAbiItem<typeof Abis.feeAmm, 'Mint'>,
|
|
1223
1235
|
true
|
|
1224
1236
|
>
|
|
1225
1237
|
|
|
1226
1238
|
export type Parameters = UnionOmit<
|
|
1227
|
-
WatchContractEventParameters<typeof
|
|
1239
|
+
WatchContractEventParameters<typeof Abis.feeAmm, 'Mint', true>,
|
|
1228
1240
|
'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'
|
|
1229
1241
|
> & {
|
|
1230
1242
|
/** Callback to invoke when liquidity is added. */
|
|
@@ -1270,8 +1282,8 @@ export function watchBurn<
|
|
|
1270
1282
|
const { onBurn, userToken, validatorToken, ...rest } = parameters
|
|
1271
1283
|
return watchContractEvent(client, {
|
|
1272
1284
|
...rest,
|
|
1273
|
-
address:
|
|
1274
|
-
abi:
|
|
1285
|
+
address: Addresses.feeManager,
|
|
1286
|
+
abi: Abis.feeAmm,
|
|
1275
1287
|
eventName: 'Burn',
|
|
1276
1288
|
args:
|
|
1277
1289
|
userToken !== undefined && validatorToken !== undefined
|
|
@@ -1289,7 +1301,7 @@ export function watchBurn<
|
|
|
1289
1301
|
|
|
1290
1302
|
export declare namespace watchBurn {
|
|
1291
1303
|
export type Args = GetEventArgs<
|
|
1292
|
-
typeof
|
|
1304
|
+
typeof Abis.feeAmm,
|
|
1293
1305
|
'Burn',
|
|
1294
1306
|
{ IndexedOnly: false; Required: true }
|
|
1295
1307
|
>
|
|
@@ -1298,12 +1310,12 @@ export declare namespace watchBurn {
|
|
|
1298
1310
|
bigint,
|
|
1299
1311
|
number,
|
|
1300
1312
|
false,
|
|
1301
|
-
ExtractAbiItem<typeof
|
|
1313
|
+
ExtractAbiItem<typeof Abis.feeAmm, 'Burn'>,
|
|
1302
1314
|
true
|
|
1303
1315
|
>
|
|
1304
1316
|
|
|
1305
1317
|
export type Parameters = UnionOmit<
|
|
1306
|
-
WatchContractEventParameters<typeof
|
|
1318
|
+
WatchContractEventParameters<typeof Abis.feeAmm, 'Burn', true>,
|
|
1307
1319
|
'abi' | 'address' | 'batch' | 'eventName' | 'onLogs' | 'strict'
|
|
1308
1320
|
> & {
|
|
1309
1321
|
/** Callback to invoke when liquidity is removed. */
|