@wireio/stake 0.7.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/stake.js CHANGED
@@ -14,68 +14,6 @@ var metadata$3 = {
14
14
  description: "Created with Anchor"
15
15
  };
16
16
  var instructions$3 = [
17
- {
18
- name: "accumulate_unstake_request",
19
- docs: [
20
- "Accumulate unstake requests to be processed in next allocation cycle",
21
- "Multiple requests can be accumulated before calculating allocations",
22
- "Returns the target epoch when this unstake request will be processed",
23
- "We should not be able to call this without development feature enabled",
24
- ""
25
- ],
26
- discriminator: [
27
- 24,
28
- 73,
29
- 69,
30
- 139,
31
- 36,
32
- 209,
33
- 105,
34
- 252
35
- ],
36
- accounts: [
37
- {
38
- name: "admin",
39
- writable: true,
40
- signer: true
41
- },
42
- {
43
- name: "stake_allocation_state",
44
- docs: [
45
- "Stake allocation state - to accumulate pending unstake requests"
46
- ],
47
- writable: true
48
- },
49
- {
50
- name: "stake_metrics",
51
- docs: [
52
- "Stake metrics - to validate total unstake amount is available"
53
- ]
54
- },
55
- {
56
- name: "maintenance_ledger",
57
- docs: [
58
- "Maintenance ledger - to determine target processing epoch"
59
- ]
60
- },
61
- {
62
- name: "global_config",
63
- docs: [
64
- "Global config for min_unstake_request setting"
65
- ]
66
- },
67
- {
68
- name: "clock"
69
- }
70
- ],
71
- args: [
72
- {
73
- name: "amount",
74
- type: "u64"
75
- }
76
- ],
77
- returns: "u64"
78
- },
79
17
  {
80
18
  name: "add_top_performers_batch",
81
19
  docs: [
@@ -129,74 +67,6 @@ var instructions$3 = [
129
67
  args: [
130
68
  ]
131
69
  },
132
- {
133
- name: "add_validator_v2",
134
- docs: [
135
- "Add a new validator bbypassing the looking at leaderboard and getting validators form there"
136
- ],
137
- discriminator: [
138
- 217,
139
- 158,
140
- 30,
141
- 19,
142
- 123,
143
- 99,
144
- 110,
145
- 30
146
- ],
147
- accounts: [
148
- {
149
- name: "authority",
150
- writable: true,
151
- signer: true
152
- },
153
- {
154
- name: "active_list",
155
- docs: [
156
- "Active list - will add the validator here"
157
- ],
158
- writable: true
159
- },
160
- {
161
- name: "validator_info",
162
- docs: [
163
- "Create the validator info account"
164
- ],
165
- writable: true
166
- },
167
- {
168
- name: "validator_transient",
169
- docs: [
170
- "Create the validator transient account"
171
- ],
172
- writable: true
173
- },
174
- {
175
- name: "stake_allocation_state",
176
- docs: [
177
- "Stake allocation state - to update total_active_vpp when adding validator"
178
- ],
179
- writable: true
180
- },
181
- {
182
- name: "system_program"
183
- }
184
- ],
185
- args: [
186
- {
187
- name: "vote_account",
188
- type: "pubkey"
189
- },
190
- {
191
- name: "name",
192
- type: "string"
193
- },
194
- {
195
- name: "performance_score",
196
- type: "u8"
197
- }
198
- ]
199
- },
200
70
  {
201
71
  name: "aggregate_stake_metrics",
202
72
  docs: [
@@ -236,43 +106,6 @@ var instructions$3 = [
236
106
  args: [
237
107
  ]
238
108
  },
239
- {
240
- name: "blacklist_validator",
241
- docs: [
242
- "Blacklist a validator (user-facing, maintenance will handle graveyard movement)",
243
- "UnderPerforming is set automatically when score is updated",
244
- "Another serious emergency stop function"
245
- ],
246
- discriminator: [
247
- 125,
248
- 42,
249
- 36,
250
- 229,
251
- 27,
252
- 38,
253
- 226,
254
- 62
255
- ],
256
- accounts: [
257
- {
258
- name: "validator_info",
259
- writable: true
260
- },
261
- {
262
- name: "stake_allocation_state",
263
- docs: [
264
- "Stake allocation state - to update total_active_vpp when VPP changes"
265
- ],
266
- writable: true
267
- }
268
- ],
269
- args: [
270
- {
271
- name: "vote_account",
272
- type: "pubkey"
273
- }
274
- ]
275
- },
276
109
  {
277
110
  name: "bond_role",
278
111
  discriminator: [
@@ -2862,147 +2695,6 @@ var instructions$3 = [
2862
2695
  }
2863
2696
  ]
2864
2697
  },
2865
- {
2866
- name: "reset_distribution_state",
2867
- discriminator: [
2868
- 159,
2869
- 183,
2870
- 162,
2871
- 74,
2872
- 228,
2873
- 135,
2874
- 157,
2875
- 79
2876
- ],
2877
- accounts: [
2878
- {
2879
- name: "admin",
2880
- signer: true
2881
- },
2882
- {
2883
- name: "distribution_state",
2884
- writable: true
2885
- }
2886
- ],
2887
- args: [
2888
- ]
2889
- },
2890
- {
2891
- name: "reset_global_state",
2892
- discriminator: [
2893
- 252,
2894
- 41,
2895
- 117,
2896
- 110,
2897
- 248,
2898
- 165,
2899
- 48,
2900
- 88
2901
- ],
2902
- accounts: [
2903
- {
2904
- name: "admin",
2905
- signer: true
2906
- },
2907
- {
2908
- name: "global_config"
2909
- },
2910
- {
2911
- name: "global_state",
2912
- writable: true
2913
- },
2914
- {
2915
- name: "pool_authority"
2916
- },
2917
- {
2918
- name: "liqsol_mint"
2919
- },
2920
- {
2921
- name: "liqsol_pool_ata",
2922
- writable: true
2923
- },
2924
- {
2925
- name: "token_program"
2926
- },
2927
- {
2928
- name: "associated_token_program"
2929
- }
2930
- ],
2931
- args: [
2932
- ]
2933
- },
2934
- {
2935
- name: "reset_price_history",
2936
- discriminator: [
2937
- 213,
2938
- 231,
2939
- 155,
2940
- 139,
2941
- 248,
2942
- 60,
2943
- 67,
2944
- 199
2945
- ],
2946
- accounts: [
2947
- {
2948
- name: "admin",
2949
- writable: true,
2950
- signer: true
2951
- },
2952
- {
2953
- name: "global_config"
2954
- },
2955
- {
2956
- name: "tranche_state",
2957
- writable: true
2958
- },
2959
- {
2960
- name: "price_history",
2961
- writable: true
2962
- },
2963
- {
2964
- name: "system_program"
2965
- }
2966
- ],
2967
- args: [
2968
- ]
2969
- },
2970
- {
2971
- name: "reset_tranche_state",
2972
- discriminator: [
2973
- 106,
2974
- 102,
2975
- 143,
2976
- 40,
2977
- 152,
2978
- 173,
2979
- 165,
2980
- 168
2981
- ],
2982
- accounts: [
2983
- {
2984
- name: "admin",
2985
- writable: true,
2986
- signer: true
2987
- },
2988
- {
2989
- name: "global_config"
2990
- },
2991
- {
2992
- name: "tranche_state",
2993
- writable: true
2994
- },
2995
- {
2996
- name: "price_history",
2997
- writable: true
2998
- },
2999
- {
3000
- name: "system_program"
3001
- }
3002
- ],
3003
- args: [
3004
- ]
3005
- },
3006
2698
  {
3007
2699
  name: "set_admin",
3008
2700
  discriminator: [
@@ -3025,8 +2717,7 @@ var instructions$3 = [
3025
2717
  signer: true
3026
2718
  },
3027
2719
  {
3028
- name: "new_authority",
3029
- signer: true
2720
+ name: "new_authority"
3030
2721
  }
3031
2722
  ],
3032
2723
  args: [
@@ -3054,50 +2745,10 @@ var instructions$3 = [
3054
2745
  signer: true
3055
2746
  },
3056
2747
  {
3057
- name: "new_authority",
3058
- signer: true
3059
- }
3060
- ],
3061
- args: [
3062
- ]
3063
- },
3064
- {
3065
- name: "set_last_state_change_epoch",
3066
- docs: [
3067
- "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
3068
- ],
3069
- discriminator: [
3070
- 94,
3071
- 57,
3072
- 139,
3073
- 195,
3074
- 123,
3075
- 224,
3076
- 227,
3077
- 106
3078
- ],
3079
- accounts: [
3080
- {
3081
- name: "validator_info",
3082
- writable: true
3083
- },
3084
- {
3085
- name: "stake_allocation_state",
3086
- docs: [
3087
- "Stake allocation state - to update total_active_vpp when VPP changes"
3088
- ],
3089
- writable: true
2748
+ name: "new_authority"
3090
2749
  }
3091
2750
  ],
3092
2751
  args: [
3093
- {
3094
- name: "vote_account",
3095
- type: "pubkey"
3096
- },
3097
- {
3098
- name: "epoch",
3099
- type: "u16"
3100
- }
3101
2752
  ]
3102
2753
  },
3103
2754
  {
@@ -3589,35 +3240,6 @@ var instructions$3 = [
3589
3240
  }
3590
3241
  ]
3591
3242
  },
3592
- {
3593
- name: "test_clear_active_list",
3594
- discriminator: [
3595
- 17,
3596
- 195,
3597
- 59,
3598
- 174,
3599
- 184,
3600
- 137,
3601
- 149,
3602
- 144
3603
- ],
3604
- accounts: [
3605
- {
3606
- name: "active_list",
3607
- writable: true
3608
- },
3609
- {
3610
- name: "processing_state",
3611
- writable: true
3612
- },
3613
- {
3614
- name: "authority",
3615
- signer: true
3616
- }
3617
- ],
3618
- args: [
3619
- ]
3620
- },
3621
3243
  {
3622
3244
  name: "update_config_bool",
3623
3245
  discriminator: [
@@ -4295,8 +3917,118 @@ var events = [
4295
3917
  var errors$3 = [
4296
3918
  {
4297
3919
  code: 6000,
4298
- name: "AccountBorrowFailed",
4299
- msg: "Util Acc borrow Failed"
3920
+ name: "DestinationAccountDoesNotExist",
3921
+ msg: "Destination stake account does not exist"
3922
+ },
3923
+ {
3924
+ code: 6001,
3925
+ name: "SourceAccountDoesNotExist",
3926
+ msg: "Source stake account does not exist"
3927
+ },
3928
+ {
3929
+ code: 6002,
3930
+ name: "InvalidDestinationOwner",
3931
+ msg: "Destination account not owned by stake program"
3932
+ },
3933
+ {
3934
+ code: 6003,
3935
+ name: "InvalidSourceOwner",
3936
+ msg: "Source account not owned by stake program"
3937
+ },
3938
+ {
3939
+ code: 6004,
3940
+ name: "ClockBorrowFailed",
3941
+ msg: "Failed to borrow clock data"
3942
+ },
3943
+ {
3944
+ code: 6005,
3945
+ name: "ClockDeserializeFailed",
3946
+ msg: "Failed to deserialize clock"
3947
+ },
3948
+ {
3949
+ code: 6006,
3950
+ name: "DestinationAnalysisFailed",
3951
+ msg: "Failed to analyze destination stake account"
3952
+ },
3953
+ {
3954
+ code: 6007,
3955
+ name: "SourceAnalysisFailed",
3956
+ msg: "Failed to analyze source stake account"
3957
+ },
3958
+ {
3959
+ code: 6008,
3960
+ name: "DestinationStillActivating",
3961
+ msg: "Destination stake is still activating"
3962
+ },
3963
+ {
3964
+ code: 6009,
3965
+ name: "DestinationDeactivating",
3966
+ msg: "Destination stake is deactivating"
3967
+ },
3968
+ {
3969
+ code: 6010,
3970
+ name: "SourceStillActivating",
3971
+ msg: "Source stake is still activating"
3972
+ },
3973
+ {
3974
+ code: 6011,
3975
+ name: "SourceDeactivating",
3976
+ msg: "Source stake is deactivating"
3977
+ },
3978
+ {
3979
+ code: 6012,
3980
+ name: "DestinationBorrowFailed",
3981
+ msg: "Failed to borrow destination account data"
3982
+ },
3983
+ {
3984
+ code: 6013,
3985
+ name: "DestinationParseFailed",
3986
+ msg: "Failed to parse destination stake state"
3987
+ },
3988
+ {
3989
+ code: 6014,
3990
+ name: "SourceBorrowFailed",
3991
+ msg: "Failed to borrow source account data"
3992
+ },
3993
+ {
3994
+ code: 6015,
3995
+ name: "SourceParseFailed",
3996
+ msg: "Failed to parse source stake state"
3997
+ },
3998
+ {
3999
+ code: 6016,
4000
+ name: "DifferentValidators",
4001
+ msg: "Stakes are delegated to different validators"
4002
+ },
4003
+ {
4004
+ code: 6017,
4005
+ name: "DifferentStakers",
4006
+ msg: "Stakes have different staker authorities"
4007
+ },
4008
+ {
4009
+ code: 6018,
4010
+ name: "DifferentWithdrawers",
4011
+ msg: "Stakes have different withdrawer authorities"
4012
+ },
4013
+ {
4014
+ code: 6019,
4015
+ name: "AuthoritiesNotFound",
4016
+ msg: "Could not extract authorities from accounts"
4017
+ },
4018
+ {
4019
+ code: 6020,
4020
+ name: "MergeInstructionFailed",
4021
+ msg: "Merge instruction failed"
4022
+ },
4023
+ {
4024
+ code: 6021,
4025
+ name: "EpochRewardsActive",
4026
+ msg: "Epoch rewards distribution is active - stake operations blocked"
4027
+ },
4028
+ {
4029
+ code: 6022,
4030
+ name: "DifferentCreditsObserved",
4031
+ msg: "Stakes have different credits_observed - cannot merge until both earn same rewards"
4300
4032
  }
4301
4033
  ];
4302
4034
  var types$5 = [
@@ -6749,153 +6481,6 @@ var instructions$1 = [
6749
6481
  args: [
6750
6482
  ]
6751
6483
  },
6752
- {
6753
- name: "test_clear_leaderboard",
6754
- discriminator: [
6755
- 118,
6756
- 207,
6757
- 26,
6758
- 205,
6759
- 180,
6760
- 7,
6761
- 75,
6762
- 244
6763
- ],
6764
- accounts: [
6765
- {
6766
- name: "leaderboard_state",
6767
- writable: true
6768
- },
6769
- {
6770
- name: "authority",
6771
- signer: true
6772
- }
6773
- ],
6774
- args: [
6775
- ]
6776
- },
6777
- {
6778
- name: "test_force_register_validator",
6779
- discriminator: [
6780
- 136,
6781
- 156,
6782
- 132,
6783
- 32,
6784
- 96,
6785
- 240,
6786
- 7,
6787
- 115
6788
- ],
6789
- accounts: [
6790
- {
6791
- name: "registrant",
6792
- writable: true,
6793
- signer: true
6794
- },
6795
- {
6796
- name: "vote_account"
6797
- },
6798
- {
6799
- name: "validator_record",
6800
- writable: true
6801
- },
6802
- {
6803
- name: "leaderboard_state",
6804
- writable: true
6805
- },
6806
- {
6807
- name: "system_program"
6808
- },
6809
- {
6810
- name: "clock"
6811
- }
6812
- ],
6813
- args: [
6814
- {
6815
- name: "vpp",
6816
- type: "u8"
6817
- }
6818
- ]
6819
- },
6820
- {
6821
- name: "test_force_update_vpp",
6822
- discriminator: [
6823
- 67,
6824
- 51,
6825
- 28,
6826
- 174,
6827
- 200,
6828
- 214,
6829
- 203,
6830
- 162
6831
- ],
6832
- accounts: [
6833
- {
6834
- name: "registrant",
6835
- writable: true,
6836
- signer: true
6837
- },
6838
- {
6839
- name: "vote_account"
6840
- },
6841
- {
6842
- name: "validator_record",
6843
- writable: true
6844
- },
6845
- {
6846
- name: "leaderboard_state",
6847
- writable: true
6848
- }
6849
- ],
6850
- args: [
6851
- {
6852
- name: "vpp",
6853
- type: "u8"
6854
- }
6855
- ]
6856
- },
6857
- {
6858
- name: "test_seed_random_validators",
6859
- discriminator: [
6860
- 48,
6861
- 155,
6862
- 181,
6863
- 112,
6864
- 163,
6865
- 242,
6866
- 43,
6867
- 146
6868
- ],
6869
- accounts: [
6870
- {
6871
- name: "registrant",
6872
- writable: true,
6873
- signer: true
6874
- },
6875
- {
6876
- name: "leaderboard_state",
6877
- writable: true
6878
- }
6879
- ],
6880
- args: [
6881
- {
6882
- name: "count",
6883
- type: "u16"
6884
- },
6885
- {
6886
- name: "seed",
6887
- type: "u64"
6888
- },
6889
- {
6890
- name: "min_vpp",
6891
- type: "u8"
6892
- },
6893
- {
6894
- name: "max_vpp",
6895
- type: "u8"
6896
- }
6897
- ]
6898
- },
6899
6484
  {
6900
6485
  name: "update_commission",
6901
6486
  discriminator: [
@@ -7829,7 +7414,7 @@ const deriveEphemeralStakeAddress = (user, seed) => __async$f(null, null, functi
7829
7414
  return web3_js.PublicKey.createWithSeed(user, seedStr, web3_js.StakeProgram.programId);
7830
7415
  });
7831
7416
  const CHAINLINK_FEED = new web3_js.PublicKey(
7832
- "99B2bTijsU6f1GCT73HmdR7HCFFjGMBcPZY6jZ96ynrR"
7417
+ "CH31Xns5z3M1cTAbKW34jcxPPciazARpijcHj9rxtemt"
7833
7418
  );
7834
7419
  const CHAINLINK_PROGRAM = new web3_js.PublicKey(
7835
7420
  "HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny"
@@ -9262,13 +8847,17 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9262
8847
  if (amountLamports <= BigInt(0)) {
9263
8848
  throw new Error("Deposit amount must be greater than zero.");
9264
8849
  }
9265
- const tx = yield this.depositClient.buildDepositTx(amountLamports);
9266
- const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
9267
- const signed = yield this.signTransaction(prepared);
9268
- return yield this.sendAndConfirmHttp(signed, {
9269
- blockhash,
9270
- lastValidBlockHeight
9271
- });
8850
+ try {
8851
+ const tx = yield this.depositClient.buildDepositTx(amountLamports);
8852
+ const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
8853
+ const signed = yield this.signTransaction(prepared);
8854
+ return yield this.sendAndConfirmHttp(signed, {
8855
+ blockhash,
8856
+ lastValidBlockHeight
8857
+ });
8858
+ } catch (err) {
8859
+ throw new Error(`Failed to deposit Solana: ${err}`);
8860
+ }
9272
8861
  });
9273
8862
  }
9274
8863
  withdraw(amountLamports) {
@@ -9277,13 +8866,17 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9277
8866
  if (amountLamports <= BigInt(0)) {
9278
8867
  throw new Error("Withdraw amount must be greater than zero.");
9279
8868
  }
9280
- const tx = yield this.depositClient.buildWithdrawTx(amountLamports);
9281
- const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
9282
- const signed = yield this.signTransaction(prepared);
9283
- return yield this.sendAndConfirmHttp(signed, {
9284
- blockhash,
9285
- lastValidBlockHeight
9286
- });
8869
+ try {
8870
+ const tx = yield this.depositClient.buildWithdrawTx(amountLamports);
8871
+ const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
8872
+ const signed = yield this.signTransaction(prepared);
8873
+ return yield this.sendAndConfirmHttp(signed, {
8874
+ blockhash,
8875
+ lastValidBlockHeight
8876
+ });
8877
+ } catch (err) {
8878
+ throw new Error(`Failed to withdraw Solana: ${err}`);
8879
+ }
9287
8880
  });
9288
8881
  }
9289
8882
  stake(amountLamports) {
@@ -9292,13 +8885,17 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9292
8885
  if (!amountLamports || amountLamports <= BigInt(0)) {
9293
8886
  throw new Error("Stake amount must be greater than zero.");
9294
8887
  }
9295
- const user = this.solPubKey;
9296
- const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
9297
- const ix = yield this.outpostClient.buildStakeIx(amountLamports, user);
9298
- const tx = new web3_js.Transaction().add(cuIx, ix);
9299
- const prepared = yield this.prepareTx(tx);
9300
- const signed = yield this.signTransaction(prepared.tx);
9301
- return this.sendAndConfirmHttp(signed, prepared);
8888
+ try {
8889
+ const user = this.solPubKey;
8890
+ const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
8891
+ const ix = yield this.outpostClient.buildStakeIx(amountLamports, user);
8892
+ const tx = new web3_js.Transaction().add(cuIx, ix);
8893
+ const prepared = yield this.prepareTx(tx);
8894
+ const signed = yield this.signTransaction(prepared.tx);
8895
+ return this.sendAndConfirmHttp(signed, prepared);
8896
+ } catch (err) {
8897
+ throw new Error(`Failed to stake Solana: ${err}`);
8898
+ }
9302
8899
  });
9303
8900
  }
9304
8901
  unstake(amountLamports) {
@@ -9307,13 +8904,17 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9307
8904
  if (!amountLamports || amountLamports <= BigInt(0)) {
9308
8905
  throw new Error("Unstake amount must be greater than zero.");
9309
8906
  }
9310
- const user = this.solPubKey;
9311
- const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
9312
- const ix = yield this.outpostClient.buildUnstakeIx(amountLamports, user);
9313
- const tx = new web3_js.Transaction().add(cuIx, ix);
9314
- const prepared = yield this.prepareTx(tx);
9315
- const signed = yield this.signTransaction(prepared.tx);
9316
- return this.sendAndConfirmHttp(signed, prepared);
8907
+ try {
8908
+ const user = this.solPubKey;
8909
+ const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
8910
+ const ix = yield this.outpostClient.buildUnstakeIx(amountLamports, user);
8911
+ const tx = new web3_js.Transaction().add(cuIx, ix);
8912
+ const prepared = yield this.prepareTx(tx);
8913
+ const signed = yield this.signTransaction(prepared.tx);
8914
+ return this.sendAndConfirmHttp(signed, prepared);
8915
+ } catch (err) {
8916
+ throw new Error(`Failed to unstake Solana: ${err}`);
8917
+ }
9317
8918
  });
9318
8919
  }
9319
8920
  buy(amountLamports) {
@@ -9322,102 +8923,110 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9322
8923
  if (!amountLamports || amountLamports <= BigInt(0)) {
9323
8924
  throw new Error("liqSOL pretoken purchase requires a positive amount.");
9324
8925
  }
9325
- const user = this.solPubKey;
9326
- const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
9327
- const ix = yield this.tokenClient.buildPurchaseIx(amountLamports, user);
9328
- const tx = new web3_js.Transaction().add(cuIx, ix);
9329
- const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
9330
- const signed = yield this.signTransaction(prepared);
9331
- return yield this.sendAndConfirmHttp(signed, {
9332
- blockhash,
9333
- lastValidBlockHeight
9334
- });
8926
+ try {
8927
+ const user = this.solPubKey;
8928
+ const cuIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 4e5 });
8929
+ const ix = yield this.tokenClient.buildPurchaseIx(amountLamports, user);
8930
+ const tx = new web3_js.Transaction().add(cuIx, ix);
8931
+ const { tx: prepared, blockhash, lastValidBlockHeight } = yield this.prepareTx(tx);
8932
+ const signed = yield this.signTransaction(prepared);
8933
+ return yield this.sendAndConfirmHttp(signed, {
8934
+ blockhash,
8935
+ lastValidBlockHeight
8936
+ });
8937
+ } catch (err) {
8938
+ throw new Error(`Failed to buy liqSOL pretokens: ${err}`);
8939
+ }
9335
8940
  });
