@glowlabs-org/utils 0.2.160 → 0.2.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var calculateFarmEfficiency = require('./calculate-farm-efficiency-r_CeFLgH.js');
3
+ var calculateFarmEfficiency = require('./calculate-farm-efficiency-C1AxUV_w.js');
4
4
  require('decimal.js');
5
5
  var viem = require('viem');
6
6
  require('ethers');
@@ -2924,6 +2924,15 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2924
2924
  }
2925
2925
  // Run a simulation first to surface any revert reason
2926
2926
  try {
2927
+ console.log("Simulating claimPayout with:", {
2928
+ nonce: nonce.toString(),
2929
+ proof: proof,
2930
+ tokensAndAmounts: tokensAndAmounts,
2931
+ from: from,
2932
+ to: to,
2933
+ isGuardedToken: isGuardedToken,
2934
+ toCounterfactual: toCounterfactual,
2935
+ });
2927
2936
  await publicClient.simulateContract({
2928
2937
  address: ADDRESSES.REWARDS_KERNEL,
2929
2938
  abi: REWARDS_KERNEL_ABI,
@@ -2946,9 +2955,24 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2946
2955
  chainId: walletClient?.chain?.id,
2947
2956
  contract: ADDRESSES.REWARDS_KERNEL,
2948
2957
  nonce: nonce.toString(),
2958
+ tokensAndAmounts: tokensAndAmounts,
2959
+ proof: proof,
2960
+ from: from,
2961
+ to: to,
2962
+ isGuardedToken: isGuardedToken,
2963
+ toCounterfactual: toCounterfactual,
2949
2964
  });
2950
2965
  throw new Error(parseViemError(simulationError));
2951
2966
  }
2967
+ console.log("Executing claimPayout with:", {
2968
+ nonce: nonce.toString(),
2969
+ proof: proof,
2970
+ tokensAndAmounts: tokensAndAmounts,
2971
+ from: from,
2972
+ to: to,
2973
+ isGuardedToken: isGuardedToken,
2974
+ toCounterfactual: toCounterfactual,
2975
+ });
2952
2976
  // Execute the transaction
2953
2977
  const hash = await walletClient.writeContract({
2954
2978
  address: ADDRESSES.REWARDS_KERNEL,
@@ -2976,7 +3000,11 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2976
3000
  contract: ADDRESSES.REWARDS_KERNEL,
2977
3001
  nonce: params.nonce.toString(),
2978
3002
  from: params.from,
3003
+ proof: params.proof,
3004
+ tokensAndAmounts: params.tokensAndAmounts,
2979
3005
  to: params.to,
3006
+ isGuardedToken: params.isGuardedToken,
3007
+ toCounterfactual: params.toCounterfactual,
2980
3008
  });
2981
3009
  throw new Error(parseViemError(error));
2982
3010
  }
@@ -5121,4 +5149,4 @@ exports.useOffchainFractions = useOffchainFractions;
5121
5149
  exports.useRewardsKernel = useRewardsKernel;
5122
5150
  exports.waitForEthersTransactionWithRetry = waitForEthersTransactionWithRetry;
5123
5151
  exports.waitForViemTransactionWithRetry = waitForViemTransactionWithRetry;
5124
- //# sourceMappingURL=calculate-farm-efficiency-r_CeFLgH.js.map
5152
+ //# sourceMappingURL=calculate-farm-efficiency-C1AxUV_w.js.map