@boostxyz/sdk 6.1.3 → 7.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +1 -1
  2. package/dist/Actions/Action.cjs +1 -1
  3. package/dist/Actions/Action.js +4 -4
  4. package/dist/Actions/EventAction.cjs +1 -1
  5. package/dist/Actions/EventAction.cjs.map +1 -1
  6. package/dist/Actions/EventAction.d.ts +10 -0
  7. package/dist/Actions/EventAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.js +84 -83
  9. package/dist/Actions/EventAction.js.map +1 -1
  10. package/dist/AllowLists/AllowList.cjs +1 -1
  11. package/dist/AllowLists/AllowList.js +3 -3
  12. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  13. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  14. package/dist/AllowLists/SimpleAllowList.js +14 -14
  15. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  16. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  17. package/dist/AllowLists/SimpleDenyList.js +3 -3
  18. package/dist/Auth/PassthroughAuth.cjs +1 -1
  19. package/dist/Auth/PassthroughAuth.js +1 -1
  20. package/dist/BoostCore.cjs +2 -2
  21. package/dist/BoostCore.cjs.map +1 -1
  22. package/dist/BoostCore.d.ts +1894 -267
  23. package/dist/BoostCore.d.ts.map +1 -1
  24. package/dist/BoostCore.js +808 -497
  25. package/dist/BoostCore.js.map +1 -1
  26. package/dist/BoostRegistry.cjs +1 -1
  27. package/dist/BoostRegistry.js +47 -47
  28. package/dist/Budget-B_kgJGDu.cjs +2 -0
  29. package/dist/Budget-B_kgJGDu.cjs.map +1 -0
  30. package/dist/Budget-Bvi5Qjqp.js +1124 -0
  31. package/dist/Budget-Bvi5Qjqp.js.map +1 -0
  32. package/dist/Budgets/Budget.cjs +1 -1
  33. package/dist/Budgets/Budget.d.ts +5 -4
  34. package/dist/Budgets/Budget.d.ts.map +1 -1
  35. package/dist/Budgets/Budget.js +9 -6
  36. package/dist/Budgets/ManagedBudget.cjs +1 -1
  37. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  38. package/dist/Budgets/ManagedBudget.d.ts +4 -0
  39. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +25 -25
  41. package/dist/Budgets/ManagedBudgetWithFees.d.ts +4 -0
  42. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  43. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +4 -0
  44. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -1
  45. package/dist/Budgets/TransparentBudget.d.ts +944 -0
  46. package/dist/Budgets/TransparentBudget.d.ts.map +1 -0
  47. package/dist/Budgets/VestingBudget.d.ts +4 -0
  48. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  49. package/dist/Deployable/Deployable.cjs.map +1 -1
  50. package/dist/Deployable/Deployable.d.ts +1 -1
  51. package/dist/Deployable/Deployable.d.ts.map +1 -1
  52. package/dist/Deployable/Deployable.js.map +1 -1
  53. package/dist/Deployable/DeployableTarget.cjs +1 -1
  54. package/dist/Deployable/DeployableTarget.js +1 -1
  55. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  56. package/dist/Deployable/DeployableTargetWithRBAC.js +19 -19
  57. package/dist/Incentive-CLKutfnD.js +445 -0
  58. package/dist/Incentive-CLKutfnD.js.map +1 -0
  59. package/dist/Incentive-CLSVNxDz.cjs +2 -0
  60. package/dist/Incentive-CLSVNxDz.cjs.map +1 -0
  61. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  62. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  63. package/dist/Incentives/AllowListIncentive.js +9 -9
  64. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  66. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  67. package/dist/Incentives/CGDAIncentive.js +5 -5
  68. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  70. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.js +17 -17
  72. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  73. package/dist/Incentives/ERC20PeggedIncentive.d.ts +1 -1
  74. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +2 -0
  75. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -0
  76. package/dist/Incentives/{ERC20PeggedVariableCriteriaIncentive.d.ts → ERC20PeggedVariableCriteriaIncentiveV2.d.ts} +39 -27
  77. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -0
  78. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +625 -0
  79. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -0
  80. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +2 -0
  81. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -0
  82. package/dist/Incentives/{ERC20VariableCriteriaIncentive.d.ts → ERC20VariableCriteriaIncentiveV2.d.ts} +42 -13
  83. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -0
  84. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +242 -0
  85. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -0
  86. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  87. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  88. package/dist/Incentives/ERC20VariableIncentive.d.ts +3 -3
  89. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  90. package/dist/Incentives/ERC20VariableIncentive.js +22 -22
  91. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  92. package/dist/Incentives/Incentive.cjs +1 -1
  93. package/dist/Incentives/Incentive.d.ts +8 -8
  94. package/dist/Incentives/Incentive.d.ts.map +1 -1
  95. package/dist/Incentives/Incentive.js +13 -12
  96. package/dist/Incentives/Incentive.js.map +1 -1
  97. package/dist/Incentives/PointsIncentive.cjs +1 -1
  98. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  99. package/dist/Incentives/PointsIncentive.js +13 -13
  100. package/dist/Incentives/PointsIncentive.js.map +1 -1
  101. package/dist/SimpleDenyList-C1C_BHkY.js +133 -0
  102. package/dist/{SimpleDenyList-BKfPoTo1.js.map → SimpleDenyList-C1C_BHkY.js.map} +1 -1
  103. package/dist/SimpleDenyList-CWthbyj7.cjs +2 -0
  104. package/dist/{SimpleDenyList-DgjVf7FK.cjs.map → SimpleDenyList-CWthbyj7.cjs.map} +1 -1
  105. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  106. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  107. package/dist/Validators/LimitedSignerValidator.js +18 -18
  108. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  109. package/dist/Validators/SignerValidator.cjs +1 -1
  110. package/dist/Validators/SignerValidator.cjs.map +1 -1
  111. package/dist/Validators/SignerValidator.js +54 -54
  112. package/dist/Validators/SignerValidator.js.map +1 -1
  113. package/dist/Validators/Validator.cjs +1 -1
  114. package/dist/Validators/Validator.js +2 -2
  115. package/dist/componentInterfaces-BVHB4Fjw.js +21 -0
  116. package/dist/componentInterfaces-BVHB4Fjw.js.map +1 -0
  117. package/dist/componentInterfaces-BqhL-meV.cjs +2 -0
  118. package/dist/componentInterfaces-BqhL-meV.cjs.map +1 -0
  119. package/dist/deployments-D9QxJGrC.cjs +2 -0
  120. package/dist/deployments-D9QxJGrC.cjs.map +1 -0
  121. package/dist/deployments-De8_J7SS.js +120 -0
  122. package/dist/{deployments-W_LUj833.js.map → deployments-De8_J7SS.js.map} +1 -1
  123. package/dist/deployments.json +63 -48
  124. package/dist/{generated-CElkFqkY.js → generated-BJfQ-EBO.js} +1268 -737
  125. package/dist/generated-BJfQ-EBO.js.map +1 -0
  126. package/dist/generated-mJJNq-xb.cjs +3 -0
  127. package/dist/generated-mJJNq-xb.cjs.map +1 -0
  128. package/dist/index.cjs +1 -1
  129. package/dist/index.d.ts +3 -2
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +162 -158
  132. package/dist/index.js.map +1 -1
  133. package/dist/utils.cjs.map +1 -1
  134. package/dist/utils.js.map +1 -1
  135. package/package.json +13 -7
  136. package/src/Actions/EventAction.ts +11 -0
  137. package/src/BoostCore.test.ts +14 -9
  138. package/src/BoostCore.ts +428 -26
  139. package/src/Budgets/Budget.ts +8 -1
  140. package/src/Budgets/TransparentBudget.test.ts +70 -0
  141. package/src/Budgets/TransparentBudget.ts +334 -0
  142. package/src/Deployable/Deployable.ts +1 -1
  143. package/src/Incentives/ERC20PeggedIncentive.ts +1 -1
  144. package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.test.ts → ERC20PeggedVariableCriteriaIncentiveV2.test.ts} +14 -10
  145. package/src/Incentives/{ERC20PeggedVariableCriteriaIncentive.ts → ERC20PeggedVariableCriteriaIncentiveV2.ts} +122 -100
  146. package/src/Incentives/{ERC20VariableCriteriaIncentive.test.ts → ERC20VariableCriteriaIncentiveV2.test.ts} +18 -13
  147. package/src/Incentives/{ERC20VariableCriteriaIncentive.ts → ERC20VariableCriteriaIncentiveV2.ts} +83 -24
  148. package/src/Incentives/ERC20VariableIncentive.ts +4 -2
  149. package/src/Incentives/Incentive.ts +12 -12
  150. package/src/index.test.ts +2 -2
  151. package/src/index.ts +3 -2
  152. package/src/utils.ts +1 -1
  153. package/dist/Budget-BjfL8dVX.cjs +0 -2
  154. package/dist/Budget-BjfL8dVX.cjs.map +0 -1
  155. package/dist/Budget-DD7IPuDx.js +0 -922
  156. package/dist/Budget-DD7IPuDx.js.map +0 -1
  157. package/dist/Incentive-V1RjH38L.js +0 -1036
  158. package/dist/Incentive-V1RjH38L.js.map +0 -1
  159. package/dist/Incentive-gVTfsnMB.cjs +0 -2
  160. package/dist/Incentive-gVTfsnMB.cjs.map +0 -1
  161. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +0 -1
  162. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +0 -2
  163. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +0 -1
  164. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +0 -1
  165. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +0 -207
  166. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +0 -1
  167. package/dist/SimpleDenyList-BKfPoTo1.js +0 -133
  168. package/dist/SimpleDenyList-DgjVf7FK.cjs +0 -2
  169. package/dist/componentInterfaces-CA1UIqWL.js +0 -20
  170. package/dist/componentInterfaces-CA1UIqWL.js.map +0 -1
  171. package/dist/componentInterfaces-aBgBbB7r.cjs +0 -2
  172. package/dist/componentInterfaces-aBgBbB7r.cjs.map +0 -1
  173. package/dist/deployments-CwTZr-cK.cjs +0 -2
  174. package/dist/deployments-CwTZr-cK.cjs.map +0 -1
  175. package/dist/deployments-W_LUj833.js +0 -117
  176. package/dist/generated-BPiHi7W2.cjs +0 -3
  177. package/dist/generated-BPiHi7W2.cjs.map +0 -1
  178. package/dist/generated-CElkFqkY.js.map +0 -1
