@boostxyz/sdk 0.0.0-alpha.16 → 0.0.0-alpha.18

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 (223) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.cjs.map +1 -1
  3. package/dist/Actions/Action.js +7 -7
  4. package/dist/Actions/ContractAction.d.ts +9 -9
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +12 -12
  7. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.cjs +1 -1
  9. package/dist/Actions/EventAction.cjs.map +1 -1
  10. package/dist/Actions/EventAction.d.ts +32 -49
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +13 -779
  13. package/dist/Actions/EventAction.js.map +1 -1
  14. package/dist/AllowLists/AllowList.cjs +1 -1
  15. package/dist/AllowLists/AllowList.cjs.map +1 -1
  16. package/dist/AllowLists/AllowList.js +3 -3
  17. package/dist/AllowLists/OpenAllowList.d.ts +183 -0
  18. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  20. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  21. package/dist/AllowLists/SimpleAllowList.d.ts +82 -36
  22. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  23. package/dist/AllowLists/SimpleAllowList.js +44 -80
  24. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  25. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  26. package/dist/AllowLists/SimpleDenyList.d.ts +192 -9
  27. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  28. package/dist/AllowLists/SimpleDenyList.js +5 -5
  29. package/dist/Auth/PassthroughAuth.cjs +1 -1
  30. package/dist/Auth/PassthroughAuth.js +1 -1
  31. package/dist/Boost.cjs.map +1 -1
  32. package/dist/Boost.d.ts +18 -0
  33. package/dist/Boost.d.ts.map +1 -1
  34. package/dist/Boost.js.map +1 -1
  35. package/dist/BoostCore-BiPwp6SR.cjs +3 -0
  36. package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
  37. package/dist/BoostCore-C00iqvks.js +1477 -0
  38. package/dist/BoostCore-C00iqvks.js.map +1 -0
  39. package/dist/BoostCore.cjs +1 -2
  40. package/dist/BoostCore.cjs.map +1 -1
  41. package/dist/BoostCore.d.ts +80 -35
  42. package/dist/BoostCore.d.ts.map +1 -1
  43. package/dist/BoostCore.js +29 -1273
  44. package/dist/BoostCore.js.map +1 -1
  45. package/dist/BoostRegistry.cjs +1 -1
  46. package/dist/BoostRegistry.cjs.map +1 -1
  47. package/dist/BoostRegistry.d.ts +18 -18
  48. package/dist/BoostRegistry.js +36 -36
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.cjs.map +1 -1
  52. package/dist/Budgets/Budget.d.ts.map +1 -1
  53. package/dist/Budgets/Budget.js +2 -2
  54. package/dist/Budgets/Budget.js.map +1 -1
  55. package/dist/Budgets/ManagedBudget.cjs +1 -1
  56. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  57. package/dist/Budgets/ManagedBudget.d.ts +24 -174
  58. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  59. package/dist/Budgets/ManagedBudget.js +76 -298
  60. package/dist/Budgets/ManagedBudget.js.map +1 -1
  61. package/dist/Budgets/VestingBudget.d.ts +181 -77
  62. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  63. package/dist/Deployable/Contract.cjs +1 -1
  64. package/dist/Deployable/Contract.cjs.map +1 -1
  65. package/dist/Deployable/Contract.d.ts +4 -5
  66. package/dist/Deployable/Contract.d.ts.map +1 -1
  67. package/dist/Deployable/Contract.js +4 -5
  68. package/dist/Deployable/Contract.js.map +1 -1
  69. package/dist/Deployable/Deployable.cjs.map +1 -1
  70. package/dist/Deployable/Deployable.d.ts +1 -1
  71. package/dist/Deployable/Deployable.js +1 -1
  72. package/dist/Deployable/Deployable.js.map +1 -1
  73. package/dist/Deployable/DeployableTarget.cjs +1 -1
  74. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  75. package/dist/Deployable/DeployableTarget.d.ts +5 -5
  76. package/dist/Deployable/DeployableTarget.js +10 -10
  77. package/dist/Deployable/DeployableTarget.js.map +1 -1
  78. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  79. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  80. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  81. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  82. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  83. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  84. package/dist/EventAction-BO5WI_5s.js +1355 -0
  85. package/dist/EventAction-BO5WI_5s.js.map +1 -0
  86. package/dist/EventAction-DBDRaG4A.cjs +2 -0
  87. package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
  88. package/dist/{Incentive-CtuAJAjG.js → Incentive-CF7kaz_9.js} +67 -68
  89. package/dist/Incentive-CF7kaz_9.js.map +1 -0
  90. package/dist/{Incentive-CqX3fYEd.cjs → Incentive-Djnzseoj.cjs} +2 -2
  91. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  92. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  93. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  94. package/dist/Incentives/AllowListIncentive.d.ts +12 -12
  95. package/dist/Incentives/AllowListIncentive.js +26 -26
  96. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  97. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  98. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  99. package/dist/Incentives/CGDAIncentive.d.ts +15 -15
  100. package/dist/Incentives/CGDAIncentive.js +25 -25
  101. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  102. package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
  103. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  104. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  105. package/dist/Incentives/ERC20Incentive.d.ts +23 -23
  106. package/dist/Incentives/ERC20Incentive.js +45 -45
  107. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  108. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  109. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  110. package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
  111. package/dist/Incentives/Incentive.cjs +1 -1
  112. package/dist/Incentives/Incentive.d.ts +3 -3
  113. package/dist/Incentives/Incentive.d.ts.map +1 -1
  114. package/dist/Incentives/Incentive.js +3 -3
  115. package/dist/Incentives/PointsIncentive.cjs +1 -1
  116. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  117. package/dist/Incentives/PointsIncentive.d.ts +14 -14
  118. package/dist/Incentives/PointsIncentive.js +20 -20
  119. package/dist/Incentives/PointsIncentive.js.map +1 -1
  120. package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
  121. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  122. package/dist/SimpleDenyList-D9i4rw_F.js +132 -0
  123. package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
  124. package/dist/Validators/SignerValidator.cjs +1 -1
  125. package/dist/Validators/SignerValidator.cjs.map +1 -1
  126. package/dist/Validators/SignerValidator.d.ts +14 -14
  127. package/dist/Validators/SignerValidator.js +25 -25
  128. package/dist/Validators/SignerValidator.js.map +1 -1
  129. package/dist/Validators/Validator.cjs +1 -1
  130. package/dist/Validators/Validator.cjs.map +1 -1
  131. package/dist/Validators/Validator.d.ts +1 -1
  132. package/dist/Validators/Validator.js +6 -6
  133. package/dist/Validators/Validator.js.map +1 -1
  134. package/dist/claiming.cjs.map +1 -1
  135. package/dist/claiming.d.ts +1 -1
  136. package/dist/claiming.js.map +1 -1
  137. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  138. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  139. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  140. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  141. package/dist/deployments-BM42vImE.js +43 -0
  142. package/dist/deployments-BM42vImE.js.map +1 -0
  143. package/dist/deployments-CMdF5uEC.cjs +2 -0
  144. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  145. package/dist/deployments.json +15 -12
  146. package/dist/errors.cjs +1 -1
  147. package/dist/errors.cjs.map +1 -1
  148. package/dist/errors.d.ts +132 -0
  149. package/dist/errors.d.ts.map +1 -1
  150. package/dist/errors.js +122 -36
  151. package/dist/errors.js.map +1 -1
  152. package/dist/generated-B0tk-c9b.cjs +3 -0
  153. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  154. package/dist/{generated-DLMdMwD1.js → generated-B8VWObPa.js} +2350 -1290
  155. package/dist/generated-B8VWObPa.js.map +1 -0
  156. package/dist/index.cjs +1 -1
  157. package/dist/index.d.ts +2 -0
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +134 -122
  160. package/dist/index.js.map +1 -1
  161. package/dist/transfers.cjs.map +1 -1
  162. package/dist/transfers.d.ts +1 -1
  163. package/dist/transfers.js.map +1 -1
  164. package/dist/utils.cjs.map +1 -1
  165. package/dist/utils.d.ts +1 -1
  166. package/dist/utils.js.map +1 -1
  167. package/package.json +12 -5
  168. package/src/Actions/ContractAction.ts +9 -10
  169. package/src/Actions/ERC721MintAction.ts +12 -13
  170. package/src/Actions/EventAction.test.ts +182 -53
  171. package/src/Actions/EventAction.ts +128 -107
  172. package/src/AllowLists/SimpleAllowList.ts +14 -59
  173. package/src/AllowLists/SimpleDenyList.ts +12 -9
  174. package/src/Boost.ts +19 -0
  175. package/src/BoostCore.test.ts +117 -1
  176. package/src/BoostCore.ts +113 -54
  177. package/src/BoostRegistry.ts +18 -18
  178. package/src/Budgets/Budget.ts +1 -2
  179. package/src/Budgets/ManagedBudget.ts +21 -295
  180. package/src/Budgets/VestingBudget.ts +26 -97
  181. package/src/Deployable/Contract.ts +4 -5
  182. package/src/Deployable/Deployable.ts +1 -1
  183. package/src/Deployable/DeployableTarget.ts +5 -5
  184. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  185. package/src/Incentives/AllowListIncentive.ts +12 -12
  186. package/src/Incentives/CGDAIncentive.ts +15 -15
  187. package/src/Incentives/ERC1155Incentive.ts +26 -26
  188. package/src/Incentives/ERC20Incentive.ts +23 -23
  189. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  190. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  191. package/src/Incentives/ERC20VariableIncentive.ts +19 -19
  192. package/src/Incentives/Incentive.ts +6 -5
  193. package/src/Incentives/PointsIncentive.test.ts +21 -21
  194. package/src/Incentives/PointsIncentive.ts +14 -14
  195. package/src/Validators/SignerValidator.ts +14 -14
  196. package/src/Validators/Validator.ts +1 -1
  197. package/src/claiming.ts +1 -1
  198. package/src/errors.ts +165 -0
  199. package/src/index.test.ts +3 -4
  200. package/src/index.ts +2 -0
  201. package/src/transfers.ts +1 -1
  202. package/src/utils.ts +1 -1
  203. package/dist/Budgets/SimpleBudget.d.ts +0 -824
  204. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  205. package/dist/Incentive-CqX3fYEd.cjs.map +0 -1
  206. package/dist/Incentive-CtuAJAjG.js.map +0 -1
  207. package/dist/SimpleDenyList-9UIxZZKP.cjs +0 -2
  208. package/dist/SimpleDenyList-9UIxZZKP.cjs.map +0 -1
  209. package/dist/SimpleDenyList-DGPNc7ov.js +0 -132
  210. package/dist/SimpleDenyList-DGPNc7ov.js.map +0 -1
  211. package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
  212. package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
  213. package/dist/componentInterfaces-Cmg8tUxq.js +0 -13
  214. package/dist/componentInterfaces-Cmg8tUxq.js.map +0 -1
  215. package/dist/deployments-BvFcK_eR.js +0 -40
  216. package/dist/deployments-BvFcK_eR.js.map +0 -1
  217. package/dist/deployments-Ho4PnGCS.cjs +0 -2
  218. package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
  219. package/dist/generated-BLg7yPgI.cjs +0 -3
  220. package/dist/generated-BLg7yPgI.cjs.map +0 -1
  221. package/dist/generated-DLMdMwD1.js.map +0 -1
  222. package/src/Budgets/SimpleBudget.test.ts +0 -152
  223. package/src/Budgets/SimpleBudget.ts +0 -563
