@boostxyz/sdk 0.0.0-alpha.13 → 0.0.0-alpha.15

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 (151) 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 +68 -63
  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.map +1 -1
  15. package/dist/AllowLists/SimpleAllowList.js +10 -11
  16. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  17. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  18. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleDenyList.js +2 -2
  20. package/dist/Auth/PassthroughAuth.cjs +1 -1
  21. package/dist/Auth/PassthroughAuth.js +1 -1
  22. package/dist/Boost.js +10 -22
  23. package/dist/Boost.js.map +1 -1
  24. package/dist/BoostCore.cjs +2 -2
  25. package/dist/BoostCore.cjs.map +1 -1
  26. package/dist/BoostCore.js +90 -76
  27. package/dist/BoostCore.js.map +1 -1
  28. package/dist/BoostRegistry.cjs +1 -1
  29. package/dist/BoostRegistry.cjs.map +1 -1
  30. package/dist/BoostRegistry.js +12 -12
  31. package/dist/Budgets/Budget.cjs +1 -1
  32. package/dist/Budgets/Budget.js +1 -1
  33. package/dist/Budgets/ManagedBudget.cjs +1 -1
  34. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  35. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  36. package/dist/Budgets/ManagedBudget.js +34 -35
  37. package/dist/Budgets/ManagedBudget.js.map +1 -1
  38. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  39. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  40. package/dist/Deployable/Contract.cjs.map +1 -1
  41. package/dist/Deployable/Contract.js +1 -2
  42. package/dist/Deployable/Contract.js.map +1 -1
  43. package/dist/Deployable/Deployable.cjs.map +1 -1
  44. package/dist/Deployable/Deployable.d.ts.map +1 -1
  45. package/dist/Deployable/Deployable.js +2 -4
  46. package/dist/Deployable/Deployable.js.map +1 -1
  47. package/dist/Deployable/DeployableTarget.cjs +1 -1
  48. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  49. package/dist/Deployable/DeployableTarget.d.ts +1 -1
  50. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  51. package/dist/Deployable/DeployableTarget.js +3 -5
  52. package/dist/Deployable/DeployableTarget.js.map +1 -1
  53. package/dist/Incentive-BroOQqVi.cjs +2 -0
  54. package/dist/Incentive-BroOQqVi.cjs.map +1 -0
  55. package/dist/Incentive-CSnbCt3P.js +299 -0
  56. package/dist/Incentive-CSnbCt3P.js.map +1 -0
  57. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  59. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.js +10 -11
  61. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  62. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  63. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.js +10 -11
  66. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  67. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  68. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  70. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.js +18 -19
  72. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  73. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  74. package/dist/Incentives/Incentive.cjs +1 -1
  75. package/dist/Incentives/Incentive.cjs.map +1 -1
  76. package/dist/Incentives/Incentive.js +16 -300
  77. package/dist/Incentives/Incentive.js.map +1 -1
  78. package/dist/Incentives/PointsIncentive.cjs +1 -1
  79. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  80. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  81. package/dist/Incentives/PointsIncentive.js +8 -9
  82. package/dist/Incentives/PointsIncentive.js.map +1 -1
  83. package/dist/{SimpleDenyList-DeJRKD2D.cjs → SimpleDenyList-CzNNbmmV.cjs} +2 -2
  84. package/dist/SimpleDenyList-CzNNbmmV.cjs.map +1 -0
  85. package/dist/{SimpleDenyList-C21O9Yfi.js → SimpleDenyList-sfskWLfa.js} +9 -10
  86. package/dist/SimpleDenyList-sfskWLfa.js.map +1 -0
  87. package/dist/Validators/SignerValidator.cjs +1 -1
  88. package/dist/Validators/SignerValidator.cjs.map +1 -1
  89. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  90. package/dist/Validators/SignerValidator.js +15 -16
  91. package/dist/Validators/SignerValidator.js.map +1 -1
  92. package/dist/Validators/Validator.cjs +1 -1
  93. package/dist/Validators/Validator.js +1 -1
  94. package/dist/generated-BulULVyy.cjs +3 -0
  95. package/dist/generated-BulULVyy.cjs.map +1 -0
  96. package/dist/{generated-LpgSHrH0.js → generated-CdXG-MpB.js} +367 -351
  97. package/dist/generated-CdXG-MpB.js.map +1 -0
  98. package/dist/index.cjs +1 -1
  99. package/dist/index.d.ts +3 -0
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +96 -84
  102. package/dist/index.js.map +1 -1
  103. package/dist/utils.cjs.map +1 -1
  104. package/dist/utils.js.map +1 -1
  105. package/package.json +6 -6
  106. package/src/Actions/Action.test.ts +4 -4
  107. package/src/Actions/ContractAction.test.ts +4 -4
  108. package/src/Actions/ContractAction.ts +1 -3
  109. package/src/Actions/ERC721MintAction.test.ts +4 -4
  110. package/src/Actions/ERC721MintAction.ts +1 -3
  111. package/src/Actions/EventAction.test.ts +80 -83
  112. package/src/Actions/EventAction.ts +3 -2
  113. package/src/AllowLists/AllowList.test.ts +2 -2
  114. package/src/AllowLists/OpenAllowList.test.ts +3 -3
  115. package/src/AllowLists/SimpleAllowList.test.ts +2 -2
  116. package/src/AllowLists/SimpleAllowList.ts +1 -1
  117. package/src/AllowLists/SimpleDenyList.test.ts +2 -2
  118. package/src/AllowLists/SimpleDenyList.ts +0 -1
  119. package/src/Auth/PassthroughAuth.test.ts +1 -1
  120. package/src/BoostCore.test.ts +10 -12
  121. package/src/Budgets/Budget.test.ts +2 -2
  122. package/src/Budgets/ManagedBudget.test.ts +6 -6
  123. package/src/Budgets/ManagedBudget.ts +0 -1
  124. package/src/Budgets/SimpleBudget.test.ts +5 -5
  125. package/src/Budgets/SimpleBudget.ts +1 -3
  126. package/src/Budgets/VestingBudget.test.ts +4 -4
  127. package/src/Budgets/VestingBudget.ts +1 -3
  128. package/src/Deployable/DeployableTarget.ts +2 -2
  129. package/src/Incentives/AllowListIncentive.test.ts +3 -3
  130. package/src/Incentives/AllowListIncentive.ts +0 -1
  131. package/src/Incentives/CGDAIncentive.test.ts +3 -3
  132. package/src/Incentives/CGDAIncentive.ts +0 -1
  133. package/src/Incentives/ERC1155Incentive.test.ts +3 -3
  134. package/src/Incentives/ERC1155Incentive.ts +1 -3
  135. package/src/Incentives/ERC20Incentive.test.ts +3 -3
  136. package/src/Incentives/ERC20Incentive.ts +0 -1
  137. package/src/Incentives/ERC20VariableIncentive.test.ts +3 -3
  138. package/src/Incentives/ERC20VariableIncentive.ts +0 -1
  139. package/src/Incentives/Incentive.test.ts +1 -1
  140. package/src/Incentives/PointsIncentive.test.ts +4 -4
  141. package/src/Incentives/PointsIncentive.ts +0 -1
  142. package/src/Validators/SignerValidator.test.ts +4 -4
  143. package/src/Validators/SignerValidator.ts +0 -1
  144. package/src/Validators/Validator.test.ts +2 -2
  145. package/src/index.ts +3 -0
  146. package/src/utils.test.ts +2 -2
  147. package/dist/SimpleDenyList-C21O9Yfi.js.map +0 -1
  148. package/dist/SimpleDenyList-DeJRKD2D.cjs.map +0 -1
  149. package/dist/generated-LpgSHrH0.js.map +0 -1
  150. package/dist/generated-tq_HLZJ0.cjs +0 -3
  151. package/dist/generated-tq_HLZJ0.cjs.map +0 -1