@@ -5,25 +5,25 @@ import { AllowListIncentive } from './AllowListIncentive';
5
5
  import { CGDAIncentive } from './CGDAIncentive';
6
6
  import { ERC20Incentive } from './ERC20Incentive';
7
7
  import { ERC20PeggedIncentive } from './ERC20PeggedIncentive';
8
- import { ERC20PeggedVariableCriteriaIncentive } from './ERC20PeggedVariableCriteriaIncentive';
9
- import { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';
8
+ import { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';
9
+ import { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';
10
10
  import { ERC20VariableIncentive } from './ERC20VariableIncentive';
11
11
  import { PointsIncentive } from './PointsIncentive';
12
- export { AllowListIncentive, CGDAIncentive, ERC20Incentive, ERC20PeggedIncentive, ERC20PeggedVariableCriteriaIncentive, PointsIncentive, ERC20VariableIncentive, ERC20VariableCriteriaIncentive, };
12
+ export { AllowListIncentive, CGDAIncentive, ERC20Incentive, ERC20PeggedIncentive, ERC20PeggedVariableCriteriaIncentiveV2, PointsIncentive, ERC20VariableIncentive, ERC20VariableCriteriaIncentiveV2, };
13
13
  /**
14
14
  * A union type representing all valid protocol Incentive implementations
15
15
  *
16
16
  * @export
17
17
  * @typedef {Incentive}
18
18
  */
19
- export type Incentive = AllowListIncentive | CGDAIncentive | ERC20Incentive | ERC20PeggedIncentive | ERC20PeggedVariableCriteriaIncentive | PointsIncentive | ERC20VariableIncentive | ERC20VariableCriteriaIncentive;
19
+ export type Incentive = AllowListIncentive | CGDAIncentive | ERC20Incentive | ERC20PeggedIncentive | ERC20PeggedVariableCriteriaIncentiveV2 | PointsIncentive | ERC20VariableIncentive | ERC20VariableCriteriaIncentiveV2;
20
20
  /**
21
21
  * A map of Incentive component interfaces to their constructors.
22
22
  *
23
- * @type {{ "0xc5b24b8e": typeof PointsIncentive; "0x8c901437": typeof ERC20Incentive; "0x4414fbb4": typeof ERC20PeggedIncentive; "0xf60c99c9": typeof ERC20PeggedVariableCriteriaIncentive; "0x56586338": typeof AllowListIncentive; "0xa39e44d9": typeof CGDAIncentive; "0xa8e4af1e": typeof ERC20VariableIncentive; "0x90318111": typeof ERC20VariableCriteriaIncentive }}
23
+ * @type {{ "0xc5b24b8e": typeof PointsIncentive; "0x8c901437": typeof ERC20Incentive; "0x4414fbb4": typeof ERC20PeggedIncentive; "0xf60c99c9": typeof ERC20PeggedVariableCriteriaIncentiveV2; "0x56586338": typeof AllowListIncentive; "0xa39e44d9": typeof CGDAIncentive; "0xa8e4af1e": typeof ERC20VariableIncentive; "0x90318111": typeof ERC20VariableCriteriaIncentiveV2 }}
24
24
  */
25
25
  export declare const IncentiveByComponentInterface: {
26
- [x: string]: typeof AllowListIncentive | typeof CGDAIncentive | typeof ERC20Incentive | typeof ERC20PeggedIncentive | typeof ERC20VariableIncentive | typeof ERC20VariableCriteriaIncentive | typeof ERC20PeggedVariableCriteriaIncentive | typeof PointsIncentive;
26
+ [x: string]: typeof AllowListIncentive | typeof CGDAIncentive | typeof ERC20Incentive | typeof ERC20PeggedIncentive | typeof ERC20VariableIncentive | typeof ERC20VariableCriteriaIncentiveV2 | typeof ERC20PeggedVariableCriteriaIncentiveV2 | typeof PointsIncentive;
27
27
  };
28
28
  /**
29
29
  * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
@@ -35,7 +35,7 @@ export declare const IncentiveByComponentInterface: {
35
35
  * @returns {Incentive}
36
36
  * @throws {@link InvalidComponentInterfaceError}
37
37
  */
38
- export declare function incentiveFromAddress(options: DeployableOptions, address: Address, params?: ReadParams): Promise<AllowListIncentive | CGDAIncentive | ERC20Incentive | ERC20PeggedIncentive | ERC20VariableCriteriaIncentive | ERC20PeggedVariableCriteriaIncentive | PointsIncentive | ERC20VariableIncentive<`0x${string}`, readonly [{
38
+ export declare function incentiveFromAddress(options: DeployableOptions, address: Address, params?: ReadParams): Promise<AllowListIncentive | CGDAIncentive | ERC20Incentive | ERC20PeggedIncentive | ERC20VariableCriteriaIncentiveV2 | ERC20PeggedVariableCriteriaIncentiveV2 | PointsIncentive | ERC20VariableIncentive<`0x${string}`, readonly [{
39
39
  readonly type: "constructor";
40
40
  readonly inputs: readonly [];
41
41
  readonly stateMutability: "nonpayable";
@@ -629,5 +629,5 @@ export declare function incentiveFromAddress(options: DeployableOptions, address
629
629
  readonly name: "transferOwnership";
630
630
  readonly outputs: readonly [];
631
631
  readonly stateMutability: "payable";
632
- }]>>;
632
+ }], bigint>>;
633
633
  //# sourceMappingURL=Incentive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Inc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 +1,24 @@
1
- import "../generated-CElkFqkY.js";
2
- import "../componentInterfaces-CA1UIqWL.js";
1
+ import "../generated-BJfQ-EBO.js";
2
+ import "../componentInterfaces-BVHB4Fjw.js";
3
3
  import "@wagmi/core";
4
4
  import "../errors.js";
5
- import { AllowListIncentive as a } from "./AllowListIncentive.js";
6
- import { CGDAIncentive as p } from "./CGDAIncentive.js";
5
+ import { AllowListIncentive as m } from "./AllowListIncentive.js";
6
+ import { CGDAIncentive as a } from "./CGDAIncentive.js";
7
7
  import { ERC20Incentive as I } from "./ERC20Incentive.js";
8
- import { E as C, a as f, I as s, i as x } from "../Incentive-V1RjH38L.js";
9
- import { ERC20VariableCriteriaIncentive as l } from "./ERC20VariableCriteriaIncentive.js";
8
+ import { E as f, I as C, i as x } from "../Incentive-CLKutfnD.js";
9
+ import { ERC20PeggedVariableCriteriaIncentiveV2 as E } from "./ERC20PeggedVariableCriteriaIncentiveV2.js";
10
+ import { ERC20VariableCriteriaIncentiveV2 as R } from "./ERC20VariableCriteriaIncentiveV2.js";
10
11
  import { ERC20VariableIncentive as d } from "./ERC20VariableIncentive.js";
11
12
  import { PointsIncentive as b } from "./PointsIncentive.js";
12
13
  export {
13
- a as AllowListIncentive,
14
- p as CGDAIncentive,
14
+ m as AllowListIncentive,
15
+ a as CGDAIncentive,
15
16
  I as ERC20Incentive,
16
- C as ERC20PeggedIncentive,
17
- f as ERC20PeggedVariableCriteriaIncentive,
18
- l as ERC20VariableCriteriaIncentive,
17
+ f as ERC20PeggedIncentive,
18
+ E as ERC20PeggedVariableCriteriaIncentiveV2,
19
+ R as ERC20VariableCriteriaIncentiveV2,
19
20
  d as ERC20VariableIncentive,
20
- s as IncentiveByComponentInterface,
21
+ C as IncentiveByComponentInterface,
21
22
  b as PointsIncentive,
22
23
  x as incentiveFromAddress
23
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Incentive.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"Incentive.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-BPiHi7W2.cjs"),d=require("viem"),n=require("../deployments-CwTZr-cK.cjs"),o=require("../Deployable/DeployableTarget.cjs"),l=require("../claiming.cjs"),u=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b5060156019565b6078565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b8160c01c808260011c146073578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100855f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea264697066735822122079bb08e80a9bd9117e174b7d6f5a63383597f9fcb4a121e18bc1685a513d4f3f64736f6c634300081a0033",c=class c extends o.DeployableTarget{constructor(){super(...arguments),this.abi=a.R}async claims(f){return await a.t0(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.a0(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.d0(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await a.e0(this._config,{address:this.assertValidAddress(),args:[f],...e})}async venue(f){return await a.f0(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.p0(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await a.m0(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:b,result:s}=await a.z0(this._config,{address:this.assertValidAddress(),args:[l.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await a.T0(this._config,b),result:s}}async isClaimable(f,e){return await a.o0(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,b]=await Promise.all([this.claims(f),this.limit(f)]);return b-e}buildParameters(f,e){const[b,s]=this.validateDeploymentConfig(f,e);return{abi:a.R,bytecode:y,args:[i(b)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e,b;return d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"amount"}],[((e=this.payload)==null?void 0:e.venue)??d.zeroAddress,((b=this.payload)==null?void 0:b.selector)??"0x00000000",f])}buildClaimData(){return d.zeroHash}};c.bases={31337:void 0,...n.PointsIncentive},c.registryType=u.RegistryType.INCENTIVE;let t=c;const i=({venue:r,selector:f,reward:e,limit:b})=>d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[r,f,e,b]);exports.pointsIncentiveAbi=a.R;exports.PointsIncentive=t;exports.preparePointsIncentivePayload=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-mJJNq-xb.cjs"),d=require("viem"),n=require("../deployments-D9QxJGrC.cjs"),o=require("../Deployable/DeployableTarget.cjs"),l=require("../claiming.cjs"),u=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ffbdb425e855f60328c6ebf81b28965fc1d20a52c81e723566d80b77f491fc3964736f6c634300081a0033",c=class c extends o.DeployableTarget{constructor(){super(...arguments),this.abi=b.C}async claims(f){return await b.Q_(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.K_(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.rP(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await b.$_(this._config,{address:this.assertValidAddress(),args:[f],...e})}async venue(f){return await b.lP(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.nP(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await b.pP(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:a,result:s}=await b.NP(this._config,{address:this.assertValidAddress(),args:[l.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.cP(this._config,a),result:s}}async isClaimable(f,e){return await b.tP(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,a]=await Promise.all([this.claims(f),this.limit(f)]);return a-e}buildParameters(f,e){const[a,s]=this.validateDeploymentConfig(f,e);return{abi:b.C,bytecode:y,args:[i(a)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e,a;return d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"amount"}],[((e=this.payload)==null?void 0:e.venue)??d.zeroAddress,((a=this.payload)==null?void 0:a.selector)??"0x00000000",f])}buildClaimData(){return d.zeroHash}};c.bases={31337:void 0,...n.PointsIncentive},c.registryType=u.RegistryType.INCENTIVE;let t=c;const i=({venue:r,selector:f,reward:e,limit:a})=>d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[r,f,e,a]);exports.pointsIncentiveAbi=b.C;exports.PointsIncentive=t;exports.preparePointsIncentivePayload=i;
2
2
  //# sourceMappingURL=PointsIncentive.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Generates a top-up payload for the PointsIncentive contract.\n *\n * @public\n * @param {bigint} netAmount The net reward amount to be added to the incentive.\n * @returns {Hex} The ABI-encoded top-up payload.\n */\n public getTopupPayload(netAmount: bigint): Hex {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'amount' },\n ],\n [\n this.payload?.venue ?? zeroAddress,\n this.payload?.selector ?? '0x00000000',\n netAmount,\n ],\n );\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","netAmount","encodeAbiParameters","_a","zeroAddress","_b","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward"],"mappings":"o8UAoGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,OAAOC,EAAqB,CAChC,OAAA,MAAMC,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAiC,KAAK,QAAS,CAC1D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QAAQI,EAAkBJ,EAAqB,CACnD,OAAA,MAAMK,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMM,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMO,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAA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CASO,gBAAgBG,EAAwB,SACtC,OAAAC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,CACpC,EACA,GACEC,EAAA,KAAK,UAAL,YAAAA,EAAc,QAASC,EAAA,cACvBC,EAAA,KAAK,UAAL,YAAAA,EAAc,WAAY,aAC1BJ,CACF,CAAA,CAEJ,CASO,gBAAiB,CACf,OAAAK,UACT,CACF,EA/QE/B,EAAuB,MAAiC,CACtD,MAAO,OACP,GAAIgC,EAAA,eAAA,EASNhC,EAAuB,aAA6BiC,EAAa,aAAA,UAvB5D,IAAMC,EAANlC,EAuSA,MAAMyB,EAAgC,CAAC,CAC5C,MAAAU,EACA,SAAAC,EACA,OAAAC,EACA,MAAAjB,CACF,IACSO,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACQ,EAAOC,EAAUC,EAAQjB,CAAK,CAAA"}
1
+ {"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Generates a top-up payload for the PointsIncentive contract.\n *\n * @public\n * @param {bigint} netAmount The net reward amount to be added to the incentive.\n * @returns {Hex} The ABI-encoded top-up payload.\n */\n public getTopupPayload(netAmount: bigint): Hex {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'amount' },\n ],\n [\n this.payload?.venue ?? zeroAddress,\n this.payload?.selector ?? '0x00000000',\n netAmount,\n ],\n );\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","netAmount","encodeAbiParameters","_a","zeroAddress","_b","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward"],"mappings":"48UAoGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA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,EASNhC,EAAuB,aAA6BiC,EAAa,aAAA,UAvB5D,IAAMC,EAANlC,EAuSA,MAAMyB,EAAgC,CAAC,CAC5C,MAAAU,EACA,SAAAC,EACA,OAAAC,EACA,MAAAjB,CACF,IACSO,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACQ,EAAOC,EAAUC,EAAQjB,CAAK,CAAA"}
@@ -1,10 +1,10 @@
1
- import { R as c, bg as r, bh as n, bi as o, bj as l, bk as m, bl as h, bm as u, bn as y, bo as p, bp as g } from "../generated-CElkFqkY.js";
1
+ import { C as c, by as r, bz as n, bA as o, bB as l, bC as m, bD as h, bE as u, bF as y, bG as p, bH as g } from "../generated-BJfQ-EBO.js";
2
2
  import { encodeAbiParameters as t, zeroAddress as w, zeroHash as A } from "viem";
3
- import { P as V } from "../deployments-W_LUj833.js";
4
- import { DeployableTarget as C } from "../Deployable/DeployableTarget.js";
5
- import { prepareClaimPayload as P } from "../claiming.js";
6
- import { RegistryType as R } from "../utils.js";
7
- const _ = "0x6080604052348015600e575f80fd5b5060156019565b6078565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b8160c01c808260011c146073578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100855f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea264697066735822122079bb08e80a9bd9117e174b7d6f5a63383597f9fcb4a121e18bc1685a513d4f3f64736f6c634300081a0033", e = class e extends C {
3
+ import { P } from "../deployments-De8_J7SS.js";
4
+ import { DeployableTarget as _ } from "../Deployable/DeployableTarget.js";
5
+ import { prepareClaimPayload as C } from "../claiming.js";
6
+ import { RegistryType as V } from "../utils.js";
7
+ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ffbdb425e855f60328c6ebf81b28965fc1d20a52c81e723566d80b77f491fc3964736f6c634300081a0033", e = class e extends _ {
8
8
  constructor() {
9
9
  super(...arguments), this.abi = c;
10
10
  }
@@ -144,7 +144,7 @@ const _ = "0x6080604052348015600e575f80fd5b5060156019565b6078565b63409feecd19805
144
144
  this._config,
145
145
  {
146
146
  address: this.assertValidAddress(),
147
- args: [P(f)],
147
+ args: [C(f)],
148
148
  ...this.optionallyAttachAccount(),
149
149
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
150
150
  ...b
@@ -212,8 +212,8 @@ const _ = "0x6080604052348015600e575f80fd5b5060156019565b6078565b63409feecd19805
212
212
  );
213
213
  return {
214
214
  abi: c,
215
- bytecode: _,
216
- args: [T(a)],
215
+ bytecode: R,
216
+ args: [v(a)],
217
217
  ...this.optionallyAttachAccount(d.account)
218
218
  };
219
219
  }
@@ -252,10 +252,10 @@ const _ = "0x6080604052348015600e575f80fd5b5060156019565b6078565b63409feecd19805
252
252
  };
253
253
  e.bases = {
254
254
  31337: void 0,
255
- ...V
256
- }, e.registryType = R.INCENTIVE;
255
+ ...P
256
+ }, e.registryType = V.INCENTIVE;
257
257
  let s = e;