package/dist/errors.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class h extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class m extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class y extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class g extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class v extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class f extends Error{constructor(){super("Must supply at least one action step")}}class C extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class A extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class D extends t{constructor(r){super("Field value is undefined",r)}}class I extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class P extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class w extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class F extends t{constructor(r){super("Invalid FilterType provided",r)}}class N extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts")}}class B extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`)}}exports.BoostCoreNoIdentifierEmitted=i;exports.BudgetMustAuthorizeBoostCore=v;exports.ContractAddressRequiredError=d;exports.DecodedArgsMalformedError=A;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=w;exports.FieldValueUndefinedError=D;exports.FunctionDataDecodeError=P;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=m;exports.InvalidNumericalCriteriaError=I;exports.InvalidProtocolChainIdError=B;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=N;exports.NoContractAddressUponReceiptError=h;exports.NoEventActionStepsProvidedError=f;exports.TooManyEventActionStepsProvidedError=C;exports.UnknownTransferPayloadSupplied=g;exports.UnparseableAbiParamError=y;exports.UnrecognizedFilterTypeError=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class g extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class h extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class m extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class v extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class y extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class f extends Error{constructor(){super("Must supply at least one action step")}}class C extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class I extends Error{constructor(r){super(`No known ABI for given signature: ${r}`)}}class A extends Error{constructor(){super("Logs are required for validation")}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class D extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class N extends t{constructor(r){super("Field value is undefined",r)}}class P extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class w extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class F extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class M extends t{constructor(r){super("Invalid FilterType provided",r)}}class B extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"),this.name="NoConnectedChainIdError"}}class U extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`),this.name="InvalidProtocolChainIdError"}}class T extends Error{constructor(r,o="Unable to fetch Incentive Criteria from contract"){super(o+(r?`: ${r.message}`:"")),this.name="IncentiveCriteriaNotFoundError"}}class V extends Error{constructor(r,o=`No logs found for event signature ${r}`){super(o),this.name="NoMatchingLogsError"}}class $ extends Error{constructor(r="unknown",o=`Invalid criteria type ${r}`){super(o),this.name="InvalidCriteriaTypeError"}}class z extends Error{constructor(r="Issue decoding args"){super(r),this.name="DecodedArgsError"}}exports.BoostCoreNoIdentifierEmitted=i;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=d;exports.DecodedArgsError=z;exports.DecodedArgsMalformedError=D;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=F;exports.FieldValueUndefinedError=N;exports.FunctionDataDecodeError=w;exports.IncentiveCriteriaNotFoundError=T;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=h;exports.InvalidCriteriaTypeError=$;exports.InvalidNumericalCriteriaError=P;exports.InvalidProtocolChainIdError=U;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=B;exports.NoContractAddressUponReceiptError=g;exports.NoEventActionStepsProvidedError=f;exports.NoMatchingLogsError=V;exports.TooManyEventActionStepsProvidedError=C;exports.UnknownTransferPayloadSupplied=v;exports.UnparseableAbiParamError=m;exports.UnrecognizedFilterTypeError=M;exports.ValidationAbiMissingError=I;exports.ValidationLogsMissingError=A;
2
2
  //# sourceMappingURL=errors.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.cjs","sources":["../src/errors.ts"],"sourcesContent":["import {\n type AbiEvent,\n type AbiFunction,\n type Hex,\n type Log,\n type WaitForTransactionReceiptReturnType,\n zeroHash,\n} from 'viem';\nimport type { Criteria } from './Actions/EventAction';\nimport type { EventLogs } from './Actions/EventAction';\nimport type { BoostRegistry } from './BoostRegistry';\nimport type { Incentive } from './Incentives/Incentive';\n\n/**\n * This error is thrown during Boost creation if no `BoostCreated` event was emitted.\n *\n * @export\n * @class BoostCoreNoIdentifierEmitted\n * @typedef {BoostCoreNoIdentifierEmitted}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * await boostCore.createBoost(...)\n * } catch(e) {\n * if(e instanceof BoostCoreNoIdentifierEmitted) {}\n * }\n * ```\n */\nexport class BoostCoreNoIdentifierEmitted extends Error {\n /**\n * Creates an instance of BoostCoreNoIdentifierEmitted.\n *\n * @constructor\n */\n constructor() {\n super(`No \"BoostCreated\" log was emitted from which to extract boostId`);\n }\n}\n\n/**\n * This error is thrown when `assertValidAddress` is called, usually because a contract call expects the class to have a valid address attached.\n *\n * @export\n * @class ContractAddressRequiredError\n * @typedef {ContractAddressRequiredError}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * target.assertValidAddress()\n * } catch(e) {\n * if(e instanceof ContractAddressRequiredError) {}\n * }\n */\nexport class ContractAddressRequiredError extends Error {\n /**\n * Creates an instance of ContractAddressRequiredError.\n *\n * @constructor\n */\n constructor() {\n super('Attempted to call contract method without providing an address');\n }\n}\n\n/**\n * This error is thrown when attempting to deploy a contract that has already been deployed, or has an address attached.\n *\n * @export\n * @class DeployableAlreadyDeployedError\n * @typedef {DeployableAlreadyDeployedError}\n * @extends {Error}\n */\nexport class DeployableAlreadyDeployedError extends Error {\n /**\n * The address already attached to the target.\n *\n * @type {string}\n */\n address: string;\n /**\n * Creates an instance of DeployableAlreadyDeployedError.\n *\n * @constructor\n * @param {string} address\n */\n constructor(address: string) {\n super(\n 'Attempted to deploy a contract that already has an address configured',\n );\n this.address = address;\n }\n}\n\n/**\n * You should never see this error if we did our jobs and every target overrides the `buildParameters` method.\n *\n * @export\n * @class DeployableBuildParametersUnspecifiedError\n * @typedef {DeployableBuildParametersUnspecifiedError}\n * @extends {Error}\n */\nexport class DeployableBuildParametersUnspecifiedError extends Error {\n /**\n * Creates an instance of DeployableBuildParametersUnspecifiedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Implementing class did not properly override the `buildParameters` method',\n );\n }\n}\n\n/**\n * This error is thrown when attempting to deploy an `ownable` contract and the owner cannot be ascertained from the initialization payload or configured account.\n *\n * @export\n * @class DeployableUnknownOwnerProvidedError\n * @typedef {DeployableUnknownOwnerProvidedError}\n * @extends {Error}\n */\nexport class DeployableUnknownOwnerProvidedError extends Error {\n /**\n * Creates an instance of DeployableUnknownOwnerProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected an an owner to be provided in configuration or an account to exist on Wagmi config.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid Wagmi configuration on the instance.\n *\n * @export\n * @class DeployableWagmiConfigurationRequiredError\n * @typedef {DeployableWagmiConfigurationRequiredError}\n * @extends {Error}\n */\nexport class DeployableWagmiConfigurationRequiredError extends Error {\n /**\n * Creates an instance of DeployableWagmiConfigurationRequiredError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid initialization payload.\n *\n * @export\n * @class DeployableMissingPayloadError\n * @typedef {DeployableMissingPayloadError}\n * @extends {Error}\n */\nexport class DeployableMissingPayloadError extends Error {\n /**\n * Creates an instance of DeployableMissingPayloadError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid payload to be available either on Deployable or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when we receive a transaction receipt for a contract deployment without a contract address on it.\n *\n * @export\n * @class NoContractAddressUponReceiptError\n * @typedef {NoContractAddressUponReceiptError}\n * @extends {Error}\n */\nexport class NoContractAddressUponReceiptError extends Error {\n /**\n * The raw receipt we receive from [waitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)\n *\n * @public\n * @readonly\n * @type {WaitForTransactionReceiptReturnType}\n */\n public readonly receipt: WaitForTransactionReceiptReturnType;\n /**\n * Creates an instance of NoContractAddressUponReceiptError.\n *\n * @constructor\n * @param {WaitForTransactionReceiptReturnType} receipt\n */\n constructor(receipt: WaitForTransactionReceiptReturnType) {\n super(`Expected a contract address to exist on receipt.`, {\n cause: receipt,\n });\n this.receipt = receipt;\n }\n}\n\n/**\n * This error is thrown when a target address was provided that doesn't match any supported interface for the given registry type.\n * For example, if you try to do `incentiveFromAddress()` with the address of a deployed `SimpleBudget`\n *\n * @export\n * @class InvalidComponentInterfaceError\n * @typedef {InvalidComponentInterfaceError}\n * @extends {Error}\n */\nexport class InvalidComponentInterfaceError extends Error {\n /**\n * Expected interface hashes.\n *\n * @public\n * @readonly\n * @type {Hex[]}\n */\n public readonly expected: Hex[] = [];\n /**\n * The actual interface hash.\n *\n * @public\n * @readonly\n * @type {Hex}\n */\n public readonly received: Hex = zeroHash;\n\n /**\n * Creates an instance of InvalidComponentInterfaceError.\n *\n * @constructor\n * @param {Hex[]} expected\n * @param {Hex} received\n */\n constructor(expected: Hex[], received: Hex) {\n super(`Address provided does not match any expected protocol interface`, {\n cause: { expected, received },\n });\n this.expected = expected;\n this.received = received;\n }\n}\n\n/**\n * This error is thrown when a param is not transparently stored onchain\n *\n * @export\n * @class UnparseableAbiParamError\n * @typedef {UnparseableAbiParamError}\n * @extends {Error}\n */\nexport class UnparseableAbiParamError extends Error {\n /**\n * the param index that is unparseable\n *\n * @type {number}\n */\n input_param_idx: number;\n /**\n * The given event that contains the unparseable param\n *\n * @type {AbiEvent}\n */\n event: AbiEvent;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {number} input_param_idx\n * @param {AbiEvent} event\n */\n constructor(input_param_idx: number, event: AbiEvent) {\n super(\n `Parameter is not transparently stored onchain. Parameter ${input_param_idx} in event ${event.name} cannot be used in an action`,\n { cause: event },\n );\n this.event = event;\n this.input_param_idx = input_param_idx;\n }\n}\n\n/**\n * This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`\n *\n * @see {@link FungibleTransferPayload}\n * @see {@link ERC1155TransferPayload}\n * @export\n * @class UnknownTransferPayloadSupplied\n * @typedef {UnknownTransferPayloadSupplied}\n * @extends {Error}\n */\nexport class UnknownTransferPayloadSupplied extends Error {\n /**\n * The given payload that does not conform to the correct payload shape.\n *\n * @type {unknown}\n */\n received: unknown;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {unknown} received\n */\n constructor(received: unknown) {\n super(\n `Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.`,\n { cause: received },\n );\n this.received = received;\n }\n}\n\n/**\n * This error is thrown during Boost creation when the budget doesn't authorize the Boost Core address.\n *\n * @export\n * @class BudgetMustAuthorizeBoostCore\n * @typedef {BudgetMustAuthorizeBoostCore}\n * @extends {Error}\n */\nexport class BudgetMustAuthorizeBoostCore extends Error {\n /**\n * Creates an instance of BudgetMustAuthorizeBoostCore.\n *\n * @constructor\n * @param {string} boostCoreAddress\n */\n constructor(boostCoreAddress: string) {\n super(\n `Budget needs to explicitly authorize ${boostCoreAddress}. You can retrieve this value from BoostCore.address`,\n );\n }\n}\n\n/**\n * Because this contract is a base implementation, it should not be initialized through the constructor. Instead, it should be cloned and initialized using the {@link BoostRegistry}\n *\n * @export\n * @class MustInitializeBudgetError\n * @typedef {MustInitializeBudgetError}\n * @extends {Error}\n */\nexport class MustInitializeBudgetError extends Error {\n /**\n * Creates an instance of MustInitializeBudgetError.\n */\n constructor() {\n super(`Budgets must be preinitialized before being used with a new Boost`);\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n * The protocol doesn't allow this.\n *\n * @export\n * @class IncentiveNotCloneableError\n * @typedef {IncentiveNotCloneableError}\n * @extends {Error}\n */\nexport class IncentiveNotCloneableError extends Error {\n /**\n * Creates an instance of IncentiveNotCloneableError.\n *\n * @constructor\n * @param {Incentive} incentive\n */\n constructor(incentive: Incentive) {\n super(`Incentive not cloneable: ${incentive.constructor.name}`);\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and no action steps are provided\n *\n * @export\n * @class NoEventActionStepsProvidedError\n * @typedef {NoEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class NoEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of NoEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super('Must supply at least one action step');\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and > 4 steps are provided\n *\n * @export\n * @class TooManyEventActionStepsProvidedError\n * @typedef {TooManyEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class TooManyEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of TooManyEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Cannot supply more than 4 action steps with current protocol version',\n );\n }\n}\n\n/**\n * Function action validation context to help debug other validation errors\n *\n * @interface FunctionActionValidationMeta\n * @typedef {FunctionActionValidationMeta}\n */\ninterface FunctionActionValidationMeta {\n decodedArgs: readonly (string | bigint)[];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n/**\n * Event action validation context to help debug other validation errors\n *\n * @interface EventActionValidationMeta\n * @typedef {EventActionValidationMeta}\n */\ninterface EventActionValidationMeta {\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n\n/**\n * The base error thrown during event action validation extended by more specific validation errors.\n * Instantiated with relevent context data for more in depth debugging.\n *\n * @export\n * @class FieldActionValidationError\n * @typedef {FieldActionValidationError}\n * @extends {Error}\n */\nexport class FieldActionValidationError extends Error {\n /**\n * The function input arguments being validated against\n *\n * @type {decodedArgs}\n */\n decodedArgs?: readonly (string | bigint)[];\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n /**\n * Creates an instance of FieldActionValidationError.\n *\n * @constructor\n * @param {string} message\n * @param {EventActionValidationMeta} param0\n * @param {*} param0.fieldValue\n * @param {Criteria} param0.criteria\n * @param {Log} param0.log\n */\n constructor(\n message: string,\n {\n fieldValue,\n criteria,\n ...args\n }: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(message);\n this.fieldValue = fieldValue;\n this.criteria = criteria;\n\n switch (true) {\n case 'log' in args:\n this.log = args.log;\n break;\n case 'decodedArgs' in args:\n this.decodedArgs = args.decodedArgs;\n }\n }\n}\n\n/**\n * Thrown when abi-decoded args on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class DecodedArgsMalformedError extends FieldActionValidationError {\n /**\n * Creates an instance of DecodedArgsUndefinedError.\n *\n * @constructor\n * @param {DecodedArgsMalformedError} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Decoded Args are malformed; Check which params are indexed',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when field value on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueUndefinedError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueUndefinedError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Field value is undefined', metadata);\n }\n}\n\n/**\n * Thrown when a filter type is using a numerical operator but field type is not numerical\n *\n * @export\n * @class InvalidNumericalCriteriaError\n * @typedef {InvalidNumericalCriteriaError}\n * @extends {FieldActionValidationError}\n */\nexport class InvalidNumericalCriteriaError extends FieldActionValidationError {\n /**\n * Creates an instance of InvalidNumericalCriteria.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Numerical comparisons cannot be used with non-numerical criteria',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when decoding function data fails.\n *\n * @export\n * @class FunctionDataDecodeError\n * @typedef {FunctionDataDecodeError}\n * @extends {Error}\n */\nexport class FunctionDataDecodeError extends Error {\n public abi: AbiFunction[];\n public originalError: Error;\n\n /**\n * Creates an instance of FunctionDataDecodeError.\n *\n * @constructor\n * @param {AbiFunction[]} abi - The ABI of the function.\n * @param {Error} originalError - The original error that was thrown.\n */\n constructor(abi: AbiFunction[], originalError: Error) {\n super(`Failed to decode function data: ${originalError.message}`);\n this.name = 'FunctionDataDecodeError';\n this.abi = abi;\n this.originalError = originalError;\n }\n}\n\n/**\n * Thrown when an the log's field value is being compared a field type that isn't bytes or string during event action validation\n *\n * @export\n * @class FieldValueNotComparableError\n * @typedef {FieldValueNotComparableError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueNotComparableError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueNotComparableError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Filter can only be used with bytes or string field type', metadata);\n }\n}\n\n/**\n * Thrown when an invalid filter type enum was provided event action validation.\n *\n * @export\n * @class UnrecognizedFilterTypeError\n * @typedef {UnrecognizedFilterTypeError}\n * @extends {FieldActionValidationError}\n */\nexport class UnrecognizedFilterTypeError extends FieldActionValidationError {\n /**\n * Creates an instance of UnrecognizedFilterTypeError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Invalid FilterType provided', metadata);\n }\n}\n\nexport class NoConnectedChainIdError extends Error {\n constructor() {\n super(\n 'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',\n );\n }\n}\n\nexport class InvalidProtocolChainIdError extends Error {\n constructor(chainId: number, validChainIds: number[]) {\n super(\n `Provided Wagmi configuration supplied a \"chainId\" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,\n );\n }\n}\n"],"names":["BoostCoreNoIdentifierEmitted","ContractAddressRequiredError","DeployableAlreadyDeployedError","address","DeployableBuildParametersUnspecifiedError","DeployableUnknownOwnerProvidedError","DeployableWagmiConfigurationRequiredError","DeployableMissingPayloadError","NoContractAddressUponReceiptError","receipt","InvalidComponentInterfaceError","expected","received","zeroHash","UnparseableAbiParamError","input_param_idx","event","UnknownTransferPayloadSupplied","BudgetMustAuthorizeBoostCore","boostCoreAddress","MustInitializeBudgetError","IncentiveNotCloneableError","incentive","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","FieldActionValidationError","message","fieldValue","criteria","args","DecodedArgsMalformedError","metadata","FieldValueUndefinedError","InvalidNumericalCriteriaError","FunctionDataDecodeError","abi","originalError","FieldValueNotComparableError","UnrecognizedFilterTypeError","NoConnectedChainIdError","InvalidProtocolChainIdError","chainId","validChainIds"],"mappings":"wGA6BO,MAAMA,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,iEAAiE,CACzE,CACF,CAiBO,MAAMC,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,gEAAgE,CACxE,CACF,CAUO,MAAMC,UAAuC,KAAM,CAaxD,YAAYC,EAAiB,CAC3B,MACE,uEAAA,EAEF,KAAK,QAAUA,CACjB,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,2EAAA,CAEJ,CACF,CAUO,MAAMC,UAA4C,KAAM,CAM7D,aAAc,CACZ,MACE,8FAAA,CAEJ,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,sGAAA,CAEJ,CACF,CAUO,MAAMC,UAAsC,KAAM,CAMvD,aAAc,CACZ,MACE,yFAAA,CAEJ,CACF,CAUO,MAAMC,UAA0C,KAAM,CAe3D,YAAYC,EAA8C,CACxD,MAAM,mDAAoD,CACxD,MAAOA,CAAA,CACR,EACD,KAAK,QAAUA,CACjB,CACF,CAWO,MAAMC,UAAuC,KAAM,CAyBxD,YAAYC,EAAiBC,EAAe,CAC1C,MAAM,kEAAmE,CACvE,MAAO,CAAE,SAAAD,EAAU,SAAAC,CAAS,CAAA,CAC7B,EApBH,KAAgB,SAAkB,GAQlC,KAAgB,SAAgBC,WAa9B,KAAK,SAAWF,EAChB,KAAK,SAAWC,CAClB,CACF,CAUO,MAAME,UAAiC,KAAM,CAoBlD,YAAYC,EAAyBC,EAAiB,CACpD,MACE,4DAA4DD,CAAe,aAAaC,EAAM,IAAI,+BAClG,CAAE,MAAOA,CAAM,CAAA,EAE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,KAAK,IAAMD,EACX,KAAK,cAAgBC,CACvB,CACF,CAUO,MAAMC,UAAqCZ,CAA2B,CAO3E,YACEM,EACA,CACA,MAAM,0DAA2DA,CAAQ,CAC3E,CACF,CAUO,MAAMO,UAAoCb,CAA2B,CAO1E,YACEM,EACA,CACA,MAAM,8BAA+BA,CAAQ,CAC/C,CACF,CAEO,MAAMQ,UAAgC,KAAM,CACjD,aAAc,CACZ,MACE,yGAAA,CAEJ,CACF,CAEO,MAAMC,UAAoC,KAAM,CACrD,YAAYC,EAAiBC,EAAyB,CACpD,MACE,+FAA+FD,CAAO,2BAA2BC,CAAa,EAAA,CAElJ,CACF"}
1
+ {"version":3,"file":"errors.cjs","sources":["../src/errors.ts"],"sourcesContent":["import {\n type AbiEvent,\n type AbiFunction,\n type Hex,\n type Log,\n type WaitForTransactionReceiptReturnType,\n zeroHash,\n} from 'viem';\nimport type { Criteria } from './Actions/EventAction';\nimport type { EventLogs } from './Actions/EventAction';\nimport type { BoostRegistry } from './BoostRegistry';\nimport type { Incentive } from './Incentives/Incentive';\n\n/**\n * This error is thrown during Boost creation if no `BoostCreated` event was emitted.\n *\n * @export\n * @class BoostCoreNoIdentifierEmitted\n * @typedef {BoostCoreNoIdentifierEmitted}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * await boostCore.createBoost(...)\n * } catch(e) {\n * if(e instanceof BoostCoreNoIdentifierEmitted) {}\n * }\n * ```\n */\nexport class BoostCoreNoIdentifierEmitted extends Error {\n /**\n * Creates an instance of BoostCoreNoIdentifierEmitted.\n *\n * @constructor\n */\n constructor() {\n super(`No \"BoostCreated\" log was emitted from which to extract boostId`);\n }\n}\n\n/**\n * This error is thrown when `assertValidAddress` is called, usually because a contract call expects the class to have a valid address attached.\n *\n * @export\n * @class ContractAddressRequiredError\n * @typedef {ContractAddressRequiredError}\n * @extends {Error}\n * @example\n * ```ts\n * try {\n * target.assertValidAddress()\n * } catch(e) {\n * if(e instanceof ContractAddressRequiredError) {}\n * }\n */\nexport class ContractAddressRequiredError extends Error {\n /**\n * Creates an instance of ContractAddressRequiredError.\n *\n * @constructor\n */\n constructor() {\n super('Attempted to call contract method without providing an address');\n }\n}\n\n/**\n * This error is thrown when attempting to deploy a contract that has already been deployed, or has an address attached.\n *\n * @export\n * @class DeployableAlreadyDeployedError\n * @typedef {DeployableAlreadyDeployedError}\n * @extends {Error}\n */\nexport class DeployableAlreadyDeployedError extends Error {\n /**\n * The address already attached to the target.\n *\n * @type {string}\n */\n address: string;\n /**\n * Creates an instance of DeployableAlreadyDeployedError.\n *\n * @constructor\n * @param {string} address\n */\n constructor(address: string) {\n super(\n 'Attempted to deploy a contract that already has an address configured',\n );\n this.address = address;\n }\n}\n\n/**\n * You should never see this error if we did our jobs and every target overrides the `buildParameters` method.\n *\n * @export\n * @class DeployableBuildParametersUnspecifiedError\n * @typedef {DeployableBuildParametersUnspecifiedError}\n * @extends {Error}\n */\nexport class DeployableBuildParametersUnspecifiedError extends Error {\n /**\n * Creates an instance of DeployableBuildParametersUnspecifiedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Implementing class did not properly override the `buildParameters` method',\n );\n }\n}\n\n/**\n * This error is thrown when attempting to deploy an `ownable` contract and the owner cannot be ascertained from the initialization payload or configured account.\n *\n * @export\n * @class DeployableUnknownOwnerProvidedError\n * @typedef {DeployableUnknownOwnerProvidedError}\n * @extends {Error}\n */\nexport class DeployableUnknownOwnerProvidedError extends Error {\n /**\n * Creates an instance of DeployableUnknownOwnerProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected an an owner to be provided in configuration or an account to exist on Wagmi config.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid Wagmi configuration on the instance.\n *\n * @export\n * @class DeployableWagmiConfigurationRequiredError\n * @typedef {DeployableWagmiConfigurationRequiredError}\n * @extends {Error}\n */\nexport class DeployableWagmiConfigurationRequiredError extends Error {\n /**\n * Creates an instance of DeployableWagmiConfigurationRequiredError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when deploying a contract with no valid initialization payload.\n *\n * @export\n * @class DeployableMissingPayloadError\n * @typedef {DeployableMissingPayloadError}\n * @extends {Error}\n */\nexport class DeployableMissingPayloadError extends Error {\n /**\n * Creates an instance of DeployableMissingPayloadError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Expected a valid payload to be available either on Deployable or as argument to deploy.',\n );\n }\n}\n\n/**\n * This error is thrown when we receive a transaction receipt for a contract deployment without a contract address on it.\n *\n * @export\n * @class NoContractAddressUponReceiptError\n * @typedef {NoContractAddressUponReceiptError}\n * @extends {Error}\n */\nexport class NoContractAddressUponReceiptError extends Error {\n /**\n * The raw receipt we receive from [waitForTransactionReceipt](https://v1.viem.sh/docs/actions/public/waitForTransactionReceipt.html#waitfortransactionreceipt)\n *\n * @public\n * @readonly\n * @type {WaitForTransactionReceiptReturnType}\n */\n public readonly receipt: WaitForTransactionReceiptReturnType;\n /**\n * Creates an instance of NoContractAddressUponReceiptError.\n *\n * @constructor\n * @param {WaitForTransactionReceiptReturnType} receipt\n */\n constructor(receipt: WaitForTransactionReceiptReturnType) {\n super(`Expected a contract address to exist on receipt.`, {\n cause: receipt,\n });\n this.receipt = receipt;\n }\n}\n\n/**\n * This error is thrown when a target address was provided that doesn't match any supported interface for the given registry type.\n * For example, if you try to do `incentiveFromAddress()` with the address of a deployed `SimpleBudget`\n *\n * @export\n * @class InvalidComponentInterfaceError\n * @typedef {InvalidComponentInterfaceError}\n * @extends {Error}\n */\nexport class InvalidComponentInterfaceError extends Error {\n /**\n * Expected interface hashes.\n *\n * @public\n * @readonly\n * @type {Hex[]}\n */\n public readonly expected: Hex[] = [];\n /**\n * The actual interface hash.\n *\n * @public\n * @readonly\n * @type {Hex}\n */\n public readonly received: Hex = zeroHash;\n\n /**\n * Creates an instance of InvalidComponentInterfaceError.\n *\n * @constructor\n * @param {Hex[]} expected\n * @param {Hex} received\n */\n constructor(expected: Hex[], received: Hex) {\n super(`Address provided does not match any expected protocol interface`, {\n cause: { expected, received },\n });\n this.expected = expected;\n this.received = received;\n }\n}\n\n/**\n * This error is thrown when a param is not transparently stored onchain\n *\n * @export\n * @class UnparseableAbiParamError\n * @typedef {UnparseableAbiParamError}\n * @extends {Error}\n */\nexport class UnparseableAbiParamError extends Error {\n /**\n * the param index that is unparseable\n *\n * @type {number}\n */\n input_param_idx: number;\n /**\n * The given event that contains the unparseable param\n *\n * @type {AbiEvent}\n */\n event: AbiEvent;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {number} input_param_idx\n * @param {AbiEvent} event\n */\n constructor(input_param_idx: number, event: AbiEvent) {\n super(\n `Parameter is not transparently stored onchain. Parameter ${input_param_idx} in event ${event.name} cannot be used in an action`,\n { cause: event },\n );\n this.event = event;\n this.input_param_idx = input_param_idx;\n }\n}\n\n/**\n * This error is thrown when attempting a Budget transfer and arguments aren't of the type `FungibleTransferPayload` or `ERC1155TransferPayload`\n *\n * @see {@link FungibleTransferPayload}\n * @see {@link ERC1155TransferPayload}\n * @export\n * @class UnknownTransferPayloadSupplied\n * @typedef {UnknownTransferPayloadSupplied}\n * @extends {Error}\n */\nexport class UnknownTransferPayloadSupplied extends Error {\n /**\n * The given payload that does not conform to the correct payload shape.\n *\n * @type {unknown}\n */\n received: unknown;\n /**\n * Creates an instance of UnknownTransferPayloadSupplied.\n *\n * @constructor\n * @param {unknown} received\n */\n constructor(received: unknown) {\n super(\n `Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.`,\n { cause: received },\n );\n this.received = received;\n }\n}\n\n/**\n * This error is thrown during Boost creation when the budget doesn't authorize the Boost Core address.\n *\n * @export\n * @class BudgetMustAuthorizeBoostCore\n * @typedef {BudgetMustAuthorizeBoostCore}\n * @extends {Error}\n */\nexport class BudgetMustAuthorizeBoostCore extends Error {\n /**\n * Creates an instance of BudgetMustAuthorizeBoostCore.\n *\n * @constructor\n * @param {string} boostCoreAddress\n */\n constructor(boostCoreAddress: string) {\n super(\n `Budget needs to explicitly authorize ${boostCoreAddress}. You can retrieve this value from BoostCore.address`,\n );\n }\n}\n\n/**\n * Because this contract is a base implementation, it should not be initialized through the constructor. Instead, it should be cloned and initialized using the {@link BoostRegistry}\n *\n * @export\n * @class MustInitializeBudgetError\n * @typedef {MustInitializeBudgetError}\n * @extends {Error}\n */\nexport class MustInitializeBudgetError extends Error {\n /**\n * Creates an instance of MustInitializeBudgetError.\n */\n constructor() {\n super(`Budgets must be preinitialized before being used with a new Boost`);\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n * The protocol doesn't allow this.\n *\n * @export\n * @class IncentiveNotCloneableError\n * @typedef {IncentiveNotCloneableError}\n * @extends {Error}\n */\nexport class IncentiveNotCloneableError extends Error {\n /**\n * Creates an instance of IncentiveNotCloneableError.\n *\n * @constructor\n * @param {Incentive} incentive\n */\n constructor(incentive: Incentive) {\n super(`Incentive not cloneable: ${incentive.constructor.name}`);\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and no action steps are provided\n *\n * @export\n * @class NoEventActionStepsProvidedError\n * @typedef {NoEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class NoEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of NoEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super('Must supply at least one action step');\n }\n}\n\n/**\n * Thrown when encoding an EventAction payload and > 4 steps are provided\n *\n * @export\n * @class TooManyEventActionStepsProvidedError\n * @typedef {TooManyEventActionStepsProvidedError}\n * @extends {Error}\n */\nexport class TooManyEventActionStepsProvidedError extends Error {\n /**\n * Creates an instance of TooManyEventActionStepsProvidedError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Cannot supply more than 4 action steps with current protocol version',\n );\n }\n}\n\n/**\n * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.\n *\n * @export\n * @class ValidationAbiMissingError\n * @typedef {ValidationAbiMissingError}\n * @extends {Error}\n */\nexport class ValidationAbiMissingError extends Error {\n /**\n * Creates an instance of ValidationAbiMissingError.\n *\n * @constructor\n * @param {Hex} signature\n */\n constructor(signature: Hex) {\n super(`No known ABI for given signature: ${signature}`);\n }\n}\n\n/**\n * Thrown when missing logs for validating action steps.\n *\n * @export\n * @class ValidationLogsMissingError\n * @typedef {ValidationLogsMissingError}\n * @extends {Error}\n */\nexport class ValidationLogsMissingError extends Error {\n /**\n * Creates an instance of ValidationLogsMissingError.\n *\n * @constructor\n */\n constructor() {\n super('Logs are required for validation');\n }\n}\n\n/**\n * Function action validation context to help debug other validation errors\n *\n * @interface FunctionActionValidationMeta\n * @typedef {FunctionActionValidationMeta}\n */\ninterface FunctionActionValidationMeta {\n decodedArgs: readonly (string | bigint)[];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n/**\n * Event action validation context to help debug other validation errors\n *\n * @interface EventActionValidationMeta\n * @typedef {EventActionValidationMeta}\n */\ninterface EventActionValidationMeta {\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n}\n\n/**\n * The base error thrown during event action validation extended by more specific validation errors.\n * Instantiated with relevent context data for more in depth debugging.\n *\n * @export\n * @class FieldActionValidationError\n * @typedef {FieldActionValidationError}\n * @extends {Error}\n */\nexport class FieldActionValidationError extends Error {\n /**\n * The function input arguments being validated against\n *\n * @type {decodedArgs}\n */\n decodedArgs?: readonly (string | bigint)[];\n /**\n * The viem log being validated against\n *\n * @type {Log}\n */\n log?: EventLogs[0];\n /**\n * The value pulled off the log being validated against\n *\n * @type {*}\n * biome-ignore lint/suspicious/noExplicitAny: this can be a few different types based on what the log emits\n */\n fieldValue: any;\n /**\n * The criteria being used to compare during validation\n *\n * @type {Criteria}\n */\n criteria: Criteria;\n /**\n * Creates an instance of FieldActionValidationError.\n *\n * @constructor\n * @param {string} message\n * @param {EventActionValidationMeta} param0\n * @param {*} param0.fieldValue\n * @param {Criteria} param0.criteria\n * @param {Log} param0.log\n */\n constructor(\n message: string,\n {\n fieldValue,\n criteria,\n ...args\n }: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(message);\n this.fieldValue = fieldValue;\n this.criteria = criteria;\n\n switch (true) {\n case 'log' in args:\n this.log = args.log;\n break;\n case 'decodedArgs' in args:\n this.decodedArgs = args.decodedArgs;\n }\n }\n}\n\n/**\n * Thrown when abi-decoded args on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class DecodedArgsMalformedError extends FieldActionValidationError {\n /**\n * Creates an instance of DecodedArgsUndefinedError.\n *\n * @constructor\n * @param {DecodedArgsMalformedError} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Decoded Args are malformed; Check which params are indexed',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when field value on log is undefined\n *\n * @export\n * @class FieldValueUndefinedError\n * @typedef {FieldValueUndefinedError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueUndefinedError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueUndefinedError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Field value is undefined', metadata);\n }\n}\n\n/**\n * Thrown when a filter type is using a numerical operator but field type is not numerical\n *\n * @export\n * @class InvalidNumericalCriteriaError\n * @typedef {InvalidNumericalCriteriaError}\n * @extends {FieldActionValidationError}\n */\nexport class InvalidNumericalCriteriaError extends FieldActionValidationError {\n /**\n * Creates an instance of InvalidNumericalCriteria.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super(\n 'Numerical comparisons cannot be used with non-numerical criteria',\n metadata,\n );\n }\n}\n\n/**\n * Thrown when decoding function data fails.\n *\n * @export\n * @class FunctionDataDecodeError\n * @typedef {FunctionDataDecodeError}\n * @extends {Error}\n */\nexport class FunctionDataDecodeError extends Error {\n public abi: AbiFunction[];\n public originalError: Error;\n\n /**\n * Creates an instance of FunctionDataDecodeError.\n *\n * @constructor\n * @param {AbiFunction[]} abi - The ABI of the function.\n * @param {Error} originalError - The original error that was thrown.\n */\n constructor(abi: AbiFunction[], originalError: Error) {\n super(`Failed to decode function data: ${originalError.message}`);\n this.name = 'FunctionDataDecodeError';\n this.abi = abi;\n this.originalError = originalError;\n }\n}\n\n/**\n * Thrown when an the log's field value is being compared a field type that isn't bytes or string during event action validation\n *\n * @export\n * @class FieldValueNotComparableError\n * @typedef {FieldValueNotComparableError}\n * @extends {FieldActionValidationError}\n */\nexport class FieldValueNotComparableError extends FieldActionValidationError {\n /**\n * Creates an instance of FieldValueNotComparableError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Filter can only be used with bytes or string field type', metadata);\n }\n}\n\n/**\n * Thrown when an invalid filter type enum was provided event action validation.\n *\n * @export\n * @class UnrecognizedFilterTypeError\n * @typedef {UnrecognizedFilterTypeError}\n * @extends {FieldActionValidationError}\n */\nexport class UnrecognizedFilterTypeError extends FieldActionValidationError {\n /**\n * Creates an instance of UnrecognizedFilterTypeError.\n *\n * @constructor\n * @param {EventActionValidationMeta} metadata\n */\n constructor(\n metadata: EventActionValidationMeta | FunctionActionValidationMeta,\n ) {\n super('Invalid FilterType provided', metadata);\n }\n}\n\n/**\n * Thrown when no chain ID is provided in the Wagmi configuration.\n *\n * @export\n * @class NoConnectedChainIdError\n * @typedef {NoConnectedChainIdError}\n * @extends {Error}\n */\nexport class NoConnectedChainIdError extends Error {\n /**\n * Creates an instance of NoConnectedChainIdError.\n *\n * @constructor\n */\n constructor() {\n super(\n 'Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts',\n );\n this.name = 'NoConnectedChainIdError';\n }\n}\n\n/**\n * Thrown when an invalid chain ID is provided that doesn't match any deployed protocol.\n *\n * @export\n * @class InvalidProtocolChainIdError\n * @typedef {InvalidProtocolChainIdError}\n * @extends {Error}\n */\nexport class InvalidProtocolChainIdError extends Error {\n /**\n * Creates an instance of InvalidProtocolChainIdError.\n *\n * @constructor\n * @param {number} chainId - The chain ID provided in the configuration.\n * @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.\n */\n constructor(chainId: number, validChainIds: number[]) {\n super(\n `Provided Wagmi configuration supplied a \"chainId\" where protocol is not deployed, provided: ${chainId}, but valid chains are: ${validChainIds}`,\n );\n this.name = 'InvalidProtocolChainIdError';\n }\n}\n\n/**\n * Thrown when the incentive criteria cannot be fetched from the contract.\n *\n * @export\n * @class IncentiveCriteriaNotFoundError\n * @typedef {IncentiveCriteriaNotFoundError}\n * @extends {Error}\n */\nexport class IncentiveCriteriaNotFoundError extends Error {\n /**\n * Creates an instance of IncentiveCriteriaNotFoundError.\n *\n * @constructor\n * @param {Error} [e] - Optional error object for further context.\n * @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.\n */\n constructor(\n e?: Error,\n message = 'Unable to fetch Incentive Criteria from contract',\n ) {\n super(message + (e ? `: ${e.message}` : ''));\n this.name = 'IncentiveCriteriaNotFoundError';\n }\n}\n\n/**\n * Thrown when no matching logs are found for a given event signature.\n *\n * @export\n * @class NoMatchingLogsError\n * @typedef {NoMatchingLogsError}\n * @extends {Error}\n */\nexport class NoMatchingLogsError extends Error {\n /**\n * Creates an instance of NoMatchingLogsError.\n *\n * @constructor\n * @param {string} signature - The event signature for which logs are being searched.\n * @param {string} [message] - Optional custom error message.\n */\n constructor(\n signature: string,\n message = `No logs found for event signature ${signature}`,\n ) {\n super(message);\n this.name = 'NoMatchingLogsError';\n }\n}\n\n/**\n * Thrown when an invalid criteria type is provided.\n *\n * @export\n * @class InvalidCriteriaTypeError\n * @typedef {InvalidCriteriaTypeError}\n * @extends {Error}\n */\nexport class InvalidCriteriaTypeError extends Error {\n /**\n * Creates an instance of InvalidCriteriaTypeError.\n *\n * @constructor\n * @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.\n * @param {string} [message] - Optional custom error message.\n */\n constructor(\n criteriaType = 'unknown',\n message = `Invalid criteria type ${criteriaType}`,\n ) {\n super(message);\n this.name = 'InvalidCriteriaTypeError';\n }\n}\n\n/**\n * Thrown when decoding function arguments fails.\n *\n * @export\n * @class DecodedArgsError\n * @typedef {DecodedArgsError}\n * @extends {Error}\n */\nexport class DecodedArgsError extends Error {\n /**\n * Creates an instance of DecodedArgsError.\n *\n * @constructor\n * @param {string} [message='Issue decoding args'] - Custom error message.\n */\n constructor(message = 'Issue decoding args') {\n super(message);\n this.name = 'DecodedArgsError';\n }\n}\n"],"names":["BoostCoreNoIdentifierEmitted","ContractAddressRequiredError","DeployableAlreadyDeployedError","address","DeployableBuildParametersUnspecifiedError","DeployableUnknownOwnerProvidedError","DeployableWagmiConfigurationRequiredError","DeployableMissingPayloadError","NoContractAddressUponReceiptError","receipt","InvalidComponentInterfaceError","expected","received","zeroHash","UnparseableAbiParamError","input_param_idx","event","UnknownTransferPayloadSupplied","BudgetMustAuthorizeBoostCore","boostCoreAddress","MustInitializeBudgetError","IncentiveNotCloneableError","incentive","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","ValidationAbiMissingError","signature","ValidationLogsMissingError","FieldActionValidationError","message","fieldValue","criteria","args","DecodedArgsMalformedError","metadata","FieldValueUndefinedError","InvalidNumericalCriteriaError","FunctionDataDecodeError","abi","originalError","FieldValueNotComparableError","UnrecognizedFilterTypeError","NoConnectedChainIdError","InvalidProtocolChainIdError","chainId","validChainIds","IncentiveCriteriaNotFoundError","e","NoMatchingLogsError","InvalidCriteriaTypeError","criteriaType","DecodedArgsError"],"mappings":"wGA6BO,MAAMA,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,iEAAiE,CACzE,CACF,CAiBO,MAAMC,UAAqC,KAAM,CAMtD,aAAc,CACZ,MAAM,gEAAgE,CACxE,CACF,CAUO,MAAMC,UAAuC,KAAM,CAaxD,YAAYC,EAAiB,CAC3B,MACE,uEAAA,EAEF,KAAK,QAAUA,CACjB,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,2EAAA,CAEJ,CACF,CAUO,MAAMC,UAA4C,KAAM,CAM7D,aAAc,CACZ,MACE,8FAAA,CAEJ,CACF,CAUO,MAAMC,UAAkD,KAAM,CAMnE,aAAc,CACZ,MACE,sGAAA,CAEJ,CACF,CAUO,MAAMC,UAAsC,KAAM,CAMvD,aAAc,CACZ,MACE,yFAAA,CAEJ,CACF,CAUO,MAAMC,UAA0C,KAAM,CAe3D,YAAYC,EAA8C,CACxD,MAAM,mDAAoD,CACxD,MAAOA,CAAA,CACR,EACD,KAAK,QAAUA,CACjB,CACF,CAWO,MAAMC,UAAuC,KAAM,CAyBxD,YAAYC,EAAiBC,EAAe,CAC1C,MAAM,kEAAmE,CACvE,MAAO,CAAE,SAAAD,EAAU,SAAAC,CAAS,CAAA,CAC7B,EApBH,KAAgB,SAAkB,GAQlC,KAAgB,SAAgBC,WAa9B,KAAK,SAAWF,EAChB,KAAK,SAAWC,CAClB,CACF,CAUO,MAAME,UAAiC,KAAM,CAoBlD,YAAYC,EAAyBC,EAAiB,CACpD,MACE,4DAA4DD,CAAe,aAAaC,EAAM,IAAI,+BAClG,CAAE,MAAOA,CAAM,CAAA,EAEjB,KAAK,MAAQA,EACb,KAAK,gBAAkBD,CACzB,CACF,CAYO,MAAME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AAgC,KAAM,CAWjD,YAAYC,EAAoBC,EAAsB,CAC9C,MAAA,mCAAmCA,EAAc,OAAO,EAAE,EAChE,KAAK,KAAO,0BACZ,KAAK,IAAMD,EACX,KAAK,cAAgBC,CACvB,CACF,CAUO,MAAMC,UAAqCZ,CAA2B,CAO3E,YACEM,EACA,CACA,MAAM,0DAA2DA,CAAQ,CAC3E,CACF,CAUO,MAAMO,UAAoCb,CAA2B,CAO1E,YACEM,EACA,CACA,MAAM,8BAA+BA,CAAQ,CAC/C,CACF,CAUO,MAAMQ,UAAgC,KAAM,CAMjD,aAAc,CACZ,MACE,yGAAA,EAEF,KAAK,KAAO,yBACd,CACF,CAUO,MAAMC,UAAoC,KAAM,CAQrD,YAAYC,EAAiBC,EAAyB,CACpD,MACE,+FAA+FD,CAAO,2BAA2BC,CAAa,EAAA,EAEhJ,KAAK,KAAO,6BACd,CACF,CAUO,MAAMC,UAAuC,KAAM,CAQxD,YACEC,EACAlB,EAAU,mDACV,CACA,MAAMA,GAAWkB,EAAI,KAAKA,EAAE,OAAO,GAAK,GAAG,EAC3C,KAAK,KAAO,gCACd,CACF,CAUO,MAAMC,UAA4B,KAAM,CAQ7C,YACEtB,EACAG,EAAU,qCAAqCH,CAAS,GACxD,CACA,MAAMG,CAAO,EACb,KAAK,KAAO,qBACd,CACF,CAUO,MAAMoB,UAAiC,KAAM,CAQlD,YACEC,EAAe,UACfrB,EAAU,yBAAyBqB,CAAY,GAC/C,CACA,MAAMrB,CAAO,EACb,KAAK,KAAO,0BACd,CACF,CAUO,MAAMsB,UAAyB,KAAM,CAO1C,YAAYtB,EAAU,sBAAuB,CAC3C,MAAMA,CAAO,EACb,KAAK,KAAO,kBACd,CACF"}
package/dist/errors.d.ts CHANGED
@@ -332,6 +332,39 @@ export declare class TooManyEventActionStepsProvidedError extends Error {
332
332
  */
333
333
  constructor();
334
334
  }
335
+ /**
336
+ * The error is thrown when trying to reuse an existing deployed Incentive that isn't a base implementation.
337
+ *
338
+ * @export
339
+ * @class ValidationAbiMissingError
340
+ * @typedef {ValidationAbiMissingError}
341
+ * @extends {Error}
342
+ */
343
+ export declare class ValidationAbiMissingError extends Error {
344
+ /**
345
+ * Creates an instance of ValidationAbiMissingError.
346
+ *
347
+ * @constructor
348
+ * @param {Hex} signature
349
+ */
350
+ constructor(signature: Hex);
351
+ }
352
+ /**
353
+ * Thrown when missing logs for validating action steps.
354
+ *
355
+ * @export
356
+ * @class ValidationLogsMissingError
357
+ * @typedef {ValidationLogsMissingError}
358
+ * @extends {Error}
359
+ */
360
+ export declare class ValidationLogsMissingError extends Error {
361
+ /**
362
+ * Creates an instance of ValidationLogsMissingError.
363
+ *
364
+ * @constructor
365
+ */
366
+ constructor();
367
+ }
335
368
  /**
336
369
  * Function action validation context to help debug other validation errors
337
370
  *
@@ -533,11 +566,110 @@ export declare class UnrecognizedFilterTypeError extends FieldActionValidationEr
533
566
  */
534
567
  constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
535
568
  }
569
+ /**
570
+ * Thrown when no chain ID is provided in the Wagmi configuration.
571
+ *
572
+ * @export
573
+ * @class NoConnectedChainIdError
574
+ * @typedef {NoConnectedChainIdError}
575
+ * @extends {Error}
576
+ */
536
577
  export declare class NoConnectedChainIdError extends Error {
578
+ /**
579
+ * Creates an instance of NoConnectedChainIdError.
580
+ *
581
+ * @constructor
582
+ */
537
583
  constructor();
538
584
  }
585
+ /**
586
+ * Thrown when an invalid chain ID is provided that doesn't match any deployed protocol.
587
+ *
588
+ * @export
589
+ * @class InvalidProtocolChainIdError
590
+ * @typedef {InvalidProtocolChainIdError}
591
+ * @extends {Error}
592
+ */
539
593
  export declare class InvalidProtocolChainIdError extends Error {
594
+ /**
595
+ * Creates an instance of InvalidProtocolChainIdError.
596
+ *
597
+ * @constructor
598
+ * @param {number} chainId - The chain ID provided in the configuration.
599
+ * @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.
600
+ */
540
601
  constructor(chainId: number, validChainIds: number[]);
541
602
  }
603
+ /**
604
+ * Thrown when the incentive criteria cannot be fetched from the contract.
605
+ *
606
+ * @export
607
+ * @class IncentiveCriteriaNotFoundError
608
+ * @typedef {IncentiveCriteriaNotFoundError}
609
+ * @extends {Error}
610
+ */
611
+ export declare class IncentiveCriteriaNotFoundError extends Error {
612
+ /**
613
+ * Creates an instance of IncentiveCriteriaNotFoundError.
614
+ *
615
+ * @constructor
616
+ * @param {Error} [e] - Optional error object for further context.
617
+ * @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.
618
+ */
619
+ constructor(e?: Error, message?: string);
620
+ }
621
+ /**
622
+ * Thrown when no matching logs are found for a given event signature.
623
+ *
624
+ * @export
625
+ * @class NoMatchingLogsError
626
+ * @typedef {NoMatchingLogsError}
627
+ * @extends {Error}
628
+ */
629
+ export declare class NoMatchingLogsError extends Error {
630
+ /**
631
+ * Creates an instance of NoMatchingLogsError.
632
+ *
633
+ * @constructor
634
+ * @param {string} signature - The event signature for which logs are being searched.
635
+ * @param {string} [message] - Optional custom error message.
636
+ */
637
+ constructor(signature: string, message?: string);
638
+ }
639
+ /**
640
+ * Thrown when an invalid criteria type is provided.
641
+ *
642
+ * @export
643
+ * @class InvalidCriteriaTypeError
644
+ * @typedef {InvalidCriteriaTypeError}
645
+ * @extends {Error}
646
+ */
647
+ export declare class InvalidCriteriaTypeError extends Error {
648
+ /**
649
+ * Creates an instance of InvalidCriteriaTypeError.
650
+ *
651
+ * @constructor
652
+ * @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.
653
+ * @param {string} [message] - Optional custom error message.
654
+ */
655
+ constructor(criteriaType?: string, message?: string);
656
+ }
657
+ /**
658
+ * Thrown when decoding function arguments fails.
659
+ *
660
+ * @export
661
+ * @class DecodedArgsError
662
+ * @typedef {DecodedArgsError}
663
+ * @extends {Error}
664
+ */
665
+ export declare class DecodedArgsError extends Error {
666
+ /**
667
+ * Creates an instance of DecodedArgsError.
668
+ *
669
+ * @constructor
670
+ * @param {string} [message='Issue decoding args'] - Custom error message.
671
+ */
672
+ constructor(message?: string);
673
+ }
542
674
  export {};
543
675
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,GAAG,EAER,KAAK,mCAAmC,EAEzC,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;;OAIG;;CAIJ;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;IACrD;;;;OAIG;;CAIJ;AAED;;;;;;;GAOG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;gBACS,OAAO,EAAE,MAAM;CAM5B;AAED;;;;;;;GAOG;AACH,qBAAa,yCAA0C,SAAQ,KAAK;IAClE;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,mCAAoC,SAAQ,KAAK;IAC5D;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,yCAA0C,SAAQ,KAAK;IAClE;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;IACtD;;;;OAIG;;CAMJ;AAED;;;;;;;GAOG;AACH,qBAAa,iCAAkC,SAAQ,KAAK;IAC1D;;;;;;OAMG;IACH,SAAgB,OAAO,EAAE,mCAAmC,CAAC;IAC7D;;;;;OAKG;gBACS,OAAO,EAAE,mCAAmC;CAMzD;AA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AOG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC;;;;;OAKG;gBACS,OAAO,SAAwB;CAI5C"}
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
- import { zeroHash as n } from "viem";
2
- class d extends Error {
1
+ import { zeroHash as a } from "viem";
2
+ class c extends Error {
3
3
  /**
4
4
  * Creates an instance of BoostCoreNoIdentifierEmitted.
5
5
  *
@@ -9,7 +9,7 @@ class d extends Error {
9
9
  super('No "BoostCreated" log was emitted from which to extract boostId');
10
10
  }
11
11
  }
12
- class i extends Error {
12
+ class d extends Error {
13
13
  /**
14
14
  * Creates an instance of ContractAddressRequiredError.
15
15
  *
@@ -80,7 +80,7 @@ class h extends Error {
80
80
  );
81
81
  }
82
82
  }
83
- class m extends Error {
83
+ class g extends Error {
84
84
  /**
85
85
  * Creates an instance of NoContractAddressUponReceiptError.
86
86
  *
@@ -93,7 +93,7 @@ class m extends Error {
93
93
  }), this.receipt = r;
94
94
  }
95
95
  }
96
- class x extends Error {
96
+ class m extends Error {
97
97
  /**
98
98
  * Creates an instance of InvalidComponentInterfaceError.
99
99
  *
@@ -104,10 +104,10 @@ class x extends Error {
104
104
  constructor(r, o) {
105
105
  super("Address provided does not match any expected protocol interface", {
106
106
  cause: { expected: r, received: o }
107
- }), this.expected = [], this.received = n, this.expected = r, this.received = o;
107
+ }), this.expected = [], this.received = a, this.expected = r, this.received = o;
108
108
  }
109
109
  }
110
- class g extends Error {
110
+ class x extends Error {
111
111
  /**
112
112
  * Creates an instance of UnknownTransferPayloadSupplied.
113
113
  *
@@ -122,7 +122,7 @@ class g extends Error {
122
122
  ), this.event = o, this.input_param_idx = r;
123
123
  }
124
124
  }
125
- class y extends Error {
125
+ class v extends Error {
126
126
  /**
127
127
  * Creates an instance of UnknownTransferPayloadSupplied.
128
128
  *
@@ -136,7 +136,7 @@ class y extends Error {
136
136
  ), this.received = r;
137
137
  }
138
138
  }
139
- class v extends Error {
139
+ class y extends Error {
140
140
  /**
141
141
  * Creates an instance of BudgetMustAuthorizeBoostCore.
142
142
  *
@@ -168,7 +168,7 @@ class f extends Error {
168
168
  super(`Incentive not cloneable: ${r.constructor.name}`);
169
169
  }
170
170
  }
171
- class w extends Error {
171
+ class I extends Error {
172
172
  /**
173
173
  * Creates an instance of NoEventActionStepsProvidedError.
174
174
  *
@@ -190,6 +190,27 @@ class C extends Error {
190
190
  );
191
191
  }
192
192
  }
193
+ class A extends Error {
194
+ /**
195
+ * Creates an instance of ValidationAbiMissingError.
196
+ *
197
+ * @constructor
198
+ * @param {Hex} signature
199
+ */
200
+ constructor(r) {
201
+ super(`No known ABI for given signature: ${r}`);
202
+ }
203
+ }
204
+ class w extends Error {
205
+ /**
206
+ * Creates an instance of ValidationLogsMissingError.
207
+ *
208
+ * @constructor
209
+ */
210
+ constructor() {
211
+ super("Logs are required for validation");
212
+ }
213
+ }
193
214
  class t extends Error {
194
215
  /**
195
216
  * Creates an instance of FieldActionValidationError.
@@ -203,10 +224,10 @@ class t extends Error {
203
224
  */
204
225
  constructor(r, {
205
226
  fieldValue: o,
206
- criteria: a,
227
+ criteria: n,
207
228
  ...s
208
229
  }) {
209
- switch (super(r), this.fieldValue = o, this.criteria = a, !0) {
230
+ switch (super(r), this.fieldValue = o, this.criteria = n, !0) {
210
231
  case "log" in s:
211
232
  this.log = s.log;
212
233
  break;
@@ -215,7 +236,7 @@ class t extends Error {
215
236
  }
216
237
  }
217
238
  }
218
- class A extends t {
239
+ class D extends t {
219
240
  /**
220
241
  * Creates an instance of DecodedArgsUndefinedError.
221
242
  *
@@ -229,7 +250,7 @@ class A extends t {
229
250
  );
230
251
  }
231
252
  }
232
- class D extends t {
253
+ class N extends t {
233
254
  /**
234
255
  * Creates an instance of FieldValueUndefinedError.
235
256
  *
@@ -240,7 +261,7 @@ class D extends t {
240
261
  super("Field value is undefined", r);
241
262
  }
242
263
  }
243
- class I extends t {
264
+ class P extends t {
244
265
  /**
245
266
  * Creates an instance of InvalidNumericalCriteria.
246
267
  *
@@ -254,7 +275,7 @@ class I extends t {
254
275
  );
255
276
  }
256
277
  }
257
- class P extends Error {
278
+ class F extends Error {
258
279
  /**
259
280
  * Creates an instance of FunctionDataDecodeError.
260
281
  *
@@ -266,7 +287,7 @@ class P extends Error {
266
287
  super(`Failed to decode function data: ${o.message}`), this.name = "FunctionDataDecodeError", this.abi = r, this.originalError = o;
267
288
  }
268
289
  }
269
- class F extends t {
290
+ class B extends t {
270
291
  /**
271
292
  * Creates an instance of FieldValueNotComparableError.
272
293
  *
@@ -277,7 +298,7 @@ class F extends t {
277
298
  super("Filter can only be used with bytes or string field type", r);
278
299
  }
279
300
  }
280
- class B extends t {
301
+ class $ extends t {
281
302
  /**
282
303
  * Creates an instance of UnrecognizedFilterTypeError.
283
304
  *
@@ -288,45 +309,110 @@ class B extends t {
288
309
  super("Invalid FilterType provided", r);
289
310
  }
290
311
  }
291
- class N extends Error {
312
+ class M extends Error {
313
+ /**
314
+ * Creates an instance of NoConnectedChainIdError.
315
+ *
316
+ * @constructor
317
+ */
292
318
  constructor() {
293
319
  super(
294
320
  "Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"
295
- );
321
+ ), this.name = "NoConnectedChainIdError";
296
322
  }
297
323
  }
298
324
  class U extends Error {
325
+ /**
326
+ * Creates an instance of InvalidProtocolChainIdError.
327
+ *
328
+ * @constructor
329
+ * @param {number} chainId - The chain ID provided in the configuration.
330
+ * @param {number[]} validChainIds - A list of valid chain IDs where the protocol is deployed.
331
+ */
299
332
  constructor(r, o) {
300
333
  super(
301
334
  `Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`
302
- );
335
+ ), this.name = "InvalidProtocolChainIdError";
336
+ }
337
+ }
338
+ class T extends Error {
339
+ /**
340
+ * Creates an instance of IncentiveCriteriaNotFoundError.
341
+ *
342
+ * @constructor
343
+ * @param {Error} [e] - Optional error object for further context.
344
+ * @param {string} [message='Unable to fetch Incentive Criteria from contract'] - Custom error message.
345
+ */
346
+ constructor(r, o = "Unable to fetch Incentive Criteria from contract") {
347
+ super(o + (r ? `: ${r.message}` : "")), this.name = "IncentiveCriteriaNotFoundError";
348
+ }
349
+ }
350
+ class k extends Error {
351
+ /**
352
+ * Creates an instance of NoMatchingLogsError.
353
+ *
354
+ * @constructor
355
+ * @param {string} signature - The event signature for which logs are being searched.
356
+ * @param {string} [message] - Optional custom error message.
357
+ */
358
+ constructor(r, o = `No logs found for event signature ${r}`) {
359
+ super(o), this.name = "NoMatchingLogsError";
360
+ }
361
+ }
362
+ class z extends Error {
363
+ /**
364
+ * Creates an instance of InvalidCriteriaTypeError.
365
+ *
366
+ * @constructor
367
+ * @param {string} [criteriaType='unknown'] - The invalid criteria type that was provided.
368
+ * @param {string} [message] - Optional custom error message.
369
+ */
370
+ constructor(r = "unknown", o = `Invalid criteria type ${r}`) {
371
+ super(o), this.name = "InvalidCriteriaTypeError";
372
+ }
373
+ }
374
+ class V extends Error {
375
+ /**
376
+ * Creates an instance of DecodedArgsError.
377
+ *
378
+ * @constructor
379
+ * @param {string} [message='Issue decoding args'] - Custom error message.
380
+ */
381
+ constructor(r = "Issue decoding args") {
382
+ super(r), this.name = "DecodedArgsError";
303
383
  }
304
384
  }
305
385
  export {
306
- d as BoostCoreNoIdentifierEmitted,
307
- v as BudgetMustAuthorizeBoostCore,
308
- i as ContractAddressRequiredError,
309
- A as DecodedArgsMalformedError,
386
+ c as BoostCoreNoIdentifierEmitted,
387
+ y as BudgetMustAuthorizeBoostCore,
388
+ d as ContractAddressRequiredError,
389
+ V as DecodedArgsError,
390
+ D as DecodedArgsMalformedError,
310
391
  l as DeployableAlreadyDeployedError,
311
392
  u as DeployableBuildParametersUnspecifiedError,
312
393
  h as DeployableMissingPayloadError,
313
394
  p as DeployableUnknownOwnerProvidedError,
314
395
  E as DeployableWagmiConfigurationRequiredError,
315
396
  t as FieldActionValidationError,
316
- F as FieldValueNotComparableError,
317
- D as FieldValueUndefinedError,
318
- P as FunctionDataDecodeError,
397
+ B as FieldValueNotComparableError,
398
+ N as FieldValueUndefinedError,
399
+ F as FunctionDataDecodeError,
400
+ T as IncentiveCriteriaNotFoundError,
319
401
  f as IncentiveNotCloneableError,
320
- x as InvalidComponentInterfaceError,
321
- I as InvalidNumericalCriteriaError,
402
+ m as InvalidComponentInterfaceError,
403
+ z as InvalidCriteriaTypeError,
404
+ P as InvalidNumericalCriteriaError,
322
405
  U as InvalidProtocolChainIdError,
323
406
  b as MustInitializeBudgetError,
324
- N as NoConnectedChainIdError,
325
- m as NoContractAddressUponReceiptError,
326
- w as NoEventActionStepsProvidedError,
407
+ M as NoConnectedChainIdError,
408
+ g as NoContractAddressUponReceiptError,
409
+ I as NoEventActionStepsProvidedError,
410
+ k as NoMatchingLogsError,
327
411
  C as TooManyEventActionStepsProvidedError,
328
- y as UnknownTransferPayloadSupplied,
329
- g as UnparseableAbiParamError,
330
- B as UnrecognizedFilterTypeError
412
+ v as UnknownTransferPayloadSupplied,
413
+ x as UnparseableAbiParamError,
414
+ $ as UnrecognizedFilterTypeError,
415
+ A as ValidationAbiMissingError,
416
+ w as ValidationLogsMissingError
331
417
  };
332
418
  //# sourceMappingURL=errors.js.map