@pendle/sdk-boros 0.1.35 → 0.1.36

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.
@@ -1,3 +1,4 @@
1
1
  export * from './exchange';
2
2
  export * from './types';
3
3
  export * from './tickIndexPowMath';
4
+ export * from './utils';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./exchange"), exports);
18
18
  __exportStar(require("./types"), exports);
19
19
  __exportStar(require("./tickIndexPowMath"), exports);
20
+ __exportStar(require("./utils"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/exchange/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/exchange/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,qDAAoC;AACpC,0CAAwB"}
@@ -2742,3 +2742,861 @@ export declare function decodeLog(log: Log<bigint, number, false>): {
2742
2742
  costOut: bigint;
2743
2743
  };
2744
2744
  } | null;
2745
+ export declare function getTransactionData(txHash: Hex): Promise<{
2746
+ decodedLogs: ({
2747
+ eventName: "CashTransfer";
2748
+ args: {
2749
+ from: `0x${string}`;
2750
+ to: `0x${string}`;
2751
+ amount: bigint;
2752
+ } | {
2753
+ from: `0x${string}`;
2754
+ to: `0x${string}`;
2755
+ amount: bigint;
2756
+ } | {
2757
+ from: `0x${string}`;
2758
+ to: `0x${string}`;
2759
+ amount: bigint;
2760
+ };
2761
+ } | {
2762
+ eventName: "CollectFee";
2763
+ args: {
2764
+ tokenId: number;
2765
+ amount: bigint;
2766
+ } | {
2767
+ tokenId: number;
2768
+ amount: bigint;
2769
+ } | {
2770
+ tokenId: number;
2771
+ amount: bigint;
2772
+ };
2773
+ } | {
2774
+ eventName: "EnterMarket";
2775
+ args: {
2776
+ user: `0x${string}`;
2777
+ marketId: number;
2778
+ } | {
2779
+ user: `0x${string}`;
2780
+ marketId: number;
2781
+ } | {
2782
+ user: `0x${string}`;
2783
+ marketId: number;
2784
+ };
2785
+ } | {
2786
+ eventName: "ExitMarket";
2787
+ args: {
2788
+ user: `0x${string}`;
2789
+ marketId: number;
2790
+ } | {
2791
+ user: `0x${string}`;
2792
+ marketId: number;
2793
+ } | {
2794
+ user: `0x${string}`;
2795
+ marketId: number;
2796
+ };
2797
+ } | {
2798
+ eventName: "MaxAllowedSubaccountUpdated";
2799
+ args: {
2800
+ root: `0x${string}`;
2801
+ maxAllowedSubaccountIdOld: number;
2802
+ maxAllowedSubaccountIdNew: number;
2803
+ } | {
2804
+ root: `0x${string}`;
2805
+ maxAllowedSubaccountIdOld: number;
2806
+ maxAllowedSubaccountIdNew: number;
2807
+ } | {
2808
+ root: `0x${string}`;
2809
+ maxAllowedSubaccountIdOld: number;
2810
+ maxAllowedSubaccountIdNew: number;
2811
+ };
2812
+ } | {
2813
+ eventName: "TokenAdded";
2814
+ args: {
2815
+ tokenId: number;
2816
+ tokenAddress: `0x${string}`;
2817
+ } | {
2818
+ tokenId: number;
2819
+ tokenAddress: `0x${string}`;
2820
+ } | {
2821
+ tokenId: number;
2822
+ tokenAddress: `0x${string}`;
2823
+ };
2824
+ } | {
2825
+ eventName: "VaultTransfer";
2826
+ args: {
2827
+ root: `0x${string}`;
2828
+ tokenId: number;
2829
+ unscaledAmount: bigint;
2830
+ } | {
2831
+ root: `0x${string}`;
2832
+ tokenId: number;
2833
+ unscaledAmount: bigint;
2834
+ } | {
2835
+ root: `0x${string}`;
2836
+ tokenId: number;
2837
+ unscaledAmount: bigint;
2838
+ };
2839
+ } | {
2840
+ eventName: "MarketCreated";
2841
+ args: {
2842
+ market: `0x${string}`;
2843
+ immData: {
2844
+ name: string;
2845
+ symbol: string;
2846
+ k_isIsolatedOnly: boolean;
2847
+ k_maturity: number;
2848
+ k_tokenId: number;
2849
+ k_marketId: number;
2850
+ k_tickStep: number;
2851
+ };
2852
+ config: {
2853
+ maxOpenOrders: number;
2854
+ markRateOracle: `0x${string}`;
2855
+ fIndexOracle: `0x${string}`;
2856
+ OICap: bigint;
2857
+ takerFee: bigint;
2858
+ otcFee: bigint;
2859
+ liqIncentive: {
2860
+ base: bigint;
2861
+ slope: bigint;
2862
+ };
2863
+ IMFactor: bigint;
2864
+ MMFactor: bigint;
2865
+ minMarginIndexRate: bigint;
2866
+ minMarginIndexDuration: number;
2867
+ };
2868
+ };
2869
+ } | {
2870
+ eventName: "AddLiquidityDualToAmm";
2871
+ args: {
2872
+ user: `0x${string}`;
2873
+ ammAddr: `0x${string}`;
2874
+ exactSizeIn: bigint;
2875
+ netLpOut: bigint;
2876
+ mintCashIn: bigint;
2877
+ netCashUsed: bigint;
2878
+ } | {
2879
+ user: `0x${string}`;
2880
+ ammAddr: `0x${string}`;
2881
+ exactSizeIn: bigint;
2882
+ netLpOut: bigint;
2883
+ mintCashIn: bigint;
2884
+ netCashUsed: bigint;
2885
+ } | {
2886
+ user: `0x${string}`;
2887
+ ammAddr: `0x${string}`;
2888
+ exactSizeIn: bigint;
2889
+ netLpOut: bigint;
2890
+ mintCashIn: bigint;
2891
+ netCashUsed: bigint;
2892
+ };
2893
+ } | {
2894
+ eventName: "AddLiquiditySingleCashToAmm";
2895
+ args: {
2896
+ user: `0x${string}`;
2897
+ ammAddr: `0x${string}`;
2898
+ netLpOut: bigint;
2899
+ netCashUsed: bigint;
2900
+ netSizeInterm: bigint;
2901
+ } | {
2902
+ user: `0x${string}`;
2903
+ ammAddr: `0x${string}`;
2904
+ netLpOut: bigint;
2905
+ netCashUsed: bigint;
2906
+ netSizeInterm: bigint;
2907
+ } | {
2908
+ user: `0x${string}`;
2909
+ ammAddr: `0x${string}`;
2910
+ netLpOut: bigint;
2911
+ netCashUsed: bigint;
2912
+ netSizeInterm: bigint;
2913
+ };
2914
+ } | {
2915
+ eventName: "AgentApproved";
2916
+ args: {
2917
+ account: `0x${string}`;
2918
+ agent: `0x${string}`;
2919
+ expiry: bigint;
2920
+ } | {
2921
+ account: `0x${string}`;
2922
+ agent: `0x${string}`;
2923
+ expiry: bigint;
2924
+ } | {
2925
+ account: `0x${string}`;
2926
+ agent: `0x${string}`;
2927
+ expiry: bigint;
2928
+ };
2929
+ } | {
2930
+ eventName: "AgentRevoked";
2931
+ args: {
2932
+ account: `0x${string}`;
2933
+ agent: `0x${string}`;
2934
+ } | {
2935
+ account: `0x${string}`;
2936
+ agent: `0x${string}`;
2937
+ } | {
2938
+ account: `0x${string}`;
2939
+ agent: `0x${string}`;
2940
+ };
2941
+ } | {
2942
+ eventName: "MarketIdAmmSet";
2943
+ args: {
2944
+ marketId: number;
2945
+ amm: `0x${string}`;
2946
+ };
2947
+ } | {
2948
+ eventName: "NewAccManagerSet";
2949
+ args: {
2950
+ account: `0x${string}`;
2951
+ newAccManager: `0x${string}`;
2952
+ } | {
2953
+ account: `0x${string}`;
2954
+ newAccManager: `0x${string}`;
2955
+ } | {
2956
+ account: `0x${string}`;
2957
+ newAccManager: `0x${string}`;
2958
+ };
2959
+ } | {
2960
+ eventName: "NumTicksToTryAtOnceUpdated";
2961
+ args: {
2962
+ newNumTicksToTryAtOnce: number;
2963
+ };
2964
+ } | {
2965
+ eventName: "RemoveLiquidityDualFromAmm";
2966
+ args: {
2967
+ user: `0x${string}`;
2968
+ ammAddr: `0x${string}`;
2969
+ lpToRemove: bigint;
2970
+ burnCashOut: bigint;
2971
+ netSizeOut: bigint;
2972
+ netCashOut: bigint;
2973
+ } | {
2974
+ user: `0x${string}`;
2975
+ ammAddr: `0x${string}`;
2976
+ lpToRemove: bigint;
2977
+ burnCashOut: bigint;
2978
+ netSizeOut: bigint;
2979
+ netCashOut: bigint;
2980
+ } | {
2981
+ user: `0x${string}`;
2982
+ ammAddr: `0x${string}`;
2983
+ lpToRemove: bigint;
2984
+ burnCashOut: bigint;
2985
+ netSizeOut: bigint;
2986
+ netCashOut: bigint;
2987
+ };
2988
+ } | {
2989
+ eventName: "RemoveLiquiditySingleCashFromAmm";
2990
+ args: {
2991
+ user: `0x${string}`;
2992
+ ammAddr: `0x${string}`;
2993
+ lpToRemove: bigint;
2994
+ netCashOut: bigint;
2995
+ netSizeInterm: bigint;
2996
+ } | {
2997
+ user: `0x${string}`;
2998
+ ammAddr: `0x${string}`;
2999
+ lpToRemove: bigint;
3000
+ netCashOut: bigint;
3001
+ netSizeInterm: bigint;
3002
+ } | {
3003
+ user: `0x${string}`;
3004
+ ammAddr: `0x${string}`;
3005
+ lpToRemove: bigint;
3006
+ netCashOut: bigint;
3007
+ netSizeInterm: bigint;
3008
+ };
3009
+ } | {
3010
+ eventName: "TryAggregateCallFailed";
3011
+ args: {
3012
+ index: bigint;
3013
+ };
3014
+ } | {
3015
+ eventName: "TryAggregateCallSucceeded";
3016
+ args: {
3017
+ index: bigint;
3018
+ };
3019
+ } | {
3020
+ eventName: "FIndexUpdated";
3021
+ args: {
3022
+ newIndex: `0x${string}`;
3023
+ } | {
3024
+ newIndex: `0x${string}`;
3025
+ } | {
3026
+ newIndex: `0x${string}`;
3027
+ } | {
3028
+ newIndex: `0x${string}`;
3029
+ } | {
3030
+ newIndex: `0x${string}`;
3031
+ } | {
3032
+ newIndex: `0x${string}`;
3033
+ } | {
3034
+ newIndex: `0x${string}`;
3035
+ };
3036
+ } | {
3037
+ eventName: "ForceCancel";
3038
+ args: {
3039
+ user: `0x${string}`;
3040
+ isCancelAll: boolean;
3041
+ removedIds: readonly bigint[];
3042
+ } | {
3043
+ user: `0x${string}`;
3044
+ isCancelAll: boolean;
3045
+ removedIds: readonly bigint[];
3046
+ } | {
3047
+ user: `0x${string}`;
3048
+ isCancelAll: boolean;
3049
+ removedIds: readonly bigint[];
3050
+ } | {
3051
+ user: `0x${string}`;
3052
+ isCancelAll: boolean;
3053
+ removedIds: readonly bigint[];
3054
+ } | {
3055
+ user: `0x${string}`;
3056
+ isCancelAll: boolean;
3057
+ removedIds: readonly bigint[];
3058
+ } | {
3059
+ user: `0x${string}`;
3060
+ isCancelAll: boolean;
3061
+ removedIds: readonly bigint[];
3062
+ } | {
3063
+ user: `0x${string}`;
3064
+ isCancelAll: boolean;
3065
+ removedIds: readonly bigint[];
3066
+ };
3067
+ } | {
3068
+ eventName: "ForceDeleverage";
3069
+ args: {
3070
+ winningUser: `0x${string}`;
3071
+ losingUser: `0x${string}`;
3072
+ trade: bigint;
3073
+ } | {
3074
+ winningUser: `0x${string}`;
3075
+ losingUser: `0x${string}`;
3076
+ trade: bigint;
3077
+ } | {
3078
+ winningUser: `0x${string}`;
3079
+ losingUser: `0x${string}`;
3080
+ trade: bigint;
3081
+ } | {
3082
+ winningUser: `0x${string}`;
3083
+ losingUser: `0x${string}`;
3084
+ trade: bigint;
3085
+ } | {
3086
+ winningUser: `0x${string}`;
3087
+ losingUser: `0x${string}`;
3088
+ trade: bigint;
3089
+ } | {
3090
+ winningUser: `0x${string}`;
3091
+ losingUser: `0x${string}`;
3092
+ trade: bigint;
3093
+ } | {
3094
+ winningUser: `0x${string}`;
3095
+ losingUser: `0x${string}`;
3096
+ trade: bigint;
3097
+ };
3098
+ } | {
3099
+ eventName: "ImpliedRateObservationWindowUpdated";
3100
+ args: {
3101
+ newWindow: number;
3102
+ } | {
3103
+ newWindow: number;
3104
+ } | {
3105
+ newWindow: number;
3106
+ } | {
3107
+ newWindow: number;
3108
+ } | {
3109
+ newWindow: number;
3110
+ } | {
3111
+ newWindow: number;
3112
+ } | {
3113
+ newWindow: number;
3114
+ } | {
3115
+ newWindow: number;
3116
+ };
3117
+ } | {
3118
+ eventName: "LimitOrderCancelled";
3119
+ args: {
3120
+ orderIds: readonly bigint[];
3121
+ } | {
3122
+ orderIds: readonly bigint[];
3123
+ } | {
3124
+ orderIds: readonly bigint[];
3125
+ } | {
3126
+ orderIds: readonly bigint[];
3127
+ } | {
3128
+ orderIds: readonly bigint[];
3129
+ } | {
3130
+ orderIds: readonly bigint[];
3131
+ } | {
3132
+ orderIds: readonly bigint[];
3133
+ };
3134
+ } | {
3135
+ eventName: "LimitOrderFilled";
3136
+ args: {
3137
+ from: bigint;
3138
+ to: bigint;
3139
+ } | {
3140
+ from: bigint;
3141
+ to: bigint;
3142
+ } | {
3143
+ from: bigint;
3144
+ to: bigint;
3145
+ } | {
3146
+ from: bigint;
3147
+ to: bigint;
3148
+ } | {
3149
+ from: bigint;
3150
+ to: bigint;
3151
+ } | {
3152
+ from: bigint;
3153
+ to: bigint;
3154
+ } | {
3155
+ from: bigint;
3156
+ to: bigint;
3157
+ };
3158
+ } | {
3159
+ eventName: "LimitOrderPartiallyFilled";
3160
+ args: {
3161
+ orderId: bigint;
3162
+ filledSize: bigint;
3163
+ } | {
3164
+ orderId: bigint;
3165
+ filledSize: bigint;
3166
+ } | {
3167
+ orderId: bigint;
3168
+ filledSize: bigint;
3169
+ } | {
3170
+ orderId: bigint;
3171
+ filledSize: bigint;
3172
+ } | {
3173
+ orderId: bigint;
3174
+ filledSize: bigint;
3175
+ } | {
3176
+ orderId: bigint;
3177
+ filledSize: bigint;
3178
+ } | {
3179
+ orderId: bigint;
3180
+ filledSize: bigint;
3181
+ };
3182
+ } | {
3183
+ eventName: "LimitOrderPlaced";
3184
+ args: {
3185
+ maker: `0x${string}`;
3186
+ orderIds: readonly bigint[];
3187
+ sizes: readonly bigint[];
3188
+ } | {
3189
+ maker: `0x${string}`;
3190
+ orderIds: readonly bigint[];
3191
+ sizes: readonly bigint[];
3192
+ } | {
3193
+ maker: `0x${string}`;
3194
+ orderIds: readonly bigint[];
3195
+ sizes: readonly bigint[];
3196
+ } | {
3197
+ maker: `0x${string}`;
3198
+ orderIds: readonly bigint[];
3199
+ sizes: readonly bigint[];
3200
+ } | {
3201
+ maker: `0x${string}`;
3202
+ orderIds: readonly bigint[];
3203
+ sizes: readonly bigint[];
3204
+ } | {
3205
+ maker: `0x${string}`;
3206
+ orderIds: readonly bigint[];
3207
+ sizes: readonly bigint[];
3208
+ } | {
3209
+ maker: `0x${string}`;
3210
+ orderIds: readonly bigint[];
3211
+ sizes: readonly bigint[];
3212
+ };
3213
+ } | {
3214
+ eventName: "Liquidate";
3215
+ args: {
3216
+ liquidator: `0x${string}`;
3217
+ violator: `0x${string}`;
3218
+ liqTrade: bigint;
3219
+ fees: bigint;
3220
+ } | {
3221
+ liquidator: `0x${string}`;
3222
+ violator: `0x${string}`;
3223
+ liqTrade: bigint;
3224
+ fees: bigint;
3225
+ } | {
3226
+ liquidator: `0x${string}`;
3227
+ violator: `0x${string}`;
3228
+ liqTrade: bigint;
3229
+ fees: bigint;
3230
+ } | {
3231
+ liquidator: `0x${string}`;
3232
+ violator: `0x${string}`;
3233
+ liqTrade: bigint;
3234
+ fees: bigint;
3235
+ } | {
3236
+ liquidator: `0x${string}`;
3237
+ violator: `0x${string}`;
3238
+ liqTrade: bigint;
3239
+ fees: bigint;
3240
+ } | {
3241
+ liquidator: `0x${string}`;
3242
+ violator: `0x${string}`;
3243
+ liqTrade: bigint;
3244
+ fees: bigint;
3245
+ } | {
3246
+ liquidator: `0x${string}`;
3247
+ violator: `0x${string}`;
3248
+ liqTrade: bigint;
3249
+ fees: bigint;
3250
+ };
3251
+ } | {
3252
+ eventName: "MarketConfigUpdated";
3253
+ args: {
3254
+ newConfig: {
3255
+ maxOpenOrders: number;
3256
+ markRateOracle: `0x${string}`;
3257
+ fIndexOracle: `0x${string}`;
3258
+ OICap: bigint;
3259
+ takerFee: bigint;
3260
+ otcFee: bigint;
3261
+ liqIncentive: {
3262
+ base: bigint;
3263
+ slope: bigint;
3264
+ };
3265
+ IMFactor: bigint;
3266
+ MMFactor: bigint;
3267
+ minMarginIndexRate: bigint;
3268
+ minMarginIndexDuration: number;
3269
+ };
3270
+ } | {
3271
+ newConfig: {
3272
+ maxOpenOrders: number;
3273
+ markRateOracle: `0x${string}`;
3274
+ fIndexOracle: `0x${string}`;
3275
+ OICap: bigint;
3276
+ takerFee: bigint;
3277
+ otcFee: bigint;
3278
+ liqIncentive: {
3279
+ base: bigint;
3280
+ slope: bigint;
3281
+ };
3282
+ IMFactor: bigint;
3283
+ MMFactor: bigint;
3284
+ minMarginIndexRate: bigint;
3285
+ minMarginIndexDuration: number;
3286
+ };
3287
+ } | {
3288
+ newConfig: {
3289
+ maxOpenOrders: number;
3290
+ markRateOracle: `0x${string}`;
3291
+ fIndexOracle: `0x${string}`;
3292
+ OICap: bigint;
3293
+ takerFee: bigint;
3294
+ otcFee: bigint;
3295
+ liqIncentive: {
3296
+ base: bigint;
3297
+ slope: bigint;
3298
+ };
3299
+ IMFactor: bigint;
3300
+ MMFactor: bigint;
3301
+ minMarginIndexRate: bigint;
3302
+ minMarginIndexDuration: number;
3303
+ };
3304
+ } | {
3305
+ newConfig: {
3306
+ maxOpenOrders: number;
3307
+ markRateOracle: `0x${string}`;
3308
+ fIndexOracle: `0x${string}`;
3309
+ OICap: bigint;
3310
+ takerFee: bigint;
3311
+ otcFee: bigint;
3312
+ liqIncentive: {
3313
+ base: bigint;
3314
+ slope: bigint;
3315
+ };
3316
+ IMFactor: bigint;
3317
+ MMFactor: bigint;
3318
+ minMarginIndexRate: bigint;
3319
+ minMarginIndexDuration: number;
3320
+ };
3321
+ } | {
3322
+ newConfig: {
3323
+ maxOpenOrders: number;
3324
+ markRateOracle: `0x${string}`;
3325
+ fIndexOracle: `0x${string}`;
3326
+ OICap: bigint;
3327
+ takerFee: bigint;
3328
+ otcFee: bigint;
3329
+ liqIncentive: {
3330
+ base: bigint;
3331
+ slope: bigint;
3332
+ };
3333
+ IMFactor: bigint;
3334
+ MMFactor: bigint;
3335
+ minMarginIndexRate: bigint;
3336
+ minMarginIndexDuration: number;
3337
+ };
3338
+ } | {
3339
+ newConfig: {
3340
+ maxOpenOrders: number;
3341
+ markRateOracle: `0x${string}`;
3342
+ fIndexOracle: `0x${string}`;
3343
+ OICap: bigint;
3344
+ takerFee: bigint;
3345
+ otcFee: bigint;
3346
+ liqIncentive: {
3347
+ base: bigint;
3348
+ slope: bigint;
3349
+ };
3350
+ IMFactor: bigint;
3351
+ MMFactor: bigint;
3352
+ minMarginIndexRate: bigint;
3353
+ minMarginIndexDuration: number;
3354
+ };
3355
+ } | {
3356
+ newConfig: {
3357
+ maxOpenOrders: number;
3358
+ markRateOracle: `0x${string}`;
3359
+ fIndexOracle: `0x${string}`;
3360
+ OICap: bigint;
3361
+ takerFee: bigint;
3362
+ otcFee: bigint;
3363
+ liqIncentive: {
3364
+ base: bigint;
3365
+ slope: bigint;
3366
+ };
3367
+ IMFactor: bigint;
3368
+ MMFactor: bigint;
3369
+ minMarginIndexRate: bigint;
3370
+ minMarginIndexDuration: number;
3371
+ };
3372
+ };
3373
+ } | {
3374
+ eventName: "MarketOrdersFilled";
3375
+ args: {
3376
+ user: `0x${string}`;
3377
+ totalTrade: bigint;
3378
+ totalFees: bigint;
3379
+ } | {
3380
+ user: `0x${string}`;
3381
+ totalTrade: bigint;
3382
+ totalFees: bigint;
3383
+ } | {
3384
+ user: `0x${string}`;
3385
+ totalTrade: bigint;
3386
+ totalFees: bigint;
3387
+ } | {
3388
+ user: `0x${string}`;
3389
+ totalTrade: bigint;
3390
+ totalFees: bigint;
3391
+ } | {
3392
+ user: `0x${string}`;
3393
+ totalTrade: bigint;
3394
+ totalFees: bigint;
3395
+ } | {
3396
+ user: `0x${string}`;
3397
+ totalTrade: bigint;
3398
+ totalFees: bigint;
3399
+ } | {
3400
+ user: `0x${string}`;
3401
+ totalTrade: bigint;
3402
+ totalFees: bigint;
3403
+ };
3404
+ } | {
3405
+ eventName: "OtcSwap";
3406
+ args: {
3407
+ user: `0x${string}`;
3408
+ counterParty: `0x${string}`;
3409
+ trade: bigint;
3410
+ fees: bigint;
3411
+ } | {
3412
+ user: `0x${string}`;
3413
+ counterParty: `0x${string}`;
3414
+ trade: bigint;
3415
+ fees: bigint;
3416
+ } | {
3417
+ user: `0x${string}`;
3418
+ counterParty: `0x${string}`;
3419
+ trade: bigint;
3420
+ fees: bigint;
3421
+ } | {
3422
+ user: `0x${string}`;
3423
+ counterParty: `0x${string}`;
3424
+ trade: bigint;
3425
+ fees: bigint;
3426
+ } | {
3427
+ user: `0x${string}`;
3428
+ counterParty: `0x${string}`;
3429
+ trade: bigint;
3430
+ fees: bigint;
3431
+ } | {
3432
+ user: `0x${string}`;
3433
+ counterParty: `0x${string}`;
3434
+ trade: bigint;
3435
+ fees: bigint;
3436
+ } | {
3437
+ user: `0x${string}`;
3438
+ counterParty: `0x${string}`;
3439
+ trade: bigint;
3440
+ fees: bigint;
3441
+ };
3442
+ } | {
3443
+ eventName: "PaymentFromSettlement";
3444
+ args: {
3445
+ user: `0x${string}`;
3446
+ lastFTime: bigint;
3447
+ latestFTime: bigint;
3448
+ payment: bigint;
3449
+ fees: bigint;
3450
+ } | {
3451
+ user: `0x${string}`;
3452
+ lastFTime: bigint;
3453
+ latestFTime: bigint;
3454
+ payment: bigint;
3455
+ fees: bigint;
3456
+ } | {
3457
+ user: `0x${string}`;
3458
+ lastFTime: bigint;
3459
+ latestFTime: bigint;
3460
+ payment: bigint;
3461
+ fees: bigint;
3462
+ } | {
3463
+ user: `0x${string}`;
3464
+ lastFTime: bigint;
3465
+ latestFTime: bigint;
3466
+ payment: bigint;
3467
+ fees: bigint;
3468
+ } | {
3469
+ user: `0x${string}`;
3470
+ lastFTime: bigint;
3471
+ latestFTime: bigint;
3472
+ payment: bigint;
3473
+ fees: bigint;
3474
+ } | {
3475
+ user: `0x${string}`;
3476
+ lastFTime: bigint;
3477
+ latestFTime: bigint;
3478
+ payment: bigint;
3479
+ fees: bigint;
3480
+ } | {
3481
+ user: `0x${string}`;
3482
+ lastFTime: bigint;
3483
+ latestFTime: bigint;
3484
+ payment: bigint;
3485
+ fees: bigint;
3486
+ };
3487
+ } | {
3488
+ eventName: "PersonalDiscRatesUpdated";
3489
+ args: {
3490
+ user: `0x${string}`;
3491
+ newTakerDisc: bigint;
3492
+ newOtcDisc: bigint;
3493
+ } | {
3494
+ user: `0x${string}`;
3495
+ newTakerDisc: bigint;
3496
+ newOtcDisc: bigint;
3497
+ } | {
3498
+ user: `0x${string}`;
3499
+ newTakerDisc: bigint;
3500
+ newOtcDisc: bigint;
3501
+ } | {
3502
+ user: `0x${string}`;
3503
+ newTakerDisc: bigint;
3504
+ newOtcDisc: bigint;
3505
+ } | {
3506
+ user: `0x${string}`;
3507
+ newTakerDisc: bigint;
3508
+ newOtcDisc: bigint;
3509
+ } | {
3510
+ user: `0x${string}`;
3511
+ newTakerDisc: bigint;
3512
+ newOtcDisc: bigint;
3513
+ } | {
3514
+ user: `0x${string}`;
3515
+ newTakerDisc: bigint;
3516
+ newOtcDisc: bigint;
3517
+ };
3518
+ } | {
3519
+ eventName: "PersonalMarginConfigUpdated";
3520
+ args: {
3521
+ user: `0x${string}`;
3522
+ newIMFactor: bigint;
3523
+ newMMFactor: bigint;
3524
+ } | {
3525
+ user: `0x${string}`;
3526
+ newIMFactor: bigint;
3527
+ newMMFactor: bigint;
3528
+ } | {
3529
+ user: `0x${string}`;
3530
+ newIMFactor: bigint;
3531
+ newMMFactor: bigint;
3532
+ } | {
3533
+ user: `0x${string}`;
3534
+ newIMFactor: bigint;
3535
+ newMMFactor: bigint;
3536
+ } | {
3537
+ user: `0x${string}`;
3538
+ newIMFactor: bigint;
3539
+ newMMFactor: bigint;
3540
+ } | {
3541
+ user: `0x${string}`;
3542
+ newIMFactor: bigint;
3543
+ newMMFactor: bigint;
3544
+ } | {
3545
+ user: `0x${string}`;
3546
+ newIMFactor: bigint;
3547
+ newMMFactor: bigint;
3548
+ };
3549
+ } | {
3550
+ eventName: "ConfigUpdated";
3551
+ args: {
3552
+ newSettleFeeRate: bigint;
3553
+ newUpdatePeriod: number;
3554
+ newMaxUpdateDelay: number;
3555
+ };
3556
+ } | {
3557
+ eventName: "AMMConfigUpdated";
3558
+ args: {
3559
+ minAbsRate: bigint;
3560
+ maxAbsRate: bigint;
3561
+ cutOffTimestamp: number;
3562
+ };
3563
+ } | {
3564
+ eventName: "BOROS20Transfer";
3565
+ args: {
3566
+ from: `0x${string}`;
3567
+ to: `0x${string}`;
3568
+ value: bigint;
3569
+ } | {
3570
+ from: `0x${string}`;
3571
+ to: `0x${string}`;
3572
+ value: bigint;
3573
+ };
3574
+ } | {
3575
+ eventName: "Burn";
3576
+ args: {
3577
+ payer: `0x${string}`;
3578
+ netLpBurned: bigint;
3579
+ netCashOut: bigint;
3580
+ netSizeOut: bigint;
3581
+ };
3582
+ } | {
3583
+ eventName: "FeeRateUpdated";
3584
+ args: {
3585
+ newFeeRate: bigint;
3586
+ };
3587
+ } | {
3588
+ eventName: "Mint";
3589
+ args: {
3590
+ receiver: `0x${string}`;
3591
+ netLpMinted: bigint;
3592
+ netCashIn: bigint;
3593
+ netSizeIn: bigint;
3594
+ };
3595
+ } | {
3596
+ eventName: "Swap";
3597
+ args: {
3598
+ sizeOut: bigint;
3599
+ costOut: bigint;
3600
+ };
3601
+ } | null)[];
3602
+ }>;
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.parseEvents = parseEvents;
37
37
  exports.decodeLog = decodeLog;
38
+ exports.getTransactionData = getTransactionData;
38
39
  const viem_1 = require("viem");
39
40
  const Abis = __importStar(require("../../contracts/viemAbis"));
40
41
  const publicClient_1 = require("../publicClient");
@@ -55,7 +56,11 @@ function decodeLog(log) {
55
56
  continue;
56
57
  }
57
58
  }
58
- console.log('Could not decode log with any ABI:', log);
59
59
  return null;
60
60
  }
61
+ async function getTransactionData(txHash) {
62
+ const receipt = await publicClient_1.publicClient.getTransactionReceipt({ hash: txHash });
63
+ const decodedLogs = receipt.logs.map((log) => decodeLog(log));
64
+ return { decodedLogs };
65
+ }
61
66
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/entities/exchange/utils.ts"],"names":[],"mappings":";;;;;;;;;;;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ros",
4
4
  "license": "MIT",
5
- "version": "0.1.35",
5
+ "version": "0.1.36",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [