@azuro-org/toolkit 5.0.0-beta.7 → 5.0.0-beta.8
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/abis/Core.d.ts +21 -1
- package/dist/abis/LP.d.ts +13 -1
- package/dist/abis/Relayer.d.ts +213 -0
- package/dist/config.d.ts +35 -0
- package/dist/docs/bets/fragments/legacyPrematchBet.d.ts +6 -0
- package/dist/docs/bets/legacyBets.d.ts +6 -0
- package/dist/envs.d.ts +0 -2
- package/dist/global.d.ts +3 -0
- package/dist/index.js +400 -74
- package/dist/utils/getEndpoints.d.ts +3 -3
- package/package.json +1 -1
package/dist/abis/Core.d.ts
CHANGED
|
@@ -580,6 +580,18 @@ declare const _default: readonly [{
|
|
|
580
580
|
readonly internalType: "uint256";
|
|
581
581
|
readonly name: "relayerFeeAmount";
|
|
582
582
|
readonly type: "uint256";
|
|
583
|
+
}, {
|
|
584
|
+
readonly internalType: "bool";
|
|
585
|
+
readonly name: "isFeeSponsored";
|
|
586
|
+
readonly type: "bool";
|
|
587
|
+
}, {
|
|
588
|
+
readonly internalType: "bool";
|
|
589
|
+
readonly name: "isBetSponsored";
|
|
590
|
+
readonly type: "bool";
|
|
591
|
+
}, {
|
|
592
|
+
readonly internalType: "bool";
|
|
593
|
+
readonly name: "isSponsoredBetReturnable";
|
|
594
|
+
readonly type: "bool";
|
|
583
595
|
}];
|
|
584
596
|
readonly internalType: "struct IOrder.ClientData";
|
|
585
597
|
readonly name: "clientData";
|
|
@@ -712,6 +724,10 @@ declare const _default: readonly [{
|
|
|
712
724
|
readonly internalType: "uint128";
|
|
713
725
|
readonly name: "totalAmount";
|
|
714
726
|
readonly type: "uint128";
|
|
727
|
+
}, {
|
|
728
|
+
readonly internalType: "uint128[]";
|
|
729
|
+
readonly name: "amounts";
|
|
730
|
+
readonly type: "uint128[]";
|
|
715
731
|
}];
|
|
716
732
|
readonly stateMutability: "pure";
|
|
717
733
|
readonly type: "function";
|
|
@@ -894,7 +910,11 @@ declare const _default: readonly [{
|
|
|
894
910
|
readonly type: "bytes";
|
|
895
911
|
}];
|
|
896
912
|
readonly name: "putOrder";
|
|
897
|
-
readonly outputs: readonly [
|
|
913
|
+
readonly outputs: readonly [{
|
|
914
|
+
readonly internalType: "uint256[]";
|
|
915
|
+
readonly name: "";
|
|
916
|
+
readonly type: "uint256[]";
|
|
917
|
+
}];
|
|
898
918
|
readonly stateMutability: "nonpayable";
|
|
899
919
|
readonly type: "function";
|
|
900
920
|
}, {
|
package/dist/abis/LP.d.ts
CHANGED
|
@@ -50,6 +50,14 @@ declare const _default: readonly [{
|
|
|
50
50
|
readonly inputs: readonly [];
|
|
51
51
|
readonly name: "LiquidityNotOwned";
|
|
52
52
|
readonly type: "error";
|
|
53
|
+
}, {
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly internalType: "uint256";
|
|
56
|
+
readonly name: "tokenId";
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
}];
|
|
59
|
+
readonly name: "LockedBetToken";
|
|
60
|
+
readonly type: "error";
|
|
53
61
|
}, {
|
|
54
62
|
readonly inputs: readonly [];
|
|
55
63
|
readonly name: "LockedLiquidityComboLimitReached";
|
|
@@ -497,7 +505,11 @@ declare const _default: readonly [{
|
|
|
497
505
|
readonly type: "bytes";
|
|
498
506
|
}];
|
|
499
507
|
readonly name: "betOrder";
|
|
500
|
-
readonly outputs: readonly [
|
|
508
|
+
readonly outputs: readonly [{
|
|
509
|
+
readonly internalType: "uint256[]";
|
|
510
|
+
readonly name: "";
|
|
511
|
+
readonly type: "uint256[]";
|
|
512
|
+
}];
|
|
501
513
|
readonly stateMutability: "nonpayable";
|
|
502
514
|
readonly type: "function";
|
|
503
515
|
}, {
|
package/dist/abis/Relayer.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ declare const _default: readonly [{
|
|
|
2
2
|
readonly inputs: readonly [];
|
|
3
3
|
readonly stateMutability: "nonpayable";
|
|
4
4
|
readonly type: "constructor";
|
|
5
|
+
}, {
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly name: "IncorrectAddress";
|
|
8
|
+
readonly type: "error";
|
|
5
9
|
}, {
|
|
6
10
|
readonly inputs: readonly [];
|
|
7
11
|
readonly name: "InvalidInitialization";
|
|
@@ -10,6 +14,10 @@ declare const _default: readonly [{
|
|
|
10
14
|
readonly inputs: readonly [];
|
|
11
15
|
readonly name: "NotInitializing";
|
|
12
16
|
readonly type: "error";
|
|
17
|
+
}, {
|
|
18
|
+
readonly inputs: readonly [];
|
|
19
|
+
readonly name: "OnlyPaymaster";
|
|
20
|
+
readonly type: "error";
|
|
13
21
|
}, {
|
|
14
22
|
readonly inputs: readonly [{
|
|
15
23
|
readonly internalType: "address";
|
|
@@ -26,6 +34,36 @@ declare const _default: readonly [{
|
|
|
26
34
|
}];
|
|
27
35
|
readonly name: "OwnableUnauthorizedAccount";
|
|
28
36
|
readonly type: "error";
|
|
37
|
+
}, {
|
|
38
|
+
readonly anonymous: false;
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly indexed: true;
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "relayer";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly indexed: true;
|
|
46
|
+
readonly internalType: "address";
|
|
47
|
+
readonly name: "affiliate";
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
}, {
|
|
50
|
+
readonly indexed: true;
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
readonly name: "bettor";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}, {
|
|
55
|
+
readonly indexed: false;
|
|
56
|
+
readonly internalType: "uint256[]";
|
|
57
|
+
readonly name: "tokenIds";
|
|
58
|
+
readonly type: "uint256[]";
|
|
59
|
+
}, {
|
|
60
|
+
readonly indexed: false;
|
|
61
|
+
readonly internalType: "uint256";
|
|
62
|
+
readonly name: "amount";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
}];
|
|
65
|
+
readonly name: "FeeSponsored";
|
|
66
|
+
readonly type: "event";
|
|
29
67
|
}, {
|
|
30
68
|
readonly anonymous: false;
|
|
31
69
|
readonly inputs: readonly [{
|
|
@@ -51,6 +89,16 @@ declare const _default: readonly [{
|
|
|
51
89
|
}];
|
|
52
90
|
readonly name: "OwnershipTransferred";
|
|
53
91
|
readonly type: "event";
|
|
92
|
+
}, {
|
|
93
|
+
readonly anonymous: false;
|
|
94
|
+
readonly inputs: readonly [{
|
|
95
|
+
readonly indexed: true;
|
|
96
|
+
readonly internalType: "address";
|
|
97
|
+
readonly name: "payMaster";
|
|
98
|
+
readonly type: "address";
|
|
99
|
+
}];
|
|
100
|
+
readonly name: "PayMasterChanged";
|
|
101
|
+
readonly type: "event";
|
|
54
102
|
}, {
|
|
55
103
|
readonly anonymous: false;
|
|
56
104
|
readonly inputs: readonly [{
|
|
@@ -174,6 +222,141 @@ declare const _default: readonly [{
|
|
|
174
222
|
readonly outputs: readonly [];
|
|
175
223
|
readonly stateMutability: "nonpayable";
|
|
176
224
|
readonly type: "function";
|
|
225
|
+
}, {
|
|
226
|
+
readonly inputs: readonly [{
|
|
227
|
+
readonly internalType: "address";
|
|
228
|
+
readonly name: "relayExecutor";
|
|
229
|
+
readonly type: "address";
|
|
230
|
+
}, {
|
|
231
|
+
readonly components: readonly [{
|
|
232
|
+
readonly internalType: "string";
|
|
233
|
+
readonly name: "attention";
|
|
234
|
+
readonly type: "string";
|
|
235
|
+
}, {
|
|
236
|
+
readonly internalType: "address";
|
|
237
|
+
readonly name: "affiliate";
|
|
238
|
+
readonly type: "address";
|
|
239
|
+
}, {
|
|
240
|
+
readonly internalType: "address";
|
|
241
|
+
readonly name: "core";
|
|
242
|
+
readonly type: "address";
|
|
243
|
+
}, {
|
|
244
|
+
readonly internalType: "uint256";
|
|
245
|
+
readonly name: "expiresAt";
|
|
246
|
+
readonly type: "uint256";
|
|
247
|
+
}, {
|
|
248
|
+
readonly internalType: "uint256";
|
|
249
|
+
readonly name: "chainId";
|
|
250
|
+
readonly type: "uint256";
|
|
251
|
+
}, {
|
|
252
|
+
readonly internalType: "uint256";
|
|
253
|
+
readonly name: "relayerFeeAmount";
|
|
254
|
+
readonly type: "uint256";
|
|
255
|
+
}, {
|
|
256
|
+
readonly internalType: "bool";
|
|
257
|
+
readonly name: "isFeeSponsored";
|
|
258
|
+
readonly type: "bool";
|
|
259
|
+
}, {
|
|
260
|
+
readonly internalType: "bool";
|
|
261
|
+
readonly name: "isBetSponsored";
|
|
262
|
+
readonly type: "bool";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "bool";
|
|
265
|
+
readonly name: "isSponsoredBetReturnable";
|
|
266
|
+
readonly type: "bool";
|
|
267
|
+
}];
|
|
268
|
+
readonly internalType: "struct IOrder.ClientData";
|
|
269
|
+
readonly name: "data";
|
|
270
|
+
readonly type: "tuple";
|
|
271
|
+
}, {
|
|
272
|
+
readonly components: readonly [{
|
|
273
|
+
readonly internalType: "address";
|
|
274
|
+
readonly name: "betOwner";
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
}, {
|
|
277
|
+
readonly components: readonly [{
|
|
278
|
+
readonly internalType: "uint256";
|
|
279
|
+
readonly name: "gameId";
|
|
280
|
+
readonly type: "uint256";
|
|
281
|
+
}, {
|
|
282
|
+
readonly internalType: "uint256";
|
|
283
|
+
readonly name: "conditionId";
|
|
284
|
+
readonly type: "uint256";
|
|
285
|
+
}, {
|
|
286
|
+
readonly internalType: "enum IOrder.ConditionKind";
|
|
287
|
+
readonly name: "conditionKind";
|
|
288
|
+
readonly type: "uint8";
|
|
289
|
+
}, {
|
|
290
|
+
readonly internalType: "uint64[]";
|
|
291
|
+
readonly name: "odds";
|
|
292
|
+
readonly type: "uint64[]";
|
|
293
|
+
}, {
|
|
294
|
+
readonly internalType: "uint128[]";
|
|
295
|
+
readonly name: "outcomes";
|
|
296
|
+
readonly type: "uint128[]";
|
|
297
|
+
}, {
|
|
298
|
+
readonly internalType: "uint128";
|
|
299
|
+
readonly name: "potentialLossLimit";
|
|
300
|
+
readonly type: "uint128";
|
|
301
|
+
}, {
|
|
302
|
+
readonly internalType: "uint8";
|
|
303
|
+
readonly name: "winningOutcomesCount";
|
|
304
|
+
readonly type: "uint8";
|
|
305
|
+
}];
|
|
306
|
+
readonly internalType: "struct IOrder.ConditionData[]";
|
|
307
|
+
readonly name: "conditionDatas";
|
|
308
|
+
readonly type: "tuple[]";
|
|
309
|
+
}, {
|
|
310
|
+
readonly internalType: "enum IOrder.BetType";
|
|
311
|
+
readonly name: "betType";
|
|
312
|
+
readonly type: "uint8";
|
|
313
|
+
}, {
|
|
314
|
+
readonly internalType: "address";
|
|
315
|
+
readonly name: "oracle";
|
|
316
|
+
readonly type: "address";
|
|
317
|
+
}, {
|
|
318
|
+
readonly internalType: "bytes";
|
|
319
|
+
readonly name: "clientBetData";
|
|
320
|
+
readonly type: "bytes";
|
|
321
|
+
}, {
|
|
322
|
+
readonly internalType: "bytes";
|
|
323
|
+
readonly name: "bettorSignature";
|
|
324
|
+
readonly type: "bytes";
|
|
325
|
+
}, {
|
|
326
|
+
readonly internalType: "bytes";
|
|
327
|
+
readonly name: "oracleSignature";
|
|
328
|
+
readonly type: "bytes";
|
|
329
|
+
}];
|
|
330
|
+
readonly internalType: "struct IOrder.OrderData";
|
|
331
|
+
readonly name: "order";
|
|
332
|
+
readonly type: "tuple";
|
|
333
|
+
}, {
|
|
334
|
+
readonly internalType: "address";
|
|
335
|
+
readonly name: "betOwner";
|
|
336
|
+
readonly type: "address";
|
|
337
|
+
}, {
|
|
338
|
+
readonly internalType: "bytes";
|
|
339
|
+
readonly name: "hashes";
|
|
340
|
+
readonly type: "bytes";
|
|
341
|
+
}];
|
|
342
|
+
readonly name: "betOrder";
|
|
343
|
+
readonly outputs: readonly [{
|
|
344
|
+
readonly internalType: "uint256[]";
|
|
345
|
+
readonly name: "tokenIds";
|
|
346
|
+
readonly type: "uint256[]";
|
|
347
|
+
}];
|
|
348
|
+
readonly stateMutability: "nonpayable";
|
|
349
|
+
readonly type: "function";
|
|
350
|
+
}, {
|
|
351
|
+
readonly inputs: readonly [{
|
|
352
|
+
readonly internalType: "address";
|
|
353
|
+
readonly name: "payMaster_";
|
|
354
|
+
readonly type: "address";
|
|
355
|
+
}];
|
|
356
|
+
readonly name: "changePayMaster";
|
|
357
|
+
readonly outputs: readonly [];
|
|
358
|
+
readonly stateMutability: "nonpayable";
|
|
359
|
+
readonly type: "function";
|
|
177
360
|
}, {
|
|
178
361
|
readonly inputs: readonly [{
|
|
179
362
|
readonly components: readonly [{
|
|
@@ -264,6 +447,18 @@ declare const _default: readonly [{
|
|
|
264
447
|
readonly internalType: "uint256";
|
|
265
448
|
readonly name: "relayerFeeAmount";
|
|
266
449
|
readonly type: "uint256";
|
|
450
|
+
}, {
|
|
451
|
+
readonly internalType: "bool";
|
|
452
|
+
readonly name: "isFeeSponsored";
|
|
453
|
+
readonly type: "bool";
|
|
454
|
+
}, {
|
|
455
|
+
readonly internalType: "bool";
|
|
456
|
+
readonly name: "isBetSponsored";
|
|
457
|
+
readonly type: "bool";
|
|
458
|
+
}, {
|
|
459
|
+
readonly internalType: "bool";
|
|
460
|
+
readonly name: "isSponsoredBetReturnable";
|
|
461
|
+
readonly type: "bool";
|
|
267
462
|
}];
|
|
268
463
|
readonly internalType: "struct IOrder.ClientData";
|
|
269
464
|
readonly name: "clientData";
|
|
@@ -340,6 +535,10 @@ declare const _default: readonly [{
|
|
|
340
535
|
readonly internalType: "uint128";
|
|
341
536
|
readonly name: "totalAmount";
|
|
342
537
|
readonly type: "uint128";
|
|
538
|
+
}, {
|
|
539
|
+
readonly internalType: "uint128[]";
|
|
540
|
+
readonly name: "amounts";
|
|
541
|
+
readonly type: "uint128[]";
|
|
343
542
|
}];
|
|
344
543
|
readonly stateMutability: "pure";
|
|
345
544
|
readonly type: "function";
|
|
@@ -348,6 +547,10 @@ declare const _default: readonly [{
|
|
|
348
547
|
readonly internalType: "address";
|
|
349
548
|
readonly name: "lp_";
|
|
350
549
|
readonly type: "address";
|
|
550
|
+
}, {
|
|
551
|
+
readonly internalType: "address";
|
|
552
|
+
readonly name: "payMaster_";
|
|
553
|
+
readonly type: "address";
|
|
351
554
|
}];
|
|
352
555
|
readonly name: "initialize";
|
|
353
556
|
readonly outputs: readonly [];
|
|
@@ -373,6 +576,16 @@ declare const _default: readonly [{
|
|
|
373
576
|
}];
|
|
374
577
|
readonly stateMutability: "view";
|
|
375
578
|
readonly type: "function";
|
|
579
|
+
}, {
|
|
580
|
+
readonly inputs: readonly [];
|
|
581
|
+
readonly name: "payMaster";
|
|
582
|
+
readonly outputs: readonly [{
|
|
583
|
+
readonly internalType: "contract IPayMaster";
|
|
584
|
+
readonly name: "";
|
|
585
|
+
readonly type: "address";
|
|
586
|
+
}];
|
|
587
|
+
readonly stateMutability: "view";
|
|
588
|
+
readonly type: "function";
|
|
376
589
|
}, {
|
|
377
590
|
readonly inputs: readonly [];
|
|
378
591
|
readonly name: "renounceOwnership";
|
package/dist/config.d.ts
CHANGED
|
@@ -20,6 +20,15 @@ export declare const CLIENT_DATA_TYPES: readonly [{
|
|
|
20
20
|
}, {
|
|
21
21
|
readonly name: "relayerFeeAmount";
|
|
22
22
|
readonly type: "uint256";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "isFeeSponsored";
|
|
25
|
+
readonly type: "bool";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "isBetSponsored";
|
|
28
|
+
readonly type: "bool";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "isSponsoredBetReturnable";
|
|
31
|
+
readonly type: "bool";
|
|
23
32
|
}];
|
|
24
33
|
export declare const BET_DATA_TYPES: {
|
|
25
34
|
readonly ClientBetData: readonly [{
|
|
@@ -47,6 +56,15 @@ export declare const BET_DATA_TYPES: {
|
|
|
47
56
|
}, {
|
|
48
57
|
readonly name: "relayerFeeAmount";
|
|
49
58
|
readonly type: "uint256";
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "isFeeSponsored";
|
|
61
|
+
readonly type: "bool";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "isBetSponsored";
|
|
64
|
+
readonly type: "bool";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "isSponsoredBetReturnable";
|
|
67
|
+
readonly type: "bool";
|
|
50
68
|
}];
|
|
51
69
|
readonly SubBet: readonly [{
|
|
52
70
|
readonly name: "conditionId";
|
|
@@ -100,6 +118,15 @@ export declare const COMBO_BET_DATA_TYPES: {
|
|
|
100
118
|
}, {
|
|
101
119
|
readonly name: "relayerFeeAmount";
|
|
102
120
|
readonly type: "uint256";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "isFeeSponsored";
|
|
123
|
+
readonly type: "bool";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "isBetSponsored";
|
|
126
|
+
readonly type: "bool";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "isSponsoredBetReturnable";
|
|
129
|
+
readonly type: "bool";
|
|
103
130
|
}];
|
|
104
131
|
readonly ComboPart: readonly [{
|
|
105
132
|
readonly name: "conditionId";
|
|
@@ -138,6 +165,14 @@ export declare const CASHOUT_DATA_TYPES: {
|
|
|
138
165
|
};
|
|
139
166
|
export declare const CASHOUT_TYPED_DATA_DOMAIN_NAME = "Cash Out";
|
|
140
167
|
export declare const CASHOUT_TYPED_DATA_DOMAIN_VERSION = "1.0.0";
|
|
168
|
+
export declare const gnosisData: ChainData;
|
|
169
|
+
export declare const gnosisDevData: ChainData;
|
|
170
|
+
export declare const polygonData: ChainData;
|
|
171
|
+
export declare const polygonAmoyData: ChainData;
|
|
172
|
+
export declare const chilizData: ChainData;
|
|
173
|
+
export declare const spicyData: ChainData;
|
|
174
|
+
export declare const baseSepoliaData: ChainData;
|
|
175
|
+
export declare const baseData: ChainData;
|
|
141
176
|
export declare const chainsData: {
|
|
142
177
|
100: ChainData;
|
|
143
178
|
137: ChainData;
|
|
@@ -44,11 +44,17 @@ export type LegacyPrematchBetFragment = {
|
|
|
44
44
|
title?: string | null;
|
|
45
45
|
startsAt: string;
|
|
46
46
|
status: Types.GameStatus;
|
|
47
|
+
slug?: string | null;
|
|
47
48
|
sport: {
|
|
48
49
|
__typename?: 'Sport';
|
|
49
50
|
sportId: string;
|
|
50
51
|
slug: string;
|
|
51
52
|
name: string;
|
|
53
|
+
sporthub: {
|
|
54
|
+
__typename?: 'SportHub';
|
|
55
|
+
id: string;
|
|
56
|
+
slug: string;
|
|
57
|
+
};
|
|
52
58
|
};
|
|
53
59
|
league: {
|
|
54
60
|
__typename?: 'League';
|
|
@@ -53,11 +53,17 @@ export type LegacyBetsQuery = {
|
|
|
53
53
|
title?: string | null;
|
|
54
54
|
startsAt: string;
|
|
55
55
|
status: Types.GameStatus;
|
|
56
|
+
slug?: string | null;
|
|
56
57
|
sport: {
|
|
57
58
|
__typename?: 'Sport';
|
|
58
59
|
sportId: string;
|
|
59
60
|
slug: string;
|
|
60
61
|
name: string;
|
|
62
|
+
sporthub: {
|
|
63
|
+
__typename?: 'SportHub';
|
|
64
|
+
id: string;
|
|
65
|
+
slug: string;
|
|
66
|
+
};
|
|
61
67
|
};
|
|
62
68
|
league: {
|
|
63
69
|
__typename?: 'League';
|
package/dist/envs.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export declare const isDevEnabled: boolean;
|
|
2
1
|
export declare enum Environment {
|
|
3
2
|
GnosisDevXDAI = "GnosisDevXDAI",
|
|
4
3
|
GnosisXDAI = "GnosisXDAI",
|
|
5
4
|
PolygonUSDT = "PolygonUSDT",
|
|
6
|
-
PolygonAmoyAZUSD = "PolygonAmoyAZUSD",
|
|
7
5
|
PolygonAmoyUSDT = "PolygonAmoyUSDT",
|
|
8
6
|
ChilizWCHZ = "ChilizWCHZ",
|
|
9
7
|
ChilizSpicyWCHZ = "ChilizSpicyWCHZ",
|
package/dist/global.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {gnosis,polygon,polygonAmoy,chiliz,spicy,base,baseSepolia}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {parseUnits,formatUnits}from'viem';
|
|
2
|
-
var Environment;
|
|
1
|
+
import {gnosis,polygon,polygonAmoy,chiliz,spicy,base,baseSepolia}from'viem/chains';import gql from'graphql-tag';import {getMarketKey,getMarketName,getMarketDescription,dictionaries,getSelectionName}from'@azuro-org/dictionaries';import {parseUnits,formatUnits}from'viem';var Environment;
|
|
3
2
|
(function (Environment) {
|
|
4
3
|
Environment["GnosisDevXDAI"] = "GnosisDevXDAI";
|
|
5
4
|
Environment["GnosisXDAI"] = "GnosisXDAI";
|
|
6
5
|
Environment["PolygonUSDT"] = "PolygonUSDT";
|
|
7
|
-
|
|
6
|
+
// PolygonAmoyAZUSD = 'PolygonAmoyAZUSD',
|
|
8
7
|
Environment["PolygonAmoyUSDT"] = "PolygonAmoyUSDT";
|
|
9
8
|
Environment["ChilizWCHZ"] = "ChilizWCHZ";
|
|
10
9
|
Environment["ChilizSpicyWCHZ"] = "ChilizSpicyWCHZ";
|
|
@@ -12,9 +11,9 @@ var Environment;
|
|
|
12
11
|
Environment["BaseSepoliaWETH"] = "BaseSepoliaWETH";
|
|
13
12
|
})(Environment || (Environment = {}));
|
|
14
13
|
const environments = {
|
|
15
|
-
[gnosis.id]:
|
|
14
|
+
[gnosis.id]: Environment.GnosisXDAI,
|
|
16
15
|
[polygon.id]: Environment.PolygonUSDT,
|
|
17
|
-
[polygonAmoy.id]:
|
|
16
|
+
[polygonAmoy.id]: Environment.PolygonAmoyUSDT,
|
|
18
17
|
[chiliz.id]: Environment.ChilizWCHZ,
|
|
19
18
|
[spicy.id]: Environment.ChilizSpicyWCHZ,
|
|
20
19
|
[base.id]: Environment.BaseWETH,
|
|
@@ -86,6 +85,17 @@ const environments = {
|
|
|
86
85
|
'name': 'LiquidityNotOwned',
|
|
87
86
|
'type': 'error',
|
|
88
87
|
},
|
|
88
|
+
{
|
|
89
|
+
'inputs': [
|
|
90
|
+
{
|
|
91
|
+
'internalType': 'uint256',
|
|
92
|
+
'name': 'tokenId',
|
|
93
|
+
'type': 'uint256',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
'name': 'LockedBetToken',
|
|
97
|
+
'type': 'error',
|
|
98
|
+
},
|
|
89
99
|
{
|
|
90
100
|
'inputs': [],
|
|
91
101
|
'name': 'LockedLiquidityComboLimitReached',
|
|
@@ -659,7 +669,13 @@ const environments = {
|
|
|
659
669
|
},
|
|
660
670
|
],
|
|
661
671
|
'name': 'betOrder',
|
|
662
|
-
'outputs': [
|
|
672
|
+
'outputs': [
|
|
673
|
+
{
|
|
674
|
+
'internalType': 'uint256[]',
|
|
675
|
+
'name': '',
|
|
676
|
+
'type': 'uint256[]',
|
|
677
|
+
},
|
|
678
|
+
],
|
|
663
679
|
'stateMutability': 'nonpayable',
|
|
664
680
|
'type': 'function',
|
|
665
681
|
},
|
|
@@ -2102,6 +2118,21 @@ const environments = {
|
|
|
2102
2118
|
'name': 'relayerFeeAmount',
|
|
2103
2119
|
'type': 'uint256',
|
|
2104
2120
|
},
|
|
2121
|
+
{
|
|
2122
|
+
'internalType': 'bool',
|
|
2123
|
+
'name': 'isFeeSponsored',
|
|
2124
|
+
'type': 'bool',
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
'internalType': 'bool',
|
|
2128
|
+
'name': 'isBetSponsored',
|
|
2129
|
+
'type': 'bool',
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
'internalType': 'bool',
|
|
2133
|
+
'name': 'isSponsoredBetReturnable',
|
|
2134
|
+
'type': 'bool',
|
|
2135
|
+
},
|
|
2105
2136
|
],
|
|
2106
2137
|
'internalType': 'struct IOrder.ClientData',
|
|
2107
2138
|
'name': 'clientData',
|
|
@@ -2273,6 +2304,11 @@ const environments = {
|
|
|
2273
2304
|
'name': 'totalAmount',
|
|
2274
2305
|
'type': 'uint128',
|
|
2275
2306
|
},
|
|
2307
|
+
{
|
|
2308
|
+
'internalType': 'uint128[]',
|
|
2309
|
+
'name': 'amounts',
|
|
2310
|
+
'type': 'uint128[]',
|
|
2311
|
+
},
|
|
2276
2312
|
],
|
|
2277
2313
|
'stateMutability': 'pure',
|
|
2278
2314
|
'type': 'function',
|
|
@@ -2510,7 +2546,13 @@ const environments = {
|
|
|
2510
2546
|
},
|
|
2511
2547
|
],
|
|
2512
2548
|
'name': 'putOrder',
|
|
2513
|
-
'outputs': [
|
|
2549
|
+
'outputs': [
|
|
2550
|
+
{
|
|
2551
|
+
'internalType': 'uint256[]',
|
|
2552
|
+
'name': '',
|
|
2553
|
+
'type': 'uint256[]',
|
|
2554
|
+
},
|
|
2555
|
+
],
|
|
2514
2556
|
'stateMutability': 'nonpayable',
|
|
2515
2557
|
'type': 'function',
|
|
2516
2558
|
},
|
|
@@ -3973,6 +4015,11 @@ const environments = {
|
|
|
3973
4015
|
'stateMutability': 'nonpayable',
|
|
3974
4016
|
'type': 'constructor',
|
|
3975
4017
|
},
|
|
4018
|
+
{
|
|
4019
|
+
'inputs': [],
|
|
4020
|
+
'name': 'IncorrectAddress',
|
|
4021
|
+
'type': 'error',
|
|
4022
|
+
},
|
|
3976
4023
|
{
|
|
3977
4024
|
'inputs': [],
|
|
3978
4025
|
'name': 'InvalidInitialization',
|
|
@@ -3983,6 +4030,11 @@ const environments = {
|
|
|
3983
4030
|
'name': 'NotInitializing',
|
|
3984
4031
|
'type': 'error',
|
|
3985
4032
|
},
|
|
4033
|
+
{
|
|
4034
|
+
'inputs': [],
|
|
4035
|
+
'name': 'OnlyPaymaster',
|
|
4036
|
+
'type': 'error',
|
|
4037
|
+
},
|
|
3986
4038
|
{
|
|
3987
4039
|
'inputs': [
|
|
3988
4040
|
{
|
|
@@ -4005,6 +4057,43 @@ const environments = {
|
|
|
4005
4057
|
'name': 'OwnableUnauthorizedAccount',
|
|
4006
4058
|
'type': 'error',
|
|
4007
4059
|
},
|
|
4060
|
+
{
|
|
4061
|
+
'anonymous': false,
|
|
4062
|
+
'inputs': [
|
|
4063
|
+
{
|
|
4064
|
+
'indexed': true,
|
|
4065
|
+
'internalType': 'address',
|
|
4066
|
+
'name': 'relayer',
|
|
4067
|
+
'type': 'address',
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
'indexed': true,
|
|
4071
|
+
'internalType': 'address',
|
|
4072
|
+
'name': 'affiliate',
|
|
4073
|
+
'type': 'address',
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
'indexed': true,
|
|
4077
|
+
'internalType': 'address',
|
|
4078
|
+
'name': 'bettor',
|
|
4079
|
+
'type': 'address',
|
|
4080
|
+
},
|
|
4081
|
+
{
|
|
4082
|
+
'indexed': false,
|
|
4083
|
+
'internalType': 'uint256[]',
|
|
4084
|
+
'name': 'tokenIds',
|
|
4085
|
+
'type': 'uint256[]',
|
|
4086
|
+
},
|
|
4087
|
+
{
|
|
4088
|
+
'indexed': false,
|
|
4089
|
+
'internalType': 'uint256',
|
|
4090
|
+
'name': 'amount',
|
|
4091
|
+
'type': 'uint256',
|
|
4092
|
+
},
|
|
4093
|
+
],
|
|
4094
|
+
'name': 'FeeSponsored',
|
|
4095
|
+
'type': 'event',
|
|
4096
|
+
},
|
|
4008
4097
|
{
|
|
4009
4098
|
'anonymous': false,
|
|
4010
4099
|
'inputs': [
|
|
@@ -4037,6 +4126,19 @@ const environments = {
|
|
|
4037
4126
|
'name': 'OwnershipTransferred',
|
|
4038
4127
|
'type': 'event',
|
|
4039
4128
|
},
|
|
4129
|
+
{
|
|
4130
|
+
'anonymous': false,
|
|
4131
|
+
'inputs': [
|
|
4132
|
+
{
|
|
4133
|
+
'indexed': true,
|
|
4134
|
+
'internalType': 'address',
|
|
4135
|
+
'name': 'payMaster',
|
|
4136
|
+
'type': 'address',
|
|
4137
|
+
},
|
|
4138
|
+
],
|
|
4139
|
+
'name': 'PayMasterChanged',
|
|
4140
|
+
'type': 'event',
|
|
4141
|
+
},
|
|
4040
4142
|
{
|
|
4041
4143
|
'anonymous': false,
|
|
4042
4144
|
'inputs': [
|
|
@@ -4195,6 +4297,179 @@ const environments = {
|
|
|
4195
4297
|
'stateMutability': 'nonpayable',
|
|
4196
4298
|
'type': 'function',
|
|
4197
4299
|
},
|
|
4300
|
+
{
|
|
4301
|
+
'inputs': [
|
|
4302
|
+
{
|
|
4303
|
+
'internalType': 'address',
|
|
4304
|
+
'name': 'relayExecutor',
|
|
4305
|
+
'type': 'address',
|
|
4306
|
+
},
|
|
4307
|
+
{
|
|
4308
|
+
'components': [
|
|
4309
|
+
{
|
|
4310
|
+
'internalType': 'string',
|
|
4311
|
+
'name': 'attention',
|
|
4312
|
+
'type': 'string',
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
'internalType': 'address',
|
|
4316
|
+
'name': 'affiliate',
|
|
4317
|
+
'type': 'address',
|
|
4318
|
+
},
|
|
4319
|
+
{
|
|
4320
|
+
'internalType': 'address',
|
|
4321
|
+
'name': 'core',
|
|
4322
|
+
'type': 'address',
|
|
4323
|
+
},
|
|
4324
|
+
{
|
|
4325
|
+
'internalType': 'uint256',
|
|
4326
|
+
'name': 'expiresAt',
|
|
4327
|
+
'type': 'uint256',
|
|
4328
|
+
},
|
|
4329
|
+
{
|
|
4330
|
+
'internalType': 'uint256',
|
|
4331
|
+
'name': 'chainId',
|
|
4332
|
+
'type': 'uint256',
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
'internalType': 'uint256',
|
|
4336
|
+
'name': 'relayerFeeAmount',
|
|
4337
|
+
'type': 'uint256',
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
'internalType': 'bool',
|
|
4341
|
+
'name': 'isFeeSponsored',
|
|
4342
|
+
'type': 'bool',
|
|
4343
|
+
},
|
|
4344
|
+
{
|
|
4345
|
+
'internalType': 'bool',
|
|
4346
|
+
'name': 'isBetSponsored',
|
|
4347
|
+
'type': 'bool',
|
|
4348
|
+
},
|
|
4349
|
+
{
|
|
4350
|
+
'internalType': 'bool',
|
|
4351
|
+
'name': 'isSponsoredBetReturnable',
|
|
4352
|
+
'type': 'bool',
|
|
4353
|
+
},
|
|
4354
|
+
],
|
|
4355
|
+
'internalType': 'struct IOrder.ClientData',
|
|
4356
|
+
'name': 'data',
|
|
4357
|
+
'type': 'tuple',
|
|
4358
|
+
},
|
|
4359
|
+
{
|
|
4360
|
+
'components': [
|
|
4361
|
+
{
|
|
4362
|
+
'internalType': 'address',
|
|
4363
|
+
'name': 'betOwner',
|
|
4364
|
+
'type': 'address',
|
|
4365
|
+
},
|
|
4366
|
+
{
|
|
4367
|
+
'components': [
|
|
4368
|
+
{
|
|
4369
|
+
'internalType': 'uint256',
|
|
4370
|
+
'name': 'gameId',
|
|
4371
|
+
'type': 'uint256',
|
|
4372
|
+
},
|
|
4373
|
+
{
|
|
4374
|
+
'internalType': 'uint256',
|
|
4375
|
+
'name': 'conditionId',
|
|
4376
|
+
'type': 'uint256',
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
'internalType': 'enum IOrder.ConditionKind',
|
|
4380
|
+
'name': 'conditionKind',
|
|
4381
|
+
'type': 'uint8',
|
|
4382
|
+
},
|
|
4383
|
+
{
|
|
4384
|
+
'internalType': 'uint64[]',
|
|
4385
|
+
'name': 'odds',
|
|
4386
|
+
'type': 'uint64[]',
|
|
4387
|
+
},
|
|
4388
|
+
{
|
|
4389
|
+
'internalType': 'uint128[]',
|
|
4390
|
+
'name': 'outcomes',
|
|
4391
|
+
'type': 'uint128[]',
|
|
4392
|
+
},
|
|
4393
|
+
{
|
|
4394
|
+
'internalType': 'uint128',
|
|
4395
|
+
'name': 'potentialLossLimit',
|
|
4396
|
+
'type': 'uint128',
|
|
4397
|
+
},
|
|
4398
|
+
{
|
|
4399
|
+
'internalType': 'uint8',
|
|
4400
|
+
'name': 'winningOutcomesCount',
|
|
4401
|
+
'type': 'uint8',
|
|
4402
|
+
},
|
|
4403
|
+
],
|
|
4404
|
+
'internalType': 'struct IOrder.ConditionData[]',
|
|
4405
|
+
'name': 'conditionDatas',
|
|
4406
|
+
'type': 'tuple[]',
|
|
4407
|
+
},
|
|
4408
|
+
{
|
|
4409
|
+
'internalType': 'enum IOrder.BetType',
|
|
4410
|
+
'name': 'betType',
|
|
4411
|
+
'type': 'uint8',
|
|
4412
|
+
},
|
|
4413
|
+
{
|
|
4414
|
+
'internalType': 'address',
|
|
4415
|
+
'name': 'oracle',
|
|
4416
|
+
'type': 'address',
|
|
4417
|
+
},
|
|
4418
|
+
{
|
|
4419
|
+
'internalType': 'bytes',
|
|
4420
|
+
'name': 'clientBetData',
|
|
4421
|
+
'type': 'bytes',
|
|
4422
|
+
},
|
|
4423
|
+
{
|
|
4424
|
+
'internalType': 'bytes',
|
|
4425
|
+
'name': 'bettorSignature',
|
|
4426
|
+
'type': 'bytes',
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
'internalType': 'bytes',
|
|
4430
|
+
'name': 'oracleSignature',
|
|
4431
|
+
'type': 'bytes',
|
|
4432
|
+
},
|
|
4433
|
+
],
|
|
4434
|
+
'internalType': 'struct IOrder.OrderData',
|
|
4435
|
+
'name': 'order',
|
|
4436
|
+
'type': 'tuple',
|
|
4437
|
+
},
|
|
4438
|
+
{
|
|
4439
|
+
'internalType': 'address',
|
|
4440
|
+
'name': 'betOwner',
|
|
4441
|
+
'type': 'address',
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
'internalType': 'bytes',
|
|
4445
|
+
'name': 'hashes',
|
|
4446
|
+
'type': 'bytes',
|
|
4447
|
+
},
|
|
4448
|
+
],
|
|
4449
|
+
'name': 'betOrder',
|
|
4450
|
+
'outputs': [
|
|
4451
|
+
{
|
|
4452
|
+
'internalType': 'uint256[]',
|
|
4453
|
+
'name': 'tokenIds',
|
|
4454
|
+
'type': 'uint256[]',
|
|
4455
|
+
},
|
|
4456
|
+
],
|
|
4457
|
+
'stateMutability': 'nonpayable',
|
|
4458
|
+
'type': 'function',
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
'inputs': [
|
|
4462
|
+
{
|
|
4463
|
+
'internalType': 'address',
|
|
4464
|
+
'name': 'payMaster_',
|
|
4465
|
+
'type': 'address',
|
|
4466
|
+
},
|
|
4467
|
+
],
|
|
4468
|
+
'name': 'changePayMaster',
|
|
4469
|
+
'outputs': [],
|
|
4470
|
+
'stateMutability': 'nonpayable',
|
|
4471
|
+
'type': 'function',
|
|
4472
|
+
},
|
|
4198
4473
|
{
|
|
4199
4474
|
'inputs': [
|
|
4200
4475
|
{
|
|
@@ -4311,6 +4586,21 @@ const environments = {
|
|
|
4311
4586
|
'name': 'relayerFeeAmount',
|
|
4312
4587
|
'type': 'uint256',
|
|
4313
4588
|
},
|
|
4589
|
+
{
|
|
4590
|
+
'internalType': 'bool',
|
|
4591
|
+
'name': 'isFeeSponsored',
|
|
4592
|
+
'type': 'bool',
|
|
4593
|
+
},
|
|
4594
|
+
{
|
|
4595
|
+
'internalType': 'bool',
|
|
4596
|
+
'name': 'isBetSponsored',
|
|
4597
|
+
'type': 'bool',
|
|
4598
|
+
},
|
|
4599
|
+
{
|
|
4600
|
+
'internalType': 'bool',
|
|
4601
|
+
'name': 'isSponsoredBetReturnable',
|
|
4602
|
+
'type': 'bool',
|
|
4603
|
+
},
|
|
4314
4604
|
],
|
|
4315
4605
|
'internalType': 'struct IOrder.ClientData',
|
|
4316
4606
|
'name': 'clientData',
|
|
@@ -4409,6 +4699,11 @@ const environments = {
|
|
|
4409
4699
|
'name': 'totalAmount',
|
|
4410
4700
|
'type': 'uint128',
|
|
4411
4701
|
},
|
|
4702
|
+
{
|
|
4703
|
+
'internalType': 'uint128[]',
|
|
4704
|
+
'name': 'amounts',
|
|
4705
|
+
'type': 'uint128[]',
|
|
4706
|
+
},
|
|
4412
4707
|
],
|
|
4413
4708
|
'stateMutability': 'pure',
|
|
4414
4709
|
'type': 'function',
|
|
@@ -4420,6 +4715,11 @@ const environments = {
|
|
|
4420
4715
|
'name': 'lp_',
|
|
4421
4716
|
'type': 'address',
|
|
4422
4717
|
},
|
|
4718
|
+
{
|
|
4719
|
+
'internalType': 'address',
|
|
4720
|
+
'name': 'payMaster_',
|
|
4721
|
+
'type': 'address',
|
|
4722
|
+
},
|
|
4423
4723
|
],
|
|
4424
4724
|
'name': 'initialize',
|
|
4425
4725
|
'outputs': [],
|
|
@@ -4452,6 +4752,19 @@ const environments = {
|
|
|
4452
4752
|
'stateMutability': 'view',
|
|
4453
4753
|
'type': 'function',
|
|
4454
4754
|
},
|
|
4755
|
+
{
|
|
4756
|
+
'inputs': [],
|
|
4757
|
+
'name': 'payMaster',
|
|
4758
|
+
'outputs': [
|
|
4759
|
+
{
|
|
4760
|
+
'internalType': 'contract IPayMaster',
|
|
4761
|
+
'name': '',
|
|
4762
|
+
'type': 'address',
|
|
4763
|
+
},
|
|
4764
|
+
],
|
|
4765
|
+
'stateMutability': 'view',
|
|
4766
|
+
'type': 'function',
|
|
4767
|
+
},
|
|
4455
4768
|
{
|
|
4456
4769
|
'inputs': [],
|
|
4457
4770
|
'name': 'renounceOwnership',
|
|
@@ -4501,19 +4814,18 @@ const environments = {
|
|
|
4501
4814
|
};const endpointNameByChainId = {
|
|
4502
4815
|
[gnosis.id]: 'gnosis',
|
|
4503
4816
|
[polygon.id]: 'polygon',
|
|
4504
|
-
[polygonAmoy.id]: 'polygon-amoy-
|
|
4817
|
+
[polygonAmoy.id]: 'polygon-amoy-dev',
|
|
4505
4818
|
[chiliz.id]: 'chiliz',
|
|
4506
4819
|
[spicy.id]: 'chiliz-spicy-dev',
|
|
4507
4820
|
[base.id]: 'base',
|
|
4508
4821
|
[baseSepolia.id]: 'base-sepolia-dev',
|
|
4509
4822
|
};
|
|
4510
|
-
if (isDevEnabled) {
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
}
|
|
4823
|
+
// if (isDevEnabled) {
|
|
4824
|
+
// endpointNameByChainId[gnosis.id] = 'gnosis-dev'
|
|
4825
|
+
// endpointNameByChainId[polygonAmoy.id] = 'polygon-amoy-dev'
|
|
4826
|
+
// }
|
|
4514
4827
|
const isDev = (chainId) => {
|
|
4515
|
-
return
|
|
4516
|
-
chainId === gnosis.id ||
|
|
4828
|
+
return (chainId === polygonAmoy.id ||
|
|
4517
4829
|
chainId === spicy.id ||
|
|
4518
4830
|
chainId === baseSepolia.id);
|
|
4519
4831
|
};
|
|
@@ -4526,27 +4838,27 @@ const getLegacyLiveGraphqlEndpoint = (chainId) => {
|
|
|
4526
4838
|
if (isDev(chainId)) {
|
|
4527
4839
|
return 'https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev';
|
|
4528
4840
|
}
|
|
4529
|
-
if (chainId === polygonAmoy.id) {
|
|
4530
|
-
|
|
4531
|
-
}
|
|
4841
|
+
// if (chainId === polygonAmoy.id) {
|
|
4842
|
+
// return 'https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-preprod'
|
|
4843
|
+
// }
|
|
4532
4844
|
return 'https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed';
|
|
4533
4845
|
};
|
|
4534
4846
|
const getSocketEndpoint = (chainId) => {
|
|
4535
4847
|
if (isDev(chainId)) {
|
|
4536
4848
|
return 'wss://dev-streams.onchainfeed.org/v1/streams';
|
|
4537
4849
|
}
|
|
4538
|
-
if (chainId === polygonAmoy.id) {
|
|
4539
|
-
|
|
4540
|
-
}
|
|
4850
|
+
// if (chainId === polygonAmoy.id) {
|
|
4851
|
+
// return 'wss://preprod-streams.azuro.org/v1/streams'
|
|
4852
|
+
// }
|
|
4541
4853
|
return 'wss://streams.onchainfeed.org/v1/streams';
|
|
4542
4854
|
};
|
|
4543
4855
|
const getApiEndpoint = (chainId) => {
|
|
4544
4856
|
if (isDev(chainId)) {
|
|
4545
4857
|
return 'https://dev-api.onchainfeed.org/api/v1/public';
|
|
4546
4858
|
}
|
|
4547
|
-
if (chainId === polygonAmoy.id) {
|
|
4548
|
-
|
|
4549
|
-
}
|
|
4859
|
+
// if (chainId === polygonAmoy.id) {
|
|
4860
|
+
// return 'https://preprod-api.azuro.org/api/v1/public'
|
|
4861
|
+
// }
|
|
4550
4862
|
return 'https://api.azuro.org/api/v1/public';
|
|
4551
4863
|
};const ODDS_DECIMALS = 12;
|
|
4552
4864
|
const MIN_BET_AMOUNT = 1;
|
|
@@ -4557,6 +4869,9 @@ const CLIENT_DATA_TYPES = [
|
|
|
4557
4869
|
{ name: 'expiresAt', type: 'uint256' },
|
|
4558
4870
|
{ name: 'chainId', type: 'uint256' },
|
|
4559
4871
|
{ name: 'relayerFeeAmount', type: 'uint256' },
|
|
4872
|
+
{ name: 'isFeeSponsored', type: 'bool' },
|
|
4873
|
+
{ name: 'isBetSponsored', type: 'bool' },
|
|
4874
|
+
{ name: 'isSponsoredBetReturnable', type: 'bool' },
|
|
4560
4875
|
];
|
|
4561
4876
|
const BET_DATA_TYPES = {
|
|
4562
4877
|
ClientBetData: [
|
|
@@ -4637,11 +4952,11 @@ const gnosisDevData = {
|
|
|
4637
4952
|
api: getApiEndpoint(gnosis.id),
|
|
4638
4953
|
environment: environments[gnosis.id],
|
|
4639
4954
|
contracts: setupContracts({
|
|
4640
|
-
lp: '
|
|
4641
|
-
core: '
|
|
4642
|
-
relayer: '
|
|
4643
|
-
azuroBet: '
|
|
4644
|
-
cashout: '
|
|
4955
|
+
lp: '0x0C2F50DCE97a4e327f5580bA4aad4E48d27f6DbD',
|
|
4956
|
+
core: '0x12d5E6d2e9c47015C26a7c959a5Db42E3eF5a1Ef',
|
|
4957
|
+
relayer: '0x7C9C7B37C93EbC2103061834eb2781809f604eAf',
|
|
4958
|
+
azuroBet: '0x9407B57bF56292b0d9940Ed69D9a74ACffb11413',
|
|
4959
|
+
cashout: '0xF8E7F2e4693DBEd186b302474EeE5AE4Ab2E0150',
|
|
4645
4960
|
}),
|
|
4646
4961
|
betToken: {
|
|
4647
4962
|
address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
|
|
@@ -4672,6 +4987,29 @@ const polygonData = {
|
|
|
4672
4987
|
decimals: 6,
|
|
4673
4988
|
},
|
|
4674
4989
|
};
|
|
4990
|
+
// const polygonAmoyData: ChainData = {
|
|
4991
|
+
// chain: polygonAmoy,
|
|
4992
|
+
// graphql: {
|
|
4993
|
+
// bets: getBetsGraphqlEndpoint(polygonAmoy.id),
|
|
4994
|
+
// feed: getFeedGraphqlEndpoint(polygonAmoy.id),
|
|
4995
|
+
// legacyLive: getLegacyLiveGraphqlEndpoint(polygonAmoy.id),
|
|
4996
|
+
// },
|
|
4997
|
+
// socket: getSocketEndpoint(polygonAmoy.id),
|
|
4998
|
+
// api: getApiEndpoint(polygonAmoy.id),
|
|
4999
|
+
// environment: environments[polygonAmoy.id],
|
|
5000
|
+
// contracts: setupContracts({
|
|
5001
|
+
// lp: '0x3528186476FD0eA0AdC9fCcc41de4CD138f99653',
|
|
5002
|
+
// core: '0x2477B960080B3439b4684df3D9CE53B2ACe64315',
|
|
5003
|
+
// relayer: '0x355B8493380fA5D57E4d3aFBF7C5f38b64AD5eA9',
|
|
5004
|
+
// azuroBet: '0x5E59ee1b09Cb2Cf031e4Beaa8dB48D4B8b7e38AD',
|
|
5005
|
+
// cashout: '0x080d71059891Fb4d722855df28bFB208335F1587',
|
|
5006
|
+
// }),
|
|
5007
|
+
// betToken: {
|
|
5008
|
+
// address: '0xf028b2dd00e20a8d9db3964a5feb0633d2ee46cd',
|
|
5009
|
+
// symbol: 'AZUSD',
|
|
5010
|
+
// decimals: 6,
|
|
5011
|
+
// },
|
|
5012
|
+
// }
|
|
4675
5013
|
const polygonAmoyData = {
|
|
4676
5014
|
chain: polygonAmoy,
|
|
4677
5015
|
graphql: {
|
|
@@ -4683,34 +5021,11 @@ const polygonAmoyData = {
|
|
|
4683
5021
|
api: getApiEndpoint(polygonAmoy.id),
|
|
4684
5022
|
environment: environments[polygonAmoy.id],
|
|
4685
5023
|
contracts: setupContracts({
|
|
4686
|
-
lp: '
|
|
4687
|
-
core: '
|
|
4688
|
-
relayer: '
|
|
4689
|
-
azuroBet: '
|
|
4690
|
-
cashout: '
|
|
4691
|
-
}),
|
|
4692
|
-
betToken: {
|
|
4693
|
-
address: '0xf028b2dd00e20a8d9db3964a5feb0633d2ee46cd',
|
|
4694
|
-
symbol: 'AZUSD',
|
|
4695
|
-
decimals: 6,
|
|
4696
|
-
},
|
|
4697
|
-
};
|
|
4698
|
-
const polygonAmoyDevData = {
|
|
4699
|
-
chain: polygonAmoy,
|
|
4700
|
-
graphql: {
|
|
4701
|
-
bets: getBetsGraphqlEndpoint(polygonAmoy.id),
|
|
4702
|
-
feed: getFeedGraphqlEndpoint(polygonAmoy.id),
|
|
4703
|
-
legacyLive: getLegacyLiveGraphqlEndpoint(polygonAmoy.id),
|
|
4704
|
-
},
|
|
4705
|
-
socket: getSocketEndpoint(polygonAmoy.id),
|
|
4706
|
-
api: getApiEndpoint(polygonAmoy.id),
|
|
4707
|
-
environment: environments[polygonAmoy.id],
|
|
4708
|
-
contracts: setupContracts({
|
|
4709
|
-
lp: '0x79A8d0e954A1275DFe6A2a8acDD136718B54cA16',
|
|
4710
|
-
core: '0xe6AA5BAE8a4fFe65dD60a1868C1044Cb05d55195',
|
|
4711
|
-
relayer: '0x40cff79D064DA1723F838B2Aaad2cfE1ba5b2812',
|
|
4712
|
-
azuroBet: '0x8583942bEFd6dc0166Dfb0b9fd680457e01A94Ca',
|
|
4713
|
-
cashout: '0x43Ec9E387dC3f11CEAF9a428BD8c1Df47823ce7C',
|
|
5024
|
+
lp: '0x0a75395Ff15d9557424b632cEBCac448D66F9779',
|
|
5025
|
+
core: '0xCD0Db5ef28C3Bd3a69283372dE923Eb4DA0585F6',
|
|
5026
|
+
relayer: '0x48c9bE88706F22838070eE7C4bC74Ad7A8eeF114',
|
|
5027
|
+
azuroBet: '0x4B75c071dFA5d537979E8b0615Bb97B6337dbFef',
|
|
5028
|
+
cashout: '0x7dF132Ad2334a667A004049a75a4a8a530dc24F2',
|
|
4714
5029
|
}),
|
|
4715
5030
|
betToken: {
|
|
4716
5031
|
address: '0xCf1b86ceD971b88C042C64A9c099377e2738073C',
|
|
@@ -4729,14 +5044,14 @@ const chilizData = {
|
|
|
4729
5044
|
api: getApiEndpoint(chiliz.id),
|
|
4730
5045
|
environment: environments[chiliz.id],
|
|
4731
5046
|
contracts: setupContracts({
|
|
4732
|
-
lp: '
|
|
4733
|
-
core: '
|
|
4734
|
-
relayer: '
|
|
4735
|
-
azuroBet: '
|
|
4736
|
-
cashout: '
|
|
5047
|
+
lp: '0x431A0993d29eEb0fF7e3FE351A303eF72195431a',
|
|
5048
|
+
core: '0x524994dcA5EA2bc979ac5506E7195F28B4c16932',
|
|
5049
|
+
relayer: '0x725ec0A9eC9dC993A86d0eFD7fD78929d226AbE7',
|
|
5050
|
+
azuroBet: '0xF7815889e5d0635A31eca34390b25d8D2cEeD902',
|
|
5051
|
+
cashout: '0x7c771a200EcD61A01af992360303f7b1465Cd8e3',
|
|
4737
5052
|
}),
|
|
4738
5053
|
betToken: {
|
|
4739
|
-
address: '
|
|
5054
|
+
address: '0x721EF6871f1c4Efe730Dce047D40D1743B886946',
|
|
4740
5055
|
symbol: 'WCHZ',
|
|
4741
5056
|
decimals: 18,
|
|
4742
5057
|
},
|
|
@@ -4775,11 +5090,11 @@ const baseSepoliaData = {
|
|
|
4775
5090
|
api: getApiEndpoint(baseSepolia.id),
|
|
4776
5091
|
environment: environments[baseSepolia.id],
|
|
4777
5092
|
contracts: setupContracts({
|
|
4778
|
-
lp: '
|
|
4779
|
-
core: '
|
|
4780
|
-
relayer: '
|
|
4781
|
-
azuroBet: '
|
|
4782
|
-
cashout: '
|
|
5093
|
+
lp: '0x4fE86EddCC22dc992b7994878169201Ec7ea50AB',
|
|
5094
|
+
core: '0x679CC42F69F98631668348d088086359D4217Ffa',
|
|
5095
|
+
relayer: '0x2De54cABa6A8198D9Dc51931485Bfdc8017aB0c5',
|
|
5096
|
+
azuroBet: '0xD031C4BDd4b7c30e3725132109786B8E158A4c07',
|
|
5097
|
+
cashout: '0xf52Eb6ec19d81Ea623A7d7Ad397287C0C40f2F37',
|
|
4783
5098
|
}),
|
|
4784
5099
|
betToken: {
|
|
4785
5100
|
address: '0x9e09f213Ff75e53D52e9e777A6567A68683E935f',
|
|
@@ -4819,16 +5134,16 @@ const chainsData = {
|
|
|
4819
5134
|
[base.id]: baseData,
|
|
4820
5135
|
[baseSepolia.id]: baseSepoliaData,
|
|
4821
5136
|
};
|
|
4822
|
-
if (isDevEnabled) {
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
}
|
|
5137
|
+
// if (isDevEnabled) {
|
|
5138
|
+
// chainsData[gnosis.id] = gnosisDevData
|
|
5139
|
+
// chainsData[polygonAmoy.id] = polygonAmoyDevData
|
|
5140
|
+
// }
|
|
4826
5141
|
const chainsDataByEnv = {
|
|
4827
5142
|
[Environment.GnosisXDAI]: gnosisData,
|
|
4828
5143
|
[Environment.GnosisDevXDAI]: gnosisDevData,
|
|
4829
5144
|
[Environment.PolygonUSDT]: polygonData,
|
|
4830
|
-
[Environment.PolygonAmoyAZUSD]: polygonAmoyData,
|
|
4831
|
-
[Environment.PolygonAmoyUSDT]:
|
|
5145
|
+
// [Environment.PolygonAmoyAZUSD]: polygonAmoyData,
|
|
5146
|
+
[Environment.PolygonAmoyUSDT]: polygonAmoyData,
|
|
4832
5147
|
[Environment.ChilizWCHZ]: chilizData,
|
|
4833
5148
|
[Environment.ChilizSpicyWCHZ]: spicyData,
|
|
4834
5149
|
[Environment.BaseWETH]: baseData,
|
|
@@ -4929,10 +5244,15 @@ const chainsDataByEnv = {
|
|
|
4929
5244
|
title
|
|
4930
5245
|
startsAt
|
|
4931
5246
|
status
|
|
5247
|
+
slug
|
|
4932
5248
|
sport {
|
|
4933
5249
|
sportId
|
|
4934
5250
|
slug
|
|
4935
5251
|
name
|
|
5252
|
+
sporthub {
|
|
5253
|
+
id
|
|
5254
|
+
slug
|
|
5255
|
+
}
|
|
4936
5256
|
}
|
|
4937
5257
|
league {
|
|
4938
5258
|
slug
|
|
@@ -6536,6 +6856,9 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
|
|
|
6536
6856
|
expiresAt: BigInt(clientData.expiresAt),
|
|
6537
6857
|
chainId: BigInt(clientData.chainId),
|
|
6538
6858
|
relayerFeeAmount: BigInt(clientData.relayerFeeAmount),
|
|
6859
|
+
isBetSponsored: clientData.isBetSponsored,
|
|
6860
|
+
isFeeSponsored: clientData.isFeeSponsored,
|
|
6861
|
+
isSponsoredBetReturnable: clientData.isSponsoredBetReturnable,
|
|
6539
6862
|
},
|
|
6540
6863
|
bets: [
|
|
6541
6864
|
{
|
|
@@ -6573,6 +6896,9 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
|
|
|
6573
6896
|
expiresAt: BigInt(clientData.expiresAt),
|
|
6574
6897
|
chainId: BigInt(clientData.chainId),
|
|
6575
6898
|
relayerFeeAmount: BigInt(clientData.relayerFeeAmount),
|
|
6899
|
+
isBetSponsored: clientData.isBetSponsored,
|
|
6900
|
+
isFeeSponsored: clientData.isFeeSponsored,
|
|
6901
|
+
isSponsoredBetReturnable: clientData.isSponsoredBetReturnable,
|
|
6576
6902
|
},
|
|
6577
6903
|
bets: bets.map(bet => ({
|
|
6578
6904
|
conditionId: BigInt(bet.conditionId),
|
|
@@ -6925,4 +7251,4 @@ const createCashout = async (props) => {
|
|
|
6925
7251
|
}
|
|
6926
7252
|
const data = await response.json();
|
|
6927
7253
|
return data;
|
|
6928
|
-
};export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,Event_OrderBy,FreeBetStatus,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,MIN_BET_AMOUNT,NavigationDocument,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VritualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,coreAbi,createBet,createCashout,createComboBet,environments,FreeBet as freeBetAbi,getApiEndpoint,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getFreeBets,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,groupConditionsByMarket,lpAbi,relayerAbi,setupContracts};
|
|
7254
|
+
};export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,Event_OrderBy,FreeBetStatus,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,MIN_BET_AMOUNT,NavigationDocument,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VritualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,baseData,baseSepoliaData,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,FreeBet as freeBetAbi,getApiEndpoint,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getFreeBets,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,polygonAmoyData,polygonData,relayerAbi,setupContracts,spicyData};
|
|
@@ -4,6 +4,6 @@ export declare const getBetsGraphqlEndpoint: (chainId: ChainId) => string;
|
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Only for v2 feed
|
|
6
6
|
*/
|
|
7
|
-
export declare const getLegacyLiveGraphqlEndpoint: (chainId: ChainId) => "https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev" | "https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed
|
|
8
|
-
export declare const getSocketEndpoint: (chainId: ChainId) => "wss://dev-streams.onchainfeed.org/v1/streams" | "wss://
|
|
9
|
-
export declare const getApiEndpoint: (chainId: ChainId) => "https://dev-api.onchainfeed.org/api/v1/public" | "https://
|
|
7
|
+
export declare const getLegacyLiveGraphqlEndpoint: (chainId: ChainId) => "https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev" | "https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed";
|
|
8
|
+
export declare const getSocketEndpoint: (chainId: ChainId) => "wss://dev-streams.onchainfeed.org/v1/streams" | "wss://streams.onchainfeed.org/v1/streams";
|
|
9
|
+
export declare const getApiEndpoint: (chainId: ChainId) => "https://dev-api.onchainfeed.org/api/v1/public" | "https://api.azuro.org/api/v1/public";
|