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

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 +2 -2
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +2 -2
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +2 -2
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +25 -20
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.js +2 -2
  15. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  17. package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
  18. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.js +23 -19
  20. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  22. package/dist/AllowLists/SimpleDenyList.d.ts +2 -2
  23. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.js +6 -5
  25. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  26. package/dist/Auth/PassthroughAuth.cjs +1 -1
  27. package/dist/Auth/PassthroughAuth.js +1 -1
  28. package/dist/BoostCore.cjs +2 -2
  29. package/dist/BoostCore.cjs.map +1 -1
  30. package/dist/BoostCore.d.ts +27 -5
  31. package/dist/BoostCore.d.ts.map +1 -1
  32. package/dist/BoostCore.js +438 -347
  33. package/dist/BoostCore.js.map +1 -1
  34. package/dist/BoostRegistry.cjs +1 -1
  35. package/dist/BoostRegistry.cjs.map +1 -1
  36. package/dist/BoostRegistry.d.ts +26 -5
  37. package/dist/BoostRegistry.d.ts.map +1 -1
  38. package/dist/BoostRegistry.js +125 -64
  39. package/dist/BoostRegistry.js.map +1 -1
  40. package/dist/Budgets/Budget.cjs +1 -1
  41. package/dist/Budgets/Budget.js +1 -1
  42. package/dist/Budgets/ManagedBudget.cjs +1 -1
  43. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  44. package/dist/Budgets/ManagedBudget.d.ts +2 -2
  45. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  46. package/dist/Budgets/ManagedBudget.js +41 -37
  47. package/dist/Budgets/ManagedBudget.js.map +1 -1
  48. package/dist/Budgets/SimpleBudget.d.ts +2 -2
  49. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  50. package/dist/Budgets/VestingBudget.d.ts +2 -2
  51. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  52. package/dist/Deployable/DeployableTarget.cjs +1 -1
  53. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  54. package/dist/Deployable/DeployableTarget.d.ts +6 -6
  55. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  56. package/dist/Deployable/DeployableTarget.js +22 -17
  57. package/dist/Deployable/DeployableTarget.js.map +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  59. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.d.ts +2 -2
  61. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  62. package/dist/Incentives/AllowListIncentive.js +17 -13
  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 +14 -2
  67. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  68. package/dist/Incentives/CGDAIncentive.js +27 -23
  69. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  70. package/dist/Incentives/ERC1155Incentive.d.ts +2 -2
  71. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  72. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  73. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  74. package/dist/Incentives/ERC20Incentive.d.ts +2 -2
  75. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  76. package/dist/Incentives/ERC20Incentive.js +17 -13
  77. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  78. package/dist/Incentives/ERC20VariableIncentive.d.ts +2 -2
  79. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  80. package/dist/Incentives/Incentive.cjs +1 -1
  81. package/dist/Incentives/Incentive.cjs.map +1 -1
  82. package/dist/Incentives/Incentive.js +32 -28
  83. package/dist/Incentives/Incentive.js.map +1 -1
  84. package/dist/Incentives/PointsIncentive.cjs +1 -1
  85. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  86. package/dist/Incentives/PointsIncentive.d.ts +2 -2
  87. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  88. package/dist/Incentives/PointsIncentive.js +13 -9
  89. package/dist/Incentives/PointsIncentive.js.map +1 -1
  90. package/dist/{SimpleDenyList-IJ9Ipya7.js → SimpleDenyList-C21O9Yfi.js} +23 -19
  91. package/dist/SimpleDenyList-C21O9Yfi.js.map +1 -0
  92. package/dist/SimpleDenyList-DeJRKD2D.cjs +2 -0
  93. package/dist/{SimpleDenyList-IJ9Ipya7.js.map → SimpleDenyList-DeJRKD2D.cjs.map} +1 -1
  94. package/dist/Validators/SignerValidator.cjs +1 -1
  95. package/dist/Validators/SignerValidator.cjs.map +1 -1
  96. package/dist/Validators/SignerValidator.d.ts +2 -2
  97. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  98. package/dist/Validators/SignerValidator.js +18 -14
  99. package/dist/Validators/SignerValidator.js.map +1 -1
  100. package/dist/Validators/Validator.cjs +1 -1
  101. package/dist/Validators/Validator.js +1 -1
  102. package/dist/deployments-BvFcK_eR.js +40 -0
  103. package/dist/deployments-BvFcK_eR.js.map +1 -0
  104. package/dist/deployments-Ho4PnGCS.cjs +2 -0
  105. package/dist/deployments-Ho4PnGCS.cjs.map +1 -0
  106. package/dist/deployments.json +38 -0
  107. package/dist/errors.cjs +1 -1
  108. package/dist/errors.cjs.map +1 -1
  109. package/dist/errors.d.ts +6 -0
  110. package/dist/errors.d.ts.map +1 -1
  111. package/dist/errors.js +70 -54
  112. package/dist/errors.js.map +1 -1
  113. package/dist/{generated-HGddZXHJ.js → generated-LpgSHrH0.js} +130 -90
  114. package/dist/generated-LpgSHrH0.js.map +1 -0
  115. package/dist/generated-tq_HLZJ0.cjs +3 -0
  116. package/dist/generated-tq_HLZJ0.cjs.map +1 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.js +113 -109
  119. package/dist/utils.cjs +1 -1
  120. package/dist/utils.cjs.map +1 -1
  121. package/dist/utils.d.ts +25 -11
  122. package/dist/utils.d.ts.map +1 -1
  123. package/dist/utils.js +38 -23
  124. package/dist/utils.js.map +1 -1
  125. package/package.json +7 -6
  126. package/src/Actions/ContractAction.ts +5 -3
  127. package/src/Actions/ERC721MintAction.ts +5 -3
  128. package/src/Actions/EventAction.test.ts +81 -84
  129. package/src/Actions/EventAction.ts +9 -3
  130. package/src/AllowLists/AllowList.test.ts +1 -1
  131. package/src/AllowLists/SimpleAllowList.ts +6 -3
  132. package/src/AllowLists/SimpleDenyList.ts +6 -3
  133. package/src/BoostCore.test.ts +31 -91
  134. package/src/BoostCore.ts +137 -34
  135. package/src/BoostRegistry.ts +89 -21
  136. package/src/Budgets/ManagedBudget.ts +6 -4
  137. package/src/Budgets/SimpleBudget.ts +4 -3
  138. package/src/Budgets/VestingBudget.ts +4 -3
  139. package/src/Deployable/DeployableTarget.ts +22 -11
  140. package/src/Incentives/AllowListIncentive.ts +6 -3
  141. package/src/Incentives/CGDAIncentive.ts +6 -3
  142. package/src/Incentives/ERC1155Incentive.ts +4 -3
  143. package/src/Incentives/ERC20Incentive.ts +6 -3
  144. package/src/Incentives/ERC20VariableIncentive.ts +6 -3
  145. package/src/Incentives/PointsIncentive.ts +6 -3
  146. package/src/Validators/SignerValidator.ts +6 -3
  147. package/src/errors.ts +17 -1
  148. package/src/utils.ts +60 -11
  149. package/dist/SimpleDenyList-CqT0BMP7.cjs +0 -2
  150. package/dist/SimpleDenyList-CqT0BMP7.cjs.map +0 -1
  151. package/dist/generated-HGddZXHJ.js.map +0 -1
  152. package/dist/generated-wKBNvm48.cjs +0 -3
  153. package/dist/generated-wKBNvm48.cjs.map +0 -1
