@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9

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 (191) 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 +46 -3
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +37 -10
  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 +257 -11
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +249 -82
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.d.ts +2 -2
  15. package/dist/AllowLists/AllowList.js +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  17. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  18. package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
  19. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  20. package/dist/AllowLists/SimpleAllowList.js +52 -37
  21. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  22. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  23. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.d.ts +31 -2
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleDenyList.js +41 -129
  27. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  28. package/dist/Auth/PassthroughAuth.cjs +1 -1
  29. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  30. package/dist/Auth/PassthroughAuth.js +4 -4
  31. package/dist/Auth/PassthroughAuth.js.map +1 -1
  32. package/dist/Boost.cjs +1 -1
  33. package/dist/Boost.cjs.map +1 -1
  34. package/dist/Boost.d.ts +93 -1
  35. package/dist/Boost.d.ts.map +1 -1
  36. package/dist/Boost.js +151 -5
  37. package/dist/Boost.js.map +1 -1
  38. package/dist/BoostCore.cjs +2 -2
  39. package/dist/BoostCore.cjs.map +1 -1
  40. package/dist/BoostCore.d.ts +45 -7
  41. package/dist/BoostCore.d.ts.map +1 -1
  42. package/dist/BoostCore.js +352 -305
  43. package/dist/BoostCore.js.map +1 -1
  44. package/dist/BoostRegistry.cjs +1 -1
  45. package/dist/BoostRegistry.cjs.map +1 -1
  46. package/dist/BoostRegistry.d.ts +18 -4
  47. package/dist/BoostRegistry.d.ts.map +1 -1
  48. package/dist/BoostRegistry.js +36 -25
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.js +1 -1
  52. package/dist/Budgets/ManagedBudget.cjs +1 -1
  53. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  54. package/dist/Budgets/ManagedBudget.d.ts +40 -2
  55. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  56. package/dist/Budgets/ManagedBudget.js +53 -36
  57. package/dist/Budgets/ManagedBudget.js.map +1 -1
  58. package/dist/Budgets/SimpleBudget.d.ts +33 -2
  59. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  60. package/dist/Budgets/VestingBudget.d.ts +54 -2
  61. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  62. package/dist/Deployable/Contract.cjs +1 -1
  63. package/dist/Deployable/Contract.cjs.map +1 -1
  64. package/dist/Deployable/Contract.js +1 -1
  65. package/dist/Deployable/Contract.js.map +1 -1
  66. package/dist/Deployable/Deployable.cjs.map +1 -1
  67. package/dist/Deployable/Deployable.d.ts +8 -2
  68. package/dist/Deployable/Deployable.d.ts.map +1 -1
  69. package/dist/Deployable/Deployable.js +6 -0
  70. package/dist/Deployable/Deployable.js.map +1 -1
  71. package/dist/Deployable/DeployableTarget.cjs +1 -1
  72. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  73. package/dist/Deployable/DeployableTarget.d.ts +4 -3
  74. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  75. package/dist/Deployable/DeployableTarget.js +31 -28
  76. package/dist/Deployable/DeployableTarget.js.map +1 -1
  77. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  78. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  79. package/dist/Incentives/AllowListIncentive.d.ts +35 -5
  80. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  81. package/dist/Incentives/AllowListIncentive.js +33 -21
  82. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  83. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  84. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  85. package/dist/Incentives/CGDAIncentive.d.ts +89 -5
  86. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/CGDAIncentive.js +44 -23
  88. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
  90. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  91. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  92. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  93. package/dist/Incentives/ERC20Incentive.d.ts +49 -5
  94. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/ERC20Incentive.js +46 -27
  96. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
  98. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.cjs.map +1 -1
  101. package/dist/Incentives/Incentive.js +48 -32
  102. package/dist/Incentives/Incentive.js.map +1 -1
  103. package/dist/Incentives/PointsIncentive.cjs +1 -1
  104. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  105. package/dist/Incentives/PointsIncentive.d.ts +49 -5
  106. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  107. package/dist/Incentives/PointsIncentive.js +38 -21
  108. package/dist/Incentives/PointsIncentive.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.d.ts +298 -5
  112. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  113. package/dist/Validators/SignerValidator.js +151 -26
  114. package/dist/Validators/SignerValidator.js.map +1 -1
  115. package/dist/Validators/Validator.cjs +1 -1
  116. package/dist/Validators/Validator.js +1 -1
  117. package/dist/claiming.cjs +2 -0
  118. package/dist/claiming.cjs.map +1 -0
  119. package/dist/claiming.d.ts +43 -0
  120. package/dist/claiming.d.ts.map +1 -0
  121. package/dist/claiming.js +17 -0
  122. package/dist/claiming.js.map +1 -0
  123. package/dist/errors.cjs +1 -1
  124. package/dist/errors.cjs.map +1 -1
  125. package/dist/errors.d.ts +15 -1
  126. package/dist/errors.d.ts.map +1 -1
  127. package/dist/errors.js +30 -21
  128. package/dist/errors.js.map +1 -1
  129. package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
  130. package/dist/generated-57_Kffpz.js.map +1 -0
  131. package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
  132. package/dist/generated-wKBNvm48.cjs.map +1 -0
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.d.ts +4 -4
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +108 -124
  137. package/dist/transfers.cjs +2 -0
  138. package/dist/transfers.cjs.map +1 -0
  139. package/dist/transfers.d.ts +198 -0
  140. package/dist/transfers.d.ts.map +1 -0
  141. package/dist/transfers.js +84 -0
  142. package/dist/transfers.js.map +1 -0
  143. package/dist/utils.cjs +1 -1
  144. package/dist/utils.cjs.map +1 -1
  145. package/dist/utils.d.ts +2 -1371
  146. package/dist/utils.d.ts.map +1 -1
  147. package/dist/utils.js +26 -653
  148. package/dist/utils.js.map +1 -1
  149. package/package.json +17 -3
  150. package/src/Actions/Action.test.ts +5 -4
  151. package/src/Actions/ContractAction.test.ts +4 -6
  152. package/src/Actions/ContractAction.ts +73 -10
  153. package/src/Actions/ERC721MintAction.test.ts +2 -2
  154. package/src/Actions/ERC721MintAction.ts +70 -16
  155. package/src/Actions/EventAction.test.ts +43 -17
  156. package/src/Actions/EventAction.ts +451 -26
  157. package/src/AllowLists/SimpleAllowList.ts +51 -7
  158. package/src/AllowLists/SimpleDenyList.ts +47 -109
  159. package/src/Auth/PassthroughAuth.ts +1 -1
  160. package/src/Boost.ts +136 -1
  161. package/src/BoostCore.test.ts +4 -11
  162. package/src/BoostCore.ts +114 -45
  163. package/src/BoostRegistry.ts +39 -21
  164. package/src/Budgets/ManagedBudget.ts +69 -16
  165. package/src/Budgets/SimpleBudget.ts +57 -14
  166. package/src/Budgets/VestingBudget.ts +79 -9
  167. package/src/Deployable/Contract.ts +1 -1
  168. package/src/Deployable/Deployable.ts +8 -2
  169. package/src/Deployable/DeployableTarget.ts +19 -6
  170. package/src/Incentives/AllowListIncentive.test.ts +2 -5
  171. package/src/Incentives/AllowListIncentive.ts +59 -15
  172. package/src/Incentives/CGDAIncentive.test.ts +3 -7
  173. package/src/Incentives/CGDAIncentive.ts +123 -19
  174. package/src/Incentives/ERC1155Incentive.test.ts +2 -13
  175. package/src/Incentives/ERC1155Incentive.ts +104 -22
  176. package/src/Incentives/ERC20Incentive.test.ts +6 -17
  177. package/src/Incentives/ERC20Incentive.ts +86 -21
  178. package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
  179. package/src/Incentives/ERC20VariableIncentive.ts +71 -19
  180. package/src/Incentives/Incentive.test.ts +1 -1
  181. package/src/Incentives/PointsIncentive.test.ts +3 -6
  182. package/src/Incentives/PointsIncentive.ts +79 -17
  183. package/src/Validators/SignerValidator.test.ts +3 -7
  184. package/src/Validators/SignerValidator.ts +422 -13
  185. package/src/claiming.ts +56 -0
  186. package/src/errors.ts +19 -1
  187. package/src/index.ts +10 -7
  188. package/src/transfers.ts +284 -0
  189. package/src/utils.ts +3 -2052
  190. package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
  191. package/dist/generated-DGpIVcv5.js.map +0 -1
