@boostxyz/sdk 7.3.0 → 7.5.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 (193) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +2 -2
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts.map +1 -1
  6. package/dist/Actions/EventAction.js +160 -159
  7. package/dist/Actions/EventAction.js.map +1 -1
  8. package/dist/AllowLists/AllowList.cjs +1 -1
  9. package/dist/AllowLists/AllowList.js +3 -3
  10. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  11. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  12. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  13. package/dist/AllowLists/SimpleAllowList.js +30 -30
  14. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.d.ts.map +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 +14 -0
  23. package/dist/BoostCore.d.ts.map +1 -1
  24. package/dist/BoostCore.js +199 -180
  25. package/dist/BoostCore.js.map +1 -1
  26. package/dist/BoostRegistry.cjs +1 -1
  27. package/dist/BoostRegistry.cjs.map +1 -1
  28. package/dist/BoostRegistry.d.ts.map +1 -1
  29. package/dist/BoostRegistry.js +31 -31
  30. package/dist/BoostRegistry.js.map +1 -1
  31. package/dist/Budget-DGg1wCa6.cjs +2 -0
  32. package/dist/Budget-DGg1wCa6.cjs.map +1 -0
  33. package/dist/{Budget-B-grnRq9.js → Budget-ZnzzZsjK.js} +102 -102
  34. package/dist/Budget-ZnzzZsjK.js.map +1 -0
  35. package/dist/Budgets/Budget.cjs +1 -1
  36. package/dist/Budgets/Budget.js +3 -3
  37. package/dist/Budgets/ManagedBudget.cjs +1 -1
  38. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  39. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +48 -48
  41. package/dist/Budgets/ManagedBudget.js.map +1 -1
  42. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  43. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -1
  44. package/dist/Budgets/TransparentBudget.d.ts.map +1 -1
  45. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  46. package/dist/Deployable/DeployableTarget.cjs +1 -1
  47. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  48. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  49. package/dist/Deployable/DeployableTarget.js +5 -8
  50. package/dist/Deployable/DeployableTarget.js.map +1 -1
  51. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  52. package/dist/Deployable/DeployableTargetWithRBAC.js +19 -19
  53. package/dist/{Incentive-Bz_g-nID.js → Incentive-CYj6lbM5.js} +64 -64
  54. package/dist/Incentive-CYj6lbM5.js.map +1 -0
  55. package/dist/{Incentive-Dufx0ZjH.cjs → Incentive-Ckxpw7EN.cjs} +2 -2
  56. package/dist/Incentive-Ckxpw7EN.cjs.map +1 -0
  57. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  59. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.js +36 -36
  61. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  62. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  63. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.js +37 -37
  66. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  67. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  68. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  70. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.js +44 -44
  72. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  73. package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
  74. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  75. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs.map +1 -1
  76. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
  77. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +63 -63
  78. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js.map +1 -1
  79. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  80. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
  81. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -1
  82. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +55 -53
  83. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
  84. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  85. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  86. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +45 -45
  88. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  90. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
  91. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -1
  92. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +51 -49
  93. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
  94. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  95. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  96. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.js +38 -38
  98. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.js +3 -3
  101. package/dist/Incentives/PointsIncentive.cjs +1 -1
  102. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  103. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  104. package/dist/Incentives/PointsIncentive.js +35 -35
  105. package/dist/Incentives/PointsIncentive.js.map +1 -1
  106. package/dist/{SimpleDenyList-BlLgvhjE.js → SimpleDenyList-DUO4ex__.js} +32 -32
  107. package/dist/SimpleDenyList-DUO4ex__.js.map +1 -0
  108. package/dist/{SimpleDenyList-B2YDJ_gk.cjs → SimpleDenyList-v5G-fPfm.cjs} +2 -2
  109. package/dist/SimpleDenyList-v5G-fPfm.cjs.map +1 -0
  110. package/dist/Validator-BA8RC2J6.cjs +2 -0
  111. package/dist/Validator-BA8RC2J6.cjs.map +1 -0
  112. package/dist/Validator-D4CzwdB9.js +409 -0
  113. package/dist/Validator-D4CzwdB9.js.map +1 -0
  114. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  115. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  116. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
  117. package/dist/Validators/LimitedSignerValidator.js +39 -39
  118. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  119. package/dist/Validators/PayableLimitedSignerValidator.d.ts +829 -0
  120. package/dist/Validators/PayableLimitedSignerValidator.d.ts.map +1 -0
  121. package/dist/Validators/SignerValidator.cjs +1 -1
  122. package/dist/Validators/SignerValidator.cjs.map +1 -1
  123. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  124. package/dist/Validators/SignerValidator.js +48 -48
  125. package/dist/Validators/SignerValidator.js.map +1 -1
  126. package/dist/Validators/Validator.cjs +1 -1
  127. package/dist/Validators/Validator.cjs.map +1 -1
  128. package/dist/Validators/Validator.d.ts +4 -3
  129. package/dist/Validators/Validator.d.ts.map +1 -1
  130. package/dist/Validators/Validator.js +14 -50
  131. package/dist/Validators/Validator.js.map +1 -1
  132. package/dist/componentInterfaces-D4QdH2Qz.cjs +2 -0
  133. package/dist/componentInterfaces-D4QdH2Qz.cjs.map +1 -0
  134. package/dist/componentInterfaces-DCTot4_O.js +24 -0
  135. package/dist/componentInterfaces-DCTot4_O.js.map +1 -0
  136. package/dist/{deployments-DKtAq6BT.js → deployments-B-ZU0zVY.js} +61 -34
  137. package/dist/{deployments-DKtAq6BT.js.map → deployments-B-ZU0zVY.js.map} +1 -1
  138. package/dist/deployments-CaacquP1.cjs +2 -0
  139. package/dist/deployments-CaacquP1.cjs.map +1 -0
  140. package/dist/deployments.json +32 -4
  141. package/dist/generated-BOBQ2ut4.cjs +3 -0
  142. package/dist/generated-BOBQ2ut4.cjs.map +1 -0
  143. package/dist/{generated-CINzoGbl.js → generated-ffteMTHN.js} +1157 -776
  144. package/dist/generated-ffteMTHN.js.map +1 -0
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.d.ts +1 -0
  147. package/dist/index.d.ts.map +1 -1
  148. package/dist/index.js +123 -118
  149. package/package.json +1 -1
  150. package/src/Actions/EventAction.ts +3 -1
  151. package/src/AllowLists/SimpleAllowList.ts +3 -1
  152. package/src/AllowLists/SimpleDenyList.ts +3 -1
  153. package/src/BoostCore.ts +30 -1
  154. package/src/BoostRegistry.ts +3 -1
  155. package/src/Budgets/ManagedBudget.ts +3 -1
  156. package/src/Budgets/ManagedBudgetWithFees.ts +3 -1
  157. package/src/Budgets/ManagedBudgetWithFeesV2.ts +3 -1
  158. package/src/Budgets/TransparentBudget.ts +3 -1
  159. package/src/Budgets/VestingBudget.ts +3 -1
  160. package/src/Deployable/DeployableTarget.ts +2 -3
  161. package/src/Incentives/AllowListIncentive.ts +3 -1
  162. package/src/Incentives/CGDAIncentive.ts +3 -1
  163. package/src/Incentives/ERC1155Incentive.ts +3 -1
  164. package/src/Incentives/ERC20Incentive.ts +3 -1
  165. package/src/Incentives/ERC20PeggedIncentive.ts +3 -1
  166. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +3 -1
  167. package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +6 -2
  168. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +3 -1
  169. package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +5 -1
  170. package/src/Incentives/ERC20VariableIncentive.ts +3 -1
  171. package/src/Incentives/PointsIncentive.ts +3 -1
  172. package/src/Validators/LimitedSignerValidator.ts +3 -1
  173. package/src/Validators/PayableLimitedSignerValidator.test.ts +202 -0
  174. package/src/Validators/PayableLimitedSignerValidator.ts +667 -0
  175. package/src/Validators/SignerValidator.ts +3 -1
  176. package/src/Validators/Validator.ts +7 -1
  177. package/src/index.ts +1 -0
  178. package/dist/Budget-B-grnRq9.js.map +0 -1
  179. package/dist/Budget-uGKa2qzz.cjs +0 -2
  180. package/dist/Budget-uGKa2qzz.cjs.map +0 -1
  181. package/dist/Incentive-Bz_g-nID.js.map +0 -1
  182. package/dist/Incentive-Dufx0ZjH.cjs.map +0 -1
  183. package/dist/SimpleDenyList-B2YDJ_gk.cjs.map +0 -1
  184. package/dist/SimpleDenyList-BlLgvhjE.js.map +0 -1
  185. package/dist/componentInterfaces-C5ig8mCK.cjs +0 -2
  186. package/dist/componentInterfaces-C5ig8mCK.cjs.map +0 -1
  187. package/dist/componentInterfaces-Ddus5rIA.js +0 -23
  188. package/dist/componentInterfaces-Ddus5rIA.js.map +0 -1
  189. package/dist/deployments-Dk-Z1L2X.cjs +0 -2
  190. package/dist/deployments-Dk-Z1L2X.cjs.map +0 -1
  191. package/dist/generated-CINzoGbl.js.map +0 -1
  192. package/dist/generated-C_JEoLDO.cjs +0 -3
  193. package/dist/generated-C_JEoLDO.cjs.map +0 -1