9336
8941
  }
9337
8942
  getPortfolio() {
9338
8943
  return __async$8(this, null, function* () {
9339
8944
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
9340
8945
  if (!this.pubKey) throw new Error("User pubKey is undefined");
9341
- const user = this.solPubKey;
9342
- const reservePoolPDA = deriveReservePoolPda();
9343
- const vaultPDA = deriveVaultPda();
9344
- const liqsolMint = deriveLiqsolMintPda();
9345
- const userLiqsolAta = splToken.getAssociatedTokenAddressSync(
9346
- liqsolMint,
9347
- user,
9348
- false,
9349
- splToken.TOKEN_2022_PROGRAM_ID,
9350
- splToken.ASSOCIATED_TOKEN_PROGRAM_ID
9351
- );
9352
- const [nativeLamports, actualBalResp, snapshot] = yield Promise.all([
9353
- this.connection.getBalance(user, "confirmed"),
9354
- this.connection.getTokenAccountBalance(userLiqsolAta, "confirmed").catch(() => null),
9355
- this.outpostClient.fetchWireState(user).catch(() => null)
9356
- ]);
9357
- const LIQSOL_DECIMALS = 9;
9358
- const actualAmountStr = (_b = (_a = actualBalResp == null ? void 0 : actualBalResp.value) == null ? void 0 : _a.amount) != null ? _b : "0";
9359
- const globalState = (_c = snapshot == null ? void 0 : snapshot.globalState) != null ? _c : null;
9360
- const outpostAccount = (_d = snapshot == null ? void 0 : snapshot.outpostAccount) != null ? _d : null;
9361
- const trancheState = (_e = snapshot == null ? void 0 : snapshot.trancheState) != null ? _e : null;
9362
- const userPretokenRecord = (_f = snapshot == null ? void 0 : snapshot.userPretokenRecord) != null ? _f : null;
9363
- const stakedLiqsolStr = (_i = (_h = (_g = outpostAccount == null ? void 0 : outpostAccount.stakedLiqsol) == null ? void 0 : _g.toString) == null ? void 0 : _h.call(_g)) != null ? _i : "0";
9364
- const wirePretokensStr = (_l = (_k = (_j = userPretokenRecord == null ? void 0 : userPretokenRecord.totalPretokensPurchased) == null ? void 0 : _j.toString) == null ? void 0 : _k.call(_j)) != null ? _l : "0";
9365
- const currentIndexStr = (_o = (_n = (_m = globalState == null ? void 0 : globalState.currentIndex) == null ? void 0 : _m.toString) == null ? void 0 : _n.call(_m)) != null ? _o : "0";
9366
- const totalSharesStr = (_r = (_q = (_p = globalState == null ? void 0 : globalState.totalShares) == null ? void 0 : _p.toString) == null ? void 0 : _q.call(_p)) != null ? _r : "0";
9367
- const userSharesStr = (_u = (_t = (_s = outpostAccount == null ? void 0 : outpostAccount.stakedShares) == null ? void 0 : _s.toString) == null ? void 0 : _t.call(_s)) != null ? _u : "0";
9368
- const stakedLiqsol = BigInt(stakedLiqsolStr);
9369
- const currentIndex = BigInt(currentIndexStr);
9370
- const totalShares = BigInt(totalSharesStr);
9371
- const userShares = BigInt(userSharesStr);
9372
- let estimatedClaim = BigInt(0);
9373
- let estimatedYield = BigInt(0);
9374
- if (userShares > BigInt(0) && currentIndex > BigInt(0)) {
9375
- estimatedClaim = userShares * currentIndex / INDEX_SCALE$1;
9376
- if (estimatedClaim > stakedLiqsol) {
9377
- estimatedYield = estimatedClaim - stakedLiqsol;
8946
+ try {
8947
+ const user = this.solPubKey;
8948
+ const reservePoolPDA = deriveReservePoolPda();
8949
+ const vaultPDA = deriveVaultPda();
8950
+ const liqsolMint = deriveLiqsolMintPda();
8951
+ const userLiqsolAta = splToken.getAssociatedTokenAddressSync(
8952
+ liqsolMint,
8953
+ user,
8954
+ false,
8955
+ splToken.TOKEN_2022_PROGRAM_ID,
8956
+ splToken.ASSOCIATED_TOKEN_PROGRAM_ID
8957
+ );
8958
+ const [nativeLamports, actualBalResp, snapshot] = yield Promise.all([
8959
+ this.connection.getBalance(user, "confirmed"),
8960
+ this.connection.getTokenAccountBalance(userLiqsolAta, "confirmed").catch(() => null),
8961
+ this.outpostClient.fetchWireState(user).catch(() => null)
8962
+ ]);
8963
+ const LIQSOL_DECIMALS = 9;
8964
+ const actualAmountStr = (_b = (_a = actualBalResp == null ? void 0 : actualBalResp.value) == null ? void 0 : _a.amount) != null ? _b : "0";
8965
+ const globalState = (_c = snapshot == null ? void 0 : snapshot.globalState) != null ? _c : null;
8966
+ const outpostAccount = (_d = snapshot == null ? void 0 : snapshot.outpostAccount) != null ? _d : null;
8967
+ const trancheState = (_e = snapshot == null ? void 0 : snapshot.trancheState) != null ? _e : null;
8968
+ const userPretokenRecord = (_f = snapshot == null ? void 0 : snapshot.userPretokenRecord) != null ? _f : null;
8969
+ const stakedLiqsolStr = (_i = (_h = (_g = outpostAccount == null ? void 0 : outpostAccount.stakedLiqsol) == null ? void 0 : _g.toString) == null ? void 0 : _h.call(_g)) != null ? _i : "0";
8970
+ const wirePretokensStr = (_l = (_k = (_j = userPretokenRecord == null ? void 0 : userPretokenRecord.totalPretokensPurchased) == null ? void 0 : _j.toString) == null ? void 0 : _k.call(_j)) != null ? _l : "0";
8971
+ const currentIndexStr = (_o = (_n = (_m = globalState == null ? void 0 : globalState.currentIndex) == null ? void 0 : _m.toString) == null ? void 0 : _n.call(_m)) != null ? _o : "0";
8972
+ const totalSharesStr = (_r = (_q = (_p = globalState == null ? void 0 : globalState.totalShares) == null ? void 0 : _p.toString) == null ? void 0 : _q.call(_p)) != null ? _r : "0";
8973
+ const userSharesStr = (_u = (_t = (_s = outpostAccount == null ? void 0 : outpostAccount.stakedShares) == null ? void 0 : _s.toString) == null ? void 0 : _t.call(_s)) != null ? _u : "0";
8974
+ const stakedLiqsol = BigInt(stakedLiqsolStr);
8975
+ const currentIndex = BigInt(currentIndexStr);
8976
+ const totalShares = BigInt(totalSharesStr);
8977
+ const userShares = BigInt(userSharesStr);
8978
+ let estimatedClaim = BigInt(0);
8979
+ let estimatedYield = BigInt(0);
8980
+ if (userShares > BigInt(0) && currentIndex > BigInt(0)) {
8981
+ estimatedClaim = userShares * currentIndex / INDEX_SCALE$1;
8982
+ if (estimatedClaim > stakedLiqsol) {
8983
+ estimatedYield = estimatedClaim - stakedLiqsol;
8984
+ }
9378
8985
  }
8986
+ return {
8987
+ native: {
8988
+ amount: BigInt(nativeLamports),
8989
+ symbol: "SOL",
8990
+ decimals: 9
8991
+ },
8992
+ liq: {
8993
+ amount: BigInt(actualAmountStr),
8994
+ symbol: "LiqSOL",
8995
+ decimals: LIQSOL_DECIMALS,
8996
+ ata: userLiqsolAta
8997
+ },
8998
+ staked: {
8999
+ amount: stakedLiqsol,
9000
+ symbol: "LiqSOL",
9001
+ decimals: LIQSOL_DECIMALS
9002
+ },
9003
+ wire: {
9004
+ amount: BigInt(wirePretokensStr),
9005
+ symbol: "$WIRE",
9006
+ decimals: 8
9007
+ },
9008
+ yield: {
9009
+ currentIndex,
9010
+ indexScale: INDEX_SCALE$1,
9011
+ totalShares,
9012
+ userShares,
9013
+ estimatedClaim,
9014
+ estimatedYield
9015
+ },
9016
+ extras: {
9017
+ userLiqsolAta: userLiqsolAta.toBase58(),
9018
+ reservePoolPDA: reservePoolPDA.toBase58(),
9019
+ vaultPDA: vaultPDA.toBase58(),
9020
+ globalIndex: (_v = globalState == null ? void 0 : globalState.currentIndex) == null ? void 0 : _v.toString(),
9021
+ totalShares: (_w = globalState == null ? void 0 : globalState.totalShares) == null ? void 0 : _w.toString(),
9022
+ currentTrancheNumber: (_x = trancheState == null ? void 0 : trancheState.currentTrancheNumber) == null ? void 0 : _x.toString(),
9023
+ currentTranchePriceUsd: (_y = trancheState == null ? void 0 : trancheState.currentTranchePriceUsd) == null ? void 0 : _y.toString()
9024
+ },
9025
+ chainID: this.network.chainId
9026
+ };
9027
+ } catch (err) {
9028
+ throw new Error(`Failed to get Solana portfolio: ${err}`);
9379
9029
  }
9380
- return {
9381
- native: {
9382
- amount: BigInt(nativeLamports),
9383
- symbol: "SOL",
9384
- decimals: 9
9385
- },
9386
- liq: {
9387
- amount: BigInt(actualAmountStr),
9388
- symbol: "LiqSOL",
9389
- decimals: LIQSOL_DECIMALS,
9390
- ata: userLiqsolAta
9391
- },
9392
- staked: {
9393
- amount: stakedLiqsol,
9394
- symbol: "LiqSOL",
9395
- decimals: LIQSOL_DECIMALS
9396
- },
9397
- wire: {
9398
- amount: BigInt(wirePretokensStr),
9399
- symbol: "$WIRE",
9400
- decimals: 8
9401
- },
9402
- yield: {
9403
- currentIndex,
9404
- indexScale: INDEX_SCALE$1,
9405
- totalShares,
9406
- userShares,
9407
- estimatedClaim,
9408
- estimatedYield
9409
- },
9410
- extras: {
9411
- userLiqsolAta: userLiqsolAta.toBase58(),
9412
- reservePoolPDA: reservePoolPDA.toBase58(),
9413
- vaultPDA: vaultPDA.toBase58(),
9414
- globalIndex: (_v = globalState == null ? void 0 : globalState.currentIndex) == null ? void 0 : _v.toString(),
9415
- totalShares: (_w = globalState == null ? void 0 : globalState.totalShares) == null ? void 0 : _w.toString(),
9416
- currentTrancheNumber: (_x = trancheState == null ? void 0 : trancheState.currentTrancheNumber) == null ? void 0 : _x.toString(),
9417
- currentTranchePriceUsd: (_y = trancheState == null ? void 0 : trancheState.currentTranchePriceUsd) == null ? void 0 : _y.toString()
9418
- },
9419
- chainID: this.network.chainId
9420
- };
9421
9030
  });
9422
9031
  }
9423
9032
  getUserRecord() {
@@ -9428,44 +9037,56 @@ const _SolanaStakingClient = class _SolanaStakingClient {
9428
9037
  }
9429
9038
  getTrancheSnapshot(options) {
9430
9039
  return __async$8(this, null, function* () {
9431
- const {
9432
- chainID = core.SolChainID.WireTestnet,
9433
- windowBefore,
9434
- windowAfter
9435
- } = options != null ? options : {};
9436
- const [globalState, trancheState] = yield Promise.all([
9437
- this.tokenClient.fetchGlobalState(),
9438
- this.tokenClient.fetchTrancheState()
9439
- ]);
9440
- const { price: solPriceUsd, timestamp } = yield this.tokenClient.getSolPriceUsdSafe();
9441
- return buildSolanaTrancheSnapshot({
9442
- chainID,
9443
- globalState,
9444
- trancheState,
9445
- solPriceUsd,
9446
- nativePriceTimestamp: timestamp,
9447
- ladderWindowBefore: windowBefore,
9448
- ladderWindowAfter: windowAfter
9449
- });
9040
+ try {
9041
+ const {
9042
+ chainID = core.SolChainID.WireTestnet,
9043
+ windowBefore,
9044
+ windowAfter
9045
+ } = options != null ? options : {};
9046
+ const [globalState, trancheState] = yield Promise.all([
9047
+ this.tokenClient.fetchGlobalState(),
9048
+ this.tokenClient.fetchTrancheState()
9049
+ ]);
9050
+ const { price: solPriceUsd, timestamp } = yield this.tokenClient.getSolPriceUsdSafe();
9051
+ return buildSolanaTrancheSnapshot({
9052
+ chainID,
9053
+ globalState,
9054
+ trancheState,
9055
+ solPriceUsd,
9056
+ nativePriceTimestamp: timestamp,
9057
+ ladderWindowBefore: windowBefore,
9058
+ ladderWindowAfter: windowAfter
9059
+ });
9060
+ } catch (err) {
9061
+ throw new Error(`Failed to build Solana tranche snapshot: ${err}`);
9062
+ }
9450
9063
  });
9451
9064
  }
9452
9065
  getSystemAPY() {
9453
9066
  return __async$8(this, null, function* () {
9454
- const ratePerEpoch = yield this.getEpochRateDecimalFromProgram();
9455
- const epochsPerYear = yield this.getEpochsPerYearFromCluster();
9456
- const apyDecimal = Math.pow(1 + ratePerEpoch, epochsPerYear) - 1;
9457
- const apyPercent = apyDecimal * 100;
9458
- return apyPercent;
9067
+ try {
9068
+ const ratePerEpoch = yield this.getEpochRateDecimalFromProgram();
9069
+ const epochsPerYear = yield this.getEpochsPerYearFromCluster();
9070
+ const apyDecimal = Math.pow(1 + ratePerEpoch, epochsPerYear) - 1;
9071
+ const apyPercent = apyDecimal * 100;
9072
+ return apyPercent;
9073
+ } catch (err) {
9074
+ throw new Error(`Failed to compute Solana system APY: ${err}`);
9075
+ }
9459
9076
  });
9460
9077
  }
9461
9078
  getEpochRateDecimalFromProgram() {
9462
9079
  return __async$8(this, null, function* () {
9463
- const liqSolCoreProgram = this.program.getProgram("liqsolCore");
9464
- const stakeMetricsPda = deriveStakeMetricsPda();
9465
- const stakeMetrics = yield liqSolCoreProgram.account.stakeMetrics.fetch(stakeMetricsPda);
9466
- const raw = BigInt(stakeMetrics.solSystemPayRate.toString());
9467
- const rateDecimal = Number(raw) / Number(PAY_RATE_SCALE_FACTOR);
9468
- return rateDecimal;
9080
+ try {
9081
+ const liqSolCoreProgram = this.program.getProgram("liqsolCore");
9082
+ const stakeMetricsPda = deriveStakeMetricsPda();
9083
+ const stakeMetrics = yield liqSolCoreProgram.account.stakeMetrics.fetch(stakeMetricsPda);
9084
+ const raw = BigInt(stakeMetrics.solSystemPayRate.toString());
9085
+ const rateDecimal = Number(raw) / Number(PAY_RATE_SCALE_FACTOR);
9086
+ return rateDecimal;
9087
+ } catch (err) {
9088
+ throw new Error(`Failed to read stakeMetrics from program: ${err}`);
9089
+ }
9469
9090
  });
9470
9091
  }
9471
9092
  getEpochsPerYearFromCluster() {
@@ -9675,10 +9296,10 @@ _SolanaStakingClient.EPOCHS_PER_YEAR_TTL_MS = 10 * 60 * 1e3;
9675
9296
  _SolanaStakingClient.FEE_CACHE_TTL_MS = 6e4;
9676
9297
  let SolanaStakingClient = _SolanaStakingClient;
9677
9298
 
9678
- var _format$q = "hh-sol-artifact-1";
9679
- var contractName$q = "Accounting";
9680
- var sourceName$q = "contracts/liqEth/accounting.sol";
9681
- var abi$q = [
9299
+ var _format$p = "hh-sol-artifact-1";
9300
+ var contractName$p = "Accounting";
9301
+ var sourceName$p = "contracts/liqEth/accounting.sol";
9302
+ var abi$p = [
9682
9303
  {
9683
9304
  inputs: [
9684
9305
  {
@@ -10240,20 +9861,20 @@ var linkReferences$p = {
10240
9861
  var deployedLinkReferences$p = {
10241
9862
  };
10242
9863
  var AccountingArtifact = {
10243
- _format: _format$q,
10244
- contractName: contractName$q,
10245
- sourceName: sourceName$q,
10246
- abi: abi$q,
9864
+ _format: _format$p,
9865
+ contractName: contractName$p,
9866
+ sourceName: sourceName$p,
9867
+ abi: abi$p,
10247
9868
  bytecode: bytecode$p,
10248
9869
  deployedBytecode: deployedBytecode$p,
10249
9870
  linkReferences: linkReferences$p,
10250
9871
  deployedLinkReferences: deployedLinkReferences$p
10251
9872
  };
10252
9873
 
10253
- var _format$p = "hh-sol-artifact-1";
10254
- var contractName$p = "DepositManager";
10255
- var sourceName$p = "contracts/liqEth/DepositManager.sol";
10256
- var abi$p = [
9874
+ var _format$o = "hh-sol-artifact-1";
9875
+ var contractName$o = "DepositManager";
9876
+ var sourceName$o = "contracts/liqEth/DepositManager.sol";
9877
+ var abi$o = [
10257
9878
  {
10258
9879
  inputs: [
10259
9880
  {
@@ -11288,20 +10909,20 @@ var linkReferences$o = {
11288
10909
  var deployedLinkReferences$o = {
11289
10910
  };
11290
10911
  var DepositManagerArtifact = {
11291
- _format: _format$p,
11292
- contractName: contractName$p,
11293
- sourceName: sourceName$p,
11294
- abi: abi$p,
10912
+ _format: _format$o,
10913
+ contractName: contractName$o,
10914
+ sourceName: sourceName$o,
10915
+ abi: abi$o,
11295
10916
  bytecode: bytecode$o,
11296
10917
  deployedBytecode: deployedBytecode$o,
11297
10918
  linkReferences: linkReferences$o,
11298
10919
  deployedLinkReferences: deployedLinkReferences$o
11299
10920
  };
11300
10921
 
11301
- var _format$o = "hh-sol-artifact-1";
11302
- var contractName$o = "LiqEthToken";
11303
- var sourceName$o = "contracts/liqEth/liqEth.sol";
11304
- var abi$o = [
10922
+ var _format$n = "hh-sol-artifact-1";
10923
+ var contractName$n = "LiqEthToken";
10924
+ var sourceName$n = "contracts/liqEth/liqEth.sol";
10925
+ var abi$n = [
11305
10926
  {
11306
10927
  inputs: [
11307
10928
  {
@@ -12572,20 +12193,20 @@ var linkReferences$n = {
12572
12193
  var deployedLinkReferences$n = {
12573
12194
  };
12574
12195
  var LiqEthArtifact = {
12575
- _format: _format$o,
12576
- contractName: contractName$o,
12577
- sourceName: sourceName$o,
12578
- abi: abi$o,
12196
+ _format: _format$n,
12197
+ contractName: contractName$n,
12198
+ sourceName: sourceName$n,
12199
+ abi: abi$n,
12579
12200
  bytecode: bytecode$n,
12580
12201
  deployedBytecode: deployedBytecode$n,
12581
12202
  linkReferences: linkReferences$n,
12582
12203
  deployedLinkReferences: deployedLinkReferences$n
12583
12204
  };
12584
12205
 
12585
- var _format$n = "hh-sol-artifact-1";
12586
- var contractName$n = "StakingModule";
12587
- var sourceName$n = "contracts/liqEth/stakingModule.sol";
12588
- var abi$n = [
12206
+ var _format$m = "hh-sol-artifact-1";
12207
+ var contractName$m = "StakingModule";
12208
+ var sourceName$m = "contracts/liqEth/stakingModule.sol";
12209
+ var abi$m = [
12589
12210
  {
12590
12211
  inputs: [
12591
12212
  {
@@ -14412,20 +14033,20 @@ var deployedLinkReferences$m = {
14412
14033
  }
14413
14034
  };
14414
14035
  var StakingModuleArtifact = {
14415
- _format: _format$n,
14416
- contractName: contractName$n,
14417
- sourceName: sourceName$n,
14418
- abi: abi$n,
14036
+ _format: _format$m,
14037
+ contractName: contractName$m,
14038
+ sourceName: sourceName$m,
14039
+ abi: abi$m,
14419
14040
  bytecode: bytecode$m,
14420
14041
  deployedBytecode: deployedBytecode$m,
14421
14042
  linkReferences: linkReferences$m,
14422
14043
  deployedLinkReferences: deployedLinkReferences$m
14423
14044
  };
14424
14045
 
14425
- var _format$m = "hh-sol-artifact-1";
14426
- var contractName$m = "WithdrawalQueue";
14427
- var sourceName$m = "contracts/liqEth/withdrawalQueue.sol";
14428
- var abi$m = [
14046
+ var _format$l = "hh-sol-artifact-1";
14047
+ var contractName$l = "WithdrawalQueue";
14048
+ var sourceName$l = "contracts/liqEth/withdrawalQueue.sol";
14049
+ var abi$l = [
14429
14050
  {
14430
14051
  inputs: [
14431
14052
  {
@@ -15423,20 +15044,20 @@ var linkReferences$l = {
15423
15044
  var deployedLinkReferences$l = {
15424
15045
  };
15425
15046
  var WithdrawalQueueArtifact = {
15426
- _format: _format$m,
15427
- contractName: contractName$m,
15428
- sourceName: sourceName$m,
15429
- abi: abi$m,
15047
+ _format: _format$l,
15048
+ contractName: contractName$l,
15049
+ sourceName: sourceName$l,
15050
+ abi: abi$l,
15430
15051
  bytecode: bytecode$l,
15431
15052
  deployedBytecode: deployedBytecode$l,
15432
15053
  linkReferences: linkReferences$l,
15433
15054
  deployedLinkReferences: deployedLinkReferences$l
15434
15055
  };
15435
15056
 
15436
- var _format$l = "hh-sol-artifact-1";
15437
- var contractName$l = "WithdrawalVault";
15438
- var sourceName$l = "contracts/liqEth/withdrawalVault.sol";
15439
- var abi$l = [
15057
+ var _format$k = "hh-sol-artifact-1";
15058
+ var contractName$k = "WithdrawalVault";
15059
+ var sourceName$k = "contracts/liqEth/withdrawalVault.sol";
15060
+ var abi$k = [
15440
15061
  {
15441
15062
  inputs: [
15442
15063
  {
@@ -15898,20 +15519,20 @@ var linkReferences$k = {
15898
15519
  var deployedLinkReferences$k = {
15899
15520
  };
15900
15521
  var WithdrawalVaultArtifact = {
15901
- _format: _format$l,
15902
- contractName: contractName$l,
15903
- sourceName: sourceName$l,
15904
- abi: abi$l,
15522
+ _format: _format$k,
15523
+ contractName: contractName$k,
15524
+ sourceName: sourceName$k,
15525
+ abi: abi$k,
15905
15526
  bytecode: bytecode$k,
15906
15527
  deployedBytecode: deployedBytecode$k,
15907
15528
  linkReferences: linkReferences$k,
15908
15529
  deployedLinkReferences: deployedLinkReferences$k
15909
15530
  };
15910
15531
 
15911
- var _format$k = "hh-sol-artifact-1";
15912
- var contractName$k = "BeaconState";
15913
- var sourceName$k = "contracts/liqEth/BeaconState.sol";
15914
- var abi$k = [
15532
+ var _format$j = "hh-sol-artifact-1";
15533
+ var contractName$j = "BeaconState";
15534
+ var sourceName$j = "contracts/liqEth/BeaconState.sol";
15535
+ var abi$j = [
15915
15536
  {
15916
15537
  inputs: [
15917
15538
  {
@@ -16734,20 +16355,20 @@ var linkReferences$j = {
16734
16355
  var deployedLinkReferences$j = {
16735
16356
  };
16736
16357
  var BeaconStateArtifact = {
16737
- _format: _format$k,
16738
- contractName: contractName$k,
16739
- sourceName: sourceName$k,
16740
- abi: abi$k,
16358
+ _format: _format$j,
16359
+ contractName: contractName$j,
16360
+ sourceName: sourceName$j,
16361
+ abi: abi$j,
16741
16362
  bytecode: bytecode$j,
16742
16363
  deployedBytecode: deployedBytecode$j,
16743
16364
  linkReferences: linkReferences$j,
16744
16365
  deployedLinkReferences: deployedLinkReferences$j
16745
16366
  };
16746
16367
 
16747
- var _format$j = "hh-sol-artifact-1";
16748
- var contractName$j = "YieldOracle";
16749
- var sourceName$j = "contracts/liqEth/Yield.sol";
16750
- var abi$j = [
16368
+ var _format$i = "hh-sol-artifact-1";
16369
+ var contractName$i = "YieldOracle";
16370
+ var sourceName$i = "contracts/liqEth/Yield.sol";
16371
+ var abi$i = [
16751
16372
  {
16752
16373
  inputs: [
16753
16374
  {
@@ -18164,20 +17785,20 @@ var deployedLinkReferences$i = {
18164
17785
  }
18165
17786
  };
18166
17787
  var YieldOracleArtifact = {
18167
- _format: _format$j,
18168
- contractName: contractName$j,
18169
- sourceName: sourceName$j,
18170
- abi: abi$j,
17788
+ _format: _format$i,
17789
+ contractName: contractName$i,
17790
+ sourceName: sourceName$i,
17791
+ abi: abi$i,
18171
17792
  bytecode: bytecode$i,
18172
17793
  deployedBytecode: deployedBytecode$i,
18173
17794
  linkReferences: linkReferences$i,
18174
17795
  deployedLinkReferences: deployedLinkReferences$i
18175
17796
  };
18176
17797
 
18177
- var _format$i = "hh-sol-artifact-1";
18178
- var contractName$i = "Depositor";
18179
- var sourceName$i = "contracts/outpost/Depositor.sol";
18180
- var abi$i = [
17798
+ var _format$h = "hh-sol-artifact-1";
17799
+ var contractName$h = "Depositor";
17800
+ var sourceName$h = "contracts/outpost/Depositor.sol";
17801
+ var abi$h = [
18181
17802
  {
18182
17803
  inputs: [
18183
17804
  {
@@ -19858,20 +19479,20 @@ var deployedLinkReferences$h = {
19858
19479
  }
19859
19480
  };
19860
19481
  var DepositorArtifact = {
19861
- _format: _format$i,
19862
- contractName: contractName$i,
19863
- sourceName: sourceName$i,
19864
- abi: abi$i,
19482
+ _format: _format$h,
19483
+ contractName: contractName$h,
19484
+ sourceName: sourceName$h,
19485
+ abi: abi$h,
19865
19486
  bytecode: bytecode$h,
19866
19487
  deployedBytecode: deployedBytecode$h,
19867
19488
  linkReferences: linkReferences$h,
19868
19489
  deployedLinkReferences: deployedLinkReferences$h
19869
19490
  };
19870
19491
 
19871
- var _format$h = "hh-sol-artifact-1";
19872
- var contractName$h = "ReceiptNFT";
19873
- var sourceName$h = "contracts/outpost/ReceiptNFT.sol";
19874
- var abi$h = [
19492
+ var _format$g = "hh-sol-artifact-1";
19493
+ var contractName$g = "ReceiptNFT";
19494
+ var sourceName$g = "contracts/outpost/ReceiptNFT.sol";
19495
+ var abi$g = [
19875
19496
  {
19876
19497
  inputs: [
19877
19498
  {
@@ -21908,20 +21529,20 @@ var linkReferences$g = {
21908
21529
  var deployedLinkReferences$g = {
21909
21530
  };
21910
21531
  var ReceiptNFTArtifact = {
21911
- _format: _format$h,
21912
- contractName: contractName$h,
21913
- sourceName: sourceName$h,
21914
- abi: abi$h,
21532
+ _format: _format$g,
21533
+ contractName: contractName$g,
21534
+ sourceName: sourceName$g,
21535
+ abi: abi$g,
21915
21536
  bytecode: bytecode$g,
21916
21537
  deployedBytecode: deployedBytecode$g,
21917
21538
  linkReferences: linkReferences$g,
21918
21539
  deployedLinkReferences: deployedLinkReferences$g
21919
21540
  };
21920
21541
 
21921
- var _format$g = "hh-sol-artifact-1";
21922
- var contractName$g = "OutpostManager";
21923
- var sourceName$g = "contracts/outpost/OutpostManager.sol";
21924
- var abi$g = [
21542
+ var _format$f = "hh-sol-artifact-1";
21543
+ var contractName$f = "OutpostManager";
21544
+ var sourceName$f = "contracts/outpost/OutpostManager.sol";
21545
+ var abi$f = [
21925
21546
  {
21926
21547
  inputs: [
21927
21548
  {
@@ -22683,20 +22304,20 @@ var linkReferences$f = {
22683
22304
  var deployedLinkReferences$f = {
22684
22305
  };
22685
22306
  var OutpostManagerArtifact = {
22686
- _format: _format$g,
22687
- contractName: contractName$g,
22688
- sourceName: sourceName$g,
22689
- abi: abi$g,
22307
+ _format: _format$f,
22308
+ contractName: contractName$f,
22309
+ sourceName: sourceName$f,
22310
+ abi: abi$f,
22690
22311
  bytecode: bytecode$f,
22691
22312
  deployedBytecode: deployedBytecode$f,
22692
22313
  linkReferences: linkReferences$f,
22693
22314
  deployedLinkReferences: deployedLinkReferences$f
22694
22315
  };
22695
22316
 
22696
- var _format$f = "hh-sol-artifact-1";
22697
- var contractName$f = "BAR";
22698
- var sourceName$f = "contracts/outpost/BAR.sol";
22699
- var abi$f = [
22317
+ var _format$e = "hh-sol-artifact-1";
22318
+ var contractName$e = "BAR";
22319
+ var sourceName$e = "contracts/outpost/BAR.sol";
22320
+ var abi$e = [
22700
22321
  {
22701
22322
  inputs: [
22702
22323
  {
@@ -24575,20 +24196,20 @@ var deployedLinkReferences$e = {
24575
24196
  }
24576
24197
  };
24577
24198
  var BARArtifact = {
24578
- _format: _format$f,
24579
- contractName: contractName$f,
24580
- sourceName: sourceName$f,
24581
- abi: abi$f,
24199
+ _format: _format$e,
24200
+ contractName: contractName$e,
24201
+ sourceName: sourceName$e,
24202
+ abi: abi$e,
24582
24203
  bytecode: bytecode$e,
24583
24204
  deployedBytecode: deployedBytecode$e,
24584
24205
  linkReferences: linkReferences$e,
24585
24206
  deployedLinkReferences: deployedLinkReferences$e
24586
24207
  };
24587
24208
 
24588
- var _format$e = "hh-sol-artifact-1";
24589
- var contractName$e = "OPP";
24590
- var sourceName$e = "contracts/outpost/OPP.sol";
24591
- var abi$e = [
24209
+ var _format$d = "hh-sol-artifact-1";
24210
+ var contractName$d = "OPP";
24211
+ var sourceName$d = "contracts/outpost/OPP.sol";
24212
+ var abi$d = [
24592
24213
  {
24593
24214
  inputs: [
24594
24215
  {
@@ -25564,20 +25185,20 @@ var deployedLinkReferences$d = {
25564
25185
  }
25565
25186
  };
25566
25187
  var OPPArtifact = {
25567
- _format: _format$e,
25568
- contractName: contractName$e,
25569
- sourceName: sourceName$e,
25570
- abi: abi$e,
25188
+ _format: _format$d,
25189
+ contractName: contractName$d,
25190
+ sourceName: sourceName$d,
25191
+ abi: abi$d,
25571
25192
  bytecode: bytecode$d,
25572
25193
  deployedBytecode: deployedBytecode$d,
25573
25194
  linkReferences: linkReferences$d,
25574
25195
  deployedLinkReferences: deployedLinkReferences$d
25575
25196
  };
25576
25197
 
25577
- var _format$d = "hh-sol-artifact-1";
25578
- var contractName$d = "OPPCommon";
25579
- var sourceName$d = "contracts/outpost/OPPCommon.sol";
25580
- var abi$d = [
25198
+ var _format$c = "hh-sol-artifact-1";
25199
+ var contractName$c = "OPPCommon";
25200
+ var sourceName$c = "contracts/outpost/OPPCommon.sol";
25201
+ var abi$c = [
25581
25202
  {
25582
25203
  inputs: [
25583
25204
  {
@@ -25772,20 +25393,20 @@ var deployedLinkReferences$c = {
25772
25393
  }
25773
25394
  };
25774
25395
  var OPPCommonArtifact = {
25775
- _format: _format$d,
25776
- contractName: contractName$d,
25777
- sourceName: sourceName$d,
25778
- abi: abi$d,
25396
+ _format: _format$c,
25397
+ contractName: contractName$c,
25398
+ sourceName: sourceName$c,
25399
+ abi: abi$c,
25779
25400
  bytecode: bytecode$c,
25780
25401
  deployedBytecode: deployedBytecode$c,
25781
25402
  linkReferences: linkReferences$c,
25782
25403
  deployedLinkReferences: deployedLinkReferences$c
25783
25404
  };
25784
25405
 
25785
- var _format$c = "hh-sol-artifact-1";
25786
- var contractName$c = "OPPInbound";
25787
- var sourceName$c = "contracts/outpost/OPPInbound.sol";
25788
- var abi$c = [
25406
+ var _format$b = "hh-sol-artifact-1";
25407
+ var contractName$b = "OPPInbound";
25408
+ var sourceName$b = "contracts/outpost/OPPInbound.sol";
25409
+ var abi$b = [
25789
25410
  {
25790
25411
  inputs: [
25791
25412
  {
@@ -26818,20 +26439,20 @@ var deployedLinkReferences$b = {
26818
26439
  }
26819
26440
  };
26820
26441
  var OPPInboundArtifact = {
26821
- _format: _format$c,
26822
- contractName: contractName$c,
26823
- sourceName: sourceName$c,
26824
- abi: abi$c,
26442
+ _format: _format$b,
26443
+ contractName: contractName$b,
26444
+ sourceName: sourceName$b,
26445
+ abi: abi$b,
26825
26446
  bytecode: bytecode$b,
26826
26447
  deployedBytecode: deployedBytecode$b,
26827
26448
  linkReferences: linkReferences$b,
26828
26449
  deployedLinkReferences: deployedLinkReferences$b
26829
26450
  };
26830
26451
 
26831
- var _format$b = "hh-sol-artifact-1";
26832
- var contractName$b = "Pretoken";
26833
- var sourceName$b = "contracts/outpost/Pretoken.sol";
26834
- var abi$b = [
26452
+ var _format$a = "hh-sol-artifact-1";
26453
+ var contractName$a = "Pretoken";
26454
+ var sourceName$a = "contracts/outpost/Pretoken.sol";
26455
+ var abi$a = [
26835
26456
  {
26836
26457
  inputs: [
26837
26458
  {
@@ -28512,200 +28133,16 @@ var deployedLinkReferences$a = {
28512
28133
  }
28513
28134
  };
28514
28135
  var PretokenArtifact = {
28515
- _format: _format$b,
28516
- contractName: contractName$b,
28517
- sourceName: sourceName$b,
28518
- abi: abi$b,
28136
+ _format: _format$a,
28137
+ contractName: contractName$a,
28138
+ sourceName: sourceName$a,
28139
+ abi: abi$a,
28519
28140
  bytecode: bytecode$a,
28520
28141
  deployedBytecode: deployedBytecode$a,
28521
28142
  linkReferences: linkReferences$a,
28522
28143
  deployedLinkReferences: deployedLinkReferences$a
28523
28144
  };
28524
28145
 
28525
- var _format$a = "hh-sol-artifact-1";
28526
- var contractName$a = "Aggregator";
28527
- var sourceName$a = "contracts/outpost/Aggregator.sol";
28528
- var abi$a = [
28529
- {
28530
- inputs: [
28531
- {
28532
- internalType: "address",
28533
- name: "_authority",
28534
- type: "address"
28535
- },
28536
- {
28537
- internalType: "int256",
28538
- name: "initialPrice",
28539
- type: "int256"
28540
- },
28541
- {
28542
- internalType: "uint8",
28543
- name: "__decimals",
28544
- type: "uint8"
28545
- }
28546
- ],
28547
- name: "initialize",
28548
- outputs: [
28549
- ],
28550
- stateMutability: "nonpayable",
28551
- type: "function"
28552
- },
28553
- {
28554
- inputs: [
28555
- ],
28556
- name: "decimals",
28557
- outputs: [
28558
- {
28559
- internalType: "uint8",
28560
- name: "",
28561
- type: "uint8"
28562
- }
28563
- ],
28564
- stateMutability: "view",
28565
- type: "function"
28566
- },
28567
- {
28568
- inputs: [
28569
- ],
28570
- name: "description",
28571
- outputs: [
28572
- {
28573
- internalType: "string",
28574
- name: "",
28575
- type: "string"
28576
- }
28577
- ],
28578
- stateMutability: "pure",
28579
- type: "function"
28580
- },
28581
- {
28582
- inputs: [
28583
- ],
28584
- name: "version",
28585
- outputs: [
28586
- {
28587
- internalType: "uint256",
28588
- name: "",
28589
- type: "uint256"
28590
- }
28591
- ],
28592
- stateMutability: "pure",
28593
- type: "function"
28594
- },
28595
- {
28596
- inputs: [
28597
- {
28598
- internalType: "uint80",
28599
- name: "",
28600
- type: "uint80"
28601
- }
28602
- ],
28603
- name: "getRoundData",
28604
- outputs: [
28605
- {
28606
- internalType: "uint80",
28607
- name: "roundId",
28608
- type: "uint80"
28609
- },
28610
- {
28611
- internalType: "int256",
28612
- name: "answer",
28613
- type: "int256"
28614
- },
28615
- {
28616
- internalType: "uint256",
28617
- name: "startedAt",
28618
- type: "uint256"
28619
- },
28620
- {
28621
- internalType: "uint256",
28622
- name: "updatedAt",
28623
- type: "uint256"
28624
- },
28625
- {
28626
- internalType: "uint80",
28627
- name: "answeredInRound",
28628
- type: "uint80"
28629
- }
28630
- ],
28631
- stateMutability: "view",
28632
- type: "function"
28633
- },
28634
- {
28635
- inputs: [
28636
- ],
28637
- name: "latestRoundData",
28638
- outputs: [
28639
- {
28640
- internalType: "uint80",
28641
- name: "roundId",
28642
- type: "uint80"
28643
- },
28644
- {
28645
- internalType: "int256",
28646
- name: "answer",
28647
- type: "int256"
28648
- },
28649
- {
28650
- internalType: "uint256",
28651
- name: "startedAt",
28652
- type: "uint256"
28653
- },
28654
- {
28655
- internalType: "uint256",
28656
- name: "updatedAt",
28657
- type: "uint256"
28658
- },
28659
- {
28660
- internalType: "uint80",
28661
- name: "answeredInRound",
28662
- type: "uint80"
28663
- }
28664
- ],
28665
- stateMutability: "view",
28666
- type: "function"
28667
- },
28668
- {
28669
- inputs: [
28670
- {
28671
- internalType: "int256",
28672
- name: "newPrice",
28673
- type: "int256"
28674
- }
28675
- ],
28676
- name: "updateAnswer",
28677
- outputs: [
28678
- ],
28679
- stateMutability: "nonpayable",
28680
- type: "function"
28681
- },
28682
- {
28683
- inputs: [
28684
- {
28685
- internalType: "int256",
28686
- name: "newPrice",
28687
- type: "int256"
28688
- },
28689
- {
28690
- internalType: "uint256",
28691
- name: "oldTimestamp",
28692
- type: "uint256"
28693
- }
28694
- ],
28695
- name: "updateStale",
28696
- outputs: [
28697
- ],
28698
- stateMutability: "nonpayable",
28699
- type: "function"
28700
- }
28701
- ];
28702
- var AggregatorArtifact = {
28703
- _format: _format$a,
28704
- contractName: contractName$a,
28705
- sourceName: sourceName$a,
28706
- abi: abi$a
28707
- };
28708
-
28709
28146
  var _format$9 = "hh-sol-artifact-1";
28710
28147
  var contractName$9 = "EthUsdPriceConsumer";
28711
28148
  var sourceName$9 = "contracts/outpost/EthUsdPriceConsumer.sol";
@@ -35140,31 +34577,30 @@ const ERC20Abi = ERC20Artifact.abi;
35140
34577
  const ERC721Abi = ERC721Artifact.abi;
35141
34578
  const ERC1155Abi = ERC1155Artifact.abi;
35142
34579
  const ADDRESSES = {
35143
- LiqEthAuthority: "0x3Eb66Bb91F7a022FbABc1619Cb6acce7025Bc41F",
35144
- BeaconState: "0x08F879c6D0964E0A17bF688Af23168f654DF372e",
35145
- WithdrawalQueue: "0x74aDeD940369baDDb0F36426F23B08499e45Fe18",
35146
- LiqEthToken: "0x8C974517D038e2e3b8a1da7b1A026bC8132A4b2e",
35147
- Accounting: "0x766CE996B8132b927988c5b2ECAE8108fB1a9307",
35148
- DepositManager: "0xEd391dB5DB11B5eDBE08e69A51D16e84293C09a3",
35149
- WithdrawalVault: "0xbaBc0D5997283ab9886696A0dEaB8A8093436b48",
35150
- StakingModule: "0x4998fBb6Ca5Ee3Db6c339e2962A34791Af643fEa",
35151
- YieldOracle: "0x61Fe311C57dd9a38Fb7B0c5A8ec521452dB25378",
35152
- OutpostManagerAuthority: "0x3B8705Ba1195AF632b3bd9E46F19348BC828FA3D",
35153
- iodata: "0x4aCABbC74a1cA9B0058d9ADAa0E00Af0f4f73212",
35154
- Base58: "0x1241F36ff30065deD52d51f0d6524EF971259A12",
35155
- sysio_merkle: "0x58ca9b5515266Fd6bF94D5F1268C505b2eC9679c",
35156
- ReceiptNFT: "0x03d6bD46cA9F54B8F8bbA21CfAfe717b36cB8593",
35157
- EthUsdPriceConsumer: "0xdC2DD993A13b3DD6D255B52285625694bd967c9A",
35158
- Pool: "0xd4742757AA61B1Fd3Fcd87980D7D460B12Cd9275",
35159
- OutpostManager: "0x38ec2B56cBCeCaFFe28b535517de1a102C3D74E3",
35160
- sysio_write: "0x0Ec4C1BaB772958aa3Db27459643bfbE7d92E305",
35161
- Pretoken: "0x8c97a51A71640fa411DEfab8feC3401eFfd1a2E4",
35162
- BAR: "0xbAFac13ffd3Aa9aEabaaeb6e4C2cF3dFf3479DC0",
35163
- OPPCommon: "0x12283a6d4E6cE4A0e8AdB319Fc161c7F4f91EA8F",
35164
- OPP: "0x87CE3Fe2CDca39C04aa2c14bbF1E1d9DB6358C4A",
35165
- Depositor: "0x5351B30EA4b75bD9be9Fc0048e88F675f7b3Ac2b",
35166
- OPPInbound: "0x0B1f7FB1c7f01A9cf490a1387E1E100F2bEA6C6d",
35167
- MockAggregator: "0xFCfc3ddd4CBd9Ad3b3af3A374B8bdA1b66eE6FFF"
34580
+ LiqEthAuthority: "0xB8fb7dBA2de501c94EAB723fa48679f698a39Aa4",
34581
+ BeaconState: "0x29719E8e76C52F5fD4888DF401579859c305f2DF",
34582
+ WithdrawalQueue: "0xce388339bFDAed9cAF536ea7b4F42123b4D755d4",
34583
+ LiqEthToken: "0x2C0e75e930Fc72ceD0725854C5E7A55566333F3f",
34584
+ Accounting: "0xE31C44d04c7B055afAC9301F55840f030eaF04BC",
34585
+ DepositManager: "0x21b339ED55A0f037f91B88044C808CcfCCBbF9A8",
34586
+ WithdrawalVault: "0x028743bE7E727aA331A1e952575cb00623B95fE2",
34587
+ StakingModule: "0xDe9754Fb58CcD4D74e94DA5682192E4e6eC334b0",
34588
+ YieldOracle: "0x7B7B8894e75b44B6cA7Dc8bE6dED5059621907b2",
34589
+ OutpostManagerAuthority: "0xeaE32b94c0F858b3600861aAE4Caeee6B6341751",
34590
+ iodata: "0x485Ed153c45189d623Bb37816eD3016A56552273",
34591
+ Base58: "0x8bB3856EC1114B1cE45a78620CF174D90a1Fd4e7",
34592
+ sysio_merkle: "0x5180a926D71c6d94c5c939Fe7Fed14cD7dcAa541",
34593
+ ReceiptNFT: "0x651De616A20b17De1095f9A0694A0e0E68025b78",
34594
+ EthUsdPriceConsumer: "0x2d866f8DB6F6c94997b0027Ba24bc64a03627ddc",
34595
+ Pool: "0xDA268Adcb90c422C2102A5f713182A42A8b9EA0D",
34596
+ OutpostManager: "0x9f279804Cb8539c53709AA37a4C1b30A52A85175",
34597
+ sysio_write: "0x3F8c880efd2c8C3aA1f0CE40b886cc6913eEC1d3",
34598
+ Pretoken: "0xCabF19Fdb7cD063738dd63a418702Ee3642FFc68",
34599
+ BAR: "0x2D8f4D4435509d7b8F93C3Ba93D45447C892f7ED",
34600
+ OPPCommon: "0x1716EEC9f1E0c1aF7BbbA8Fed10652138914f766",
34601
+ OPP: "0x5e1135cF8987268a3e7F68551558Ae92c454429f",
34602
+ Depositor: "0xf4b4ccfD684feB46504D77232FBde23b23d4F774",
34603
+ OPPInbound: "0x088484d45fF93AFabC63810FB0b335792E2B24f3"
35168
34604
  };
35169
34605
  const CONTRACTS = {
35170
34606
  LiqEthAuthority: {
@@ -35223,10 +34659,6 @@ const CONTRACTS = {
35223
34659
  address: ADDRESSES.ReceiptNFT,
35224
34660
  abi: ReceiptNFTArtifact.abi
35225
34661
  },
35226
- MockAggregator: {
35227
- address: ADDRESSES.MockAggregator,
35228
- abi: AggregatorArtifact.abi
35229
- },
35230
34662
  Pool: {
35231
34663
  address: ADDRESSES.Pool,
35232
34664
  abi: PoolArtifact.abi
@@ -36408,10 +35840,6 @@ class EthereumStakingClient {
36408
35840
  return __async(this, null, function* () {
36409
35841
  this.ensureUser();
36410
35842
  const buyer = yield this.signer.getAddress();
36411
- const network = yield this.provider.getNetwork();
36412
- const chainId = network.chainId;
36413
- const allowedTestChains = new Set([560048]);
36414
- if (allowedTestChains.has(chainId)) yield this.updateMockAggregatorPrice();
36415
35843
  let result = yield this.pretokenClient.purchasePretokensWithLiqETH(amount, buyer);
36416
35844
  return result && result.txHash ? result.txHash : "Error - no resulting txHash";
36417
35845
  });
@@ -36542,7 +35970,7 @@ class EthereumStakingClient {
36542
35970
  getTrancheSnapshot(options) {
36543
35971
  return __async(this, null, function* () {
36544
35972
  const {
36545
- chainID = core.EvmChainID.Hoodi,
35973
+ chainID = core.EvmChainID.Ethereum,
36546
35974
  windowBefore,
36547
35975
  windowAfter
36548
35976
  } = options != null ? options : {};
@@ -36563,10 +35991,8 @@ class EthereumStakingClient {
36563
35991
  ]);
36564
35992
  const totalTrancheSupply = BigInt(totalSupplyBn.toString()) / BigInt(1e10);
36565
35993
  const currentTrancheSupply = BigInt(trancheSupplyBn.toString()) / BigInt(1e10);
36566
- const [roundId, answer, startedAt, updatedAt, answeredInRound] = yield this.contract.MockAggregator.latestRoundData();
36567
35994
  let ethPriceUsdBn = yield this.contract.EthUsdPriceConsumer.getPrice18Decimals();
36568
35995
  let ethPriceUsd = BigInt(ethPriceUsdBn.toString()) / BigInt(1e10);
36569
- let nativePriceTimestamp = Number(updatedAt);
36570
35996
  const initialTrancheSupply = BigInt(INITIAL_TRANCHE_SUPPLY) * BigInt(1e8);
36571
35997
  return buildEthereumTrancheSnapshot({
36572
35998
  chainID,
@@ -36582,7 +36008,6 @@ class EthereumStakingClient {
36582
36008
  minPriceUsd,
36583
36009
  maxPriceUsd,
36584
36010
  ethPriceUsd,
36585
- nativePriceTimestamp,
36586
36011
  ladderWindowBefore: windowBefore,
36587
36012
  ladderWindowAfter: windowAfter
36588
36013
  });
@@ -36619,36 +36044,6 @@ class EthereumStakingClient {
36619
36044
  return bufferWei;
36620
36045
  });
36621
36046
  }
36622
- updateMockAggregatorPrice() {
36623
- return __async(this, null, function* () {
36624
- const aggregator = this.contract.MockAggregator;
36625
- const [roundId, answer, startedAt, updatedAt, answeredInRound] = yield aggregator.latestRoundData();
36626
- const now = (yield this.provider.getBlock("latest")).timestamp;
36627
- const ageSec = Number(now) - Number(updatedAt);
36628
- const ONE_HOUR = 1 * 3600;
36629
- if (ageSec > ONE_HOUR) {
36630
- const network = yield this.provider.getNetwork();
36631
- const chainId = network.chainId;
36632
- const allowedTestChains = new Set([560048]);
36633
- if (!allowedTestChains.has(chainId)) {
36634
- console.warn(`MockAggregator is stale (${ageSec}s) but chainId ${chainId} is not a test/local network \u2014 skipping update.`);
36635
- return;
36636
- }
36637
- const res = yield fetch("https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd");
36638
- const data = yield res.json();
36639
- const ethUsd = data.ethereum.usd;
36640
- const currentEthPrice = ethers.ethers.utils.parseUnits(ethUsd.toString(), 8);
36641
- try {
36642
- const tx = yield aggregator.updateAnswer(currentEthPrice);
36643
- const txreceipt = yield tx.wait(1);
36644
- } catch (err) {
36645
- console.error("MockAggregator updateAnswer failed", (err == null ? void 0 : err.message) || err);
36646
- }
36647
- } else {
36648
- console.log(`MockAggregator updated ${ageSec}s ago \u2014 no update needed`);
36649
- }
36650
- });
36651
- }
36652
36047
  }
36653
36048
 
36654
36049
  class Staker {
@@ -36658,12 +36053,10 @@ class Staker {
36658
36053
  if (!Array.isArray(config)) config = [config];
36659
36054
  config.forEach((cfg) => {
36660
36055
  switch (cfg.network.chainId) {
36661
- case core.SolChainID.Devnet:
36662
- case core.SolChainID.WireTestnet:
36056
+ case core.SolChainID.Mainnet:
36663
36057
  this.clients.set(cfg.network.chainId, new SolanaStakingClient(cfg));
36664
36058
  break;
36665
36059
  case core.EvmChainID.Ethereum:
36666
- case core.EvmChainID.Hoodi:
36667
36060
  this.clients.set(cfg.network.chainId, new EthereumStakingClient(cfg));
36668
36061
  break;
36669
36062
  default:
@@ -36703,7 +36096,6 @@ const CONTRACT_NAMES = [
36703
36096
  "Base58",
36704
36097
  "sysio_merkle",
36705
36098
  "ReceiptNFT",
36706
- "MockAggregator",
36707
36099
  "Pool",
36708
36100
  "OutpostManager",
36709
36101
  "sysio_write",