@@ -8,24 +8,37 @@ import {
8
8
  writeErc721MintActionValidate,
9
9
  } from '@boostxyz/evm';
10
10
  import { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/ERC721MintAction.sol/ERC721MintAction.json';
11
- import type { Address, ContractEventName, Hex } from 'viem';
11
+ import {
12
+ type Address,
13
+ type ContractEventName,
14
+ type Hex,
15
+ encodeAbiParameters,
16
+ toHex,
17
+ } from 'viem';
12
18
  import type {
13
19
  DeployableOptions,
14
20
  GenericDeployableParams,
15
21
  } from '../Deployable/Deployable';
16
22
  import {
17
- type ERC721MintActionPayload,
18
23
  type GenericLog,
19
24
  type ReadParams,
20
25
  RegistryType,
21
26
  type WriteParams,
22
- prepareERC721MintActionPayload,
23
- prepareERC721MintActionValidate,
24
27
  } from '../utils';
25
- import { ContractAction } from './ContractAction';
28
+ import {
29
+ ContractAction,
30
+ type ContractActionPayload,
31
+ prepareContractActionPayload,
32
+ } from './ContractAction';
26
33
 
27
- export { erc721MintActionAbi, prepareERC721MintActionPayload };
28
- export type { ERC721MintActionPayload };
34
+ export { erc721MintActionAbi };
35
+ /**
36
+ * `ERC721MintActionPayload` is a re-exported `ContractActionPayload`
37
+ *
38
+ * @export
39
+ * @typedef {ERC721MintActionPayload}
40
+ */
41
+ export type ERC721MintActionPayload = ContractActionPayload;
29
42
 
30
43
  /**
31
44
  * A generic `viem.Log` event with support for `ERC721MintAction` event types.
@@ -91,7 +104,7 @@ export class ERC721MintAction extends ContractAction<
91
104
  token: bigint,
92
105
  params?: ReadParams<typeof erc721MintActionAbi, 'validated'>,
93
106
  ) {
94
- return readErc721MintActionValidated(this._config, {
107
+ return await readErc721MintActionValidated(this._config, {
95
108
  address: this.assertValidAddress(),
96
109
  ...this.optionallyAttachAccount(),
97
110
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -113,7 +126,7 @@ export class ERC721MintAction extends ContractAction<
113
126
  data: Hex,
114
127
  params?: WriteParams<typeof erc721MintActionAbi, 'execute'>,
115
128
  ) {
116
- return this.awaitResult(this.executeRaw(data, params));
129
+ return await this.awaitResult(this.executeRaw(data, params));
117
130
  }
118
131
 
119
132
  /**
@@ -156,7 +169,7 @@ export class ERC721MintAction extends ContractAction<
156
169
  data: Hex,
157
170
  params?: ReadParams<typeof erc721MintActionAbi, 'prepare'>,
158
171
  ) {
159
- return readErc721MintActionPrepare(this._config, {
172
+ return await readErc721MintActionPrepare(this._config, {
160
173
  address: this.assertValidAddress(),
161
174
  args: [data],
162
175
  ...this.optionallyAttachAccount(),
@@ -166,34 +179,34 @@ export class ERC721MintAction extends ContractAction<
166
179
  }
167
180
 
168
181
  /**
169
- * Validate that the action has been completed successfully
182
+ * Validate that the action has been completed successfully. This API is protected to prevent accidental signature burning.
170
183
  *
171
- * @public
184
+ * @protected
172
185
  * @async
173
186
  * @param {Address} holder - The holder
174
187
  * @param {BigInt} tokenId - The token ID
175
188
  * @param {?WriteParams<typeof erc721MintActionAbi, 'validate'>} [params]
176
189
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the action has been validated for the user
177
190
  */
178
- public async validate(
191
+ protected async validate(
179
192
  holder: Address,
180
193
  tokenId: bigint,
181
194
  params?: WriteParams<typeof erc721MintActionAbi, 'validate'>,
182
195
  ) {
183
- return this.awaitResult(this.validateRaw(holder, tokenId, params));
196
+ return await this.awaitResult(this.validateRaw(holder, tokenId, params));
184
197
  }
185
198
 
186
199
  /**
187
200
  * Validate that the action has been completed successfully
188
201
  *
189
- * @public
202
+ * @protected
190
203
  * @async
191
204
  * @param {Address} holder - The holder
192
205
  * @param {BigInt} tokenId - The token ID
193
206
  * @param {?WriteParams<typeof erc721MintActionAbi, 'validate'>} [params]
194
207
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the action has been validated for the user
195
208
  */
196
- public async validateRaw(
209
+ protected async validateRaw(
197
210
  holder: Address,
198
211
  tokenId: bigint,
199
212
  params?: WriteParams<typeof erc721MintActionAbi, 'validate'>,
@@ -236,3 +249,44 @@ export class ERC721MintAction extends ContractAction<
236
249
  };
237
250
  }
238
251
  }
252
+
253
+ /**
254
+ * Encodes a payload to validate that an action has been completed successfully.
255
+ *
256
+ *
257
+ * @export
258
+ * @param {Address} holder - The holder address
259
+ * @param {bigint} payload - The token ID
260
+ * @returns {Hex} - The first 20 bytes of the payload will be the holder address and the remaining bytes must be an encoded token ID (uint256)
261
+ */
262
+ export function prepareERC721MintActionValidate(
263
+ holder: Address,
264
+ payload: bigint,
265
+ ) {
266
+ return encodeAbiParameters(
267
+ [
268
+ { type: 'address', name: 'holder' },
269
+ { type: 'bytes', name: 'payload' },
270
+ ],
271
+ [holder, toHex(payload)],
272
+ );
273
+ }
274
+
275
+ /**
276
+ * Given a {@link ContractActionPayload}, properly encode a `ContractAction.InitPayload` for use with {@link ERC721MintAction} initialization.
277
+ *
278
+ * @param {ContractActionPayload} param0
279
+ * @param {bigint} param0.chainId - The chain ID on which the target exists
280
+ * @param {Address} param0.target - The target contract address
281
+ * @param {Hex} param0.selector - The selector for the function to be called
282
+ * @param {bigint} param0.value - The native token value to send with the function call
283
+ * @returns {*}
284
+ */
285
+ export function prepareERC721MintActionPayload({
286
+ chainId,
287
+ target,
288
+ selector,
289
+ value,
290
+ }: ContractActionPayload) {
291
+ return prepareContractActionPayload({ chainId, target, selector, value });
292
+ }
@@ -1,8 +1,4 @@
1
- import {
2
- readAActionGetComponentInterface,
3
- readEventActionGetComponentInterface,
4
- } from '@boostxyz/evm';
5
- import { selectors } from '@boostxyz/signatures/events';
1
+ import { selectors as eventSelectors } from '@boostxyz/signatures/events';
6
2
  import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
7
3
  import { type Hex, type Log, isAddress } from 'viem';
8
4
  import { beforeAll, beforeEach, describe, expect, test } from 'vitest';
@@ -15,12 +11,12 @@ import {
15
11
  fundErc721,
16
12
  } from '../../test/helpers';
17
13
  import {
14
+ EventAction,
18
15
  type EventActionPayloadSimple,
19
16
  FilterType,
20
17
  PrimitiveType,
21
18
  SignatureType,
22
- } from '../utils';
23
- import { EventAction } from './EventAction';
19
+ } from './EventAction';
24
20
 
