@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,659 @@
1
+ import { pointsIncentiveAbi } from '@boostxyz/evm';
2
+ import { type Address, type ContractEventName, type Hex } from 'viem';
3
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
+ import { DeployableTarget } from '../Deployable/DeployableTarget';
5
+ import { type ClaimPayload } from '../claiming';
6
+ import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
7
+ export { pointsIncentiveAbi };
8
+ /**
9
+ * The object representation of a `PointsIncentive.InitPayload`
10
+ *
11
+ * @export
12
+ * @interface PointsIncentivePayload
13
+ * @typedef {PointsIncentivePayload}
14
+ */
15
+ export interface PointsIncentivePayload {
16
+ /**
17
+ * The address of the points contract
18
+ *
19
+ * @type {Address}
20
+ */
21
+ venue: Address;
22
+ /**
23
+ * The selector for the issuance function on the points contract
24
+ *
25
+ * @type {Hex}
26
+ */
27
+ selector: Hex;
28
+ /**
29
+ * The reward amount issued for each claim
30
+ *
31
+ * @type {bigint}
32
+ */
33
+ reward: bigint;
34
+ /**
35
+ * The maximum number of claims that can be made (one per address)
36
+ *
37
+ * @type {bigint}
38
+ */
39
+ limit: bigint;
40
+ }
41
+ /**
42
+ * A generic `viem.Log` event with support for `PointsIncentive` event types.
43
+ *
44
+ * @export
45
+ * @typedef {PointsIncentiveLog}
46
+ * @template {ContractEventName<
47
+ * typeof pointsIncentiveAbi
48
+ * >} [event=ContractEventName<typeof pointsIncentiveAbi>]
49
+ */
50
+ export type PointsIncentiveLog<event extends ContractEventName<typeof pointsIncentiveAbi> = ContractEventName<typeof pointsIncentiveAbi>> = GenericLog<typeof pointsIncentiveAbi, event>;
51
+ /**
52
+ * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.
53
+ *
54
+ * In order for any claim to be successful:
55
+ * - The claimer must not have already claimed the incentive; and
56
+ * - The maximum number of claims must not have been reached; and
57
+ * - This contract must be authorized to operate the points contract's issuance function
58
+ *
59
+ * @export
60
+ * @class PointsIncentive
61
+ * @typedef {PointsIncentive}
62
+ * @extends {DeployableTarget<PointsIncentivePayload>}
63
+ */
64
+ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePayload, typeof pointsIncentiveAbi> {
65
+ readonly abi: readonly [{
66
+ readonly type: "constructor";
67
+ readonly inputs: readonly [];
68
+ readonly stateMutability: "nonpayable";
69
+ }, {
70
+ readonly type: "error";
71
+ readonly inputs: readonly [];
72
+ readonly name: "AlreadyInitialized";
73
+ }, {
74
+ readonly type: "error";
75
+ readonly inputs: readonly [];
76
+ readonly name: "ClaimFailed";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly inputs: readonly [];
80
+ readonly name: "CloneAlreadyInitialized";
81
+ }, {
82
+ readonly type: "error";
83
+ readonly inputs: readonly [];
84
+ readonly name: "InitializerNotImplemented";
85
+ }, {
86
+ readonly type: "error";
87
+ readonly inputs: readonly [];
88
+ readonly name: "InvalidInitialization";
89
+ }, {
90
+ readonly type: "error";
91
+ readonly inputs: readonly [];
92
+ readonly name: "InvalidInitialization";
93
+ }, {
94
+ readonly type: "error";
95
+ readonly inputs: readonly [];
96
+ readonly name: "InvalidInitializationData";
97
+ }, {
98
+ readonly type: "error";
99
+ readonly inputs: readonly [];
100
+ readonly name: "NewOwnerIsZeroAddress";
101
+ }, {
102
+ readonly type: "error";
103
+ readonly inputs: readonly [];
104
+ readonly name: "NoHandoverRequest";
105
+ }, {
106
+ readonly type: "error";
107
+ readonly inputs: readonly [];
108
+ readonly name: "NotClaimable";
109
+ }, {
110
+ readonly type: "error";
111
+ readonly inputs: readonly [];
112
+ readonly name: "NotImplemented";
113
+ }, {
114
+ readonly type: "error";
115
+ readonly inputs: readonly [];
116
+ readonly name: "NotInitializing";
117
+ }, {
118
+ readonly type: "error";
119
+ readonly inputs: readonly [];
120
+ readonly name: "Unauthorized";
121
+ }, {
122
+ readonly type: "error";
123
+ readonly inputs: readonly [];
124
+ readonly name: "Unauthorized";
125
+ }, {
126
+ readonly type: "event";
127
+ readonly anonymous: false;
128
+ readonly inputs: readonly [{
129
+ readonly name: "recipient";
130
+ readonly internalType: "address";
131
+ readonly type: "address";
132
+ readonly indexed: true;
133
+ }, {
134
+ readonly name: "data";
135
+ readonly internalType: "bytes";
136
+ readonly type: "bytes";
137
+ readonly indexed: false;
138
+ }];
139
+ readonly name: "Claimed";
140
+ }, {
141
+ readonly type: "event";
142
+ readonly anonymous: false;
143
+ readonly inputs: readonly [{
144
+ readonly name: "version";
145
+ readonly internalType: "uint64";
146
+ readonly type: "uint64";
147
+ readonly indexed: false;
148
+ }];
149
+ readonly name: "Initialized";
150
+ }, {
151
+ readonly type: "event";
152
+ readonly anonymous: false;
153
+ readonly inputs: readonly [{
154
+ readonly name: "pendingOwner";
155
+ readonly internalType: "address";
156
+ readonly type: "address";
157
+ readonly indexed: true;
158
+ }];
159
+ readonly name: "OwnershipHandoverCanceled";
160
+ }, {
161
+ readonly type: "event";
162
+ readonly anonymous: false;
163
+ readonly inputs: readonly [{
164
+ readonly name: "pendingOwner";
165
+ readonly internalType: "address";
166
+ readonly type: "address";
167
+ readonly indexed: true;
168
+ }];
169
+ readonly name: "OwnershipHandoverRequested";
170
+ }, {
171
+ readonly type: "event";
172
+ readonly anonymous: false;
173
+ readonly inputs: readonly [{
174
+ readonly name: "oldOwner";
175
+ readonly internalType: "address";
176
+ readonly type: "address";
177
+ readonly indexed: true;
178
+ }, {
179
+ readonly name: "newOwner";
180
+ readonly internalType: "address";
181
+ readonly type: "address";
182
+ readonly indexed: true;
183
+ }];
184
+ readonly name: "OwnershipTransferred";
185
+ }, {
186
+ readonly type: "event";
187
+ readonly anonymous: false;
188
+ readonly inputs: readonly [{
189
+ readonly name: "user";
190
+ readonly internalType: "address";
191
+ readonly type: "address";
192
+ readonly indexed: true;
193
+ }, {
194
+ readonly name: "roles";
195
+ readonly internalType: "uint256";
196
+ readonly type: "uint256";
197
+ readonly indexed: true;
198
+ }];
199
+ readonly name: "RolesUpdated";
200
+ }, {
201
+ readonly type: "function";
202
+ readonly inputs: readonly [];
203
+ readonly name: "cancelOwnershipHandover";
204
+ readonly outputs: readonly [];
205
+ readonly stateMutability: "payable";
206
+ }, {
207
+ readonly type: "function";
208
+ readonly inputs: readonly [{
209
+ readonly name: "claimTarget";
210
+ readonly internalType: "address";
211
+ readonly type: "address";
212
+ }, {
213
+ readonly name: "";
214
+ readonly internalType: "bytes";
215
+ readonly type: "bytes";
216
+ }];
217
+ readonly name: "claim";
218
+ readonly outputs: readonly [{
219
+ readonly name: "";
220
+ readonly internalType: "bool";
221
+ readonly type: "bool";
222
+ }];
223
+ readonly stateMutability: "nonpayable";
224
+ }, {
225
+ readonly type: "function";
226
+ readonly inputs: readonly [{
227
+ readonly name: "";
228
+ readonly internalType: "address";
229
+ readonly type: "address";
230
+ }];
231
+ readonly name: "claimed";
232
+ readonly outputs: readonly [{
233
+ readonly name: "";
234
+ readonly internalType: "bool";
235
+ readonly type: "bool";
236
+ }];
237
+ readonly stateMutability: "view";
238
+ }, {
239
+ readonly type: "function";
240
+ readonly inputs: readonly [];
241
+ readonly name: "claims";
242
+ readonly outputs: readonly [{
243
+ readonly name: "";
244
+ readonly internalType: "uint256";
245
+ readonly type: "uint256";
246
+ }];
247
+ readonly stateMutability: "view";
248
+ }, {
249
+ readonly type: "function";
250
+ readonly inputs: readonly [{
251
+ readonly name: "";
252
+ readonly internalType: "bytes";
253
+ readonly type: "bytes";
254
+ }];
255
+ readonly name: "clawback";
256
+ readonly outputs: readonly [{
257
+ readonly name: "";
258
+ readonly internalType: "bool";
259
+ readonly type: "bool";
260
+ }];
261
+ readonly stateMutability: "pure";
262
+ }, {
263
+ readonly type: "function";
264
+ readonly inputs: readonly [{
265
+ readonly name: "pendingOwner";
266
+ readonly internalType: "address";
267
+ readonly type: "address";
268
+ }];
269
+ readonly name: "completeOwnershipHandover";
270
+ readonly outputs: readonly [];
271
+ readonly stateMutability: "payable";
272
+ }, {
273
+ readonly type: "function";
274
+ readonly inputs: readonly [];
275
+ readonly name: "currentReward";
276
+ readonly outputs: readonly [{
277
+ readonly name: "";
278
+ readonly internalType: "uint256";
279
+ readonly type: "uint256";
280
+ }];
281
+ readonly stateMutability: "view";
282
+ }, {
283
+ readonly type: "function";
284
+ readonly inputs: readonly [];
285
+ readonly name: "getComponentInterface";
286
+ readonly outputs: readonly [{
287
+ readonly name: "";
288
+ readonly internalType: "bytes4";
289
+ readonly type: "bytes4";
290
+ }];
291
+ readonly stateMutability: "pure";
292
+ }, {
293
+ readonly type: "function";
294
+ readonly inputs: readonly [{
295
+ readonly name: "user";
296
+ readonly internalType: "address";
297
+ readonly type: "address";
298
+ }, {
299
+ readonly name: "roles";
300
+ readonly internalType: "uint256";
301
+ readonly type: "uint256";
302
+ }];
303
+ readonly name: "grantRoles";
304
+ readonly outputs: readonly [];
305
+ readonly stateMutability: "payable";
306
+ }, {
307
+ readonly type: "function";
308
+ readonly inputs: readonly [{
309
+ readonly name: "user";
310
+ readonly internalType: "address";
311
+ readonly type: "address";
312
+ }, {
313
+ readonly name: "roles";
314
+ readonly internalType: "uint256";
315
+ readonly type: "uint256";
316
+ }];
317
+ readonly name: "hasAllRoles";
318
+ readonly outputs: readonly [{
319
+ readonly name: "";
320
+ readonly internalType: "bool";
321
+ readonly type: "bool";
322
+ }];
323
+ readonly stateMutability: "view";
324
+ }, {
325
+ readonly type: "function";
326
+ readonly inputs: readonly [{
327
+ readonly name: "user";
328
+ readonly internalType: "address";
329
+ readonly type: "address";
330
+ }, {
331
+ readonly name: "roles";
332
+ readonly internalType: "uint256";
333
+ readonly type: "uint256";
334
+ }];
335
+ readonly name: "hasAnyRole";
336
+ readonly outputs: readonly [{
337
+ readonly name: "";
338
+ readonly internalType: "bool";
339
+ readonly type: "bool";
340
+ }];
341
+ readonly stateMutability: "view";
342
+ }, {
343
+ readonly type: "function";
344
+ readonly inputs: readonly [{
345
+ readonly name: "data_";
346
+ readonly internalType: "bytes";
347
+ readonly type: "bytes";
348
+ }];
349
+ readonly name: "initialize";
350
+ readonly outputs: readonly [];
351
+ readonly stateMutability: "nonpayable";
352
+ }, {
353
+ readonly type: "function";
354
+ readonly inputs: readonly [{
355
+ readonly name: "claimTarget";
356
+ readonly internalType: "address";
357
+ readonly type: "address";
358
+ }, {
359
+ readonly name: "";
360
+ readonly internalType: "bytes";
361
+ readonly type: "bytes";
362
+ }];
363
+ readonly name: "isClaimable";
364
+ readonly outputs: readonly [{
365
+ readonly name: "";
366
+ readonly internalType: "bool";
367
+ readonly type: "bool";
368
+ }];
369
+ readonly stateMutability: "view";
370
+ }, {
371
+ readonly type: "function";
372
+ readonly inputs: readonly [];
373
+ readonly name: "limit";
374
+ readonly outputs: readonly [{
375
+ readonly name: "";
376
+ readonly internalType: "uint256";
377
+ readonly type: "uint256";
378
+ }];
379
+ readonly stateMutability: "view";
380
+ }, {
381
+ readonly type: "function";
382
+ readonly inputs: readonly [];
383
+ readonly name: "owner";
384
+ readonly outputs: readonly [{
385
+ readonly name: "result";
386
+ readonly internalType: "address";
387
+ readonly type: "address";
388
+ }];
389
+ readonly stateMutability: "view";
390
+ }, {
391
+ readonly type: "function";
392
+ readonly inputs: readonly [{
393
+ readonly name: "pendingOwner";
394
+ readonly internalType: "address";
395
+ readonly type: "address";
396
+ }];
397
+ readonly name: "ownershipHandoverExpiresAt";
398
+ readonly outputs: readonly [{
399
+ readonly name: "result";
400
+ readonly internalType: "uint256";
401
+ readonly type: "uint256";
402
+ }];
403
+ readonly stateMutability: "view";
404
+ }, {
405
+ readonly type: "function";
406
+ readonly inputs: readonly [{
407
+ readonly name: "";
408
+ readonly internalType: "bytes";
409
+ readonly type: "bytes";
410
+ }];
411
+ readonly name: "preflight";
412
+ readonly outputs: readonly [{
413
+ readonly name: "budgetData";
414
+ readonly internalType: "bytes";
415
+ readonly type: "bytes";
416
+ }];
417
+ readonly stateMutability: "pure";
418
+ }, {
419
+ readonly type: "function";
420
+ readonly inputs: readonly [];
421
+ readonly name: "renounceOwnership";
422
+ readonly outputs: readonly [];
423
+ readonly stateMutability: "payable";
424
+ }, {
425
+ readonly type: "function";
426
+ readonly inputs: readonly [{
427
+ readonly name: "roles";
428
+ readonly internalType: "uint256";
429
+ readonly type: "uint256";
430
+ }];
431
+ readonly name: "renounceRoles";
432
+ readonly outputs: readonly [];
433
+ readonly stateMutability: "payable";
434
+ }, {
435
+ readonly type: "function";
436
+ readonly inputs: readonly [];
437
+ readonly name: "requestOwnershipHandover";
438
+ readonly outputs: readonly [];
439
+ readonly stateMutability: "payable";
440
+ }, {
441
+ readonly type: "function";
442
+ readonly inputs: readonly [{
443
+ readonly name: "user";
444
+ readonly internalType: "address";
445
+ readonly type: "address";
446
+ }, {
447
+ readonly name: "roles";
448
+ readonly internalType: "uint256";
449
+ readonly type: "uint256";
450
+ }];
451
+ readonly name: "revokeRoles";
452
+ readonly outputs: readonly [];
453
+ readonly stateMutability: "payable";
454
+ }, {
455
+ readonly type: "function";
456
+ readonly inputs: readonly [];
457
+ readonly name: "reward";
458
+ readonly outputs: readonly [{
459
+ readonly name: "";
460
+ readonly internalType: "uint256";
461
+ readonly type: "uint256";
462
+ }];
463
+ readonly stateMutability: "view";
464
+ }, {
465
+ readonly type: "function";
466
+ readonly inputs: readonly [{
467
+ readonly name: "user";
468
+ readonly internalType: "address";
469
+ readonly type: "address";
470
+ }];
471
+ readonly name: "rolesOf";
472
+ readonly outputs: readonly [{
473
+ readonly name: "roles";
474
+ readonly internalType: "uint256";
475
+ readonly type: "uint256";
476
+ }];
477
+ readonly stateMutability: "view";
478
+ }, {
479
+ readonly type: "function";
480
+ readonly inputs: readonly [];
481
+ readonly name: "selector";
482
+ readonly outputs: readonly [{
483
+ readonly name: "";
484
+ readonly internalType: "bytes4";
485
+ readonly type: "bytes4";
486
+ }];
487
+ readonly stateMutability: "view";
488
+ }, {
489
+ readonly type: "function";
490
+ readonly inputs: readonly [{
491
+ readonly name: "interfaceId";
492
+ readonly internalType: "bytes4";
493
+ readonly type: "bytes4";
494
+ }];
495
+ readonly name: "supportsInterface";
496
+ readonly outputs: readonly [{
497
+ readonly name: "";
498
+ readonly internalType: "bool";
499
+ readonly type: "bool";
500
+ }];
501
+ readonly stateMutability: "view";
502
+ }, {
503
+ readonly type: "function";
504
+ readonly inputs: readonly [{
505
+ readonly name: "newOwner";
506
+ readonly internalType: "address";
507
+ readonly type: "address";
508
+ }];
509
+ readonly name: "transferOwnership";
510
+ readonly outputs: readonly [];
511
+ readonly stateMutability: "payable";
512
+ }, {
513
+ readonly type: "function";
514
+ readonly inputs: readonly [];
515
+ readonly name: "venue";
516
+ readonly outputs: readonly [{
517
+ readonly name: "";
518
+ readonly internalType: "address";
519
+ readonly type: "address";
520
+ }];
521
+ readonly stateMutability: "view";
522
+ }];
523
+ /**
524
+ * @inheritdoc
525
+ *
526
+ * @public
527
+ * @static
528
+ * @type {Address}
529
+ */
530
+ static base: Address;
531
+ /**
532
+ * @inheritdoc
533
+ *
534
+ * @public
535
+ * @static
536
+ * @type {RegistryType}
537
+ */
538
+ static registryType: RegistryType;
539
+ /**
540
+ * The number of claims that have been made
541
+ *
542
+ * @public
543
+ * @async
544
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'claims'>} [params]
545
+ * @returns {Promise<bigint>}
546
+ */
547
+ claims(params?: ReadParams<typeof pointsIncentiveAbi, 'claims'>): Promise<bigint>;
548
+ /**
549
+ * The current reward
550
+ *
551
+ * @public
552
+ * @async
553
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'currentReward'>} [params]
554
+ * @returns {Promise<bigint>} - The current reward
555
+ */
556
+ currentReward(params?: ReadParams<typeof pointsIncentiveAbi, 'currentReward'>): Promise<bigint>;
557
+ /**
558
+ * The reward amount issued for each claim
559
+ *
560
+ * @public
561
+ * @async
562
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'reward'>} [params]
563
+ * @returns {unknown}
564
+ */
565
+ reward(params?: ReadParams<typeof pointsIncentiveAbi, 'reward'>): Promise<bigint>;
566
+ /**
567
+ * A mapping of address to claim status
568
+ *
569
+ * @public
570
+ * @async
571
+ * @param {Address} address
572
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'claimed'>} [params]
573
+ * @returns {unknown}
574
+ */
575
+ claimed(address: Address, params?: ReadParams<typeof pointsIncentiveAbi, 'claimed'>): Promise<boolean>;
576
+ /**
577
+ * The address of the points contract
578
+ *
579
+ * @public
580
+ * @async
581
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'venue'>} [params]
582
+ * @returns {unknown}
583
+ */
584
+ venue(params?: ReadParams<typeof pointsIncentiveAbi, 'venue'>): Promise<`0x${string}`>;
585
+ /**
586
+ * The maximum number of claims that can be made (one per address)
587
+ *
588
+ * @public
589
+ * @async
590
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'limit'>} [params]
591
+ * @returns {Promise<bigint>}
592
+ */
593
+ limit(params?: ReadParams<typeof pointsIncentiveAbi, 'limit'>): Promise<bigint>;
594
+ /**
595
+ * The selector for the issuance function on the points contract
596
+ *
597
+ * @public
598
+ * @async
599
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'selector'>} [params]
600
+ * @returns {Promise<Hex>}
601
+ */
602
+ selector(params?: ReadParams<typeof pointsIncentiveAbi, 'selector'>): Promise<`0x${string}`>;
603
+ /**
604
+ * Claim the incentive
605
+ *
606
+ * @public
607
+ * @async
608
+ * @param {ClaimPayload} payload
609
+ * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]
610
+ * @returns {Promise<boolean>} - True if the incentive was successfully claimed
611
+ */
612
+ protected claim(payload: ClaimPayload, params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>): Promise<boolean>;
613
+ /**
614
+ * Claim the incentive
615
+ *
616
+ * @public
617
+ * @async
618
+ * @param {ClaimPayload} payload
619
+ * @param {?WriteParams<typeof pointsIncentiveAbi, 'claim'>} [params]
620
+ * @returns {Promise<boolean>} - True if the incentive was successfully claimed
621
+ */
622
+ protected claimRaw(payload: ClaimPayload, params?: WriteParams<typeof pointsIncentiveAbi, 'claim'>): Promise<{
623
+ hash: `0x${string}`;
624
+ result: boolean;
625
+ }>;
626
+ /**
627
+ * Check if an incentive is claimable.
628
+ * For the POOL strategy, the `bytes data` portion of the payload ignored.
629
+ * The recipient must not have already claimed the incentive.
630
+ *
631
+ * @public
632
+ * @async
633
+ * @param {ClaimPayload} payload
634
+ * @param {?ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>} [params]
635
+ * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
636
+ */
637
+ isClaimable(payload: ClaimPayload, params?: ReadParams<typeof pointsIncentiveAbi, 'isClaimable'>): Promise<boolean>;
638
+ /**
639
+ * @inheritdoc
640
+ *
641
+ * @public
642
+ * @param {?PointsIncentivePayload} [_payload]
643
+ * @param {?DeployableOptions} [_options]
644
+ * @returns {GenericDeployableParams}
645
+ */
646
+ buildParameters(_payload?: PointsIncentivePayload, _options?: DeployableOptions): GenericDeployableParams;
647
+ }
648
+ /**
649
+ * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.
650
+ *
651
+ * @param {PointsIncentivePayload} param0
652
+ * @param {Address} param0.venue - The address of the points contract
653
+ * @param {Hex} param0.selector - The selector for the issuance function on the points contract
654
+ * @param {bigint} param0.reward - The reward amount issued for each claim
655
+ * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)
656
+ * @returns {*}
657
+ */
658
+ export declare const preparePointsIncentivePayload: ({ venue, selector, reward, limit, }: PointsIncentivePayload) => `0x${string}`;
659
+ //# sourceMappingURL=PointsIncentive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PointsIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/PointsIncentive.ts"],"names":[],"mappings":"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"}