@panoptic-eng/sdk 1.0.48 → 1.0.50

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.
Files changed (39) hide show
  1. package/dist/cow/index.js.map +1 -1
  2. package/dist/{cow-BPcuMjYR.js → cow-CSSKPknb.js} +1 -1
  3. package/dist/deployments.d.ts +12 -4
  4. package/dist/deployments.d.ts.map +1 -1
  5. package/dist/deployments.js +78 -10
  6. package/dist/deployments.js.map +1 -1
  7. package/dist/{greeks-9aTE-DwO.js → greeks-CNi1-cnp.js} +39 -16
  8. package/dist/index.d.ts +518 -76
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +701 -84
  11. package/dist/index.js.map +1 -1
  12. package/dist/{irm-C7QhFiwL.js → irm-BJaJSUjF.js} +80 -12
  13. package/dist/panoptic/v2/greeks/index.d.ts +12 -1
  14. package/dist/panoptic/v2/greeks/index.d.ts.map +1 -1
  15. package/dist/panoptic/v2/greeks/index.js +39 -16
  16. package/dist/panoptic/v2/greeks/index.js.map +1 -1
  17. package/dist/panoptic/v2/index.d.ts +1336 -74
  18. package/dist/panoptic/v2/index.d.ts.map +1 -1
  19. package/dist/panoptic/v2/index.js +20322 -18660
  20. package/dist/panoptic/v2/index.js.map +1 -1
  21. package/dist/panoptic/v2/react-public.d.ts +1518 -240
  22. package/dist/panoptic/v2/react-public.d.ts.map +1 -1
  23. package/dist/panoptic/v2/react-public.js +11518 -9319
  24. package/dist/panoptic/v2/react-public.js.map +1 -1
  25. package/dist/{rates-5oQD-SuM.js → rates-COAJpKRd.js} +612 -73
  26. package/dist/{router-C26q7i8w.js → router-B-I1eACz.js} +5 -43
  27. package/dist/router-BSS7HKd2.js +837 -0
  28. package/dist/uniswap/index.d.ts +465 -215
  29. package/dist/uniswap/index.d.ts.map +1 -1
  30. package/dist/uniswap/index.js +1799 -1076
  31. package/dist/uniswap/index.js.map +1 -1
  32. package/dist/{v2-DVcophLf.js → v2-zF6b01PI.js} +2488 -1596
  33. package/dist/{writes-DBHwfbDD.js → writes-D1zN0v9x.js} +4 -3
  34. package/dist/zodiac/index.d.ts +51 -7
  35. package/dist/zodiac/index.d.ts.map +1 -1
  36. package/dist/zodiac/index.js +154 -2
  37. package/dist/zodiac/index.js.map +1 -1
  38. package/package.json +2 -1
  39. package/dist/router-ClhAkKjh.js +0 -312
@@ -1,4 +1,4 @@
1
- import { ORACLE_EPOCH_SECONDS, SCHEMA_VERSION, STORAGE_PREFIX, calculatePositionGreeks, tickToSqrtPriceX96 } from "./greeks-9aTE-DwO.js";
1
+ import { ORACLE_EPOCH_SECONDS, SCHEMA_VERSION, STORAGE_PREFIX, calculatePositionGreeks, tickToSqrtPriceX96 } from "./greeks-CNi1-cnp.js";
2
2
  import { BaseError, decodeAbiParameters, decodeErrorResult, decodeEventLog, decodeFunctionData, encodeFunctionData, getAddress, keccak256, parseAbi, toFunctionSelector, zeroAddress } from "viem";
3
3
 
4
4
  //#region src/generated.ts
@@ -2790,6 +2790,459 @@ const panopticGuardianAbi = [
2790
2790
  name: "ZeroAddress"
2791
2791
  }
2792
2792
  ];
