@boostxyz/sdk 0.0.0-alpha.10

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 (242) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/Actions/Action.cjs +2 -0
  4. package/dist/Actions/Action.cjs.map +1 -0
  5. package/dist/Actions/Action.d.ts +31 -0
  6. package/dist/Actions/Action.d.ts.map +1 -0
  7. package/dist/Actions/Action.js +29 -0
  8. package/dist/Actions/Action.js.map +1 -0
  9. package/dist/Actions/ContractAction.d.ts +370 -0
  10. package/dist/Actions/ContractAction.d.ts.map +1 -0
  11. package/dist/Actions/ERC721MintAction.d.ts +513 -0
  12. package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
  13. package/dist/Actions/EventAction.cjs +2 -0
  14. package/dist/Actions/EventAction.cjs.map +1 -0
  15. package/dist/Actions/EventAction.d.ts +694 -0
  16. package/dist/Actions/EventAction.d.ts.map +1 -0
  17. package/dist/Actions/EventAction.js +491 -0
  18. package/dist/Actions/EventAction.js.map +1 -0
  19. package/dist/AllowLists/AllowList.cjs +2 -0
  20. package/dist/AllowLists/AllowList.cjs.map +1 -0
  21. package/dist/AllowLists/AllowList.d.ts +32 -0
  22. package/dist/AllowLists/AllowList.d.ts.map +1 -0
  23. package/dist/AllowLists/AllowList.js +30 -0
  24. package/dist/AllowLists/AllowList.js.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -0
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
  29. package/dist/AllowLists/SimpleAllowList.js +154 -0
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -0
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
  35. package/dist/AllowLists/SimpleDenyList.js +115 -0
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +2 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.d.ts +10 -0
  40. package/dist/Auth/Auth.d.ts.map +1 -0
  41. package/dist/Auth/Auth.js +5 -0
  42. package/dist/Auth/Auth.js.map +1 -0
  43. package/dist/Auth/PassthroughAuth.cjs +2 -0
  44. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  45. package/dist/Auth/PassthroughAuth.d.ts +51 -0
  46. package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
  47. package/dist/Auth/PassthroughAuth.js +39 -0
  48. package/dist/Auth/PassthroughAuth.js.map +1 -0
  49. package/dist/Boost.cjs +2 -0
  50. package/dist/Boost.cjs.map +1 -0
  51. package/dist/Boost.d.ts +234 -0
  52. package/dist/Boost.d.ts.map +1 -0
  53. package/dist/Boost.js +162 -0
  54. package/dist/Boost.js.map +1 -0
  55. package/dist/BoostCore.cjs +3 -0
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +498 -0
  58. package/dist/BoostCore.d.ts.map +1 -0
  59. package/dist/BoostCore.js +1153 -0
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -0
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +243 -0
  64. package/dist/BoostRegistry.d.ts.map +1 -0
  65. package/dist/BoostRegistry.js +262 -0
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -0
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +31 -0
  70. package/dist/Budgets/Budget.d.ts.map +1 -0
  71. package/dist/Budgets/Budget.js +29 -0
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -0
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +1103 -0
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
  77. package/dist/Budgets/ManagedBudget.js +516 -0
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/SimpleBudget.d.ts +824 -0
  80. package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
  81. package/dist/Budgets/VestingBudget.d.ts +778 -0
  82. package/dist/Budgets/VestingBudget.d.ts.map +1 -0
  83. package/dist/Deployable/Contract.cjs +2 -0
  84. package/dist/Deployable/Contract.cjs.map +1 -0
  85. package/dist/Deployable/Contract.d.ts +125 -0
  86. package/dist/Deployable/Contract.d.ts.map +1 -0
  87. package/dist/Deployable/Contract.js +150 -0
  88. package/dist/Deployable/Contract.js.map +1 -0
  89. package/dist/Deployable/Deployable.cjs +2 -0
  90. package/dist/Deployable/Deployable.cjs.map +1 -0
  91. package/dist/Deployable/Deployable.d.ts +161 -0
  92. package/dist/Deployable/Deployable.d.ts.map +1 -0
  93. package/dist/Deployable/Deployable.js +131 -0
  94. package/dist/Deployable/Deployable.js.map +1 -0
  95. package/dist/Deployable/DeployableTarget.cjs +2 -0
  96. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  97. package/dist/Deployable/DeployableTarget.d.ts +116 -0
  98. package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
  99. package/dist/Deployable/DeployableTarget.js +132 -0
  100. package/dist/Deployable/DeployableTarget.js.map +1 -0
  101. package/dist/Incentives/AllowListIncentive.cjs +2 -0
  102. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  103. package/dist/Incentives/AllowListIncentive.d.ts +513 -0
  104. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
  105. package/dist/Incentives/AllowListIncentive.js +201 -0
  106. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  107. package/dist/Incentives/CGDAIncentive.cjs +2 -0
  108. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  109. package/dist/Incentives/CGDAIncentive.d.ts +644 -0
  110. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
  111. package/dist/Incentives/CGDAIncentive.js +271 -0
  112. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  113. package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
  114. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
  115. package/dist/Incentives/ERC20Incentive.cjs +2 -0
  116. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  117. package/dist/Incentives/ERC20Incentive.d.ts +666 -0
  118. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
  119. package/dist/Incentives/ERC20Incentive.js +312 -0
  120. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  121. package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
  122. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
  123. package/dist/Incentives/Incentive.cjs +2 -0
  124. package/dist/Incentives/Incentive.cjs.map +1 -0
  125. package/dist/Incentives/Incentive.d.ts +36 -0
  126. package/dist/Incentives/Incentive.d.ts.map +1 -0
  127. package/dist/Incentives/Incentive.js +299 -0
  128. package/dist/Incentives/Incentive.js.map +1 -0
  129. package/dist/Incentives/PointsIncentive.cjs +2 -0
  130. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  131. package/dist/Incentives/PointsIncentive.d.ts +659 -0
  132. package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
  133. package/dist/Incentives/PointsIncentive.js +215 -0
  134. package/dist/Incentives/PointsIncentive.js.map +1 -0
  135. package/dist/Validators/SignerValidator.cjs +2 -0
  136. package/dist/Validators/SignerValidator.cjs.map +1 -0
  137. package/dist/Validators/SignerValidator.d.ts +745 -0
  138. package/dist/Validators/SignerValidator.d.ts.map +1 -0
  139. package/dist/Validators/SignerValidator.js +293 -0
  140. package/dist/Validators/SignerValidator.js.map +1 -0
  141. package/dist/Validators/Validator.cjs +2 -0
  142. package/dist/Validators/Validator.cjs.map +1 -0
  143. package/dist/Validators/Validator.d.ts +31 -0
  144. package/dist/Validators/Validator.d.ts.map +1 -0
  145. package/dist/Validators/Validator.js +27 -0
  146. package/dist/Validators/Validator.js.map +1 -0
  147. package/dist/claiming.cjs +2 -0
  148. package/dist/claiming.cjs.map +1 -0
  149. package/dist/claiming.d.ts +43 -0
  150. package/dist/claiming.d.ts.map +1 -0
  151. package/dist/claiming.js +17 -0
  152. package/dist/claiming.js.map +1 -0
  153. package/dist/componentInterfaces-CKCBwG16.cjs +2 -0
  154. package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
  155. package/dist/componentInterfaces-DYkaxBda.js +13 -0
  156. package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
  157. package/dist/errors.cjs +2 -0
  158. package/dist/errors.cjs.map +1 -0
  159. package/dist/errors.d.ts +441 -0
  160. package/dist/errors.d.ts.map +1 -0
  161. package/dist/errors.js +262 -0
  162. package/dist/errors.js.map +1 -0
  163. package/dist/generated-BDeDiaCK.js +4625 -0
  164. package/dist/generated-BDeDiaCK.js.map +1 -0
  165. package/dist/generated-wKBNvm48.cjs +3 -0
  166. package/dist/generated-wKBNvm48.cjs.map +1 -0
  167. package/dist/index.cjs +2 -0
  168. package/dist/index.cjs.map +1 -0
  169. package/dist/index.d.ts +25 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.js +113 -0
  172. package/dist/index.js.map +1 -0
  173. package/dist/transfers.cjs +2 -0
  174. package/dist/transfers.cjs.map +1 -0
  175. package/dist/transfers.d.ts +198 -0
  176. package/dist/transfers.d.ts.map +1 -0
  177. package/dist/transfers.js +84 -0
  178. package/dist/transfers.js.map +1 -0
  179. package/dist/utils.cjs +2 -0
  180. package/dist/utils.cjs.map +1 -0
  181. package/dist/utils.d.ts +116 -0
  182. package/dist/utils.d.ts.map +1 -0
  183. package/dist/utils.js +30 -0
  184. package/dist/utils.js.map +1 -0
  185. package/package.json +211 -0
  186. package/src/Actions/Action.test.ts +75 -0
  187. package/src/Actions/Action.ts +61 -0
  188. package/src/Actions/ContractAction.test.ts +197 -0
  189. package/src/Actions/ContractAction.ts +301 -0
  190. package/src/Actions/ERC721MintAction.test.ts +112 -0
  191. package/src/Actions/ERC721MintAction.ts +292 -0
  192. package/src/Actions/EventAction.test.ts +205 -0
  193. package/src/Actions/EventAction.ts +811 -0
  194. package/src/AllowLists/AllowList.test.ts +64 -0
  195. package/src/AllowLists/AllowList.ts +60 -0
  196. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  197. package/src/AllowLists/SimpleAllowList.ts +284 -0
  198. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  199. package/src/AllowLists/SimpleDenyList.ts +227 -0
  200. package/src/Auth/Auth.ts +11 -0
  201. package/src/Auth/PassthroughAuth.test.ts +12 -0
  202. package/src/Auth/PassthroughAuth.ts +80 -0
  203. package/src/Boost.ts +290 -0
  204. package/src/BoostCore.test.ts +773 -0
  205. package/src/BoostCore.ts +1261 -0
  206. package/src/BoostRegistry.ts +467 -0
  207. package/src/Budgets/Budget.test.ts +27 -0
  208. package/src/Budgets/Budget.ts +61 -0
  209. package/src/Budgets/ManagedBudget.test.ts +154 -0
  210. package/src/Budgets/ManagedBudget.ts +796 -0
  211. package/src/Budgets/SimpleBudget.test.ts +152 -0
  212. package/src/Budgets/SimpleBudget.ts +564 -0
  213. package/src/Budgets/VestingBudget.test.ts +123 -0
  214. package/src/Budgets/VestingBudget.ts +602 -0
  215. package/src/Deployable/Contract.ts +229 -0
  216. package/src/Deployable/Deployable.ts +250 -0
  217. package/src/Deployable/DeployableTarget.ts +223 -0
  218. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  219. package/src/Incentives/AllowListIncentive.ts +334 -0
  220. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  221. package/src/Incentives/CGDAIncentive.ts +468 -0
  222. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  223. package/src/Incentives/ERC1155Incentive.ts +466 -0
  224. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  225. package/src/Incentives/ERC20Incentive.ts +482 -0
  226. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  227. package/src/Incentives/ERC20VariableIncentive.ts +420 -0
  228. package/src/Incentives/Incentive.test.ts +92 -0
  229. package/src/Incentives/Incentive.ts +85 -0
  230. package/src/Incentives/PointsIncentive.test.ts +139 -0
  231. package/src/Incentives/PointsIncentive.ts +365 -0
  232. package/src/Validators/SignerValidator.test.ts +159 -0
  233. package/src/Validators/SignerValidator.ts +681 -0
  234. package/src/Validators/Validator.test.ts +21 -0
  235. package/src/Validators/Validator.ts +55 -0
  236. package/src/claiming.ts +56 -0
  237. package/src/errors.ts +542 -0
  238. package/src/index.test.ts +40 -0
  239. package/src/index.ts +53 -0
  240. package/src/transfers.ts +284 -0
  241. package/src/utils.test.ts +44 -0
  242. package/src/utils.ts +198 -0
