@boostxyz/sdk 6.1.3 → 7.0.0-canary.0

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 (178) hide show
  1. package/README.md +1 -1
  2. package/dist/Actions/Action.cjs +1 -1
  3. package/dist/Actions/Action.js +4 -4
  4. package/dist/Actions/EventAction.cjs +1 -1
  5. package/dist/Actions/EventAction.cjs.map +1 -1
  6. package/dist/Actions/EventAction.d.ts +10 -0
  7. package/dist/Actions/EventAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.js +84 -83
  9. package/dist/Actions/EventAction.js.map +1 -1
  10. package/dist/AllowLists/AllowList.cjs +1 -1
  11. package/dist/AllowLists/AllowList.js +3 -3
  12. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  13. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  14. package/dist/AllowLists/SimpleAllowList.js +14 -14
  15. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  16. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  17. package/dist/AllowLists/SimpleDenyList.js +3 -3
  18. package/dist/Auth/PassthroughAuth.cjs +1 -1
  19. package/dist/Auth/PassthroughAuth.js +1 -1
  20. package/dist/BoostCore.cjs +2 -2
  21. package/dist/BoostCore.cjs.map +1 -1
  22. package/dist/BoostCore.d.ts +1894 -267
  23. package/dist/BoostCore.d.ts.map +1 -1
  24. package/dist/BoostCore.js +808 -497
  25. package/dist/BoostCore.js.map +1 -1
  26. package/dist/BoostRegistry.cjs +1 -1
  27. package/dist/BoostRegistry.js +47 -47
  28. package/dist/Budget-B_kgJGDu.cjs +2 -0
  29. package/dist/Budget-B_kgJGDu.cjs.map +1 -0
  30. package/dist/Budget-Bvi5Qjqp.js +1124 -0
  31. package/dist/Budget-Bvi5Qjqp.js.map +1 -0
  32. package/dist/Budgets/Budget.cjs +1 -1
  33. package/dist/Budgets/Budget.d.ts +5 -4
  34. package/dist/Budgets/Budget.d.ts.map +1 -1
  35. package/dist/Budgets/Budget.js +9 -6
  36. package/dist/Budgets/ManagedBudget.cjs +1 -1
  37. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  38. package/dist/Budgets/ManagedBudget.d.ts +4 -0
  39. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +25 -25
  41. package/dist/Budgets/ManagedBudgetWithFees.d.ts +4 -0
  42. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  43. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +4 -0
  44. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -1
  45. package/dist/Budgets/TransparentBudget.d.ts +944 -0
  46. package/dist/Budgets/TransparentBudget.d.ts.map +1 -0
  47. package/dist/Budgets/VestingBudget.d.ts +4 -0
  48. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  49. package/dist/Deployable/Deployable.cjs.map +1 -1
  50. package/dist/Deployable/Deployable.d.ts +1 -1
  51. package/dist/Deployable/Deployable.d.ts.map +1 -1
  52. package/dist/Deployable/Deployable.js.map +1 -1
  53. package/dist/Deployable/DeployableTarget.cjs +1 -1
  54. package/dist/Deployable/DeployableTarget.js +1 -1
  55. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  56. package/dist/Deployable/DeployableTargetWithRBAC.js +19 -19
  57. package/dist/Incentive-CLKutfnD.js +445 -0
  58. package/dist/Incentive-CLKutfnD.js.map +1 -0
  59. package/dist/Incentive-CLSVNxDz.cjs +2 -0
  60. package/dist/Incentive-CLSVNxDz.cjs.map +1 -0
  61. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  62. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  63. package/dist/Incentives/AllowListIncentive.js +9 -9
  64. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  66. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  67. package/dist/Incentives/CGDAIncentive.js +5 -5
  68. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  70. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.js +17 -17
  72. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  73. package/dist/Incentives/ERC20PeggedIncentive.d.ts +1 -1
  74. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +2 -0
  75. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -0
  76. package/dist/Incentives/{ERC20PeggedVariableCriteriaIncentive.d.ts → ERC20PeggedVariableCriteriaIncentiveV2.d.ts} +39 -27
  77. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -0
  78. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +625 -0
  79. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -0
  80. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +2 -0
  81. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -0
  82. package/dist/Incentives/{ERC20VariableCriteriaIncentive.d.ts → ERC20VariableCriteriaIncentiveV2.d.ts} +42 -13
  83. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -0
  84. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +242 -0
  85. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -0
  86. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  87. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  88. package/dist/Incentives/ERC20VariableIncentive.d.ts +3 -3
  89. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  90. package/dist/Incentives/ERC20VariableIncentive.js +22 -22
  91. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  92. package/dist/Incentives/Incentive.cjs +1 -1
  93. package/dist/Incentives/Incentive.d.ts +8 -8
  94. package/dist/Incentives/Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/Incentive.js +13 -12
  96. package/dist/Incentives/Incentive.js.map +1 -1
  97. package/dist/Incentives/PointsIncentive.cjs +1 -1
  98. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  99. package/dist/Incentives/PointsIncentive.js +13 -13
  100. package/dist/Incentives/PointsIncentive.js.map +1 -1
  101. package/dist/SimpleDenyList-C1C_BHkY.js +133 -0
  102. package/dist/{SimpleDenyList-BKfPoTo1.js.map → SimpleDenyList-C1C_BHkY.js.map} +1 -1
  103. package/dist/SimpleDenyList-CWthbyj7.cjs +2 -0
  104. package/dist/{SimpleDenyList-DgjVf7FK.cjs.map → SimpleDenyList-CWthbyj7.cjs.map} +1 -1
  105. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  106. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  107. package/dist/Validators/LimitedSignerValidator.js +18 -18
  108. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.js +54 -54
  112. package/dist/Validators/SignerValidator.js.map +1 -1
  113. package/dist/Validators/Validator.cjs +1 -1
  114. package/dist/Validators/Validator.js +2 -2
  115. package/dist/componentInterfaces-BVHB4Fjw.js +21 -0
  116. package/dist/componentInterfaces-BVHB4Fjw.js.map +1 -0
  117. package/dist/componentInterfaces-BqhL-meV.cjs +2 -0
  118. package/dist/componentInterfaces-BqhL-meV.cjs.map +1 -0
  119. package/dist/deployments-D9QxJGrC.cjs +2 -0
  120. package/dist/deployments-D9QxJGrC.cjs.map +1 -0
  121. package/dist/deployments-De8_J7SS.js +120 -0
  122. package/dist/{deployments-W_LUj833.js.map → deployments-De8_J7SS.js.map} +1 -1
  123. package/dist/deployments.json +63 -48
  124. package/dist/{generated-CElkFqkY.js → generated-BJfQ-EBO.js} +1268 -737
  125. package/dist/generated-BJfQ-EBO.js.map +1 -0
  126. package/dist/generated-mJJNq-xb.cjs +3 -0
  127. package/dist/generated-mJJNq-xb.cjs.map +1 -0
  128. package/dist/index.cjs +1 -1
  129. package/dist/index.d.ts +3 -2
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +162 -158
  132. package/dist/index.js.map +1 -1
  133. package/dist/utils.cjs.map +1 -1
  134. package/dist/utils.js.map +1 -1
  135. package/package.json +13 -7
  136. package/src/Actions/EventAction.ts +11 -0
  137. package/src/BoostCore.test.ts +14 -9
  138. package/src/BoostCore.ts +428 -26
  139. package/src/Budgets/Budget.ts +8 -1
  140. package/src/Budgets/TransparentBudget.test.ts +70 -0
  141. package/src/Budgets/TransparentBudget.ts +334 -0
  142. package/src/Deployable/Deployable.ts +1 -1
  143. package/src/Incentives/ERC20PeggedIncentive.ts +1 -1
  144. package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.test.ts → ERC20PeggedVariableCriteriaIncentiveV2.test.ts} +14 -10
  145. package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.ts → ERC20PeggedVariableCriteriaIncentiveV2.ts} +122 -100
  146. package/src/Incentives/{ERC20VariableCriteriaIncentive.test.ts → ERC20VariableCriteriaIncentiveV2.test.ts} +18 -13
  147. package/src/Incentives/{ERC20VariableCriteriaIncentive.ts → ERC20VariableCriteriaIncentiveV2.ts} +83 -24
  148. package/src/Incentives/ERC20VariableIncentive.ts +4 -2
  149. package/src/Incentives/Incentive.ts +12 -12
  150. package/src/index.test.ts +2 -2
  151. package/src/index.ts +3 -2
  152. package/src/utils.ts +1 -1
  153. package/dist/Budget-BjfL8dVX.cjs +0 -2
  154. package/dist/Budget-BjfL8dVX.cjs.map +0 -1
  155. package/dist/Budget-DD7IPuDx.js +0 -922
  156. package/dist/Budget-DD7IPuDx.js.map +0 -1
  157. package/dist/Incentive-V1RjH38L.js +0 -1036
  158. package/dist/Incentive-V1RjH38L.js.map +0 -1
  159. package/dist/Incentive-gVTfsnMB.cjs +0 -2
  160. package/dist/Incentive-gVTfsnMB.cjs.map +0 -1
  161. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +0 -1
  162. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +0 -2
  163. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +0 -1
  164. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +0 -1
  165. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +0 -207
  166. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +0 -1
  167. package/dist/SimpleDenyList-BKfPoTo1.js +0 -133
  168. package/dist/SimpleDenyList-DgjVf7FK.cjs +0 -2
  169. package/dist/componentInterfaces-CA1UIqWL.js +0 -20
  170. package/dist/componentInterfaces-CA1UIqWL.js.map +0 -1
  171. package/dist/componentInterfaces-aBgBbB7r.cjs +0 -2
  172. package/dist/componentInterfaces-aBgBbB7r.cjs.map +0 -1
  173. package/dist/deployments-CwTZr-cK.cjs +0 -2
  174. package/dist/deployments-CwTZr-cK.cjs.map +0 -1
  175. package/dist/deployments-W_LUj833.js +0 -117
  176. package/dist/generated-BPiHi7W2.cjs +0 -3
  177. package/dist/generated-BPiHi7W2.cjs.map +0 -1
  178. package/dist/generated-CElkFqkY.js.map +0 -1
