@glowlabs-org/utils 0.2.147 → 0.2.149

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/esm/index.js CHANGED
@@ -13,8 +13,8 @@ import { parseUnits, formatUnits } from 'viem';
13
13
  import { MerkleTree } from 'merkletreejs';
14
14
  import { solidityPackedKeccak256, keccak256 } from 'ethers';
15
15
  import Decimal from 'decimal.js';
16
- import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-PZUo1LyW.js';
17
- export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-PZUo1LyW.js';
16
+ import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-C2Pkoecj.js';
17
+ export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-C2Pkoecj.js';
18
18
 
19
19
  const GENESIS_TIMESTAMP = 1700352000;
20
20
 
@@ -437,13 +437,6 @@ export interface RewardScoreResponse {
437
437
  glwPriceUsd6: string;
438
438
  regionInfo: {
439
439
  regionId: number;
440
- existingFarmCount: number;
441
- existingTotalDepositsUsd: string;
442
- currencyBreakdown: {
443
- currency: string;
444
- protocolDepositSum: string;
445
- carbonCreditProductionSum: string;
446
- }[];
447
440
  regionGctlStaked: string;
448
441
  totalGctlStakedAllRegions: string;
449
442
  };
@@ -486,18 +479,9 @@ export interface MiningScoreResponse {
486
479
  userWeeklyGlwRewards: string;
487
480
  glwPriceUsd6: string;
488
481
  dollarCostOfMiner: string;
489
- numberOfMiners: number;
490
- minerRewardSplit: string;
491
482
  weeksOfMinerLifeRemaining: number;
492
483
  regionInfo: {
493
484
  regionId: number;
494
- existingFarmCount: number;
495
- existingTotalDepositsUsd: string;
496
- currencyBreakdown: {
497
- currency: string;
498
- protocolDepositSum: string;
499
- carbonCreditProductionSum: string;
500
- }[];
501
485
  regionGctlStaked: string;
502
486
  totalGctlStakedAllRegions: string;
503
487
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glowlabs-org/utils",
3
- "version": "0.2.147",
3
+ "version": "0.2.149",
4
4
  "description": "A library containing all typechain types and addresses relating to the glow guarded launch",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -15,7 +15,8 @@ export type ContractKeys =
15
15
  | "COUNTERFACTUAL_HOLDER_FACTORY"
16
16
  | "FOUNDATION_HUB_MANAGER_WALLET"
17
17
  | "FOUNDATION_REWARDS_WALLET"
18
- | "ENDOWMENT_WALLET";
18
+ | "ENDOWMENT_WALLET"
19
+ | "REWARDS_KERNEL";
19
20
 
20
21
  // Contract-specific addresses
21
22
  const mainnetAddresses: Record<ContractKeys, `0x${string}`> = {
@@ -36,6 +37,7 @@ const mainnetAddresses: Record<ContractKeys, `0x${string}`> = {
36
37
  UNISWAP_V2_ROUTER: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
37
38
  UNISWAP_V2_FACTORY: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
38
39
  ENDOWMENT_WALLET: "0x868D99B4a6e81b4683D10ea5665f13579A9d1607",
40
+ REWARDS_KERNEL: "0xd6d3139d40a32F8bA71D576c1A743529AB4786BB",
39
41
  };
40
42
 
41
43
  const sepoliaAddresses: Record<ContractKeys, `0x${string}`> = {
@@ -56,6 +58,7 @@ const sepoliaAddresses: Record<ContractKeys, `0x${string}`> = {
56
58
  UNISWAP_V2_ROUTER: "0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3",
57
59
  UNISWAP_V2_FACTORY: "0xF62c03E08ada871A0bEb309762E260a7a6a880E6",
58
60
  ENDOWMENT_WALLET: "0x868D99B4a6e81b4683D10ea5665f13579A9d1607",
61
+ REWARDS_KERNEL: "0x92fcC4D8565062381d8fBD5Af1b32432104FDBC7",
59
62
  };
60
63
 
61
64
  export const getAddresses = (
@@ -444,8 +444,13 @@ export function useOffchainFractions(
444
444
  chainId: walletClient?.chain?.id,
445
445
  contract: ADDRESSES.OFFCHAIN_FRACTIONS,
446
446
  creator: params.creator,
447
+ refundTo: params.refundTo,
448
+ creditTo: params.creditTo,
449
+ useCounterfactualAddressForRefund:
450
+ params.useCounterfactualAddressForRefund,
447
451
  id: params.id,
448
452
  stepsToBuy: params.stepsToBuy.toString(),
453
+ minStepsToBuy: params.minStepsToBuy.toString(),
449
454
  });
450
455
  throw new Error(parseViemError(error));
451
456
  } finally {
@@ -530,13 +530,6 @@ export interface RewardScoreResponse {
530
530
  glwPriceUsd6: string;
531
531
  regionInfo: {
532
532
  regionId: number;
533
- existingFarmCount: number;
534
- existingTotalDepositsUsd: string;
535
- currencyBreakdown: {
536
- currency: string;
537
- protocolDepositSum: string;
538
- carbonCreditProductionSum: string;
539
- }[];
540
533
  regionGctlStaked: string;
541
534
  totalGctlStakedAllRegions: string;
542
535
  };
@@ -592,18 +585,9 @@ export interface MiningScoreResponse {
592
585
  userWeeklyGlwRewards: string; // User's portion of weekly GLW rewards after split (18 decimals)
593
586
  glwPriceUsd6: string; // GLW price used in calculation (6 decimals)
594
587
  dollarCostOfMiner: string; // Dollar cost of miner (6 decimals)
595
- numberOfMiners: number; // Number of miners in the farm
596
- minerRewardSplit: string; // Miner reward split percentage (6 decimals)
597
588
  weeksOfMinerLifeRemaining: number; // Weeks of miner life remaining (calculated from farm's end reward period)
598
589
  regionInfo: {
599
590
  regionId: number;
600
- existingFarmCount: number;
601
- existingTotalDepositsUsd: string;
602
- currencyBreakdown: {
603
- currency: string;
604
- protocolDepositSum: string;
605
- carbonCreditProductionSum: string;
606
- }[];
607
591
  regionGctlStaked: string;
608
592
  totalGctlStakedAllRegions: string;
609
593
  };