@exodus/ethereum-lib 2.21.4 → 2.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "2.21.4",
3
+ "version": "2.22.1",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -14,17 +14,18 @@
14
14
  "access": "restricted"
15
15
  },
16
16
  "dependencies": {
17
- "@exodus/asset-lib": "^3.5.4",
17
+ "@exodus/asset-lib": "^3.7.1",
18
+ "@exodus/assets": "^8.0.74",
18
19
  "@exodus/basic-utils": "^0.7.0",
19
20
  "@exodus/ethereumjs-common": "^2.4.0-exodus.6",
20
21
  "@exodus/ethereumjs-tx": "^3.3.0-exodus.6",
21
22
  "@exodus/ethereumjs-util": "^7.1.0-exodus.6",
22
- "@exodus/models": "^8.5.12",
23
+ "@exodus/models": "^8.10.4",
23
24
  "@exodus/solidity-contract": "^0.1.3",
24
25
  "base-x": "^3.0.2",
25
26
  "lodash": "^4.17.15",
26
27
  "ms": "^2.1.1",
27
28
  "reselect": "~3.0.1"
28
29
  },
29
- "gitHead": "2ad238fc652010aa759fcee58c6bbad707ec940d"
30
+ "gitHead": "20a76440ef521add9b6c61a79cb924c66f3b0271"
30
31
  }
