@flaunch/sdk 0.2.0 → 0.3.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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/abi/BidWall.d.ts +493 -0
  3. package/dist/abi/BidWall.d.ts.map +1 -0
  4. package/dist/abi/StateView.d.ts +278 -0
  5. package/dist/abi/StateView.d.ts.map +1 -0
  6. package/dist/addresses/index.cjs +194 -137
  7. package/dist/addresses/index.cjs.map +1 -1
  8. package/dist/addresses/index.js +192 -138
  9. package/dist/addresses/index.js.map +1 -1
  10. package/dist/addresses.d.ts +6 -1
  11. package/dist/addresses.d.ts.map +1 -1
  12. package/dist/clients/BidWallClient.d.ts +25 -0
  13. package/dist/clients/BidWallClient.d.ts.map +1 -0
  14. package/dist/clients/FairLaunchClient.d.ts +1 -1
  15. package/dist/clients/FairLaunchClient.d.ts.map +1 -1
  16. package/dist/clients/FastFlaunchClient.d.ts +1 -2
  17. package/dist/clients/FastFlaunchClient.d.ts.map +1 -1
  18. package/dist/clients/FlaunchClient.d.ts +1 -1
  19. package/dist/clients/FlaunchClient.d.ts.map +1 -1
  20. package/dist/clients/FlaunchPositionManagerClient.d.ts +2 -2
  21. package/dist/clients/FlaunchPositionManagerClient.d.ts.map +1 -1
  22. package/dist/clients/MemecoinClient.d.ts +1 -1
  23. package/dist/clients/MemecoinClient.d.ts.map +1 -1
  24. package/dist/clients/Permit2Client.d.ts +1 -1
  25. package/dist/clients/Permit2Client.d.ts.map +1 -1
  26. package/dist/clients/PoolManagerClient.d.ts +1 -1
  27. package/dist/clients/PoolManagerClient.d.ts.map +1 -1
  28. package/dist/clients/QuoterClient.d.ts +2 -1
  29. package/dist/clients/QuoterClient.d.ts.map +1 -1
  30. package/dist/clients/StateViewClient.d.ts +33 -0
  31. package/dist/clients/StateViewClient.d.ts.map +1 -0
  32. package/dist/index.cjs.js +1083 -258
  33. package/dist/index.cjs.js.map +1 -1
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.esm.js +1075 -260
  37. package/dist/index.esm.js.map +1 -1
  38. package/dist/index.umd.js +1 -1
  39. package/dist/index.umd.js.map +1 -1
  40. package/dist/sdk/FlaunchSDK.d.ts +31 -9
  41. package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
  42. package/dist/utils/univ4.d.ts +5 -0
  43. package/dist/utils/univ4.d.ts.map +1 -1
  44. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -2745,6 +2745,237 @@ class ReadPoolManager {
2745
2745
  }
2746
2746
  }
2747
2747
 