25
21
  let fixtures: Fixtures, erc721: MockERC721;
26
22
 
@@ -34,26 +30,56 @@ function basicErc721TransferAction(
34
30
  return {
35
31
  actionClaimant: {
36
32
  signatureType: SignatureType.EVENT,
37
- signature: selectors['Transfer(address,address,uint256)'] as Hex,
33
+ signature: eventSelectors['Transfer(address,address,uint256)'] as Hex,
38
34
  fieldIndex: 2,
39
35
  targetContract: erc721.assertValidAddress(),
36
+ chainid: defaultOptions.config.chains[0].id,
40
37
  },
41
38
  actionSteps: [
42
39
  {
43
- signature: selectors['Transfer(address,address,uint256)'] as Hex,
40
+ signature: eventSelectors['Transfer(address,address,uint256)'] as Hex,
44
41
  signatureType: SignatureType.EVENT,
42
+ targetContract: erc721.assertValidAddress(),
43
+ chainid: defaultOptions.config.chains[0].id,
44
+ actionParameter: {
45
+ filterType: FilterType.EQUAL,
46
+ fieldType: PrimitiveType.ADDRESS,
47
+ fieldIndex: 2,
48
+ filterData: accounts[1].account,
49
+ },
50
+ },
51
+ ],
52
+ };
53
+ }
54
+
55
+ /*
56
+ function basicErc721MintFuncAction(
57
+ erc721: MockERC721,
58
+ ): EventActionPayloadSimple {
59
+ return {
60
+ actionClaimant: {
61
+ signatureType: SignatureType.FUNC,
62
+ signature: funcSelectors['mint(address)'] as Hex,
63
+ fieldIndex: 0,
64
+ targetContract: erc721.assertValidAddress(),
65
+ },
66
+ actionSteps: [
67
+ {
68
+ signature: funcSelectors['mint(address)'] as Hex,
69
+ signatureType: SignatureType.FUNC,
45
70
  actionType: 0,
46
71
  targetContract: erc721.assertValidAddress(),
47
72
  actionParameter: {
48
73
  filterType: FilterType.EQUAL,
49
74
  fieldType: PrimitiveType.ADDRESS,
50
75
  fieldIndex: 2,
51
- filterData: accounts.at(1)!.account,
76
+ filterData: accounts[1].account,
52
77
  },
53
78
  },
54
79
  ],
55
80
  };
56
81
  }
82
+ */
57
83
 
