@reyaxyz/common 0.362.1 → 0.363.0
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/README.md +1 -1
- package/dist/commands/exposure/command.js +8 -22
- package/dist/commands/exposure/command.js.map +1 -1
- package/dist/incentives-api-types.js.map +1 -1
- package/dist/services/getNativeToken.js +1 -0
- package/dist/services/getNativeToken.js.map +1 -1
- package/dist/services/getSocketAddresses.js +1 -0
- package/dist/services/getSocketAddresses.js.map +1 -1
- package/dist/trading-api-types.js.map +1 -1
- package/dist/transactions/abis/Errors.json +1638 -34
- package/dist/transactions/abis/OrdersGateway.json +729 -123
- package/dist/transactions/abis/PassivePerpProxy.json +542 -0
- package/dist/transactions/buildMulticallTx.js.map +1 -1
- package/dist/transactions/consts.js +1 -2
- package/dist/transactions/consts.js.map +1 -1
- package/dist/transactions/contractAddresses.js +45 -5
- package/dist/transactions/contractAddresses.js.map +1 -1
- package/dist/transactions/sign.js +237 -111
- package/dist/transactions/sign.js.map +1 -1
- package/dist/types/commands/exposure/command.d.ts +8 -7
- package/dist/types/commands/exposure/command.d.ts.map +1 -1
- package/dist/types/incentives-api-types.d.ts +61 -5
- package/dist/types/incentives-api-types.d.ts.map +1 -1
- package/dist/types/services/getNativeToken.d.ts.map +1 -1
- package/dist/types/services/getSocketAddresses.d.ts.map +1 -1
- package/dist/types/trading-api-types.d.ts +200 -32
- package/dist/types/trading-api-types.d.ts.map +1 -1
- package/dist/types/transactions/buildMulticallTx.d.ts +1 -0
- package/dist/types/transactions/buildMulticallTx.d.ts.map +1 -1
- package/dist/types/transactions/consts.d.ts +0 -1
- package/dist/types/transactions/consts.d.ts.map +1 -1
- package/dist/types/transactions/contractAddresses.d.ts +0 -1
- package/dist/types/transactions/contractAddresses.d.ts.map +1 -1
- package/dist/types/transactions/sign.d.ts +113 -9
- package/dist/types/transactions/sign.d.ts.map +1 -1
- package/dist/types/types.d.ts +61 -65
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/calculate.d.ts.map +1 -1
- package/dist/types/utils/consts.d.ts +2 -2
- package/dist/types/utils/consts.d.ts.map +1 -1
- package/dist/types/utils/error-sanitizer.d.ts +15 -0
- package/dist/types/utils/error-sanitizer.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/network.d.ts.map +1 -1
- package/dist/types/utils/number.d.ts +5 -0
- package/dist/types/utils/number.d.ts.map +1 -1
- package/dist/types/utils/realized-balance.d.ts +54 -0
- package/dist/types/utils/realized-balance.d.ts.map +1 -0
- package/dist/types/utils/throttled-error.d.ts +42 -0
- package/dist/types/utils/throttled-error.d.ts.map +1 -0
- package/dist/types/utils/token/normalize.d.ts +2 -1
- package/dist/types/utils/token/normalize.d.ts.map +1 -1
- package/dist/types/utils/token/token-info-getters.d.ts.map +1 -1
- package/dist/types/utils/token/token-info.d.ts.map +1 -1
- package/dist/types.js +25 -11
- package/dist/types.js.map +1 -1
- package/dist/utils/calculate.js +18 -9
- package/dist/utils/calculate.js.map +1 -1
- package/dist/utils/consts.js +2 -7
- package/dist/utils/consts.js.map +1 -1
- package/dist/utils/error-sanitizer.js +135 -0
- package/dist/utils/error-sanitizer.js.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/network.js +4 -0
- package/dist/utils/network.js.map +1 -1
- package/dist/utils/number.js +96 -1
- package/dist/utils/number.js.map +1 -1
- package/dist/utils/realized-balance.js +126 -0
- package/dist/utils/realized-balance.js.map +1 -0
- package/dist/utils/throttled-error.js +60 -0
- package/dist/utils/throttled-error.js.map +1 -0
- package/dist/utils/token/normalize.js +2 -2
- package/dist/utils/token/normalize.js.map +1 -1
- package/dist/utils/token/token-info-getters.js +80 -5
- package/dist/utils/token/token-info-getters.js.map +1 -1
- package/dist/utils/token/token-info.js +7 -0
- package/dist/utils/token/token-info.js.map +1 -1
- package/package.json +3 -3
- package/src/commands/exposure/command.ts +8 -38
- package/src/incentives-api-types.ts +60 -5
- package/src/services/getNativeToken.ts +1 -0
- package/src/services/getSocketAddresses.ts +1 -0
- package/src/trading-api-types.ts +258 -39
- package/src/transactions/abis/Errors.json +5478 -3874
- package/src/transactions/abis/OrdersGateway.json +730 -124
- package/src/transactions/abis/PassivePerpProxy.json +542 -0
- package/src/transactions/buildMulticallTx.ts +4 -0
- package/src/transactions/consts.ts +0 -1
- package/src/transactions/contractAddresses.ts +42 -7
- package/src/transactions/sign.ts +306 -150
- package/src/types.ts +98 -83
- package/src/utils/calculate.ts +21 -8
- package/src/utils/consts.ts +4 -16
- package/src/utils/error-sanitizer.ts +137 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/network.ts +4 -0
- package/src/utils/number.ts +110 -0
- package/src/utils/realized-balance.ts +163 -0
- package/src/utils/throttled-error.ts +85 -0
- package/src/utils/token/normalize.ts +6 -1
- package/src/utils/token/token-info-getters.ts +104 -6
- package/src/utils/token/token-info.ts +42 -0
|
@@ -331,6 +331,548 @@
|
|
|
331
331
|
],
|
|
332
332
|
"outputs": [],
|
|
333
333
|
"stateMutability": "nonpayable"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"type": "event",
|
|
337
|
+
"name": "PassivePerpExecutionV3",
|
|
338
|
+
"inputs": [
|
|
339
|
+
{
|
|
340
|
+
"name": "marketId",
|
|
341
|
+
"type": "uint128",
|
|
342
|
+
"indexed": true,
|
|
343
|
+
"internalType": "uint128"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "exchangeId",
|
|
347
|
+
"type": "uint128",
|
|
348
|
+
"indexed": false,
|
|
349
|
+
"internalType": "uint128"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "accountId",
|
|
353
|
+
"type": "uint128",
|
|
354
|
+
"indexed": true,
|
|
355
|
+
"internalType": "uint128"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"name": "counterpartyAccountId",
|
|
359
|
+
"type": "uint128",
|
|
360
|
+
"indexed": false,
|
|
361
|
+
"internalType": "uint128"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "eventSequenceNumber",
|
|
365
|
+
"type": "uint128",
|
|
366
|
+
"indexed": true,
|
|
367
|
+
"internalType": "uint128"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "blockTimestamp",
|
|
371
|
+
"type": "uint256",
|
|
372
|
+
"indexed": false,
|
|
373
|
+
"internalType": "uint256"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "data",
|
|
377
|
+
"type": "tuple",
|
|
378
|
+
"indexed": false,
|
|
379
|
+
"internalType": "struct PassivePerpExecutionEventDataV3",
|
|
380
|
+
"components": [
|
|
381
|
+
{
|
|
382
|
+
"name": "executedBase",
|
|
383
|
+
"type": "int256",
|
|
384
|
+
"internalType": "SD59x18"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "perpFillFees",
|
|
388
|
+
"type": "tuple",
|
|
389
|
+
"internalType": "struct PerpFillFees",
|
|
390
|
+
"components": [
|
|
391
|
+
{
|
|
392
|
+
"name": "protocolFeeCredit",
|
|
393
|
+
"type": "uint256",
|
|
394
|
+
"internalType": "uint256"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"name": "referrerFeeCredit",
|
|
398
|
+
"type": "uint256",
|
|
399
|
+
"internalType": "uint256"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "takerRebateCredit",
|
|
403
|
+
"type": "uint256",
|
|
404
|
+
"internalType": "uint256"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "poolFeeCredit",
|
|
408
|
+
"type": "uint256",
|
|
409
|
+
"internalType": "uint256"
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "executedPrice",
|
|
415
|
+
"type": "uint256",
|
|
416
|
+
"internalType": "UD60x18"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "referrerAccountId",
|
|
420
|
+
"type": "uint128",
|
|
421
|
+
"internalType": "uint128"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "executionType",
|
|
425
|
+
"type": "uint8",
|
|
426
|
+
"internalType": "enum ExecutionType"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "positionData",
|
|
430
|
+
"type": "tuple",
|
|
431
|
+
"internalType": "struct PerpPosition",
|
|
432
|
+
"components": [
|
|
433
|
+
{
|
|
434
|
+
"name": "base",
|
|
435
|
+
"type": "int256",
|
|
436
|
+
"internalType": "SD59x18"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "realizedPnL",
|
|
440
|
+
"type": "int256",
|
|
441
|
+
"internalType": "SD59x18"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "lastPriceData",
|
|
445
|
+
"type": "tuple",
|
|
446
|
+
"internalType": "struct PriceData",
|
|
447
|
+
"components": [
|
|
448
|
+
{
|
|
449
|
+
"name": "price",
|
|
450
|
+
"type": "uint256",
|
|
451
|
+
"internalType": "UD60x18"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "timestamp",
|
|
455
|
+
"type": "uint256",
|
|
456
|
+
"internalType": "uint256"
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"name": "trackers",
|
|
462
|
+
"type": "tuple",
|
|
463
|
+
"internalType": "struct FundingAndADLTrackers",
|
|
464
|
+
"components": [
|
|
465
|
+
{
|
|
466
|
+
"name": "fundingValue",
|
|
467
|
+
"type": "int256",
|
|
468
|
+
"internalType": "SD59x18"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "baseMultiplier",
|
|
472
|
+
"type": "uint256",
|
|
473
|
+
"internalType": "UD60x18"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "adlUnwindPrice",
|
|
477
|
+
"type": "uint256",
|
|
478
|
+
"internalType": "UD60x18"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "averageEntryFundingValue",
|
|
484
|
+
"type": "int256",
|
|
485
|
+
"internalType": "SD59x18"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "session",
|
|
489
|
+
"type": "uint128",
|
|
490
|
+
"internalType": "uint128"
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "counterpartyPositionData",
|
|
496
|
+
"type": "tuple",
|
|
497
|
+
"internalType": "struct PerpPosition",
|
|
498
|
+
"components": [
|
|
499
|
+
{
|
|
500
|
+
"name": "base",
|
|
501
|
+
"type": "int256",
|
|
502
|
+
"internalType": "SD59x18"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "realizedPnL",
|
|
506
|
+
"type": "int256",
|
|
507
|
+
"internalType": "SD59x18"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "lastPriceData",
|
|
511
|
+
"type": "tuple",
|
|
512
|
+
"internalType": "struct PriceData",
|
|
513
|
+
"components": [
|
|
514
|
+
{
|
|
515
|
+
"name": "price",
|
|
516
|
+
"type": "uint256",
|
|
517
|
+
"internalType": "UD60x18"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "timestamp",
|
|
521
|
+
"type": "uint256",
|
|
522
|
+
"internalType": "uint256"
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "trackers",
|
|
528
|
+
"type": "tuple",
|
|
529
|
+
"internalType": "struct FundingAndADLTrackers",
|
|
530
|
+
"components": [
|
|
531
|
+
{
|
|
532
|
+
"name": "fundingValue",
|
|
533
|
+
"type": "int256",
|
|
534
|
+
"internalType": "SD59x18"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "baseMultiplier",
|
|
538
|
+
"type": "uint256",
|
|
539
|
+
"internalType": "UD60x18"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "adlUnwindPrice",
|
|
543
|
+
"type": "uint256",
|
|
544
|
+
"internalType": "UD60x18"
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"name": "averageEntryFundingValue",
|
|
550
|
+
"type": "int256",
|
|
551
|
+
"internalType": "SD59x18"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "session",
|
|
555
|
+
"type": "uint128",
|
|
556
|
+
"internalType": "uint128"
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "preOrderPositionData",
|
|
562
|
+
"type": "tuple",
|
|
563
|
+
"internalType": "struct PerpPosition",
|
|
564
|
+
"components": [
|
|
565
|
+
{
|
|
566
|
+
"name": "base",
|
|
567
|
+
"type": "int256",
|
|
568
|
+
"internalType": "SD59x18"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "realizedPnL",
|
|
572
|
+
"type": "int256",
|
|
573
|
+
"internalType": "SD59x18"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "lastPriceData",
|
|
577
|
+
"type": "tuple",
|
|
578
|
+
"internalType": "struct PriceData",
|
|
579
|
+
"components": [
|
|
580
|
+
{
|
|
581
|
+
"name": "price",
|
|
582
|
+
"type": "uint256",
|
|
583
|
+
"internalType": "UD60x18"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "timestamp",
|
|
587
|
+
"type": "uint256",
|
|
588
|
+
"internalType": "uint256"
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "trackers",
|
|
594
|
+
"type": "tuple",
|
|
595
|
+
"internalType": "struct FundingAndADLTrackers",
|
|
596
|
+
"components": [
|
|
597
|
+
{
|
|
598
|
+
"name": "fundingValue",
|
|
599
|
+
"type": "int256",
|
|
600
|
+
"internalType": "SD59x18"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "baseMultiplier",
|
|
604
|
+
"type": "uint256",
|
|
605
|
+
"internalType": "UD60x18"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "adlUnwindPrice",
|
|
609
|
+
"type": "uint256",
|
|
610
|
+
"internalType": "UD60x18"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "averageEntryFundingValue",
|
|
616
|
+
"type": "int256",
|
|
617
|
+
"internalType": "SD59x18"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "session",
|
|
621
|
+
"type": "uint128",
|
|
622
|
+
"internalType": "uint128"
|
|
623
|
+
}
|
|
624
|
+
]
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "preOrderCounterpartyPositionData",
|
|
628
|
+
"type": "tuple",
|
|
629
|
+
"internalType": "struct PerpPosition",
|
|
630
|
+
"components": [
|
|
631
|
+
{
|
|
632
|
+
"name": "base",
|
|
633
|
+
"type": "int256",
|
|
634
|
+
"internalType": "SD59x18"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"name": "realizedPnL",
|
|
638
|
+
"type": "int256",
|
|
639
|
+
"internalType": "SD59x18"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"name": "lastPriceData",
|
|
643
|
+
"type": "tuple",
|
|
644
|
+
"internalType": "struct PriceData",
|
|
645
|
+
"components": [
|
|
646
|
+
{
|
|
647
|
+
"name": "price",
|
|
648
|
+
"type": "uint256",
|
|
649
|
+
"internalType": "UD60x18"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "timestamp",
|
|
653
|
+
"type": "uint256",
|
|
654
|
+
"internalType": "uint256"
|
|
655
|
+
}
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "trackers",
|
|
660
|
+
"type": "tuple",
|
|
661
|
+
"internalType": "struct FundingAndADLTrackers",
|
|
662
|
+
"components": [
|
|
663
|
+
{
|
|
664
|
+
"name": "fundingValue",
|
|
665
|
+
"type": "int256",
|
|
666
|
+
"internalType": "SD59x18"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "baseMultiplier",
|
|
670
|
+
"type": "uint256",
|
|
671
|
+
"internalType": "UD60x18"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "adlUnwindPrice",
|
|
675
|
+
"type": "uint256",
|
|
676
|
+
"internalType": "UD60x18"
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "averageEntryFundingValue",
|
|
682
|
+
"type": "int256",
|
|
683
|
+
"internalType": "SD59x18"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "session",
|
|
687
|
+
"type": "uint128",
|
|
688
|
+
"internalType": "uint128"
|
|
689
|
+
}
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "positionAccountOwner",
|
|
694
|
+
"type": "address",
|
|
695
|
+
"internalType": "address"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"name": "counterpartyAccountOwner",
|
|
699
|
+
"type": "address",
|
|
700
|
+
"internalType": "address"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "accountOrderId",
|
|
704
|
+
"type": "uint64",
|
|
705
|
+
"internalType": "uint64"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"name": "counterpartyOrderId",
|
|
709
|
+
"type": "uint64",
|
|
710
|
+
"internalType": "uint64"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"name": "counterpartyExchangeId",
|
|
714
|
+
"type": "uint128",
|
|
715
|
+
"internalType": "uint128"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"name": "meNonce",
|
|
719
|
+
"type": "uint256",
|
|
720
|
+
"internalType": "uint256"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "metadata",
|
|
724
|
+
"type": "bytes",
|
|
725
|
+
"internalType": "bytes"
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
],
|
|
730
|
+
"anonymous": false
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"type": "event",
|
|
734
|
+
"name": "FeeTierParametersUpdated",
|
|
735
|
+
"inputs": [
|
|
736
|
+
{
|
|
737
|
+
"name": "tierId",
|
|
738
|
+
"type": "uint256",
|
|
739
|
+
"indexed": true,
|
|
740
|
+
"internalType": "uint256"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"name": "feeTierParameters",
|
|
744
|
+
"type": "tuple",
|
|
745
|
+
"indexed": false,
|
|
746
|
+
"internalType": "struct FeeTierParameters",
|
|
747
|
+
"components": [
|
|
748
|
+
{
|
|
749
|
+
"name": "takerFee",
|
|
750
|
+
"type": "uint256",
|
|
751
|
+
"internalType": "UD60x18"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"name": "makerFee",
|
|
755
|
+
"type": "uint256",
|
|
756
|
+
"internalType": "UD60x18"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "makerRebate",
|
|
760
|
+
"type": "uint256",
|
|
761
|
+
"internalType": "UD60x18"
|
|
762
|
+
}
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"name": "blockTimestamp",
|
|
767
|
+
"type": "uint256",
|
|
768
|
+
"indexed": false,
|
|
769
|
+
"internalType": "uint256"
|
|
770
|
+
}
|
|
771
|
+
],
|
|
772
|
+
"anonymous": false
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"type": "event",
|
|
776
|
+
"name": "GlobalFeeParametersUpdated",
|
|
777
|
+
"inputs": [
|
|
778
|
+
{
|
|
779
|
+
"name": "globalFeeParameters",
|
|
780
|
+
"type": "tuple",
|
|
781
|
+
"indexed": false,
|
|
782
|
+
"internalType": "struct GlobalFeeParameters",
|
|
783
|
+
"components": [
|
|
784
|
+
{
|
|
785
|
+
"name": "ogDiscount",
|
|
786
|
+
"type": "uint256",
|
|
787
|
+
"internalType": "UD60x18"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "refereeDiscount",
|
|
791
|
+
"type": "uint256",
|
|
792
|
+
"internalType": "UD60x18"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "referrerRebate",
|
|
796
|
+
"type": "uint256",
|
|
797
|
+
"internalType": "UD60x18"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "affiliateReferrerRebate",
|
|
801
|
+
"type": "uint256",
|
|
802
|
+
"internalType": "UD60x18"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "vltzDiscount",
|
|
806
|
+
"type": "uint256",
|
|
807
|
+
"internalType": "UD60x18"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "spreadDiscount",
|
|
811
|
+
"type": "uint256",
|
|
812
|
+
"internalType": "UD60x18"
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"name": "blockTimestamp",
|
|
818
|
+
"type": "uint256",
|
|
819
|
+
"indexed": false,
|
|
820
|
+
"internalType": "uint256"
|
|
821
|
+
}
|
|
822
|
+
],
|
|
823
|
+
"anonymous": false
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"type": "event",
|
|
827
|
+
"name": "AccountOwnerFeeConfigurationUpdated",
|
|
828
|
+
"inputs": [
|
|
829
|
+
{
|
|
830
|
+
"name": "accountOwner",
|
|
831
|
+
"type": "address",
|
|
832
|
+
"indexed": true,
|
|
833
|
+
"internalType": "address"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"name": "accountOwnerFeeConfig",
|
|
837
|
+
"type": "tuple",
|
|
838
|
+
"indexed": false,
|
|
839
|
+
"internalType": "struct AccountOwnerFeeConfig",
|
|
840
|
+
"components": [
|
|
841
|
+
{
|
|
842
|
+
"name": "tierId",
|
|
843
|
+
"type": "uint256",
|
|
844
|
+
"internalType": "uint256"
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
"name": "ogStatus",
|
|
848
|
+
"type": "bool",
|
|
849
|
+
"internalType": "bool"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"name": "affiliateStatus",
|
|
853
|
+
"type": "bool",
|
|
854
|
+
"internalType": "bool"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"name": "vltzStatus",
|
|
858
|
+
"type": "bool",
|
|
859
|
+
"internalType": "bool"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"name": "spreadDiscountStatus",
|
|
863
|
+
"type": "bool",
|
|
864
|
+
"internalType": "bool"
|
|
865
|
+
}
|
|
866
|
+
]
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "blockTimestamp",
|
|
870
|
+
"type": "uint256",
|
|
871
|
+
"indexed": false,
|
|
872
|
+
"internalType": "uint256"
|
|
873
|
+
}
|
|
874
|
+
],
|
|
875
|
+
"anonymous": false
|
|
334
876
|
}
|
|
335
877
|
]
|
|
336
878
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildMulticallTx.js","sourceRoot":"/","sources":["transactions/buildMulticallTx.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,wDAAuD;AACvD,sEAAmE;
|
|
1
|
+
{"version":3,"file":"buildMulticallTx.js","sourceRoot":"/","sources":["transactions/buildMulticallTx.ts"],"names":[],"mappings":";;;AAAA,iCAAgC;AAChC,wDAAuD;AACvD,sEAAmE;AAW5D,IAAM,mBAAmB,GAAG,UAAC,SAAmB;IACrD,IAAM,iBAAiB,GAAG,cAAc,CAAC;IACzC,IAAM,UAAU,GAAwB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3D,IAAM,SAAS,GAAG,IAAI,eAAM,CAAC,SAAS,CAAC,oBAAO,CAAC,CAAC;IAChD,IAAM,QAAQ,GAAG,SAAS,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAC7E,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B;AAEF,IAAM,eAAe,GAAG,UAAC,cAAuB,EAAE,KAAa;IAC7D,IAAM,iBAAiB,GAAG,6BAA6B,CAAC;IACxD,IAAM,UAAU,GAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC9D,IAAM,SAAS,GAAG,IAAI,eAAM,CAAC,SAAS,CAAC,2BAAY,CAAC,CAAC;IACrD,IAAM,QAAQ,GAAG,SAAS,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAC7E,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEK,IAAM,qBAAqB,GAAG,UAAC,KAAa;IACjD,OAAA,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC;AAA5B,CAA4B,CAAC;AADlB,QAAA,qBAAqB,yBACH;AAExB,IAAM,uBAAuB,GAAG,UAAC,KAAa;IACnD,OAAA,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC;AAA7B,CAA6B,CAAC;AADnB,QAAA,uBAAuB,2BACJ","sourcesContent":["import { ethers } from 'ethers';\nimport { abi as CoreAbi } from './abis/CoreProxy.json';\nimport { abi as MulticallAbi } from './abis/CustomMulticall3.json';\n\nexport type Call = {\n target: string;\n callData: string;\n // Optional gas-limit override used by the off-chain transaction relay.\n // Ignored by on-chain Multicall3 struct encoding (ethers skips unknown\n // fields when matching the Solidity tuple).\n gasLimit?: number;\n};\n\nexport const encodeCoreMulticall = (calldatas: string[]): string => {\n const functionSignature = 'tryAggregate';\n const parameters: [boolean, string[]] = [false, calldatas];\n const INTERFACE = new ethers.Interface(CoreAbi);\n const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);\n return calldata;\n};\n\nconst encodeMulticall = (requireSuccess: boolean, calls: Call[]): string => {\n const functionSignature = 'tryAggregatePreservingError';\n const parameters: [boolean, Call[]] = [requireSuccess, calls];\n const INTERFACE = new ethers.Interface(MulticallAbi);\n const calldata = INTERFACE.encodeFunctionData(functionSignature, parameters);\n return calldata;\n};\n\nexport const encodeStrictMulticall = (calls: Call[]) =>\n encodeMulticall(true, calls);\n\nexport const encodeOptionalMulticall = (calls: Call[]) =>\n encodeMulticall(false, calls);\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PUBLISHER_ACCOUNT = exports.RELAYER_ACCOUNT = exports.ORDERS_GATEWAY_DEADLINE_IN_SECONDS = exports.CORE_DEADLINE_IN_SECONDS = exports.BRIDGE_DEADLINE_IN_SECONDS = void 0;
|
|
4
4
|
exports.BRIDGE_DEADLINE_IN_SECONDS = 15 * 60; // 15 minutes
|
|
5
5
|
exports.CORE_DEADLINE_IN_SECONDS = 60; // 1 minute
|
|
6
6
|
exports.ORDERS_GATEWAY_DEADLINE_IN_SECONDS = 60; // 1 minute
|
|
7
7
|
exports.RELAYER_ACCOUNT = '0xb43c317c9c9215d268881d7d6b59c2d3d0247da1'; // @todo update value
|
|
8
8
|
exports.PUBLISHER_ACCOUNT = '0xE32519ca0e751C754c8E1378846B5cd95A1CB66a'; // @todo update value
|
|
9
|
-
exports.CONDITIONAL_ORDER_SIG_DEADLINE = Math.pow(10, 18); // very big number for timestamp
|
|
10
9
|
//# sourceMappingURL=consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"/","sources":["transactions/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACnD,QAAA,wBAAwB,GAAG,EAAE,CAAC,CAAC,WAAW;AAC1C,QAAA,kCAAkC,GAAG,EAAE,CAAC,CAAC,WAAW;AACpD,QAAA,eAAe,GAAG,4CAA4C,CAAC,CAAC,qBAAqB;AACrF,QAAA,iBAAiB,GAAG,4CAA4C,CAAC,CAAC,qBAAqB
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"/","sources":["transactions/consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa;AACnD,QAAA,wBAAwB,GAAG,EAAE,CAAC,CAAC,WAAW;AAC1C,QAAA,kCAAkC,GAAG,EAAE,CAAC,CAAC,WAAW;AACpD,QAAA,eAAe,GAAG,4CAA4C,CAAC,CAAC,qBAAqB;AACrF,QAAA,iBAAiB,GAAG,4CAA4C,CAAC,CAAC,qBAAqB","sourcesContent":["export const BRIDGE_DEADLINE_IN_SECONDS = 15 * 60; // 15 minutes\nexport const CORE_DEADLINE_IN_SECONDS = 60; // 1 minute\nexport const ORDERS_GATEWAY_DEADLINE_IN_SECONDS = 60; // 1 minute\nexport const RELAYER_ACCOUNT = '0xb43c317c9c9215d268881d7d6b59c2d3d0247da1'; // @todo update value\nexport const PUBLISHER_ACCOUNT = '0xE32519ca0e751C754c8E1378846B5cd95A1CB66a'; // @todo update value\n"]}
|