2748
+ const StateViewAbi = [
2749
+ {
2750
+ inputs: [
2751
+ {
2752
+ internalType: "contract IPoolManager",
2753
+ name: "_poolManager",
2754
+ type: "address",
2755
+ },
2756
+ ],
2757
+ stateMutability: "nonpayable",
2758
+ type: "constructor",
2759
+ },
2760
+ {
2761
+ inputs: [{ internalType: "PoolId", name: "poolId", type: "bytes32" }],
2762
+ name: "getFeeGrowthGlobals",
2763
+ outputs: [
2764
+ { internalType: "uint256", name: "feeGrowthGlobal0", type: "uint256" },
2765
+ { internalType: "uint256", name: "feeGrowthGlobal1", type: "uint256" },
2766
+ ],
2767
+ stateMutability: "view",
2768
+ type: "function",
2769
+ },
2770
+ {
2771
+ inputs: [
2772
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2773
+ { internalType: "int24", name: "tickLower", type: "int24" },
2774
+ { internalType: "int24", name: "tickUpper", type: "int24" },
2775
+ ],
2776
+ name: "getFeeGrowthInside",
2777
+ outputs: [
2778
+ {
2779
+ internalType: "uint256",
2780
+ name: "feeGrowthInside0X128",
2781
+ type: "uint256",
2782
+ },
2783
+ {
2784
+ internalType: "uint256",
2785
+ name: "feeGrowthInside1X128",
2786
+ type: "uint256",
2787
+ },
2788
+ ],
2789
+ stateMutability: "view",
2790
+ type: "function",
2791
+ },
2792
+ {
2793
+ inputs: [{ internalType: "PoolId", name: "poolId", type: "bytes32" }],
2794
+ name: "getLiquidity",
2795
+ outputs: [{ internalType: "uint128", name: "liquidity", type: "uint128" }],
2796
+ stateMutability: "view",
2797
+ type: "function",
2798
+ },
2799
+ {
2800
+ inputs: [
2801
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2802
+ { internalType: "bytes32", name: "positionId", type: "bytes32" },
2803
+ ],
2804
+ name: "getPositionInfo",
2805
+ outputs: [
2806
+ { internalType: "uint128", name: "liquidity", type: "uint128" },
2807
+ {
2808
+ internalType: "uint256",
2809
+ name: "feeGrowthInside0LastX128",
2810
+ type: "uint256",
2811
+ },
2812
+ {
2813
+ internalType: "uint256",
2814
+ name: "feeGrowthInside1LastX128",
2815
+ type: "uint256",
2816
+ },
2817
+ ],
2818
+ stateMutability: "view",
2819
+ type: "function",
2820
+ },
2821
+ {
2822
+ inputs: [
2823
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2824
+ { internalType: "address", name: "owner", type: "address" },
2825
+ { internalType: "int24", name: "tickLower", type: "int24" },
2826
+ { internalType: "int24", name: "tickUpper", type: "int24" },
2827
+ { internalType: "bytes32", name: "salt", type: "bytes32" },
2828
+ ],
2829
+ name: "getPositionInfo",
2830
+ outputs: [
2831
+ { internalType: "uint128", name: "liquidity", type: "uint128" },
2832
+ {
2833
+ internalType: "uint256",
2834
+ name: "feeGrowthInside0LastX128",
2835
+ type: "uint256",
2836
+ },
2837
+ {
2838
+ internalType: "uint256",
2839
+ name: "feeGrowthInside1LastX128",
2840
+ type: "uint256",
2841
+ },
2842
+ ],
2843
+ stateMutability: "view",
2844
+ type: "function",
2845
+ },
2846
+ {
2847
+ inputs: [
2848
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2849
+ { internalType: "bytes32", name: "positionId", type: "bytes32" },
2850
+ ],
2851
+ name: "getPositionLiquidity",
2852
+ outputs: [{ internalType: "uint128", name: "liquidity", type: "uint128" }],
2853
+ stateMutability: "view",
2854
+ type: "function",
2855
+ },
2856
+ {
2857
+ inputs: [{ internalType: "PoolId", name: "poolId", type: "bytes32" }],
2858
+ name: "getSlot0",
2859
+ outputs: [
2860
+ { internalType: "uint160", name: "sqrtPriceX96", type: "uint160" },
2861
+ { internalType: "int24", name: "tick", type: "int24" },
2862
+ { internalType: "uint24", name: "protocolFee", type: "uint24" },
2863
+ { internalType: "uint24", name: "lpFee", type: "uint24" },
2864
+ ],
2865
+ stateMutability: "view",
2866
+ type: "function",
2867
+ },
2868
+ {
2869
+ inputs: [
2870
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2871
+ { internalType: "int16", name: "tick", type: "int16" },
2872
+ ],
2873
+ name: "getTickBitmap",
2874
+ outputs: [{ internalType: "uint256", name: "tickBitmap", type: "uint256" }],
2875
+ stateMutability: "view",
2876
+ type: "function",
2877
+ },
2878
+ {
2879
+ inputs: [
2880
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2881
+ { internalType: "int24", name: "tick", type: "int24" },
2882
+ ],
2883
+ name: "getTickFeeGrowthOutside",
2884
+ outputs: [
2885
+ {
2886
+ internalType: "uint256",
2887
+ name: "feeGrowthOutside0X128",
2888
+ type: "uint256",
2889
+ },
2890
+ {
2891
+ internalType: "uint256",
2892
+ name: "feeGrowthOutside1X128",
2893
+ type: "uint256",
2894
+ },
2895
+ ],
2896
+ stateMutability: "view",
2897
+ type: "function",
2898
+ },
2899
+ {
2900
+ inputs: [
2901
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2902
+ { internalType: "int24", name: "tick", type: "int24" },
2903
+ ],
2904
+ name: "getTickInfo",
2905
+ outputs: [
2906
+ { internalType: "uint128", name: "liquidityGross", type: "uint128" },
2907
+ { internalType: "int128", name: "liquidityNet", type: "int128" },
2908
+ {
2909
+ internalType: "uint256",
2910
+ name: "feeGrowthOutside0X128",
2911
+ type: "uint256",
2912
+ },
2913
+ {
2914
+ internalType: "uint256",
2915
+ name: "feeGrowthOutside1X128",
2916
+ type: "uint256",
2917
+ },
2918
+ ],
2919
+ stateMutability: "view",
2920
+ type: "function",
2921
+ },
2922
+ {
2923
+ inputs: [
2924
+ { internalType: "PoolId", name: "poolId", type: "bytes32" },
2925
+ { internalType: "int24", name: "tick", type: "int24" },
2926
+ ],
2927
+ name: "getTickLiquidity",
2928
+ outputs: [
2929
+ { internalType: "uint128", name: "liquidityGross", type: "uint128" },
2930
+ { internalType: "int128", name: "liquidityNet", type: "int128" },
2931
+ ],
2932
+ stateMutability: "view",
2933
+ type: "function",
2934
+ },
2935
+ {
2936
+ inputs: [],
2937
+ name: "poolManager",
2938
+ outputs: [
2939
+ { internalType: "contract IPoolManager", name: "", type: "address" },
2940
+ ],
2941
+ stateMutability: "view",
2942
+ type: "function",
2943
+ },
2944
+ ];
2945
+
2946
+ class ReadStateView {
2947
+ constructor(address, drift$1 = drift.createDrift()) {
2948
+ if (!address) {
2949
+ throw new Error("Address is required");
2950
+ }
2951
+ this.contract = drift$1.contract({
2952
+ abi: StateViewAbi,
2953
+ address,
2954
+ });
2955
+ }
2956
+ poolSlot0({ poolId }) {
2957
+ return this.contract.read("getSlot0", {
2958
+ poolId,
2959
+ });
2960
+ }
2961
+ positionInfo({ poolId, owner, tickLower, tickUpper, salt, }) {
2962
+ const saltBytes32 = viem.pad(viem.stringToHex(salt), { size: 32, dir: "right" });
2963
+ return this.contract.read("getPositionInfo", {
2964
+ poolId,
2965
+ owner,
2966
+ tickLower,
2967
+ tickUpper,
2968
+ salt: saltBytes32,
2969
+ });
2970
+ }
2971
+ getTickLiquidity({ poolId, tick }) {
2972
+ return this.contract.read("getTickLiquidity", {
2973
+ poolId,
2974
+ tick,
2975
+ });
2976
+ }
2977
+ }
2978
+
2748
2979
  const FairLaunchAbi = [
2749
2980
  {
2750
2981
  inputs: [
@@ -2813,20 +3044,443 @@ const FairLaunchAbi = [
2813
3044
  type: "uint256",
2814
3045
  },
2815
3046
  {
2816
- indexed: false,
2817
- internalType: "uint256",
2818
- name: "_endedAt",
2819
- type: "uint256",
3047
+ indexed: false,
3048
+ internalType: "uint256",
3049
+ name: "_endedAt",
3050
+ type: "uint256",
3051
+ },
3052
+ ],
3053
+ name: "FairLaunchEnded",
3054
+ type: "event",
3055
+ },
3056
+ {
3057
+ inputs: [],
3058
+ name: "FAIR_LAUNCH_WINDOW",
3059
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
3060
+ stateMutability: "view",
3061
+ type: "function",
3062
+ },
3063
+ {
3064
+ inputs: [
3065
+ {
3066
+ components: [
3067
+ { internalType: "Currency", name: "currency0", type: "address" },
3068
+ { internalType: "Currency", name: "currency1", type: "address" },
3069
+ { internalType: "uint24", name: "fee", type: "uint24" },
3070
+ { internalType: "int24", name: "tickSpacing", type: "int24" },
3071
+ { internalType: "contract IHooks", name: "hooks", type: "address" },
3072
+ ],
3073
+ internalType: "struct PoolKey",
3074
+ name: "_poolKey",
3075
+ type: "tuple",
3076
+ },
3077
+ { internalType: "uint256", name: "_tokenFees", type: "uint256" },
3078
+ { internalType: "bool", name: "_nativeIsZero", type: "bool" },
3079
+ ],
3080
+ name: "closePosition",
3081
+ outputs: [
3082
+ {
3083
+ components: [
3084
+ { internalType: "uint256", name: "startsAt", type: "uint256" },
3085
+ { internalType: "uint256", name: "endsAt", type: "uint256" },
3086
+ { internalType: "int24", name: "initialTick", type: "int24" },
3087
+ { internalType: "uint256", name: "revenue", type: "uint256" },
3088
+ { internalType: "uint256", name: "supply", type: "uint256" },
3089
+ { internalType: "bool", name: "closed", type: "bool" },
3090
+ ],
3091
+ internalType: "struct FairLaunch.FairLaunchInfo",
3092
+ name: "",
3093
+ type: "tuple",
3094
+ },
3095
+ ],
3096
+ stateMutability: "nonpayable",
3097
+ type: "function",
3098
+ },
3099
+ {
3100
+ inputs: [
3101
+ { internalType: "PoolId", name: "_poolId", type: "bytes32" },
3102
+ { internalType: "int24", name: "_initialTick", type: "int24" },
3103
+ { internalType: "uint256", name: "_flaunchesAt", type: "uint256" },
3104
+ {
3105
+ internalType: "uint256",
3106
+ name: "_initialTokenFairLaunch",
3107
+ type: "uint256",
3108
+ },
3109
+ ],
3110
+ name: "createPosition",
3111
+ outputs: [
3112
+ {
3113
+ components: [
3114
+ { internalType: "uint256", name: "startsAt", type: "uint256" },
3115
+ { internalType: "uint256", name: "endsAt", type: "uint256" },
3116
+ { internalType: "int24", name: "initialTick", type: "int24" },
3117
+ { internalType: "uint256", name: "revenue", type: "uint256" },
3118
+ { internalType: "uint256", name: "supply", type: "uint256" },
3119
+ { internalType: "bool", name: "closed", type: "bool" },
3120
+ ],
3121
+ internalType: "struct FairLaunch.FairLaunchInfo",
3122
+ name: "",
3123
+ type: "tuple",
3124
+ },
3125
+ ],
3126
+ stateMutability: "nonpayable",
3127
+ type: "function",
3128
+ },
3129
+ {
3130
+ inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
3131
+ name: "fairLaunchInfo",
3132
+ outputs: [
3133
+ {
3134
+ components: [
3135
+ { internalType: "uint256", name: "startsAt", type: "uint256" },
3136
+ { internalType: "uint256", name: "endsAt", type: "uint256" },
3137
+ { internalType: "int24", name: "initialTick", type: "int24" },
3138
+ { internalType: "uint256", name: "revenue", type: "uint256" },
3139
+ { internalType: "uint256", name: "supply", type: "uint256" },
3140
+ { internalType: "bool", name: "closed", type: "bool" },
3141
+ ],
3142
+ internalType: "struct FairLaunch.FairLaunchInfo",
3143
+ name: "",
3144
+ type: "tuple",
3145
+ },
3146
+ ],
3147
+ stateMutability: "view",
3148
+ type: "function",
3149
+ },
3150
+ {
3151
+ inputs: [
3152
+ {
3153
+ components: [
3154
+ { internalType: "Currency", name: "currency0", type: "address" },
3155
+ { internalType: "Currency", name: "currency1", type: "address" },
3156
+ { internalType: "uint24", name: "fee", type: "uint24" },
3157
+ { internalType: "int24", name: "tickSpacing", type: "int24" },
3158
+ { internalType: "contract IHooks", name: "hooks", type: "address" },
3159
+ ],
3160
+ internalType: "struct PoolKey",
3161
+ name: "_poolKey",
3162
+ type: "tuple",
3163
+ },
3164
+ { internalType: "int256", name: "_amountSpecified", type: "int256" },
3165
+ { internalType: "bool", name: "_nativeIsZero", type: "bool" },
3166
+ ],
3167
+ name: "fillFromPosition",
3168
+ outputs: [
3169
+ {
3170
+ internalType: "BeforeSwapDelta",
3171
+ name: "beforeSwapDelta_",
3172
+ type: "int256",
3173
+ },
3174
+ { internalType: "BalanceDelta", name: "balanceDelta_", type: "int256" },
3175
+ {
3176
+ components: [
3177
+ { internalType: "uint256", name: "startsAt", type: "uint256" },
3178
+ { internalType: "uint256", name: "endsAt", type: "uint256" },
3179
+ { internalType: "int24", name: "initialTick", type: "int24" },
3180
+ { internalType: "uint256", name: "revenue", type: "uint256" },
3181
+ { internalType: "uint256", name: "supply", type: "uint256" },
3182
+ { internalType: "bool", name: "closed", type: "bool" },
3183
+ ],
3184
+ internalType: "struct FairLaunch.FairLaunchInfo",
3185
+ name: "fairLaunchInfo_",
3186
+ type: "tuple",
3187
+ },
3188
+ ],
3189
+ stateMutability: "nonpayable",
3190
+ type: "function",
3191
+ },
3192
+ {
3193
+ inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
3194
+ name: "inFairLaunchWindow",
3195
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
3196
+ stateMutability: "view",
3197
+ type: "function",
3198
+ },
3199
+ {
3200
+ inputs: [
3201
+ { internalType: "PoolId", name: "_poolId", type: "bytes32" },
3202
+ { internalType: "int256", name: "_revenue", type: "int256" },
3203
+ ],
3204
+ name: "modifyRevenue",
3205
+ outputs: [],
3206
+ stateMutability: "nonpayable",
3207
+ type: "function",
3208
+ },
3209
+ {
3210
+ inputs: [],
3211
+ name: "poolManager",
3212
+ outputs: [
3213
+ { internalType: "contract IPoolManager", name: "", type: "address" },
3214
+ ],
3215
+ stateMutability: "view",
3216
+ type: "function",
3217
+ },
3218
+ {
3219
+ inputs: [],
3220
+ name: "positionManager",
3221
+ outputs: [{ internalType: "address", name: "", type: "address" }],
3222
+ stateMutability: "view",
3223
+ type: "function",
3224
+ },
3225
+ ];
3226
+
3227
+ class ReadFairLaunch {
3228
+ constructor(address, drift$1 = drift.createDrift()) {
3229
+ if (!address) {
3230
+ throw new Error("Address is required");
3231
+ }
3232
+ this.contract = drift$1.contract({
3233
+ abi: FairLaunchAbi,
3234
+ address,
3235
+ });
3236
+ }
3237
+ fairLaunchInfo({ poolId }) {
3238
+ return this.contract.read("fairLaunchInfo", {
3239
+ _poolId: poolId,
3240
+ });
3241
+ }
3242
+ async isFairLaunchActive({ poolId }) {
3243
+ const { closed, endsAt } = await this.fairLaunchInfo({ poolId });
3244
+ if (closed) {
3245
+ return false;
3246
+ }
3247
+ if (new Date().getTime() / 1000 > endsAt) {
3248
+ return false;
3249
+ }
3250
+ return true;
3251
+ }
3252
+ }
3253
+
3254
+ const BidwallAbi = [
3255
+ {
3256
+ inputs: [
3257
+ { internalType: "address", name: "_nativeToken", type: "address" },
3258
+ { internalType: "address", name: "_poolManager", type: "address" },
3259
+ { internalType: "address", name: "_protocolOwner", type: "address" },
3260
+ ],
3261
+ stateMutability: "nonpayable",
3262
+ type: "constructor",
3263
+ },
3264
+ { inputs: [], name: "AlreadyInitialized", type: "error" },
3265
+ { inputs: [], name: "CallerIsNotCreator", type: "error" },
3266
+ { inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
3267
+ { inputs: [], name: "NoHandoverRequest", type: "error" },
3268
+ { inputs: [], name: "NotPositionManager", type: "error" },
3269
+ { inputs: [], name: "Unauthorized", type: "error" },
3270
+ {
3271
+ anonymous: false,
3272
+ inputs: [
3273
+ {
3274
+ indexed: true,
3275
+ internalType: "PoolId",
3276
+ name: "_poolId",
3277
+ type: "bytes32",
3278
+ },
3279
+ {
3280
+ indexed: false,
3281
+ internalType: "address",
3282
+ name: "_recipient",
3283
+ type: "address",
3284
+ },
3285
+ {
3286
+ indexed: false,
3287
+ internalType: "uint256",
3288
+ name: "_eth",
3289
+ type: "uint256",
3290
+ },
3291
+ ],
3292
+ name: "BidWallClosed",
3293
+ type: "event",
3294
+ },
3295
+ {
3296
+ anonymous: false,
3297
+ inputs: [
3298
+ {
3299
+ indexed: true,
3300
+ internalType: "PoolId",
3301
+ name: "_poolId",
3302
+ type: "bytes32",
3303
+ },
3304
+ {
3305
+ indexed: false,
3306
+ internalType: "uint256",
3307
+ name: "_added",
3308
+ type: "uint256",
3309
+ },
3310
+ {
3311
+ indexed: false,
3312
+ internalType: "uint256",
3313
+ name: "_pending",
3314
+ type: "uint256",
3315
+ },
3316
+ ],
3317
+ name: "BidWallDeposit",
3318
+ type: "event",
3319
+ },
3320
+ {
3321
+ anonymous: false,
3322
+ inputs: [
3323
+ {
3324
+ indexed: true,
3325
+ internalType: "PoolId",
3326
+ name: "_poolId",
3327
+ type: "bytes32",
3328
+ },
3329
+ { indexed: false, internalType: "bool", name: "_disabled", type: "bool" },
3330
+ ],
3331
+ name: "BidWallDisabledStateUpdated",
3332
+ type: "event",
3333
+ },
3334
+ {
3335
+ anonymous: false,
3336
+ inputs: [
3337
+ {
3338
+ indexed: true,
3339
+ internalType: "PoolId",
3340
+ name: "_poolId",
3341
+ type: "bytes32",
3342
+ },
3343
+ {
3344
+ indexed: false,
3345
+ internalType: "uint256",
3346
+ name: "_eth",
3347
+ type: "uint256",
3348
+ },
3349
+ {
3350
+ indexed: false,
3351
+ internalType: "int24",
3352
+ name: "_tickLower",
3353
+ type: "int24",
3354
+ },
3355
+ {
3356
+ indexed: false,
3357
+ internalType: "int24",
3358
+ name: "_tickUpper",
3359
+ type: "int24",
3360
+ },
3361
+ ],
3362
+ name: "BidWallInitialized",
3363
+ type: "event",
3364
+ },
3365
+ {
3366
+ anonymous: false,
3367
+ inputs: [
3368
+ {
3369
+ indexed: true,
3370
+ internalType: "PoolId",
3371
+ name: "_poolId",
3372
+ type: "bytes32",
3373
+ },
3374
+ {
3375
+ indexed: false,
3376
+ internalType: "uint256",
3377
+ name: "_eth",
3378
+ type: "uint256",
3379
+ },
3380
+ {
3381
+ indexed: false,
3382
+ internalType: "int24",
3383
+ name: "_tickLower",
3384
+ type: "int24",
3385
+ },
3386
+ {
3387
+ indexed: false,
3388
+ internalType: "int24",
3389
+ name: "_tickUpper",
3390
+ type: "int24",
3391
+ },
3392
+ ],
3393
+ name: "BidWallRepositioned",
3394
+ type: "event",
3395
+ },
3396
+ {
3397
+ anonymous: false,
3398
+ inputs: [
3399
+ {
3400
+ indexed: true,
3401
+ internalType: "PoolId",
3402
+ name: "_poolId",
3403
+ type: "bytes32",
3404
+ },
3405
+ {
3406
+ indexed: false,
3407
+ internalType: "address",
3408
+ name: "_recipient",
3409
+ type: "address",
3410
+ },
3411
+ {
3412
+ indexed: false,
3413
+ internalType: "uint256",
3414
+ name: "_tokens",
3415
+ type: "uint256",
3416
+ },
3417
+ ],
3418
+ name: "BidWallRewardsTransferred",
3419
+ type: "event",
3420
+ },
3421
+ {
3422
+ anonymous: false,
3423
+ inputs: [
3424
+ {
3425
+ indexed: false,
3426
+ internalType: "uint256",
3427
+ name: "_newSwapFeeThreshold",
3428
+ type: "uint256",
3429
+ },
3430
+ ],
3431
+ name: "FixedSwapFeeThresholdUpdated",
3432
+ type: "event",
3433
+ },
3434
+ {
3435
+ anonymous: false,
3436
+ inputs: [
3437
+ {
3438
+ indexed: true,
3439
+ internalType: "address",
3440
+ name: "pendingOwner",
3441
+ type: "address",
3442
+ },
3443
+ ],
3444
+ name: "OwnershipHandoverCanceled",
3445
+ type: "event",
3446
+ },
3447
+ {
3448
+ anonymous: false,
3449
+ inputs: [
3450
+ {
3451
+ indexed: true,
3452
+ internalType: "address",
3453
+ name: "pendingOwner",
3454
+ type: "address",
3455
+ },
3456
+ ],
3457
+ name: "OwnershipHandoverRequested",
3458
+ type: "event",
3459
+ },
3460
+ {
3461
+ anonymous: false,
3462
+ inputs: [
3463
+ {
3464
+ indexed: true,
3465
+ internalType: "address",
3466
+ name: "oldOwner",
3467
+ type: "address",
3468
+ },
3469
+ {
3470
+ indexed: true,
3471
+ internalType: "address",
3472
+ name: "newOwner",
3473
+ type: "address",
2820
3474
  },
2821
3475
  ],
2822
- name: "FairLaunchEnded",
3476
+ name: "OwnershipTransferred",
2823
3477
  type: "event",
2824
3478
  },
2825
3479
  {
2826
3480
  inputs: [],
2827
- name: "FAIR_LAUNCH_WINDOW",
2828
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
2829
- stateMutability: "view",
3481
+ name: "cancelOwnershipHandover",
3482
+ outputs: [],
3483
+ stateMutability: "payable",
2830
3484
  type: "function",
2831
3485
  },
2832
3486
  {
@@ -2840,80 +3494,22 @@ const FairLaunchAbi = [
2840
3494
  { internalType: "contract IHooks", name: "hooks", type: "address" },
2841
3495
  ],
2842
3496
  internalType: "struct PoolKey",
2843
- name: "_poolKey",
2844
- type: "tuple",
2845
- },
2846
- { internalType: "uint256", name: "_tokenFees", type: "uint256" },
2847
- { internalType: "bool", name: "_nativeIsZero", type: "bool" },
2848
- ],
2849
- name: "closePosition",
2850
- outputs: [
2851
- {
2852
- components: [
2853
- { internalType: "uint256", name: "startsAt", type: "uint256" },
2854
- { internalType: "uint256", name: "endsAt", type: "uint256" },
2855
- { internalType: "int24", name: "initialTick", type: "int24" },
2856
- { internalType: "uint256", name: "revenue", type: "uint256" },
2857
- { internalType: "uint256", name: "supply", type: "uint256" },
2858
- { internalType: "bool", name: "closed", type: "bool" },
2859
- ],
2860
- internalType: "struct FairLaunch.FairLaunchInfo",
2861
- name: "",
3497
+ name: "_key",
2862
3498
  type: "tuple",
2863
3499
  },
2864
3500
  ],
3501
+ name: "closeBidWall",
3502
+ outputs: [],
2865
3503
  stateMutability: "nonpayable",
2866
3504
  type: "function",
2867
3505
  },
