@boostxyz/sdk 0.0.0-alpha.14 → 0.0.0-alpha.16

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 (153) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts.map +1 -1
  4. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  5. package/dist/Actions/EventAction.cjs +1 -1
  6. package/dist/Actions/EventAction.cjs.map +1 -1
  7. package/dist/Actions/EventAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.js +157 -55
  9. package/dist/Actions/EventAction.js.map +1 -1
  10. package/dist/AllowLists/AllowList.cjs +1 -1
  11. package/dist/AllowLists/AllowList.js +2 -2
  12. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  13. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  14. package/dist/AllowLists/SimpleAllowList.d.ts +9 -0
  15. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  16. package/dist/AllowLists/SimpleAllowList.js +42 -26
  17. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  18. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  19. package/dist/AllowLists/SimpleDenyList.d.ts +9 -0
  20. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.js +2 -2
  22. package/dist/Auth/PassthroughAuth.cjs +1 -1
  23. package/dist/Auth/PassthroughAuth.js +1 -1
  24. package/dist/Boost.js +10 -22
  25. package/dist/Boost.js.map +1 -1
  26. package/dist/BoostCore.cjs +2 -2
  27. package/dist/BoostCore.cjs.map +1 -1
  28. package/dist/BoostCore.js +120 -106
  29. package/dist/BoostCore.js.map +1 -1
  30. package/dist/BoostRegistry.cjs +1 -1
  31. package/dist/BoostRegistry.cjs.map +1 -1
  32. package/dist/BoostRegistry.js +12 -12
  33. package/dist/Budgets/Budget.cjs +1 -1
  34. package/dist/Budgets/Budget.js +1 -1
  35. package/dist/Budgets/ManagedBudget.cjs +1 -1
  36. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  37. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  38. package/dist/Budgets/ManagedBudget.js +34 -35
  39. package/dist/Budgets/ManagedBudget.js.map +1 -1
  40. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  41. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  42. package/dist/Deployable/Contract.cjs.map +1 -1
  43. package/dist/Deployable/Contract.js +1 -2
  44. package/dist/Deployable/Contract.js.map +1 -1
  45. package/dist/Deployable/Deployable.cjs.map +1 -1
  46. package/dist/Deployable/Deployable.d.ts.map +1 -1
  47. package/dist/Deployable/Deployable.js +2 -4
  48. package/dist/Deployable/Deployable.js.map +1 -1
  49. package/dist/Deployable/DeployableTarget.cjs +1 -1
  50. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  51. package/dist/Deployable/DeployableTarget.d.ts +1 -1
  52. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  53. package/dist/Deployable/DeployableTarget.js +3 -5
  54. package/dist/Deployable/DeployableTarget.js.map +1 -1
  55. package/dist/Incentive-CqX3fYEd.cjs +2 -0
  56. package/dist/Incentive-CqX3fYEd.cjs.map +1 -0
  57. package/dist/Incentive-CtuAJAjG.js +299 -0
  58. package/dist/Incentive-CtuAJAjG.js.map +1 -0
  59. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  60. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  61. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  62. package/dist/Incentives/AllowListIncentive.js +10 -11
  63. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  65. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  66. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  67. package/dist/Incentives/CGDAIncentive.js +10 -11
  68. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  69. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  70. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  71. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  72. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  73. package/dist/Incentives/ERC20Incentive.js +18 -19
  74. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  75. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  76. package/dist/Incentives/Incentive.cjs +1 -1
  77. package/dist/Incentives/Incentive.cjs.map +1 -1
  78. package/dist/Incentives/Incentive.js +16 -300
  79. package/dist/Incentives/Incentive.js.map +1 -1
  80. package/dist/Incentives/PointsIncentive.cjs +1 -1
  81. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  82. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  83. package/dist/Incentives/PointsIncentive.js +8 -9
  84. package/dist/Incentives/PointsIncentive.js.map +1 -1
  85. package/dist/{SimpleDenyList-DeJRKD2D.cjs → SimpleDenyList-9UIxZZKP.cjs} +2 -2
  86. package/dist/SimpleDenyList-9UIxZZKP.cjs.map +1 -0
  87. package/dist/{SimpleDenyList-C21O9Yfi.js → SimpleDenyList-DGPNc7ov.js} +43 -27
  88. package/dist/SimpleDenyList-DGPNc7ov.js.map +1 -0
  89. package/dist/Validators/SignerValidator.cjs +1 -1
  90. package/dist/Validators/SignerValidator.cjs.map +1 -1
  91. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  92. package/dist/Validators/SignerValidator.js +15 -16
  93. package/dist/Validators/SignerValidator.js.map +1 -1
  94. package/dist/Validators/Validator.cjs +1 -1
  95. package/dist/Validators/Validator.js +1 -1
  96. package/dist/generated-BLg7yPgI.cjs +3 -0
  97. package/dist/generated-BLg7yPgI.cjs.map +1 -0
  98. package/dist/{generated-LpgSHrH0.js → generated-DLMdMwD1.js} +379 -359
  99. package/dist/generated-DLMdMwD1.js.map +1 -0
  100. package/dist/index.cjs +1 -1
  101. package/dist/index.d.ts +3 -0
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +96 -84
  104. package/dist/index.js.map +1 -1
  105. package/dist/utils.cjs.map +1 -1
  106. package/dist/utils.js.map +1 -1
  107. package/package.json +6 -6
  108. package/src/Actions/Action.test.ts +4 -4
  109. package/src/Actions/ContractAction.test.ts +4 -4
  110. package/src/Actions/ContractAction.ts +1 -3
  111. package/src/Actions/ERC721MintAction.test.ts +4 -4
  112. package/src/Actions/ERC721MintAction.ts +1 -3
  113. package/src/Actions/EventAction.test.ts +7 -7
  114. package/src/Actions/EventAction.ts +0 -1
  115. package/src/AllowLists/AllowList.test.ts +2 -2
  116. package/src/AllowLists/OpenAllowList.test.ts +3 -3
  117. package/src/AllowLists/SimpleAllowList.test.ts +2 -2
  118. package/src/AllowLists/SimpleAllowList.ts +21 -1
  119. package/src/AllowLists/SimpleDenyList.test.ts +2 -2
  120. package/src/AllowLists/SimpleDenyList.ts +21 -1
  121. package/src/Auth/PassthroughAuth.test.ts +1 -1
  122. package/src/BoostCore.test.ts +10 -12
  123. package/src/Budgets/Budget.test.ts +2 -2
  124. package/src/Budgets/ManagedBudget.test.ts +6 -6
  125. package/src/Budgets/ManagedBudget.ts +0 -1
  126. package/src/Budgets/SimpleBudget.test.ts +5 -5
  127. package/src/Budgets/SimpleBudget.ts +1 -3
  128. package/src/Budgets/VestingBudget.test.ts +4 -4
  129. package/src/Budgets/VestingBudget.ts +1 -3
  130. package/src/Deployable/DeployableTarget.ts +2 -2
  131. package/src/Incentives/AllowListIncentive.test.ts +3 -3
  132. package/src/Incentives/AllowListIncentive.ts +0 -1
  133. package/src/Incentives/CGDAIncentive.test.ts +3 -3
  134. package/src/Incentives/CGDAIncentive.ts +0 -1
  135. package/src/Incentives/ERC1155Incentive.test.ts +3 -3
  136. package/src/Incentives/ERC1155Incentive.ts +1 -3
  137. package/src/Incentives/ERC20Incentive.test.ts +3 -3
  138. package/src/Incentives/ERC20Incentive.ts +0 -1
  139. package/src/Incentives/ERC20VariableIncentive.test.ts +3 -3
  140. package/src/Incentives/ERC20VariableIncentive.ts +0 -1
  141. package/src/Incentives/Incentive.test.ts +1 -1
  142. package/src/Incentives/PointsIncentive.test.ts +4 -4
  143. package/src/Incentives/PointsIncentive.ts +0 -1
  144. package/src/Validators/SignerValidator.test.ts +4 -4
  145. package/src/Validators/SignerValidator.ts +0 -1
  146. package/src/Validators/Validator.test.ts +2 -2
  147. package/src/index.ts +3 -0
  148. package/src/utils.test.ts +2 -2
  149. package/dist/SimpleDenyList-C21O9Yfi.js.map +0 -1
  150. package/dist/SimpleDenyList-DeJRKD2D.cjs.map +0 -1
  151. package/dist/generated-LpgSHrH0.js.map +0 -1
  152. package/dist/generated-tq_HLZJ0.cjs +0 -3
  153. package/dist/generated-tq_HLZJ0.cjs.map +0 -1