@@ -0,0 +1,513 @@
1
+ import { allowListIncentiveAbi } from '@boostxyz/evm';
2
+ import { type Address, type ContractEventName } from 'viem';
3
+ import { SimpleAllowList } from '../AllowLists/AllowList';
4
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
5
+ import { DeployableTarget } from '../Deployable/DeployableTarget';
6
+ import { type ClaimPayload } from '../claiming';
7
+ import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
8
+ export { allowListIncentiveAbi };
9
+ /**
10
+ * The object representation of a `AllowListIncentive.InitPayload`
11
+ *
12
+ * @export
13
+ * @interface AllowListIncentivePayload
14
+ * @typedef {AllowListIncentivePayload}
15
+ */
16
+ export interface AllowListIncentivePayload {
17
+ /**
18
+ * The address to the allowlist to add claimers to.
19
+ *
20
+ * @type {Address}
21
+ */
22
+ allowList: Address;
23
+ /**
24
+ * The maximum number of claims that can be made (one per address)
25
+ *
26
+ * @type {bigint}
27
+ */
28
+ limit: bigint;
29
+ }
30
+ /**
31
+ * A generic `viem.Log` event with support for `AllowListIncentive` event types.
32
+ *
33
+ * @export
34
+ * @typedef {AllowListIncentiveLog}
35
+ * @template {ContractEventName<
36
+ * typeof allowListIncentiveAbi
37
+ * >} [event=ContractEventName<typeof allowListIncentiveAbi>]
38
+ */
39
+ export type AllowListIncentiveLog<event extends ContractEventName<typeof allowListIncentiveAbi> = ContractEventName<typeof allowListIncentiveAbi>> = GenericLog<typeof allowListIncentiveAbi, event>;
40
+ /**
41
+ * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}
42
+ * In order for any claim to be successful:
43
+ * - The claimer must not already be on the allow list; and
44
+ * - The maximum number of claims must not have been reached; and
45
+ * - This contract must be authorized to modify the allow list
46
+ *
47
+ * @export
48
+ * @class AllowListIncentive
49
+ * @typedef {AllowListIncentive}
50
+ * @extends {DeployableTarget<AllowListIncentivePayload>}
51
+ */
52
+ export declare class AllowListIncentive extends DeployableTarget<AllowListIncentivePayload, typeof allowListIncentiveAbi> {
53
+ readonly abi: readonly [{
54
+ readonly type: "constructor";
55
+ readonly inputs: readonly [];
56
+ readonly stateMutability: "nonpayable";
57
+ }, {
58
+ readonly type: "error";
59
+ readonly inputs: readonly [];
60
+ readonly name: "AlreadyInitialized";
61
+ }, {
62
+ readonly type: "error";
63
+ readonly inputs: readonly [];
64
+ readonly name: "ClaimFailed";
65
+ }, {
66
+ readonly type: "error";
67
+ readonly inputs: readonly [];
68
+ readonly name: "CloneAlreadyInitialized";
69
+ }, {
70
+ readonly type: "error";
71
+ readonly inputs: readonly [];
72
+ readonly name: "InitializerNotImplemented";
73
+ }, {
74
+ readonly type: "error";
75
+ readonly inputs: readonly [];
76
+ readonly name: "InvalidInitialization";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly inputs: readonly [];
80
+ readonly name: "InvalidInitializationData";
81
+ }, {
82
+ readonly type: "error";
83
+ readonly inputs: readonly [];
84
+ readonly name: "NewOwnerIsZeroAddress";
85
+ }, {
86
+ readonly type: "error";
87
+ readonly inputs: readonly [];
88
+ readonly name: "NoHandoverRequest";
89
+ }, {
90
+ readonly type: "error";
91
+ readonly inputs: readonly [];
92
+ readonly name: "NotClaimable";
93
+ }, {
94
+ readonly type: "error";
95
+ readonly inputs: readonly [];
96
+ readonly name: "NotImplemented";
97
+ }, {
98
+ readonly type: "error";
99
+ readonly inputs: readonly [];
100
+ readonly name: "NotInitializing";
101
+ }, {
102
+ readonly type: "error";
103
+ readonly inputs: readonly [];
104
+ readonly name: "Unauthorized";
105
+ }, {
106
+ readonly type: "event";
107
+ readonly anonymous: false;
108
+ readonly inputs: readonly [{
109
+ readonly name: "recipient";
110
+ readonly internalType: "address";
111
+ readonly type: "address";
112
+ readonly indexed: true;
113
+ }, {
114
+ readonly name: "data";
115
+ readonly internalType: "bytes";
116
+ readonly type: "bytes";
117
+ readonly indexed: false;
118
+ }];
119
+ readonly name: "Claimed";
120
+ }, {
121
+ readonly type: "event";
122
+ readonly anonymous: false;
123
+ readonly inputs: readonly [{
124
+ readonly name: "version";
125
+ readonly internalType: "uint64";
126
+ readonly type: "uint64";
127
+ readonly indexed: false;
128
+ }];
129
+ readonly name: "Initialized";
130
+ }, {
131
+ readonly type: "event";
132
+ readonly anonymous: false;
133
+ readonly inputs: readonly [{
134
+ readonly name: "pendingOwner";
135
+ readonly internalType: "address";
136
+ readonly type: "address";
137
+ readonly indexed: true;
138
+ }];
139
+ readonly name: "OwnershipHandoverCanceled";
140
+ }, {
141
+ readonly type: "event";
142
+ readonly anonymous: false;
143
+ readonly inputs: readonly [{
144
+ readonly name: "pendingOwner";
145
+ readonly internalType: "address";
146
+ readonly type: "address";
147
+ readonly indexed: true;
148
+ }];
149
+ readonly name: "OwnershipHandoverRequested";
150
+ }, {
151
+ readonly type: "event";
152
+ readonly anonymous: false;
153
+ readonly inputs: readonly [{
154
+ readonly name: "oldOwner";
155
+ readonly internalType: "address";
156
+ readonly type: "address";
157
+ readonly indexed: true;
158
+ }, {
159
+ readonly name: "newOwner";
160
+ readonly internalType: "address";
161
+ readonly type: "address";
162
+ readonly indexed: true;
163
+ }];
164
+ readonly name: "OwnershipTransferred";
165
+ }, {
166
+ readonly type: "function";
167
+ readonly inputs: readonly [];
168
+ readonly name: "allowList";
169
+ readonly outputs: readonly [{
170
+ readonly name: "";
171
+ readonly internalType: "contract SimpleAllowList";
172
+ readonly type: "address";
173
+ }];
174
+ readonly stateMutability: "view";
175
+ }, {
176
+ readonly type: "function";
177
+ readonly inputs: readonly [];
178
+ readonly name: "cancelOwnershipHandover";
179
+ readonly outputs: readonly [];
180
+ readonly stateMutability: "payable";
181
+ }, {
182
+ readonly type: "function";
183
+ readonly inputs: readonly [{
184
+ readonly name: "claimTarget";
185
+ readonly internalType: "address";
186
+ readonly type: "address";
187
+ }, {
188
+ readonly name: "";
189
+ readonly internalType: "bytes";
190
+ readonly type: "bytes";
191
+ }];
192
+ readonly name: "claim";
193
+ readonly outputs: readonly [{
194
+ readonly name: "";
195
+ readonly internalType: "bool";
196
+ readonly type: "bool";
197
+ }];
198
+ readonly stateMutability: "nonpayable";
199
+ }, {
200
+ readonly type: "function";
201
+ readonly inputs: readonly [{
202
+ readonly name: "";
203
+ readonly internalType: "address";
204
+ readonly type: "address";
205
+ }];
206
+ readonly name: "claimed";
207
+ readonly outputs: readonly [{
208
+ readonly name: "";
209
+ readonly internalType: "bool";
210
+ readonly type: "bool";
211
+ }];
212
+ readonly stateMutability: "view";
213
+ }, {
214
+ readonly type: "function";
215
+ readonly inputs: readonly [];
216
+ readonly name: "claims";
217
+ readonly outputs: readonly [{
218
+ readonly name: "";
219
+ readonly internalType: "uint256";
220
+ readonly type: "uint256";
221
+ }];
222
+ readonly stateMutability: "view";
223
+ }, {
224
+ readonly type: "function";
225
+ readonly inputs: readonly [{
226
+ readonly name: "";
227
+ readonly internalType: "bytes";
228
+ readonly type: "bytes";
229
+ }];
230
+ readonly name: "clawback";
231
+ readonly outputs: readonly [{
232
+ readonly name: "";
233
+ readonly internalType: "bool";
234
+ readonly type: "bool";
235
+ }];
236
+ readonly stateMutability: "pure";
237
+ }, {
238
+ readonly type: "function";
239
+ readonly inputs: readonly [{
240
+ readonly name: "pendingOwner";
241
+ readonly internalType: "address";
242
+ readonly type: "address";
243
+ }];
244
+ readonly name: "completeOwnershipHandover";
245
+ readonly outputs: readonly [];
246
+ readonly stateMutability: "payable";
247
+ }, {
248
+ readonly type: "function";
249
+ readonly inputs: readonly [];
250
+ readonly name: "currentReward";
251
+ readonly outputs: readonly [{
252
+ readonly name: "";
253
+ readonly internalType: "uint256";
254
+ readonly type: "uint256";
255
+ }];
256
+ readonly stateMutability: "view";
257
+ }, {
258
+ readonly type: "function";
259
+ readonly inputs: readonly [];
260
+ readonly name: "getComponentInterface";
261
+ readonly outputs: readonly [{
262
+ readonly name: "";
263
+ readonly internalType: "bytes4";
264
+ readonly type: "bytes4";
265
+ }];
266
+ readonly stateMutability: "pure";
267
+ }, {
268
+ readonly type: "function";
269
+ readonly inputs: readonly [{
270
+ readonly name: "data_";
271
+ readonly internalType: "bytes";
272
+ readonly type: "bytes";
273
+ }];
274
+ readonly name: "initialize";
275
+ readonly outputs: readonly [];
276
+ readonly stateMutability: "nonpayable";
277
+ }, {
278
+ readonly type: "function";
279
+ readonly inputs: readonly [{
280
+ readonly name: "claimTarget";
281
+ readonly internalType: "address";
282
+ readonly type: "address";
283
+ }, {
284
+ readonly name: "";
285
+ readonly internalType: "bytes";
286
+ readonly type: "bytes";
287
+ }];
288
+ readonly name: "isClaimable";
289
+ readonly outputs: readonly [{
290
+ readonly name: "";
291
+ readonly internalType: "bool";
292
+ readonly type: "bool";
293
+ }];
294
+ readonly stateMutability: "view";
295
+ }, {
296
+ readonly type: "function";
297
+ readonly inputs: readonly [];
298
+ readonly name: "limit";
299
+ readonly outputs: readonly [{
300
+ readonly name: "";
301
+ readonly internalType: "uint256";
302
+ readonly type: "uint256";
303
+ }];
304
+ readonly stateMutability: "view";
305
+ }, {
306
+ readonly type: "function";
307
+ readonly inputs: readonly [];
308
+ readonly name: "owner";
309
+ readonly outputs: readonly [{
310
+ readonly name: "result";
311
+ readonly internalType: "address";
312
+ readonly type: "address";
313
+ }];
314
+ readonly stateMutability: "view";
315
+ }, {
316
+ readonly type: "function";
317
+ readonly inputs: readonly [{
318
+ readonly name: "pendingOwner";
319
+ readonly internalType: "address";
320
+ readonly type: "address";
321
+ }];
322
+ readonly name: "ownershipHandoverExpiresAt";
323
+ readonly outputs: readonly [{
324
+ readonly name: "result";
325
+ readonly internalType: "uint256";
326
+ readonly type: "uint256";
327
+ }];
328
+ readonly stateMutability: "view";
329
+ }, {
330
+ readonly type: "function";
331
+ readonly inputs: readonly [{
332
+ readonly name: "";
333
+ readonly internalType: "bytes";
334
+ readonly type: "bytes";
335
+ }];
336
+ readonly name: "preflight";
337
+ readonly outputs: readonly [{
338
+ readonly name: "";
339
+ readonly internalType: "bytes";
340
+ readonly type: "bytes";
341
+ }];
342
+ readonly stateMutability: "pure";
343
+ }, {
344
+ readonly type: "function";
345
+ readonly inputs: readonly [];
346
+ readonly name: "renounceOwnership";
347
+ readonly outputs: readonly [];
348
+ readonly stateMutability: "payable";
349
+ }, {
350
+ readonly type: "function";
351
+ readonly inputs: readonly [];
352
+ readonly name: "requestOwnershipHandover";
353
+ readonly outputs: readonly [];
354
+ readonly stateMutability: "payable";
355
+ }, {
356
+ readonly type: "function";
357
+ readonly inputs: readonly [];
358
+ readonly name: "reward";
359
+ readonly outputs: readonly [{
360
+ readonly name: "";
361
+ readonly internalType: "uint256";
362
+ readonly type: "uint256";
363
+ }];
364
+ readonly stateMutability: "view";
365
+ }, {
366
+ readonly type: "function";
367
+ readonly inputs: readonly [{
368
+ readonly name: "interfaceId";
369
+ readonly internalType: "bytes4";
370
+ readonly type: "bytes4";
371
+ }];
372
+ readonly name: "supportsInterface";
373
+ readonly outputs: readonly [{
374
+ readonly name: "";
375
+ readonly internalType: "bool";
376
+ readonly type: "bool";
377
+ }];
378
+ readonly stateMutability: "view";
379
+ }, {
380
+ readonly type: "function";
381
+ readonly inputs: readonly [{
382
+ readonly name: "newOwner";
383
+ readonly internalType: "address";
384
+ readonly type: "address";
385
+ }];
386
+ readonly name: "transferOwnership";
387
+ readonly outputs: readonly [];
388
+ readonly stateMutability: "payable";
389
+ }];
390
+ /**
391
+ * @inheritdoc
392
+ *
393
+ * @public
394
+ * @static
395
+ * @type {Address}
396
+ */
397
+ static base: Address;
398
+ /**
399
+ * @inheritdoc
400
+ *
401
+ * @public
402
+ * @static
403
+ * @type {RegistryType}
404
+ */
405
+ static registryType: RegistryType;
406
+ /**
407
+ * The owner of the allowList
408
+ *
409
+ * @public
410
+ * @async
411
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]
412
+ * @returns {unknown}
413
+ */
414
+ owner(params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>): Promise<`0x${string}`>;
415
+ /**
416
+ * The number of claims that have been made
417
+ *
418
+ * @public
419
+ * @async
420
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]
421
+ * @returns {Promise<bigint>}
422
+ */
423
+ claims(params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>): Promise<bigint>;
424
+ /**
425
+ * The reward amount issued for each claim
426
+ *
427
+ * @public
428
+ * @async
429
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]
430
+ * @returns {Promise<bigint>}
431
+ */
432
+ reward(params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>): Promise<bigint>;
433
+ /**
434
+ * Get the claim status for a user
435
+ *
436
+ * @public
437
+ * @async
438
+ * @param {Address} address
439
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]
440
+ * @returns {Promise<boolean>}
441
+ */
442
+ claimed(address: Address, params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>): Promise<boolean>;
443
+ /**
444
+ * The {@link SimpleAllowList} contract
445
+ *
446
+ * @public
447
+ * @async
448
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]
449
+ * @returns {Promise<SimpleAllowList>}
450
+ */
451
+ allowList(params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>): Promise<SimpleAllowList>;
452
+ /**
453
+ * The maximum number of claims that can be made (one per address)
454
+ *
455
+ * @public
456
+ * @async
457
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]
458
+ * @returns {unknown}
459
+ */
460
+ limit(params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>): Promise<bigint>;
461
+ /**
462
+ * Claim a slot on the {@link SimpleAllowList}
463
+ *
464
+ * @public
465
+ * @async
466
+ * @param {Pick<ClaimPayload, 'target'>} payload
467
+ * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]
468
+ * @returns {Promise<true>} - return true if successful, otherwise revert
469
+ */
470
+ protected claim(payload: Pick<ClaimPayload, 'target'>, params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>): Promise<boolean>;
471
+ /**
472
+ * Claim a slot on the {@link SimpleAllowList}
473
+ *
474
+ * @public
475
+ * @async
476
+ * @param {Pick<ClaimPayload, 'target'>} payload
477
+ * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]
478
+ * @returns {Promise<true>} - return true if successful, otherwise revert
479
+ */
480
+ protected claimRaw(payload: Pick<ClaimPayload, 'target'>, params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>): Promise<{
481
+ hash: `0x${string}`;
482
+ result: boolean;
483
+ }>;
484
+ /**
485
+ * Check if an incentive is claimable
486
+ *
487
+ * @public
488
+ * @async
489
+ * @param {Pick<ClaimPayload, 'target'>} payload
490
+ * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]
491
+ * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
492
+ */
493
+ isClaimable(payload: Pick<ClaimPayload, 'target'>, params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>): Promise<boolean>;
494
+ /**
495
+ * @inheritdoc
496
+ *
497
+ * @public
498
+ * @param {?AllowListIncentivePayload} [_payload]
499
+ * @param {?DeployableOptions} [_options]
500
+ * @returns {GenericDeployableParams}
501
+ */
502
+ buildParameters(_payload?: AllowListIncentivePayload, _options?: DeployableOptions): GenericDeployableParams;
503
+ }
504
+ /**
505
+ * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.
506
+ *
507
+ * @param {AllowListIncentivePayload} param0
508
+ * @param {Address} param0.allowList - The address to the allowlist to add claimers to.
509
+ * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)
510
+ * @returns {Hex}
511
+ */
512
+ export declare const prepareAllowListIncentivePayload: ({ allowList, limit, }: AllowListIncentivePayload) => `0x${string}`;
513
+ //# sourceMappingURL=AllowListIncentive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllowListIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/AllowListIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAUtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAGvB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQ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