2868
3506
  {
2869
3507
  inputs: [
2870
- { internalType: "PoolId", name: "_poolId", type: "bytes32" },
2871
- { internalType: "int24", name: "_initialTick", type: "int24" },
2872
- { internalType: "uint256", name: "_flaunchesAt", type: "uint256" },
2873
- {
2874
- internalType: "uint256",
2875
- name: "_initialTokenFairLaunch",
2876
- type: "uint256",
2877
- },
2878
- ],
2879
- name: "createPosition",
2880
- outputs: [
2881
- {
2882
- components: [
2883
- { internalType: "uint256", name: "startsAt", type: "uint256" },
2884
- { internalType: "uint256", name: "endsAt", type: "uint256" },
2885
- { internalType: "int24", name: "initialTick", type: "int24" },
2886
- { internalType: "uint256", name: "revenue", type: "uint256" },
2887
- { internalType: "uint256", name: "supply", type: "uint256" },
2888
- { internalType: "bool", name: "closed", type: "bool" },
2889
- ],
2890
- internalType: "struct FairLaunch.FairLaunchInfo",
2891
- name: "",
2892
- type: "tuple",
2893
- },
2894
- ],
2895
- stateMutability: "nonpayable",
2896
- type: "function",
2897
- },
2898
- {
2899
- inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
2900
- name: "fairLaunchInfo",
2901
- outputs: [
2902
- {
2903
- components: [
2904
- { internalType: "uint256", name: "startsAt", type: "uint256" },
2905
- { internalType: "uint256", name: "endsAt", type: "uint256" },
2906
- { internalType: "int24", name: "initialTick", type: "int24" },
2907
- { internalType: "uint256", name: "revenue", type: "uint256" },
2908
- { internalType: "uint256", name: "supply", type: "uint256" },
2909
- { internalType: "bool", name: "closed", type: "bool" },
2910
- ],
2911
- internalType: "struct FairLaunch.FairLaunchInfo",
2912
- name: "",
2913
- type: "tuple",
2914
- },
3508
+ { internalType: "address", name: "pendingOwner", type: "address" },
2915
3509
  ],
2916
- stateMutability: "view",
3510
+ name: "completeOwnershipHandover",
3511
+ outputs: [],
3512
+ stateMutability: "payable",
2917
3513
  type: "function",
2918
3514
  },
2919
3515
  {
@@ -2930,49 +3526,57 @@ const FairLaunchAbi = [
2930
3526
  name: "_poolKey",
2931
3527
  type: "tuple",
2932
3528
  },
2933
- { internalType: "int256", name: "_amountSpecified", type: "int256" },
3529
+ { internalType: "uint256", name: "_ethSwapAmount", type: "uint256" },
3530
+ { internalType: "int24", name: "_currentTick", type: "int24" },
2934
3531
  { internalType: "bool", name: "_nativeIsZero", type: "bool" },
2935
3532
  ],
2936
- name: "fillFromPosition",
2937
- outputs: [
2938
- {
2939
- internalType: "BeforeSwapDelta",
2940
- name: "beforeSwapDelta_",
2941
- type: "int256",
2942
- },
2943
- { internalType: "BalanceDelta", name: "balanceDelta_", type: "int256" },
2944
- {
2945
- components: [
2946
- { internalType: "uint256", name: "startsAt", type: "uint256" },
2947
- { internalType: "uint256", name: "endsAt", type: "uint256" },
2948
- { internalType: "int24", name: "initialTick", type: "int24" },
2949
- { internalType: "uint256", name: "revenue", type: "uint256" },
2950
- { internalType: "uint256", name: "supply", type: "uint256" },
2951
- { internalType: "bool", name: "closed", type: "bool" },
2952
- ],
2953
- internalType: "struct FairLaunch.FairLaunchInfo",
2954
- name: "fairLaunchInfo_",
2955
- type: "tuple",
2956
- },
2957
- ],
3533
+ name: "deposit",
3534
+ outputs: [],
2958
3535
  stateMutability: "nonpayable",
2959
3536
  type: "function",
2960
3537
  },
2961
3538
  {
2962
3539
  inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
2963
- name: "inFairLaunchWindow",
3540
+ name: "isBidWallEnabled",
2964
3541
  outputs: [{ internalType: "bool", name: "", type: "bool" }],
2965
3542
  stateMutability: "view",
2966
3543
  type: "function",
2967
3544
  },
3545
+ {
3546
+ inputs: [],
3547
+ name: "nativeToken",
3548
+ outputs: [{ internalType: "address", name: "", type: "address" }],
3549
+ stateMutability: "view",
3550
+ type: "function",
3551
+ },
3552
+ {
3553
+ inputs: [],
3554
+ name: "owner",
3555
+ outputs: [{ internalType: "address", name: "result", type: "address" }],
3556
+ stateMutability: "view",
3557
+ type: "function",
3558
+ },
2968
3559
  {
2969
3560
  inputs: [
2970
- { internalType: "PoolId", name: "_poolId", type: "bytes32" },
2971
- { internalType: "int256", name: "_revenue", type: "int256" },
3561
+ { internalType: "address", name: "pendingOwner", type: "address" },
2972
3562
  ],
2973
- name: "modifyRevenue",
2974
- outputs: [],
2975
- stateMutability: "nonpayable",
3563
+ name: "ownershipHandoverExpiresAt",
3564
+ outputs: [{ internalType: "uint256", name: "result", type: "uint256" }],
3565
+ stateMutability: "view",
3566
+ type: "function",
3567
+ },
3568
+ {
3569
+ inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
3570
+ name: "poolInfo",
3571
+ outputs: [
3572
+ { internalType: "bool", name: "disabled", type: "bool" },
3573
+ { internalType: "bool", name: "initialized", type: "bool" },
3574
+ { internalType: "int24", name: "tickLower", type: "int24" },
3575
+ { internalType: "int24", name: "tickUpper", type: "int24" },
3576
+ { internalType: "uint256", name: "pendingETHFees", type: "uint256" },
3577
+ { internalType: "uint256", name: "cumulativeSwapFees", type: "uint256" },
3578
+ ],
3579
+ stateMutability: "view",
2976
3580
  type: "function",
2977
3581
  },