2793
+ const panopticLiquidatorAbi = [
2794
+ {
2795
+ type: "constructor",
2796
+ inputs: [{
2797
+ name: "morpho",
2798
+ internalType: "contract IMorpho",
2799
+ type: "address"
2800
+ }, {
2801
+ name: "owner_",
2802
+ internalType: "address",
2803
+ type: "address"
2804
+ }],
2805
+ stateMutability: "nonpayable"
2806
+ },
2807
+ {
2808
+ type: "receive",
2809
+ stateMutability: "payable"
2810
+ },
2811
+ {
2812
+ type: "function",
2813
+ inputs: [],
2814
+ name: "MORPHO",
2815
+ outputs: [{
2816
+ name: "",
2817
+ internalType: "contract IMorpho",
2818
+ type: "address"
2819
+ }],
2820
+ stateMutability: "view"
2821
+ },
2822
+ {
2823
+ type: "function",
2824
+ inputs: [
2825
+ {
2826
+ name: "target",
2827
+ internalType: "address",
2828
+ type: "address"
2829
+ },
2830
+ {
2831
+ name: "value",
2832
+ internalType: "uint256",
2833
+ type: "uint256"
2834
+ },
2835
+ {
2836
+ name: "data",
2837
+ internalType: "bytes",
2838
+ type: "bytes"
2839
+ }
2840
+ ],
2841
+ name: "execute",
2842
+ outputs: [{
2843
+ name: "ret",
2844
+ internalType: "bytes",
2845
+ type: "bytes"
2846
+ }],
2847
+ stateMutability: "payable"
2848
+ },
2849
+ {
2850
+ type: "function",
2851
+ inputs: [{
2852
+ name: "pool",
2853
+ internalType: "contract PanopticPoolV2",
2854
+ type: "address"
2855
+ }],
2856
+ name: "initializePool",
2857
+ outputs: [],
2858
+ stateMutability: "nonpayable"
2859
+ },
2860
+ {
2861
+ type: "function",
2862
+ inputs: [{
2863
+ name: "params",
2864
+ internalType: "struct PanopticLiquidator.LiquidateParams",
2865
+ type: "tuple",
2866
+ components: [
2867
+ {
2868
+ name: "pool",
2869
+ internalType: "contract PanopticPoolV2",
2870
+ type: "address"
2871
+ },
2872
+ {
2873
+ name: "account",
2874
+ internalType: "address",
2875
+ type: "address"
2876
+ },
2877
+ {
2878
+ name: "positionIdListTo",
2879
+ internalType: "TokenId[]",
2880
+ type: "uint256[]"
2881
+ },
2882
+ {
2883
+ name: "usePremiaAsCollateral",
2884
+ internalType: "LeftRightUnsigned",
2885
+ type: "uint256"
2886
+ },
2887
+ {
2888
+ name: "flashToken",
2889
+ internalType: "address",
2890
+ type: "address"
2891
+ },
2892
+ {
2893
+ name: "flashAmount",
2894
+ internalType: "uint256",
2895
+ type: "uint256"
2896
+ },
2897
+ {
2898
+ name: "nativeFundingAmount",
2899
+ internalType: "uint256",
2900
+ type: "uint256"
2901
+ },
2902
+ {
2903
+ name: "preSwapTarget",
2904
+ internalType: "address",
2905
+ type: "address"
2906
+ },
2907
+ {
2908
+ name: "preSwapCallData",
2909
+ internalType: "bytes",
2910
+ type: "bytes"
2911
+ },
2912
+ {
2913
+ name: "preSwapTokenIn",
2914
+ internalType: "address",
2915
+ type: "address"
2916
+ },
2917
+ {
2918
+ name: "preSwapAmountIn",
2919
+ internalType: "uint256",
2920
+ type: "uint256"
2921
+ },
2922
+ {
2923
+ name: "swapTarget",
2924
+ internalType: "address",
2925
+ type: "address"
2926
+ },
2927
+ {
2928
+ name: "swapCallData",
2929
+ internalType: "bytes",
2930
+ type: "bytes"
2931
+ },
2932
+ {
2933
+ name: "swapTokenIn",
2934
+ internalType: "address",
2935
+ type: "address"
2936
+ },
2937
+ {
2938
+ name: "swapAmountIn",
2939
+ internalType: "uint256",
2940
+ type: "uint256"
2941
+ },
2942
+ {
2943
+ name: "minDelta0",
2944
+ internalType: "int256",
2945
+ type: "int256"
2946
+ },
2947
+ {
2948
+ name: "minDelta1",
2949
+ internalType: "int256",
2950
+ type: "int256"
2951
+ }
2952
+ ]
2953
+ }],
2954
+ name: "liquidate",
2955
+ outputs: [{
2956
+ name: "delta0",
2957
+ internalType: "int256",
2958
+ type: "int256"
2959
+ }, {
2960
+ name: "delta1",
2961
+ internalType: "int256",
2962
+ type: "int256"
2963
+ }],
2964
+ stateMutability: "payable"
2965
+ },
2966
+ {
2967
+ type: "function",
2968
+ inputs: [{
2969
+ name: "data",
2970
+ internalType: "bytes[]",
2971
+ type: "bytes[]"
2972
+ }],
2973
+ name: "multicall",
2974
+ outputs: [{
2975
+ name: "results",
2976
+ internalType: "bytes[]",
2977
+ type: "bytes[]"
2978
+ }],
2979
+ stateMutability: "payable"
2980
+ },
2981
+ {
2982
+ type: "function",
2983
+ inputs: [{
2984
+ name: "assets",
2985
+ internalType: "uint256",
2986
+ type: "uint256"
2987
+ }, {
2988
+ name: "data",
2989
+ internalType: "bytes",
2990
+ type: "bytes"
2991
+ }],
2992
+ name: "onMorphoFlashLoan",
2993
+ outputs: [],
2994
+ stateMutability: "nonpayable"
2995
+ },
2996
+ {
2997
+ type: "function",
2998
+ inputs: [],
2999
+ name: "owner",
3000
+ outputs: [{
3001
+ name: "",
3002
+ internalType: "address",
3003
+ type: "address"
3004
+ }],
3005
+ stateMutability: "view"
3006
+ },
3007
+ {
3008
+ type: "function",
3009
+ inputs: [{
3010
+ name: "params",
3011
+ internalType: "struct PanopticLiquidator.LiquidateParams",
3012
+ type: "tuple",
3013
+ components: [
3014
+ {
3015
+ name: "pool",
3016
+ internalType: "contract PanopticPoolV2",
3017
+ type: "address"
3018
+ },
3019
+ {
3020
+ name: "account",
3021
+ internalType: "address",
3022
+ type: "address"
3023
+ },
3024
+ {
3025
+ name: "positionIdListTo",
3026
+ internalType: "TokenId[]",
3027
+ type: "uint256[]"
3028
+ },
3029
+ {
3030
+ name: "usePremiaAsCollateral",
3031
+ internalType: "LeftRightUnsigned",
3032
+ type: "uint256"
3033
+ },
3034
+ {
3035
+ name: "flashToken",
3036
+ internalType: "address",
3037
+ type: "address"
3038
+ },
3039
+ {
3040
+ name: "flashAmount",
3041
+ internalType: "uint256",
3042
+ type: "uint256"
3043
+ },
3044
+ {
3045
+ name: "nativeFundingAmount",
3046
+ internalType: "uint256",
3047
+ type: "uint256"
3048
+ },
3049
+ {
3050
+ name: "preSwapTarget",
3051
+ internalType: "address",
3052
+ type: "address"
3053
+ },
3054
+ {
3055
+ name: "preSwapCallData",
3056
+ internalType: "bytes",
3057
+ type: "bytes"
3058
+ },
3059
+ {
3060
+ name: "preSwapTokenIn",
3061
+ internalType: "address",
3062
+ type: "address"
3063
+ },
3064
+ {
3065
+ name: "preSwapAmountIn",
3066
+ internalType: "uint256",
3067
+ type: "uint256"
3068
+ },
3069
+ {
3070
+ name: "swapTarget",
3071
+ internalType: "address",
3072
+ type: "address"
3073
+ },
3074
+ {
3075
+ name: "swapCallData",
3076
+ internalType: "bytes",
3077
+ type: "bytes"
3078
+ },
3079
+ {
3080
+ name: "swapTokenIn",
3081
+ internalType: "address",
3082
+ type: "address"
3083
+ },
3084
+ {
3085
+ name: "swapAmountIn",
3086
+ internalType: "uint256",
3087
+ type: "uint256"
3088
+ },
3089
+ {
3090
+ name: "minDelta0",
3091
+ internalType: "int256",
3092
+ type: "int256"
3093
+ },
3094
+ {
3095
+ name: "minDelta1",
3096
+ internalType: "int256",
3097
+ type: "int256"
3098
+ }
3099
+ ]
3100
+ }],
3101
+ name: "quoteLiquidation",
3102
+ outputs: [
3103
+ {
3104
+ name: "bonus0",
3105
+ internalType: "int256",
3106
+ type: "int256"
3107
+ },
3108
+ {
3109
+ name: "bonus1",
3110
+ internalType: "int256",
3111
+ type: "int256"
3112
+ },
3113
+ {
3114
+ name: "shortfall0",
3115
+ internalType: "uint256",
3116
+ type: "uint256"
3117
+ },
3118
+ {
3119
+ name: "shortfall1",
3120
+ internalType: "uint256",
3121
+ type: "uint256"
3122
+ },
3123
+ {
3124
+ name: "protocolLoss0",
3125
+ internalType: "uint256",
3126
+ type: "uint256"
3127
+ },
3128
+ {
3129
+ name: "protocolLoss1",
3130
+ internalType: "uint256",
3131
+ type: "uint256"
3132
+ }
3133
+ ],
3134
+ stateMutability: "payable"
3135
+ },
3136
+ {
3137
+ type: "function",
3138
+ inputs: [{
3139
+ name: "newOwner",
3140
+ internalType: "address",
3141
+ type: "address"
3142
+ }],
3143
+ name: "setOwner",
3144
+ outputs: [],
3145
+ stateMutability: "nonpayable"
3146
+ },
3147
+ {
3148
+ type: "function",
3149
+ inputs: [
3150
+ {
3151
+ name: "token",
3152
+ internalType: "address",
3153
+ type: "address"
3154
+ },
3155
+ {
3156
+ name: "to",
3157
+ internalType: "address",
3158
+ type: "address"
3159
+ },
3160
+ {
3161
+ name: "amount",
3162
+ internalType: "uint256",
3163
+ type: "uint256"
3164
+ }
3165
+ ],
3166
+ name: "sweep",
3167
+ outputs: [],
3168
+ stateMutability: "nonpayable"
3169
+ },
3170
+ {
3171
+ type: "event",
3172
+ anonymous: false,
3173
+ inputs: [{
3174
+ name: "user",
3175
+ internalType: "address",
3176
+ type: "address",
3177
+ indexed: true
3178
+ }, {
3179
+ name: "newOwner",
3180
+ internalType: "address",
3181
+ type: "address",
3182
+ indexed: true
3183
+ }],
3184
+ name: "OwnerUpdated"
3185
+ },
3186
+ {
3187
+ type: "error",
3188
+ inputs: [],
3189
+ name: "ApproveFailed"
3190
+ },
3191
+ {
3192
+ type: "error",
3193
+ inputs: [],
3194
+ name: "CallFailed"
3195
+ },
3196
+ {
3197
+ type: "error",
3198
+ inputs: [{
3199
+ name: "delta0",
3200
+ internalType: "int256",
3201
+ type: "int256"
3202
+ }, {
3203
+ name: "delta1",
3204
+ internalType: "int256",
3205
+ type: "int256"
3206
+ }],
3207
+ name: "InsufficientDelta"
3208
+ },
3209
+ {
3210
+ type: "error",
3211
+ inputs: [],
3212
+ name: "SwapFailed"
3213
+ },
3214
+ {
3215
+ type: "error",
3216
+ inputs: [
3217
+ {
3218
+ name: "token",
3219
+ internalType: "address",
3220
+ type: "address"
3221
+ },
3222
+ {
3223
+ name: "from",
3224
+ internalType: "address",
3225
+ type: "address"
3226
+ },
3227
+ {
3228
+ name: "amount",
3229
+ internalType: "uint256",
3230
+ type: "uint256"
3231
+ },
3232
+ {
3233
+ name: "balance",
3234
+ internalType: "uint256",
3235
+ type: "uint256"
3236
+ }
3237
+ ],
3238
+ name: "TransferFailed"
3239
+ },
3240
+ {
3241
+ type: "error",
3242
+ inputs: [],
3243
+ name: "UntrustedFlashLoanInitiator"
3244
+ }
3245
+ ];
2793
3246
  const panopticPoolV2Abi = [
2794
3247
  {
2795
3248
  type: "constructor",
@@ -3555,7 +4008,7 @@ const panopticQueryAbi = [
3555
4008
  inputs: [
3556
4009
  {
3557
4010
  name: "pool",
3558
- internalType: "contract PanopticPool",
4011
+ internalType: "contract PanopticPoolV2",
3559
4012
  type: "address"
3560
4013
  },
3561
4014
  {
@@ -3599,7 +4052,7 @@ const panopticQueryAbi = [
3599
4052
  inputs: [
3600
4053
  {
3601
4054
  name: "pool",
3602
- internalType: "contract PanopticPool",
4055
+ internalType: "contract PanopticPoolV2",
3603
4056
  type: "address"
3604
4057
  },
3605
4058
  {
@@ -3631,7 +4084,7 @@ const panopticQueryAbi = [
3631
4084
  inputs: [
3632
4085
  {
3633
4086
  name: "pool",
3634
- internalType: "contract PanopticPool",
4087
+ internalType: "contract PanopticPoolV2",
3635
4088
  type: "address"
3636
4089
  },
3637
4090
  {
@@ -3665,11 +4118,52 @@ const panopticQueryAbi = [
3665
4118
  ],
3666
4119
  stateMutability: "view"
3667
4120
  },
4121
+ {
4122
+ type: "function",
4123
+ inputs: [
4124
+ {
4125
+ name: "positionIdList",
4126
+ internalType: "TokenId[]",
4127
+ type: "uint256[]"
4128
+ },
4129
+ {
4130
+ name: "shortPremium",
4131
+ internalType: "LeftRightUnsigned",
4132
+ type: "uint256"
4133
+ },
4134
+ {
4135
+ name: "longPremium",
4136
+ internalType: "LeftRightUnsigned",
4137
+ type: "uint256"
4138
+ },
4139
+ {
4140
+ name: "positionBalanceArray",
4141
+ internalType: "PositionBalance[]",
4142
+ type: "uint256[]"
4143
+ },
4144
+ {
4145
+ name: "atTicks",
4146
+ internalType: "int24[]",
4147
+ type: "int24[]"
4148
+ }
4149
+ ],
4150
+ name: "computeNetLiquidationValue",
4151
+ outputs: [{
4152
+ name: "value0",
4153
+ internalType: "int256[]",
4154
+ type: "int256[]"
4155
+ }, {
4156
+ name: "value1",
4157
+ internalType: "int256[]",
4158
+ type: "int256[]"
4159
+ }],
4160
+ stateMutability: "pure"
4161
+ },
3668
4162
  {
3669
4163
  type: "function",
3670
4164
  inputs: [{
3671
4165
  name: "pool",
3672
- internalType: "contract PanopticPool",
4166
+ internalType: "contract PanopticPoolV2",
3673
4167
  type: "address"
3674
4168
  }, {
3675
4169
  name: "positionIdList",
@@ -3689,29 +4183,29 @@ const panopticQueryAbi = [
3689
4183
  inputs: [
3690
4184
  {
3691
4185
  name: "pool",
3692
- internalType: "contract PanopticPool",
4186
+ internalType: "contract PanopticPoolV2",
3693
4187
  type: "address"
3694
4188
  },
3695
4189
  {
3696
- name: "account",
3697
- internalType: "address",
3698
- type: "address"
4190
+ name: "tokenId",
4191
+ internalType: "TokenId",
4192
+ type: "uint256"
3699
4193
  },
3700
4194
  {
3701
- name: "positionIdList",
3702
- internalType: "TokenId[]",
3703
- type: "uint256[]"
4195
+ name: "positionSize",
4196
+ internalType: "uint128",
4197
+ type: "uint128"
3704
4198
  }
3705
4199
  ],
3706
- name: "getLiquidationPrices",
4200
+ name: "getItmAmounts",
3707
4201
  outputs: [{
3708
- name: "liquidationPriceDown",
3709
- internalType: "int24",
3710
- type: "int24"
4202
+ name: "itm0",
4203
+ internalType: "int256",
4204
+ type: "int256"
3711
4205
  }, {
3712
- name: "liquidationPriceUp",
3713
- internalType: "int24",
3714
- type: "int24"
4206
+ name: "itm1",
4207
+ internalType: "int256",
4208
+ type: "int256"
3715
4209
  }],
3716
4210
  stateMutability: "view"
3717
4211
  },
@@ -3724,25 +4218,25 @@ const panopticQueryAbi = [
3724
4218
  type: "address"
3725
4219
  },
3726
4220
  {
3727
- name: "tokenId",
3728
- internalType: "TokenId",
3729
- type: "uint256"
4221
+ name: "account",
4222
+ internalType: "address",
4223
+ type: "address"
3730
4224
  },
3731
4225
  {
3732
- name: "positionSize",
3733
- internalType: "uint128",
3734
- type: "uint128"
4226
+ name: "positionIdList",
4227
+ internalType: "TokenId[]",
4228
+ type: "uint256[]"
3735
4229
  }
3736
4230
  ],
3737
- name: "getItmAmounts",
4231
+ name: "getLiquidationPrices",
3738
4232
  outputs: [{
3739
- name: "itm0",
3740
- internalType: "int256",
3741
- type: "int256"
4233
+ name: "liquidationPriceDown",
4234
+ internalType: "int24",
4235
+ type: "int24"
3742
4236
  }, {
3743
- name: "itm1",
3744
- internalType: "int256",
3745
- type: "int256"
4237
+ name: "liquidationPriceUp",
4238
+ internalType: "int24",
4239
+ type: "int24"
3746
4240
  }],
3747
4241
  stateMutability: "view"
3748
4242
  },
@@ -3751,7 +4245,7 @@ const panopticQueryAbi = [
3751
4245
  inputs: [
3752
4246
  {
3753
4247
  name: "pool",
3754
- internalType: "contract PanopticPool",
4248
+ internalType: "contract PanopticPoolV2",
3755
4249
  type: "address"
3756
4250
  },
3757
4251
  {
@@ -3787,7 +4281,7 @@ const panopticQueryAbi = [
3787
4281
  inputs: [
3788
4282
  {
3789
4283
  name: "pool",
3790
- internalType: "contract PanopticPool",
4284
+ internalType: "contract PanopticPoolV2",
3791
4285
  type: "address"
3792
4286
  },
3793
4287
  {
@@ -3806,20 +4300,20 @@ const panopticQueryAbi = [
3806
4300
  type: "uint256[]"
3807
4301
  },
3808
4302
  {
3809
- name: "atTick",
3810
- internalType: "int24",
3811
- type: "int24"
4303
+ name: "atTicks",
4304
+ internalType: "int24[]",
4305
+ type: "int24[]"
3812
4306
  }
3813
4307
  ],
3814
4308
  name: "getNetLiquidationValue",
3815
4309
  outputs: [{
3816
4310
  name: "value0",
3817
- internalType: "int256",
3818
- type: "int256"
4311
+ internalType: "int256[]",
4312
+ type: "int256[]"
3819
4313
  }, {
3820
4314
  name: "value1",
3821
- internalType: "int256",
3822
- type: "int256"
4315
+ internalType: "int256[]",
4316
+ type: "int256[]"
3823
4317
  }],
3824
4318
  stateMutability: "view"
3825
4319
  },
@@ -3828,7 +4322,7 @@ const panopticQueryAbi = [
3828
4322
  inputs: [
3829
4323
  {
3830
4324
  name: "pool",
3831
- internalType: "contract PanopticPool",
4325
+ internalType: "contract PanopticPoolV2",
3832
4326
  type: "address"
3833
4327
  },
3834
4328
  {
@@ -3864,32 +4358,54 @@ const panopticQueryAbi = [
3864
4358
  inputs: [
3865
4359
  {
3866
4360
  name: "pool",
3867
- internalType: "contract PanopticPool",
4361
+ internalType: "contract PanopticPoolV2",
3868
4362
  type: "address"
3869
4363
  },
3870
4364
  {
3871
- name: "account",
3872
- internalType: "address",
4365
+ name: "tokenId",
4366
+ internalType: "TokenId",
4367
+ type: "uint256"
4368
+ },
4369
+ {
4370
+ name: "atTick",
4371
+ internalType: "int24",
4372
+ type: "int24"
4373
+ }
4374
+ ],
4375
+ name: "getRequiredBase",
4376
+ outputs: [{
4377
+ name: "",
4378
+ internalType: "uint256",
4379
+ type: "uint256"
4380
+ }],
4381
+ stateMutability: "view"
4382
+ },
4383
+ {
4384
+ type: "function",
4385
+ inputs: [
4386
+ {
4387
+ name: "pool",
4388
+ internalType: "contract PanopticPoolV2",
3873
4389
  type: "address"
3874
4390
  },
3875
4391
  {
3876
- name: "atTicks",
3877
- internalType: "int24[]",
3878
- type: "int24[]"
4392
+ name: "startTick",
4393
+ internalType: "int24",
4394
+ type: "int24"
3879
4395
  },
3880
4396
  {
3881
- name: "positionIdList",
3882
- internalType: "TokenId[]",
3883
- type: "uint256[]"
4397
+ name: "nTicks",
4398
+ internalType: "uint256",
4399
+ type: "uint256"
3884
4400
  }
3885
4401
  ],
3886
- name: "getPortfolioValueAtTicks",
4402
+ name: "getTickNets",
3887
4403
  outputs: [{
3888
- name: "value0",
4404
+ name: "tickData",
3889
4405
  internalType: "int256[]",
3890
4406
  type: "int256[]"
3891
4407
  }, {
3892
- name: "value1",
4408
+ name: "liquidityNets",
3893
4409
  internalType: "int256[]",
3894
4410
  type: "int256[]"
3895
4411
  }],
@@ -3899,26 +4415,30 @@ const panopticQueryAbi = [
3899
4415
  type: "function",
3900
4416
  inputs: [
3901
4417
  {
3902
- name: "pool",
3903
- internalType: "contract PanopticPool",
4418
+ name: "univ3pool",
4419
+ internalType: "contract IUniswapV3Pool",
3904
4420
  type: "address"
3905
4421
  },
3906
4422
  {
3907
- name: "tokenId",
3908
- internalType: "TokenId",
3909
- type: "uint256"
3910
- },
3911
- {
3912
- name: "atTick",
4423
+ name: "startTick",
3913
4424
  internalType: "int24",
3914
4425
  type: "int24"
4426
+ },
4427
+ {
4428
+ name: "nTicks",
4429
+ internalType: "uint256",
4430
+ type: "uint256"
3915
4431
  }
3916
4432
  ],
3917
- name: "getRequiredBase",
4433
+ name: "getTickNetsV3",
3918
4434
  outputs: [{
3919
- name: "",
3920
- internalType: "uint256",
3921
- type: "uint256"
4435
+ name: "tickData",
4436
+ internalType: "int256[]",
4437
+ type: "int256[]"
4438
+ }, {
4439
+ name: "liquidityNets",
4440
+ internalType: "int256[]",
4441
+ type: "int256[]"
3922
4442
  }],
3923
4443
  stateMutability: "view"
3924
4444
  },
@@ -3926,10 +4446,20 @@ const panopticQueryAbi = [
3926
4446
  type: "function",
3927
4447
  inputs: [
3928
4448
  {
3929
- name: "pool",
3930
- internalType: "contract PanopticPool",
4449
+ name: "manager",
4450
+ internalType: "contract IPoolManager",
3931
4451
  type: "address"
3932
4452
  },
4453
+ {
4454
+ name: "poolId",
4455
+ internalType: "PoolId",
4456
+ type: "bytes32"
4457
+ },
4458
+ {
4459
+ name: "tickSpacing",
4460
+ internalType: "int24",
4461
+ type: "int24"
4462
+ },
3933
4463
  {
3934
4464
  name: "startTick",
3935
4465
  internalType: "int24",
@@ -3941,7 +4471,7 @@ const panopticQueryAbi = [
3941
4471
  type: "uint256"
3942
4472
  }
3943
4473
  ],
3944
- name: "getTickNets",
4474
+ name: "getTickNetsV4",
3945
4475
  outputs: [{
3946
4476
  name: "tickData",
3947
4477
  internalType: "int256[]",
@@ -3958,7 +4488,7 @@ const panopticQueryAbi = [
3958
4488
  inputs: [
3959
4489
  {
3960
4490
  name: "pool",
3961
- internalType: "contract PanopticPool",
4491
+ internalType: "contract PanopticPoolV2",
3962
4492
  type: "address"
3963
4493
  },
3964
4494
  {
@@ -3990,7 +4520,7 @@ const panopticQueryAbi = [
3990
4520
  inputs: [
3991
4521
  {
3992
4522
  name: "pool",
3993
- internalType: "contract PanopticPool",
4523
+ internalType: "contract PanopticPoolV2",
3994
4524
  type: "address"
3995
4525
  },
3996
4526
  {
@@ -4017,7 +4547,7 @@ const panopticQueryAbi = [
4017
4547
  inputs: [
4018
4548
  {
4019
4549
  name: "pool",
4020
- internalType: "contract PanopticPool",
4550
+ internalType: "contract PanopticPoolV2",
4021
4551
  type: "address"
4022
4552
  },
4023
4553
  {
@@ -9896,6 +10426,15 @@ async function fetchPoolId(params) {
9896
10426
  }
9897
10427
  };
9898
10428
  }
10429
+ /** Read the pool's spot tick without fetching collateral or risk configuration. */
10430
+ async function getPoolCurrentTick({ client, poolAddress, blockNumber }) {
10431
+ return client.readContract({
10432
+ address: poolAddress,
10433
+ abi: panopticPoolV2Abi,
10434
+ functionName: "getCurrentTick",
10435
+ blockNumber
10436
+ });
10437
+ }
9899
10438
 
9900
10439
  //#endregion
9901
10440
  //#region src/panoptic/v2/tokenId/constants.ts
@@ -11409,4 +11948,4 @@ function formatPerSecondRateWadAsAprPct(ratePerSecondWad, precision) {
11409
11948
  }
11410
11949
 
11411
11950
  //#endregion
11412
- export { AccountInsolventError, AlreadyInitializedError, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTickLimitsError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MaxRetriesExceededError, MissingPositionIdsError, MulticallNoDataError, MulticallResultFailedError, MulticallResultMissingError, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NoLoanPositionsError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, ReentrancyError, RpcError, RpcResponseError, STANDARD_TICK_WIDTHS, STRIKE_CONVERSION_FACTOR, SafeModeError, StaleDataError, StaleOracleError, StorageDataNotFoundError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, WrongPoolIdError, WrongUniswapPoolError, ZeroAddressError, ZeroCollateralRequirementError, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, clearTrackedPositions, collateralTrackerV2Abi, createFileStorage, createMemoryStorage, createTxResult, decodeAllDispatchCalldata, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePosition, decodePositionBalance$1 as decodePositionBalance, decodeTickSpacing, diagnoseOracleSafeMode, fetchPoolId, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatRateWad, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatWad, formatWadPercent, formatWadSigned, getBlockMeta, getClosedPositionsKey, getOpenPositionIds, getOracleRiskParameters, getOracleState, getPendingPositionsKey, getPool, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPosition, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getRiskParameters, getSchemaVersionKey, getSyncCheckpointKey, getTrackedChunksKey, getTrackedPositionIds, getUtilization, isPanopticErrorType, isPositionTracked, jsonSerializer, mintableAfterBuffer, oracleEpochAt, panopticErrorsAbi, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticGuardianAbi, panopticPoolV2Abi, panopticQueryAbi as panopticQueryAbi$1, parsePanopticError, parseTokenAmount, parseWad, recoverSnapshot, recoverSnapshotFromTx, riskEngineAbi, selectDispatchForAccount, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, stateViewAbi, submitWrite, uniswapV3PoolAbi, validateBuilderCode };
11951
+ export { AccountInsolventError, AlreadyInitializedError, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTickLimitsError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MaxRetriesExceededError, MissingPositionIdsError, MulticallNoDataError, MulticallResultFailedError, MulticallResultMissingError, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NoLoanPositionsError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, ReentrancyError, RpcError, RpcResponseError, STANDARD_TICK_WIDTHS, STRIKE_CONVERSION_FACTOR, SafeModeError, StaleDataError, StaleOracleError, StorageDataNotFoundError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, WrongPoolIdError, WrongUniswapPoolError, ZeroAddressError, ZeroCollateralRequirementError, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, availableToBorrow, clearTrackedPositions, collateralTrackerV2Abi, createFileStorage, createMemoryStorage, createTxResult, decodeAllDispatchCalldata, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePosition, decodePositionBalance$1 as decodePositionBalance, decodeTickSpacing, diagnoseOracleSafeMode, fetchPoolId, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatRateWad, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatWad, formatWadPercent, formatWadSigned, getBlockMeta, getClosedPositionsKey, getOpenPositionIds, getOracleRiskParameters, getOracleState, getPendingPositionsKey, getPool, getPoolCurrentTick, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPosition, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getRiskParameters, getSchemaVersionKey, getSyncCheckpointKey, getTrackedChunksKey, getTrackedPositionIds, getUtilization, isPanopticErrorType, isPositionTracked, jsonSerializer, mintableAfterBuffer, oracleEpochAt, panopticErrorsAbi, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticGuardianAbi, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi as panopticQueryAbi$1, parsePanopticError, parseTokenAmount, parseWad, recoverSnapshot, recoverSnapshotFromTx, riskEngineAbi, selectDispatchForAccount, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, stateViewAbi, submitWrite, uniswapV3PoolAbi, validateBuilderCode };