@@ -0,0 +1,759 @@
1
+ export default [
2
+ {
3
+ inputs: [
4
+ {
5
+ internalType: 'string',
6
+ name: '_name',
7
+ type: 'string',
8
+ },
9
+ {
10
+ internalType: 'string',
11
+ name: '_symbol',
12
+ type: 'string',
13
+ },
14
+ {
15
+ internalType: 'string',
16
+ name: '_baseUri',
17
+ type: 'string',
18
+ },
19
+ ],
20
+ stateMutability: 'nonpayable',
21
+ type: 'constructor',
22
+ },
23
+ {
24
+ inputs: [],
25
+ name: 'ApprovalCallerNotOwnerNorApproved',
26
+ type: 'error',
27
+ },
28
+ {
29
+ inputs: [],
30
+ name: 'ApprovalQueryForNonexistentToken',
31
+ type: 'error',
32
+ },
33
+ {
34
+ inputs: [],
35
+ name: 'BalanceQueryForZeroAddress',
36
+ type: 'error',
37
+ },
38
+ {
39
+ inputs: [],
40
+ name: 'MintERC2309QuantityExceedsLimit',
41
+ type: 'error',
42
+ },
43
+ {
44
+ inputs: [],
45
+ name: 'MintToZeroAddress',
46
+ type: 'error',
47
+ },
48
+ {
49
+ inputs: [],
50
+ name: 'MintZeroQuantity',
51
+ type: 'error',
52
+ },
53
+ {
54
+ inputs: [],
55
+ name: 'OwnerQueryForNonexistentToken',
56
+ type: 'error',
57
+ },
58
+ {
59
+ inputs: [],
60
+ name: 'OwnershipNotInitializedForExtraData',
61
+ type: 'error',
62
+ },
63
+ {
64
+ inputs: [],
65
+ name: 'TransferCallerNotOwnerNorApproved',
66
+ type: 'error',
67
+ },
68
+ {
69
+ inputs: [],
70
+ name: 'TransferFromIncorrectOwner',
71
+ type: 'error',
72
+ },
73
+ {
74
+ inputs: [],
75
+ name: 'TransferToNonERC721ReceiverImplementer',
76
+ type: 'error',
77
+ },
78
+ {
79
+ inputs: [],
80
+ name: 'TransferToZeroAddress',
81
+ type: 'error',
82
+ },
83
+ {
84
+ inputs: [],
85
+ name: 'URIQueryForNonexistentToken',
86
+ type: 'error',
87
+ },
88
+ {
89
+ anonymous: false,
90
+ inputs: [
91
+ {
92
+ indexed: true,
93
+ internalType: 'address',
94
+ name: 'owner',
95
+ type: 'address',
96
+ },
97
+ {
98
+ indexed: true,
99
+ internalType: 'address',
100
+ name: 'approved',
101
+ type: 'address',
102
+ },
103
+ {
104
+ indexed: true,
105
+ internalType: 'uint256',
106
+ name: 'tokenId',
107
+ type: 'uint256',
108
+ },
109
+ ],
110
+ name: 'Approval',
111
+ type: 'event',
112
+ },
113
+ {
114
+ anonymous: false,
115
+ inputs: [
116
+ {
117
+ indexed: true,
118
+ internalType: 'address',
119
+ name: 'owner',
120
+ type: 'address',
121
+ },
122
+ {
123
+ indexed: true,
124
+ internalType: 'address',
125
+ name: 'operator',
126
+ type: 'address',
127
+ },
128
+ {
129
+ indexed: false,
130
+ internalType: 'bool',
131
+ name: 'approved',
132
+ type: 'bool',
133
+ },
134
+ ],
135
+ name: 'ApprovalForAll',
136
+ type: 'event',
137
+ },
138
+ {
139
+ anonymous: false,
140
+ inputs: [
141
+ {
142
+ indexed: true,
143
+ internalType: 'uint256',
144
+ name: 'fromTokenId',
145
+ type: 'uint256',
146
+ },
147
+ {
148
+ indexed: false,
149
+ internalType: 'uint256',
150
+ name: 'toTokenId',
151
+ type: 'uint256',
152
+ },
153
+ {
154
+ indexed: true,
155
+ internalType: 'address',
156
+ name: 'from',
157
+ type: 'address',
158
+ },
159
+ {
160
+ indexed: true,
161
+ internalType: 'address',
162
+ name: 'to',
163
+ type: 'address',
164
+ },
165
+ ],
166
+ name: 'ConsecutiveTransfer',
167
+ type: 'event',
168
+ },
169
+ {
170
+ anonymous: false,
171
+ inputs: [
172
+ {
173
+ indexed: true,
174
+ internalType: 'address',
175
+ name: 'previousOwner',
176
+ type: 'address',
177
+ },
178
+ {
179
+ indexed: true,
180
+ internalType: 'address',
181
+ name: 'newOwner',
182
+ type: 'address',
183
+ },
184
+ ],
185
+ name: 'OwnershipTransferred',
186
+ type: 'event',
187
+ },
188
+ {
189
+ anonymous: false,
190
+ inputs: [
191
+ {
192
+ indexed: true,
193
+ internalType: 'address',
194
+ name: 'from',
195
+ type: 'address',
196
+ },
197
+ {
198
+ indexed: true,
199
+ internalType: 'address',
200
+ name: 'to',
201
+ type: 'address',
202
+ },
203
+ {
204
+ indexed: true,
205
+ internalType: 'uint256',
206
+ name: 'tokenId',
207
+ type: 'uint256',
208
+ },
209
+ ],
210
+ name: 'Transfer',
211
+ type: 'event',
212
+ },
213
+ {
214
+ inputs: [],
215
+ name: 'MAX_SUPPLY',
216
+ outputs: [
217
+ {
218
+ internalType: 'uint256',
219
+ name: '',
220
+ type: 'uint256',
221
+ },
222
+ ],
223
+ stateMutability: 'view',
224
+ type: 'function',
225
+ },
226
+ {
227
+ inputs: [],
228
+ name: 'PUBLIC_MINT_LIMIT',
229
+ outputs: [
230
+ {
231
+ internalType: 'uint256',
232
+ name: '',
233
+ type: 'uint256',
234
+ },
235
+ ],
236
+ stateMutability: 'view',
237
+ type: 'function',
238
+ },
239
+ {
240
+ inputs: [],
241
+ name: 'PUBLIC_MINT_LIMIT_TXN',
242
+ outputs: [
243
+ {
244
+ internalType: 'uint256',
245
+ name: '',
246
+ type: 'uint256',
247
+ },
248
+ ],
249
+ stateMutability: 'view',
250
+ type: 'function',
251
+ },
252
+ {
253
+ inputs: [
254
+ {
255
+ internalType: 'address',
256
+ name: 'to',
257
+ type: 'address',
258
+ },
259
+ {
260
+ internalType: 'uint256',
261
+ name: 'tokenId',
262
+ type: 'uint256',
263
+ },
264
+ ],
265
+ name: 'approve',
266
+ outputs: [],
267
+ stateMutability: 'payable',
268
+ type: 'function',
269
+ },
270
+ {
271
+ inputs: [
272
+ {
273
+ internalType: 'address',
274
+ name: 'owner',
275
+ type: 'address',
276
+ },
277
+ ],
278
+ name: 'balanceOf',
279
+ outputs: [
280
+ {
281
+ internalType: 'uint256',
282
+ name: '',
283
+ type: 'uint256',
284
+ },
285
+ ],
286
+ stateMutability: 'view',
287
+ type: 'function',
288
+ },
289
+ {
290
+ inputs: [
291
+ {
292
+ internalType: 'uint256',
293
+ name: 'tokenId',
294
+ type: 'uint256',
295
+ },
296
+ ],
297
+ name: 'getApproved',
298
+ outputs: [
299
+ {
300
+ internalType: 'address',
301
+ name: '',
302
+ type: 'address',
303
+ },
304
+ ],
305
+ stateMutability: 'view',
306
+ type: 'function',
307
+ },
308
+ {
309
+ inputs: [
310
+ {
311
+ internalType: 'address',
312
+ name: 'owner',
313
+ type: 'address',
314
+ },
315
+ {
316
+ internalType: 'address',
317
+ name: 'operator',
318
+ type: 'address',
319
+ },
320
+ ],
321
+ name: 'isApprovedForAll',
322
+ outputs: [
323
+ {
324
+ internalType: 'bool',
325
+ name: '',
326
+ type: 'bool',
327
+ },
328
+ ],
329
+ stateMutability: 'view',
330
+ type: 'function',
331
+ },
332
+ {
333
+ inputs: [
334
+ {
335
+ internalType: 'uint256',
336
+ name: 'quantity',
337
+ type: 'uint256',
338
+ },
339
+ {
340
+ internalType: 'address',
341
+ name: 'receiver',
342
+ type: 'address',
343
+ },
344
+ ],
345
+ name: 'mintToUser',
346
+ outputs: [],
347
+ stateMutability: 'nonpayable',
348
+ type: 'function',
349
+ },
350
+ {
351
+ inputs: [],
352
+ name: 'name',
353
+ outputs: [
354
+ {
355
+ internalType: 'string',
356
+ name: '',
357
+ type: 'string',
358
+ },
359
+ ],
360
+ stateMutability: 'view',
361
+ type: 'function',
362
+ },
363
+ {
364
+ inputs: [
365
+ {
366
+ internalType: 'address',
367
+ name: '',
368
+ type: 'address',
369
+ },
370
+ ],
371
+ name: 'numUserMints',
372
+ outputs: [
373
+ {
374
+ internalType: 'uint256',
375
+ name: '',
376
+ type: 'uint256',
377
+ },
378
+ ],
379
+ stateMutability: 'view',
380
+ type: 'function',
381
+ },
382
+ {
383
+ inputs: [],
384
+ name: 'owner',
385
+ outputs: [
386
+ {
387
+ internalType: 'address',
388
+ name: '',
389
+ type: 'address',
390
+ },
391
+ ],
392
+ stateMutability: 'view',
393
+ type: 'function',
394
+ },
395
+ {
396
+ inputs: [
397
+ {
398
+ internalType: 'uint256',
399
+ name: 'tokenId',
400
+ type: 'uint256',
401
+ },
402
+ ],
403
+ name: 'ownerOf',
404
+ outputs: [
405
+ {
406
+ internalType: 'address',
407
+ name: '',
408
+ type: 'address',
409
+ },
410
+ ],
411
+ stateMutability: 'view',
412
+ type: 'function',
413
+ },
414
+ {
415
+ inputs: [],
416
+ name: 'paused',
417
+ outputs: [
418
+ {
419
+ internalType: 'bool',
420
+ name: '',
421
+ type: 'bool',
422
+ },
423
+ ],
424
+ stateMutability: 'view',
425
+ type: 'function',
426
+ },
427
+ {
428
+ inputs: [
429
+ {
430
+ internalType: 'uint256',
431
+ name: 'quantity',
432
+ type: 'uint256',
433
+ },
434
+ ],
435
+ name: 'publicMint',
436
+ outputs: [],
437
+ stateMutability: 'payable',
438
+ type: 'function',
439
+ },
440
+ {
441
+ inputs: [],
442
+ name: 'publicPrice',
443
+ outputs: [
444
+ {
445
+ internalType: 'uint256',
446
+ name: '',
447
+ type: 'uint256',
448
+ },
449
+ ],
450
+ stateMutability: 'view',
451
+ type: 'function',
452
+ },
453
+ {
454
+ inputs: [],
455
+ name: 'publicSale',
456
+ outputs: [
457
+ {
458
+ internalType: 'bool',
459
+ name: '',
460
+ type: 'bool',
461
+ },
462
+ ],
463
+ stateMutability: 'view',
464
+ type: 'function',
465
+ },
466
+ {
467
+ inputs: [],
468
+ name: 'renounceOwnership',
469
+ outputs: [],
470
+ stateMutability: 'nonpayable',
471
+ type: 'function',
472
+ },
473
+ {
474
+ inputs: [],
475
+ name: 'revealed',
476
+ outputs: [
477
+ {
478
+ internalType: 'bool',
479
+ name: '',
480
+ type: 'bool',
481
+ },
482
+ ],
483
+ stateMutability: 'view',
484
+ type: 'function',
485
+ },
486
+ {
487
+ inputs: [],
488
+ name: 'revealedURI',
489
+ outputs: [
490
+ {
491
+ internalType: 'string',
492
+ name: '',
493
+ type: 'string',
494
+ },
495
+ ],
496
+ stateMutability: 'view',
497
+ type: 'function',
498
+ },
499
+ {
500
+ inputs: [
501
+ {
502
+ internalType: 'address',
503
+ name: 'from',
504
+ type: 'address',
505
+ },
506
+ {
507
+ internalType: 'address',
508
+ name: 'to',
509
+ type: 'address',
510
+ },
511
+ {
512
+ internalType: 'uint256',
513
+ name: 'tokenId',
514
+ type: 'uint256',
515
+ },
516
+ ],
517
+ name: 'safeTransferFrom',
518
+ outputs: [],
519
+ stateMutability: 'payable',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [
524
+ {
525
+ internalType: 'address',
526
+ name: 'from',
527
+ type: 'address',
528
+ },
529
+ {
530
+ internalType: 'address',
531
+ name: 'to',
532
+ type: 'address',
533
+ },
534
+ {
535
+ internalType: 'uint256',
536
+ name: 'tokenId',
537
+ type: 'uint256',
538
+ },
539
+ {
540
+ internalType: 'bytes',
541
+ name: '_data',
542
+ type: 'bytes',
543
+ },
544
+ ],
545
+ name: 'safeTransferFrom',
546
+ outputs: [],
547
+ stateMutability: 'payable',
548
+ type: 'function',
549
+ },
550
+ {
551
+ inputs: [
552
+ {
553
+ internalType: 'address',
554
+ name: 'operator',
555
+ type: 'address',
556
+ },
557
+ {
558
+ internalType: 'bool',
559
+ name: 'approved',
560
+ type: 'bool',
561
+ },
562
+ ],
563
+ name: 'setApprovalForAll',
564
+ outputs: [],
565
+ stateMutability: 'nonpayable',
566
+ type: 'function',
567
+ },
568
+ {
569
+ inputs: [
570
+ {
571
+ internalType: 'string',
572
+ name: '_baseUri',
573
+ type: 'string',
574
+ },
575
+ ],
576
+ name: 'setBaseURI',
577
+ outputs: [],
578
+ stateMutability: 'nonpayable',
579
+ type: 'function',
580
+ },
581
+ {
582
+ inputs: [
583
+ {
584
+ internalType: 'bool',
585
+ name: '_state',
586
+ type: 'bool',
587
+ },
588
+ ],
589
+ name: 'setPaused',
590
+ outputs: [],
591
+ stateMutability: 'nonpayable',
592
+ type: 'function',
593
+ },
594
+ {
595
+ inputs: [
596
+ {
597
+ internalType: 'bool',
598
+ name: '_state',
599
+ type: 'bool',
600
+ },
601
+ ],
602
+ name: 'setPublicEnabled',
603
+ outputs: [],
604
+ stateMutability: 'nonpayable',
605
+ type: 'function',
606
+ },
607
+ {
608
+ inputs: [
609
+ {
610
+ internalType: 'uint256',
611
+ name: '_publicPrice',
612
+ type: 'uint256',
613
+ },
614
+ ],
615
+ name: 'setPublicPrice',
616
+ outputs: [],
617
+ stateMutability: 'nonpayable',
618
+ type: 'function',
619
+ },
620
+ {
621
+ inputs: [
622
+ {
623
+ internalType: 'bool',
624
+ name: '_state',
625
+ type: 'bool',
626
+ },
627
+ ],
628
+ name: 'setRevealed',
629
+ outputs: [],
630
+ stateMutability: 'nonpayable',
631
+ type: 'function',
632
+ },
633
+ {
634
+ inputs: [
635
+ {
636
+ internalType: 'bytes4',
637
+ name: 'interfaceId',
638
+ type: 'bytes4',
639
+ },
640
+ ],
641
+ name: 'supportsInterface',
642
+ outputs: [
643
+ {
644
+ internalType: 'bool',
645
+ name: '',
646
+ type: 'bool',
647
+ },
648
+ ],
649
+ stateMutability: 'view',
650
+ type: 'function',
651
+ },
652
+ {
653
+ inputs: [],
654
+ name: 'symbol',
655
+ outputs: [
656
+ {
657
+ internalType: 'string',
658
+ name: '',
659
+ type: 'string',
660
+ },
661
+ ],
662
+ stateMutability: 'view',
663
+ type: 'function',
664
+ },
665
+ {
666
+ inputs: [
667
+ {
668
+ internalType: 'uint256',
669
+ name: '_tokenId',
670
+ type: 'uint256',
671
+ },
672
+ ],
673
+ name: 'tokenURI',
674
+ outputs: [
675
+ {
676
+ internalType: 'string',
677
+ name: '',
678
+ type: 'string',
679
+ },
680
+ ],
681
+ stateMutability: 'view',
682
+ type: 'function',
683
+ },
684
+ {
685
+ inputs: [],
686
+ name: 'totalSupply',
687
+ outputs: [
688
+ {
689
+ internalType: 'uint256',
690
+ name: '',
691
+ type: 'uint256',
692
+ },
693
+ ],
694
+ stateMutability: 'view',
695
+ type: 'function',
696
+ },
697
+ {
698
+ inputs: [
699
+ {
700
+ internalType: 'address',
701
+ name: 'from',
702
+ type: 'address',
703
+ },
704
+ {
705
+ internalType: 'address',
706
+ name: 'to',
707
+ type: 'address',
708
+ },
709
+ {
710
+ internalType: 'uint256',
711
+ name: 'tokenId',
712
+ type: 'uint256',
713
+ },
714
+ ],
715
+ name: 'transferFrom',
716
+ outputs: [],
717
+ stateMutability: 'payable',
718
+ type: 'function',
719
+ },
720
+ {
721
+ inputs: [
722
+ {
723
+ internalType: 'address',
724
+ name: 'newOwner',
725
+ type: 'address',
726
+ },
727
+ ],
728
+ name: 'transferOwnership',
729
+ outputs: [],
730
+ stateMutability: 'nonpayable',
731
+ type: 'function',
732
+ },
733
+ {
734
+ inputs: [
735
+ {
736
+ internalType: 'address',
737
+ name: '_owner',
738
+ type: 'address',
739
+ },
740
+ ],
741
+ name: 'walletOfOwner',
742
+ outputs: [
743
+ {
744
+ internalType: 'uint256[]',
745
+ name: '',
746
+ type: 'uint256[]',
747
+ },
748
+ ],
749
+ stateMutability: 'view',
750
+ type: 'function',
751
+ },
752
+ {
753
+ inputs: [],
754
+ name: 'withdraw',
755
+ outputs: [],
756
+ stateMutability: 'payable',
757
+ type: 'function',
758
+ },
759
+ ]
package/src/abi/index.js CHANGED
@@ -3,6 +3,7 @@ import cdai from './cdai'
3
3
  import dai from './dai'
4
4
  import erc20 from './ierc20-extended'
5
5
  import erc20BytesParams from './ierc20-bytes-params'
6
+ import erc721 from './erc721'
6
7
  import gnt from './gnt'
7
8
  import kyberv2 from './kyberv2.js'
8
9
  import loomv2Swap from './loomv2-swap'
@@ -20,6 +21,7 @@ export default {
20
21
  dai,
21
22
  erc20,
22
23
  erc20BytesParams,
24
+ erc721,
23
25
  gnt,
24
26
  kyberv2,
25
27
  loomv2Swap,
@@ -28,6 +28,8 @@ export default function createContract(address, contractName) {
28
28
  return new SolidityContract(ABI.ensResolver, address)
29
29
  case 'ensRegistry':
30
30
  return new SolidityContract(ABI.ensRegistry, address)
31
+ case 'erc721':
32
+ return new SolidityContract(ABI.erc721, address)
31
33
  default:
32
34
  return SolidityContract.erc20(address)
33
35
  }
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  // https://snowtrace.io/chart/gasprice
6
7
  // https://stats.avax.network/dashboard/c-chain-activity/
7
8
  gasPrice: '225 nAVAX',
@@ -14,6 +15,6 @@ export default new FeeData(
14
15
  eip1559Enabled: true,
15
16
  tipGasPrice: '4 nAVAX',
16
17
  },
17
- 'gasPrice',
18
- 'avalanchec'
19
- )
18
+ mainKey: 'gasPrice',
19
+ currency: assets.avalanchec.currency,
20
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  gasPrice: '20 Gwei',
6
7
  max: '200 Gwei',