@@ -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', () => {
@@ -1 +0,0 @@
1
- {"version":3,"file":"SimpleDenyList-C21O9Yfi.js","sources":["../src/AllowLists/SimpleDenyList.ts"],"sourcesContent":["import {\n readSimpleDenyListIsAllowed,\n simpleDenyListAbi,\n simulateSimpleDenyListSetDenied,\n writeSimpleDenyListSetDenied,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleDenyList as SimpleDenyListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleDenyListAbi };\n\n/**\n * Object representation of a {@link SimpleDenyList} initialization payload.\n *\n * @export\n * @interface SimpleDenyListPayload\n * @typedef {SimpleDenyListPayload}\n */\nexport interface SimpleDenyListPayload {\n /**\n * The allow list's owner\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of denied addresses.\n *\n * @type {Address[]}\n */\n denied: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleDenyList` event types.\n *\n * @export\n * @typedef {SimpleDenyListLog}\n * @template {ContractEventName<typeof simpleDenyListAbi>} [event=ContractEventName<\n * typeof simpleDenyListAbi\n * >]\n */\nexport type SimpleDenyListLog<\n event extends ContractEventName<typeof simpleDenyListAbi> = ContractEventName<\n typeof simpleDenyListAbi\n >,\n> = GenericLog<typeof simpleDenyListAbi, event>;\n\n/**\n * A simple implementation of an AllowList that implicitly allows all addresses except those explicitly added to the deny list\n *\n * @export\n * @class SimpleDenyList\n * @typedef {SimpleDenyList}\n * @extends {DeployableTarget<SimpleDenyListPayload>}\n */\nexport class SimpleDenyList<\n Payload = SimpleDenyListPayload,\n> extends DeployableTarget<Payload | undefined, typeof simpleDenyListAbi> {\n public override readonly abi = simpleDenyListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleDenyListBases as Record<number, Address>),\n 31337: import.meta.env.VITE_SIMPLE_DENYLIST_BASE,\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Check if a user is authorized (i.e. not denied)\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>,\n ): Promise<boolean> {\n return await readSimpleDenyListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDenied(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n return await this.awaitResult(\n this.setDeniedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDeniedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n const { request, result } = await simulateSimpleDenyListSetDenied(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleDenyListSetDenied(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleDenyListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [p, options] = this.validateDeploymentConfig(_payload, _options);\n const payload = p as SimpleDenyListPayload;\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleDenyListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleDenyListPayload} param0\n * @param {Address} param0.owner - The allow list's owner\n * @param {Address[]} param0.denied - List of denied addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleDenyListPayload({\n owner,\n denied,\n}: SimpleDenyListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'denied' },\n ],\n [owner, denied],\n );\n}\n"],"names":["_SimpleDenyList","DeployableTarget","simpleDenyListAbi","address","params","readSimpleDenyListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleDenyListSetDenied","writeSimpleDenyListSetDenied","_payload","_options","p","options","payload","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleDenyListPayload","SimpleDenyListBases","RegistryType","SimpleDenyList","denied","encodeAbiParameters"],"mappings":";;;;;;;kuRA6EaA,IAAN,MAAMA,UAEHC,EAAgE;AAAA,EAFnE,cAAA;AAAA,UAAA,GAAA,SAAA,GAGL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8B/B,MAAa,UACXC,GACAC,GACkB;AACX,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,GAASG,CAAQ;AAAA,MACxB,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,UACXG,GACAC,GACAJ,GACA;AACA,WAAO,MAAM,KAAK;AAAA,MAChB,KAAK,aAAaG,GAAWC,GAASJ,CAAM;AAAA,IAAA;AAAA,EAEhD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,aACXG,GACAC,GACAJ,GACA;AACA,UAAM,EAAE,SAAAK,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAACJ,GAAWC,CAAO;AAAA,QACzB,GAAG,KAAK,wBAAwB;AAAA;AAAA,QAEhC,GAAIJ;AAAA,MACN;AAAA,IAAA;AAGK,WAAA,EAAE,MADI,MAAMQ,EAA6B,KAAK,SAASH,CAAO,GACtD,QAAAC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdG,GACAC,GACyB;;AACzB,UAAM,CAACC,GAAGC,CAAO,IAAI,KAAK,yBAAyBH,GAAUC,CAAQ,GAC/DG,IAAUF;AAChB,QAAI,CAACE,EAAQ,SAASA,EAAQ,UAAUC,GAAa;AACnD,YAAMC,IAAQH,EAAQ,UAClBA,EAAQ,QAAQ,UAChBA,EAAQ,SACNI,EAAWJ,EAAQ,MAAM,EAAE,WAC3BK,IAAA,KAAK,aAAL,gBAAAA,EAAe;AACrB,UAAIF;AACF,QAAAF,EAAQ,QAAQE;AAAA;AAEhB,cAAM,IAAIG,EAAoC;AAAA,IAElD;AACO,WAAA;AAAA,MACL,KAAKpB;AAAAA,MACL,UAAAqB;AAAA,MACA,MAAM,CAACC,EAA6BP,CAAO,CAAC;AAAA,MAC5C,GAAG,KAAK,wBAAwBD,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AArHEhB,EAAuB,QAAiC;AAAA,EACtD,GAAIyB;AAAAA,EACJ,OAAO;AAAA,GASTzB,EAAuB,eAA6B0B,EAAa;AAtB5D,IAAMC,IAAN3B;AA0IA,SAASwB,EAA6B;AAAA,EAC3C,OAAAL;AAAA,EACA,QAAAS;AACF,GAA0B;AACjB,SAAAC;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,IACtC;AAAA,IACA,CAACV,GAAOS,CAAM;AAAA,EAAA;AAElB;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SimpleDenyList-DeJRKD2D.cjs","sources":["../src/AllowLists/SimpleDenyList.ts"],"sourcesContent":["import {\n readSimpleDenyListIsAllowed,\n simpleDenyListAbi,\n simulateSimpleDenyListSetDenied,\n writeSimpleDenyListSetDenied,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { SimpleDenyList as SimpleDenyListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleDenyListAbi };\n\n/**\n * Object representation of a {@link SimpleDenyList} initialization payload.\n *\n * @export\n * @interface SimpleDenyListPayload\n * @typedef {SimpleDenyListPayload}\n */\nexport interface SimpleDenyListPayload {\n /**\n * The allow list's owner\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of denied addresses.\n *\n * @type {Address[]}\n */\n denied: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleDenyList` event types.\n *\n * @export\n * @typedef {SimpleDenyListLog}\n * @template {ContractEventName<typeof simpleDenyListAbi>} [event=ContractEventName<\n * typeof simpleDenyListAbi\n * >]\n */\nexport type SimpleDenyListLog<\n event extends ContractEventName<typeof simpleDenyListAbi> = ContractEventName<\n typeof simpleDenyListAbi\n >,\n> = GenericLog<typeof simpleDenyListAbi, event>;\n\n/**\n * A simple implementation of an AllowList that implicitly allows all addresses except those explicitly added to the deny list\n *\n * @export\n * @class SimpleDenyList\n * @typedef {SimpleDenyList}\n * @extends {DeployableTarget<SimpleDenyListPayload>}\n */\nexport class SimpleDenyList<\n Payload = SimpleDenyListPayload,\n> extends DeployableTarget<Payload | undefined, typeof simpleDenyListAbi> {\n public override readonly abi = simpleDenyListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleDenyListBases as Record<number, Address>),\n 31337: import.meta.env.VITE_SIMPLE_DENYLIST_BASE,\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Check if a user is authorized (i.e. not denied)\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>,\n ): Promise<boolean> {\n return await readSimpleDenyListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDenied(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n return await this.awaitResult(\n this.setDeniedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDeniedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n const { request, result } = await simulateSimpleDenyListSetDenied(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleDenyListSetDenied(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleDenyListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [p, options] = this.validateDeploymentConfig(_payload, _options);\n const payload = p as SimpleDenyListPayload;\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleDenyListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleDenyListPayload} param0\n * @param {Address} param0.owner - The allow list's owner\n * @param {Address[]} param0.denied - List of denied addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleDenyListPayload({\n owner,\n denied,\n}: SimpleDenyListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'denied' },\n ],\n [owner, denied],\n );\n}\n"],"names":["_SimpleDenyList","DeployableTarget","simpleDenyListAbi","address","params","readSimpleDenyListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleDenyListSetDenied","writeSimpleDenyListSetDenied","_payload","_options","p","options","payload","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleDenyListPayload","SimpleDenyListBases","RegistryType","SimpleDenyList","denied","encodeAbiParameters"],"mappings":"u8RA6EaA,EAAN,MAAMA,UAEHC,EAAAA,gBAAgE,CAFnE,aAAA,CAAA,MAAA,GAAA,SAAA,EAGL,KAAyB,IAAMC,GAAA,CA8B/B,MAAa,UACXC,EACAC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,EAASG,UAAQ,EACxB,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,CAAA,CACL,CACH,CAYA,MAAa,UACXG,EACAC,EACAJ,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,aAAaG,EAAWC,EAASJ,CAAM,CAAA,CAEhD,CAYA,MAAa,aACXG,EACAC,EACAJ,EACA,CACA,KAAM,CAAE,QAAAK,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACJ,EAAWC,CAAO,EACzB,GAAG,KAAK,wBAAwB,EAEhC,GAAIJ,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMQ,EAA6B,GAAA,KAAK,QAASH,CAAO,EACtD,OAAAC,EACjB,CAUgB,gBACdG,EACAC,EACyB,OACzB,KAAM,CAACC,EAAGC,CAAO,EAAI,KAAK,yBAAyBH,EAAUC,CAAQ,EAC/DG,EAAUF,EAChB,GAAI,CAACE,EAAQ,OAASA,EAAQ,QAAUC,EAAAA,YAAa,CACnD,MAAMC,EAAQH,EAAQ,QAClBA,EAAQ,QAAQ,QAChBA,EAAQ,OACNI,EAAA,WAAWJ,EAAQ,MAAM,EAAE,SAC3BK,EAAA,KAAK,WAAL,YAAAA,EAAe,QACrB,GAAIF,EACFF,EAAQ,MAAQE,MAEhB,OAAM,IAAIG,EAAoC,mCAElD,CACO,MAAA,CACL,IAAKpB,EAAA,EACL,SAAAqB,EACA,KAAM,CAACC,EAA6BP,CAAO,CAAC,EAC5C,GAAG,KAAK,wBAAwBD,EAAQ,OAAO,CAAA,CAEnD,CACF,EArHEhB,EAAuB,MAAiC,CACtD,GAAIyB,EAAA,eACJ,MAAO,4CAAA,EASTzB,EAAuB,aAA6B0B,EAAa,aAAA,WAtB5D,IAAMC,EAAN3B,EA0IA,SAASwB,EAA6B,CAC3C,MAAAL,EACA,OAAAS,CACF,EAA0B,CACjB,OAAAC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,YAAa,KAAM,QAAS,CACtC,EACA,CAACV,EAAOS,CAAM,CAAA,CAElB"}