@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,312 @@
1
+ import { f as s, an as n, ao as o, ap as h, aq as l, ar as m, as as u, at as w, au as y, av as g, aw as A, ax as p, ay as _, az as V, aA as R, aB as C, aC as x } from "../generated-BDeDiaCK.js";
2
+ import { encodeAbiParameters as k } from "viem";
3
+ import { DeployableTarget as q } from "../Deployable/DeployableTarget.js";
4
+ import { prepareClaimPayload as c } from "../claiming.js";
5
+ import { RegistryType as P } from "../utils.js";
6
+ const T = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b612273806100bd5f395ff3fe60806040526004361061013f575f3560e01c8063715018a6116100b5578063c884ef831161006e578063c884ef83146103f1578063db09da121461042d578063dcc59b6f14610469578063f04e283e14610493578063f2fde38b146104af578063fee81cf4146104cb5761013f565b8063715018a6146102f15780638da5cb5b146102fb578063a4d66daf14610325578063a8c62e761461034f578063b30906d414610379578063bb1757cf146103b55761013f565b806328d6183b1161010757806328d6183b146101f357806338d52e0f1461021d578063439fab9114610247578063474f5a441461026f5780634e7165a2146102ab57806354d1f13d146102e75761013f565b806301ffc9a71461014357806307621eca1461017f5780632275aea9146101a9578063228cb733146101bf57806325692962146101e9575b5f80fd5b34801561014e575f80fd5b50610169600480360381019061016491906116eb565b610507565b6040516101769190611730565b60405180910390f35b34801561018a575f80fd5b50610193610580565b6040516101a09190611761565b60405180910390f35b3480156101b4575f80fd5b506101bd610589565b005b3480156101ca575f80fd5b506101d3610756565b6040516101e09190611761565b60405180910390f35b6101f161075c565b005b3480156101fe575f80fd5b506102076107ad565b6040516102149190611789565b60405180910390f35b348015610228575f80fd5b506102316107d4565b60405161023e91906117e1565b60405180910390f35b348015610252575f80fd5b5061026d6004803603810190610268919061185b565b6107f9565b005b34801561027a575f80fd5b506102956004803603810190610290919061185b565b610a2c565b6040516102a29190611730565b60405180910390f35b3480156102b6575f80fd5b506102d160048036038101906102cc919061185b565b610ca7565b6040516102de9190611916565b60405180910390f35b6102ef610dc5565b005b6102f9610dfe565b005b348015610306575f80fd5b5061030f610e11565b60405161031c91906117e1565b60405180910390f35b348015610330575f80fd5b50610339610e39565b6040516103469190611761565b60405180910390f35b34801561035a575f80fd5b50610363610e3f565b60405161037091906119a9565b60405180910390f35b348015610384575f80fd5b5061039f600480360381019061039a91906119ec565b610e52565b6040516103ac91906117e1565b60405180910390f35b3480156103c0575f80fd5b506103db60048036038101906103d69190611a41565b610e8d565b6040516103e89190611730565b60405180910390f35b3480156103fc575f80fd5b5061041760048036038101906104129190611a9e565b61117f565b6040516104249190611730565b60405180910390f35b348015610438575f80fd5b50610453600480360381019061044e9190611a41565b61119c565b6040516104609190611730565b60405180910390f35b348015610474575f80fd5b5061047d6111af565b60405161048a9190611761565b60405180910390f35b6104ad60048036038101906104a89190611a9e565b6111b4565b005b6104c960048036038101906104c49190611a9e565b6111f2565b005b3480156104d6575f80fd5b506104f160048036038101906104ec9190611a9e565b61121b565b6040516104fe9190611761565b60405180910390f35b5f7f8c901437000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610579575061057882611234565b5b9050919050565b5f600154905090565b6105916112ad565b6001808111156105a4576105a3611936565b5b600360149054906101000a900460ff1660018111156105c6576105c5611936565b5b146105fd576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f604051806020016040528042446106159190611af6565b81525090505f6005808054905061062b846112e4565b6106359190611b56565b8154811061064657610645611b86565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506106be8160015460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f39092919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360015460405160200161072e93929190611c18565b60405160208183030381529060405260405161074a9190611916565b60405180910390a25050565b60015481565b5f61076561133c565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f8c90143700000000000000000000000000000000000000000000000000000000905090565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610802611346565b905080546003825580156108345760018160011c14303b1061082b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906108459190611d6c565b90505f8160400151148061085c57505f8160600151145b15610893576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6001808111156108a7576108a6611936565b5b826020015160018111156108be576108bd611936565b5b036108cd5781604001516108e2565b816060015182604001516108e19190611d97565b5b90505f61091130845f015173ffffffffffffffffffffffffffffffffffffffff1661136f90919063ffffffff16565b90508181101561095f57825f015181836040517f5c54305e00000000000000000000000000000000000000000000000000000000815260040161095693929190611dd8565b60405180910390fd5b825f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260200151600360146101000a81548160ff021916908360018111156109cb576109ca611936565b5b0217905550826040015160018190555082606001516004819055506109ef336113a2565b5050508015610a27576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f610a356112ad565b5f8383810190610a459190611f26565b90505f8160200151806020019051810190610a609190611f81565b9050600180811115610a7557610a74611936565b5b600360149054906101000a900460ff166001811115610a9757610a96611936565b5b03610b1c5760015481141580610aad57505f8054115b15610b10573382604051602001610ac4919061203d565b6040516020818303038152906040526040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b0792919061205d565b60405180910390fd5b5f600481905550610bb4565b5f60015482610b2b9190611b56565b14610b8e573382604051602001610b42919061203d565b6040516020818303038152906040526040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b8592919061205d565b60405180910390fd5b60015481610b9c919061208b565b60045f828254610bac91906120bb565b925050819055505b610c03825f01518260035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f39092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f015184604051602001610c7793929190611c18565b604051602081830303815290604052604051610c939190611916565b60405180910390a260019250505092915050565b60605f8383810190610cb99190611d6c565b90505f600180811115610ccf57610cce611936565b5b82602001516001811115610ce657610ce5611936565b5b03610cf5578160400151610d0a565b81606001518260400151610d099190611d97565b5b9050604051806080016040528060016002811115610d2b57610d2a611936565b5b8152602001835f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d8a9190612117565b604051602081830303815290604052815250604051602001610dac91906121d6565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610e066112ad565b610e0f5f611478565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b600360149054906101000a900460ff1681565b60058181548110610e61575f80fd5b905f5260205f20015f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f610e966112ad565b610e9f8461153e565b610ed5576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6001811115610ee857610ee7611936565b5b600360149054906101000a900460ff166001811115610f0a57610f09611936565b5b03611065575f80815480929190610f20906121f6565b9190505550600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610fc88460015460035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f39092919063ffffffff16565b8373ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168660015460405160200161103893929190611c18565b6040516020818303038152906040526040516110549190611916565b60405180910390a260019050611178565b5f80815480929190611076906121f6565b9190505550600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550600584908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff167ff0abe0f5c6f02112a9a4332e7b091bf49040ffddeedb73785a9b9a0a3ca7f15360405160405180910390a2600190505b9392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6111a68461153e565b90509392505050565b5f5481565b6111bc6112ad565b63389a75e1600c52805f526020600c2080544211156111e257636f5e88185f526004601cfd5b5f8155506111ef81611478565b50565b6111fa6112ad565b8060601b61120f57637448fbae5f526004601cfd5b61121881611478565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112a657506112a58261159f565b5b9050919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146112e2576382b429005f526004601cfd5b565b5f602082209050808252919050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716611333576390b8ec185f526004601cfd5b5f603452505050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b6113aa611618565b15611422577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156113e457630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350611475565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b611480611618565b156114e5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b821781555061153b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615801561159857506004545f54105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061161157506116108261161c565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6116ca81611696565b81146116d4575f80fd5b50565b5f813590506116e5816116c1565b92915050565b5f60208284031215611700576116ff61168e565b5b5f61170d848285016116d7565b91505092915050565b5f8115159050919050565b61172a81611716565b82525050565b5f6020820190506117435f830184611721565b92915050565b5f819050919050565b61175b81611749565b82525050565b5f6020820190506117745f830184611752565b92915050565b61178381611696565b82525050565b5f60208201905061179c5f83018461177a565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6117cb826117a2565b9050919050565b6117db816117c1565b82525050565b5f6020820190506117f45f8301846117d2565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261181b5761181a6117fa565b5b8235905067ffffffffffffffff811115611838576118376117fe565b5b60208301915083600182028301111561185457611853611802565b5b9250929050565b5f80602083850312156118715761187061168e565b5b5f83013567ffffffffffffffff81111561188e5761188d611692565b5b61189a85828601611806565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6118e8826118a6565b6118f281856118b0565b93506119028185602086016118c0565b61190b816118ce565b840191505092915050565b5f6020820190508181035f83015261192e81846118de565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6002811061197457611973611936565b5b50565b5f81905061198482611963565b919050565b5f61199382611977565b9050919050565b6119a381611989565b82525050565b5f6020820190506119bc5f83018461199a565b92915050565b6119cb81611749565b81146119d5575f80fd5b50565b5f813590506119e6816119c2565b92915050565b5f60208284031215611a0157611a0061168e565b5b5f611a0e848285016119d8565b91505092915050565b611a20816117c1565b8114611a2a575f80fd5b50565b5f81359050611a3b81611a17565b92915050565b5f805f60408486031215611a5857611a5761168e565b5b5f611a6586828701611a2d565b935050602084013567ffffffffffffffff811115611a8657611a85611692565b5b611a9286828701611806565b92509250509250925092565b5f60208284031215611ab357611ab261168e565b5b5f611ac084828501611a2d565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b0082611749565b9150611b0b83611749565b9250828201905080821115611b2357611b22611ac9565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611b6082611749565b9150611b6b83611749565b925082611b7b57611b7a611b29565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f8160601b9050919050565b5f611bc982611bb3565b9050919050565b5f611bda82611bbf565b9050919050565b611bf2611bed826117c1565b611bd0565b82525050565b5f819050919050565b611c12611c0d82611749565b611bf8565b82525050565b5f611c238286611be1565b601482019150611c338285611be1565b601482019150611c438284611c01565b602082019150819050949350505050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611c8e826118ce565b810181811067ffffffffffffffff82111715611cad57611cac611c58565b5b80604052505050565b5f611cbf611685565b9050611ccb8282611c85565b919050565b5f80fd5b60028110611ce0575f80fd5b50565b5f81359050611cf181611cd4565b92915050565b5f60808284031215611d0c57611d0b611c54565b5b611d166080611cb6565b90505f611d2584828501611a2d565b5f830152506020611d3884828501611ce3565b6020830152506040611d4c848285016119d8565b6040830152506060611d60848285016119d8565b60608301525092915050565b5f60808284031215611d8157611d8061168e565b5b5f611d8e84828501611cf7565b91505092915050565b5f611da182611749565b9150611dac83611749565b9250828202611dba81611749565b91508282048414831517611dd157611dd0611ac9565b5b5092915050565b5f606082019050611deb5f8301866117d2565b611df86020830185611752565b611e056040830184611752565b949350505050565b5f80fd5b5f67ffffffffffffffff821115611e2b57611e2a611c58565b5b611e34826118ce565b9050602081019050919050565b828183375f83830152505050565b5f611e61611e5c84611e11565b611cb6565b905082815260208101848484011115611e7d57611e7c611e0d565b5b611e88848285611e41565b509392505050565b5f82601f830112611ea457611ea36117fa565b5b8135611eb4848260208601611e4f565b91505092915050565b5f60408284031215611ed257611ed1611c54565b5b611edc6040611cb6565b90505f611eeb84828501611a2d565b5f83015250602082013567ffffffffffffffff811115611f0e57611f0d611cd0565b5b611f1a84828501611e90565b60208301525092915050565b5f60208284031215611f3b57611f3a61168e565b5b5f82013567ffffffffffffffff811115611f5857611f57611692565b5b611f6484828501611ebd565b91505092915050565b5f81519050611f7b816119c2565b92915050565b5f60208284031215611f9657611f9561168e565b5b5f611fa384828501611f6d565b91505092915050565b611fb5816117c1565b82525050565b5f82825260208201905092915050565b5f611fd5826118a6565b611fdf8185611fbb565b9350611fef8185602086016118c0565b611ff8816118ce565b840191505092915050565b5f604083015f8301516120185f860182611fac565b50602083015184820360208601526120308282611fcb565b9150508091505092915050565b5f6020820190508181035f8301526120558184612003565b905092915050565b5f6040820190506120705f8301856117d2565b818103602083015261208281846118de565b90509392505050565b5f61209582611749565b91506120a083611749565b9250826120b0576120af611b29565b5b828204905092915050565b5f6120c582611749565b91506120d083611749565b92508282039050818111156120e8576120e7611ac9565b5b92915050565b6120f781611749565b82525050565b602082015f8201516121115f8501826120ee565b50505050565b5f60208201905061212a5f8301846120fd565b92915050565b6003811061214157612140611936565b5b50565b5f81905061215182612130565b919050565b5f61216082612144565b9050919050565b61217081612156565b82525050565b5f608083015f83015161218b5f860182612167565b50602083015161219e6020860182611fac565b5060408301516121b16040860182611fac565b50606083015184820360608601526121c98282611fcb565b9150508091505092915050565b5f6020820190508181035f8301526121ee8184612176565b905092915050565b5f61220082611749565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361223257612231611ac9565b5b60018201905091905056fea264697066735822122035b61f4ea2c3b5fd5c3fe652b3fb2ea41d8542dbc6f57a84f75789864bfe9fc564736f6c634300081a0033", d = class d extends q {
7
+ constructor() {
8
+ super(...arguments), this.abi = s;
9
+ }
10
+ /**
11
+ * The owner of the incentive
12
+ *
13
+ * @public
14
+ * @async
15
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'owner'>} [params]
16
+ * @returns {unknown}
17
+ */
18
+ async owner(f) {
19
+ return await n(this._config, {
20
+ address: this.assertValidAddress(),
21
+ args: [],
22
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
23
+ ...f
24
+ });
25
+ }
26
+ /**
27
+ * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`
28
+ *
29
+ * @public
30
+ * @async
31
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'currentReward'>} [params]
32
+ * @returns {Promise<bigint>} - The current reward
33
+ */
34
+ async currentReward(f) {
35
+ return await o(this._config, {
36
+ address: this.assertValidAddress(),
37
+ args: [],
38
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
39
+ ...f
40
+ });
41
+ }
42
+ /**
43
+ * The number of claims that have been made
44
+ *
45
+ * @public
46
+ * @async
47
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'claims'>} [params]
48
+ * @returns {Promise<bigint>}
49
+ */
50
+ async claims(f) {
51
+ return await h(this._config, {
52
+ address: this.assertValidAddress(),
53
+ args: [],
54
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
55
+ ...f
56
+ });
57
+ }
58
+ /**
59
+ * A mapping of address to claim status
60
+ *
61
+ * @public
62
+ * @async
63
+ * @param {Address} address
64
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'claimed'>} [params]
65
+ * @returns {Promise<boolean>}
66
+ */
67
+ async claimed(f, b) {
68
+ return await l(this._config, {
69
+ address: this.assertValidAddress(),
70
+ args: [f],
71
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
72
+ ...b
73
+ });
74
+ }
75
+ /**
76
+ * The address of the ERC20-like token
77
+ *
78
+ * @public
79
+ * @async
80
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'asset'>} [params]
81
+ * @returns {Promise<Address>}
82
+ */
83
+ async asset(f) {
84
+ return await m(this._config, {
85
+ address: this.assertValidAddress(),
86
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
87
+ ...f
88
+ });
89
+ }
90
+ /**
91
+ * The strategy for the incentive (MINT or POOL)
92
+ *
93
+ * @public
94
+ * @async
95
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'strategy'>} [params]
96
+ * @returns {Promise<StrategyType>}
97
+ */
98
+ strategy(f) {
99
+ return u(this._config, {
100
+ address: this.assertValidAddress(),
101
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
102
+ ...f
103
+ });
104
+ }
105
+ /**
106
+ * The reward amount issued for each claim
107
+ *
108
+ * @public
109
+ * @async
110
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'reward'>} [params]
111
+ * @returns {Promise<bigint>}
112
+ */
113
+ async reward(f) {
114
+ return await w(this._config, {
115
+ address: this.assertValidAddress(),
116
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
117
+ ...f
118
+ });
119
+ }
120
+ /**
121
+ * The limit (max claims, or max entries for raffles)
122
+ *
123
+ * @public
124
+ * @async
125
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'limit'>} [params]
126
+ * @returns {unknown}
127
+ */
128
+ async limit(f) {
129
+ return await y(this._config, {
130
+ address: this.assertValidAddress(),
131
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
132
+ ...f
133
+ });
134
+ }
135
+ /**
136
+ * The set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.
137
+ *
138
+ * @public
139
+ * @async
140
+ * @param {bigint} i - Index of address
141
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'entries'>} [params]
142
+ * @returns {Promise<Address>}
143
+ */
144
+ async entries(f, b) {
145
+ return await g(this._config, {
146
+ address: this.assertValidAddress(),
147
+ args: [f],
148
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
149
+ ...b
150
+ });
151
+ }
152
+ /**
153
+ * Claim the incentive
154
+ *
155
+ * @public
156
+ * @async
157
+ * @param {ClaimPayload} payload
158
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'claim'>} [params]
159
+ * @returns {Promise<boolean>} - Returns true if successfully claimed
160
+ */
161
+ async claim(f, b) {
162
+ return await this.awaitResult(this.claimRaw(f, b));
163
+ }
164
+ /**
165
+ * Claim the incentive
166
+ *
167
+ * @public
168
+ * @async
169
+ * @param {ClaimPayload} payload
170
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'claim'>} [params]
171
+ * @returns {Promise<boolean>} - Returns true if successfully claimed
172
+ */
173
+ async claimRaw(f, b) {
174
+ const { request: a, result: e } = await A(
175
+ this._config,
176
+ {
177
+ address: this.assertValidAddress(),
178
+ args: [c(f)],
179
+ ...this.optionallyAttachAccount(),
180
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
181
+ ...b
182
+ }
183
+ );
184
+ return { hash: await p(this._config, a), result: e };
185
+ }
186
+ /**
187
+ * Clawback assets from the incentive
188
+ *
189
+ * @public
190
+ * @async
191
+ * @param {ClaimPayload} payload
192
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'clawback'>} [params]
193
+ * @returns {Promise<boolean>} - True if the assets were successfully clawbacked
194
+ */
195
+ async clawback(f, b) {
196
+ return await this.awaitResult(this.clawbackRaw(f, b));
197
+ }
198
+ /**
199
+ * Clawback assets from the incentive
200
+ *
201
+ * @public
202
+ * @async
203
+ * @param {ClaimPayload} payload
204
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'clawback'>} [params]
205
+ * @returns {Promise<boolean>} - True if the assets were successfully clawbacked
206
+ */
207
+ async clawbackRaw(f, b) {
208
+ const { request: a, result: e } = await _(
209
+ this._config,
210
+ {
211
+ address: this.assertValidAddress(),
212
+ args: [c(f)],
213
+ ...this.optionallyAttachAccount(),
214
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
215
+ ...b
216
+ }
217
+ );
218
+ return { hash: await V(this._config, a), result: e };
219
+ }
220
+ /**
221
+ * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.
222
+ *
223
+ * @public
224
+ * @async
225
+ * @param {ClaimPayload} payload
226
+ * @param {?ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>} [params]
227
+ * @returns {unknown} = True if the incentive is claimable based on the data payload
228
+ */
229
+ async isClaimable(f, b) {
230
+ return await R(this._config, {
231
+ address: this.assertValidAddress(),
232
+ args: [c(f)],
233
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
234
+ ...b
235
+ });
236
+ }
237
+ /**
238
+ * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`
239
+ *
240
+ * @public
241
+ * @async
242
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]
243
+ * @returns {Promise<void>}
244
+ */
245
+ async drawRaffle(f) {
246
+ return await this.awaitResult(this.drawRaffleRaw(f));
247
+ }
248
+ /**
249
+ * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`
250
+ *
251
+ * @public
252
+ * @async
253
+ * @param {?WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]
254
+ * @returns {Promise<void>}
255
+ */
256
+ async drawRaffleRaw(f) {
257
+ const { request: b, result: a } = await C(
258
+ this._config,
259
+ {
260
+ address: this.assertValidAddress(),
261
+ ...this.optionallyAttachAccount(),
262
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
263
+ ...f
264
+ }
265
+ );
266
+ return { hash: await x(this._config, b), result: a };
267
+ }
268
+ /**
269
+ * @inheritdoc
270
+ *
271
+ * @public
272
+ * @param {?ERC20IncentivePayload} [_payload]
273
+ * @param {?DeployableOptions} [_options]
274
+ * @returns {GenericDeployableParams}
275
+ */
276
+ buildParameters(f, b) {
277
+ const [a, e] = this.validateDeploymentConfig(
278
+ f,
279
+ b
280
+ );
281
+ return {
282
+ abi: s,
283
+ bytecode: T,
284
+ args: [B(a)],
285
+ ...this.optionallyAttachAccount(e.account)
286
+ };
287
+ }
288
+ };
289
+ d.base = "0x3efa476a81Bcf5426aA4b026CEC588EA3839dB18", d.registryType = P.INCENTIVE;
290
+ let t = d;
291
+ function B({
292
+ asset: r,
293
+ strategy: f,
294
+ reward: b,
295
+ limit: a
296
+ }) {
297
+ return k(
298
+ [
299
+ { type: "address", name: "asset" },
300
+ { type: "uint8", name: "strategy" },
301
+ { type: "uint256", name: "reward" },
302
+ { type: "uint256", name: "limit" }
303
+ ],
304
+ [r, f, b, a]
305
+ );
306
+ }
307
+ export {
308
+ t as ERC20Incentive,
309
+ s as erc20IncentiveAbi,
310
+ B as prepareERC20IncentivePayload
311
+ };
312
+ //# sourceMappingURL=ERC20Incentive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ERC20Incentive.js","sources":["../../src/Incentives/ERC20Incentive.ts"],"sourcesContent":["import {\n erc20IncentiveAbi,\n readErc20IncentiveAsset,\n readErc20IncentiveClaimed,\n readErc20IncentiveClaims,\n readErc20IncentiveCurrentReward,\n readErc20IncentiveEntries,\n readErc20IncentiveIsClaimable,\n readErc20IncentiveLimit,\n readErc20IncentiveOwner,\n readErc20IncentiveReward,\n readErc20IncentiveStrategy,\n simulateErc20IncentiveClaim,\n simulateErc20IncentiveClawback,\n simulateErc20IncentiveDrawRaffle,\n writeErc20IncentiveClaim,\n writeErc20IncentiveClawback,\n writeErc20IncentiveDrawRaffle,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20Incentive.sol/ERC20Incentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n type StrategyType,\n prepareClaimPayload,\n} from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20IncentiveAbi };\n\n/**\n * The object representation of a `ERC20Incentive.InitPayload`\n *\n * @export\n * @interface ERC20IncentivePayload\n * @typedef {ERC20IncentivePayload}\n */\nexport interface ERC20IncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\n *\n * @type {StrategyType}\n */\n strategy: StrategyType;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * How many times can this incentive be claimed.\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20Incentive` event types.\n *\n * @export\n * @typedef {ERC20IncentiveLog}\n * @template {ContractEventName<typeof erc20IncentiveAbi>} [event=ContractEventName<\n * typeof erc20IncentiveAbi\n * >]\n */\nexport type ERC20IncentiveLog<\n event extends ContractEventName<typeof erc20IncentiveAbi> = ContractEventName<\n typeof erc20IncentiveAbi\n >,\n> = GenericLog<typeof erc20IncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20Incentive\n * @typedef {ERC20Incentive}\n * @extends {DeployableTarget<ERC20IncentivePayload>}\n */\nexport class ERC20Incentive extends DeployableTarget<\n ERC20IncentivePayload,\n typeof erc20IncentiveAbi\n> {\n public override readonly abi = erc20IncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ERC20_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(params?: ReadParams<typeof erc20IncentiveAbi, 'owner'>) {\n return await readErc20IncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof erc20IncentiveAbi, 'currentReward'>,\n ) {\n return await readErc20IncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams<typeof erc20IncentiveAbi, 'claims'>) {\n return await readErc20IncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof erc20IncentiveAbi, 'claimed'>,\n ) {\n return await readErc20IncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'asset'>} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams<typeof erc20IncentiveAbi, 'asset'>) {\n return await readErc20IncentiveAsset(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The strategy for the incentive (MINT or POOL)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'strategy'>} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(\n params?: ReadParams<typeof erc20IncentiveAbi, 'strategy'>,\n ): Promise<StrategyType> {\n return readErc20IncentiveStrategy(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n }) as Promise<StrategyType>;\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams<typeof erc20IncentiveAbi, 'reward'>) {\n return await readErc20IncentiveReward(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The limit (max claims, or max entries for raffles)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(params?: ReadParams<typeof erc20IncentiveAbi, 'limit'>) {\n return await readErc20IncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.\n *\n * @public\n * @async\n * @param {bigint} i - Index of address\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'entries'>} [params]\n * @returns {Promise<Address>}\n */\n public async entries(\n i: bigint,\n params?: ReadParams<typeof erc20IncentiveAbi, 'entries'>,\n ) {\n return await readErc20IncentiveEntries(this._config, {\n address: this.assertValidAddress(),\n args: [i],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateErc20IncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawbackRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\n const { request, result } = await simulateErc20IncentiveClawback(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>} [params]\n * @returns {unknown} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>,\n ) {\n return await readErc20IncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\n return await this.awaitResult(this.drawRaffleRaw(params));\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffleRaw(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\n const { request, result } = await simulateErc20IncentiveDrawRaffle(\n this._config,\n {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveDrawRaffle(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20IncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20IncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20IncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20IncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.\n *\n * @param {ERC20IncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @returns {*}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\n}: ERC20IncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint8', name: 'strategy' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [asset, strategy, reward, limit],\n );\n}\n"],"names":["_ERC20Incentive","DeployableTarget","erc20IncentiveAbi","params","readErc20IncentiveOwner","readErc20IncentiveCurrentReward","readErc20IncentiveClaims","address","readErc20IncentiveClaimed","readErc20IncentiveAsset","readErc20IncentiveStrategy","readErc20IncentiveReward","readErc20IncentiveLimit","i","readErc20IncentiveEntries","payload","request","result","simulateErc20IncentiveClaim","prepareClaimPayload","writeErc20IncentiveClaim","simulateErc20IncentiveClawback","writeErc20IncentiveClawback","readErc20IncentiveIsClaimable","simulateErc20IncentiveDrawRaffle","writeErc20IncentiveDrawRaffle","_payload","_options","options","bytecode","prepareERC20IncentivePayload","RegistryType","ERC20Incentive","asset","strategy","reward","limit","encodeAbiParameters"],"mappings":";;;;;gnjBAsGaA,IAAN,MAAMA,UAAuBC,EAGlC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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