@@ -1,15 +1,15 @@
1
- import { y as h, bl as x, bm as D, bn as I, bo as T, bp as V, bq as _, br as E, bs as P, bt as $, bu as N, bv as B, bw as F, bx as G, by as U, bz as k, bA as q, bB as z } from "../generated-CINzoGbl.js";
2
- import { getTransactionReceipt as M, getTransaction as S } from "@wagmi/core";
3
- import { parseEventLogs as H, decodeFunctionData as L, zeroAddress as n, zeroHash as J, encodeAbiParameters as g, decodeAbiParameters as o, parseEther as y } from "viem";
4
- import { e as W } from "../deployments-DKtAq6BT.js";
5
- import { SignatureType as p } from "../Actions/EventAction.js";
6
- import { DeployableTarget as Z } from "../Deployable/DeployableTarget.js";
7
- import { prepareClaimPayload as w } from "../claiming.js";
8
- import { NoMatchingLogsError as C, DecodedArgsError as l, InvalidCriteriaTypeError as j, IncentiveCriteriaNotFoundError as K } from "../errors.js";
9
- import { RegistryType as O, CheatCodes as Q } from "../utils.js";
10
- const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6121b3806100895f395ff3fe6080604052600436106102ab575f3560e01c8063715018a611610165578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b1461078d578063fe9fbb80146107a0578063fee81cf4146107bf575f80fd5b8063ec87621c14610766578063f04e283e1461077a575f80fd5b8063db09da12116100ac578063db09da1214610713578063dcc2136114610732578063dcc59b6f14610751575f80fd5b8063c884ef83146106d0578063d54ad2a1146106fe575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf1461067e578063be4994f81461069d578063c213f3f9146106bc575f80fd5b8063a4d66daf14610648578063a871ced21461065d575f80fd5b8063775486871161014b57806377548687146105b45780638da5cb5b146106065780639214fa4d1461061e575f80fd5b8063715018a61461059857806375b238fc146105a0575f80fd5b806330db555f1161020f5780634a4ee7b1116101c5578063514e62fc116101ab578063514e62fc14610546578063547d18641461057b57806354d1f13d14610590575f80fd5b80634a4ee7b1146105075780634e7165a21461051a575f80fd5b80634359d28a116101f55780634359d28a14610480578063439fab911461049f578063474f5a44146104be575f80fd5b806330db555f1461043557806338d52e0f14610454575f80fd5b80631f1cb62b11610264578063256929621161024a57806325692962146103c257806328d6183b146103ca5780632de9480714610404575f80fd5b80631f1cb62b1461035d578063228cb733146103ae575f80fd5b8063183a4f6e11610294578063183a4f6e146103005780631c10893f146103155780631cd64df414610328575f80fd5b806301ffc9a7146102af57806307621eca146102e3575b5f80fd5b3480156102ba575f80fd5b506102ce6102c93660046118fe565b6107f0565b60405190151581526020015b60405180910390f35b3480156102ee575f80fd5b505f545b6040519081526020016102da565b61031361030e366004611944565b61084b565b005b610313610323366004611983565b610858565b348015610333575f80fd5b506102ce610342366004611983565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610368575f80fd5b50600a546103899073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102da565b3480156103b9575f80fd5b506102f25f5481565b61031361086e565b3480156103d5575f80fd5b506040517ff60c99c90000000000000000000000000000000000000000000000000000000081526020016102da565b34801561040f575f80fd5b506102f261041e3660046119ab565b638b78c6d8600c9081525f91909152602090205490565b348015610440575f80fd5b5061031361044f366004611944565b6108bb565b34801561045f575f80fd5b506006546103899073ffffffffffffffffffffffffffffffffffffffff1681565b34801561048b575f80fd5b5061031361049a366004611a0c565b610977565b3480156104aa575f80fd5b506103136104b9366004611ab6565b610a71565b3480156104c9575f80fd5b506104dd6104d8366004611ab6565b610da1565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102da565b610313610515366004611983565b610f03565b348015610525575f80fd5b50610539610534366004611ab6565b610f15565b6040516102da9190611b41565b348015610551575f80fd5b506102ce610560366004611983565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610586575f80fd5b506102f260025481565b610313610faf565b610313610fe8565b3480156105ab575f80fd5b506102f2600281565b3480156105bf575f80fd5b506003546004546005546105f69260ff908116929190811690610100900473ffffffffffffffffffffffffffffffffffffffff1684565b6040516102da9493929190611b94565b348015610611575f80fd5b50638b78c6d81954610389565b348015610629575f80fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff16610389565b348015610653575f80fd5b506102f260085481565b348015610668575f80fd5b50610671610ffb565b6040516102da9190611c1c565b348015610689575f80fd5b506102ce610698366004611c2a565b611095565b3480156106a8575f80fd5b506103136106b7366004611a0c565b6112c2565b3480156106c7575f80fd5b50600b546102f2565b3480156106db575f80fd5b506102ce6106ea3660046119ab565b60016020525f908152604090205460ff1681565b348015610709575f80fd5b506102f260095481565b34801561071e575f80fd5b506102ce61072d366004611c2a565b611360565b34801561073d575f80fd5b5061031361074c366004611a0c565b6113d3565b34801561075c575f80fd5b506102f260075481565b348015610771575f80fd5b506102f2600181565b6103136107883660046119ab565b611471565b61031361079b3660046119ab565b6114ab565b3480156107ab575f80fd5b506102ce6107ba3660046119ab565b6114d1565b3480156107ca575f80fd5b506102f26107d93660046119ab565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167ff60c99c9000000000000000000000000000000000000000000000000000000001480610845575061084582611530565b92915050565b6108553382611585565b50565b610860611590565b61086a82826115aa565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016108c6816115b6565b815f036108ff576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546109249073ffffffffffffffffffffffffffffffffffffffff163330856115e7565b8160085f8282546109359190611ca6565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b6002610982816115b6565b8382146109bb576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a69575f8484838181106109d8576109d8611cb9565b90506020020160208101906109ed9190611ce6565b9050801515600103610a2f57610a2a878784818110610a0e57610a0e611cb9565b9050602002016020810190610a2391906119ab565b60016115aa565b610a60565b610a60878784818110610a4457610a44611cb9565b9050602002016020810190610a5991906119ab565b6001611585565b506001016109bd565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610ac25760018160011c14303b10610ab95763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610ad083850185611da1565b905080606001515f03610b0f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610b389073ffffffffffffffffffffffffffffffffffffffff1630611649565b905081811015610ba15782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b60c083015183516006805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556020860151600a805491909316911617905560408401515f55606084015160085560a0840151600b5580516003805483929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610c5557610c55611b53565b02179055506020820151600182015560408201516002909101805460609093015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090931660ff90921691909117919091179055610ccc3361167c565b610cdb846080015160016116c4565b836020015173ffffffffffffffffffffffffffffffffffffffff16845f015173ffffffffffffffffffffffffffffffffffffffff167fdc505a50c6f2c816d981a377c8177e2604d8302821a502bc9f742e0748f338428660400151876060015188608001518960a001518a60c00151604051610d5b959493929190611e9a565b60405180910390a3505050508015610d9c576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610dae816115b6565b5f610dbb85870187611f8c565b90505f8160200151806020019051810190610dd69190612009565b90508060085f828254610de99190612020565b90915550508151600654610e169173ffffffffffffffffffffffffffffffffffffffff9091169083611705565b81516006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610ed491611b41565b60405180910390a260065490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610f0b611590565b61086a8282611585565b60605f610f2483850185611da1565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610f969201612033565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610ff0611590565b610ff95f611758565b565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810190915260038054829060ff16600181111561104357611043611b53565b600181111561105457611054611b53565b81526001820154602082015260029091015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff16606090910152919050565b5f61109e611590565b5f6110ab838501856120b1565b90505f81602001518060200190518101906110c69190612009565b90505f80545f036110d85750806110fb565b670de0b6b3a7640000825f546110ee919061212e565b6110f89190612145565b90505b600b541580159061110d5750600b5481115b156111175750600b545b611120816117a2565b611156576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854816009546111679190611ca6565b111561119f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060095f8282546111b09190611ca6565b92505081905550600160075f8282546111c99190611ca6565b90915550506006546111f29073ffffffffffffffffffffffffffffffffffffffff168883611705565b6006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112ad91611b41565b60405180910390a25060019695505050505050565b60026112cd816115b6565b838214611306576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a695761135886868381811061132557611325611cb9565b905060200201602081019061133a91906119ab565b85858481811061134c5761134c611cb9565b905060200201356115aa565b600101611308565b5f808061136f848601866120b1565b90505f816020015180602001905181019061138a9190612009565b90505f545f0361139c578092506113bf565b670de0b6b3a7640000815f546113b2919061212e565b6113bc9190612145565b92505b6113c8836117a2565b979650505050505050565b60026113de816115b6565b838214611417576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a695761146986868381811061143657611436611cb9565b905060200201602081019061144b91906119ab565b85858481811061145d5761145d611cb9565b90506020020135611585565b600101611419565b611479611590565b63389a75e1600c52805f526020600c20805442111561149f57636f5e88185f526004601cfd5b5f905561085581611758565b6114b3611590565b8060601b6114c857637448fbae5f526004601cfd5b61085581611758565b5f8173ffffffffffffffffffffffffffffffffffffffff166114f6638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806108455750638b78c6d8600c9081525f83905260209020546003161515610845565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806108455750610845826117bc565b61086a82825f611811565b638b78c6d819543314610ff9576382b429005f526004601cfd5b61086a82826001611811565b638b78c6d81954331461085557638b78c6d8600c52335f52806020600c205416610855576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661163b57803d873b15171061163b57637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661174e57803d853b15171061174e576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f600854826009546117b49190611ca6565b111592915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610845575061084582611868565b638b78c6d8600c52825f526020600c20805483811783611832575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061084557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610845565b5f6020828403121561190e575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461193d575f80fd5b9392505050565b5f60208284031215611954575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461197e575f80fd5b919050565b5f8060408385031215611994575f80fd5b61199d8361195b565b946020939093013593505050565b5f602082840312156119bb575f80fd5b61193d8261195b565b5f8083601f8401126119d4575f80fd5b50813567ffffffffffffffff8111156119eb575f80fd5b6020830191508360208260051b8501011115611a05575f80fd5b9250929050565b5f805f8060408587031215611a1f575f80fd5b843567ffffffffffffffff811115611a35575f80fd5b611a41878288016119c4565b909550935050602085013567ffffffffffffffff811115611a60575f80fd5b611a6c878288016119c4565b95989497509550505050565b5f8083601f840112611a88575f80fd5b50813567ffffffffffffffff811115611a9f575f80fd5b602083019150836020828501011115611a05575f80fd5b5f8060208385031215611ac7575f80fd5b823567ffffffffffffffff811115611add575f80fd5b611ae985828601611a78565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61193d6020830184611af5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611b9057611b90611b53565b9052565b60808101611ba28287611b80565b84602083015260ff8416604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b611be1828251611b80565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301525050565b608081016108458284611bd6565b5f805f60408486031215611c3c575f80fd5b611c458461195b565b9250602084013567ffffffffffffffff811115611c60575f80fd5b611c6c86828701611a78565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561084557610845611c79565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611cf6575f80fd5b8135801515811461193d575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715611d5557611d55611d05565b60405290565b6040516080810167ffffffffffffffff81118282101715611d5557611d55611d05565b6040805190810167ffffffffffffffff81118282101715611d5557611d55611d05565b5f81830361014081128015611db4575f80fd5b50611dbd611d32565b611dc68461195b565b8152611dd46020850161195b565b60208201526040848101359082015260608085013590820152611df96080850161195b565b60808281019190915260a085810135908301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4083011215611e39575f80fd5b611e41611d5b565b915060c084013560028110611e54575f80fd5b825260e0840135602083015261010084013560ff81168114611e74575f80fd5b6040830152611e86610120850161195b565b606083015260c08101919091529392505050565b8581526020810185905273ffffffffffffffffffffffffffffffffffffffff84166040820152606081018390526101008101611ed96080830184611bd6565b9695505050505050565b5f82601f830112611ef2575f80fd5b813567ffffffffffffffff811115611f0c57611f0c611d05565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611f5957611f59611d05565b604052818152838201602001851015611f70575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611f9c575f80fd5b813567ffffffffffffffff811115611fb2575f80fd5b820160408185031215611fc3575f80fd5b611fcb611d7e565b611fd48261195b565b8152602082013567ffffffffffffffff811115611fef575f80fd5b611ffb86828501611ee3565b602083015250949350505050565b5f60208284031215612019575f80fd5b5051919050565b8181038181111561084557610845611c79565b602081525f82516003811061204a5761204a611b53565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526120a960a0840182611af5565b949350505050565b5f602082840312156120c1575f80fd5b813567ffffffffffffffff8111156120d7575f80fd5b8201604081850312156120e8575f80fd5b6120f0611d7e565b813567ffffffffffffffff811115612106575f80fd5b61211286828501611ee3565b825250602082013567ffffffffffffffff811115611fef575f80fd5b808202811582820484141761084557610845611c79565b5f82612178577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122098c803dd4f42edf25288bd3c5b3e7bf9935c3d848f118a09f85d1ebc21194d1164736f6c634300081a0033", u = class u extends Z {
1
+ import { y, bl as D, bm as R, bn as V, bo as x, bp as _, bq as v, br as N, bs as B, bt as P, bu as S, bv as $, bw as F, bx as O, by as G, bz as M, bA as U, bB as k } from "../generated-ffteMTHN.js";
2
+ import { getTransactionReceipt as q, getTransaction as z } from "@wagmi/core";
3
+ import { parseEventLogs as L, decodeFunctionData as W, zeroAddress as n, zeroHash as H, encodeAbiParameters as m, decodeAbiParameters as o, parseEther as p } from "viem";
4
+ import { e as j } from "../deployments-B-ZU0zVY.js";
5
+ import { SignatureType as w } from "../Actions/EventAction.js";
6
+ import { DeployableTarget as J } from "../Deployable/DeployableTarget.js";
7
+ import { prepareClaimPayload as C } from "../claiming.js";
8
+ import { NoMatchingLogsError as A, DecodedArgsError as l, InvalidCriteriaTypeError as K, IncentiveCriteriaNotFoundError as Q } from "../errors.js";
9
+ import { RegistryType as X, CheatCodes as Y } from "../utils.js";
10
+ const Z = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6121b3806100895f395ff3fe6080604052600436106102ab575f3560e01c8063715018a611610165578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b1461078d578063fe9fbb80146107a0578063fee81cf4146107bf575f80fd5b8063ec87621c14610766578063f04e283e1461077a575f80fd5b8063db09da12116100ac578063db09da1214610713578063dcc2136114610732578063dcc59b6f14610751575f80fd5b8063c884ef83146106d0578063d54ad2a1146106fe575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf1461067e578063be4994f81461069d578063c213f3f9146106bc575f80fd5b8063a4d66daf14610648578063a871ced21461065d575f80fd5b8063775486871161014b57806377548687146105b45780638da5cb5b146106065780639214fa4d1461061e575f80fd5b8063715018a61461059857806375b238fc146105a0575f80fd5b806330db555f1161020f5780634a4ee7b1116101c5578063514e62fc116101ab578063514e62fc14610546578063547d18641461057b57806354d1f13d14610590575f80fd5b80634a4ee7b1146105075780634e7165a21461051a575f80fd5b80634359d28a116101f55780634359d28a14610480578063439fab911461049f578063474f5a44146104be575f80fd5b806330db555f1461043557806338d52e0f14610454575f80fd5b80631f1cb62b11610264578063256929621161024a57806325692962146103c257806328d6183b146103ca5780632de9480714610404575f80fd5b80631f1cb62b1461035d578063228cb733146103ae575f80fd5b8063183a4f6e11610294578063183a4f6e146103005780631c10893f146103155780631cd64df414610328575f80fd5b806301ffc9a7146102af57806307621eca146102e3575b5f80fd5b3480156102ba575f80fd5b506102ce6102c93660046118fe565b6107f0565b60405190151581526020015b60405180910390f35b3480156102ee575f80fd5b505f545b6040519081526020016102da565b61031361030e366004611944565b61084b565b005b610313610323366004611983565b610858565b348015610333575f80fd5b506102ce610342366004611983565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610368575f80fd5b50600a546103899073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102da565b3480156103b9575f80fd5b506102f25f5481565b61031361086e565b3480156103d5575f80fd5b506040517ff60c99c90000000000000000000000000000000000000000000000000000000081526020016102da565b34801561040f575f80fd5b506102f261041e3660046119ab565b638b78c6d8600c9081525f91909152602090205490565b348015610440575f80fd5b5061031361044f366004611944565b6108bb565b34801561045f575f80fd5b506006546103899073ffffffffffffffffffffffffffffffffffffffff1681565b34801561048b575f80fd5b5061031361049a366004611a0c565b610977565b3480156104aa575f80fd5b506103136104b9366004611ab6565b610a71565b3480156104c9575f80fd5b506104dd6104d8366004611ab6565b610da1565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102da565b610313610515366004611983565b610f03565b348015610525575f80fd5b50610539610534366004611ab6565b610f15565b6040516102da9190611b41565b348015610551575f80fd5b506102ce610560366004611983565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610586575f80fd5b506102f260025481565b610313610faf565b610313610fe8565b3480156105ab575f80fd5b506102f2600281565b3480156105bf575f80fd5b506003546004546005546105f69260ff908116929190811690610100900473ffffffffffffffffffffffffffffffffffffffff1684565b6040516102da9493929190611b94565b348015610611575f80fd5b50638b78c6d81954610389565b348015610629575f80fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff16610389565b348015610653575f80fd5b506102f260085481565b348015610668575f80fd5b50610671610ffb565b6040516102da9190611c1c565b348015610689575f80fd5b506102ce610698366004611c2a565b611095565b3480156106a8575f80fd5b506103136106b7366004611a0c565b6112c2565b3480156106c7575f80fd5b50600b546102f2565b3480156106db575f80fd5b506102ce6106ea3660046119ab565b60016020525f908152604090205460ff1681565b348015610709575f80fd5b506102f260095481565b34801561071e575f80fd5b506102ce61072d366004611c2a565b611360565b34801561073d575f80fd5b5061031361074c366004611a0c565b6113d3565b34801561075c575f80fd5b506102f260075481565b348015610771575f80fd5b506102f2600181565b6103136107883660046119ab565b611471565b61031361079b3660046119ab565b6114ab565b3480156107ab575f80fd5b506102ce6107ba3660046119ab565b6114d1565b3480156107ca575f80fd5b506102f26107d93660046119ab565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167ff60c99c9000000000000000000000000000000000000000000000000000000001480610845575061084582611530565b92915050565b6108553382611585565b50565b610860611590565b61086a82826115aa565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016108c6816115b6565b815f036108ff576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546109249073ffffffffffffffffffffffffffffffffffffffff163330856115e7565b8160085f8282546109359190611ca6565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b6002610982816115b6565b8382146109bb576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a69575f8484838181106109d8576109d8611cb9565b90506020020160208101906109ed9190611ce6565b9050801515600103610a2f57610a2a878784818110610a0e57610a0e611cb9565b9050602002016020810190610a2391906119ab565b60016115aa565b610a60565b610a60878784818110610a4457610a44611cb9565b9050602002016020810190610a5991906119ab565b6001611585565b506001016109bd565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610ac25760018160011c14303b10610ab95763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610ad083850185611da1565b905080606001515f03610b0f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610b389073ffffffffffffffffffffffffffffffffffffffff1630611649565b905081811015610ba15782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b60c083015183516006805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556020860151600a805491909316911617905560408401515f55606084015160085560a0840151600b5580516003805483929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610c5557610c55611b53565b02179055506020820151600182015560408201516002909101805460609093015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090931660ff90921691909117919091179055610ccc3361167c565b610cdb846080015160016116c4565b836020015173ffffffffffffffffffffffffffffffffffffffff16845f015173ffffffffffffffffffffffffffffffffffffffff167fdc505a50c6f2c816d981a377c8177e2604d8302821a502bc9f742e0748f338428660400151876060015188608001518960a001518a60c00151604051610d5b959493929190611e9a565b60405180910390a3505050508015610d9c576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610dae816115b6565b5f610dbb85870187611f8c565b90505f8160200151806020019051810190610dd69190612009565b90508060085f828254610de99190612020565b90915550508151600654610e169173ffffffffffffffffffffffffffffffffffffffff9091169083611705565b81516006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610ed491611b41565b60405180910390a260065490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610f0b611590565b61086a8282611585565b60605f610f2483850185611da1565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610f969201612033565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610ff0611590565b610ff95f611758565b565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810190915260038054829060ff16600181111561104357611043611b53565b600181111561105457611054611b53565b81526001820154602082015260029091015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff16606090910152919050565b5f61109e611590565b5f6110ab838501856120b1565b90505f81602001518060200190518101906110c69190612009565b90505f80545f036110d85750806110fb565b670de0b6b3a7640000825f546110ee919061212e565b6110f89190612145565b90505b600b541580159061110d5750600b5481115b156111175750600b545b611120816117a2565b611156576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854816009546111679190611ca6565b111561119f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060095f8282546111b09190611ca6565b92505081905550600160075f8282546111c99190611ca6565b90915550506006546111f29073ffffffffffffffffffffffffffffffffffffffff168883611705565b6006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526112ad91611b41565b60405180910390a25060019695505050505050565b60026112cd816115b6565b838214611306576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a695761135886868381811061132557611325611cb9565b905060200201602081019061133a91906119ab565b85858481811061134c5761134c611cb9565b905060200201356115aa565b600101611308565b5f808061136f848601866120b1565b90505f816020015180602001905181019061138a9190612009565b90505f545f0361139c578092506113bf565b670de0b6b3a7640000815f546113b2919061212e565b6113bc9190612145565b92505b6113c8836117a2565b979650505050505050565b60026113de816115b6565b838214611417576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a695761146986868381811061143657611436611cb9565b905060200201602081019061144b91906119ab565b85858481811061145d5761145d611cb9565b90506020020135611585565b600101611419565b611479611590565b63389a75e1600c52805f526020600c20805442111561149f57636f5e88185f526004601cfd5b5f905561085581611758565b6114b3611590565b8060601b6114c857637448fbae5f526004601cfd5b61085581611758565b5f8173ffffffffffffffffffffffffffffffffffffffff166114f6638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806108455750638b78c6d8600c9081525f83905260209020546003161515610845565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806108455750610845826117bc565b61086a82825f611811565b638b78c6d819543314610ff9576382b429005f526004601cfd5b61086a82826001611811565b638b78c6d81954331461085557638b78c6d8600c52335f52806020600c205416610855576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661163b57803d873b15171061163b57637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661174e57803d853b15171061174e576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f600854826009546117b49190611ca6565b111592915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610845575061084582611868565b638b78c6d8600c52825f526020600c20805483811783611832575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061084557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610845565b5f6020828403121561190e575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461193d575f80fd5b9392505050565b5f60208284031215611954575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461197e575f80fd5b919050565b5f8060408385031215611994575f80fd5b61199d8361195b565b946020939093013593505050565b5f602082840312156119bb575f80fd5b61193d8261195b565b5f8083601f8401126119d4575f80fd5b50813567ffffffffffffffff8111156119eb575f80fd5b6020830191508360208260051b8501011115611a05575f80fd5b9250929050565b5f805f8060408587031215611a1f575f80fd5b843567ffffffffffffffff811115611a35575f80fd5b611a41878288016119c4565b909550935050602085013567ffffffffffffffff811115611a60575f80fd5b611a6c878288016119c4565b95989497509550505050565b5f8083601f840112611a88575f80fd5b50813567ffffffffffffffff811115611a9f575f80fd5b602083019150836020828501011115611a05575f80fd5b5f8060208385031215611ac7575f80fd5b823567ffffffffffffffff811115611add575f80fd5b611ae985828601611a78565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61193d6020830184611af5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611b9057611b90611b53565b9052565b60808101611ba28287611b80565b84602083015260ff8416604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b611be1828251611b80565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301525050565b608081016108458284611bd6565b5f805f60408486031215611c3c575f80fd5b611c458461195b565b9250602084013567ffffffffffffffff811115611c60575f80fd5b611c6c86828701611a78565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561084557610845611c79565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611cf6575f80fd5b8135801515811461193d575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715611d5557611d55611d05565b60405290565b6040516080810167ffffffffffffffff81118282101715611d5557611d55611d05565b6040805190810167ffffffffffffffff81118282101715611d5557611d55611d05565b5f81830361014081128015611db4575f80fd5b50611dbd611d32565b611dc68461195b565b8152611dd46020850161195b565b60208201526040848101359082015260608085013590820152611df96080850161195b565b60808281019190915260a085810135908301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4083011215611e39575f80fd5b611e41611d5b565b915060c084013560028110611e54575f80fd5b825260e0840135602083015261010084013560ff81168114611e74575f80fd5b6040830152611e86610120850161195b565b606083015260c08101919091529392505050565b8581526020810185905273ffffffffffffffffffffffffffffffffffffffff84166040820152606081018390526101008101611ed96080830184611bd6565b9695505050505050565b5f82601f830112611ef2575f80fd5b813567ffffffffffffffff811115611f0c57611f0c611d05565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611f5957611f59611d05565b604052818152838201602001851015611f70575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611f9c575f80fd5b813567ffffffffffffffff811115611fb2575f80fd5b820160408185031215611fc3575f80fd5b611fcb611d7e565b611fd48261195b565b8152602082013567ffffffffffffffff811115611fef575f80fd5b611ffb86828501611ee3565b602083015250949350505050565b5f60208284031215612019575f80fd5b5051919050565b8181038181111561084557610845611c79565b602081525f82516003811061204a5761204a611b53565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526120a960a0840182611af5565b949350505050565b5f602082840312156120c1575f80fd5b813567ffffffffffffffff8111156120d7575f80fd5b8201604081850312156120e8575f80fd5b6120f0611d7e565b813567ffffffffffffffff811115612106575f80fd5b61211286828501611ee3565b825250602082013567ffffffffffffffff811115611fef575f80fd5b808202811582820484141761084557610845611c79565b5f82612178577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122098c803dd4f42edf25288bd3c5b3e7bf9935c3d848f118a09f85d1ebc21194d1164736f6c634300081a0033", g = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, u = class u extends J {
11
11
  constructor() {
12
- super(...arguments), this.abi = h;
12
+ super(...arguments), this.abi = y;
13
13
  }