@@ -5,13 +5,13 @@ import {
5
5
  type Fixtures,
6
6
  defaultOptions,
7
7
  deployFixtures,
8
- } from '../../test/helpers';
8
+ } from '@boostxyz/test/helpers';
9
9
  import { SimpleAllowList } from './SimpleAllowList';
10
10
 
11
11
  let fixtures: Fixtures;
12
12
 
13
13
  beforeAll(async () => {
14
- fixtures = await loadFixture(deployFixtures);
14
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
15
15
  });
16
16
 
17
17
  function freshAllowList(fixtures: Fixtures) {
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  readSimpleAllowListIsAllowed,
3
+ readSimpleAllowListOwner,
3
4
  simpleAllowListAbi,
4
5
  simulateSimpleAllowListGrantRoles,
5
6
  simulateSimpleAllowListSetAllowed,
@@ -97,7 +98,6 @@ export class SimpleAllowList extends DeployableTarget<
97
98
  */
98
99
  public static override bases: Record<number, Address> = {
99
100
  ...(SimpleAllowListBases as Record<number, Address>),
100
- 31337: import.meta.env.VITE_SIMPLE_ALLOWLIST_BASE,
101
101
  };
102
102
  /**
103
103
  * @inheritdoc
@@ -108,6 +108,26 @@ export class SimpleAllowList extends DeployableTarget<
108
108
  */
109
109
  public static override registryType: RegistryType = RegistryType.ALLOW_LIST;
110
110
 
111
+ /**
112
+ * Retrieves the owner
113
+ *
114
+ * @public
115
+ * @async
116
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'owner'>} [params]
117
+ * @returns {Promise<Address>} - The address of the owner
118
+ */
119
+ public async owner(
120
+ params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,
121
+ ): Promise<Address> {
122
+ return await readSimpleAllowListOwner(this._config, {
123
+ ...this.optionallyAttachAccount(),
124
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
125
+ ...(params as any),
126
+ address: this.assertValidAddress(),
127
+ args: [],
128
+ });
129
+ }
130
+
111
131
  /**
112
132
  * Check if a user is authorized.
113
133
  *
@@ -5,13 +5,13 @@ import {
5
5
  type Fixtures,
6
6
  defaultOptions,
7
7
  deployFixtures,
8
- } from '../../test/helpers';
8
+ } from '@boostxyz/test/helpers';
9
9
  import { SimpleDenyList } from './SimpleDenyList';
10
10
 
11
11
  let fixtures: Fixtures;
12
12
 
13
13
  beforeAll(async () => {
14
- fixtures = await loadFixture(deployFixtures);
14
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
15
15
  });
16
16
 
17
17
  function freshDenyList(fixtures: Fixtures) {
@@ -1,4 +1,5 @@
1
1
  import {
2
+ readSimpleAllowListOwner,
2
3
  readSimpleDenyListIsAllowed,
3
4
  simpleDenyListAbi,
4
5
  simulateSimpleDenyListSetDenied,
@@ -88,7 +89,6 @@ export class SimpleDenyList<
88
89
  */
89
90
  public static override bases: Record<number, Address> = {
90
91
  ...(SimpleDenyListBases as Record<number, Address>),
91
- 31337: import.meta.env.VITE_SIMPLE_DENYLIST_BASE,
92
92
  };
93
93
  /**
94
94
  * @inheritdoc
@@ -99,6 +99,26 @@ export class SimpleDenyList<
99
99
  */
100
100
  public static override registryType: RegistryType = RegistryType.ALLOW_LIST;
101
101
 
102
+ /**
103
+ * Retrieves the owner
104
+ *
105
+ * @public
106
+ * @async
107
+ * @param {?ReadParams<typeof simpleDenyListAbi, 'owner'>} [params]
108
+ * @returns {Promise<Address>} - The address of the owner
109
+ */
110
+ public async owner(
111
+ params?: ReadParams<typeof simpleDenyListAbi, 'owner'>,
112
+ ): Promise<Address> {
113
+ return await readSimpleAllowListOwner(this._config, {
114
+ ...this.optionallyAttachAccount(),
115
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
116
+ ...(params as any),
117
+ address: this.assertValidAddress(),
118
+ args: [],
119
+ });
120
+ }
121
+
102
122
  /**
103
123
  * Check if a user is authorized (i.e. not denied)
104
124
  *
@@ -1,6 +1,6 @@
1
1
  import { zeroAddress } from 'viem';
2
2
  import { describe, expect, test } from 'vitest';
3
- import { defaultOptions } from '../../test/helpers';
3
+ import { defaultOptions } from '@boostxyz/test/helpers';
4
4
  import { PassthroughAuth } from './PassthroughAuth';
5
5
 
6
6
  describe('PassthroughAuth', () => {
@@ -8,11 +8,9 @@ import {
8
8
  deployFixtures,
9
9
  fundBudget,
10
10
  makeMockEventActionPayload,
11
- } from '../test/helpers';
11
+ } from '@boostxyz/test/helpers';
12
12
  import { ContractAction } from './Actions/ContractAction';
13
- import { BoostCore } from './BoostCore';
14
13
  import type { ERC20Incentive } from './Incentives/ERC20Incentive';
15
- import { ERC1155StrategyType } from './Incentives/ERC1155Incentive';
16
14
  import { StrategyType } from './claiming';
17
15
  import { IncentiveNotCloneableError } from './errors';
18
16
  import { bytes4 } from './utils';
@@ -21,7 +19,7 @@ let fixtures: Fixtures, budgets: BudgetFixtures;
21
19
 
22
20
  describe('BoostCore', () => {
23
21
  beforeAll(async () => {
24
- fixtures = await loadFixture(deployFixtures);
22
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
25
23
  });
26
24
  beforeEach(async () => {
27
25
  budgets = await loadFixture(fundBudget(defaultOptions, fixtures));
@@ -463,13 +461,13 @@ describe('BoostCore', () => {
463
461
  limit: 10n,
464
462
  strategy: StrategyType.POOL,
465
463
  });
466
- const erc1155Incentive = core.ERC1155Incentive({
467
- asset: erc1155.assertValidAddress(),
468
- strategy: ERC1155StrategyType.POOL,
469
- limit: 1n,
470
- tokenId: 1n,
471
- extraData: '0x',
472
- });
464
+ // const erc1155Incentive = core.ERC1155Incentive({
465
+ // asset: erc1155.assertValidAddress(),
466
+ // strategy: ERC1155StrategyType.POOL,
467
+ // limit: 1n,
468
+ // tokenId: 1n,
469
+ // extraData: '0x',
470
+ // });
473
471
  const cgdaIncentive = core.CGDAIncentive({
474
472
  asset: erc20.assertValidAddress(),
475
473
  initialReward: 1n,
@@ -505,7 +503,7 @@ describe('BoostCore', () => {
505
503
  }),
506
504
  allowList: core.SimpleAllowList(allowList.assertValidAddress()),
507
505
  incentives: [
508
- erc1155Incentive,
506
+ // erc1155Incentive,
509
507
  erc20Incentive,
510
508
  cgdaIncentive,
511
509
  allowListIncentive,
@@ -5,14 +5,14 @@ import {
5
5
  defaultOptions,
6
6
  deployFixtures,
7
7
  freshManagedBudget,
8
- } from '../../test/helpers';
8
+ } from '@boostxyz/test/helpers';
9
9
  import { budgetFromAddress } from './Budget';
10
10
  import { ManagedBudget } from './ManagedBudget';
11
11
 
12
12
  let fixtures: Fixtures;
13
13
 
14
14
  beforeAll(async () => {
15
- fixtures = await loadFixture(deployFixtures);
15
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
16
16
  });
17
17
 
18
18
  describe('Budget', () => {
@@ -2,9 +2,9 @@ import { writeMockErc1155SetApprovalForAll } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, parseEther, zeroAddress } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import type { MockERC20 } from '../../test/MockERC20';
6
- import type { MockERC1155 } from '../../test/MockERC1155';
7
- import { accounts } from '../../test/accounts';
5
+ import type { MockERC20 } from '@boostxyz/test/MockERC20';
6
+ import type { MockERC1155 } from '@boostxyz/test/MockERC1155';
7
+ import { accounts } from '@boostxyz/test/accounts';
8
8
  import {
9
9
  type Fixtures,
10
10
  defaultOptions,
@@ -14,8 +14,8 @@ import {
14
14
  fundErc20,
15
15
  fundErc1155,
16
16
  fundManagedBudget,
17
- } from '../../test/helpers';
18
- import { testAccount } from '../../test/viem';
17
+ } from '@boostxyz/test/helpers';
18
+ import { testAccount } from '@boostxyz/test/viem';
19
19
  import { ManagedBudget, ManagedBudgetRoles } from './ManagedBudget';
20
20
 
21
21
  let fixtures: Fixtures,
@@ -24,7 +24,7 @@ let fixtures: Fixtures,
24
24
  erc1155: MockERC1155;
25
25
 
26
26
  beforeAll(async () => {
27
- fixtures = await loadFixture(deployFixtures);
27
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
28
28
  });
29
29
 
30
30
  describe('ManagedBudget', () => {
@@ -193,7 +193,6 @@ export class ManagedBudget extends DeployableTarget<
193
193
  */
194
194
  public static override bases: Record<number, Address> = {
195
195
  ...(ManagedBudgetBases as Record<number, Address>),
196
- 31337: import.meta.env.VITE_MANAGED_BUDGET_BASE,
197
196
  };
198
197
  /**
199
198
  * @inheritdoc
@@ -2,8 +2,8 @@ import { writeMockErc1155SetApprovalForAll } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, parseEther, zeroAddress } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import type { MockERC20 } from '../../test/MockERC20';
6
- import type { MockERC1155 } from '../../test/MockERC1155';
5
+ import type { MockERC20 } from '@boostxyz/test/MockERC20';
6
+ import type { MockERC1155 } from '@boostxyz/test/MockERC1155';
7
7
  import {
8
8
  type Fixtures,
9
9
  defaultOptions,
@@ -12,8 +12,8 @@ import {
12
12
  fundBudget,
13
13
  fundErc20,
14
14
  fundErc1155,
15
- } from '../../test/helpers';
16
- import { testAccount } from '../../test/viem';
15
+ } from '@boostxyz/test/helpers';
16
+ import { testAccount } from '@boostxyz/test/viem';
17
17
  import { SimpleBudget } from './SimpleBudget';
18
18
 
19
19
  let fixtures: Fixtures,
@@ -22,7 +22,7 @@ let fixtures: Fixtures,
22
22
  erc1155: MockERC1155;
23
23
 
24
24
  beforeAll(async () => {
25
- fixtures = await loadFixture(deployFixtures);
25
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
26
26
  });
27
27
 
28
28
  describe.skip('SimpleBudget', () => {
@@ -153,9 +153,7 @@ export class SimpleBudget extends DeployableTarget<
153
153
  * @static
154
154
  * @type {Record<number, Address>}
155
155
  */
156
- public static override bases: Record<number, Address> = {
157
- 31337: import.meta.env.VITE_SIMPLE_BUDGET_BASE,
158
- };
156
+ public static override bases: Record<number, Address> = {};
159
157
  /**
160
158
  * @inheritdoc
161
159
  *
@@ -1,7 +1,7 @@
1
1
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
2
2
  import { isAddress, parseEther, zeroAddress } from 'viem';
3
3
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
4
- import type { MockERC20 } from '../../test/MockERC20';
4
+ import type { MockERC20 } from '@boostxyz/test/MockERC20';
5
5
  import {
6
6
  type Fixtures,
7
7
  defaultOptions,
@@ -9,14 +9,14 @@ import {
9
9
  freshVestingBudget,
10
10
  fundErc20,
11
11
  fundVestingBudget,
12
- } from '../../test/helpers';
13
- import { testAccount } from '../../test/viem';
12
+ } from '@boostxyz/test/helpers';
13
+ import { testAccount } from '@boostxyz/test/viem';
14
14
  import { VestingBudget } from './VestingBudget';
15
15
 
16
16
  let fixtures: Fixtures, budget: VestingBudget, erc20: MockERC20;
17
17
 
18
18
  beforeAll(async () => {
19
- fixtures = await loadFixture(deployFixtures);
19
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
20
20
  });
21
21
 
22
22
  describe.skip('VestingBudget', () => {
@@ -129,9 +129,7 @@ export class VestingBudget extends DeployableTarget<
129
129
  * @static
130
130
  * @type {Record<number, Address>}
131
131
  */
132
- public static override bases: Record<number, Address> = {
133
- 31337: import.meta.env.VITE_VESTING_BUDGET_BASE,
134
- };
132
+ public static override bases: Record<number, Address> = {};
135
133
  /**
136
134
  * @inheritdoc
137
135
  *
@@ -60,8 +60,8 @@ export class DeployableTarget<
60
60
  * @readonly
61
61
  * @type {boolean}
62
62
  */
63
- protected _isBase = true;
64
- get isBase() {
63
+ readonly _isBase: boolean = true;
64
+ public get isBase() {
65
65
  if (
66
66
  !!this.address &&
67
67
  Object.values(this.bases).some((base) =>
@@ -1,13 +1,13 @@
1
1
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
2
2
  import { isAddress, pad, parseEther, zeroAddress } from 'viem';
3
3
  import { beforeAll, describe, expect, test } from 'vitest';
4
- import { accounts } from '../../test/accounts';
4
+ import { accounts } from '@boostxyz/test/accounts';
5
5
  import {
6
6
  type Fixtures,
7
7
  defaultOptions,
8
8
  deployFixtures,
9
9
  freshBoost,
10
- } from '../../test/helpers';
10
+ } from '@boostxyz/test/helpers';
11
11
  import { LIST_MANAGER_ROLE } from '../AllowLists/SimpleAllowList';
12
12
  import { PointsIncentive } from './PointsIncentive';
13
13
 
@@ -27,7 +27,7 @@ function freshAllowList(fixtures: Fixtures) {
27
27
 
28
28
  describe('AllowListIncentive', () => {
29
29
  beforeAll(async () => {
30
- fixtures = await loadFixture(deployFixtures);
30
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
31
31
  });
32
32
 
33
33
  test('can successfully be deployed', async () => {
@@ -97,7 +97,6 @@ export class AllowListIncentive extends DeployableTarget<
97
97
  */
98
98
  public static override bases: Record<number, Address> = {
99
99
  ...(AllowListIncentiveBases as Record<number, Address>),
100
- 31337: import.meta.env.VITE_ALLOWLIST_INCENTIVE_BASE,
101
100
  };
102
101
  /**
103
102
  * @inheritdoc
@@ -2,7 +2,7 @@ import { readMockErc20BalanceOf } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, pad, parseEther } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import { accounts } from '../../test/accounts';
5
+ import { accounts } from '@boostxyz/test/accounts';
6
6
  import {
7
7
  type BudgetFixtures,
8
8
  type Fixtures,
@@ -10,14 +10,14 @@ import {
10
10
  deployFixtures,
11
11
  freshBoost,
12
12
  fundBudget,
13
- } from '../../test/helpers';
13
+ } from '@boostxyz/test/helpers';
14
14
  import { CGDAIncentive } from './CGDAIncentive';
15
15
 
16
16
  let fixtures: Fixtures, budgets: BudgetFixtures;
17
17
 
18
18
  describe('CGDAIncentive', () => {
19
19
  beforeAll(async () => {
20
- fixtures = await loadFixture(deployFixtures);
20
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
21
21
  });
22
22
 
23
23
  beforeEach(async () => {
@@ -149,7 +149,6 @@ export class CGDAIncentive extends DeployableTarget<
149
149
  */
150
150
  public static override bases: Record<number, Address> = {
151
151
  ...(CGDAIncentiveBases as Record<number, Address>),
152
- 31337: import.meta.env.VITE_CGDA_INCENTIVE_BASE,
153
152
  };
154
153
  /**
155
154
  * @inheritdoc
@@ -2,7 +2,7 @@ import { readMockErc1155BalanceOf } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, pad, parseEther, zeroAddress, zeroHash } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import { accounts } from '../../test/accounts';
5
+ import { accounts } from '@boostxyz/test/accounts';
6
6
  import {
7
7
  type BudgetFixtures,
8
8
  type Fixtures,
@@ -10,7 +10,7 @@ import {
10
10
  deployFixtures,
11
11
  freshBoost,
12
12
  fundBudget,
13
- } from '../../test/helpers';
13
+ } from '@boostxyz/test/helpers';
14
14
  import { ERC1155Incentive, ERC1155StrategyType } from './ERC1155Incentive';
15
15
 
16
16
  const BOOST_CORE_CLAIM_FEE = parseEther('0.000075');
@@ -19,7 +19,7 @@ let fixtures: Fixtures, budgets: BudgetFixtures;
19
19
 
20
20
  describe.skip('ERC1155Incentive', () => {
21
21
  beforeAll(async () => {
22
- fixtures = await loadFixture(deployFixtures);
22
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
23
23
  });
24
24
 
25
25
  beforeEach(async () => {
@@ -129,9 +129,7 @@ export class ERC1155Incentive extends DeployableTarget<
129
129
  * @static
130
130
  * @type {Record<number, Address>}
131
131
  */
132
- public static override bases: Record<number, Address> = {
133
- 31337: import.meta.env.VITE_ERC1155_INCENTIVE_BASE,
134
- };
132
+ public static override bases: Record<number, Address> = {};
135
133
  /**
136
134
  * @inheritdoc
137
135
  *
@@ -2,7 +2,7 @@ import { readMockErc20BalanceOf } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, pad, parseEther, zeroAddress } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import { accounts } from '../../test/accounts';
5
+ import { accounts } from '@boostxyz/test/accounts';
6
6
  import {
7
7
  type BudgetFixtures,
8
8
  type Fixtures,
@@ -10,7 +10,7 @@ import {
10
10
  deployFixtures,
11
11
  freshBoost,
12
12
  fundBudget,
13
- } from '../../test/helpers';
13
+ } from '@boostxyz/test/helpers';
14
14
  import { BOOST_CORE_CLAIM_FEE } from '../BoostCore';
15
15
  import { StrategyType } from '../claiming';
16
16
  import { ERC20Incentive } from './ERC20Incentive';
@@ -19,7 +19,7 @@ let fixtures: Fixtures, budgets: BudgetFixtures;
19
19
 
20
20
  describe('ERC20Incentive', () => {
21
21
  beforeAll(async () => {
22
- fixtures = await loadFixture(deployFixtures);
22
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
23
23
  });
24
24
 
25
25
  beforeEach(async () => {
@@ -115,7 +115,6 @@ export class ERC20Incentive extends DeployableTarget<
115
115
  */
116
116
  public static override bases: Record<number, Address> = {
117
117
  ...(ERC20IncentiveBases as Record<number, Address>),
118
- 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE,
119
118
  };
120
119
  /**
121
120
  * @inheritdoc
@@ -2,7 +2,7 @@ import { readMockErc20BalanceOf } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { encodeAbiParameters, isAddress, parseEther, zeroAddress } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import { accounts } from '../../test/accounts';
5
+ import { accounts } from '@boostxyz/test/accounts';
6
6
  import {
7
7
  type BudgetFixtures,
8
8
  type Fixtures,
@@ -10,7 +10,7 @@ import {
10
10
  deployFixtures,
11
11
  freshBoost,
12
12
  fundBudget,
13
- } from '../../test/helpers';
13
+ } from '@boostxyz/test/helpers';
14
14
  import { ERC20VariableIncentive } from './ERC20VariableIncentive';
15
15
 
16
16
  const BOOST_CORE_CLAIM_FEE = parseEther('0.000075');
@@ -19,7 +19,7 @@ let fixtures: Fixtures, budgets: BudgetFixtures;
19
19
 
20
20
  describe('ERC20VariableIncentive', () => {
21
21
  beforeAll(async () => {
22
- fixtures = await loadFixture(deployFixtures);
22
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
23
23
  });
24
24
 
25
25
  beforeEach(async () => {
@@ -101,7 +101,6 @@ export class ERC20VariableIncentive extends DeployableTarget<
101
101
  */
102
102
  public static override bases: Record<number, Address> = {
103
103
  ...(ERC20VariableIncentiveBases as Record<number, Address>),
104
- 31337: import.meta.env.VITE_ERC20_VARIABLE_INCENTIVE_BASE,
105
104
  };
106
105
  /**
107
106
  * @inheritdoc
@@ -1,6 +1,6 @@
1
1
  import { zeroAddress } from 'viem';
2
2
  import { describe, expect, test } from 'vitest';
3
- import { defaultOptions } from '../../test/helpers';
3
+ import { defaultOptions } from '@boostxyz/test/helpers';
4
4
  import { StrategyType } from '../claiming';
5
5
  import {
6
6
  AllowListIncentive,
@@ -2,15 +2,15 @@ import { readPointsBalanceOf, writePointsGrantRoles } from '@boostxyz/evm';
2
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
3
3
  import { isAddress, pad, parseEther, zeroAddress } from 'viem';
4
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
5
- import type { MockPoints } from '../../test/MockPoints';
6
- import { accounts } from '../../test/accounts';
5
+ import type { MockPoints } from '@boostxyz/test/MockPoints';
6
+ import { accounts } from '@boostxyz/test/accounts';
7
7
  import {
8
8
  type Fixtures,
9
9
  defaultOptions,
10
10
  deployFixtures,
11
11
  freshBoost,
12
12
  freshPoints,
13
- } from '../../test/helpers';
13
+ } from '@boostxyz/test/helpers';
14
14
  import { bytes4 } from '../utils';
15
15
  import { PointsIncentive } from './PointsIncentive';
16
16
 
@@ -18,7 +18,7 @@ let fixtures: Fixtures, points: MockPoints;
18
18
 
19
19
  describe('PointsIncentive', () => {
20
20
  beforeAll(async () => {
21
- fixtures = await loadFixture(deployFixtures);
21
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
22
22
  });
23
23
 
24
24
  beforeEach(async () => {
@@ -110,7 +110,6 @@ export class PointsIncentive extends DeployableTarget<
110
110
  */
111
111
  public static override bases: Record<number, Address> = {
112
112
  ...(PointsIncentiveBases as Record<number, Address>),
113
- 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,
114
113
  };
115
114
  /**
116
115
  * @inheritdoc
@@ -1,13 +1,13 @@
1
1
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
2
2
  import { isAddress, pad } from 'viem';
3
3
  import { beforeAll, describe, expect, test } from 'vitest';
4
- import { accounts } from '../../test/accounts';
4
+ import { accounts } from '@boostxyz/test/accounts';
5
5
  import {
6
6
  type Fixtures,
7
7
  defaultOptions,
8
8
  deployFixtures,
9
- } from '../../test/helpers';
10
- import { testAccount } from '../../test/viem';
9
+ } from '@boostxyz/test/helpers';
10
+ import { testAccount } from '@boostxyz/test/viem';
11
11
  import { SignerValidator } from './SignerValidator';
12
12
 
13
13
  let fixtures: Fixtures;
@@ -28,7 +28,7 @@ function freshValidator(fixtures: Fixtures) {
28
28
 
29
29
  describe('SignerValidator', () => {
30
30
  beforeAll(async () => {
31
- fixtures = await loadFixture(deployFixtures);
31
+ fixtures = await loadFixture(deployFixtures(defaultOptions));
32
32
  });
33
33
 
34
34
  test('can successfully be deployed', async () => {
@@ -311,7 +311,6 @@ export class SignerValidator extends DeployableTarget<
311
311
  */
312
312
  public static override bases: Record<number, Address> = {
313
313
  ...(SignerValidatorBases as Record<number, Address>),
314
- 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,
315
314
  };
316
315
  /**
317
316
  * @inheritdoc
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from 'vitest';
2
- import { defaultOptions } from '../../test/helpers';
3
- import { testAccount } from '../../test/viem';
2
+ import { defaultOptions } from '@boostxyz/test/helpers';
3
+ import { testAccount } from '@boostxyz/test/viem';
4
4
  import { SignerValidator } from './SignerValidator';
5
5
  import { validatorFromAddress } from './Validator';
6
6
 
package/src/index.ts CHANGED
@@ -33,6 +33,7 @@ export * from './Deployable/DeployableTarget';
33
33
  export * from './Incentives/AllowListIncentive';
34
34
  export * from './Incentives/CGDAIncentive';
35
35
  export * from './Incentives/ERC20Incentive';
36
+ export * from './Incentives/ERC20VariableIncentive';
36
37
  // export * from './Incentives/ERC1155Incentive';
37
38
  export * from './Incentives/Incentive';
38
39
  export * from './Incentives/PointsIncentive';
@@ -46,6 +47,8 @@ export * from './Validators/Validator';
46
47
 
47
48
  export * from './errors';
48
49
  export * from './utils';
50
+ export * from './claiming';
51
+ export * from './transfers';
49
52
 
50
53
  // Auth
51
54
 
package/src/utils.test.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { simulateMockErc20Mint, writeMockErc20Mint } from '@boostxyz/evm';
2
2
  import { isAddress } from 'viem';
3
3
  import { describe, expect, test } from 'vitest';
4
- import { MockERC20 } from '../test/MockERC20';
5
- import { defaultOptions } from '../test/helpers';
4
+ import { MockERC20 } from '@boostxyz/test/MockERC20';
5
+ import { defaultOptions } from '@boostxyz/test/helpers';
6
6
  import { awaitResult, bytes4, getDeployedContractAddress } from './utils';
7
7
 
8
8
  describe('bytes4', () => {