@magnaflow/contract-sdk 1.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout-abi.d.ts","sourceRoot":"","sources":["../src/payout-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,oEAAoE,CAAC;AAEnG,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiqBjB,CAAC"}
@@ -0,0 +1,675 @@
1
+ export const ORDER_STRUCT_TYPE = '(address,address,uint256,bytes32,address[],uint256[],bytes[])[]';
2
+ export const payout_new_abi = [
3
+ { type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
4
+ { type: 'receive', stateMutability: 'payable' },
5
+ {
6
+ type: 'function',
7
+ name: 'TRANSFER_TYPEHASH',
8
+ inputs: [],
9
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
10
+ stateMutability: 'view',
11
+ },
12
+ {
13
+ type: 'function',
14
+ name: '_hashTransfer',
15
+ inputs: [
16
+ { name: '_merchant', type: 'address', internalType: 'address' },
17
+ { name: '_token', type: 'address', internalType: 'address' },
18
+ { name: '_to', type: 'address', internalType: 'address' },
19
+ { name: '_amount', type: 'uint256', internalType: 'uint256' },
20
+ { name: '_billNo', type: 'bytes32', internalType: 'bytes32' },
21
+ ],
22
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
23
+ stateMutability: 'view',
24
+ },
25
+ {
26
+ type: 'function',
27
+ name: 'batchBalanceOf',
28
+ inputs: [
29
+ { name: '_token', type: 'address', internalType: 'address' },
30
+ {
31
+ name: '_merchants',
32
+ type: 'address[]',
33
+ internalType: 'address[]',
34
+ },
35
+ ],
36
+ outputs: [
37
+ { name: '', type: 'uint256', internalType: 'uint256' },
38
+ { name: '', type: 'uint256[]', internalType: 'uint256[]' },
39
+ ],
40
+ stateMutability: 'view',
41
+ },
42
+ {
43
+ type: 'function',
44
+ name: 'batchPayment',
45
+ inputs: [
46
+ {
47
+ name: '_orders',
48
+ type: 'tuple[]',
49
+ internalType: 'struct EthosFlow.Orders[]',
50
+ components: [
51
+ { name: 'token', type: 'address', internalType: 'address' },
52
+ { name: 'to', type: 'address', internalType: 'address' },
53
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
54
+ { name: 'billNo', type: 'bytes32', internalType: 'bytes32' },
55
+ {
56
+ name: 'froms',
57
+ type: 'address[]',
58
+ internalType: 'address[]',
59
+ },
60
+ {
61
+ name: 'amounts',
62
+ type: 'uint256[]',
63
+ internalType: 'uint256[]',
64
+ },
65
+ {
66
+ name: 'signatures',
67
+ type: 'bytes[]',
68
+ internalType: 'bytes[]',
69
+ },
70
+ ],
71
+ },
72
+ ],
73
+ outputs: [],
74
+ stateMutability: 'nonpayable',
75
+ },
76
+ {
77
+ type: 'function',
78
+ name: 'deposit',
79
+ inputs: [
80
+ { name: '_token', type: 'address', internalType: 'address' },
81
+ { name: '_merchant', type: 'address', internalType: 'address' },
82
+ { name: '_amount', type: 'uint256', internalType: 'uint256' },
83
+ ],
84
+ outputs: [],
85
+ stateMutability: 'nonpayable',
86
+ },
87
+ {
88
+ type: 'function',
89
+ name: 'disperse',
90
+ inputs: [
91
+ {
92
+ name: '_recipients',
93
+ type: 'address[]',
94
+ internalType: 'address[]',
95
+ },
96
+ { name: '_amounts', type: 'uint256[]', internalType: 'uint256[]' },
97
+ ],
98
+ outputs: [],
99
+ stateMutability: 'payable',
100
+ },
101
+ {
102
+ type: 'function',
103
+ name: 'ed25519PublicKeys',
104
+ inputs: [{ name: '', type: 'address', internalType: 'address' }],
105
+ outputs: [{ name: '', type: 'bytes', internalType: 'bytes' }],
106
+ stateMutability: 'view',
107
+ },
108
+ {
109
+ type: 'function',
110
+ name: 'eip712Domain',
111
+ inputs: [],
112
+ outputs: [
113
+ { name: 'fields', type: 'bytes1', internalType: 'bytes1' },
114
+ { name: 'name', type: 'string', internalType: 'string' },
115
+ { name: 'version', type: 'string', internalType: 'string' },
116
+ { name: 'chainId', type: 'uint256', internalType: 'uint256' },
117
+ {
118
+ name: 'verifyingContract',
119
+ type: 'address',
120
+ internalType: 'address',
121
+ },
122
+ { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
123
+ {
124
+ name: 'extensions',
125
+ type: 'uint256[]',
126
+ internalType: 'uint256[]',
127
+ },
128
+ ],
129
+ stateMutability: 'view',
130
+ },
131
+ {
132
+ type: 'function',
133
+ name: 'initialize',
134
+ inputs: [],
135
+ outputs: [],
136
+ stateMutability: 'nonpayable',
137
+ },
138
+ {
139
+ type: 'function',
140
+ name: 'isPaymentIdExists',
141
+ inputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
142
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
143
+ stateMutability: 'view',
144
+ },
145
+ {
146
+ type: 'function',
147
+ name: 'isStableCoin',
148
+ inputs: [{ name: '', type: 'address', internalType: 'address' }],
149
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
150
+ stateMutability: 'view',
151
+ },
152
+ {
153
+ type: 'function',
154
+ name: 'isWhitelisted',
155
+ inputs: [{ name: '', type: 'address', internalType: 'address' }],
156
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
157
+ stateMutability: 'view',
158
+ },
159
+ {
160
+ type: 'function',
161
+ name: 'merchantAmounts',
162
+ inputs: [{ name: '', type: 'address', internalType: 'address' }],
163
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
164
+ stateMutability: 'view',
165
+ },
166
+ {
167
+ type: 'function',
168
+ name: 'minimumDepositAmounts',
169
+ inputs: [{ name: '', type: 'address', internalType: 'address' }],
170
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
171
+ stateMutability: 'view',
172
+ },
173
+ {
174
+ type: 'function',
175
+ name: 'owner',
176
+ inputs: [],
177
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
178
+ stateMutability: 'view',
179
+ },
180
+ {
181
+ type: 'function',
182
+ name: 'paused',
183
+ inputs: [],
184
+ outputs: [{ name: '', type: 'bool', internalType: 'bool' }],
185
+ stateMutability: 'view',
186
+ },
187
+ {
188
+ type: 'function',
189
+ name: 'payment',
190
+ inputs: [
191
+ {
192
+ name: '_order',
193
+ type: 'tuple',
194
+ internalType: 'struct EthosFlow.Orders',
195
+ components: [
196
+ { name: 'token', type: 'address', internalType: 'address' },
197
+ { name: 'to', type: 'address', internalType: 'address' },
198
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
199
+ { name: 'billNo', type: 'bytes32', internalType: 'bytes32' },
200
+ {
201
+ name: 'froms',
202
+ type: 'address[]',
203
+ internalType: 'address[]',
204
+ },
205
+ {
206
+ name: 'amounts',
207
+ type: 'uint256[]',
208
+ internalType: 'uint256[]',
209
+ },
210
+ {
211
+ name: 'signatures',
212
+ type: 'bytes[]',
213
+ internalType: 'bytes[]',
214
+ },
215
+ ],
216
+ },
217
+ ],
218
+ outputs: [],
219
+ stateMutability: 'nonpayable',
220
+ },
221
+ {
222
+ type: 'function',
223
+ name: 'register',
224
+ inputs: [
225
+ { name: '_token', type: 'address', internalType: 'address' },
226
+ { name: '_amount', type: 'uint256', internalType: 'uint256' },
227
+ {
228
+ name: '_ed25519PublicKey',
229
+ type: 'bytes',
230
+ internalType: 'bytes',
231
+ },
232
+ ],
233
+ outputs: [],
234
+ stateMutability: 'nonpayable',
235
+ },
236
+ {
237
+ type: 'function',
238
+ name: 'renounceOwnership',
239
+ inputs: [],
240
+ outputs: [],
241
+ stateMutability: 'nonpayable',
242
+ },
243
+ {
244
+ type: 'function',
245
+ name: 'serviceFeeRate',
246
+ inputs: [],
247
+ outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
248
+ stateMutability: 'view',
249
+ },
250
+ {
251
+ type: 'function',
252
+ name: 'setEd25519PublicKey',
253
+ inputs: [
254
+ { name: '_merchant', type: 'address', internalType: 'address' },
255
+ {
256
+ name: '_ed25519PublicKey',
257
+ type: 'bytes',
258
+ internalType: 'bytes',
259
+ },
260
+ ],
261
+ outputs: [],
262
+ stateMutability: 'nonpayable',
263
+ },
264
+ {
265
+ type: 'function',
266
+ name: 'setFees',
267
+ inputs: [
268
+ {
269
+ name: '_serviceFeeRate',
270
+ type: 'uint256',
271
+ internalType: 'uint256',
272
+ },
273
+ ],
274
+ outputs: [],
275
+ stateMutability: 'nonpayable',
276
+ },
277
+ {
278
+ type: 'function',
279
+ name: 'setMinimumDepositAmount',
280
+ inputs: [
281
+ { name: '_token', type: 'address', internalType: 'address' },
282
+ {
283
+ name: '_minimumDepositAmount',
284
+ type: 'uint256',
285
+ internalType: 'uint256',
286
+ },
287
+ ],
288
+ outputs: [],
289
+ stateMutability: 'nonpayable',
290
+ },
291
+ {
292
+ type: 'function',
293
+ name: 'setStableCoin',
294
+ inputs: [
295
+ { name: '_token', type: 'address', internalType: 'address' },
296
+ { name: '_isStableCoin', type: 'bool', internalType: 'bool' },
297
+ ],
298
+ outputs: [],
299
+ stateMutability: 'nonpayable',
300
+ },
301
+ {
302
+ type: 'function',
303
+ name: 'setWhitelist',
304
+ inputs: [
305
+ { name: '_merchant', type: 'address', internalType: 'address' },
306
+ { name: '_isWhitelisted', type: 'bool', internalType: 'bool' },
307
+ ],
308
+ outputs: [],
309
+ stateMutability: 'nonpayable',
310
+ },
311
+ {
312
+ type: 'function',
313
+ name: 'transferOwnership',
314
+ inputs: [{ name: 'newOwner', type: 'address', internalType: 'address' }],
315
+ outputs: [],
316
+ stateMutability: 'nonpayable',
317
+ },
318
+ {
319
+ type: 'function',
320
+ name: 'withdrawStuckFunds',
321
+ inputs: [
322
+ { name: '_token', type: 'address', internalType: 'address' },
323
+ { name: '_to', type: 'address', internalType: 'address' },
324
+ { name: '_amount', type: 'uint256', internalType: 'uint256' },
325
+ ],
326
+ outputs: [],
327
+ stateMutability: 'nonpayable',
328
+ },
329
+ {
330
+ type: 'event',
331
+ name: 'Deposited',
332
+ inputs: [
333
+ {
334
+ name: 'sender',
335
+ type: 'address',
336
+ indexed: true,
337
+ internalType: 'address',
338
+ },
339
+ {
340
+ name: 'token',
341
+ type: 'address',
342
+ indexed: false,
343
+ internalType: 'address',
344
+ },
345
+ {
346
+ name: 'amount',
347
+ type: 'uint256',
348
+ indexed: false,
349
+ internalType: 'uint256',
350
+ },
351
+ ],
352
+ anonymous: false,
353
+ },
354
+ {
355
+ type: 'event',
356
+ name: 'Dispersed',
357
+ inputs: [
358
+ {
359
+ name: 'sender',
360
+ type: 'address',
361
+ indexed: true,
362
+ internalType: 'address',
363
+ },
364
+ {
365
+ name: 'recipients',
366
+ type: 'address[]',
367
+ indexed: false,
368
+ internalType: 'address[]',
369
+ },
370
+ {
371
+ name: 'amounts',
372
+ type: 'uint256[]',
373
+ indexed: false,
374
+ internalType: 'uint256[]',
375
+ },
376
+ ],
377
+ anonymous: false,
378
+ },
379
+ {
380
+ type: 'event',
381
+ name: 'EIP712DomainChanged',
382
+ inputs: [],
383
+ anonymous: false,
384
+ },
385
+ {
386
+ type: 'event',
387
+ name: 'Ed25519PublicKeyUpdated',
388
+ inputs: [
389
+ {
390
+ name: 'sender',
391
+ type: 'address',
392
+ indexed: true,
393
+ internalType: 'address',
394
+ },
395
+ {
396
+ name: 'merchant',
397
+ type: 'address',
398
+ indexed: false,
399
+ internalType: 'address',
400
+ },
401
+ {
402
+ name: 'ed25519PublicKey',
403
+ type: 'bytes',
404
+ indexed: false,
405
+ internalType: 'bytes',
406
+ },
407
+ ],
408
+ anonymous: false,
409
+ },
410
+ {
411
+ type: 'event',
412
+ name: 'Initialized',
413
+ inputs: [
414
+ {
415
+ name: 'version',
416
+ type: 'uint64',
417
+ indexed: false,
418
+ internalType: 'uint64',
419
+ },
420
+ ],
421
+ anonymous: false,
422
+ },
423
+ {
424
+ type: 'event',
425
+ name: 'MinimumDepositAmountUpdated',
426
+ inputs: [
427
+ {
428
+ name: 'sender',
429
+ type: 'address',
430
+ indexed: true,
431
+ internalType: 'address',
432
+ },
433
+ {
434
+ name: 'token',
435
+ type: 'address',
436
+ indexed: false,
437
+ internalType: 'address',
438
+ },
439
+ {
440
+ name: 'oldMinimumDepositAmount',
441
+ type: 'uint256',
442
+ indexed: false,
443
+ internalType: 'uint256',
444
+ },
445
+ {
446
+ name: 'newMinimumDepositAmount',
447
+ type: 'uint256',
448
+ indexed: false,
449
+ internalType: 'uint256',
450
+ },
451
+ ],
452
+ anonymous: false,
453
+ },
454
+ {
455
+ type: 'event',
456
+ name: 'OwnershipTransferred',
457
+ inputs: [
458
+ {
459
+ name: 'previousOwner',
460
+ type: 'address',
461
+ indexed: true,
462
+ internalType: 'address',
463
+ },
464
+ {
465
+ name: 'newOwner',
466
+ type: 'address',
467
+ indexed: true,
468
+ internalType: 'address',
469
+ },
470
+ ],
471
+ anonymous: false,
472
+ },
473
+ {
474
+ type: 'event',
475
+ name: 'Paused',
476
+ inputs: [
477
+ {
478
+ name: 'account',
479
+ type: 'address',
480
+ indexed: false,
481
+ internalType: 'address',
482
+ },
483
+ ],
484
+ anonymous: false,
485
+ },
486
+ {
487
+ type: 'event',
488
+ name: 'Payment',
489
+ inputs: [
490
+ {
491
+ name: 'sender',
492
+ type: 'address',
493
+ indexed: true,
494
+ internalType: 'address',
495
+ },
496
+ {
497
+ name: 'token',
498
+ type: 'address',
499
+ indexed: false,
500
+ internalType: 'address',
501
+ },
502
+ {
503
+ name: 'to',
504
+ type: 'address',
505
+ indexed: false,
506
+ internalType: 'address',
507
+ },
508
+ {
509
+ name: 'amount',
510
+ type: 'uint256',
511
+ indexed: false,
512
+ internalType: 'uint256',
513
+ },
514
+ {
515
+ name: 'fee',
516
+ type: 'uint256',
517
+ indexed: false,
518
+ internalType: 'uint256',
519
+ },
520
+ {
521
+ name: 'billNo',
522
+ type: 'bytes32',
523
+ indexed: false,
524
+ internalType: 'bytes32',
525
+ },
526
+ {
527
+ name: 'froms',
528
+ type: 'address[]',
529
+ indexed: false,
530
+ internalType: 'address[]',
531
+ },
532
+ {
533
+ name: 'amounts',
534
+ type: 'uint256[]',
535
+ indexed: false,
536
+ internalType: 'uint256[]',
537
+ },
538
+ ],
539
+ anonymous: false,
540
+ },
541
+ {
542
+ type: 'event',
543
+ name: 'Registered',
544
+ inputs: [
545
+ {
546
+ name: 'sender',
547
+ type: 'address',
548
+ indexed: true,
549
+ internalType: 'address',
550
+ },
551
+ {
552
+ name: 'token',
553
+ type: 'address',
554
+ indexed: false,
555
+ internalType: 'address',
556
+ },
557
+ {
558
+ name: 'amount',
559
+ type: 'uint256',
560
+ indexed: false,
561
+ internalType: 'uint256',
562
+ },
563
+ {
564
+ name: 'ed25519PublicKey',
565
+ type: 'bytes',
566
+ indexed: false,
567
+ internalType: 'bytes',
568
+ },
569
+ ],
570
+ anonymous: false,
571
+ },
572
+ {
573
+ type: 'event',
574
+ name: 'StableCoinUpdated',
575
+ inputs: [
576
+ {
577
+ name: 'sender',
578
+ type: 'address',
579
+ indexed: true,
580
+ internalType: 'address',
581
+ },
582
+ {
583
+ name: 'token',
584
+ type: 'address',
585
+ indexed: false,
586
+ internalType: 'address',
587
+ },
588
+ {
589
+ name: 'isStableCoin',
590
+ type: 'bool',
591
+ indexed: false,
592
+ internalType: 'bool',
593
+ },
594
+ ],
595
+ anonymous: false,
596
+ },
597
+ {
598
+ type: 'event',
599
+ name: 'Unpaused',
600
+ inputs: [
601
+ {
602
+ name: 'account',
603
+ type: 'address',
604
+ indexed: false,
605
+ internalType: 'address',
606
+ },
607
+ ],
608
+ anonymous: false,
609
+ },
610
+ {
611
+ type: 'event',
612
+ name: 'WhitelistUpdated',
613
+ inputs: [
614
+ {
615
+ name: 'sender',
616
+ type: 'address',
617
+ indexed: true,
618
+ internalType: 'address',
619
+ },
620
+ {
621
+ name: 'merchant',
622
+ type: 'address',
623
+ indexed: false,
624
+ internalType: 'address',
625
+ },
626
+ {
627
+ name: 'isWhitelisted',
628
+ type: 'bool',
629
+ indexed: false,
630
+ internalType: 'bool',
631
+ },
632
+ ],
633
+ anonymous: false,
634
+ },
635
+ { type: 'error', name: 'AlreadyRegistered', inputs: [] },
636
+ { type: 'error', name: 'ECDSAInvalidSignature', inputs: [] },
637
+ {
638
+ type: 'error',
639
+ name: 'ECDSAInvalidSignatureLength',
640
+ inputs: [{ name: 'length', type: 'uint256', internalType: 'uint256' }],
641
+ },
642
+ {
643
+ type: 'error',
644
+ name: 'ECDSAInvalidSignatureS',
645
+ inputs: [{ name: 's', type: 'bytes32', internalType: 'bytes32' }],
646
+ },
647
+ { type: 'error', name: 'EnforcedPause', inputs: [] },
648
+ { type: 'error', name: 'ExpectedPause', inputs: [] },
649
+ { type: 'error', name: 'FundTransferFailed', inputs: [] },
650
+ { type: 'error', name: 'InsufficientBalance', inputs: [] },
651
+ { type: 'error', name: 'InsufficientMerchantBalance', inputs: [] },
652
+ { type: 'error', name: 'InvalidAmount', inputs: [] },
653
+ { type: 'error', name: 'InvalidEd25519PublicKey', inputs: [] },
654
+ { type: 'error', name: 'InvalidFeeRate', inputs: [] },
655
+ { type: 'error', name: 'InvalidInitialization', inputs: [] },
656
+ { type: 'error', name: 'InvalidInputLength', inputs: [] },
657
+ { type: 'error', name: 'InvalidMerchant', inputs: [] },
658
+ { type: 'error', name: 'InvalidRecipient', inputs: [] },
659
+ { type: 'error', name: 'InvalidSignature', inputs: [] },
660
+ { type: 'error', name: 'InvalidStableCoin', inputs: [] },
661
+ { type: 'error', name: 'InvalidWhitelist', inputs: [] },
662
+ { type: 'error', name: 'NotInitializing', inputs: [] },
663
+ {
664
+ type: 'error',
665
+ name: 'OwnableInvalidOwner',
666
+ inputs: [{ name: 'owner', type: 'address', internalType: 'address' }],
667
+ },
668
+ {
669
+ type: 'error',
670
+ name: 'OwnableUnauthorizedAccount',
671
+ inputs: [{ name: 'account', type: 'address', internalType: 'address' }],
672
+ },
673
+ { type: 'error', name: 'PaymentIdExists', inputs: [] },
674
+ { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },
675
+ ];