14
14
  /**
15
15
  * The owner of the incentive
@@ -20,7 +20,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
20
20
  * @returns {Promise<Address>}
21
21
  */
22
22
  async owner(f) {
23
- return await x(this._config, {
23
+ return await D(this._config, {
24
24
  address: this.assertValidAddress(),
25
25
  args: [],
26
26
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -36,7 +36,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
36
36
  * @returns {Promise<bigint>} - The current reward
37
37
  */
38
38
  async currentReward(f) {
39
- return await D(
39
+ return await R(
40
40
  this._config,
41
41
  {
42
42
  address: this.assertValidAddress(),
@@ -55,7 +55,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
55
55
  * @returns {Promise<bigint>} The maximum reward amount per claim
56
56
  */
57
57
  async getMaxReward(f) {
58
- return await I(this._config, {
58
+ return await V(this._config, {
59
59
  ...f,
60
60
  address: this.assertValidAddress()
61
61
  });
@@ -71,46 +71,46 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
71
71
  async getIncentiveScalar({ chainId: f, hash: a, knownSignatures: e }, d) {
72
72
  var t;
73
73
  const b = await this.getIncentiveCriteria(d);
74
- if (b.criteriaType === p.EVENT) {
75
- const c = await M(this._config, {
74
+ if (b.criteriaType === w.EVENT) {
75
+ const c = await q(this._config, {
76
76
  chainId: f,
77
77
  hash: a
78
78
  });
79
- if (b.fieldIndex === Q.GAS_REBATE_INCENTIVE)
79
+ if (b.fieldIndex === Y.GAS_REBATE_INCENTIVE)
80
80
  return c.gasUsed * c.effectiveGasPrice + // Normal gas cost
81
81
  (c.blobGasUsed ?? 0n) * (c.blobGasPrice ?? 0n);
82
82
  const i = c.logs;
83
83
  if (i.length === 0)
84
- throw new C(
84
+ throw new A(
85
85
  `No logs found for event signature ${b.signature}`
86
86
  );
87
87
  try {
88
- const r = e[b.signature], s = H({
88
+ const r = e[b.signature], s = L({
89
89
  abi: [r],
90
90
  logs: i
91
91
  });
92
92
  if (s == null || s.length === 0)
93
- throw new C(
93
+ throw new A(
94
94
  `No logs found for event signature ${b.signature}`
95
95
  );
96
- const m = ((t = s[0]) == null ? void 0 : t.args)[b.fieldIndex];
97
- if (m === void 0)
96
+ const h = ((t = s[0]) == null ? void 0 : t.args)[b.fieldIndex];
97
+ if (h === void 0)
98
98
  throw new l(
99
99
  `Decoded argument at index ${b.fieldIndex} is undefined`
100
100
  );
101
- return BigInt(m);
101
+ return BigInt(h);
102
102
  } catch (r) {
103
103
  throw new l(
104
104
  `Failed to decode event log for signature ${b.signature}: ${r.message}`
105
105
  );
106
106
  }
107
- } else if (b.criteriaType === p.FUNC) {
108
- const c = await S(this._config, {
107
+ } else if (b.criteriaType === w.FUNC) {
108
+ const c = await z(this._config, {
109
109
  chainId: f,
110
110
  hash: a
111
111
  });
112
112
  try {
113
- const i = e[b.signature], s = L({
113
+ const i = e[b.signature], s = W({
114
114
  abi: [i],
115
115
  data: c.input
116
116
  }).args[b.fieldIndex];
@@ -125,7 +125,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
125
125
  );
126
126
  }
127
127
  } else
128
- throw new j(
128
+ throw new K(
129
129
  `Invalid criteria type ${b.criteriaType}`
130
130
  );
131
131
  }
@@ -138,7 +138,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
138
138
  * @returns {Promise<bigint>}
139
139
  */
140
140
  async claims(f) {
141
- return await T(this._config, {
141
+ return await x(this._config, {
142
142
  address: this.assertValidAddress(),
143
143
  args: [],
144
144
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -154,7 +154,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
154
154
  * @returns {Promise<bigint>}
155
155
  */
156
156
  async totalClaimed(f) {
157
- return await V(
157
+ return await _(
158
158
  this._config,
159
159
  {
160
160
  address: this.assertValidAddress(),
@@ -174,7 +174,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
174
174
  * @returns {Promise<boolean>}
175
175
  */
176
176
  async claimed(f, a) {
177
- return await _(this._config, {
177
+ return await v(this._config, {
178
178
  address: this.assertValidAddress(),
179
179
  args: [f],
180
180
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -190,7 +190,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
190
190
  * @returns {Promise<Address>}
191
191
  */
192
192
  async asset(f) {
193
- return await E(this._config, {
193
+ return await N(this._config, {
194
194
  address: this.assertValidAddress(),
195
195
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
196
196
  ...f
@@ -205,7 +205,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
205
205
  * @returns {Promise<Address>}
206
206
  */
207
207
  async peg(f) {
208
- return await P(this._config, {
208
+ return await B(this._config, {
209
209
  address: this.assertValidAddress(),
210
210
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
211
211
  ...f
@@ -220,7 +220,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
220
220
  * @returns {Promise<bigint>}
221
221
  */
222
222
  async reward(f) {
223
- return await $(this._config, {
223
+ return await P(this._config, {
224
224
  address: this.assertValidAddress(),
225
225
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
226
226
  ...f
@@ -235,7 +235,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
235
235
  * @returns {Promise<bigint>}
236
236
  */
237
237
  async limit(f) {
238
- return await N(this._config, {
238
+ return await S(this._config, {
239
239
  address: this.assertValidAddress(),
240
240
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
241
241
  ...f
@@ -263,9 +263,9 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
263
263
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
264
264
  */
265
265
  async claimRaw(f, a) {
266
- const { request: e, result: d } = await B(this._config, {
266
+ const { request: e, result: d } = await $(this._config, {
267
267
  address: this.assertValidAddress(),
268
- args: [w(f)],
268
+ args: [C(f)],
269
269
  ...this.optionallyAttachAccount(),
270
270
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
271
271
  ...a
@@ -297,14 +297,14 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
297
297
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
298
298
  */
299
299
  async clawbackRaw(f, a) {
300
- const { request: e, result: d } = await G(this._config, {
300
+ const { request: e, result: d } = await O(this._config, {
301
301
  address: this.assertValidAddress(),
302
- args: [w(f)],
302
+ args: [C(f)],
303
303
  ...this.optionallyAttachAccount(),
304
304
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
305
305
  ...a
306
306
  });
307
- return { hash: await U(
307
+ return { hash: await G(
308
308
  this._config,
309
309
  e
310
310
  ), result: d };
@@ -319,7 +319,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
319
319
  * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
320
320
  */
321
321
  async isClaimable(f, a) {
322
- return await k(
322
+ return await M(
323
323
  this._config,
324
324
  {
325
325
  address: this.assertValidAddress(),
@@ -338,7 +338,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
338
338
  * @returns {Promise<Address>} = The address of the token the reward is pegged to
339
339
  */
340
340
  async getPeg(f) {
341
- return await q(this._config, {
341
+ return await U(this._config, {
342
342
  address: this.assertValidAddress(),
343
343
  args: [],
344
344
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -394,7 +394,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
394
394
  */
395
395
  async getIncentiveCriteria(f) {
396
396
  try {
397
- return await z(
397
+ return await k(
398
398
  this._config,
399
399
  {
400
400
  ...f,
@@ -402,7 +402,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
402
402
  }
403
403
  );
404
404
  } catch (a) {
405
- throw new K(a);
405
+ throw new Q(a);
406
406
  }
407
407
  }
408
408
  /**
@@ -416,7 +416,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
416
416
  */
417
417
  async getTopupPayload(f) {
418
418
  var a, e, d, b, t;
419
- return R({
419
+ return T({
420
420
  asset: await this.asset() ?? n,
421
421
  peg: ((a = this.payload) == null ? void 0 : a.peg) ?? n,
422
422
  reward: ((e = this.payload) == null ? void 0 : e.reward) ?? 0n,
@@ -425,7 +425,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
425
425
  manager: ((b = this.payload) == null ? void 0 : b.manager) ?? n,
426
426
  criteria: ((t = this.payload) == null ? void 0 : t.criteria) ?? {
427
427
  criteriaType: 0,
428
- signature: J,
428
+ signature: H,
429
429
  fieldIndex: 0,
430
430
  targetContract: n
431
431
  }
@@ -445,9 +445,9 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
445
445
  a
446
446
  );
447
447
  return {
448
- abi: h,
449
- bytecode: X,
450
- args: [R(e)],
448
+ abi: y,
449
+ bytecode: Z,
450
+ args: [T(e)],
451
451
  ...this.optionallyAttachAccount(d.account)
452
452
  };
453
453
  }
@@ -459,7 +459,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
459
459
  * @returns {Hex} - Returns an encoded uint256
460
460
  */
461
461
  buildClawbackData(f) {
462
- return g([{ type: "uint256" }], [f]);
462
+ return m([{ type: "uint256" }], [f]);
463
463
  }
464
464
  /**
465
465
  * Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
@@ -470,7 +470,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
470
470
  * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
471
471
  */
472
472
  buildClaimData(f) {
473
- return g(
473
+ return m(
474
474
  [{ type: "uint256", name: "signedAmount" }],
475
475
  [f]
476
476
  );
@@ -505,7 +505,7 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
505
505
  this.reward(),
506
506
  this.getMaxReward()
507
507
  ]);
508
- return b === 0n || (d = b * e / y("1"), t !== 0n && d > t && (d = t)), d;
508
+ return b === 0n || (d = b * e / p("1"), t !== 0n && d > t && (d = t)), d;
509
509
  }
510
510
  /**
511
511
  * Decodes claim data for the ERC20PeggedVariableCriteriaIncentive, returning the claim amount.
@@ -536,16 +536,16 @@ const X = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
536
536
  d[0].incentiveData
537
537
  )[0];
538
538
  let t = b;
539
- return a === 0n || (t = a * b / y("1"), e !== 0n && t > e && (t = e)), t;
539
+ return a === 0n || (t = a * b / p("1"), e !== 0n && t > e && (t = e)), t;
540
540
  }
541
541
  };
542
542
  u.bases = {
543
- 31337: void 0,
544
- ...W
545
- }, u.registryType = O.INCENTIVE;
546
- let A = u;
547
- function R({
548
- asset: v,
543
+ ...g != null && g.VITE_ERC20_INCENTIVE_BASE ? { 31337: void 0 } : {},
544
+ ...j
545
+ }, u.registryType = X.INCENTIVE;
546
+ let E = u;
547
+ function T({
548
+ asset: I,
549
549
  peg: f,
550
550
  reward: a,
551
551
  limit: e,
@@ -553,7 +553,7 @@ function R({
553
553
  manager: b = n,
554
554
  criteria: t
555
555
  }) {
556
- return g(
556
+ return m(
557
557
  [
558
558
  {
559
559
  type: "tuple",
@@ -580,7 +580,7 @@ function R({
580
580
  ],
581
581
  [
582
582
  {
583
- asset: v,
583
+ asset: I,
584
584
  peg: f,
585
585
  reward: a,
586
586
  limit: e,
@@ -597,8 +597,8 @@ function R({
597
597
  );
598
598
  }
599
599
  export {
600
- A as ERC20PeggedVariableCriteriaIncentive,
601
- h as erc20PeggedVariableCriteriaIncentiveAbi,
602
- R as prepareERC20PeggedVariableCriteriaIncentivePayload
600
+ E as ERC20PeggedVariableCriteriaIncentive,
601
+ y as erc20PeggedVariableCriteriaIncentiveAbi,
602
+ T as prepareERC20PeggedVariableCriteriaIncentivePayload
603
603
  };
604
604
  //# sourceMappingURL=ERC20PeggedVariableCriteriaIncentive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20PeggedVariableCriteriaIncentive.js","sources":["../../src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts"],"sourcesContent":["import {\n erc20PeggedVariableCriteriaIncentiveAbi,\n readErc20PeggedVariableCriteriaIncentiveAsset,\n readErc20PeggedVariableCriteriaIncentiveClaimed,\n readErc20PeggedVariableCriteriaIncentiveClaims,\n readErc20PeggedVariableCriteriaIncentiveCurrentReward,\n readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria,\n readErc20PeggedVariableCriteriaIncentiveGetMaxReward,\n readErc20PeggedVariableCriteriaIncentiveGetPeg,\n readErc20PeggedVariableCriteriaIncentiveIsClaimable,\n readErc20PeggedVariableCriteriaIncentiveLimit,\n readErc20PeggedVariableCriteriaIncentiveOwner,\n readErc20PeggedVariableCriteriaIncentivePeg,\n readErc20PeggedVariableCriteriaIncentiveReward,\n readErc20PeggedVariableCriteriaIncentiveTotalClaimed,\n simulateErc20PeggedVariableCriteriaIncentiveClaim,\n simulateErc20PeggedVariableCriteriaIncentiveClawback,\n writeErc20PeggedVariableCriteriaIncentiveClaim,\n writeErc20PeggedVariableCriteriaIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedVariableCriteriaIncentive.sol/ERC20PeggedVariableCriteriaIncentive.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport type { AbiEvent } from 'abitype';\nimport {\n type AbiFunction,\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20PeggedVariableCriteriaIncentive as ERC20PeggedVariableCriteriaIncentiveBases } from '../../dist/deployments.json';\nimport { SignatureType } from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport {\n CheatCodes,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\nimport type {\n GetIncentiveScalarParams,\n IncentiveCriteria,\n} from './ERC20VariableCriteriaIncentive';\n\nexport { erc20PeggedVariableCriteriaIncentiveAbi };\n\n/**\n * The object representation of a `Erc20PeggedVariableCriteriaIncentive.InitPayload`\n *\n * @export\n * @deprecated Please use only v2 implementations\n * @interface Erc20PeggedVariableCriteriaIncentive\n * @typedef {Erc20PeggedVariableCriteriaIncentive}\n */\nexport interface ERC20PeggedVariableCriteriaIncentivePayload {\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 * Maximum reward each claim is elligible for.\n *\n * @type {bigint}\n */\n maxReward: 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 * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteria;\n}\n\n/**\n * A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentive` event types.\n *\n * @export\n * @typedef {Erc20PeggedVariableCriteriaIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedVariableCriteriaIncentiveAbi\n * >]\n */\nexport type Erc20PeggedVariableCriteriaIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedVariableCriteriaIncentiveAbi\n > = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @deprecated Please use only v2 implementations\n * @class Erc20PeggedVariableCriteriaIncentive\n * @typedef {ERC20PeggedVariableCriteriaIncentive}\n * @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentive>}\n */\nexport class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<\n ERC20PeggedVariableCriteriaIncentivePayload,\n typeof erc20PeggedVariableCriteriaIncentiveAbi\n> {\n public override readonly abi = erc20PeggedVariableCriteriaIncentiveAbi;\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 ...(ERC20PeggedVariableCriteriaIncentiveBases 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 readErc20PeggedVariableCriteriaIncentiveOwner(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 readErc20PeggedVariableCriteriaIncentiveCurrentReward(\n this._config,\n {\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 /**\n * Retrieves the maximum reward amount per claim.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The maximum reward amount per claim\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward =\n await readErc20PeggedVariableCriteriaIncentiveGetMaxReward(this._config, {\n ...params,\n address: this.assertValidAddress(),\n });\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures }: GetIncentiveScalarParams,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n const logs = transactionReceipt.logs;\n\n if (logs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n // Decode function data\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n const scalarValue = (decodedEvents[0]?.args as string[])[\n criteria.fieldIndex\n ];\n\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\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 readErc20PeggedVariableCriteriaIncentiveClaims(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 readErc20PeggedVariableCriteriaIncentiveTotalClaimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveClaimed(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 readErc20PeggedVariableCriteriaIncentiveAsset(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 readErc20PeggedVariableCriteriaIncentivePeg(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 readErc20PeggedVariableCriteriaIncentiveReward(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 readErc20PeggedVariableCriteriaIncentiveLimit(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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveClaim(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveClaim(\n this._config,\n request,\n );\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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveClawback(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveClawback(\n this._config,\n request,\n );\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 readErc20PeggedVariableCriteriaIncentiveIsClaimable(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveGetPeg(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 *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteria> {\n try {\n const criteria =\n await readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\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 prepareERC20PeggedVariableCriteriaIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n maxReward: this.payload?.maxReward ?? 0n,\n manager: this.payload?.manager ?? zeroAddress,\n criteria: this.payload?.criteria ?? {\n criteriaType: 0,\n signature: zeroHash,\n fieldIndex: 0,\n targetContract: zeroAddress,\n },\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedVariableCriteriaIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedVariableCriteriaIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedVariableCriteriaIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedVariableCriteriaIncentivePayload(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 ERC20PeggedVariableCriteriaIncentivePayload.\n *\n * @public\n * @param {bigint} signedAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentivePayload.\n */\n public buildClaimData(signedAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'signedAmount' }],\n [signedAmount],\n );\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public async 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 let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n * Use this function instead of `decodeClaimData` if you have reward details.\n *\n * @public\n * @param {Hex} claimData\n * @param {bigint} [reward]\n * @param {bigint} [maxReward]\n * @returns {BigInt} Returns the reward amount from a claim data payload\n */\n public decodeClaimDataWithRewardDetails(\n claimData: Hex,\n reward: bigint,\n maxReward: bigint,\n ) {\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 let claimAmount = signedAmount;\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedVariableCriteriaIncentivePayload}, properly encode a `ERC20PeggedVariableCriteriaIncentivePayload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentivePayload} initialization.\n *\n * @param {ERC20PeggedVariableCriteriaIncentivePayload} 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 * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedVariableCriteriaIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n maxReward = 0n,\n manager = zeroAddress,\n criteria,\n}: ERC20PeggedVariableCriteriaIncentivePayload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\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 { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset,\n peg,\n reward,\n limit,\n manager,\n maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20PeggedVariableCriteriaIncentive","DeployableTarget","erc20PeggedVariableCriteriaIncentiveAbi","params","readErc20PeggedVariableCriteriaIncentiveOwner","readErc20PeggedVariableCriteriaIncentiveCurrentReward","readErc20PeggedVariableCriteriaIncentiveGetMaxReward","chainId","hash","knownSignatures","criteria","SignatureType","transactionReceipt","getTransactionReceipt","CheatCodes","logs","NoMatchingLogsError","eventAbi","decodedEvents","parseEventLogs","scalarValue","_a","DecodedArgsError","e","transaction","getTransaction","func","decodeFunctionData","InvalidCriteriaTypeError","readErc20PeggedVariableCriteriaIncentiveClaims","readErc20PeggedVariableCriteriaIncentiveTotalClaimed","address","readErc20PeggedVariableCriteriaIncentiveClaimed","readErc20PeggedVariableCriteriaIncentiveAsset","readErc20PeggedVariableCriteriaIncentivePeg","readErc20PeggedVariableCriteriaIncentiveReward","readErc20PeggedVariableCriteriaIncentiveLimit","payload","request","result","simulateErc20PeggedVariableCriteriaIncentiveClaim","prepareClaimPayload","writeErc20PeggedVariableCriteriaIncentiveClaim","simulateErc20PeggedVariableCriteriaIncentiveClawback","writeErc20PeggedVariableCriteriaIncentiveClawback","readErc20PeggedVariableCriteriaIncentiveIsClaimable","readErc20PeggedVariableCriteriaIncentiveGetPeg","totalClaimed","limit","readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria","IncentiveCriteriaNotFoundError","netAmount","prepareERC20PeggedVariableCriteriaIncentivePayload","zeroAddress","_b","_c","_d","_e","zeroHash","_payload","_options","options","bytecode","amount","encodeAbiParameters","signedAmount","claimData","boostClaimData","decodeAbiParameters","claimAmount","reward","maxReward","parseEther","ERC20PeggedVariableCriteriaIncentiveBases","RegistryType","ERC20PeggedVariableCriteriaIncentive","asset","peg","manager"],"mappings":";;;;;;;;;woiBA8IaA,IAAN,MAAMA,UAA6CC,EAGxD;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,MA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W,MAAM,iBAAiB;AAAA,YAC5C;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE,OAAAY;AAAA,QACA,KAAAC;AAAA,QACA,QAAAP;AAAA,QACA,OAAAtB;AAAA,QACA,SAAA8B;AAAA,QACA,WAAAP;AAAA,QACA,UAAU;AAAA,UACR,cAAc7D,EAAS;AAAA,UACvB,WAAWA,EAAS;AAAA,UACpB,YAAYA,EAAS;AAAA,UACrB,gBAAgBA,EAAS;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"ERC20PeggedVariableCriteriaIncentive.js","sources":["../../src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts"],"sourcesContent":["import {\n erc20PeggedVariableCriteriaIncentiveAbi,\n readErc20PeggedVariableCriteriaIncentiveAsset,\n readErc20PeggedVariableCriteriaIncentiveClaimed,\n readErc20PeggedVariableCriteriaIncentiveClaims,\n readErc20PeggedVariableCriteriaIncentiveCurrentReward,\n readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria,\n readErc20PeggedVariableCriteriaIncentiveGetMaxReward,\n readErc20PeggedVariableCriteriaIncentiveGetPeg,\n readErc20PeggedVariableCriteriaIncentiveIsClaimable,\n readErc20PeggedVariableCriteriaIncentiveLimit,\n readErc20PeggedVariableCriteriaIncentiveOwner,\n readErc20PeggedVariableCriteriaIncentivePeg,\n readErc20PeggedVariableCriteriaIncentiveReward,\n readErc20PeggedVariableCriteriaIncentiveTotalClaimed,\n simulateErc20PeggedVariableCriteriaIncentiveClaim,\n simulateErc20PeggedVariableCriteriaIncentiveClawback,\n writeErc20PeggedVariableCriteriaIncentiveClaim,\n writeErc20PeggedVariableCriteriaIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedVariableCriteriaIncentive.sol/ERC20PeggedVariableCriteriaIncentive.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport type { AbiEvent } from 'abitype';\nimport {\n type AbiFunction,\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20PeggedVariableCriteriaIncentive as ERC20PeggedVariableCriteriaIncentiveBases } from '../../dist/deployments.json';\nimport { SignatureType } from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport {\n CheatCodes,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\nimport type {\n GetIncentiveScalarParams,\n IncentiveCriteria,\n} from './ERC20VariableCriteriaIncentive';\n\nexport { erc20PeggedVariableCriteriaIncentiveAbi };\n\n/**\n * The object representation of a `Erc20PeggedVariableCriteriaIncentive.InitPayload`\n *\n * @export\n * @deprecated Please use only v2 implementations\n * @interface Erc20PeggedVariableCriteriaIncentive\n * @typedef {Erc20PeggedVariableCriteriaIncentive}\n */\nexport interface ERC20PeggedVariableCriteriaIncentivePayload {\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 * Maximum reward each claim is elligible for.\n *\n * @type {bigint}\n */\n maxReward: 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 * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteria;\n}\n\n/**\n * A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentive` event types.\n *\n * @export\n * @typedef {Erc20PeggedVariableCriteriaIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedVariableCriteriaIncentiveAbi\n * >]\n */\nexport type Erc20PeggedVariableCriteriaIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedVariableCriteriaIncentiveAbi\n > = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @deprecated Please use only v2 implementations\n * @class Erc20PeggedVariableCriteriaIncentive\n * @typedef {ERC20PeggedVariableCriteriaIncentive}\n * @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentive>}\n */\nexport class ERC20PeggedVariableCriteriaIncentive extends DeployableTarget<\n ERC20PeggedVariableCriteriaIncentivePayload,\n typeof erc20PeggedVariableCriteriaIncentiveAbi\n> {\n public override readonly abi = erc20PeggedVariableCriteriaIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_INCENTIVE_BASE\n ? { 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE }\n : {}),\n ...(ERC20PeggedVariableCriteriaIncentiveBases 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 readErc20PeggedVariableCriteriaIncentiveOwner(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 readErc20PeggedVariableCriteriaIncentiveCurrentReward(\n this._config,\n {\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 /**\n * Retrieves the maximum reward amount per claim.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The maximum reward amount per claim\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward =\n await readErc20PeggedVariableCriteriaIncentiveGetMaxReward(this._config, {\n ...params,\n address: this.assertValidAddress(),\n });\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures }: GetIncentiveScalarParams,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n const logs = transactionReceipt.logs;\n\n if (logs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n // Decode function data\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n const scalarValue = (decodedEvents[0]?.args as string[])[\n criteria.fieldIndex\n ];\n\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\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 readErc20PeggedVariableCriteriaIncentiveClaims(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 readErc20PeggedVariableCriteriaIncentiveTotalClaimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveClaimed(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 readErc20PeggedVariableCriteriaIncentiveAsset(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 readErc20PeggedVariableCriteriaIncentivePeg(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 readErc20PeggedVariableCriteriaIncentiveReward(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 readErc20PeggedVariableCriteriaIncentiveLimit(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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveClaim(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveClaim(\n this._config,\n request,\n );\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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveClawback(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveClawback(\n this._config,\n request,\n );\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 readErc20PeggedVariableCriteriaIncentiveIsClaimable(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveGetPeg(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 *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteria> {\n try {\n const criteria =\n await readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\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 prepareERC20PeggedVariableCriteriaIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n maxReward: this.payload?.maxReward ?? 0n,\n manager: this.payload?.manager ?? zeroAddress,\n criteria: this.payload?.criteria ?? {\n criteriaType: 0,\n signature: zeroHash,\n fieldIndex: 0,\n targetContract: zeroAddress,\n },\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedVariableCriteriaIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedVariableCriteriaIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedVariableCriteriaIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedVariableCriteriaIncentivePayload(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 ERC20PeggedVariableCriteriaIncentivePayload.\n *\n * @public\n * @param {bigint} signedAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentivePayload.\n */\n public buildClaimData(signedAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'signedAmount' }],\n [signedAmount],\n );\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public async 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 let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n * Use this function instead of `decodeClaimData` if you have reward details.\n *\n * @public\n * @param {Hex} claimData\n * @param {bigint} [reward]\n * @param {bigint} [maxReward]\n * @returns {BigInt} Returns the reward amount from a claim data payload\n */\n public decodeClaimDataWithRewardDetails(\n claimData: Hex,\n reward: bigint,\n maxReward: bigint,\n ) {\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 let claimAmount = signedAmount;\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedVariableCriteriaIncentivePayload}, properly encode a `ERC20PeggedVariableCriteriaIncentivePayload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentivePayload} initialization.\n *\n * @param {ERC20PeggedVariableCriteriaIncentivePayload} 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 * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedVariableCriteriaIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n maxReward = 0n,\n manager = zeroAddress,\n criteria,\n}: ERC20PeggedVariableCriteriaIncentivePayload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\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 { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset,\n peg,\n reward,\n limit,\n manager,\n maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20PeggedVariableCriteriaIncentive","DeployableTarget","erc20PeggedVariableCriteriaIncentiveAbi","params","readErc20PeggedVariableCriteriaIncentiveOwner","readErc20PeggedVariableCriteriaIncentiveCurrentReward","readErc20PeggedVariableCriteriaIncentiveGetMaxReward","chainId","hash","knownSignatures","criteria","SignatureType","transactionReceipt","getTransactionReceipt","CheatCodes","logs","NoMatchingLogsError","eventAbi","decodedEvents","parseEventLogs","scalarValue","_a","DecodedArgsError","e","transaction","getTransaction","func","decodeFunctionData","InvalidCriteriaTypeError","readErc20PeggedVariableCriteriaIncentiveClaims","readErc20PeggedVariableCriteriaIncentiveTotalClaimed","address","readErc20PeggedVariableCriteriaIncentiveClaimed","readErc20PeggedVariableCriteriaIncentiveAsset","readErc20PeggedVariableCriteriaIncentivePeg","readErc20PeggedVariableCriteriaIncentiveReward","readErc20PeggedVariableCriteriaIncentiveLimit","payload","request","result","simulateErc20PeggedVariableCriteriaIncentiveClaim","prepareClaimPayload","writeErc20PeggedVariableCriteriaIncentiveClaim","simulateErc20PeggedVariableCriteriaIncentiveClawback","writeErc20PeggedVariableCriteriaIncentiveClawback","readErc20PeggedVariableCriteriaIncentiveIsClaimable","readErc20PeggedVariableCriteriaIncentiveGetPeg","totalClaimed","limit","readErc20PeggedVariableCriteriaIncentiveGetIncentiveCriteria","IncentiveCriteriaNotFoundError","netAmount","prepareERC20PeggedVariableCriteriaIncentivePayload","zeroAddress","_b","_c","_d","_e","zeroHash","_payload","_options","options","bytecode","amount","encodeAbiParameters","signedAmount","claimData","boostClaimData","decodeAbiParameters","claimAmount","reward","maxReward","parseEther","__vite_import_meta_env__","ERC20PeggedVariableCriteriaIncentiveBases","RegistryType","ERC20PeggedVariableCriteriaIncentive","asset","peg","manager"],"mappings":";;;;;;;;;y2iBA8IaA,IAAN,MAAMA,UAA6CC,EAGxD;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA8C,KAAK,SAAS;AAAA,MACvE,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;AAC9C,WAAO,MAAME;AAAAA,MACX,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAAC;AAAA;AAAA,QAEP,GAAIF;AAAA,MACN;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,aAAaA,GA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