@@ -15,30 +15,41 @@ import {
15
15
  type Hex,
16
16
  isAddress,
17
17
  } from 'viem';
18
+ import { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';
18
19
  import {
19
20
  Deployable,
20
21
  type DeployableOptions,
21
22
  type GenericDeployableParams,
22
23
  } from './Deployable/Deployable';
23
24
  import type { DeployableTarget } from './Deployable/DeployableTarget';
24
- import type {
25
- GenericLog,
26
- HashAndSimulatedResult,
27
- ReadParams,
28
- RegistryType,
29
- WriteParams,
25
+ import {
26
+ type GenericLog,
27
+ type HashAndSimulatedResult,
28
+ type ReadParams,
29
+ type RegistryType,
30
+ type WriteParams,
31
+ assertValidAddressByChainId,
30
32
  } from './utils';
31
33
 
32
- export { boostRegistryAbi };
33
-
34
34
  /**
35
- * The fixed address for the Boost Registry.
36
- * By default, `new BoostRegistry` will use this address if not otherwise provided.
35
+ * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address
37
36
  *
38
37
  * @type {Address}
39
38
  */
40
- export const BOOST_REGISTRY_ADDRESS: Address = import.meta.env
41
- .VITE_BOOST_REGISTRY_ADDRESS;
39
+ export const BOOST_REGISTRY_ADDRESS = (
40
+ BoostRegistryBases as Record<string, Address>
41
+ )[__DEFAULT_CHAIN_ID__];
42
+
43
+ /**
44
+ * The fixed addresses for the deployed Boost Registry.
45
+ * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.
46
+ *
47
+ * @type {Record<number, Address>}
48
+ */
49
+ export const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {
50
+ ...(BoostRegistryBases as Record<number, Address>),
51
+ 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,
52
+ };
42
53
 
43
54
  /**
44
55
  * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`
@@ -151,6 +162,26 @@ export class BoostRegistry extends Deployable<
151
162
  never[],
152
163
  typeof boostRegistryAbi
153
164
  > {
165
+ /**
166
+ * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain
167
+ *
168
+ * @static
169
+ * @readonly
170
+ * @type {Record<string, Address>}
171
+ */
172
+ static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;
173
+
174
+ /**
175
+ * A getter that will return Boost registry's static addresses by numerical chain ID
176
+ *
177
+ * @public
178
+ * @readonly
179
+ * @type {Record<number, Address>}
180
+ */
181
+ public get addresses(): Record<number, Address> {
182
+ return (this.constructor as typeof BoostRegistry).addresses;
183
+ }
184
+
154
185
  /**
155
186
  * Creates an instance of BoostRegistry.
156
187
  *
@@ -167,7 +198,11 @@ export class BoostRegistry extends Deployable<
167
198
  } else if (isBoostRegistryDeployable(options)) {
168
199
  super({ account, config }, []);
169
200
  } else {
170
- super({ account, config }, BOOST_REGISTRY_ADDRESS);
201
+ const { address } = assertValidAddressByChainId(
202
+ config,
203
+ BOOST_REGISTRY_ADDRESSES,
204
+ );
205
+ super({ account, config }, address);
171
206
  }
172
207
  }
173
208
 
@@ -216,7 +251,11 @@ export class BoostRegistry extends Deployable<
216
251
  const { request, result } = await simulateBoostRegistryRegister(
217
252
  this._config,
218
253
  {
219
- address: this.assertValidAddress(),
254
+ ...assertValidAddressByChainId(
255
+ this._config,
256
+ this.addresses,
257
+ params?.chain?.id || params?.chainId,
258
+ ),
220
259
  args: [registryType, name, implementation],
221
260
  ...this.optionallyAttachAccount(),
222
261
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -310,11 +349,20 @@ export class BoostRegistry extends Deployable<
310
349
  config: this._config,
311
350
  account: this._account,
312
351
  });
352
+ const { address: baseAddress } = assertValidAddressByChainId(
353
+ this._config,
354
+ target.bases,
355
+ params?.chain?.id || params?.chainId,
356
+ );
313
357
  const { request, result } = await simulateBoostRegistryDeployClone(
314
358
  this._config,
315
359
  {
316
- address: this.assertValidAddress(),
317
- args: [target.registryType, target.base, displayName, payload.args[0]],
360
+ ...assertValidAddressByChainId(
361
+ this._config,
362
+ this.addresses,
363
+ params?.chain?.id || params?.chainId,
364
+ ),
365
+ args: [target.registryType, baseAddress, displayName, payload.args[0]],
318
366
  ...this.optionallyAttachAccount(),
319
367
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
320
368
  ...(params as any),
@@ -339,7 +387,11 @@ export class BoostRegistry extends Deployable<
339
387
  params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,
340
388
  ) {
341
389
  return await readBoostRegistryGetBaseImplementation(this._config, {
342
- address: this.assertValidAddress(),
390
+ ...assertValidAddressByChainId(
391
+ this._config,
392
+ this.addresses,
393
+ params?.chainId,
394
+ ),
343
395
  args: [identifier],
344
396
  ...this.optionallyAttachAccount(),
345
397
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -361,7 +413,11 @@ export class BoostRegistry extends Deployable<
361
413
  params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,
362
414
  ) {
363
415
  return await readBoostRegistryGetBaseImplementation(this._config, {
364
- address: this.assertValidAddress(),
416
+ ...assertValidAddressByChainId(
417
+ this._config,
418
+ this.addresses,
419
+ params?.chainId,
420
+ ),
365
421
  args: [identifier],
366
422
  ...this.optionallyAttachAccount(),
367
423
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -383,7 +439,11 @@ export class BoostRegistry extends Deployable<
383
439
  params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,
384
440
  ) {
385
441
  return await readBoostRegistryGetClones(this._config, {
386
- address: this.assertValidAddress(),
442
+ ...assertValidAddressByChainId(
443
+ this._config,
444
+ this.addresses,
445
+ params?.chainId,
446
+ ),
387
447
  args: [deployer],
388
448
  ...this.optionallyAttachAccount(),
389
449
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -411,7 +471,11 @@ export class BoostRegistry extends Deployable<
411
471
  params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,
412
472
  ) {
413
473
  return await readBoostRegistryGetCloneIdentifier(this._config, {
414
- address: this.assertValidAddress(),
474
+ ...assertValidAddressByChainId(
475
+ this._config,
476
+ this.addresses,
477
+ params?.chainId,
478
+ ),
415
479
  args: [registryType, base, deployer, displayName],
416
480
  ...this.optionallyAttachAccount(),
417
481
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -435,7 +499,11 @@ export class BoostRegistry extends Deployable<
435
499
  params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,
436
500
  ) {
437
501
  return await readBoostRegistryGetCloneIdentifier(this._config, {
438
- address: this.assertValidAddress(),
502
+ ...assertValidAddressByChainId(
503
+ this._config,
504
+ this.addresses,
505
+ params?.chainId,
506
+ ),
439
507
  args: [registryType, displayName],
440
508
  ...this.optionallyAttachAccount(),
441
509
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -33,6 +33,7 @@ import {
33
33
  parseAbiParameters,
34
34
  zeroAddress,
35
35
  } from 'viem';
36
+ import { ManagedBudget as ManagedBudgetBases } from '../../dist/deployments.json';
36
37
  import type {
37
38
  DeployableOptions,
38
39
  GenericDeployableParams,
@@ -54,7 +55,6 @@ import {
54
55
  RegistryType,
55
56
  type WriteParams,
56
57
  } from '../utils';
57
-
58
58
  export { managedBudgetAbi };
59
59
  export type { ERC1155TransferPayload, FungibleTransferPayload };
60
60
 
@@ -189,10 +189,12 @@ export class ManagedBudget extends DeployableTarget<
189
189
  *
190
190
  * @public
191
191
  * @static
192
- * @type {Address}
192
+ * @type {Record<number, Address>}
193
193
  */
194
- public static override base: Address = import.meta.env
195
- .VITE_MANAGED_BUDGET_BASE;
194
+ public static override bases: Record<number, Address> = {
195
+ ...(ManagedBudgetBases as Record<number, Address>),
196
+ 31337: import.meta.env.VITE_MANAGED_BUDGET_BASE,
197
+ };
196
198
  /**
197
199
  * @inheritdoc
198
200
  *
@@ -151,10 +151,11 @@ export class SimpleBudget extends DeployableTarget<
151
151
  *
152
152
  * @public
153
153
  * @static
154
- * @type {Address}
154
+ * @type {Record<number, Address>}
155
155
  */
156
- public static override base: Address = import.meta.env
157
- .VITE_SIMPLE_BUDGET_BASE;
156
+ public static override bases: Record<number, Address> = {
157
+ 31337: import.meta.env.VITE_SIMPLE_BUDGET_BASE,
158
+ };
158
159
  /**
159
160
  * @inheritdoc
160
161
  *
@@ -127,10 +127,11 @@ export class VestingBudget extends DeployableTarget<
127
127
  *
128
128
  * @public
129
129
  * @static
130
- * @type {Address}
130
+ * @type {Record<number, Address>}
131
131
  */
132
- public static override base: Address = import.meta.env
133
- .VITE_VESTING_BUDGET_BASE;
132
+ public static override bases: Record<number, Address> = {
133
+ 31337: import.meta.env.VITE_VESTING_BUDGET_BASE,
134
+ };
134
135
  /**
135
136
  * @inheritdoc
136
137
  *
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  type aCloneableAbi,
3
- readACloneableGetComponentInterface as readACloneableGetComponentInterface,
3
+ readACloneableGetComponentInterface,
4
4
  readACloneableSupportsInterface,
5
5
  } from '@boostxyz/evm';
6
6
  import { deployContract } from '@wagmi/core';
@@ -11,6 +11,7 @@ import {
11
11
  type Hex,
12
12
  type WaitForTransactionReceiptParameters,
13
13
  isAddress,
14
+ isAddressEqual,
14
15
  zeroAddress,
15
16
  } from 'viem';
16
17
  import {
@@ -38,13 +39,13 @@ export class DeployableTarget<
38
39
  ContractAbi extends Abi,
39
40
  > extends Deployable<Payload, ContractAbi> {
40
41
  /**
41
- * A static property representing the address of the base implementation on chain, used when cloning base contracts.
42
+ * A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.
42
43
  *
43
44
  * @static
44
45
  * @readonly
45
- * @type {Address}
46
+ * @type {Record<string, Address>}
46
47
  */
47
- static readonly base: Address = zeroAddress;
48
+ static readonly bases: Record<number, Address> = {};
48
49
  /**
49
50
  * The target's registry type.
50
51
  *
@@ -61,7 +62,14 @@ export class DeployableTarget<
61
62
  */
62
63
  protected _isBase = true;
63
64
  get isBase() {
64
- if (!!this.address && this.address !== this.base) return false;
65
+ if (
66
+ !!this.address &&
67
+ Object.values(this.bases).some((base) =>
68
+ // biome-ignore lint/style/noNonNullAssertion: won't evaluate this if address checked and defined above
69
+ isAddressEqual(this.address!, base),
70
+ )
71
+ )
72
+ return true;
65
73
  return this._isBase;
66
74
  }
67
75
 
@@ -83,22 +91,25 @@ export class DeployableTarget<
83
91
  if (
84
92
  typeof payload === 'string' &&
85
93
  isAddress(payload) &&
86
- payload !== this.base &&
87
- payload !== zeroAddress
94
+ payload !== zeroAddress &&
95
+ !Object.values(this.bases).some((base) => {
96
+ if (!payload || !base) return false;
97
+ return isAddressEqual(payload, base);
98
+ })
88
99
  )
89
100
  isBase = false;
90
101
  if (isBase !== undefined) this._isBase = isBase;
91
102
  }
92
103
 
93
104
  /**
94
- * A getter that will return the base implementation's static address
105
+ * A getter that will return the base implementation's static addresses by numerical chain ID
95
106
  *
96
107
  * @public
97
108
  * @readonly
98
- * @type {Address}
109
+ * @type {Record<number, Address>}
99
110
  */
100
- public get base(): Address {
101
- return (this.constructor as typeof DeployableTarget).base;
111
+ public get bases(): Record<number, Address> {
112
+ return (this.constructor as typeof DeployableTarget).bases;
102
113
  }
103
114
 
104
115
  /**
@@ -17,6 +17,7 @@ import {
17
17
  type Hex,
18
18
  encodeAbiParameters,
19
19
  } from 'viem';
20
+ import { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';
20
21
  import { SimpleAllowList } from '../AllowLists/AllowList';
21
22
  import type {
22
23
  DeployableOptions,
@@ -92,10 +93,12 @@ export class AllowListIncentive extends DeployableTarget<
92
93
  *
93
94
  * @public
94
95
  * @static
95
- * @type {Address}
96
+ * @type {Record<number, Address>}
96
97
  */
97
- public static override base: Address = import.meta.env
98
- .VITE_ALLOWLIST_INCENTIVE_BASE;
98
+ public static override bases: Record<number, Address> = {
99
+ ...(AllowListIncentiveBases as Record<number, Address>),
100
+ 31337: import.meta.env.VITE_ALLOWLIST_INCENTIVE_BASE,
101
+ };
99
102
  /**
100
103
  * @inheritdoc
101
104
  *
@@ -21,6 +21,7 @@ import {
21
21
  type Hex,
22
22
  encodeAbiParameters,
23
23
  } from 'viem';
24
+ import { CGDAIncentive as CGDAIncentiveBases } from '../../dist/deployments.json';
24
25
  import type {
25
26
  DeployableOptions,
26
27
  GenericDeployableParams,
@@ -144,10 +145,12 @@ export class CGDAIncentive extends DeployableTarget<
144
145
  *
145
146
  * @public
146
147
  * @static
147
- * @type {Address}
148
+ * @type {Record<number, Address>}
148
149
  */
149
- public static override base: Address = import.meta.env
150
- .VITE_CGDA_INCENTIVE_BASE;
150
+ public static override bases: Record<number, Address> = {
151
+ ...(CGDAIncentiveBases as Record<number, Address>),
152
+ 31337: import.meta.env.VITE_CGDA_INCENTIVE_BASE,
153
+ };
151
154
  /**
152
155
  * @inheritdoc
153
156
  *
@@ -127,10 +127,11 @@ export class ERC1155Incentive extends DeployableTarget<
127
127
  *
128
128
  * @public
129
129
  * @static
130
- * @type {Address}
130
+ * @type {Record<number, Address>}
131
131
  */
132
- public static override base: Address = import.meta.env
133
- .VITE_ERC1155_INCENTIVE_BASE;
132
+ public static override bases: Record<number, Address> = {
133
+ 31337: import.meta.env.VITE_ERC1155_INCENTIVE_BASE,
134
+ };
134
135
  /**
135
136
  * @inheritdoc
136
137
  *
@@ -24,6 +24,7 @@ import {
24
24
  type Hex,
25
25
  encodeAbiParameters,
26
26
  } from 'viem';
27
+ import { ERC20Incentive as ERC20IncentiveBases } from '../../dist/deployments.json';
27
28
  import type {
28
29
  DeployableOptions,
29
30
  GenericDeployableParams,
@@ -110,10 +111,12 @@ export class ERC20Incentive extends DeployableTarget<
110
111
  *
111
112
  * @public
112
113
  * @static
113
- * @type {Address}
114
+ * @type {Record<number, Address>}
114
115
  */
115
- public static override base: Address = import.meta.env
116
- .VITE_ERC20_INCENTIVE_BASE;
116
+ public static override bases: Record<number, Address> = {
117
+ ...(ERC20IncentiveBases as Record<number, Address>),
118
+ 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE,
119
+ };
117
120
  /**
118
121
  * @inheritdoc
119
122
  *
@@ -21,6 +21,7 @@ import {
21
21
  type Hex,
22
22
  encodeAbiParameters,
23
23
  } from 'viem';
24
+ import { ERC20VariableIncentive as ERC20VariableIncentiveBases } from '../../dist/deployments.json';
24
25
  import type {
25
26
  DeployableOptions,
26
27
  GenericDeployableParams,
@@ -96,10 +97,12 @@ export class ERC20VariableIncentive extends DeployableTarget<
96
97
  *
97
98
  * @public
98
99
  * @static
99
- * @type {Address}
100
+ * @type {Record<number, Address>}
100
101
  */
101
- public static override base: Address = import.meta.env
102
- .VITE_ERC20_VARIABLE_INCENTIVE_BASE;
102
+ public static override bases: Record<number, Address> = {
103
+ ...(ERC20VariableIncentiveBases as Record<number, Address>),
104
+ 31337: import.meta.env.VITE_ERC20_VARIABLE_INCENTIVE_BASE,
105
+ };
103
106
  /**
104
107
  * @inheritdoc
105
108
  *
@@ -18,6 +18,7 @@ import {
18
18
  type Hex,
19
19
  encodeAbiParameters,
20
20
  } from 'viem';
21
+ import { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';
21
22
  import type {
22
23
  DeployableOptions,
23
24
  GenericDeployableParams,
@@ -105,10 +106,12 @@ export class PointsIncentive extends DeployableTarget<
105
106
  *
106
107
  * @public
107
108
  * @static
108
- * @type {Address}
109
+ * @type {Record<number, Address>}
109
110
  */
110
- public static override base: Address = import.meta.env
111
- .VITE_POINTS_INCENTIVE_BASE;
111
+ public static override bases: Record<number, Address> = {
112
+ ...(PointsIncentiveBases as Record<number, Address>),
113
+ 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,
114
+ };
112
115
  /**
113
116
  * @inheritdoc
114
117
  *
@@ -18,6 +18,7 @@ import {
18
18
  encodeAbiParameters,
19
19
  } from 'viem';
20
20
  import { signTypedData } from 'viem/accounts';
21
+ import { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';
21
22
  import type {
22
23
  DeployableOptions,
23
24
  GenericDeployableParams,
@@ -306,10 +307,12 @@ export class SignerValidator extends DeployableTarget<
306
307
  *
307
308
  * @public
308
309
  * @static
309
- * @type {Address}
310
+ * @type {Record<number, Address>}
310
311
  */
311
- public static override base: Address = import.meta.env
312
- .VITE_SIGNER_VALIDATOR_BASE;
312
+ public static override bases: Record<number, Address> = {
313
+ ...(SignerValidatorBases as Record<number, Address>),
314
+ 31337: import.meta.env.VITE_SIGNER_VALIDATOR_BASE,
315
+ };
313
316
  /**
314
317
  * @inheritdoc
315
318
  *
package/src/errors.ts CHANGED
@@ -87,7 +87,7 @@ export class DeployableAlreadyDeployedError extends Error {
87
87
  */
88
88
  constructor(address: string) {
89
89
  super(
90
- `Attempted to deploy a contract that already has an address configured`,
90
+ 'Attempted to deploy a contract that already has an address configured',
91
91
  );
92
92
  this.address = address;
93
93
  }
@@ -680,3 +680,19 @@ export class UnrecognizedFilterTypeError extends FieldActionValidationError {
680
680
  super('Invalid FilterType provided', metadata);
681
681
  }
682
682
  }
683
+
684
+ export class NoConnectedChainIdError extends Error {
685
+ constructor() {
686
+ super(
687
+ 'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',
688
+ );
689
+ }
690
+ }
691
+
692
+ export class InvalidProtocolChainIdError extends Error {
693
+ constructor(chainId: number, validChainIds: number[]) {
694
+ super(
695
+ `Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,
696
+ );
697
+ }
698
+ }
package/src/utils.ts CHANGED
@@ -3,12 +3,15 @@ import {
3
3
  type ReadContractParameters,
4
4
  type WatchContractEventParameters,
5
5
  type WriteContractParameters,
6
+ getAccount,
7
+ getClient,
6
8
  waitForTransactionReceipt,
7
9
  } from '@wagmi/core';
8
10
  import type { ExtractAbiEvent } from 'abitype';
9
11
  import type {
10
12
  Abi,
11
13
  AbiEvent,
14
+ Address,
12
15
  ContractEventName,
13
16
  ContractFunctionName,
14
17
  GetLogsParameters,
@@ -18,10 +21,28 @@ import type {
18
21
  WaitForTransactionReceiptParameters,
19
22
  } from 'viem';
20
23
  import { isHex, keccak256, slice, toHex } from 'viem';
21
- import { NoContractAddressUponReceiptError } from './errors';
24
+ import {
25
+ InvalidProtocolChainIdError,
26
+ NoConnectedChainIdError,
27
+ NoContractAddressUponReceiptError,
28
+ } from './errors';
22
29
 
23
30
  export type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
24
31
 
32
+ /**
33
+ * Enum encapsulating all the different types of targets used in the Boost V2 Protocol.
34
+ *
35
+ * @export
36
+ * @enum {number}
37
+ */
38
+ export enum RegistryType {
39
+ ACTION = 0,
40
+ ALLOW_LIST = 1,
41
+ BUDGET = 2,
42
+ INCENTIVE = 3,
43
+ VALIDATOR = 4,
44
+ }
45
+
25
46
  /**
26
47
  * Helper type that encapsulates common writeContract parameters without fields like `abi`, `args`, `functionName`, `address` that are expected to be provided the SDK.
27
48
  * See (writeContract)[https://viem.sh/docs/contract/writeContract]
@@ -32,8 +53,8 @@ export type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
32
53
  * @template {ContractFunctionName<abi>} functionName
33
54
  */
34
55
  export type WriteParams<
35
- abi extends Abi,
36
- functionName extends ContractFunctionName<abi>,
56
+ abi extends Abi = Abi,
57
+ functionName extends ContractFunctionName<abi> = ContractFunctionName<abi>,
37
58
  > = Partial<
38
59
  Omit<
39
60
  WriteContractParameters<abi, functionName>,
@@ -184,15 +205,43 @@ export async function awaitResult<Result = unknown>(
184
205
  }
185
206
 
186
207
  /**
187
- * Enum encapsulating all the different types of targets used in the Boost V2 Protocol.
208
+ * Given a wagmi config and a map of chain id's to addresses, determine an address/chainId combo that maps to the currently connected chain id, or throw a typed error.
188
209
  *
189
210
  * @export
190
- * @enum {number}
211
+ * @param {Config} config
212
+ * @param {Record<string, Address>} addressByChainId
213
+ * @param {number} desiredChainId
214
+ * @returns {{ chainId: number, address: Address }}
215
+ * @throws {@link InvalidProtocolChainIdError}
191
216
  */
192
- export enum RegistryType {
193
- ACTION = 0,
194
- ALLOW_LIST = 1,
195
- BUDGET = 2,
196
- INCENTIVE = 3,
197
- VALIDATOR = 4,
217
+ export function assertValidAddressByChainId(
218
+ config: Config,
219
+ addressByChainId: Record<number, Address>,
220
+ desiredChainId?: number,
221
+ ): { chainId: number; address: Address } {
222
+ let chainId: number | undefined = undefined;
223
+ const wagmiAccount = getAccount(config);
224
+ // if manually providing a chain id for some contract operation, try to use it
225
+ if (desiredChainId !== undefined) {
226
+ if (addressByChainId[desiredChainId]) chainId = desiredChainId;
227
+ } else if (wagmiAccount.chainId !== undefined) {
228
+ // otherwise if we can get the current chain id off the connected account and it matches one of ours, use it
229
+ if (addressByChainId[wagmiAccount.chainId]) chainId = wagmiAccount.chainId;
230
+ }
231
+ // chainId is still undefined, try to get chain id off viem client
232
+ if (chainId === undefined) {
233
+ const client = getClient(config);
234
+ if (client?.chain.id && addressByChainId[client?.chain.id])
235
+ chainId = client.chain.id;
236
+ }
237
+ // if chainId is STILL undefined, use our default addresses
238
+ // TODO: update this when on prod network
239
+ if (chainId === undefined) chainId = Number(__DEFAULT_CHAIN_ID__);
240
+ if (!addressByChainId[chainId])
241
+ throw new InvalidProtocolChainIdError(
242
+ chainId,
243
+ Object.keys(addressByChainId).map(Number),
244
+ );
245
+ // biome-ignore lint/style/noNonNullAssertion: this type should be narrowed by the above statement but isn't?
246
+ return { chainId, address: addressByChainId[chainId]! };
198
247
  }
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("./generated-wKBNvm48.cjs"),h=require("@wagmi/core"),r=require("viem"),y=require("./Deployable/DeployableTarget.cjs"),p=require("./errors.cjs"),w=require("./utils.cjs"),i="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110ac806100bd5f395ff3fe6080604052600436106100a6575f3560e01c8063715018a611610063578063715018a6146101745780638da5cb5b1461017e578063e3f756de146101a8578063f04e283e146101e4578063f2fde38b14610200578063fee81cf41461021c576100a6565b806301ffc9a7146100aa578063141973b0146100e6578063256929621461010e57806328d6183b14610118578063439fab911461014257806354d1f13d1461016a575b5f80fd5b3480156100b5575f80fd5b506100d060048036038101906100cb9190610a82565b610258565b6040516100dd9190610ac7565b60405180910390f35b3480156100f1575f80fd5b5061010c60048036038101906101079190610b96565b6102d1565b005b6101166103da565b005b348015610123575f80fd5b5061012c61042b565b6040516101399190610c23565b60405180910390f35b34801561014d575f80fd5b5061016860048036038101906101639190610c91565b610452565b005b61017261056f565b005b61017c6105a8565b005b348015610189575f80fd5b506101926105bb565b60405161019f9190610d1b565b60405180910390f35b3480156101b3575f80fd5b506101ce60048036038101906101c99190610d5e565b6105e3565b6040516101db9190610ac7565b60405180910390f35b6101fe60048036038101906101f99190610dbb565b610637565b005b61021a60048036038101906102159190610dbb565b610675565b005b348015610227575f80fd5b50610242600480360381019061023d9190610dbb565b61069e565b60405161024f9190610dfe565b60405180910390f35b5f7f3d30a22c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102ca57506102c9826106b7565b5b9050919050565b6102d9610730565b818190508484905014610318576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848490508110156103d35782828281811061033857610337610e17565b5b905060200201602081019061034d9190610e6e565b5f8087878581811061036257610361610e17565b5b90506020020160208101906103779190610dbb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550808060010191505061031a565b5050505050565b5f6103e3610767565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f3d30a22c00000000000000000000000000000000000000000000000000000000905090565b5f61045b610771565b9050805460038255801561048d5760018160011c14303b106104845763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f80848481019061049f919061101c565b915091506104ac8261079a565b5f5b81518110156105325760015f808484815181106104ce576104cd610e17565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b505050801561056a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6105b0610730565b6105b95f610870565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161590509392505050565b61063f610730565b63389a75e1600c52805f526020600c20805442111561066557636f5e88185f526004601cfd5b5f81555061067281610870565b50565b61067d610730565b8060601b61069257637448fbae5f526004601cfd5b61069b81610870565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610729575061072882610936565b5b9050919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610765576382b429005f526004601cfd5b565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6107a26109af565b1561081a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156107dc57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35061086d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6108786109af565b156108dd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610933565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109a857506109a7826109b3565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610a6181610a2d565b8114610a6b575f80fd5b50565b5f81359050610a7c81610a58565b92915050565b5f60208284031215610a9757610a96610a25565b5b5f610aa484828501610a6e565b91505092915050565b5f8115159050919050565b610ac181610aad565b82525050565b5f602082019050610ada5f830184610ab8565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112610b0157610b00610ae0565b5b8235905067ffffffffffffffff811115610b1e57610b1d610ae4565b5b602083019150836020820283011115610b3a57610b39610ae8565b5b9250929050565b5f8083601f840112610b5657610b55610ae0565b5b8235905067ffffffffffffffff811115610b7357610b72610ae4565b5b602083019150836020820283011115610b8f57610b8e610ae8565b5b9250929050565b5f805f8060408587031215610bae57610bad610a25565b5b5f85013567ffffffffffffffff811115610bcb57610bca610a29565b5b610bd787828801610aec565b9450945050602085013567ffffffffffffffff811115610bfa57610bf9610a29565b5b610c0687828801610b41565b925092505092959194509250565b610c1d81610a2d565b82525050565b5f602082019050610c365f830184610c14565b92915050565b5f8083601f840112610c5157610c50610ae0565b5b8235905067ffffffffffffffff811115610c6e57610c6d610ae4565b5b602083019150836001820283011115610c8a57610c89610ae8565b5b9250929050565b5f8060208385031215610ca757610ca6610a25565b5b5f83013567ffffffffffffffff811115610cc457610cc3610a29565b5b610cd085828601610c3c565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d0582610cdc565b9050919050565b610d1581610cfb565b82525050565b5f602082019050610d2e5f830184610d0c565b92915050565b610d3d81610cfb565b8114610d47575f80fd5b50565b5f81359050610d5881610d34565b92915050565b5f805f60408486031215610d7557610d74610a25565b5b5f610d8286828701610d4a565b935050602084013567ffffffffffffffff811115610da357610da2610a29565b5b610daf86828701610c3c565b92509250509250925092565b5f60208284031215610dd057610dcf610a25565b5b5f610ddd84828501610d4a565b91505092915050565b5f819050919050565b610df881610de6565b82525050565b5f602082019050610e115f830184610def565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b610e4d81610aad565b8114610e57575f80fd5b50565b5f81359050610e6881610e44565b92915050565b5f60208284031215610e8357610e82610a25565b5b5f610e9084828501610e5a565b91505092915050565b5f610ea382610cdc565b9050919050565b610eb381610e99565b8114610ebd575f80fd5b50565b5f81359050610ece81610eaa565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610f1a82610ed4565b810181811067ffffffffffffffff82111715610f3957610f38610ee4565b5b80604052505050565b5f610f4b610a1c565b9050610f578282610f11565b919050565b5f67ffffffffffffffff821115610f7657610f75610ee4565b5b602082029050602081019050919050565b5f610f99610f9484610f5c565b610f42565b90508083825260208201905060208402830185811115610fbc57610fbb610ae8565b5b835b81811015610fe55780610fd18882610d4a565b845260208401935050602081019050610fbe565b5050509392505050565b5f82601f83011261100357611002610ae0565b5b8135611013848260208601610f87565b91505092915050565b5f806040838503121561103257611031610a25565b5b5f61103f85828601610ec0565b925050602083013567ffffffffffffffff8111156110605761105f610a29565b5b61106c85828601610fef565b915050925092905056fea2646970667358221220f8901ba0ad91db050edba1d0412882eecda8dba26237dd3383d77357c2f7173964736f6c634300081a0033",t=class t extends y.DeployableTarget{constructor(){super(...arguments),this.abi=c.S}async isAllowed(f,b){return await c.A2(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...b})}async setDenied(f,b,d){return await this.awaitResult(this.setDeniedRaw(f,b,d))}async setDeniedRaw(f,b,d){const{request:a,result:e}=await c.k2(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...d});return{hash:await c.B2(this._config,a),result:e}}buildParameters(f,b){var s;const[d,a]=this.validateDeploymentConfig(f,b),e=d;if(!e.owner||e.owner===r.zeroAddress){const o=a.account?a.account.address:a.config?h.getAccount(a.config).address:(s=this._account)==null?void 0:s.address;if(o)e.owner=o;else throw new p.DeployableUnknownOwnerProvidedError}return{abi:c.S,bytecode:i,args:[u(e)],...this.optionallyAttachAccount(a.account)}}};t.base="0x7eb4E958D42b64fd1c4Ce947d05a755fCC7C30B7",t.registryType=w.RegistryType.ALLOW_LIST;let n=t;function u({owner:l,denied:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"denied"}],[l,f])}exports.SimpleDenyList=n;exports.bytecode=i;exports.prepareSimpleDenyListPayload=u;
2
- //# sourceMappingURL=SimpleDenyList-CqT0BMP7.cjs.map