@boostxyz/sdk 0.0.0-alpha.12 → 0.0.0-alpha.13

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 (152) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +2 -2
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +2 -2
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +2 -2
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +47 -43
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.js +2 -2
  15. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  17. package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
  18. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.js +23 -19
  20. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  22. package/dist/AllowLists/SimpleDenyList.d.ts +2 -2
  23. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.js +6 -5
  25. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  26. package/dist/Auth/PassthroughAuth.cjs +1 -1
  27. package/dist/Auth/PassthroughAuth.js +1 -1
  28. package/dist/BoostCore.cjs +2 -2
  29. package/dist/BoostCore.cjs.map +1 -1
  30. package/dist/BoostCore.d.ts +27 -5
  31. package/dist/BoostCore.d.ts.map +1 -1
  32. package/dist/BoostCore.js +438 -347
  33. package/dist/BoostCore.js.map +1 -1
  34. package/dist/BoostRegistry.cjs +1 -1
  35. package/dist/BoostRegistry.cjs.map +1 -1
  36. package/dist/BoostRegistry.d.ts +26 -5
  37. package/dist/BoostRegistry.d.ts.map +1 -1
  38. package/dist/BoostRegistry.js +125 -64
  39. package/dist/BoostRegistry.js.map +1 -1
  40. package/dist/Budgets/Budget.cjs +1 -1
  41. package/dist/Budgets/Budget.js +1 -1
  42. package/dist/Budgets/ManagedBudget.cjs +1 -1
  43. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  44. package/dist/Budgets/ManagedBudget.d.ts +2 -2
  45. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  46. package/dist/Budgets/ManagedBudget.js +41 -37
  47. package/dist/Budgets/ManagedBudget.js.map +1 -1
  48. package/dist/Budgets/SimpleBudget.d.ts +2 -2
  49. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  50. package/dist/Budgets/VestingBudget.d.ts +2 -2
  51. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  52. package/dist/Deployable/DeployableTarget.cjs +1 -1
  53. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  54. package/dist/Deployable/DeployableTarget.d.ts +6 -6
  55. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  56. package/dist/Deployable/DeployableTarget.js +22 -17
  57. package/dist/Deployable/DeployableTarget.js.map +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  59. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.d.ts +2 -2
  61. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  62. package/dist/Incentives/AllowListIncentive.js +17 -13
  63. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  65. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  66. package/dist/Incentives/CGDAIncentive.d.ts +14 -2
  67. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  68. package/dist/Incentives/CGDAIncentive.js +27 -23
  69. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  70. package/dist/Incentives/ERC1155Incentive.d.ts +2 -2
  71. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  72. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  73. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  74. package/dist/Incentives/ERC20Incentive.d.ts +2 -2
  75. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  76. package/dist/Incentives/ERC20Incentive.js +17 -13
  77. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  78. package/dist/Incentives/ERC20VariableIncentive.d.ts +2 -2
  79. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  80. package/dist/Incentives/Incentive.cjs +1 -1
  81. package/dist/Incentives/Incentive.cjs.map +1 -1
  82. package/dist/Incentives/Incentive.js +32 -28
  83. package/dist/Incentives/Incentive.js.map +1 -1
  84. package/dist/Incentives/PointsIncentive.cjs +1 -1
  85. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  86. package/dist/Incentives/PointsIncentive.d.ts +2 -2
  87. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  88. package/dist/Incentives/PointsIncentive.js +13 -9
  89. package/dist/Incentives/PointsIncentive.js.map +1 -1
  90. package/dist/{SimpleDenyList-IJ9Ipya7.js → SimpleDenyList-C21O9Yfi.js} +23 -19
  91. package/dist/SimpleDenyList-C21O9Yfi.js.map +1 -0
  92. package/dist/SimpleDenyList-DeJRKD2D.cjs +2 -0
  93. package/dist/{SimpleDenyList-IJ9Ipya7.js.map → SimpleDenyList-DeJRKD2D.cjs.map} +1 -1
  94. package/dist/Validators/SignerValidator.cjs +1 -1
  95. package/dist/Validators/SignerValidator.cjs.map +1 -1
  96. package/dist/Validators/SignerValidator.d.ts +2 -2
  97. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  98. package/dist/Validators/SignerValidator.js +18 -14
  99. package/dist/Validators/SignerValidator.js.map +1 -1
  100. package/dist/Validators/Validator.cjs +1 -1
  101. package/dist/Validators/Validator.js +1 -1
  102. package/dist/deployments-BvFcK_eR.js +40 -0
  103. package/dist/deployments-BvFcK_eR.js.map +1 -0
  104. package/dist/deployments-Ho4PnGCS.cjs +2 -0
  105. package/dist/deployments-Ho4PnGCS.cjs.map +1 -0
  106. package/dist/deployments.json +38 -0
  107. package/dist/errors.cjs +1 -1
  108. package/dist/errors.cjs.map +1 -1
  109. package/dist/errors.d.ts +6 -0
  110. package/dist/errors.d.ts.map +1 -1
  111. package/dist/errors.js +70 -54
  112. package/dist/errors.js.map +1 -1
  113. package/dist/{generated-HGddZXHJ.js → generated-LpgSHrH0.js} +130 -90
  114. package/dist/generated-LpgSHrH0.js.map +1 -0
  115. package/dist/generated-tq_HLZJ0.cjs +3 -0
  116. package/dist/generated-tq_HLZJ0.cjs.map +1 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.js +113 -109
  119. package/dist/utils.cjs +1 -1
  120. package/dist/utils.cjs.map +1 -1
  121. package/dist/utils.d.ts +25 -11
  122. package/dist/utils.d.ts.map +1 -1
  123. package/dist/utils.js +38 -23
  124. package/dist/utils.js.map +1 -1
  125. package/package.json +6 -5
  126. package/src/Actions/ContractAction.ts +5 -3
  127. package/src/Actions/ERC721MintAction.ts +5 -3
  128. package/src/Actions/EventAction.ts +6 -2
  129. package/src/AllowLists/AllowList.test.ts +1 -1
  130. package/src/AllowLists/SimpleAllowList.ts +6 -3
  131. package/src/AllowLists/SimpleDenyList.ts +6 -3
  132. package/src/BoostCore.test.ts +31 -91
  133. package/src/BoostCore.ts +137 -34
  134. package/src/BoostRegistry.ts +89 -21
  135. package/src/Budgets/ManagedBudget.ts +6 -4
  136. package/src/Budgets/SimpleBudget.ts +4 -3
  137. package/src/Budgets/VestingBudget.ts +4 -3
  138. package/src/Deployable/DeployableTarget.ts +22 -11
  139. package/src/Incentives/AllowListIncentive.ts +6 -3
  140. package/src/Incentives/CGDAIncentive.ts +6 -3
  141. package/src/Incentives/ERC1155Incentive.ts +4 -3
  142. package/src/Incentives/ERC20Incentive.ts +6 -3
  143. package/src/Incentives/ERC20VariableIncentive.ts +6 -3
  144. package/src/Incentives/PointsIncentive.ts +6 -3
  145. package/src/Validators/SignerValidator.ts +6 -3
  146. package/src/errors.ts +17 -1
  147. package/src/utils.ts +60 -11
  148. package/dist/SimpleDenyList-CqT0BMP7.cjs +0 -2
  149. package/dist/SimpleDenyList-CqT0BMP7.cjs.map +0 -1
  150. package/dist/generated-HGddZXHJ.js.map +0 -1
  151. package/dist/generated-wKBNvm48.cjs +0 -3
  152. package/dist/generated-wKBNvm48.cjs.map +0 -1
