@glowlabs-org/utils 0.2.161 → 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.
package/dist/cjs/index.js CHANGED
@@ -15,7 +15,7 @@ var viem = require('viem');
15
15
  var merkletreejs = require('merkletreejs');
16
16
  var ethers = require('ethers');
17
17
  var Decimal = require('decimal.js');
18
- var calculateFarmEfficiency = require('./calculate-farm-efficiency-DgUyd3Go.js');
18
+ var calculateFarmEfficiency = require('./calculate-farm-efficiency-C1AxUV_w.js');
19
19
 
20
20
  const GENESIS_TIMESTAMP = 1700352000;
21
21
 
@@ -1,5 +1,5 @@
1
- import { T as TRANSFER_TYPES } from './calculate-farm-efficiency-DF5ehjWL.js';
2
- export { C as ControlRouter, D as DECIMALS_BY_TOKEN, m as FORWARDER_ABI, F as FarmsRouter, g as ForwarderError, q as GCA_URLS, G as GLOW_WEIGHT_DECIMAL_PRECISION, H as HUB_URL, e as KICKSTARTER_STATUS, K as KickstarterRouter, M as MAX_WEIGHT, n as OFFCHAIN_FRACTIONS_ABI, O as OFF_CHAIN_PAYMENT_CURRENCIES, h as OffchainFractionsError, P as PAYMENT_CURRENCIES, d as REGIONS, o as REWARDS_KERNEL_ABI, R as RegionRouter, i as RewardsKernelError, S as STAKING_DIRECTIONS, U as USDG_WEIGHT_DECIMAL_PRECISION, W as WalletsRouter, j as allRegions, f as calculateFarmEfficiency, c as configureSentry, l as countries, p as getAddresses, t as parseEthersError, s as parseViemError, r as regionMetadata, k as usStates, u as useForwarder, a as useOffchainFractions, b as useRewardsKernel, v as waitForEthersTransactionWithRetry, w as waitForViemTransactionWithRetry } from './calculate-farm-efficiency-DF5ehjWL.js';
1
+ import { T as TRANSFER_TYPES } from './calculate-farm-efficiency-BLvnmRNd.js';
2
+ export { C as ControlRouter, D as DECIMALS_BY_TOKEN, m as FORWARDER_ABI, F as FarmsRouter, g as ForwarderError, q as GCA_URLS, G as GLOW_WEIGHT_DECIMAL_PRECISION, H as HUB_URL, e as KICKSTARTER_STATUS, K as KickstarterRouter, M as MAX_WEIGHT, n as OFFCHAIN_FRACTIONS_ABI, O as OFF_CHAIN_PAYMENT_CURRENCIES, h as OffchainFractionsError, P as PAYMENT_CURRENCIES, d as REGIONS, o as REWARDS_KERNEL_ABI, R as RegionRouter, i as RewardsKernelError, S as STAKING_DIRECTIONS, U as USDG_WEIGHT_DECIMAL_PRECISION, W as WalletsRouter, j as allRegions, f as calculateFarmEfficiency, c as configureSentry, l as countries, p as getAddresses, t as parseEthersError, s as parseViemError, r as regionMetadata, k as usStates, u as useForwarder, a as useOffchainFractions, b as useRewardsKernel, v as waitForEthersTransactionWithRetry, w as waitForViemTransactionWithRetry } from './calculate-farm-efficiency-BLvnmRNd.js';
3
3
  import 'decimal.js';
4
4
  import { verifyTypedData, checksumAddress } from 'viem';
5
5
  import 'ethers';
@@ -2922,6 +2922,15 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2922
2922
  }
2923
2923
  // Run a simulation first to surface any revert reason
2924
2924
  try {
2925
+ console.log("Simulating claimPayout with:", {
2926
+ nonce: nonce.toString(),
2927
+ proof: proof,
2928
+ tokensAndAmounts: tokensAndAmounts,
2929
+ from: from,
2930
+ to: to,
2931
+ isGuardedToken: isGuardedToken,
2932
+ toCounterfactual: toCounterfactual,
2933
+ });
2925
2934
  await publicClient.simulateContract({
2926
2935
  address: ADDRESSES.REWARDS_KERNEL,
2927
2936
  abi: REWARDS_KERNEL_ABI,
@@ -2945,6 +2954,7 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2945
2954
  contract: ADDRESSES.REWARDS_KERNEL,
2946
2955
  nonce: nonce.toString(),
2947
2956
  tokensAndAmounts: tokensAndAmounts,
2957
+ proof: proof,
2948
2958
  from: from,
2949
2959
  to: to,
2950
2960
  isGuardedToken: isGuardedToken,
@@ -2952,6 +2962,15 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2952
2962
  });
2953
2963
  throw new Error(parseViemError(simulationError));
2954
2964
  }
2965
+ console.log("Executing claimPayout with:", {
2966
+ nonce: nonce.toString(),
2967
+ proof: proof,
2968
+ tokensAndAmounts: tokensAndAmounts,
2969
+ from: from,
2970
+ to: to,
2971
+ isGuardedToken: isGuardedToken,
2972
+ toCounterfactual: toCounterfactual,
2973
+ });
2955
2974
  // Execute the transaction
2956
2975
  const hash = await walletClient.writeContract({
2957
2976
  address: ADDRESSES.REWARDS_KERNEL,
@@ -2979,6 +2998,7 @@ function useRewardsKernel(walletClient, publicClient, CHAIN_ID) {
2979
2998
  contract: ADDRESSES.REWARDS_KERNEL,
2980
2999
  nonce: params.nonce.toString(),
2981
3000
  from: params.from,
3001
+ proof: params.proof,
2982
3002
  tokensAndAmounts: params.tokensAndAmounts,
2983
3003
  to: params.to,
2984
3004
  isGuardedToken: params.isGuardedToken,
@@ -5097,4 +5117,4 @@ function calculateFarmEfficiency(protocolDepositUsd6, weeklyImpactAssetsWad) {
5097
5117
  }
5098
5118
 
5099
5119
  export { ControlRouter as C, DECIMALS_BY_TOKEN as D, FarmsRouter as F, GLOW_WEIGHT_DECIMAL_PRECISION as G, HUB_URL as H, KickstarterRouter as K, MAX_WEIGHT as M, OFF_CHAIN_PAYMENT_CURRENCIES as O, PAYMENT_CURRENCIES as P, RegionRouter as R, STAKING_DIRECTIONS as S, TRANSFER_TYPES as T, USDG_WEIGHT_DECIMAL_PRECISION as U, WalletsRouter as W, useOffchainFractions as a, useRewardsKernel as b, configureSentry as c, REGIONS as d, KICKSTARTER_STATUS as e, calculateFarmEfficiency as f, ForwarderError as g, OffchainFractionsError as h, RewardsKernelError as i, allRegions as j, usStates as k, countries as l, FORWARDER_ABI as m, OFFCHAIN_FRACTIONS_ABI as n, REWARDS_KERNEL_ABI as o, getAddresses as p, GCA_URLS as q, regionMetadata as r, parseViemError as s, parseEthersError as t, useForwarder as u, waitForEthersTransactionWithRetry as v, waitForViemTransactionWithRetry as w };
5100
- //# sourceMappingURL=calculate-farm-efficiency-DF5ehjWL.js.map
5120
+ //# sourceMappingURL=calculate-farm-efficiency-BLvnmRNd.js.map