@@ -0,0 +1,445 @@
1
+ import { v as r, bY as u, bZ as g, b_ as p, b$ as y, c0 as w, c1 as A, c2 as C, c3 as V, c4 as I, c5 as v, c6 as R, c7 as N, c8 as P, c9 as _, ca as D, cb as E } from "./generated-BJfQ-EBO.js";
2
+ import { e as k, f as T, g as B, h as q, i as x, j as G, k as L, l as M } from "./componentInterfaces-BVHB4Fjw.js";
3
+ import { readContract as j } from "@wagmi/core";
4
+ import { InvalidComponentInterfaceError as z } from "./errors.js";
5
+ import { AllowListIncentive as F } from "./Incentives/AllowListIncentive.js";
6
+ import { CGDAIncentive as Y } from "./Incentives/CGDAIncentive.js";
7
+ import { ERC20Incentive as Z } from "./Incentives/ERC20Incentive.js";
8
+ import { encodeAbiParameters as s, zeroAddress as c, decodeAbiParameters as n } from "viem";
9
+ import { f as $ } from "./deployments-De8_J7SS.js";
10
+ import { DeployableTarget as H } from "./Deployable/DeployableTarget.js";
11
+ import { prepareClaimPayload as o } from "./claiming.js";
12
+ import { RegistryType as J } from "./utils.js";
13
+ import { ERC20PeggedVariableCriteriaIncentiveV2 as O } from "./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js";
14
+ import { ERC20VariableCriteriaIncentiveV2 as S } from "./Incentives/ERC20VariableCriteriaIncentiveV2.js";
15
+ import { ERC20VariableIncentive as K } from "./Incentives/ERC20VariableIncentive.js";
16
+ import { PointsIncentive as Q } from "./Incentives/PointsIncentive.js";
17
+ const U = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611cfa806100895f395ff3fe60806040526004361061025d575f3560e01c8063547d18641161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146106b8578063fe9fbb80146106cb578063fee81cf4146106ea575f80fd5b8063ec87621c14610691578063f04e283e146106a5575f80fd5b8063db09da12116100ac578063db09da121461063e578063dcc213611461065d578063dcc59b6f1461067c575f80fd5b8063c884ef83146105fb578063d54ad2a114610629575f80fd5b80638da5cb5b1161011b578063a4d66daf11610101578063a4d66daf146105a8578063bb1757cf146105bd578063be4994f8146105dc575f80fd5b80638da5cb5b146105665780639214fa4d1461057e575f80fd5b8063547d18641461052d57806354d1f13d14610542578063715018a61461054a57806375b238fc14610552575f80fd5b80632de94807116101db578063439fab91116101ab5780634a4ee7b1116101915780634a4ee7b1146104b95780634e7165a2146104cc578063514e62fc146104f8575f80fd5b8063439fab9114610451578063474f5a4414610470575f80fd5b80632de94807146103b657806330db555f146103e757806338d52e0f146104065780634359d28a14610432575f80fd5b80631cd64df411610230578063228cb73311610216578063228cb73314610360578063256929621461037457806328d6183b1461037c575f80fd5b80631cd64df4146102da5780631f1cb62b1461030f575f80fd5b806301ffc9a71461026157806307621eca14610295578063183a4f6e146102b25780631c10893f146102c7575b5f80fd5b34801561026c575f80fd5b5061028061027b366004611655565b61071b565b60405190151581526020015b60405180910390f35b3480156102a0575f80fd5b505f545b60405190815260200161028c565b6102c56102c0366004611694565b610776565b005b6102c56102d53660046116d3565b610783565b3480156102e5575f80fd5b506102806102f43660046116d3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561031a575f80fd5b5060075461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028c565b34801561036b575f80fd5b506102a45f5481565b6102c5610799565b348015610387575f80fd5b506040517f5658633800000000000000000000000000000000000000000000000000000000815260200161028c565b3480156103c1575f80fd5b506102a46103d03660046116fb565b638b78c6d8600c9081525f91909152602090205490565b3480156103f2575f80fd5b506102c5610401366004611694565b6107e6565b348015610411575f80fd5b5060035461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043d575f80fd5b506102c561044c36600461175c565b6108a2565b34801561045c575f80fd5b506102c561046b366004611806565b61099c565b34801561047b575f80fd5b5061048f61048a366004611806565b610c39565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161028c565b6102c56104c73660046116d3565b610d9b565b3480156104d7575f80fd5b506104eb6104e6366004611806565b610dad565b60405161028c9190611891565b348015610503575f80fd5b506102806105123660046116d3565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610538575f80fd5b506102a460025481565b6102c5610e47565b6102c5610e80565b34801561055d575f80fd5b506102a4600281565b348015610571575f80fd5b50638b78c6d8195461033b565b348015610589575f80fd5b5060075473ffffffffffffffffffffffffffffffffffffffff1661033b565b3480156105b3575f80fd5b506102a460055481565b3480156105c8575f80fd5b506102806105d73660046118a3565b610e93565b3480156105e7575f80fd5b506102c56105f636600461175c565b611071565b348015610606575f80fd5b506102806106153660046116fb565b60016020525f908152604090205460ff1681565b348015610634575f80fd5b506102a460065481565b348015610649575f80fd5b506102806106583660046118a3565b61110f565b348015610668575f80fd5b506102c561067736600461175c565b61114e565b348015610687575f80fd5b506102a460045481565b34801561069c575f80fd5b506102a4600181565b6102c56106b33660046116fb565b6111ec565b6102c56106c63660046116fb565b611226565b3480156106d6575f80fd5b506102806106e53660046116fb565b61124c565b3480156106f5575f80fd5b506102a46107043660046116fb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806107705750610770826112ab565b92915050565b6107803382611300565b50565b61078b61130b565b6107958282611325565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016107f181611331565b815f0361082a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035461084f9073ffffffffffffffffffffffffffffffffffffffff16333085611362565b8160055f828254610860919061191f565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026108ad81611331565b8382146108e6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994575f84848381811061090357610903611932565b9050602002016020810190610918919061195f565b905080151560010361095a5761095587878481811061093957610939611932565b905060200201602081019061094e91906116fb565b6001611325565b61098b565b61098b87878481811061096f5761096f611932565b905060200201602081019061098491906116fb565b6001611300565b506001016108e8565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109ed5760018160011c14303b106109e45763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6109fb838501856119d4565b905080604001515f1480610a1157506060810151155b15610a48576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610a719073ffffffffffffffffffffffffffffffffffffffff16306113c4565b905081811015610ada5782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b82516003805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560208501516007805491909316911617905560408301515f556060830151600555610b4a336113f7565b610b598360800151600161143f565b826020015173ffffffffffffffffffffffffffffffffffffffff16835f015173ffffffffffffffffffffffffffffffffffffffff167fd20715546497e6d32bc9b61b35416a25a8cc41d2fb7f389a1bb26dc040213a3b856040015186606001518760800151604051610bf493929190928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b60405180910390a35050508015610c34576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610c4681611331565b5f610c5385870187611afd565b90505f8160200151806020019051810190610c6e9190611b7a565b90508060055f828254610c819190611b91565b90915550508151600354610cae9173ffffffffffffffffffffffffffffffffffffffff9091169083611480565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d6c91611891565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610da361130b565b6107958282611300565b60605f610dbc838501856119d4565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610e2e9201611ba4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610e8861130b565b610e915f6114d3565b565b5f610e9c61130b565b5f610ea983850185611c47565b90505f8160200151806020019051810190610ec49190611b7a565b9050610ed0868261151d565b610f06576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055481600654610f17919061191f565b1115610f4f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060065f828254610f60919061191f565b92505081905550600160045f828254610f79919061191f565b9091555050600354610fa29073ffffffffffffffffffffffffffffffffffffffff168783611480565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529188901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261105d91611891565b60405180910390a250600195945050505050565b600261107c81611331565b8382146110b5576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111078686838181106110d4576110d4611932565b90506020020160208101906110e991906116fb565b8585848181106110fb576110fb611932565b90506020020135611325565b6001016110b7565b5f8061111d83850185611c47565b90505f81602001518060200190518101906111389190611b7a565b9050611144868261151d565b9695505050505050565b600261115981611331565b838214611192576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111e48686838181106111b1576111b1611932565b90506020020160208101906111c691906116fb565b8585848181106111d8576111d8611932565b90506020020135611300565b600101611194565b6111f461130b565b63389a75e1600c52805f526020600c20805442111561121a57636f5e88185f526004601cfd5b5f9055610780816114d3565b61122e61130b565b8060601b61124357637448fbae5f526004601cfd5b610780816114d3565b5f8173ffffffffffffffffffffffffffffffffffffffff16611271638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107705750638b78c6d8600c9081525f83905260209020546003161515610770565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610770575061077082611568565b61079582825f6115fe565b638b78c6d819543314610e91576382b429005f526004601cfd5b610795828260016115fe565b638b78c6d81954331461078057638b78c6d8600c52335f52806020600c205416610780576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166113b657803d873b1517106113b657637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166114c957803d853b1517106114c9576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526001602052604081205460ff1615801561156157506005548260065461155e919061191f565b11155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061077057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610770565b638b78c6d8600c52825f526020600c2080548381178361161f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611665575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611561575f80fd5b5f602082840312156116a4575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116ce575f80fd5b919050565b5f80604083850312156116e4575f80fd5b6116ed836116ab565b946020939093013593505050565b5f6020828403121561170b575f80fd5b611561826116ab565b5f8083601f840112611724575f80fd5b50813567ffffffffffffffff81111561173b575f80fd5b6020830191508360208260051b8501011115611755575f80fd5b9250929050565b5f805f806040858703121561176f575f80fd5b843567ffffffffffffffff811115611785575f80fd5b61179187828801611714565b909550935050602085013567ffffffffffffffff8111156117b0575f80fd5b6117bc87828801611714565b95989497509550505050565b5f8083601f8401126117d8575f80fd5b50813567ffffffffffffffff8111156117ef575f80fd5b602083019150836020828501011115611755575f80fd5b5f8060208385031215611817575f80fd5b823567ffffffffffffffff81111561182d575f80fd5b611839858286016117c8565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f6115616020830184611845565b5f805f604084860312156118b5575f80fd5b6118be846116ab565b9250602084013567ffffffffffffffff8111156118d9575f80fd5b6118e5868287016117c8565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610770576107706118f2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561196f575f80fd5b81358015158114611561575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156119ce576119ce61197e565b60405290565b5f60a08284031280156119e5575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611a0957611a0961197e565b604052611a15836116ab565b8152611a23602084016116ab565b60208201526040838101359082015260608084013590820152611a48608084016116ab565b60808201529392505050565b5f82601f830112611a63575f80fd5b813567ffffffffffffffff811115611a7d57611a7d61197e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611aca57611aca61197e565b604052818152838201602001851015611ae1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611b0d575f80fd5b813567ffffffffffffffff811115611b23575f80fd5b820160408185031215611b34575f80fd5b611b3c6119ab565b611b45826116ab565b8152602082013567ffffffffffffffff811115611b60575f80fd5b611b6c86828501611a54565b602083015250949350505050565b5f60208284031215611b8a575f80fd5b5051919050565b81810381811115610770576107706118f2565b602081525f825160038110611be0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff60408401511660608301526060830151608080840152611c3f60a0840182611845565b949350505050565b5f60208284031215611c57575f80fd5b813567ffffffffffffffff811115611c6d575f80fd5b820160408185031215611c7e575f80fd5b611c866119ab565b813567ffffffffffffffff811115611c9c575f80fd5b611ca886828501611a54565b825250602082013567ffffffffffffffff811115611b60575f80fdfea2646970667358221220ae9431c5aa2e6d904568c209e18398528ed1256e1be4fbeb1526712b5c3f955964736f6c634300081a0033", t = class t extends H {
18
+ constructor() {
19
+ super(...arguments), this.abi = r;
20
+ }
21
+ /**
22
+ * The owner of the incentive
23
+ *
24
+ * @public
25
+ * @async
26
+ * @param {?ReadParams} [params]
27
+ * @returns {Promise<Address>}
28
+ */
29
+ async owner(f) {
30
+ return await u(this._config, {
31
+ address: this.assertValidAddress(),
32
+ args: [],
33
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
34
+ ...f
35
+ });
36
+ }
37
+ /**
38
+ * 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)`
39
+ *
40
+ * @public
41
+ * @async
42
+ * @param {?ReadParams} [params]
43
+ * @returns {Promise<bigint>} - The current reward
44
+ */
45
+ async currentReward(f) {
46
+ return await g(this._config, {
47
+ address: this.assertValidAddress(),
48
+ args: [],
49
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
50
+ ...f
51
+ });
52
+ }
53
+ /**
54
+ * The number of claims that have been made
55
+ *
56
+ * @public
57
+ * @async
58
+ * @param {?ReadParams} [params]
59
+ * @returns {Promise<bigint>}
60
+ */
61
+ async claims(f) {
62
+ return await p(this._config, {
63
+ address: this.assertValidAddress(),
64
+ args: [],
65
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
66
+ ...f
67
+ });
68
+ }
69
+ /**
70
+ * The total amount of rewards claimed
71
+ *
72
+ * @public
73
+ * @async
74
+ * @param {?ReadParams} [params]
75
+ * @returns {Promise<bigint>}
76
+ */
77
+ async totalClaimed(f) {
78
+ return await y(this._config, {
79
+ address: this.assertValidAddress(),
80
+ args: [],
81
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
82
+ ...f
83
+ });
84
+ }
85
+ /**
86
+ * A mapping of address to claim status
87
+ *
88
+ * @public
89
+ * @async
90
+ * @param {Address} address
91
+ * @param {?ReadParams} [params]
92
+ * @returns {Promise<boolean>}
93
+ */
94
+ async claimed(f, b) {
95
+ return await w(this._config, {
96
+ address: this.assertValidAddress(),
97
+ args: [f],
98
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
99
+ ...b
100
+ });
101
+ }
102
+ /**
103
+ * The address of the ERC20-like token
104
+ *
105
+ * @public
106
+ * @async
107
+ * @param {?ReadParams} [params]
108
+ * @returns {Promise<Address>}
109
+ */
110
+ async asset(f) {
111
+ return await A(this._config, {
112
+ address: this.assertValidAddress(),
113
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
114
+ ...f
115
+ });
116
+ }
117
+ /**
118
+ * The address of the pegged ERC20-like token
119
+ *
120
+ * @public
121
+ * @async
122
+ * @param {?ReadParams} [params]
123
+ * @returns {Promise<Address>}
124
+ */
125
+ async peg(f) {
126
+ return await C(this._config, {
127
+ address: this.assertValidAddress(),
128
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
129
+ ...f
130
+ });
131
+ }
132
+ /**
133
+ * The reward amount issued for each claim
134
+ *
135
+ * @public
136
+ * @async
137
+ * @param {?ReadParams} [params]
138
+ * @returns {Promise<bigint>}
139
+ */
140
+ async reward(f) {
141
+ return await V(this._config, {
142
+ address: this.assertValidAddress(),
143
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
144
+ ...f
145
+ });
146
+ }
147
+ /**
148
+ * The limit (max possible rewards payout in reward token)
149
+ *
150
+ * @public
151
+ * @async
152
+ * @param {?ReadParams} [params]
153
+ * @returns {Promise<bigint>}
154
+ */
155
+ async limit(f) {
156
+ return await I(this._config, {
157
+ address: this.assertValidAddress(),
158
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
159
+ ...f
160
+ });
161
+ }
162
+ /**
163
+ * Claim the incentive
164
+ *
165
+ * @public
166
+ * @async
167
+ * @param {ClaimPayload} payload
168
+ * @param {?WriteParams} [params]
169
+ * @returns {Promise<boolean>} - Returns true if successfully claimed
170
+ */
171
+ async claim(f, b) {
172
+ return await this.awaitResult(this.claimRaw(f, b));
173
+ }
174
+ /**
175
+ * Claim the incentive
176
+ *
177
+ * @public
178
+ * @async
179
+ * @param {ClaimPayload} payload
180
+ * @param {?WriteParams} [params]
181
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
182
+ */
183
+ async claimRaw(f, b) {
184
+ const { request: a, result: e } = await v(
185
+ this._config,
186
+ {
187
+ address: this.assertValidAddress(),
188
+ args: [o(f)],
189
+ ...this.optionallyAttachAccount(),
190
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
191
+ ...b
192
+ }
193
+ );
194
+ return { hash: await R(this._config, a), result: e };
195
+ }
196
+ /**
197
+ * Clawback assets from the incentive
198
+ *
199
+ * @public
200
+ * @async
201
+ * @param {ClaimPayload} payload
202
+ * @param {?WriteParams} [params]
203
+ * @returns {Promise<boolean>} - True if the assets were successfully clawbacked
204
+ */
205
+ async clawback(f, b) {
206
+ return await this.awaitResult(this.clawbackRaw(f, b));
207
+ }
208
+ /**
209
+ * Clawback assets from the incentive
210
+ *
211
+ * @public
212
+ * @async
213
+ * @param {ClaimPayload} payload
214
+ * @param {?WriteParams} [params]
215
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
216
+ */
217
+ async clawbackRaw(f, b) {
218
+ const { request: a, result: e } = await N(
219
+ this._config,
220
+ {
221
+ address: this.assertValidAddress(),
222
+ args: [o(f)],
223
+ ...this.optionallyAttachAccount(),
224
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
225
+ ...b
226
+ }
227
+ );
228
+ return { hash: await P(this._config, a), result: e };
229
+ }
230
+ /**
231
+ * Check if an incentive is claimable.
232
+ *
233
+ * @public
234
+ * @async
235
+ * @param {ClaimPayload} payload
236
+ * @param {?ReadParams} [params]
237
+ * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
238
+ */
239
+ async isClaimable(f, b) {
240
+ return await _(this._config, {
241
+ address: this.assertValidAddress(),
242
+ args: [f.target, f.data],
243
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
244
+ ...b
245
+ });
246
+ }
247
+ /**
248
+ * read the peg token for the incentive.
249
+ *
250
+ * @public
251
+ * @async
252
+ * @param {?ReadParams} [params]
253
+ * @returns {Promise<Address>} = The address of the token the reward is pegged to
254
+ */
255
+ async getPeg(f) {
256
+ return await D(this._config, {
257
+ address: this.assertValidAddress(),
258
+ args: [],
259
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
260
+ ...f
261
+ });
262
+ }
263
+ /**
264
+ * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`
265
+ *
266
+ * @public
267
+ * @async
268
+ * @param {?ReadParams} [params]
269
+ * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.
270
+ */
271
+ async getTotalBudget(f) {
272
+ return await this.limit(f);
273
+ }
274
+ /**
275
+ * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
276
+ *
277
+ * @public
278
+ * @async
279
+ * @param {?ReadParams} [params]
280
+ * @returns {Promise<boolean>} - True if total claims is less than limit
281
+ */
282
+ async canBeClaimed(f) {
283
+ return await this.getRemainingClaimPotential(f) > 0n;
284
+ }
285
+ /**
286
+ * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
287
+ *
288
+ * @public
289
+ * @async
290
+ * @param {?ReadParams} [params]
291
+ * @returns {Promise<bigint>} - True if total claims is less than limit
292
+ */
293
+ async getRemainingClaimPotential(f) {
294
+ const [b, a] = await Promise.all([
295
+ this.totalClaimed(f),
296
+ this.limit(f)
297
+ ]);
298
+ return a - b;
299
+ }
300
+ /**
301
+ * @inheritdoc
302
+ *
303
+ * @public
304
+ * @param {?ERC20PeggedIncentivePayload} [_payload]
305
+ * @param {?DeployableOptions} [_options]
306
+ * @returns {GenericDeployableParams}
307
+ */
308
+ buildParameters(f, b) {
309
+ const [a, e] = this.validateDeploymentConfig(
310
+ f,
311
+ b
312
+ );
313
+ return {
314
+ abi: r,
315
+ bytecode: U,
316
+ args: [l(a)],
317
+ ...this.optionallyAttachAccount(e.account)
318
+ };
319
+ }
320
+ /**
321
+ * Encodes an amount to clawback from the incentive
322
+ *
323
+ * @public
324
+ * @param {bigint} amount - How much of the asset to clawback
325
+ * @returns {Hex} - Returns an encoded uint256
326
+ */
327
+ buildClawbackData(f) {
328
+ return s([{ type: "uint256" }], [f]);
329
+ }
330
+ /**
331
+ * Builds the claim data for the ERC20PeggedIncentive.
332
+ *
333
+ * @public
334
+ * @param {bigint} rewardAmount
335
+ * @returns {Hash} Returns the encoded claim data
336
+ * @description This function returns the encoded claim data for the ERC20PeggedIncentive.
337
+ */
338
+ buildClaimData(f) {
339
+ return s(
340
+ [{ type: "uint256", name: "rewardAmount" }],
341
+ [f]
342
+ );
343
+ }
344
+ /**
345
+ * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing
346
+ * the existing `limit` field by `netAmount`. The entire payload is then re-encoded
347
+ * via `prepareERC20PeggedIncentivePayload(...)`.
348
+ *
349
+ * @public
350
+ * @param {bigint} netAmount - The additional limit to add to this incentive.
351
+ * @returns {Hex} The ABI-encoded payload with the updated `limit`.
352
+ */
353
+ async getTopupPayload(f) {
354
+ var b, a, e;
355
+ return l({
356
+ asset: await this.asset() ?? c,
357
+ peg: ((b = this.payload) == null ? void 0 : b.peg) ?? c,
358
+ reward: ((a = this.payload) == null ? void 0 : a.reward) ?? 0n,
359
+ limit: f,
360
+ manager: ((e = this.payload) == null ? void 0 : e.manager) ?? c
361
+ });
362
+ }
363
+ /**
364
+ * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.
365
+ * Useful when deriving amount claimed from logs.
366
+ *
367
+ * @public
368
+ * @param {Hex} claimData
369
+ * @returns {bigint} Returns the reward amount from a claim data payload
370
+ */
371
+ decodeClaimData(f) {
372
+ const b = n(
373
+ [
374
+ {
375
+ type: "tuple",
376
+ name: "BoostClaimData",
377
+ components: [
378
+ { type: "bytes", name: "validatorData" },
379
+ { type: "bytes", name: "incentiveData" }
380
+ ]
381
+ }
382
+ ],
383
+ f
384
+ );
385
+ return n(
386
+ [{ type: "uint256" }],
387
+ b[0].incentiveData
388
+ )[0];
389
+ }
390
+ };
391
+ t.bases = {
392
+ 31337: void 0,
393
+ ...$
394
+ }, t.registryType = J.INCENTIVE;
395
+ let i = t;
396
+ function l({
397
+ asset: d,
398
+ peg: f,
399
+ reward: b,
400
+ limit: a,
401
+ manager: e = c
402
+ }) {
403
+ return s(
404
+ [
405
+ { type: "address", name: "asset" },
406
+ { type: "address", name: "peg" },
407
+ { type: "uint256", name: "reward" },
408
+ { type: "uint256", name: "limit" },
409
+ { type: "address", name: "manager" }
410
+ ],
411
+ [d, f, b, a, e]
412
+ );
413
+ }
414
+ const m = {
415
+ [k]: Q,
416
+ [T]: Z,
417
+ [B]: O,
418
+ [q]: i,
419
+ [x]: F,
420
+ // [AERC1155Incentive as Hex]: ERC1155Incentive,
421
+ [G]: Y,
422
+ [L]: K,
423
+ [M]: S
424
+ };
425
+ async function h0(d, f, b) {
426
+ const a = await j(d.config, {
427
+ abi: E,
428
+ functionName: "getComponentInterface",
429
+ address: f,
430
+ ...b
431
+ }), e = m[a];
432
+ if (!e)
433
+ throw new z(
434
+ Object.keys(m),
435
+ a
436
+ );
437
+ return new e(d, f);
438
+ }
439
+ export {
440
+ i as E,
441
+ m as I,
442
+ h0 as i,
443
+ l as p
444
+ };
445
+ //# sourceMappingURL=Incentive-CLKutfnD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Incentive-CLKutfnD.js","sources":["../src/Incentives/ERC20PeggedIncentive.ts","../src/Incentives/Incentive.ts"],"sourcesContent":["import {\n erc20PeggedIncentiveAbi,\n readErc20PeggedIncentiveAsset,\n readErc20PeggedIncentiveClaimed,\n readErc20PeggedIncentiveClaims,\n readErc20PeggedIncentiveCurrentReward,\n readErc20PeggedIncentiveGetPeg,\n readErc20PeggedIncentiveIsClaimable,\n readErc20PeggedIncentiveLimit,\n readErc20PeggedIncentiveOwner,\n readErc20PeggedIncentivePeg,\n readErc20PeggedIncentiveReward,\n readErc20PeggedIncentiveTotalClaimed,\n simulateErc20PeggedIncentiveClaim,\n simulateErc20PeggedIncentiveClawback,\n writeErc20PeggedIncentiveClaim,\n writeErc20PeggedIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedIncentive.sol/ERC20PeggedIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ERC20PeggedIncentive as ERC20PeggedIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20PeggedIncentiveAbi };\n\n/**\n * The object representation of a `ERC20PeggedIncentive.InitPayload`\n *\n * @export\n * @interface ERC20PeggedIncentivePayload\n * @typedef {ERC20PeggedIncentivePayload}\n */\nexport interface ERC20PeggedIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20PeggedIncentive` event types.\n *\n * @export\n * @typedef {ERC20PeggedIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedIncentiveAbi\n * >]\n */\nexport type ERC20PeggedIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedIncentiveAbi\n > = ContractEventName<typeof erc20PeggedIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20PeggedIncentive\n * @typedef {ERC20PeggedIncentive}\n * @extends {DeployableTarget<ERC20PeggedIncentivePayload>}\n */\nexport class ERC20PeggedIncentive extends DeployableTarget<\n ERC20PeggedIncentivePayload,\n typeof erc20PeggedIncentiveAbi\n> {\n public override readonly abi = erc20PeggedIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE,\n ...(ERC20PeggedIncentiveBases as Record<number, Address>),\n };\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} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readErc20PeggedIncentiveOwner(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} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readErc20PeggedIncentiveCurrentReward(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} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readErc20PeggedIncentiveClaims(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 total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedIncentiveTotalClaimed(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} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readErc20PeggedIncentiveClaimed(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} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams) {\n return await readErc20PeggedIncentiveAsset(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 address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedIncentivePeg(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 reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedIncentiveReward(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 possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedIncentiveLimit(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 * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\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} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClaim(\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 writeErc20PeggedIncentiveClaim(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} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(payload: ClaimPayload, params?: WriteParams) {\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} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked\n */\n public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClawback(\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 writeErc20PeggedIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20PeggedIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\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 * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedIncentiveGetPeg(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 * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\n );\n }\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n manager: this.payload?.manager ?? zeroAddress,\n });\n }\n\n /**\n * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {bigint} Returns the reward amount from a claim data payload\n */\n public decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n return signedAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedIncentivePayload}, properly encode a `ERC20PeggedIncentive.InitPayload` for use with {@link ERC20PeggedIncentive} initialization.\n *\n * @param {ERC20PeggedIncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\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 * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20PeggedIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [asset, peg, reward, limit, manager],\n );\n}\n","import { aIncentiveAbi } from '@boostxyz/evm';\nimport {\n AAllowListIncentive,\n ACGDAIncentive,\n AERC20Incentive,\n AERC20PeggedIncentive,\n AERC20PeggedVariableCriteriaIncentiveV2,\n AERC20VariableCriteriaIncentiveV2,\n AERC20VariableIncentive,\n // AERC20VariableCriteriaIncentive\n APointsIncentive,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { AllowListIncentive } from './AllowListIncentive';\nimport { CGDAIncentive } from './CGDAIncentive';\nimport { ERC20Incentive } from './ERC20Incentive';\nimport { ERC20PeggedIncentive } from './ERC20PeggedIncentive';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';\nimport { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n// import { ERC1155Incentive } from './ERC1155Incentive';\nimport { PointsIncentive } from './PointsIncentive';\n\nexport {\n AllowListIncentive,\n CGDAIncentive,\n // ERC1155Incentive,\n ERC20Incentive,\n ERC20PeggedIncentive,\n ERC20PeggedVariableCriteriaIncentiveV2,\n PointsIncentive,\n ERC20VariableIncentive,\n ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A union type representing all valid protocol Incentive implementations\n *\n * @export\n * @typedef {Incentive}\n */\nexport type Incentive =\n | AllowListIncentive\n | CGDAIncentive\n | ERC20Incentive\n // | ERC1155Incentive\n | ERC20PeggedIncentive\n | ERC20PeggedVariableCriteriaIncentiveV2\n | PointsIncentive\n | ERC20VariableIncentive\n | ERC20VariableCriteriaIncentiveV2;\n\n/**\n * A map of Incentive component interfaces to their constructors.\n *\n * @type {{ \"0xc5b24b8e\": typeof PointsIncentive; \"0x8c901437\": typeof ERC20Incentive; \"0x4414fbb4\": typeof ERC20PeggedIncentive; \"0xf60c99c9\": typeof ERC20PeggedVariableCriteriaIncentiveV2; \"0x56586338\": typeof AllowListIncentive; \"0xa39e44d9\": typeof CGDAIncentive; \"0xa8e4af1e\": typeof ERC20VariableIncentive; \"0x90318111\": typeof ERC20VariableCriteriaIncentiveV2 }}\n */\nexport const IncentiveByComponentInterface = {\n [APointsIncentive as Hex]: PointsIncentive,\n [AERC20Incentive as Hex]: ERC20Incentive,\n [AERC20PeggedVariableCriteriaIncentiveV2 as Hex]:\n ERC20PeggedVariableCriteriaIncentiveV2,\n [AERC20PeggedIncentive as Hex]: ERC20PeggedIncentive,\n [AAllowListIncentive]: AllowListIncentive,\n // [AERC1155Incentive as Hex]: ERC1155Incentive,\n [ACGDAIncentive as Hex]: CGDAIncentive,\n [AERC20VariableIncentive as Hex]: ERC20VariableIncentive,\n [AERC20VariableCriteriaIncentiveV2 as Hex]: ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Incentive}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function incentiveFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aIncentiveAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof IncentiveByComponentInterface;\n const Ctor = IncentiveByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(IncentiveByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ERC20PeggedIncentive","DeployableTarget","erc20PeggedIncentiveAbi","params","readErc20PeggedIncentiveOwner","readErc20PeggedIncentiveCurrentReward","readErc20PeggedIncentiveClaims","readErc20PeggedIncentiveTotalClaimed","address","readErc20PeggedIncentiveClaimed","readErc20PeggedIncentiveAsset","readErc20PeggedIncentivePeg","readErc20PeggedIncentiveReward","readErc20PeggedIncentiveLimit","payload","request","result","simulateErc20PeggedIncentiveClaim","prepareClaimPayload","writeErc20PeggedIncentiveClaim","simulateErc20PeggedIncentiveClawback","writeErc20PeggedIncentiveClawback","readErc20PeggedIncentiveIsClaimable","readErc20PeggedIncentiveGetPeg","totalClaimed","limit","_payload","_options","options","bytecode","prepareERC20PeggedIncentivePayload","amount","encodeAbiParameters","rewardAmount","netAmount","zeroAddress","_a","_b","_c","claimData","boostClaimData","decodeAbiParameters","ERC20PeggedIncentiveBases","RegistryType","ERC20PeggedIncentive","asset","peg","reward","manager","IncentiveByComponentInterface","APointsIncentive","PointsIncentive","AERC20Incentive","ERC20Incentive","AERC20PeggedVariableCriteriaIncentiveV2","ERC20PeggedVariableCriteriaIncentiveV2","AERC20PeggedIncentive","AAllowListIncentive","AllowListIncentive","ACGDAIncentive","CGDAIncentive","AERC20VariableIncentive","ERC20VariableIncentive","AERC20VariableCriteriaIncentiveV2","ERC20VariableCriteriaIncentiveV2","incentiveFromAddress","interfaceId","readContract","aIncentiveAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;;;;;;;;;;;sxdA2GaA,IAAN,MAAMA,UAA6BC,EAGxC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA8B,KAAK,SAAS;AAAA,MACvD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,cAAcA,GAAqB;AACvC,WAAA,MAAME,EAAsC,KAAK,SAAS;AAAA,MAC/D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OAAOA,GAAqB;AAChC,WAAA,MAAMG,EAA+B,KAAK,SAAS;AAAA,MACxD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC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G;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKrB,CAA6B;AAAA,MACzCiB;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKzC,GAASpB,CAAO;AAClC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("./generated-mJJNq-xb.cjs"),t=require("./componentInterfaces-BqhL-meV.cjs"),g=require("@wagmi/core"),m=require("./errors.cjs"),h=require("./Incentives/AllowListIncentive.cjs"),y=require("./Incentives/CGDAIncentive.cjs"),A=require("./Incentives/ERC20Incentive.cjs"),c=require("viem"),w=require("./deployments-D9QxJGrC.cjs"),C=require("./Deployable/DeployableTarget.cjs"),l=require("./claiming.cjs"),p=require("./utils.cjs"),v=require("./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs"),I=require("./Incentives/ERC20VariableCriteriaIncentiveV2.cjs"),V=require("./Incentives/ERC20VariableIncentive.cjs"),R=require("./Incentives/PointsIncentive.cjs"),P="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611cfa806100895f395ff3fe60806040526004361061025d575f3560e01c8063547d18641161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146106b8578063fe9fbb80146106cb578063fee81cf4146106ea575f80fd5b8063ec87621c14610691578063f04e283e146106a5575f80fd5b8063db09da12116100ac578063db09da121461063e578063dcc213611461065d578063dcc59b6f1461067c575f80fd5b8063c884ef83146105fb578063d54ad2a114610629575f80fd5b80638da5cb5b1161011b578063a4d66daf11610101578063a4d66daf146105a8578063bb1757cf146105bd578063be4994f8146105dc575f80fd5b80638da5cb5b146105665780639214fa4d1461057e575f80fd5b8063547d18641461052d57806354d1f13d14610542578063715018a61461054a57806375b238fc14610552575f80fd5b80632de94807116101db578063439fab91116101ab5780634a4ee7b1116101915780634a4ee7b1146104b95780634e7165a2146104cc578063514e62fc146104f8575f80fd5b8063439fab9114610451578063474f5a4414610470575f80fd5b80632de94807146103b657806330db555f146103e757806338d52e0f146104065780634359d28a14610432575f80fd5b80631cd64df411610230578063228cb73311610216578063228cb73314610360578063256929621461037457806328d6183b1461037c575f80fd5b80631cd64df4146102da5780631f1cb62b1461030f575f80fd5b806301ffc9a71461026157806307621eca14610295578063183a4f6e146102b25780631c10893f146102c7575b5f80fd5b34801561026c575f80fd5b5061028061027b366004611655565b61071b565b60405190151581526020015b60405180910390f35b3480156102a0575f80fd5b505f545b60405190815260200161028c565b6102c56102c0366004611694565b610776565b005b6102c56102d53660046116d3565b610783565b3480156102e5575f80fd5b506102806102f43660046116d3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561031a575f80fd5b5060075461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028c565b34801561036b575f80fd5b506102a45f5481565b6102c5610799565b348015610387575f80fd5b506040517f5658633800000000000000000000000000000000000000000000000000000000815260200161028c565b3480156103c1575f80fd5b506102a46103d03660046116fb565b638b78c6d8600c9081525f91909152602090205490565b3480156103f2575f80fd5b506102c5610401366004611694565b6107e6565b348015610411575f80fd5b5060035461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043d575f80fd5b506102c561044c36600461175c565b6108a2565b34801561045c575f80fd5b506102c561046b366004611806565b61099c565b34801561047b575f80fd5b5061048f61048a366004611806565b610c39565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161028c565b6102c56104c73660046116d3565b610d9b565b3480156104d7575f80fd5b506104eb6104e6366004611806565b610dad565b60405161028c9190611891565b348015610503575f80fd5b506102806105123660046116d3565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610538575f80fd5b506102a460025481565b6102c5610e47565b6102c5610e80565b34801561055d575f80fd5b506102a4600281565b348015610571575f80fd5b50638b78c6d8195461033b565b348015610589575f80fd5b5060075473ffffffffffffffffffffffffffffffffffffffff1661033b565b3480156105b3575f80fd5b506102a460055481565b3480156105c8575f80fd5b506102806105d73660046118a3565b610e93565b3480156105e7575f80fd5b506102c56105f636600461175c565b611071565b348015610606575f80fd5b506102806106153660046116fb565b60016020525f908152604090205460ff1681565b348015610634575f80fd5b506102a460065481565b348015610649575f80fd5b506102806106583660046118a3565b61110f565b348015610668575f80fd5b506102c561067736600461175c565b61114e565b348015610687575f80fd5b506102a460045481565b34801561069c575f80fd5b506102a4600181565b6102c56106b33660046116fb565b6111ec565b6102c56106c63660046116fb565b611226565b3480156106d6575f80fd5b506102806106e53660046116fb565b61124c565b3480156106f5575f80fd5b506102a46107043660046116fb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806107705750610770826112ab565b92915050565b6107803382611300565b50565b61078b61130b565b6107958282611325565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016107f181611331565b815f0361082a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035461084f9073ffffffffffffffffffffffffffffffffffffffff16333085611362565b8160055f828254610860919061191f565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026108ad81611331565b8382146108e6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994575f84848381811061090357610903611932565b9050602002016020810190610918919061195f565b905080151560010361095a5761095587878481811061093957610939611932565b905060200201602081019061094e91906116fb565b6001611325565b61098b565b61098b87878481811061096f5761096f611932565b905060200201602081019061098491906116fb565b6001611300565b506001016108e8565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109ed5760018160011c14303b106109e45763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6109fb838501856119d4565b905080604001515f1480610a1157506060810151155b15610a48576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610a719073ffffffffffffffffffffffffffffffffffffffff16306113c4565b905081811015610ada5782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b82516003805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560208501516007805491909316911617905560408301515f556060830151600555610b4a336113f7565b610b598360800151600161143f565b826020015173ffffffffffffffffffffffffffffffffffffffff16835f015173ffffffffffffffffffffffffffffffffffffffff167fd20715546497e6d32bc9b61b35416a25a8cc41d2fb7f389a1bb26dc040213a3b856040015186606001518760800151604051610bf493929190928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b60405180910390a35050508015610c34576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610c4681611331565b5f610c5385870187611afd565b90505f8160200151806020019051810190610c6e9190611b7a565b90508060055f828254610c819190611b91565b90915550508151600354610cae9173ffffffffffffffffffffffffffffffffffffffff9091169083611480565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d6c91611891565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610da361130b565b6107958282611300565b60605f610dbc838501856119d4565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610e2e9201611ba4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610e8861130b565b610e915f6114d3565b565b5f610e9c61130b565b5f610ea983850185611c47565b90505f8160200151806020019051810190610ec49190611b7a565b9050610ed0868261151d565b610f06576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055481600654610f17919061191f565b1115610f4f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060065f828254610f60919061191f565b92505081905550600160045f828254610f79919061191f565b9091555050600354610fa29073ffffffffffffffffffffffffffffffffffffffff168783611480565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529188901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261105d91611891565b60405180910390a250600195945050505050565b600261107c81611331565b8382146110b5576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111078686838181106110d4576110d4611932565b90506020020160208101906110e991906116fb565b8585848181106110fb576110fb611932565b90506020020135611325565b6001016110b7565b5f8061111d83850185611c47565b90505f81602001518060200190518101906111389190611b7a565b9050611144868261151d565b9695505050505050565b600261115981611331565b838214611192576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111e48686838181106111b1576111b1611932565b90506020020160208101906111c691906116fb565b8585848181106111d8576111d8611932565b90506020020135611300565b600101611194565b6111f461130b565b63389a75e1600c52805f526020600c20805442111561121a57636f5e88185f526004601cfd5b5f9055610780816114d3565b61122e61130b565b8060601b61124357637448fbae5f526004601cfd5b610780816114d3565b5f8173ffffffffffffffffffffffffffffffffffffffff16611271638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107705750638b78c6d8600c9081525f83905260209020546003161515610770565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610770575061077082611568565b61079582825f6115fe565b638b78c6d819543314610e91576382b429005f526004601cfd5b610795828260016115fe565b638b78c6d81954331461078057638b78c6d8600c52335f52806020600c205416610780576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166113b657803d873b1517106113b657637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166114c957803d853b1517106114c9576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526001602052604081205460ff1615801561156157506005548260065461155e919061191f565b11155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061077057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610770565b638b78c6d8600c52825f526020600c2080548381178361161f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611665575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611561575f80fd5b5f602082840312156116a4575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116ce575f80fd5b919050565b5f80604083850312156116e4575f80fd5b6116ed836116ab565b946020939093013593505050565b5f6020828403121561170b575f80fd5b611561826116ab565b5f8083601f840112611724575f80fd5b50813567ffffffffffffffff81111561173b575f80fd5b6020830191508360208260051b8501011115611755575f80fd5b9250929050565b5f805f806040858703121561176f575f80fd5b843567ffffffffffffffff811115611785575f80fd5b61179187828801611714565b909550935050602085013567ffffffffffffffff8111156117b0575f80fd5b6117bc87828801611714565b95989497509550505050565b5f8083601f8401126117d8575f80fd5b50813567ffffffffffffffff8111156117ef575f80fd5b602083019150836020828501011115611755575f80fd5b5f8060208385031215611817575f80fd5b823567ffffffffffffffff81111561182d575f80fd5b611839858286016117c8565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f6115616020830184611845565b5f805f604084860312156118b5575f80fd5b6118be846116ab565b9250602084013567ffffffffffffffff8111156118d9575f80fd5b6118e5868287016117c8565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610770576107706118f2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561196f575f80fd5b81358015158114611561575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156119ce576119ce61197e565b60405290565b5f60a08284031280156119e5575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611a0957611a0961197e565b604052611a15836116ab565b8152611a23602084016116ab565b60208201526040838101359082015260608084013590820152611a48608084016116ab565b60808201529392505050565b5f82601f830112611a63575f80fd5b813567ffffffffffffffff811115611a7d57611a7d61197e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611aca57611aca61197e565b604052818152838201602001851015611ae1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611b0d575f80fd5b813567ffffffffffffffff811115611b23575f80fd5b820160408185031215611b34575f80fd5b611b3c6119ab565b611b45826116ab565b8152602082013567ffffffffffffffff811115611b60575f80fd5b611b6c86828501611a54565b602083015250949350505050565b5f60208284031215611b8a575f80fd5b5051919050565b81810381811115610770576107706118f2565b602081525f825160038110611be0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff60408401511660608301526060830151608080840152611c3f60a0840182611845565b949350505050565b5f60208284031215611c57575f80fd5b813567ffffffffffffffff811115611c6d575f80fd5b820160408185031215611c7e575f80fd5b611c866119ab565b813567ffffffffffffffff811115611c9c575f80fd5b611ca886828501611a54565b825250602082013567ffffffffffffffff811115611b60575f80fdfea2646970667358221220ae9431c5aa2e6d904568c209e18398528ed1256e1be4fbeb1526712b5c3f955964736f6c634300081a0033",r=class r extends C.DeployableTarget{constructor(){super(...arguments),this.abi=e.v}async owner(f){return await e.qN(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await e.HN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await e.FN(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await e.JN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await e.zN(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await e.VN(this._config,{address:this.assertValidAddress(),...f})}async peg(f){return await e.GN(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await e.ZN(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await e.DN(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:a,result:d}=await e.bM(this._config,{address:this.assertValidAddress(),args:[l.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await e.YN(this._config,a),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:a,result:d}=await e.fM(this._config,{address:this.assertValidAddress(),args:[l.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await e.eM(this._config,a),result:d}}async isClaimable(f,b){return await e.LN(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async getPeg(f){return await e.SN(this._config,{address:this.assertValidAddress(),args:[],...f})}async getTotalBudget(f){return await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,a]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return a-b}buildParameters(f,b){const[a,d]=this.validateDeploymentConfig(f,b);return{abi:e.v,bytecode:P,args:[n(a)],...this.optionallyAttachAccount(d.account)}}buildClawbackData(f){return c.encodeAbiParameters([{type:"uint256"}],[f])}buildClaimData(f){return c.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}async getTopupPayload(f){var b,a,d;return n({asset:await this.asset()??c.zeroAddress,peg:((b=this.payload)==null?void 0:b.peg)??c.zeroAddress,reward:((a=this.payload)==null?void 0:a.reward)??0n,limit:f,manager:((d=this.payload)==null?void 0:d.manager)??c.zeroAddress})}decodeClaimData(f){const b=c.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],f);return c.decodeAbiParameters([{type:"uint256"}],b[0].incentiveData)[0]}};r.bases={31337:void 0,...w.ERC20PeggedIncentive},r.registryType=p.RegistryType.INCENTIVE;let i=r;function n({asset:s,peg:f,reward:b,limit:a,manager:d=c.zeroAddress}){return c.encodeAbiParameters([{type:"address",name:"asset"},{type:"address",name:"peg"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[s,f,b,a,d])}const o={[t.APointsIncentive]:R.PointsIncentive,[t.AERC20Incentive]:A.ERC20Incentive,[t.AERC20PeggedVariableCriteriaIncentiveV2]:v.ERC20PeggedVariableCriteriaIncentiveV2,[t.AERC20PeggedIncentive]:i,[t.AAllowListIncentive]:h.AllowListIncentive,[t.ACGDAIncentive]:y.CGDAIncentive,[t.AERC20VariableIncentive]:V.ERC20VariableIncentive,[t.AERC20VariableCriteriaIncentiveV2]:I.ERC20VariableCriteriaIncentiveV2};async function q(s,f,b){const a=await g.readContract(s.config,{abi:e.se,functionName:"getComponentInterface",address:f,...b}),d=o[a];if(!d)throw new m.InvalidComponentInterfaceError(Object.keys(o),a);return new d(s,f)}exports.ERC20PeggedIncentive=i;exports.IncentiveByComponentInterface=o;exports.incentiveFromAddress=q;exports.prepareERC20PeggedIncentivePayload=n;
2
+ //# sourceMappingURL=Incentive-CLSVNxDz.cjs.map