2978
3582
  {
@@ -2984,39 +3588,98 @@ const FairLaunchAbi = [
2984
3588
  stateMutability: "view",
2985
3589
  type: "function",
2986
3590
  },
3591
+ {
3592
+ inputs: [{ internalType: "PoolId", name: "_poolId", type: "bytes32" }],
3593
+ name: "position",
3594
+ outputs: [
3595
+ { internalType: "uint256", name: "amount0_", type: "uint256" },
3596
+ { internalType: "uint256", name: "amount1_", type: "uint256" },
3597
+ { internalType: "uint256", name: "pendingEth_", type: "uint256" },
3598
+ ],
3599
+ stateMutability: "view",
3600
+ type: "function",
3601
+ },
2987
3602
  {
2988
3603
  inputs: [],
2989
3604
  name: "positionManager",
2990
- outputs: [{ internalType: "address", name: "", type: "address" }],
3605
+ outputs: [
3606
+ { internalType: "contract PositionManager", name: "", type: "address" },
3607
+ ],
2991
3608
  stateMutability: "view",
2992
3609
  type: "function",
2993
3610
  },
3611
+ {
3612
+ inputs: [],
3613
+ name: "renounceOwnership",
3614
+ outputs: [],
3615
+ stateMutability: "payable",
3616
+ type: "function",
3617
+ },
3618
+ {
3619
+ inputs: [],
3620
+ name: "requestOwnershipHandover",
3621
+ outputs: [],
3622
+ stateMutability: "payable",
3623
+ type: "function",
3624
+ },
3625
+ {
3626
+ inputs: [
3627
+ {
3628
+ components: [
3629
+ { internalType: "Currency", name: "currency0", type: "address" },
3630
+ { internalType: "Currency", name: "currency1", type: "address" },
3631
+ { internalType: "uint24", name: "fee", type: "uint24" },
3632
+ { internalType: "int24", name: "tickSpacing", type: "int24" },
3633
+ { internalType: "contract IHooks", name: "hooks", type: "address" },
3634
+ ],
3635
+ internalType: "struct PoolKey",
3636
+ name: "_key",
3637
+ type: "tuple",
3638
+ },
3639
+ { internalType: "bool", name: "_disable", type: "bool" },
3640
+ ],
3641
+ name: "setDisabledState",
3642
+ outputs: [],
3643
+ stateMutability: "nonpayable",
3644
+ type: "function",
3645
+ },
3646
+ {
3647
+ inputs: [
3648
+ { internalType: "uint256", name: "swapFeeThreshold", type: "uint256" },
3649
+ ],
3650
+ name: "setSwapFeeThreshold",
3651
+ outputs: [],
3652
+ stateMutability: "nonpayable",
3653
+ type: "function",
3654
+ },
3655
+ {
3656
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
3657
+ name: "transferOwnership",
3658
+ outputs: [],
3659
+ stateMutability: "payable",
3660
+ type: "function",
3661
+ },
2994
3662
  ];
2995
3663
 