@@ -0,0 +1,38 @@
1
+ {
2
+ "AllowListIncentive": {
3
+ "11155111": "0x8d80dfac4927387E6819B76b850aF50d2E29835a"
4
+ },
5
+ "BoostCore": {
6
+ "11155111": "0x0561e8fB1EFD614eb905CB93D548Bb217Ad07B92"
7
+ },
8
+ "BoostRegistry": {
9
+ "11155111": "0x6659255D4Aa39a975c7C841D5d898969fc3F75aa"
10
+ },
11
+ "CGDAIncentive": {
12
+ "11155111": "0x47d4cF86829cAf2e410E7D08005e37b51B8c19A4"
13
+ },
14
+ "ERC20Incentive": {
15
+ "11155111": "0x3efa476a81Bcf5426aA4b026CEC588EA3839dB18"
16
+ },
17
+ "ERC20VariableIncentive": {
18
+ "11155111": "0x08AC38DB2f723Db15fa8Cd6c7Bb12C5dA5743875"
19
+ },
20
+ "EventAction": {
21
+ "11155111": "0x2bD655240116b18f5b9F24E4b7b51B87B7b33D37"
22
+ },
23
+ "ManagedBudget": {
24
+ "11155111": "0xC7091Ca16F98C661F3B64b4fA0D85ffFFE93f5BD"
25
+ },
26
+ "PointsIncentive": {
27
+ "11155111": "0xcE8f0F83afea8514287bcb74cf82F40A7Acc6e95"
28
+ },
29
+ "SignerValidator": {
30
+ "11155111": "0x9d08826e771BD939088d5eAc28E0c8864dcb98cf"
31
+ },
32
+ "SimpleAllowList": {
33
+ "11155111": "0x9A3848B6B35d406d758892C6b4b00042cCbc96AD"
34
+ },
35
+ "SimpleDenyList": {
36
+ "11155111": "0x7eb4E958D42b64fd1c4Ce947d05a755fCC7C30B7"
37
+ }
38
+ }
package/dist/errors.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=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 m extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class y extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=n.zeroHash,this.expected=r,this.received=o}}class h 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 b extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class g extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class v 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 A extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class t extends Error{constructor(r,{fieldValue:o,criteria:a,...s}){switch(super(r),this.fieldValue=o,this.criteria=a,!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 C 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 I extends t{constructor(r){super("Invalid FilterType provided",r)}}exports.BoostCoreNoIdentifierEmitted=i;exports.BudgetMustAuthorizeBoostCore=g;exports.ContractAddressRequiredError=d;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=C;exports.FunctionDataDecodeError=w;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=y;exports.InvalidNumericalCriteriaError=P;exports.MustInitializeBudgetError=v;exports.NoContractAddressUponReceiptError=m;exports.NoEventActionStepsProvidedError=f;exports.TooManyEventActionStepsProvidedError=A;exports.UnknownTransferPayloadSupplied=b;exports.UnparseableAbiParamError=h;exports.UnrecognizedFilterTypeError=I;
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;
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"],"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"],"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,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AAK,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"}
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,EAEjB,KAAK,MAAQA,EACb,KAAK,gBAAkBD,CACzB,CACF,CAYO,MAAME,U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AqCZ,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"}
package/dist/errors.d.ts CHANGED
@@ -533,5 +533,11 @@ export declare class UnrecognizedFilterTypeError extends FieldActionValidationEr
533
533
  */
534
534
  constructor(metadata: EventActionValidationMeta | FunctionActionValidationMeta);
535
535
  }
536
+ export declare class NoConnectedChainIdError extends Error {
537
+ constructor();
538
+ }
539
+ export declare class InvalidProtocolChainIdError extends Error {
540
+ constructor(chainId: number, validChainIds: number[]);
541
+ }
536
542
  export {};
537
543
  //# 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;I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E,MAAM,EACf,EACE,UAAU,EACV,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,yBAAyB,GAAG,4BAA4B;CAc9D;AAED;;;;;;;GAOG;AACH,qBAAa,yBAA0B,SAAQ,0BAA0B;IACvE;;;;;OAKG;gBAED,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B;CAOrE;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,0BAA0B;IACtE;;;;;OAKG;gBAED,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B;CAIrE;AAED;;;;;;;GAOG;AACH,qBAAa,6BAA8B,SAAQ,0BAA0B;IAC3E;;;;;OAKG;gBAED,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B;CAOrE;AAED;;;;;;;GAOG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IACzC,GAAG,EAAE,WAAW,EAAE,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC;IAE5B;;;;;;OAMG;gBACS,GAAG,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,KAAK;CAMrD;AAED;;;;;;;GAOG;AACH,qBAAa,4BAA6B,SAAQ,0BAA0B;IAC1E;;;;;OAKG;gBAED,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B;CAIrE;AAED;;;;;;;GAOG;AACH,qBAAa,2BAA4B,SAAQ,0BAA0B;IACzE;;;;;OAKG;gBAED,QAAQ,EAAE,yBAAyB,GAAG,4BAA4B;CAIrE;AAED,qBAAa,uBAAwB,SAAQ,KAAK;;CAMjD;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE;CAKrD"}
package/dist/errors.js CHANGED
@@ -26,10 +26,10 @@ class l extends Error {
26
26
  * @constructor
27
27
  * @param {string} address
28
28
  */
29
- constructor(e) {
29
+ constructor(r) {
30
30
  super(
31
31
  "Attempted to deploy a contract that already has an address configured"
32
- ), this.address = e;
32
+ ), this.address = r;
33
33
  }
34
34
  }
35
35
  class u extends Error {
@@ -87,10 +87,10 @@ class m extends Error {
87
87
  * @constructor
88
88
  * @param {WaitForTransactionReceiptReturnType} receipt
89
89
  */
90
- constructor(e) {
90
+ constructor(r) {
91
91
  super("Expected a contract address to exist on receipt.", {
92
- cause: e
93
- }), this.receipt = e;
92
+ cause: r
93
+ }), this.receipt = r;
94
94
  }
95
95
  }
96
96
  class x extends Error {
@@ -101,13 +101,13 @@ class x extends Error {
101
101
  * @param {Hex[]} expected
102
102
  * @param {Hex} received
103
103
  */
104
- constructor(e, o) {
104
+ constructor(r, o) {
105
105
  super("Address provided does not match any expected protocol interface", {
106
- cause: { expected: e, received: o }
107
- }), this.expected = [], this.received = n, this.expected = e, this.received = o;
106
+ cause: { expected: r, received: o }
107
+ }), this.expected = [], this.received = n, this.expected = r, this.received = o;
108
108
  }
109
109
  }
110
- class y extends Error {
110
+ class g extends Error {
111
111
  /**
112
112
  * Creates an instance of UnknownTransferPayloadSupplied.
113
113
  *
@@ -115,41 +115,41 @@ class y extends Error {
115
115
  * @param {number} input_param_idx
116
116
  * @param {AbiEvent} event
117
117
  */
118
- constructor(e, o) {
118
+ constructor(r, o) {
119
119
  super(
120
- `Parameter is not transparently stored onchain. Parameter ${e} in event ${o.name} cannot be used in an action`,
120
+ `Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,
121
121
  { cause: o }
122
- ), this.event = o, this.input_param_idx = e;
122
+ ), this.event = o, this.input_param_idx = r;
123
123
  }
124
124
  }
125
- class b extends Error {
125
+ class y extends Error {
126
126
  /**
127
127
  * Creates an instance of UnknownTransferPayloadSupplied.
128
128
  *
129
129
  * @constructor
130
130
  * @param {unknown} received
131
131
  */
132
- constructor(e) {
132
+ constructor(r) {
133
133
  super(
134
134
  "Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",
135
- { cause: e }
136
- ), this.received = e;
135
+ { cause: r }
136
+ ), this.received = r;
137
137
  }
138
138
  }
139
- class g extends Error {
139
+ class v extends Error {
140
140
  /**
141
141
  * Creates an instance of BudgetMustAuthorizeBoostCore.
142
142
  *
143
143
  * @constructor
144
144
  * @param {string} boostCoreAddress
145
145
  */
146
- constructor(e) {
146
+ constructor(r) {
147
147
  super(
148
- `Budget needs to explicitly authorize ${e}. You can retrieve this value from BoostCore.address`
148
+ `Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`
149
149
  );
150
150
  }
151
151
  }
152
- class v extends Error {
152
+ class b extends Error {
153
153
  /**
154
154
  * Creates an instance of MustInitializeBudgetError.
155
155
  */
@@ -164,11 +164,11 @@ class f extends Error {
164
164
  * @constructor
165
165
  * @param {Incentive} incentive
166
166
  */
167
- constructor(e) {
168
- super(`Incentive not cloneable: ${e.constructor.name}`);
167
+ constructor(r) {
168
+ super(`Incentive not cloneable: ${r.constructor.name}`);
169
169
  }
170
170
  }
171
- class A extends Error {
171
+ class w extends Error {
172
172
  /**
173
173
  * Creates an instance of NoEventActionStepsProvidedError.
174
174
  *
@@ -178,7 +178,7 @@ class A extends Error {
178
178
  super("Must supply at least one action step");
179
179
  }
180
180
  }
181
- class D extends Error {
181
+ class C extends Error {
182
182
  /**
183
183
  * Creates an instance of TooManyEventActionStepsProvidedError.
184
184
  *
@@ -201,12 +201,12 @@ class t extends Error {
201
201
  * @param {Criteria} param0.criteria
202
202
  * @param {Log} param0.log
203
203
  */
204
- constructor(e, {
204
+ constructor(r, {
205
205
  fieldValue: o,
206
206
  criteria: a,
207
207
  ...s
208
208
  }) {
209
- switch (super(e), this.fieldValue = o, this.criteria = a, !0) {
209
+ switch (super(r), this.fieldValue = o, this.criteria = a, !0) {
210
210
  case "log" in s:
211
211
  this.log = s.log;
212
212
  break;
@@ -215,42 +215,42 @@ class t extends Error {
215
215
  }
216
216
  }
217
217
  }
218
- class w extends t {
218
+ class A extends t {
219
219
  /**
220
220
  * Creates an instance of DecodedArgsUndefinedError.
221
221
  *
222
222
  * @constructor
223
223
  * @param {DecodedArgsMalformedError} metadata
224
224
  */
225
- constructor(e) {
225
+ constructor(r) {
226
226
  super(
227
227
  "Decoded Args are malformed; Check which params are indexed",
228
- e
228
+ r
229
229
  );
230
230
  }
231
231
  }
232
- class C extends t {
232
+ class D extends t {
233
233
  /**
234
234
  * Creates an instance of FieldValueUndefinedError.
235
235
  *
236
236
  * @constructor
237
237
  * @param {EventActionValidationMeta} metadata
238
238
  */
239
- constructor(e) {
240
- super("Field value is undefined", e);
239
+ constructor(r) {
240
+ super("Field value is undefined", r);
241
241
  }
242
242
  }
243
- class F extends t {
243
+ class I extends t {
244
244
  /**
245
245
  * Creates an instance of InvalidNumericalCriteria.
246
246
  *
247
247
  * @constructor
248
248
  * @param {EventActionValidationMeta} metadata
249
249
  */
250
- constructor(e) {
250
+ constructor(r) {
251
251
  super(
252
252
  "Numerical comparisons cannot be used with non-numerical criteria",
253
- e
253
+ r
254
254
  );
255
255
  }
256
256
  }
@@ -262,55 +262,71 @@ class P extends Error {
262
262
  * @param {AbiFunction[]} abi - The ABI of the function.
263
263
  * @param {Error} originalError - The original error that was thrown.
264
264
  */
265
- constructor(e, o) {
266
- super(`Failed to decode function data: ${o.message}`), this.name = "FunctionDataDecodeError", this.abi = e, this.originalError = o;
265
+ constructor(r, o) {
266
+ super(`Failed to decode function data: ${o.message}`), this.name = "FunctionDataDecodeError", this.abi = r, this.originalError = o;
267
267
  }
268
268
  }
269
- class B extends t {
269
+ class F extends t {
270
270
  /**
271
271
  * Creates an instance of FieldValueNotComparableError.
272
272
  *
273
273
  * @constructor
274
274
  * @param {EventActionValidationMeta} metadata
275
275
  */
276
- constructor(e) {
277
- super("Filter can only be used with bytes or string field type", e);
276
+ constructor(r) {
277
+ super("Filter can only be used with bytes or string field type", r);
278
278
  }
279
279
  }
280
- class I extends t {
280
+ class B extends t {
281
281
  /**
282
282
  * Creates an instance of UnrecognizedFilterTypeError.
283
283
  *
284
284
  * @constructor
285
285
  * @param {EventActionValidationMeta} metadata
286
286
  */
287
- constructor(e) {
288
- super("Invalid FilterType provided", e);
287
+ constructor(r) {
288
+ super("Invalid FilterType provided", r);
289
+ }
290
+ }
291
+ class N extends Error {
292
+ constructor() {
293
+ super(
294
+ "Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"
295
+ );
296
+ }
297
+ }
298
+ class U extends Error {
299
+ constructor(r, o) {
300
+ super(
301
+ `Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`
302
+ );
289
303
  }
290
304
  }
291
305
  export {
292
306
  d as BoostCoreNoIdentifierEmitted,
293
- g as BudgetMustAuthorizeBoostCore,
307
+ v as BudgetMustAuthorizeBoostCore,
294
308
  i as ContractAddressRequiredError,
295
- w as DecodedArgsMalformedError,
309
+ A as DecodedArgsMalformedError,
296
310
  l as DeployableAlreadyDeployedError,
297
311
  u as DeployableBuildParametersUnspecifiedError,
298
312
  h as DeployableMissingPayloadError,
299
313
  p as DeployableUnknownOwnerProvidedError,
300
314
  E as DeployableWagmiConfigurationRequiredError,
301
315
  t as FieldActionValidationError,
302
- B as FieldValueNotComparableError,
303
- C as FieldValueUndefinedError,
316
+ F as FieldValueNotComparableError,
317
+ D as FieldValueUndefinedError,
304
318
  P as FunctionDataDecodeError,
305
319
  f as IncentiveNotCloneableError,
306
320
  x as InvalidComponentInterfaceError,
307
- F as InvalidNumericalCriteriaError,
308
- v as MustInitializeBudgetError,
321
+ I as InvalidNumericalCriteriaError,
322
+ U as InvalidProtocolChainIdError,
323
+ b as MustInitializeBudgetError,
324
+ N as NoConnectedChainIdError,
309
325
  m as NoContractAddressUponReceiptError,
310
- A as NoEventActionStepsProvidedError,
311
- D as TooManyEventActionStepsProvidedError,
312
- b as UnknownTransferPayloadSupplied,
313
- y as UnparseableAbiParamError,
314
- I as UnrecognizedFilterTypeError
326
+ w as NoEventActionStepsProvidedError,
327
+ C as TooManyEventActionStepsProvidedError,
328
+ y as UnknownTransferPayloadSupplied,
329
+ g as UnparseableAbiParamError,
330
+ B as UnrecognizedFilterTypeError
315
331
  };
316
332
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","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"],"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"],"mappings":";AA6BO,MAAMA,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,iEAAiE;AAAA,EACzE;AACF;AAiBO,MAAMC,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,gEAAgE;AAAA,EACxE;AACF;AAUO,MAAMC,UAAuC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaxD,YAAYC,GAAiB;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AACpB,aAAK,cAAcA,EAAK;AAAA,IAC5B;AAAA,EACF;AACF;AAUO,MAAMC,UAAkCL,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxE,YACEM,GACA;AACA;AAAA,MACE;AAAA,MACAA;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMC,UAAiCP,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOvE,YACEM,GACA;AACA,UAAM,4BAA4BA,CAAQ;AAAA,EAC5C;AACF;AAUO,MAAME,UAAsCR,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5E,YACEM,GACA;AACA;AAAA,MACE;AAAA,MACAA;AAAA,IAAA;AAAA,EAEJ;AACF;AAUO,MAAMG,UAAgC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWjD,YAAYC,GAAoBC,GAAsB;AAC9C,UAAA,mCAAmCA,EAAc,OAAO,EAAE,GAChE,KAAK,OAAO,2BACZ,KAAK,MAAMD,GACX,KAAK,gBAAgBC;AAAA,EACvB;AACF;AAUO,MAAMC,UAAqCZ,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO3E,YACEM,GACA;AACA,UAAM,2DAA2DA,CAAQ;AAAA,EAC3E;AACF;AAUO,MAAMO,UAAoCb,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1E,YACEM,GACA;AACA,UAAM,+BAA+BA,CAAQ;AAAA,EAC/C;AACF;"}
1
+ {"version":3,"file":"errors.js","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":";AA6BO,MAAMA,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,iEAAiE;AAAA,EACzE;AACF;AAiBO,MAAMC,UAAqC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtD,cAAc;AACZ,UAAM,gEAAgE;AAAA,EACxE;AACF;AAUO,MAAMC,UAAuC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaxD,YAAYC,GAAiB;AAC3B;AAAA,MACE;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