258
- const T = ({
258
+ const v = ({
259
259
  venue: i,
260
260
  selector: f,
261
261
  reward: b,
@@ -272,6 +272,6 @@ const T = ({
272
272
  export {
273
273
  s as PointsIncentive,
274
274
  c as pointsIncentiveAbi,
275
- T as preparePointsIncentivePayload
275
+ v as preparePointsIncentivePayload
276
276
  };
277
277
  //# sourceMappingURL=PointsIncentive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Generates a top-up payload for the PointsIncentive contract.\n *\n * @public\n * @param {bigint} netAmount The net reward amount to be added to the incentive.\n * @returns {Hex} The ABI-encoded top-up payload.\n */\n public getTopupPayload(netAmount: bigint): Hex {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'amount' },\n ],\n [\n this.payload?.venue ?? zeroAddress,\n this.payload?.selector ?? '0x00000000',\n netAmount,\n ],\n );\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","netAmount","encodeAbiParameters","_a","zeroAddress","_b","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward"],"mappings":";;;;;;8qUAoGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,OAAOC,GAAqB;AAChC,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,cAAcA,GAAqB;AACvC,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OAAOA,GAAqB;AAChC,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AA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,OAAO;AAAA,IAAA;AAAA,EAEnD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,gBAAgBG,GAAwB;;AACtC,WAAAC;AAAA,MACL;AAAA,QACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,QACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,QACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,MACpC;AAAA,MACA;AAAA,UACEC,IAAA,KAAK,YAAL,gBAAAA,EAAc,UAASC;AAAA,UACvBC,IAAA,KAAK,YAAL,gBAAAA,EAAc,aAAY;AAAA,QAC1BJ;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,iBAAiB;AACf,WAAAK;AAAA,EACT;AACF;AA/QE/B,EAAuB,QAAiC;AAAA,EACtD,OAAO;AAAA,EACP,GAAIgC;AAAA,GASNhC,EAAuB,eAA6BiC,EAAa;AAvB5D,IAAMC,IAANlC;AAuSA,MAAMyB,IAAgC,CAAC;AAAA,EAC5C,OAAAU;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAjB;AACF,MACSO;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,IACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACQ,GAAOC,GAAUC,GAAQjB,CAAK;AAAA;"}
1
+ {"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Generates a top-up payload for the PointsIncentive contract.\n *\n * @public\n * @param {bigint} netAmount The net reward amount to be added to the incentive.\n * @returns {Hex} The ABI-encoded top-up payload.\n */\n public getTopupPayload(netAmount: bigint): Hex {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'amount' },\n ],\n [\n this.payload?.venue ?? zeroAddress,\n this.payload?.selector ?? '0x00000000',\n netAmount,\n ],\n );\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","netAmount","encodeAbiParameters","_a","zeroAddress","_b","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward"],"mappings":";;;;;;srUAoGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,OAAOC,GAAqB;AAChC,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,cAAcA,GAAqB;AACvC,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OAAOA,GAAqB;AAChC,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QAAQI,GAAkBJ,GAAqB;AACnD,WAAA,MAAMK,EAA2B,KAAK,SAAS;AAAA,MACpD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CAAO;AAAA;AAAA,MAEd,GAAIJ;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;A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YAAL,gBAAAA,EAAc,UAASC;AAAA,UACvBC,IAAA,KAAK,YAAL,gBAAAA,EAAc,aAAY;AAAA,QAC1BJ;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,iBAAiB;AACf,WAAAK;AAAA,EACT;AACF;AA/QE/B,EAAuB,QAAiC;AAAA,EACtD,OAAO;AAAA,EACP,GAAIgC;AAAA,GASNhC,EAAuB,eAA6BiC,EAAa;AAvB5D,IAAMC,IAANlC;AAuSA,MAAMyB,IAAgC,CAAC;AAAA,EAC5C,OAAAU;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAjB;AACF,MACSO;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,IACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACQ,GAAOC,GAAUC,GAAQjB,CAAK;AAAA;"}
@@ -0,0 +1,133 @@
1
+ import { F as r, au as n, ay as h, az as l, aA as p } from "./generated-BJfQ-EBO.js";
2
+ import { getAccount as u } from "@wagmi/core";
3
+ import { zeroHash as y, zeroAddress as m, encodeAbiParameters as w } from "viem";
4
+ import { a as A } from "./deployments-De8_J7SS.js";
5
+ import { DeployableTargetWithRBAC as g } from "./Deployable/DeployableTargetWithRBAC.js";
6
+ import { DeployableUnknownOwnerProvidedError as D } from "./errors.js";
7
+ import { RegistryType as R } from "./utils.js";
8
+ const x = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611161806100895f395ff3fe608060405260043610610183575f3560e01c806354d1f13d116100d1578063e3f756de1161007c578063f2fde38b11610057578063f2fde38b14610446578063fe9fbb8014610459578063fee81cf414610478575f80fd5b8063e3f756de146103d8578063ec87621c1461041f578063f04e283e14610433575f80fd5b80638da5cb5b116100ac5780638da5cb5b14610362578063be4994f81461039a578063dcc21361146103b9575f80fd5b806354d1f13d1461033e578063715018a61461034657806375b238fc1461034e575f80fd5b806328d6183b11610131578063439fab911161010c578063439fab91146102d75780634a4ee7b1146102f6578063514e62fc14610309575f80fd5b806328d6183b1461023f5780632de94807146102795780634359d28a146102b8575f80fd5b80631c10893f116101615780631c10893f146101ef5780631cd64df4146102025780632569296214610237575f80fd5b806301ffc9a714610187578063141973b0146101bb578063183a4f6e146101dc575b5f80fd5b348015610192575f80fd5b506101a66101a1366004610d5f565b6104a9565b60405190151581526020015b60405180910390f35b3480156101c6575f80fd5b506101da6101d5366004610ded565b610504565b005b6101da6101ea366004610e59565b610637565b6101da6101fd366004610ea1565b610644565b34801561020d575f80fd5b506101a661021c366004610ea1565b638b78c6d8600c9081525f9290925260209091205481161490565b6101da61065a565b34801561024a575f80fd5b506040517f3d30a22c0000000000000000000000000000000000000000000000000000000081526020016101b2565b348015610284575f80fd5b506102aa610293366004610ecb565b638b78c6d8600c9081525f91909152602090205490565b6040519081526020016101b2565b3480156102c3575f80fd5b506101da6102d2366004610ded565b6106a7565b3480156102e2575f80fd5b506101da6102f1366004610f24565b6107a1565b6101da610304366004610ea1565b6108d0565b348015610314575f80fd5b506101a6610323366004610ea1565b638b78c6d8600c9081525f9290925260209091205416151590565b6101da6108e2565b6101da61091b565b348015610359575f80fd5b506102aa600281565b34801561036d575f80fd5b50638b78c6d8195460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b2565b3480156103a5575f80fd5b506101da6103b4366004610ded565b61092e565b3480156103c4575f80fd5b506101da6103d3366004610ded565b6109cc565b3480156103e3575f80fd5b506101a66103f2366004610f63565b505073ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff161590565b34801561042a575f80fd5b506102aa600181565b6101da610441366004610ecb565b610a6a565b6101da610454366004610ecb565b610aa4565b348015610464575f80fd5b506101a6610473366004610ecb565b610aca565b348015610483575f80fd5b506102aa610492366004610ecb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f3d30a22c0000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610b29565b92915050565b61050d33610aca565b610543576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82811461057c576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156106305782828281811061059857610598610fb4565b90506020020160208101906105ad9190610fe1565b5f808787858181106105c1576105c1610fb4565b90506020020160208101906105d69190610ecb565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560010161057e565b5050505050565b6106413382610b7e565b50565b61064c610b89565b6106568282610ba3565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60026106b281610baf565b8382146106eb576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799575f84848381811061070857610708610fb4565b905060200201602081019061071d9190610fe1565b905080151560010361075f5761075a87878481811061073e5761073e610fb4565b90506020020160208101906107539190610ecb565b6001610ba3565b610790565b61079087878481811061077457610774610fb4565b90506020020160208101906107899190610ecb565b6001610b7e565b506001016106ed565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156107f25760018160011c14303b106107e95763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f806108018486018661102d565b9150915061080e82610be0565b5f5b81518110156108935760015f8084848151811061082f5761082f610fb4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610810565b50505080156108cb576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6108d8610b89565b6106568282610b7e565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610923610b89565b61092c5f610c28565b565b600261093981610baf565b838214610972576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799576109c486868381811061099157610991610fb4565b90506020020160208101906109a69190610ecb565b8585848181106109b8576109b8610fb4565b90506020020135610ba3565b600101610974565b60026109d781610baf565b838214610a10576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561079957610a62868683818110610a2f57610a2f610fb4565b9050602002016020810190610a449190610ecb565b858584818110610a5657610a56610fb4565b90506020020135610b7e565b600101610a12565b610a72610b89565b63389a75e1600c52805f526020600c208054421115610a9857636f5e88185f526004601cfd5b5f905561064181610c28565b610aac610b89565b8060601b610ac157637448fbae5f526004601cfd5b61064181610c28565b5f8173ffffffffffffffffffffffffffffffffffffffff16610aef638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806104fe5750638b78c6d8600c9081525f839052602090205460031615156104fe565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe2089f790000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610c72565b61065682825f610d08565b638b78c6d81954331461092c576382b429005f526004601cfd5b61065682826001610d08565b638b78c6d81954331461064157638b78c6d8600c52335f52806020600c205416610641576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806104fe57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146104fe565b638b78c6d8600c52825f526020600c20805483811783610d29575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215610d6f575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d9e575f80fd5b9392505050565b5f8083601f840112610db5575f80fd5b50813567ffffffffffffffff811115610dcc575f80fd5b6020830191508360208260051b8501011115610de6575f80fd5b9250929050565b5f805f8060408587031215610e00575f80fd5b843567ffffffffffffffff811115610e16575f80fd5b610e2287828801610da5565b909550935050602085013567ffffffffffffffff811115610e41575f80fd5b610e4d87828801610da5565b95989497509550505050565b5f60208284031215610e69575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610641575f80fd5b8035610e9c81610e70565b919050565b5f8060408385031215610eb2575f80fd5b8235610ebd81610e70565b946020939093013593505050565b5f60208284031215610edb575f80fd5b8135610d9e81610e70565b5f8083601f840112610ef6575f80fd5b50813567ffffffffffffffff811115610f0d575f80fd5b602083019150836020828501011115610de6575f80fd5b5f8060208385031215610f35575f80fd5b823567ffffffffffffffff811115610f4b575f80fd5b610f5785828601610ee6565b90969095509350505050565b5f805f60408486031215610f75575f80fd5b8335610f8081610e70565b9250602084013567ffffffffffffffff811115610f9b575f80fd5b610fa786828701610ee6565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215610ff1575f80fd5b81358015158114610d9e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f806040838503121561103e575f80fd5b823561104981610e70565b9150602083013567ffffffffffffffff811115611064575f80fd5b8301601f81018513611074575f80fd5b803567ffffffffffffffff81111561108e5761108e611000565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff821117156110d9576110d9611000565b6040529182526020818401810192908101888411156110f6575f80fd5b6020850194505b8385101561111c5761110e85610e91565b8152602094850194016110fd565b5080945050505050925092905056fea26469706673582212204d69d936427ed13e47d0a46a2354492a587c169d0bded852cb9b8d6f720204b864736f6c634300081a0033", c = class c extends g {
9
+ constructor() {
10
+ super(...arguments), this.abi = r;
11
+ }
12
+ /**
13
+ * Retrieves the owner
14
+ *
15
+ * @public
16
+ * @async
17
+ * @param {?ReadParams} [params]
18
+ * @returns {Promise<Address>} - The address of the owner
19
+ */
20
+ async owner(f) {
21
+ return await n(this._config, {
22
+ ...this.optionallyAttachAccount(),
23
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
24
+ ...f,
25
+ address: this.assertValidAddress(),
26
+ args: []
27
+ });
28
+ }
29
+ /**
30
+ * Check if a user is authorized (i.e. not denied)
31
+ *
32
+ * @public
33
+ * @async
34
+ * @param {Address} address - The address of the user
35
+ * @param {?ReadParams} [params]
36
+ * @returns {Promise<boolean>} - True if the user is authorized
37
+ */
38
+ async isAllowed(f, b) {
39
+ return await h(this._config, {
40
+ address: this.assertValidAddress(),
41
+ args: [f, y],
42
+ ...this.optionallyAttachAccount(),
43
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
44
+ ...b
45
+ });
46
+ }
47
+ /**
48
+ * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
49
+ *
50
+ * @public
51
+ * @async
52
+ * @param {Address[]} addresses - The list of users to update
53
+ * @param {boolean[]} allowed - The denied status of each user
54
+ * @param {?WriteParams} [params]
55
+ * @returns {Promise<void>}
56
+ */
57
+ async setDenied(f, b, a) {
58
+ return await this.awaitResult(
59
+ this.setDeniedRaw(f, b, a)
60
+ );
61
+ }
62
+ /**
63
+ * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
64
+ *
65
+ * @public
66
+ * @async
67
+ * @param {Address[]} addresses - The list of users to update
68
+ * @param {boolean[]} allowed - The denied status of each user
69
+ * @param {?WriteParams} [params]
70
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
71
+ */
72
+ async setDeniedRaw(f, b, a) {
73
+ const { request: e, result: d } = await l(
74
+ this._config,
75
+ {
76
+ address: this.assertValidAddress(),
77
+ args: [f, b],
78
+ ...this.optionallyAttachAccount(),
79
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
80
+ ...a
81
+ }
82
+ );
83
+ return { hash: await p(this._config, e), result: d };
84
+ }
85
+ /**
86
+ * @inheritdoc
87
+ *
88
+ * @public
89
+ * @param {?SimpleDenyListPayload} [_payload]
90
+ * @param {?DeployableOptions} [_options]
91
+ * @returns {GenericDeployableParams}
92
+ */
93
+ buildParameters(f, b) {
94
+ var t;
95
+ const [a, e] = this.validateDeploymentConfig(f, b), d = a;
96
+ if (!d.owner || d.owner === m) {
97
+ const s = e.account ? e.account.address : e.config ? u(e.config).address : (t = this._account) == null ? void 0 : t.address;
98
+ if (s)
99
+ d.owner = s;
100
+ else
101
+ throw new D();
102
+ }
103
+ return {
104
+ abi: r,
105
+ bytecode: x,
106
+ args: [P(d)],
107
+ ...this.optionallyAttachAccount(e.account)
108
+ };
109
+ }
110
+ };
111
+ c.bases = {
112
+ 31337: void 0,
113
+ ...A
114
+ }, c.registryType = R.ALLOW_LIST;
115
+ let o = c;
116
+ function P({
117
+ owner: i,
118
+ denied: f
119
+ }) {
120
+ return w(
121
+ [
122
+ { type: "address", name: "owner" },
123
+ { type: "address[]", name: "denied" }
124
+ ],
125
+ [i, f]
126
+ );
127
+ }
128
+ export {
129
+ o as S,
130
+ x as b,
131
+ P as p
132
+ };
133
+ //# sourceMappingURL=SimpleDenyList-C1C_BHkY.js.map