7
8
  min: '1 Gwei',
@@ -10,6 +11,6 @@ export default new FeeData(
10
11
  gasPriceMinimumRate: 0.6,
11
12
  eip1559Enabled: false,
12
13
  },
13
- 'gasPrice',
14
- 'bsc'
15
- )
14
+ mainKey: 'gasPrice',
15
+ currency: assets.bsc.currency,
16
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  gasPrice: '75 Gwei',
6
7
  baseFeePerGas: '50 Gwei',
7
8
  max: '250 Gwei',
@@ -13,7 +14,8 @@ export default new FeeData(
13
14
  enableFeeDelegation: false,
14
15
  tipGasPrice: '2 Gwei',
15
16
  eip1559Enabled: true,
17
+ rbfEnabled: true,
16
18
  },
17
- 'gasPrice',
18
- 'ethereum'
19
- )
19
+ mainKey: 'gasPrice',
20
+ currency: assets.ethereum.currency,
21
+ })
@@ -1,12 +1,13 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  gasPrice: '20 Gwei',
6
7
  max: '250 Gwei',
7
8
  min: '1 Gwei',
8
9
  eip1559Enabled: false,
9
10
  },
10
- 'gasPrice',
11
- 'ethereumclassic'
12
- )
11
+ mainKey: 'gasPrice',
12
+ currency: assets.ethereumclassic.currency,
13
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  gasPrice: '75 Gwei',
6
7
  baseFeePerGas: '50 Gwei',