58
84
  function cloneEventAction(fixtures: Fixtures, erc721: MockERC721) {
59
85
  return function cloneEventAction() {
@@ -89,7 +115,7 @@ describe('EventAction', () => {
89
115
  step.actionParameter.filterData =
90
116
  step.actionParameter.filterData.toUpperCase() as Hex;
91
117
  expect(step).toMatchObject({
92
- signature: selectors['Transfer(address,address,uint256)'] as Hex,
118
+ signature: eventSelectors['Transfer(address,address,uint256)'] as Hex,
93
119
  signatureType: SignatureType.EVENT,
94
120
  actionType: 0,
95
121
  targetContract: erc721.assertValidAddress().toUpperCase(),
@@ -97,7 +123,7 @@ describe('EventAction', () => {
97
123
  filterType: FilterType.EQUAL,
98
124
  fieldType: PrimitiveType.ADDRESS,
99
125
  fieldIndex: 2,
100
- filterData: accounts.at(1)!.account.toUpperCase(),
126
+ filterData: accounts[1].account.toUpperCase(),
101
127
  },
102
128
  });
103
129
  });
@@ -106,12 +132,12 @@ describe('EventAction', () => {
106
132
  const action = await loadFixture(cloneEventAction(fixtures, erc721));
107
133
  const steps = await action.getActionSteps();
108
134
  expect(steps.length).toBe(1);
109
- const step = steps.at(0)!;
135
+ const step = steps[0]!;
110
136
  step.targetContract = step.targetContract.toUpperCase() as Hex;
111
137
  step.actionParameter.filterData =
112
138
  step.actionParameter.filterData.toUpperCase() as Hex;
113
139
  expect(step).toMatchObject({
114
- signature: selectors['Transfer(address,address,uint256)'] as Hex,
140
+ signature: eventSelectors['Transfer(address,address,uint256)'] as Hex,
115
141
  signatureType: SignatureType.EVENT,
116
142
  actionType: 0,
117
143
  targetContract: erc721.assertValidAddress().toUpperCase(),
@@ -119,7 +145,7 @@ describe('EventAction', () => {
119
145
  filterType: FilterType.EQUAL,
120
146
  fieldType: PrimitiveType.ADDRESS,
121
147
  fieldIndex: 2,
122
- filterData: accounts.at(1)!.account.toUpperCase(),
148
+ filterData: accounts[1].account.toUpperCase(),
123
149
  },
124
150
  });
125
151
  });
@@ -136,7 +162,7 @@ describe('EventAction', () => {
136
162
  claimant.targetContract = claimant.targetContract.toUpperCase() as Hex;
137
163
  expect(claimant).toMatchObject({
138
164
  signatureType: SignatureType.EVENT,
139
- signature: selectors['Transfer(address,address,uint256)'] as Hex,
165
+ signature: eventSelectors['Transfer(address,address,uint256)'] as Hex,
140
166
  fieldIndex: 2,
141
167
  targetContract: erc721.assertValidAddress().toUpperCase(),
142
168
  });
@@ -149,7 +175,7 @@ describe('EventAction', () => {
149
175
 
150
176
  test('with a correct log, validates', async () => {
151
177
  const action = await loadFixture(cloneEventAction(fixtures, erc721));
152
- const recipient = accounts.at(1)!.account;
178
+ const recipient = accounts[1].account;
153
179
  await erc721.approve(recipient, 1n);
154
180
  await erc721.transferFrom(defaultOptions.account.address, recipient, 1n);
155
181
  expect(await action.validateActionSteps()).toBe(true);