2996
- class ReadFairLaunch {
3664
+ class ReadBidWall {
2997
3665
  constructor(address, drift$1 = drift.createDrift()) {
2998
3666
  if (!address) {
2999
3667
  throw new Error("Address is required");
3000
3668
  }
3001
3669
  this.contract = drift$1.contract({
3002
- abi: FairLaunchAbi,
3670
+ abi: BidwallAbi,
3003
3671
  address,
3004
3672
  });
3005
3673
  }
3006
- fairLaunchInfo({ poolId }) {
3007
- return this.contract.read("fairLaunchInfo", {
3674
+ position({ poolId }) {
3675
+ return this.contract.read("position", {
3008
3676
  _poolId: poolId,
3009
3677
  });
3010
3678
  }
3011
- async isFairLaunchActive({ poolId }) {
3012
- const { closed, endsAt } = await this.fairLaunchInfo({ poolId });
3013
- if (closed) {
3014
- return false;
3015
- }
3016
- if (new Date().getTime() / 1000 > endsAt) {
3017
- return false;
3018
- }
3019
- return true;
3679
+ poolInfo({ poolId }) {
3680
+ return this.contract.read("poolInfo", {
3681
+ _poolId: poolId,
3682
+ });
3020
3683
  }
3021
3684
  }
3022
3685
 
@@ -3116,7 +3779,6 @@ const FastFlaunchZapAbi = [
3116
3779
 
3117
3780
  class ReadFastFlaunchZap {
3118
3781
  constructor(address, drift$1 = drift.createDrift()) {
3119
- this.drift = drift$1;
3120
3782
  if (!address) {
3121
3783
  throw new Error("Address is required");
3122
3784
  }
@@ -4643,7 +5305,7 @@ function defineChain(chain) {
4643
5305
  };
4644
5306
  }
4645
5307
 
4646
- const version = '2.23.5';
5308
+ const version = '2.23.11';
4647
5309
 
4648
5310
  let errorConfig = {
4649
5311
  getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath
@@ -7388,7 +8050,7 @@ const chainConfig$1 = {
7388
8050
  serializers: serializers$1,
7389
8051
  };
7390
8052
 
7391
- const sourceId$J = 1; // mainnet
8053
+ const sourceId$K = 1; // mainnet
7392
8054
  /*#__PURE__*/ defineChain({
7393
8055
  ...chainConfig$1,
7394
8056
  id: 888888888,
@@ -7409,27 +8071,27 @@ const sourceId$J = 1; // mainnet
7409
8071
  contracts: {
7410
8072
  ...chainConfig$1.contracts,
7411
8073
  l2OutputOracle: {
7412
- [sourceId$J]: {
8074
+ [sourceId$K]: {
7413
8075
  address: '0xB09DC08428C8b4EFB4ff9C0827386CDF34277996',
7414
8076
  },
7415
8077
  },
7416
8078
  portal: {
7417
- [sourceId$J]: {
8079
+ [sourceId$K]: {
7418
8080
  address: '0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68',
7419
8081
  blockCreated: 19070571,
7420
8082
  },
7421
8083
  },
7422
8084
  l1StandardBridge: {
7423
- [sourceId$J]: {
8085
+ [sourceId$K]: {
7424
8086
  address: '0xd5e3eDf5b68135D559D572E26bF863FBC1950033',
7425
8087
  blockCreated: 19070571,
7426
8088
  },
7427
8089
  },
7428
8090
  },
7429
- sourceId: sourceId$J,
8091
+ sourceId: sourceId$K,
7430
8092
  });
7431
8093
 
7432
- const sourceId$I = 11_155_111; // sepolia
8094
+ const sourceId$J = 11_155_111; // sepolia
7433
8095
  /*#__PURE__*/ defineChain({
7434
8096
  ...chainConfig$1,
7435
8097
  id: 28122024,
@@ -7450,27 +8112,27 @@ const sourceId$I = 11_155_111; // sepolia
7450
8112
  contracts: {
7451
8113
  ...chainConfig$1.contracts,
7452
8114
  l2OutputOracle: {
7453
- [sourceId$I]: {
8115
+ [sourceId$J]: {
7454
8116
  address: '0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB',
7455
8117
  },
7456
8118
  },
7457
8119
  portal: {
7458
- [sourceId$I]: {
8120
+ [sourceId$J]: {
7459
8121
  address: '0xfa1d9E26A6aCD7b22115D27572c1221B9803c960',
7460
8122
  blockCreated: 4972908,
7461
8123
  },
7462
8124
  },
7463
8125
  l1StandardBridge: {
7464
- [sourceId$I]: {
8126
+ [sourceId$J]: {
7465
8127
  address: '0xF6Bc0146d3c74D48306e79Ae134A260E418C9335',
7466
8128
  blockCreated: 4972908,
7467
8129
  },
7468
8130
  },
7469
8131
  },
7470
- sourceId: sourceId$I,
8132
+ sourceId: sourceId$J,
7471
8133
  });
7472
8134
 
7473
- const sourceId$H = 1; // mainnet
8135
+ const sourceId$I = 1; // mainnet
7474
8136
  const base = /*#__PURE__*/ defineChain({
7475
8137
  ...chainConfig$1,
7476
8138
  id: 8453,
@@ -7491,12 +8153,12 @@ const base = /*#__PURE__*/ defineChain({
7491
8153
  contracts: {
7492
8154
  ...chainConfig$1.contracts,
7493
8155
  disputeGameFactory: {
7494
- [sourceId$H]: {
8156
+ [sourceId$I]: {
7495
8157
  address: '0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e',
7496
8158
  },
7497
8159
  },
7498
8160
  l2OutputOracle: {
7499
- [sourceId$H]: {
8161
+ [sourceId$I]: {
7500
8162
  address: '0x56315b90c40730925ec5485cf004d835058518A0',
7501
8163
  },
7502
8164
  },
@@ -7505,22 +8167,22 @@ const base = /*#__PURE__*/ defineChain({
7505
8167
  blockCreated: 5022,
7506
8168
  },
7507
8169
  portal: {
7508
- [sourceId$H]: {
8170
+ [sourceId$I]: {
7509
8171
  address: '0x49048044D57e1C92A77f79988d21Fa8fAF74E97e',
7510
8172
  blockCreated: 17482143,
7511
8173
  },
7512
8174
  },
7513
8175
  l1StandardBridge: {
7514
- [sourceId$H]: {
8176
+ [sourceId$I]: {
7515
8177
  address: '0x3154Cf16ccdb4C6d922629664174b904d80F2C35',
7516
8178
  blockCreated: 17482143,
7517
8179
  },
7518
8180
  },
7519
8181
  },
7520
- sourceId: sourceId$H,
8182
+ sourceId: sourceId$I,
7521
8183
  });
7522
8184
 
7523
- const sourceId$G = 5; // goerli
8185
+ const sourceId$H = 5; // goerli
7524
8186
  /*#__PURE__*/ defineChain({
7525
8187
  ...chainConfig$1,
7526
8188
  id: 84531,
@@ -7539,7 +8201,7 @@ const sourceId$G = 5; // goerli
7539
8201
  contracts: {
7540
8202
  ...chainConfig$1.contracts,
7541
8203
  l2OutputOracle: {
7542
- [sourceId$G]: {
8204
+ [sourceId$H]: {
7543
8205
  address: '0x2A35891ff30313CcFa6CE88dcf3858bb075A2298',
7544
8206
  },
7545
8207
  },
@@ -7548,21 +8210,21 @@ const sourceId$G = 5; // goerli
7548
8210
  blockCreated: 1376988,
7549
8211
  },
7550
8212
  portal: {
7551
- [sourceId$G]: {
8213
+ [sourceId$H]: {
7552
8214
  address: '0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA',
7553
8215
  },
7554
8216
  },
7555
8217
  l1StandardBridge: {
7556
- [sourceId$G]: {
8218
+ [sourceId$H]: {
7557
8219
  address: '0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a',
7558
8220
  },
7559
8221
  },
7560
8222
  },
7561
8223
  testnet: true,
7562
- sourceId: sourceId$G,
8224
+ sourceId: sourceId$H,
7563
8225
  });
7564
8226
 
7565
- const sourceId$F = 11_155_111; // sepolia
8227
+ const sourceId$G = 11_155_111; // sepolia
7566
8228
  const baseSepolia = /*#__PURE__*/ defineChain({
7567
8229
  ...chainConfig$1,
7568
8230
  id: 84532,
@@ -7584,23 +8246,23 @@ const baseSepolia = /*#__PURE__*/ defineChain({
7584
8246
  contracts: {
7585
8247
  ...chainConfig$1.contracts,
7586
8248
  disputeGameFactory: {
7587
- [sourceId$F]: {
8249
+ [sourceId$G]: {
7588
8250
  address: '0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1',
7589
8251
  },
7590
8252
  },
7591
8253
  l2OutputOracle: {
7592
- [sourceId$F]: {
8254
+ [sourceId$G]: {
7593
8255
  address: '0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254',
7594
8256
  },
7595
8257
  },
7596
8258
  portal: {
7597
- [sourceId$F]: {
8259
+ [sourceId$G]: {
7598
8260
  address: '0x49f53e41452c74589e85ca1677426ba426459e85',
7599
8261
  blockCreated: 4446677,
7600
8262
  },
7601
8263
  },
7602
8264
  l1StandardBridge: {
7603
- [sourceId$F]: {
8265
+ [sourceId$G]: {
7604
8266
  address: '0xfd0Bf71F60660E2f608ed56e1659C450eB113120',
7605
8267
  blockCreated: 4446677,
7606
8268
  },
@@ -7611,7 +8273,7 @@ const baseSepolia = /*#__PURE__*/ defineChain({
7611
8273
  },
7612
8274
  },
7613
8275
  testnet: true,
7614
- sourceId: sourceId$F,
8276
+ sourceId: sourceId$G,
7615
8277
  });
7616
8278
 
7617
8279
  defineChain({
@@ -7632,7 +8294,7 @@ defineChain({
7632
8294
  },
7633
8295
  });
7634
8296
 
7635
- const sourceId$E = 1; // mainnet
8297
+ const sourceId$F = 1; // mainnet
7636
8298
  /*#__PURE__*/ defineChain({
7637
8299
  ...chainConfig$1,
7638
8300
  id: 81457,
@@ -7659,10 +8321,10 @@ const sourceId$E = 1; // mainnet
7659
8321
  blockCreated: 212929,
7660
8322
  },
7661
8323
  },
7662
- sourceId: sourceId$E,
8324
+ sourceId: sourceId$F,
7663
8325
  });
7664
8326
 
7665
- const sourceId$D = 1; // mainnet
8327
+ const sourceId$E = 1; // mainnet
7666
8328
  defineChain({
7667
8329
  ...chainConfig$1,
7668
8330
  id: 60808,
@@ -7691,22 +8353,22 @@ defineChain({
7691
8353
  blockCreated: 23131,
7692
8354
  },
7693
8355
  l2OutputOracle: {
7694
- [sourceId$D]: {
8356
+ [sourceId$E]: {
7695
8357
  address: '0xdDa53E23f8a32640b04D7256e651C1db98dB11C1',
7696
8358
  blockCreated: 4462615,
7697
8359
  },
7698
8360
  },
7699
8361
  portal: {
7700
- [sourceId$D]: {
8362
+ [sourceId$E]: {
7701
8363
  address: '0x8AdeE124447435fE03e3CD24dF3f4cAE32E65a3E',
7702
8364
  blockCreated: 4462615,
7703
8365
  },
7704
8366
  },
7705
8367
  },
7706
- sourceId: sourceId$D,
8368
+ sourceId: sourceId$E,
7707
8369
  });
7708
8370
 
7709
- const sourceId$C = 11_155_111; // sepolia
8371
+ const sourceId$D = 11_155_111; // sepolia
7710
8372
  defineChain({
7711
8373
  ...chainConfig$1,
7712
8374
  id: 808813,
@@ -7735,20 +8397,20 @@ defineChain({
7735
8397
  blockCreated: 35677,
7736
8398
  },
7737
8399
  l2OutputOracle: {
7738
- [sourceId$C]: {
8400
+ [sourceId$D]: {
7739
8401
  address: '0x14D0069452b4AE2b250B395b8adAb771E4267d2f',
7740
8402
  blockCreated: 4462615,
7741
8403
  },
7742
8404
  },
7743
8405
  portal: {
7744
- [sourceId$C]: {
8406
+ [sourceId$D]: {
7745
8407
  address: '0x867B1Aa872b9C8cB5E9F7755feDC45BB24Ad0ae4',
7746
8408
  blockCreated: 4462615,
7747
8409
  },
7748
8410
  },
7749
8411
  },
7750
8412
  testnet: true,
7751
- sourceId: sourceId$C,
8413
+ sourceId: sourceId$D,
7752
8414
  });
7753
8415
 
7754
8416
  /**
@@ -8007,7 +8669,7 @@ const chainConfig = {
8007
8669
  fees,
8008
8670
  };
8009
8671
 
8010
- const sourceId$B = 17000; // holsky
8672
+ const sourceId$C = 17000; // holsky
8011
8673
  // source https://storage.googleapis.com/cel2-rollup-files/alfajores/deployment-l1.json
8012
8674
  /*#__PURE__*/ defineChain({
8013
8675
  ...chainConfig,
@@ -8037,25 +8699,25 @@ const sourceId$B = 17000; // holsky
8037
8699
  blockCreated: 14569001,
8038
8700
  },
8039
8701
  portal: {
8040
- [sourceId$B]: {
8702
+ [sourceId$C]: {
8041
8703
  address: '0x82527353927d8D069b3B452904c942dA149BA381',
8042
8704
  blockCreated: 2411324,
8043
8705
  },
8044
8706
  },
8045
8707
  disputeGameFactory: {
8046
- [sourceId$B]: {
8708
+ [sourceId$C]: {
8047
8709
  address: '0xE28AAdcd9883746c0e5068F58f9ea06027b214cb',
8048
8710
  blockCreated: 2411324,
8049
8711
  },
8050
8712
  },
8051
8713
  l2OutputOracle: {
8052
- [sourceId$B]: {
8714
+ [sourceId$C]: {
8053
8715
  address: '0x4a2635e9e4f6e45817b1D402ac4904c1d1752438',
8054
8716
  blockCreated: 2411324,
8055
8717
  },
8056
8718
  },
8057
8719
  l1StandardBridge: {
8058
- [sourceId$B]: {
8720
+ [sourceId$C]: {
8059
8721
  address: '0xD1B0E0581973c9eB7f886967A606b9441A897037',
8060
8722
  blockCreated: 2411324,
8061
8723
  },
@@ -8178,7 +8840,7 @@ defineChain({
8178
8840
  testnet: true,
8179
8841
  });
8180
8842
 
8181
- const sourceId$A = 1; // mainnet
8843
+ const sourceId$B = 1; // mainnet
8182
8844
  /*#__PURE__*/ defineChain({
8183
8845
  id: 478,
8184
8846
  name: 'Form Network',
@@ -8202,27 +8864,27 @@ const sourceId$A = 1; // mainnet
8202
8864
  contracts: {
8203
8865
  ...chainConfig$1.contracts,
8204
8866
  addressManager: {
8205
- [sourceId$A]: {
8867
+ [sourceId$B]: {
8206
8868
  address: '0x15c249E46A2F924C2dB3A1560CF86729bAD1f07B',
8207
8869
  },
8208
8870
  },
8209
8871
  l1CrossDomainMessenger: {
8210
- [sourceId$A]: {
8872
+ [sourceId$B]: {
8211
8873
  address: '0xF333158DCCad1dF6C3F0a3aEe8BC31fA94d9eD5c',
8212
8874
  },
8213
8875
  },
8214
8876
  l2OutputOracle: {
8215
- [sourceId$A]: {
8877
+ [sourceId$B]: {
8216
8878
  address: '0x4ccAAF69F41c5810cA875183648B577CaCf1F67E',
8217
8879
  },
8218
8880
  },
8219
8881
  portal: {
8220
- [sourceId$A]: {
8882
+ [sourceId$B]: {
8221
8883
  address: '0x4E259Ee5F4136408908160dD32295A5031Fa426F',
8222
8884
  },
8223
8885
  },
8224
8886
  l1StandardBridge: {
8225
- [sourceId$A]: {
8887
+ [sourceId$B]: {
8226
8888
  address: '0xdc20aA63D3DE59574E065957190D8f24e0F7B8Ba',
8227
8889
  },
8228
8890
  },
@@ -8230,10 +8892,10 @@ const sourceId$A = 1; // mainnet
8230
8892
  address: '0xcA11bde05977b3631167028862bE2a173976CA11',
8231
8893
  },
8232
8894
  },
8233
- sourceId: sourceId$A,
8895
+ sourceId: sourceId$B,
8234
8896
  });
8235
8897
 
8236
- const sourceId$z = 11_155_111; // sepolia
8898
+ const sourceId$A = 11_155_111; // sepolia
8237
8899
  /*#__PURE__*/ defineChain({
8238
8900
  id: 132_902,
8239
8901
  name: 'Form Testnet',
@@ -8257,27 +8919,27 @@ const sourceId$z = 11_155_111; // sepolia
8257
8919
  contracts: {
8258
8920
  ...chainConfig$1.contracts,
8259
8921
  addressManager: {
8260
- [sourceId$z]: {
8922
+ [sourceId$A]: {
8261
8923
  address: '0xd5C38fa934f7fd7477D4800F4f38a1c5BFdF1373',
8262
8924
  },
8263
8925
  },
8264
8926
  l1CrossDomainMessenger: {
8265
- [sourceId$z]: {
8927
+ [sourceId$A]: {
8266
8928
  address: '0x37A68565c4BE9700b3E3Ec60cC4416cAC3052FAa',
8267
8929
  },
8268
8930
  },
8269
8931
  l2OutputOracle: {
8270
- [sourceId$z]: {
8932
+ [sourceId$A]: {
8271
8933
  address: '0x9eA2239E65a59EC9C7F1ED4C116dD58Da71Fc1e2',
8272
8934
  },
8273
8935
  },
8274
8936
  portal: {
8275
- [sourceId$z]: {
8937
+ [sourceId$A]: {
8276
8938
  address: '0x60377e3cE15dF4CCA24c4beF076b60314240b032',
8277
8939
  },
8278
8940
  },
8279
8941
  l1StandardBridge: {
8280
- [sourceId$z]: {
8942
+ [sourceId$A]: {
8281
8943
  address: '0xD4531f633942b2725896F47cD2aFd260b44Ab1F7',
8282
8944
  },
8283
8945
  },
@@ -8286,10 +8948,10 @@ const sourceId$z = 11_155_111; // sepolia
8286
8948
  },
8287
8949
  },
8288
8950
  testnet: true,
8289
- sourceId: sourceId$z,
8951
+ sourceId: sourceId$A,
8290
8952
  });
8291
8953
 
8292
- const sourceId$y = 1; // mainnet
8954
+ const sourceId$z = 1; // mainnet
8293
8955
  /*#__PURE__*/ defineChain({
8294
8956
  ...chainConfig$1,
8295
8957
  id: 252,
@@ -8310,7 +8972,7 @@ const sourceId$y = 1; // mainnet
8310
8972
  contracts: {
8311
8973
  ...chainConfig$1.contracts,
8312
8974
  l2OutputOracle: {
8313
- [sourceId$y]: {
8975
+ [sourceId$z]: {
8314
8976
  address: '0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4',
8315
8977
  },
8316
8978
  },
@@ -8318,22 +8980,22 @@ const sourceId$y = 1; // mainnet
8318
8980
  address: '0xca11bde05977b3631167028862be2a173976ca11',
8319
8981
  },
8320
8982
  portal: {
8321
- [sourceId$y]: {
8983
+ [sourceId$z]: {
8322
8984
  address: '0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D',
8323
8985
  blockCreated: 19135323,
8324
8986
  },
8325
8987
  },
8326
8988
  l1StandardBridge: {
8327
- [sourceId$y]: {
8989
+ [sourceId$z]: {
8328
8990
  address: '0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2',
8329
8991
  blockCreated: 19135323,
8330
8992
  },
8331
8993
  },
8332
8994
  },
8333
- sourceId: sourceId$y,
8995
+ sourceId: sourceId$z,
8334
8996
  });
8335
8997
 
8336
- const sourceId$x = 17000; // holesky
8998
+ const sourceId$y = 17000; // holesky
8337
8999
  /*#__PURE__*/ defineChain({
8338
9000
  ...chainConfig$1,
8339
9001
  id: 2522,
@@ -8354,7 +9016,7 @@ const sourceId$x = 17000; // holesky
8354
9016
  contracts: {
8355
9017
  ...chainConfig$1.contracts,
8356
9018
  l2OutputOracle: {
8357
- [sourceId$x]: {
9019
+ [sourceId$y]: {
8358
9020
  address: '0x715EA64DA13F4d0831ece4Ad3E8c1aa013167F32',
8359
9021
  },
8360
9022
  },
@@ -8362,22 +9024,22 @@ const sourceId$x = 17000; // holesky
8362
9024
  address: '0xca11bde05977b3631167028862be2a173976ca11',
8363
9025
  },
8364
9026
  portal: {
8365
- [sourceId$x]: {
9027
+ [sourceId$y]: {
8366
9028
  address: '0xB9c64BfA498d5b9a8398Ed6f46eb76d90dE5505d',
8367
9029
  blockCreated: 318416,
8368
9030
  },
8369
9031
  },
8370
9032
  l1StandardBridge: {
8371
- [sourceId$x]: {
9033
+ [sourceId$y]: {
8372
9034
  address: '0x0BaafC217162f64930909aD9f2B27125121d6332',
8373
9035
  blockCreated: 318416,
8374
9036
  },
8375
9037
  },
8376
9038
  },
8377
- sourceId: sourceId$x,
9039
+ sourceId: sourceId$y,
8378
9040
  });
8379
9041
 
8380
- const sourceId$w = 1; // mainnet
9042
+ const sourceId$x = 1; // mainnet
8381
9043
  /*#__PURE__*/ defineChain({
8382
9044
  ...chainConfig$1,
8383
9045
  id: 33979,
@@ -8397,10 +9059,10 @@ const sourceId$w = 1; // mainnet
8397
9059
  contracts: {
8398
9060
  ...chainConfig$1.contracts,
8399
9061
  },
8400
- sourceId: sourceId$w,
9062
+ sourceId: sourceId$x,
8401
9063
  });
8402
9064
 
8403
- const sourceId$v = 11_155_111; // sepolia
9065
+ const sourceId$w = 11_155_111; // sepolia
8404
9066
  defineChain({
8405
9067
  ...chainConfig$1,
8406
9068
  id: 3397901,
@@ -8426,16 +9088,16 @@ defineChain({
8426
9088
  blockCreated: 1620204,
8427
9089
  },
8428
9090
  },
8429
- sourceId: sourceId$v,
9091
+ sourceId: sourceId$w,
8430
9092
  });
8431
9093
 
8432
- const sourceId$u = 17000; // Holesky testnet
9094
+ const sourceId$v = 17000; // Holesky testnet
8433
9095
  defineChain({
8434
9096
  ...chainConfig$1,
8435
9097
  name: 'Garnet Testnet',
8436
9098
  testnet: true,
8437
9099
  id: 17069,
8438
- sourceId: sourceId$u,
9100
+ sourceId: sourceId$v,
8439
9101
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
8440
9102
  rpcUrls: {
8441
9103
  default: {
@@ -8455,19 +9117,19 @@ defineChain({
8455
9117
  address: '0xca11bde05977b3631167028862be2a173976ca11',
8456
9118
  },
8457
9119
  portal: {
8458
- [sourceId$u]: {
9120
+ [sourceId$v]: {
8459
9121
  address: '0x57ee40586fbE286AfC75E67cb69511A6D9aF5909',
8460
9122
  blockCreated: 1274684,
8461
9123
  },
8462
9124
  },
8463
9125
  l2OutputOracle: {
8464
- [sourceId$u]: {
9126
+ [sourceId$v]: {
8465
9127
  address: '0xCb8E7AC561b8EF04F2a15865e9fbc0766FEF569B',
8466
9128
  blockCreated: 1274684,
8467
9129
  },
8468
9130
  },
8469
9131
  l1StandardBridge: {
8470
- [sourceId$u]: {
9132
+ [sourceId$v]: {
8471
9133
  address: '0x09bcDd311FE398F80a78BE37E489f5D440DB95DE',
8472
9134
  blockCreated: 1274684,
8473
9135
  },
@@ -8475,7 +9137,7 @@ defineChain({
8475
9137
  },
8476
9138
  });
8477
9139
 
8478
- const sourceId$t = 1; // mainnet
9140
+ const sourceId$u = 1; // mainnet
8479
9141
  /*#__PURE__*/ defineChain({
8480
9142
  ...chainConfig$1,
8481
9143
  id: 57073,
@@ -8503,26 +9165,26 @@ const sourceId$t = 1; // mainnet
8503
9165
  contracts: {
8504
9166
  ...chainConfig$1.contracts,
8505
9167
  disputeGameFactory: {
8506
- [sourceId$t]: {
9168
+ [sourceId$u]: {
8507
9169
  address: '0x10d7b35078d3baabb96dd45a9143b94be65b12cd',
8508
9170
  },
8509
9171
  },
8510
9172
  portal: {
8511
- [sourceId$t]: {
9173
+ [sourceId$u]: {
8512
9174
  address: '0x5d66c1782664115999c47c9fa5cd031f495d3e4f',
8513
9175
  },
8514
9176
  },
8515
9177
  l1StandardBridge: {
8516
- [sourceId$t]: {
9178
+ [sourceId$u]: {
8517
9179
  address: '0x88ff1e5b602916615391f55854588efcbb7663f0',
8518
9180
  },
8519
9181
  },
8520
9182
  },
8521
9183
  testnet: false,
8522
- sourceId: sourceId$t,
9184
+ sourceId: sourceId$u,
8523
9185
  });
8524
9186
 
8525
- const sourceId$s = 11_155_111; // sepolia
9187
+ const sourceId$t = 11_155_111; // sepolia
8526
9188
  /*#__PURE__*/ defineChain({
8527
9189
  ...chainConfig$1,
8528
9190
  id: 763373,
@@ -8543,23 +9205,23 @@ const sourceId$s = 11_155_111; // sepolia
8543
9205
  contracts: {
8544
9206
  ...chainConfig$1.contracts,
8545
9207
  disputeGameFactory: {
8546
- [sourceId$s]: {
9208
+ [sourceId$t]: {
8547
9209
  address: '0x860e626c700af381133d9f4af31412a2d1db3d5d',
8548
9210
  },
8549
9211
  },
8550
9212
  portal: {
8551
- [sourceId$s]: {
9213
+ [sourceId$t]: {
8552
9214
  address: '0x5c1d29c6c9c8b0800692acc95d700bcb4966a1d7',
8553
9215
  },
8554
9216
  },
8555
9217
  l1StandardBridge: {
8556
- [sourceId$s]: {
9218
+ [sourceId$t]: {
8557
9219
  address: '0x33f60714bbd74d62b66d79213c348614de51901c',
8558
9220
  },
8559
9221
  },
8560
9222
  },
8561
9223
  testnet: true,
8562
- sourceId: sourceId$s,
9224
+ sourceId: sourceId$t,
8563
9225
  });
8564
9226
 
8565
9227
  defineChain({
@@ -8588,7 +9250,7 @@ defineChain({
8588
9250
  testnet: true,
8589
9251
  });
8590
9252
 
8591
- const sourceId$r = 1; // mainnet
9253
+ const sourceId$s = 1; // mainnet
8592
9254
  /*#__PURE__*/ defineChain({
8593
9255
  ...chainConfig$1,
8594
9256
  id: 1135,
@@ -8617,25 +9279,25 @@ const sourceId$r = 1; // mainnet
8617
9279
  address: '0xA9d71E1dd7ca26F26e656E66d6AA81ed7f745bf0',
8618
9280
  },
8619
9281
  l2OutputOracle: {
8620
- [sourceId$r]: {
9282
+ [sourceId$s]: {
8621
9283
  address: '0x113cB99283AF242Da0A0C54347667edF531Aa7d6',
8622
9284
  },
8623
9285
  },
8624
9286
  portal: {
8625
- [sourceId$r]: {
9287
+ [sourceId$s]: {
8626
9288
  address: '0x26dB93F8b8b4f7016240af62F7730979d353f9A7',
8627
9289
  },
8628
9290
  },
8629
9291
  l1StandardBridge: {
8630
- [sourceId$r]: {
9292
+ [sourceId$s]: {
8631
9293
  address: '0x2658723Bf70c7667De6B25F99fcce13A16D25d08',
8632
9294
  },
8633
9295
  },
8634
9296
  },
8635
- sourceId: sourceId$r,
9297
+ sourceId: sourceId$s,
8636
9298
  });
8637
9299
 
8638
- const sourceId$q = 11_155_111; // sepolia
9300
+ const sourceId$r = 11_155_111; // sepolia
8639
9301
  /*#__PURE__*/ defineChain({
8640
9302
  ...chainConfig$1,
8641
9303
  id: 4202,
@@ -8657,7 +9319,7 @@ const sourceId$q = 11_155_111; // sepolia
8657
9319
  contracts: {
8658
9320
  ...chainConfig$1.contracts,
8659
9321
  l2OutputOracle: {
8660
- [sourceId$q]: {
9322
+ [sourceId$r]: {
8661
9323
  address: '0xA0E35F56C318DE1bD5D9ca6A94Fe7e37C5663348',
8662
9324
  },
8663
9325
  },
@@ -8665,21 +9327,21 @@ const sourceId$q = 11_155_111; // sepolia
8665
9327
  address: '0xca11bde05977b3631167028862be2a173976ca11',
8666
9328
  },
8667
9329
  portal: {
8668
- [sourceId$q]: {
9330
+ [sourceId$r]: {
8669
9331
  address: '0xe3d90F21490686Ec7eF37BE788E02dfC12787264',
8670
9332
  },
8671
9333
  },
8672
9334
  l1StandardBridge: {
8673
- [sourceId$q]: {
9335
+ [sourceId$r]: {
8674
9336
  address: '0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5',
8675
9337
  },
8676
9338
  },
8677
9339
  },
8678
9340
  testnet: true,
8679
- sourceId: sourceId$q,
9341
+ sourceId: sourceId$r,
8680
9342
  });
8681
9343
 
8682
- const sourceId$p = 1; // mainnet
9344
+ const sourceId$q = 1; // mainnet
8683
9345
  /*#__PURE__*/ defineChain({
8684
9346
  ...chainConfig$1,
8685
9347
  id: 1750,
@@ -8705,7 +9367,7 @@ const sourceId$p = 1; // mainnet
8705
9367
  contracts: {
8706
9368
  ...chainConfig$1.contracts,
8707
9369
  l2OutputOracle: {
8708
- [sourceId$p]: {
9370
+ [sourceId$q]: {
8709
9371
  address: '0x3B1F7aDa0Fcc26B13515af752Dd07fB1CAc11426',
8710
9372
  },
8711
9373
  },
@@ -8714,20 +9376,20 @@ const sourceId$p = 1; // mainnet
8714
9376
  blockCreated: 0,
8715
9377
  },
8716
9378
  portal: {
8717
- [sourceId$p]: {
9379
+ [sourceId$q]: {
8718
9380
  address: '0x3F37aBdE2C6b5B2ed6F8045787Df1ED1E3753956',
8719
9381
  },
8720
9382
  },
8721
9383
  l1StandardBridge: {
8722
- [sourceId$p]: {
9384
+ [sourceId$q]: {
8723
9385
  address: '0x6d0f65D59b55B0FEC5d2d15365154DcADC140BF3',
8724
9386
  },
8725
9387
  },
8726
9388
  },
8727
- sourceId: sourceId$p,
9389
+ sourceId: sourceId$q,
8728
9390
  });
8729
9391
 
8730
- const sourceId$o = 1; // mainnet
9392
+ const sourceId$p = 1; // mainnet
8731
9393
  /*#__PURE__*/ defineChain({
8732
9394
  ...chainConfig$1,
8733
9395
  id: 34443,
@@ -8751,25 +9413,25 @@ const sourceId$o = 1; // mainnet
8751
9413
  blockCreated: 2465882,
8752
9414
  },
8753
9415
  l2OutputOracle: {
8754
- [sourceId$o]: {
9416
+ [sourceId$p]: {
8755
9417
  address: '0x4317ba146D4933D889518a3e5E11Fe7a53199b04',
8756
9418
  },
8757
9419
  },
8758
9420
  portal: {
8759
- [sourceId$o]: {
9421
+ [sourceId$p]: {
8760
9422
  address: '0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07',
8761
9423
  },
8762
9424
  },
8763
9425
  l1StandardBridge: {
8764
- [sourceId$o]: {
9426
+ [sourceId$p]: {
8765
9427
  address: '0x735aDBbE72226BD52e818E7181953f42E3b0FF21',
8766
9428
  },
8767
9429
  },
8768
9430
  },
8769
- sourceId: sourceId$o,
9431
+ sourceId: sourceId$p,
8770
9432
  });
8771
9433
 
8772
- const sourceId$n = 11_155_111; // sepolia
9434
+ const sourceId$o = 11_155_111; // sepolia
8773
9435
  /*#__PURE__*/ defineChain({
8774
9436
  ...chainConfig$1,
8775
9437
  id: 919,
@@ -8790,19 +9452,19 @@ const sourceId$n = 11_155_111; // sepolia
8790
9452
  contracts: {
8791
9453
  ...chainConfig$1.contracts,
8792
9454
  l2OutputOracle: {
8793
- [sourceId$n]: {
9455
+ [sourceId$o]: {
8794
9456
  address: '0x2634BD65ba27AB63811c74A63118ACb312701Bfa',
8795
9457
  blockCreated: 3778393,
8796
9458
  },
8797
9459
  },
8798
9460
  portal: {
8799
- [sourceId$n]: {
9461
+ [sourceId$o]: {
8800
9462
  address: '0x320e1580effF37E008F1C92700d1eBa47c1B23fD',
8801
9463
  blockCreated: 3778395,
8802
9464
  },
8803
9465
  },
8804
9466
  l1StandardBridge: {
8805
- [sourceId$n]: {
9467
+ [sourceId$o]: {
8806
9468
  address: '0xbC5C679879B2965296756CD959C3C739769995E2',
8807
9469
  blockCreated: 3778392,
8808
9470
  },
@@ -8813,10 +9475,10 @@ const sourceId$n = 11_155_111; // sepolia
8813
9475
  },
8814
9476
  },
8815
9477
  testnet: true,
8816
- sourceId: sourceId$n,
9478
+ sourceId: sourceId$o,
8817
9479
  });
8818
9480
 
8819
- const sourceId$m = 56; // bsc mainnet
9481
+ const sourceId$n = 56; // bsc mainnet
8820
9482
  /*#__PURE__*/ defineChain({
8821
9483
  id: 204,
8822
9484
  name: 'opBNB',
@@ -8842,25 +9504,25 @@ const sourceId$m = 56; // bsc mainnet
8842
9504
  blockCreated: 512881,
8843
9505
  },
8844
9506
  l2OutputOracle: {
8845
- [sourceId$m]: {
9507
+ [sourceId$n]: {
8846
9508
  address: '0x153CAB79f4767E2ff862C94aa49573294B13D169',
8847
9509
  },
8848
9510
  },
8849
9511
  portal: {
8850
- [sourceId$m]: {
9512
+ [sourceId$n]: {
8851
9513
  address: '0x1876EA7702C0ad0C6A2ae6036DE7733edfBca519',
8852
9514
  },
8853
9515
  },
8854
9516
  l1StandardBridge: {
8855
- [sourceId$m]: {
9517
+ [sourceId$n]: {
8856
9518
  address: '0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea',
8857
9519
  },
8858
9520
  },
8859
9521
  },
8860
- sourceId: sourceId$m,
9522
+ sourceId: sourceId$n,
8861
9523
  });
8862
9524
 
8863
- const sourceId$l = 97; // bsc testnet
9525
+ const sourceId$m = 97; // bsc testnet
8864
9526
  /*#__PURE__*/ defineChain({
8865
9527
  id: 5611,
8866
9528
  name: 'opBNB Testnet',
@@ -8885,26 +9547,26 @@ const sourceId$l = 97; // bsc testnet
8885
9547
  blockCreated: 3705108,
8886
9548
  },
8887
9549
  l2OutputOracle: {
8888
- [sourceId$l]: {
9550
+ [sourceId$m]: {
8889
9551
  address: '0xFf2394Bb843012562f4349C6632a0EcB92fC8810',
8890
9552
  },
8891
9553
  },
8892
9554
  portal: {
8893
- [sourceId$l]: {
9555
+ [sourceId$m]: {
8894
9556
  address: '0x4386C8ABf2009aC0c263462Da568DD9d46e52a31',
8895
9557
  },
8896
9558
  },
8897
9559
  l1StandardBridge: {
8898
- [sourceId$l]: {
9560
+ [sourceId$m]: {
8899
9561
  address: '0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840',
8900
9562
  },
8901
9563
  },
8902
9564
  },
8903
9565
  testnet: true,
8904
- sourceId: sourceId$l,
9566
+ sourceId: sourceId$m,
8905
9567
  });
8906
9568
 
8907
- const sourceId$k = 1; // mainnet
9569
+ const sourceId$l = 1; // mainnet
8908
9570
  /*#__PURE__*/ defineChain({
8909
9571
  ...chainConfig$1,
8910
9572
  id: 10,
@@ -8925,12 +9587,12 @@ const sourceId$k = 1; // mainnet
8925
9587
  contracts: {
8926
9588
  ...chainConfig$1.contracts,
8927
9589
  disputeGameFactory: {
8928
- [sourceId$k]: {
9590
+ [sourceId$l]: {
8929
9591
  address: '0xe5965Ab5962eDc7477C8520243A95517CD252fA9',
8930
9592
  },
8931
9593
  },
8932
9594
  l2OutputOracle: {
8933
- [sourceId$k]: {
9595
+ [sourceId$l]: {
8934
9596
  address: '0xdfe97868233d1aa22e815a266982f2cf17685a27',
8935
9597
  },
8936
9598
  },
@@ -8939,20 +9601,20 @@ const sourceId$k = 1; // mainnet
8939
9601
  blockCreated: 4286263,
8940
9602
  },
8941
9603
  portal: {
8942
- [sourceId$k]: {
9604
+ [sourceId$l]: {
8943
9605
  address: '0xbEb5Fc579115071764c7423A4f12eDde41f106Ed',
8944
9606
  },
8945
9607
  },
8946
9608
  l1StandardBridge: {
8947
- [sourceId$k]: {
9609
+ [sourceId$l]: {
8948
9610
  address: '0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1',
8949
9611
  },
8950
9612
  },
8951
9613
  },
8952
- sourceId: sourceId$k,
9614
+ sourceId: sourceId$l,
8953
9615
  });
8954
9616
 
8955
- const sourceId$j = 5; // goerli
9617
+ const sourceId$k = 5; // goerli
8956
9618
  /*#__PURE__*/ defineChain({
8957
9619
  ...chainConfig$1,
8958
9620
  id: 420,
@@ -8973,7 +9635,7 @@ const sourceId$j = 5; // goerli
8973
9635
  contracts: {
8974
9636
  ...chainConfig$1.contracts,
8975
9637
  l2OutputOracle: {
8976
- [sourceId$j]: {
9638
+ [sourceId$k]: {
8977
9639
  address: '0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0',
8978
9640
  },
8979
9641
  },
@@ -8982,21 +9644,21 @@ const sourceId$j = 5; // goerli
8982
9644
  blockCreated: 49461,
8983
9645
  },
8984
9646
  portal: {
8985
- [sourceId$j]: {
9647
+ [sourceId$k]: {
8986
9648
  address: '0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383',
8987
9649
  },
8988
9650
  },
8989
9651
  l1StandardBridge: {
8990
- [sourceId$j]: {
9652
+ [sourceId$k]: {
8991
9653
  address: '0x636Af16bf2f682dD3109e60102b8E1A089FedAa8',
8992
9654
  },
8993
9655
  },
8994
9656
  },
8995
9657
  testnet: true,
8996
- sourceId: sourceId$j,
9658
+ sourceId: sourceId$k,
8997
9659
  });
8998
9660
 
8999
- const sourceId$i = 11_155_111; // sepolia
9661
+ const sourceId$j = 11_155_111; // sepolia
9000
9662
  /*#__PURE__*/ defineChain({
9001
9663
  ...chainConfig$1,
9002
9664
  id: 11155420,
@@ -9017,12 +9679,12 @@ const sourceId$i = 11_155_111; // sepolia
9017
9679
  contracts: {
9018
9680
  ...chainConfig$1.contracts,
9019
9681
  disputeGameFactory: {
9020
- [sourceId$i]: {
9682
+ [sourceId$j]: {
9021
9683
  address: '0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1',
9022
9684
  },
9023
9685
  },
9024
9686
  l2OutputOracle: {
9025
- [sourceId$i]: {
9687
+ [sourceId$j]: {
9026
9688
  address: '0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F',
9027
9689
  },
9028
9690
  },
@@ -9031,18 +9693,48 @@ const sourceId$i = 11_155_111; // sepolia
9031
9693
  blockCreated: 1620204,
9032
9694
  },
9033
9695
  portal: {
9034
- [sourceId$i]: {
9696
+ [sourceId$j]: {
9035
9697
  address: '0x16Fc5058F25648194471939df75CF27A2fdC48BC',
9036
9698
  },
9037
9699
  },
9038
9700
  l1StandardBridge: {
9039
- [sourceId$i]: {
9701
+ [sourceId$j]: {
9040
9702
  address: '0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1',
9041
9703
  },
9042
9704
  },
9043
9705
  },
9044
9706
  testnet: true,
9707
+ sourceId: sourceId$j,
9708
+ });
9709
+
9710
+ const sourceId$i = 11155111; // Sepolia testnet
9711
+ defineChain({
9712
+ ...chainConfig$1,
9713
+ name: 'Pyrope Testnet',
9714
+ testnet: true,
9715
+ id: 695569,
9045
9716
  sourceId: sourceId$i,
9717
+ nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
9718
+ rpcUrls: {
9719
+ default: {
9720
+ http: ['https://rpc.pyropechain.com'],
9721
+ webSocket: ['wss://rpc.pyropechain.com'],
9722
+ },
9723
+ },
9724
+ blockExplorers: {
9725
+ default: {
9726
+ name: 'Blockscout',
9727
+ url: 'https://pyrope.blockscout.com',
9728
+ },
9729
+ },
9730
+ contracts: {
9731
+ ...chainConfig$1.contracts,
9732
+ l1StandardBridge: {
9733
+ [sourceId$i]: {
9734
+ address: '0xC24932c31D9621aE9e792576152B7ef010cFC2F8',
9735
+ },
9736
+ },
9737
+ },
9046
9738
  });
9047
9739
 
9048
9740
  const sourceId$h = 1; // Ethereum mainnet
@@ -9930,6 +10622,10 @@ const FlaunchAddress = {
9930
10622
  [base.id]: "0xCc7A4A00072ccbeEEbd999edc812C0ce498Fb63B",
9931
10623
  [baseSepolia.id]: "0x7D375C9133721083DF7b7e5Cb0Ed8Fc78862dfe3",
9932
10624
  };
10625
+ const BidWallAddress = {
10626
+ [base.id]: "0x66681f10BA90496241A25e33380004f30Dfd8aa8",
10627
+ [baseSepolia.id]: "0xa2107050ACEf4809c88Ab744F8e667605db5ACDB",
10628
+ };
9933
10629
  const FastFlaunchZapAddress = {
9934
10630
  [base.id]: viem.zeroAddress, // FIXME: update with real address when deployed
9935
10631
  [baseSepolia.id]: "0x251e97446a7019E5DA4860d4CF47291321C693D0",
@@ -9946,10 +10642,30 @@ const QuoterAddress = {
9946
10642
  [base.id]: "0x0d5e0f971ed27fbff6c2837bf31316121532048d",
9947
10643
  [baseSepolia.id]: "0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba",
9948
10644
  };
10645
+ const StateViewAddress = {
10646
+ [base.id]: "0xA3c0c9b65baD0b08107Aa264b0f3dB444b867A71",
10647
+ [baseSepolia.id]: "0x571291b572ed32ce6751a2Cb2486EbEe8DEfB9B4",
10648
+ };
9949
10649
  const Permit2Address = {
9950
10650
  [base.id]: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
9951
10651
  [baseSepolia.id]: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
9952
10652
  };
10653
+ const USDCETHPoolKeys = {
10654
+ [base.id]: {
10655
+ currency0: viem.zeroAddress,
10656
+ currency1: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
10657
+ fee: 500,
10658
+ tickSpacing: 10,
10659
+ hooks: viem.zeroAddress,
10660
+ },
10661
+ [baseSepolia.id]: {
10662
+ currency0: viem.zeroAddress,
10663
+ currency1: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
10664
+ fee: 0,
10665
+ tickSpacing: 30,
10666
+ hooks: viem.zeroAddress,
10667
+ },
10668
+ };
9953
10669
 
9954
10670
  class ReadQuoter {
9955
10671
  constructor(chainId, address, drift$1 = drift.createDrift()) {
@@ -10037,8 +10753,33 @@ class ReadQuoter {
10037
10753
  });
10038
10754
  return res.amountIn;
10039
10755
  }
10756
+ async getETHUSDCPrice() {
10757
+ const amountIn = viem.parseEther("1");
10758
+ const res = await this.contract.simulateWrite("quoteExactInput", {
10759
+ params: {
10760
+ exactAmount: amountIn,
10761
+ exactCurrency: viem.zeroAddress,
10762
+ path: [
10763
+ {
10764
+ fee: USDCETHPoolKeys[this.chainId].fee,
10765
+ tickSpacing: USDCETHPoolKeys[this.chainId].tickSpacing,
10766
+ hooks: USDCETHPoolKeys[this.chainId].hooks,
10767
+ hookData: "0x",
10768
+ intermediateCurrency: USDCETHPoolKeys[this.chainId].currency1,
10769
+ },
10770
+ ],
10771
+ },
10772
+ });
10773
+ return Number(Number(viem.formatUnits(res.amountOut, 6)).toFixed(2));
10774
+ }
10040
10775
  }
10041
10776
 
10777
+ // our min/max tick range that is valid for the tick spacing (60)
10778
+ const TickFinder = {
10779
+ MIN_TICK: -887220,
10780
+ MAX_TICK: 887220,
10781
+ };
10782
+ const TICK_SPACING = 60;
10042
10783
  const getPoolId = (poolKey) => {
10043
10784
  // Pack the data in the same order as Solidity struct
10044
10785
  const packed = viem.concat([
@@ -11224,12 +11965,14 @@ class ReadPermit2 {
11224
11965
 
11225
11966
  class ReadFlaunchSDK {
11226
11967
  constructor(chainId, drift$1 = drift.createDrift()) {
11227
- this.TICK_SPACING = 60;
11968
+ this.TICK_SPACING = TICK_SPACING;
11228
11969
  this.chainId = chainId;
11229
11970
  this.drift = drift$1;
11230
11971
  this.readPositionManager = new ReadFlaunchPositionManager(FlaunchPositionManagerAddress[this.chainId], drift$1);
11231
11972
  this.readPoolManager = new ReadPoolManager(PoolManagerAddress[this.chainId], drift$1);
11973
+ this.readStateView = new ReadStateView(StateViewAddress[this.chainId], drift$1);
11232
11974
  this.readFairLaunch = new ReadFairLaunch(FairLaunchAddress[this.chainId], drift$1);
11975
+ this.readBidWall = new ReadBidWall(BidWallAddress[this.chainId], drift$1);
11233
11976
  this.readFlaunch = new ReadFlaunch(FlaunchAddress[this.chainId], drift$1);
11234
11977
  this.readQuoter = new ReadQuoter(this.chainId, QuoterAddress[this.chainId], drift$1);
11235
11978
  this.readPermit2 = new ReadPermit2(Permit2Address[this.chainId], drift$1);
@@ -11283,11 +12026,11 @@ class ReadFlaunchSDK {
11283
12026
  return poll();
11284
12027
  }
11285
12028
  positionInfo(params) {
11286
- return this.readPoolManager.positionInfo(params);
12029
+ return this.readStateView.positionInfo(params);
11287
12030
  }
11288
12031
  async currentTick(coinAddress) {
11289
12032
  const poolId = this.poolId(coinAddress);
11290
- const poolState = await this.readPoolManager.poolSlot0({ poolId });
12033
+ const poolState = await this.readStateView.poolSlot0({ poolId });
11291
12034
  return poolState.tick;
11292
12035
  }
11293
12036
  async coinPriceInETH(coinAddress) {
@@ -11303,6 +12046,15 @@ class ReadFlaunchSDK {
11303
12046
  }
11304
12047
  return ethPerCoin.toFixed(18);
11305
12048
  }
12049
+ // optionally pass in a drift instance to get the price from Base Mainnet
12050
+ async getETHUSDCPrice(drift) {
12051
+ if (drift) {
12052
+ const chainId = await drift.getChainId();
12053
+ const quoter = new ReadQuoter(chainId, QuoterAddress[chainId], drift);
12054
+ return quoter.getETHUSDCPrice();
12055
+ }
12056
+ return this.readQuoter.getETHUSDCPrice();
12057
+ }
11306
12058
  async fairLaunchInfo(coinAddress) {
11307
12059
  const poolId = this.poolId(coinAddress);
11308
12060
  return this.readFairLaunch.fairLaunchInfo({ poolId });
@@ -11342,7 +12094,48 @@ class ReadFlaunchSDK {
11342
12094
  });
11343
12095
  tickLower = tickUpper - this.TICK_SPACING;
11344
12096
  }
11345
- const { liquidity } = await this.readPoolManager.positionInfo({
12097
+ const { liquidity } = await this.readStateView.positionInfo({
12098
+ poolId,
12099
+ owner: FairLaunchAddress[this.chainId],
12100
+ tickLower,
12101
+ tickUpper,
12102
+ salt: "",
12103
+ });
12104
+ const { amount0, amount1 } = calculateUnderlyingTokenBalances(liquidity, tickLower, tickUpper, currentTick);
12105
+ const [flETHAmount, coinAmount] = isFLETHZero
12106
+ ? [amount0, amount1]
12107
+ : [amount1, amount0];
12108
+ return {
12109
+ flETHAmount,
12110
+ coinAmount,
12111
+ tickLower,
12112
+ tickUpper,
12113
+ };
12114
+ }
12115
+ async fairLaunchCoinOnlyPosition(coinAddress) {
12116
+ const poolId = this.poolId(coinAddress);
12117
+ const initialTick = await this.initialTick(coinAddress);
12118
+ const currentTick = await this.currentTick(coinAddress);
12119
+ const isFLETHZero = this.flETHIsCurrencyZero(coinAddress);
12120
+ let tickLower;
12121
+ let tickUpper;
12122
+ if (isFLETHZero) {
12123
+ tickLower = TickFinder.MIN_TICK;
12124
+ tickUpper = getValidTick({
12125
+ tick: initialTick - 1,
12126
+ roundDown: true,
12127
+ tickSpacing: this.TICK_SPACING,
12128
+ });
12129
+ }
12130
+ else {
12131
+ tickLower = getValidTick({
12132
+ tick: initialTick + 1,
12133
+ roundDown: false,
12134
+ tickSpacing: this.TICK_SPACING,
12135
+ });
12136
+ tickUpper = TickFinder.MAX_TICK;
12137
+ }
12138
+ const { liquidity } = await this.readStateView.positionInfo({
11346
12139
  poolId,
11347
12140
  owner: FairLaunchAddress[this.chainId],
11348
12141
  tickLower,
@@ -11360,6 +12153,24 @@ class ReadFlaunchSDK {
11360
12153
  tickUpper,
11361
12154
  };
11362
12155
  }
12156
+ async bidWallPosition(coinAddress) {
12157
+ const poolId = this.poolId(coinAddress);
12158
+ const isFLETHZero = this.flETHIsCurrencyZero(coinAddress);
12159
+ const { amount0_: amount0, amount1_: amount1, pendingEth_: pendingEth, } = await this.readBidWall.position({ poolId });
12160
+ const { tickLower, tickUpper } = await this.readBidWall.poolInfo({
12161
+ poolId,
12162
+ });
12163
+ const [flETHAmount, coinAmount] = isFLETHZero
12164
+ ? [amount0, amount1]
12165
+ : [amount1, amount0];
12166
+ return {
12167
+ flETHAmount,
12168
+ coinAmount,
12169
+ pendingEth,
12170
+ tickLower,
12171
+ tickUpper,
12172
+ };
12173
+ }
11363
12174
  poolId(coinAddress) {
11364
12175
  return getPoolId(orderPoolKey({
11365
12176
  currency0: FLETHAddress[this.chainId],
@@ -11400,6 +12211,7 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
11400
12211
  async coinBalance(coinAddress) {
11401
12212
  const user = await this.drift.getSignerAddress();
11402
12213
  const memecoin = new ReadMemecoin(coinAddress, this.drift);
12214
+ await memecoin.contract.cache.clear();
11403
12215
  return memecoin.balanceOf(user);
11404
12216
  }
11405
12217
  async buyCoin(params) {
@@ -11408,6 +12220,7 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
11408
12220
  let amountOutMin;
11409
12221
  let amountOut;
11410
12222
  let amountInMax;
12223
+ await this.readQuoter.contract.cache.clear();
11411
12224
  if (params.swapType === "EXACT_IN") {
11412
12225
  amountIn = params.amountIn;
11413
12226
  if (params.amountOutMin === undefined) {
@@ -11450,12 +12263,14 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
11450
12263
  }
11451
12264
  async sellCoin(params) {
11452
12265
  let ethOutMin;
12266
+ await this.readQuoter.contract.cache.clear();
11453
12267
  if (params.ethOutMin === undefined) {
11454
12268
  ethOutMin = getAmountWithSlippage(await this.readQuoter.getSellQuoteExactInput(params.coinAddress, params.amountIn), (params.slippagePercent / 100).toFixed(18).toString(), "EXACT_IN");
11455
12269
  }
11456
12270
  else {
11457
12271
  ethOutMin = params.ethOutMin;
11458
12272
  }
12273
+ await this.readPermit2.contract.cache.clear();
11459
12274
  const { commands, inputs } = memecoinToEthWithPermit2({
11460
12275
  chainId: this.chainId,
11461
12276
  memecoin: params.coinAddress,
@@ -11500,6 +12315,7 @@ const FlaunchSDK = {
11500
12315
  ReadWriteFlaunchSDK,
11501
12316
  };
11502
12317
 
12318
+ exports.BidWallAddress = BidWallAddress;
11503
12319
  exports.FLETHAddress = FLETHAddress;
11504
12320
  exports.FLETHHooksAddress = FLETHHooksAddress;
11505
12321
  exports.FairLaunchAbi = FairLaunchAbi;
@@ -11517,9 +12333,18 @@ exports.PoolManagerAddress = PoolManagerAddress;
11517
12333
  exports.QuoterAddress = QuoterAddress;
11518
12334
  exports.ReadFlaunchSDK = ReadFlaunchSDK;
11519
12335
  exports.ReadWriteFlaunchSDK = ReadWriteFlaunchSDK;
12336
+ exports.StateViewAddress = StateViewAddress;
12337
+ exports.TICK_SPACING = TICK_SPACING;
12338
+ exports.TickFinder = TickFinder;
12339
+ exports.USDCETHPoolKeys = USDCETHPoolKeys;
11520
12340
  exports.UniversalRouterAddress = UniversalRouterAddress;
11521
12341
  exports.bytes32ToUint256 = bytes32ToUint256;
12342
+ exports.calculateUnderlyingTokenBalances = calculateUnderlyingTokenBalances;
11522
12343
  exports.generateTokenUri = generateTokenUri;
12344
+ exports.getPoolId = getPoolId;
12345
+ exports.getSqrtPriceX96FromTick = getSqrtPriceX96FromTick;
12346
+ exports.getValidTick = getValidTick;
12347
+ exports.orderPoolKey = orderPoolKey;
11523
12348
  exports.resolveIPFS = resolveIPFS;
11524
12349
  exports.uint256ToBytes32 = uint256ToBytes32;
11525
12350
  exports.uploadFileToIPFS = uploadFileToIPFS;