7
8
  max: '250 Gwei',
@@ -14,6 +15,6 @@ export default new FeeData(
14
15
  tipGasPrice: '2 Gwei',
15
16
  eip1559Enabled: true,
16
17
  },
17
- 'gasPrice',
18
- 'ethereumgoerli'
19
- )
18
+ mainKey: 'gasPrice',
19
+ currency: assets.ethereumgoerli.currency,
20
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  // https://ftmscan.com/chart/gasprice
6
7
  gasPrice: '400 Gwei',
7
8
  max: '700 Gwei',
@@ -11,6 +12,6 @@ export default new FeeData(
11
12
  gasPriceMinimumRate: 0.6,
12
13
  eip1559Enabled: false,
13
14
  },
14
- 'gasPrice',
15
- 'fantommainnet'
16
- )
15
+ mainKey: 'gasPrice',
16
+ currency: assets.fantommainnet.currency,
17
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  gasPrice: '10 Gwei',
6
7
  max: '700 Gwei',
7
8
  min: '30 Gwei',
@@ -10,6 +11,6 @@ export default new FeeData(
10
11
  gasPriceMinimumRate: 0.6,
11
12
  eip1559Enabled: false,
12
13
  },
13
- 'gasPrice',
14
- 'harmonymainnet'
15
- )
14
+ mainKey: 'gasPrice',
15
+ currency: assets.harmonymainnet.currency,
16
+ })
@@ -1,7 +1,8 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
+ import assets from '@exodus/assets'
2
3
 
3
- export default new FeeData(
4
- {
4
+ export default new FeeData({
5
+ config: {
5
6
  // https://polygonscan.com/chart/gasprice
6
7
  baseFeePerGas: '100 Gwei',
7
8
  tipGasPrice: '35 Gwei',
@@ -13,6 +14,6 @@ export default new FeeData(
13
14
  gasPriceMinimumRate: 0.6,
14
15
  eip1559Enabled: true,
15
16
  },
16
- 'gasPrice',
17
- 'matic'
18
- )
17
+ mainKey: 'gasPrice',
18
+ currency: assets.matic.currency,
19
+ })
@@ -76,6 +76,23 @@ export const isEip1559Tx = (serializedTx: string) => getTxType(serializedTx) ===
76
76
 
77
77
  export const APPROVE_METHOD_ID = '0x095ea7b3'
78
78
 
79
+ export const KNOWN_NFT_TRANSFER_METHOD_IDS = [
80
+ '0xfb0f3ee1', // NFT marketplace seaport fulfillBasicOrder methodId
81
+ ]
82
+
83
+ const ERC721_TRANSFER_METHOD_IDS = [
84
+ '0x23b872dd', // transferFrom(address,address,uint256)
85
+ '0x42842e0e', // safeTransferFrom(address,address,uint256)
86
+ '0xb88d4fde', // safeTransferFrom(address,address,uint256,bytes)
87
+ '0x66a3de2a', // _safeTransferFrom(address,address,uint256,bytes)
88
+ ]
89
+
90
+ export const checkIsNFTInputData = (data) =>
91
+ KNOWN_NFT_TRANSFER_METHOD_IDS.some((methodId) => data?.startsWith(methodId))
92
+
93
+ export const checkIsERC721InputData = (data) =>
94
+ ERC721_TRANSFER_METHOD_IDS.some((methodId) => data?.startsWith(methodId))
95
+
79
96
  export const FEE_PAYMENT_PREFIX = '0xfee0'
80
97
 
81
98
  export const isApproveTx = (tx) => tx?.data?.data?.startsWith(APPROVE_METHOD_ID)