@boostxyz/sdk 2.0.0 → 2.1.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 (109) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +4 -4
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.js +17 -17
  5. package/dist/Actions/EventAction.js.map +1 -1
  6. package/dist/AllowLists/AllowList.cjs +1 -1
  7. package/dist/AllowLists/AllowList.js +5 -5
  8. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  9. package/dist/AllowLists/SimpleAllowList.js +19 -19
  10. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  11. package/dist/AllowLists/SimpleDenyList.js +3 -3
  12. package/dist/Auth/PassthroughAuth.cjs +1 -1
  13. package/dist/Auth/PassthroughAuth.js +1 -1
  14. package/dist/BoostCore.cjs +2 -2
  15. package/dist/BoostCore.cjs.map +1 -1
  16. package/dist/BoostCore.d.ts +14 -0
  17. package/dist/BoostCore.d.ts.map +1 -1
  18. package/dist/BoostCore.js +100 -81
  19. package/dist/BoostCore.js.map +1 -1
  20. package/dist/BoostRegistry.cjs +1 -1
  21. package/dist/BoostRegistry.js +31 -31
  22. package/dist/Budget-B0kJsZtZ.cjs +2 -0
  23. package/dist/Budget-B0kJsZtZ.cjs.map +1 -0
  24. package/dist/Budget-NtzY9H7G.js +462 -0
  25. package/dist/Budget-NtzY9H7G.js.map +1 -0
  26. package/dist/Budgets/Budget.cjs +1 -1
  27. package/dist/Budgets/Budget.cjs.map +1 -1
  28. package/dist/Budgets/Budget.d.ts +5 -4
  29. package/dist/Budgets/Budget.d.ts.map +1 -1
  30. package/dist/Budgets/Budget.js +9 -26
  31. package/dist/Budgets/Budget.js.map +1 -1
  32. package/dist/Budgets/ManagedBudget.cjs +1 -1
  33. package/dist/Budgets/ManagedBudget.js +34 -34
  34. package/dist/Budgets/ManagedBudgetWithFees.d.ts +1203 -0
  35. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -0
  36. package/dist/Deployable/DeployableTarget.cjs +1 -1
  37. package/dist/Deployable/DeployableTarget.js +1 -1
  38. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  39. package/dist/Deployable/DeployableTargetWithRBAC.js +23 -23
  40. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  41. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  42. package/dist/Incentives/AllowListIncentive.js +16 -16
  43. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  44. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  45. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  46. package/dist/Incentives/CGDAIncentive.js +28 -28
  47. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  48. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  49. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  50. package/dist/Incentives/ERC20Incentive.js +25 -25
  51. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  52. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  53. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  54. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +29 -29
  55. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  56. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  57. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  58. package/dist/Incentives/ERC20VariableIncentive.js +6 -6
  59. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  60. package/dist/Incentives/Incentive.cjs +1 -1
  61. package/dist/Incentives/Incentive.js +4 -4
  62. package/dist/Incentives/PointsIncentive.cjs +1 -1
  63. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  64. package/dist/Incentives/PointsIncentive.js +12 -12
  65. package/dist/Incentives/PointsIncentive.js.map +1 -1
  66. package/dist/{SimpleDenyList-wDvsNIuY.cjs → SimpleDenyList-B65fnca2.cjs} +2 -2
  67. package/dist/{SimpleDenyList-wDvsNIuY.cjs.map → SimpleDenyList-B65fnca2.cjs.map} +1 -1
  68. package/dist/{SimpleDenyList-D-rGBaay.js → SimpleDenyList-UvXQl2vm.js} +20 -20
  69. package/dist/{SimpleDenyList-D-rGBaay.js.map → SimpleDenyList-UvXQl2vm.js.map} +1 -1
  70. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  71. package/dist/Validators/LimitedSignerValidator.js +9 -9
  72. package/dist/Validators/SignerValidator.cjs +1 -1
  73. package/dist/Validators/SignerValidator.js +8 -8
  74. package/dist/Validators/Validator.cjs +1 -1
  75. package/dist/Validators/Validator.cjs.map +1 -1
  76. package/dist/Validators/Validator.js +20 -20
  77. package/dist/componentInterfaces-Bt-4sNB5.cjs +2 -0
  78. package/dist/componentInterfaces-Bt-4sNB5.cjs.map +1 -0
  79. package/dist/componentInterfaces-dakxtQHf.js +16 -0
  80. package/dist/componentInterfaces-dakxtQHf.js.map +1 -0
  81. package/dist/deployments-DxkwtCyu.cjs +2 -0
  82. package/dist/deployments-DxkwtCyu.cjs.map +1 -0
  83. package/dist/{deployments-BdPDIh-i.js → deployments-ZLVwJGZD.js} +33 -30
  84. package/dist/deployments-ZLVwJGZD.js.map +1 -0
  85. package/dist/deployments.json +17 -14
  86. package/dist/{generated-CDEDSOGZ.js → generated-B0XfMfoq.js} +1037 -470
  87. package/dist/generated-B0XfMfoq.js.map +1 -0
  88. package/dist/generated-pNKCp_Ez.cjs +3 -0
  89. package/dist/generated-pNKCp_Ez.cjs.map +1 -0
  90. package/dist/index.cjs +1 -1
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +148 -145
  94. package/package.json +1 -1
  95. package/src/BoostCore.ts +30 -0
  96. package/src/Budgets/Budget.ts +8 -3
  97. package/src/Budgets/ManagedBudgetWithFees.test.ts +286 -0
  98. package/src/Budgets/ManagedBudgetWithFees.ts +671 -0
  99. package/src/index.ts +1 -0
  100. package/dist/componentInterfaces-BQw7DH-m.cjs +0 -2
  101. package/dist/componentInterfaces-BQw7DH-m.cjs.map +0 -1
  102. package/dist/componentInterfaces-C0vuWQlh.js +0 -15
  103. package/dist/componentInterfaces-C0vuWQlh.js.map +0 -1
  104. package/dist/deployments--f75Pthq.cjs +0 -2
  105. package/dist/deployments--f75Pthq.cjs.map +0 -1
  106. package/dist/deployments-BdPDIh-i.js.map +0 -1
  107. package/dist/generated-CDEDSOGZ.js.map +0 -1
  108. package/dist/generated-D3DE5TfH.cjs +0 -3
  109. package/dist/generated-D3DE5TfH.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManagedBudgetWithFees.d.ts","sourceRoot":"","sources":["../../src/Budgets/ManagedBudgetWithFees.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAoBzB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,EACxB,KAAK,KAAK,EACX,MAAM,wCAAwC,CAAC;AAEhD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,UAAU,EAAE,OAAO,EAAE,CAAC;IACtB;;;;OAI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AAC,EAAE,MAAM,GAAG,SAAS,EAC5B,MAAM,CAAC,EAAE,UAAU;IAUrB;;;;;;;;;OASG;IACI,WAAW,CAChB,KAAK,GAAE,OAAqB,EAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,EAC5B,MAAM,CAAC,EAAE,UAAU;IAUrB;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,4BAA4B,EACvC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAwB3B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC,iDAK7C,4BAA4B,kBAe9B,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-D3DE5TfH.cjs"),u=require("@wagmi/core"),i=require("viem"),d=require("../errors.cjs"),l=require("../utils.cjs"),h=require("./Deployable.cjs"),a=class a extends h.Deployable{constructor(e,s,t){super(e,s),this._isBase=!0,typeof s=="string"&&i.isAddress(s)&&s!==i.zeroAddress&&!Object.values(this.bases).some(r=>!s||!r?!1:i.isAddressEqual(s,r))&&(t=!1),t!==void 0&&(this._isBase=t)}get isBase(){return this.address&&Object.values(this.bases).some(e=>i.isAddressEqual(this.address,e))?!0:this._isBase}get bases(){return this.constructor.bases}get registryType(){return this.constructor.registryType}async deploy(e,s,t){return await super.deploy(e,s,t),this.assertValidAddress(),this}async deployRaw(e,s){if(this.address)throw new d.DeployableAlreadyDeployedError(this.address);const t=e||this._payload,r=(s==null?void 0:s.config)||this._config,{args:y,...o}=this.buildParameters(t);return await u.deployContract(r,{...o,...this.optionallyAttachAccount(s==null?void 0:s.account),args:[]})}async supportsInterface(e,s){return await c.Bi(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...s,args:[e]})}async getComponentInterface(e){return await c.xi(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[]})}validateDeploymentConfig(e,s){const t=e||this._payload;if(!t)throw new d.DeployableMissingPayloadError;return super.validateDeploymentConfig(t,s)}};a.bases={},a.registryType=l.RegistryType.ACTION;let n=a;exports.DeployableTarget=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-pNKCp_Ez.cjs"),u=require("@wagmi/core"),i=require("viem"),d=require("../errors.cjs"),l=require("../utils.cjs"),h=require("./Deployable.cjs"),a=class a extends h.Deployable{constructor(e,s,t){super(e,s),this._isBase=!0,typeof s=="string"&&i.isAddress(s)&&s!==i.zeroAddress&&!Object.values(this.bases).some(r=>!s||!r?!1:i.isAddressEqual(s,r))&&(t=!1),t!==void 0&&(this._isBase=t)}get isBase(){return this.address&&Object.values(this.bases).some(e=>i.isAddressEqual(this.address,e))?!0:this._isBase}get bases(){return this.constructor.bases}get registryType(){return this.constructor.registryType}async deploy(e,s,t){return await super.deploy(e,s,t),this.assertValidAddress(),this}async deployRaw(e,s){if(this.address)throw new d.DeployableAlreadyDeployedError(this.address);const t=e||this._payload,r=(s==null?void 0:s.config)||this._config,{args:y,...o}=this.buildParameters(t);return await u.deployContract(r,{...o,...this.optionallyAttachAccount(s==null?void 0:s.account),args:[]})}async supportsInterface(e,s){return await c.Li(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...s,args:[e]})}async getComponentInterface(e){return await c.Fi(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[]})}validateDeploymentConfig(e,s){const t=e||this._payload;if(!t)throw new d.DeployableMissingPayloadError;return super.validateDeploymentConfig(t,s)}};a.bases={},a.registryType=l.RegistryType.ACTION;let n=a;exports.DeployableTarget=n;
2
2
  //# sourceMappingURL=DeployableTarget.cjs.map
@@ -1,4 +1,4 @@
1
- import { q as d, r as c } from "../generated-CDEDSOGZ.js";
1
+ import { n as d, q as c } from "../generated-B0XfMfoq.js";
2
2
  import { deployContract as h } from "@wagmi/core";
3
3
  import { isAddress as u, zeroAddress as l, isAddressEqual as a } from "viem";
4
4
  import { DeployableAlreadyDeployedError as y, DeployableMissingPayloadError as f } from "../errors.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-D3DE5TfH.cjs"),c=require("./DeployableTarget.cjs");var h=(n=>(n[n.MANAGER=1n]="MANAGER",n[n.ADMIN=2n]="ADMIN",n))(h||{});class l extends c.DeployableTarget{async setAuthorized(t,s,a){return await this.awaitResult(this.setAuthorizedRaw(t,s,a))}async setAuthorizedRaw(t,s,a){const{request:i,result:r}=await e.DC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.OC(this._config,i),result:r}}async grantRoles(t,s,a){return await this.awaitResult(this.grantRolesRaw(t,s,a))}async grantRolesRaw(t,s,a){const{request:i,result:r}=await e.BC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.IC(this._config,i),result:r}}async revokeRoles(t,s,a){return await this.awaitResult(this.revokeRolesRaw(t,s,a))}async revokeRolesRaw(t,s,a){const{request:i,result:r}=await e._C(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.RC(this._config,i),result:r}}async grantManyRoles(t,s,a){return await this.awaitResult(this.grantManyRolesRaw(t,s,a))}async grantManyRolesRaw(t,s,a){const{request:i,result:r}=await e.xC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.AC(this._config,i),result:r}}async revokeManyRoles(t,s,a){return await this.awaitResult(this.revokeManyRolesRaw(t,s,a))}async revokeManyRolesRaw(t,s,a){const{request:i,result:r}=await e.kC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.MC(this._config,i),result:r}}async rolesOf(t,s){const a=await e.fC(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s});return[h.MANAGER,h.ADMIN].filter(i=>(a&i)===i)}hasAnyRole(t,s,a){return e.dC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}hasAllRoles(t,s,a){return e.yC(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}isAuthorized(t,s){return e.cC(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s})}}exports.rbacAbi=e.O;exports.DeployableTargetWithRBAC=l;exports.Roles=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-pNKCp_Ez.cjs"),c=require("./DeployableTarget.cjs");var h=(n=>(n[n.MANAGER=1n]="MANAGER",n[n.ADMIN=2n]="ADMIN",n))(h||{});class l extends c.DeployableTarget{async setAuthorized(t,s,a){return await this.awaitResult(this.setAuthorizedRaw(t,s,a))}async setAuthorizedRaw(t,s,a){const{request:r,result:i}=await e.SB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.IB(this._config,r),result:i}}async grantRoles(t,s,a){return await this.awaitResult(this.grantRolesRaw(t,s,a))}async grantRolesRaw(t,s,a){const{request:r,result:i}=await e.CB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.fB(this._config,r),result:i}}async revokeRoles(t,s,a){return await this.awaitResult(this.revokeRolesRaw(t,s,a))}async revokeRolesRaw(t,s,a){const{request:r,result:i}=await e.xB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.hB(this._config,r),result:i}}async grantManyRoles(t,s,a){return await this.awaitResult(this.grantManyRolesRaw(t,s,a))}async grantManyRolesRaw(t,s,a){const{request:r,result:i}=await e.OB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.bB(this._config,r),result:i}}async revokeManyRoles(t,s,a){return await this.awaitResult(this.revokeManyRolesRaw(t,s,a))}async revokeManyRolesRaw(t,s,a){const{request:r,result:i}=await e.HB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.AB(this._config,r),result:i}}async rolesOf(t,s){const a=await e.yB(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s});return[h.MANAGER,h.ADMIN].filter(r=>(a&r)===r)}hasAnyRole(t,s,a){return e.oB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}hasAllRoles(t,s,a){return e.rB(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}isAuthorized(t,s){return e.pB(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s})}}exports.rbacAbi=e.E;exports.DeployableTargetWithRBAC=l;exports.Roles=h;
2
2
  //# sourceMappingURL=DeployableTargetWithRBAC.cjs.map
@@ -1,7 +1,7 @@
1
- import { D as h, a as c, B as l, I as d, _ as A, R as u, x as R, e as g, k as w, h as y, j as f, l as _, y as p, n as C } from "../generated-CDEDSOGZ.js";
2
- import { O as m } from "../generated-CDEDSOGZ.js";
1
+ import { S as h, a as c, C as l, c as d, x as A, d as u, e as g, g as w, i as y, A as R, y as f, j as p, k as B, p as _ } from "../generated-B0XfMfoq.js";
2
+ import { E as m } from "../generated-B0XfMfoq.js";
3
3
  import { DeployableTarget as M } from "./DeployableTarget.js";
4
- var o = /* @__PURE__ */ ((r) => (r[r.MANAGER = 1n] = "MANAGER", r[r.ADMIN = 2n] = "ADMIN", r))(o || {});
4
+ var o = /* @__PURE__ */ ((e) => (e[e.MANAGER = 1n] = "MANAGER", e[e.ADMIN = 2n] = "ADMIN", e))(o || {});
5
5
  class v extends M {
6
6
  /**
7
7
  * Set the authorized status of the given accounts
@@ -31,14 +31,14 @@ class v extends M {
31
31
  * @returns {Promise<void>}
32
32
  */
33
33
  async setAuthorizedRaw(s, t, a) {
34
- const { request: e, result: i } = await h(this._config, {
34
+ const { request: i, result: r } = await h(this._config, {
35
35
  address: this.assertValidAddress(),
36
36
  args: [s, t],
37
37
  ...this.optionallyAttachAccount(),
38
38
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
39
39
  ...a
40
40
  });
41
- return { hash: await c(this._config, e), result: i };
41
+ return { hash: await c(this._config, i), result: r };
42
42
  }
43
43
  /**
44
44
  * Grant permissions for a user on the rbac.
@@ -72,7 +72,7 @@ class v extends M {
72
72
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
73
73
  */
74
74
  async grantRolesRaw(s, t, a) {
75
- const { request: e, result: i } = await l(this._config, {
75
+ const { request: i, result: r } = await l(this._config, {
76
76
  address: this.assertValidAddress(),
77
77
  args: [s, t],
78
78
  ...this.optionallyAttachAccount(),
@@ -82,8 +82,8 @@ class v extends M {
82
82
  return { hash: await d(
83
83
  this._config,
84
84
  // biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
85
- e
86
- ), result: i };
85
+ i
86
+ ), result: r };
87
87
  }
88
88
  /**
89
89
  * Revoke permissions for a user on the rbac.
@@ -117,7 +117,7 @@ class v extends M {
117
117
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
118
118
  */
119
119
  async revokeRolesRaw(s, t, a) {
120
- const { request: e, result: i } = await A(this._config, {
120
+ const { request: i, result: r } = await A(this._config, {
121
121
  address: this.assertValidAddress(),
122
122
  args: [s, t],
123
123
  ...this.optionallyAttachAccount(),
@@ -127,8 +127,8 @@ class v extends M {
127
127
  return { hash: await u(
128
128
  this._config,
129
129
  // biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
130
- e
131
- ), result: i };
130
+ i
131
+ ), result: r };
132
132
  }
133
133
  /**
134
134
  * Grant many accounts permissions on the rbac.
@@ -164,18 +164,18 @@ class v extends M {
164
164
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
165
165
  */
166
166
  async grantManyRolesRaw(s, t, a) {
167
- const { request: e, result: i } = await R(this._config, {
167
+ const { request: i, result: r } = await g(this._config, {
168
168
  address: this.assertValidAddress(),
169
169
  args: [s, t],
170
170
  ...this.optionallyAttachAccount(),
171
171
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
172
172
  ...a
173
173
  });
174
- return { hash: await g(
174
+ return { hash: await w(
175
175
  this._config,
176
176
  // biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
177
- e
178
- ), result: i };
177
+ i
178
+ ), result: r };
179
179
  }
180
180
  /**
181
181
  * Revoke many accounts' permissions on the rbac.
@@ -211,7 +211,7 @@ class v extends M {
211
211
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
212
212
  */
213
213
  async revokeManyRolesRaw(s, t, a) {
214
- const { request: e, result: i } = await w(
214
+ const { request: i, result: r } = await y(
215
215
  this._config,
216
216
  {
217
217
  address: this.assertValidAddress(),
@@ -221,11 +221,11 @@ class v extends M {
221
221
  ...a
222
222
  }
223
223
  );
224
- return { hash: await y(
224
+ return { hash: await R(
225
225
  this._config,
226
226
  // biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
227
- e
228
- ), result: i };
227
+ i
228
+ ), result: r };
229
229
  }
230
230
  /**
231
231
  * Return an array of the roles assigned to the given account.
@@ -247,7 +247,7 @@ class v extends M {
247
247
  ...t
248
248
  });
249
249
  return [o.MANAGER, o.ADMIN].filter(
250
- (e) => (a & e) === e
250
+ (i) => (a & i) === i
251
251
  );
252
252
  }
253
253
  /**
@@ -264,7 +264,7 @@ class v extends M {
264
264
  * @returns {Promise<boolean>}
265
265
  */
266
266
  hasAnyRole(s, t, a) {
267
- return _(this._config, {
267
+ return p(this._config, {
268
268
  address: this.assertValidAddress(),
269
269
  args: [s, t],
270
270
  ...this.optionallyAttachAccount(),
@@ -286,7 +286,7 @@ class v extends M {
286
286
  * @returns {Promise<boolean>}
287
287
  */
288
288
  hasAllRoles(s, t, a) {
289
- return p(this._config, {
289
+ return B(this._config, {
290
290
  address: this.assertValidAddress(),
291
291
  args: [s, t],
292
292
  ...this.optionallyAttachAccount(),
@@ -303,7 +303,7 @@ class v extends M {
303
303
  * @returns {Promise<boolean>} - True if the account is authorized
304
304
  */
305
305
  isAuthorized(s, t) {
306
- return C(this._config, {
306
+ return _(this._config, {
307
307
  address: this.assertValidAddress(),
308
308
  args: [s],
309
309
  ...this.optionallyAttachAccount(),
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-D3DE5TfH.cjs"),i=require("viem"),l=require("../deployments--f75Pthq.cjs");require("@wagmi/core");const o=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-wDvsNIuY.cjs");const m=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),u=require("../utils.cjs"),h="0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610062575f80fd5b5061007161007660201b60201c565b61010b565b5f6100856100e260201b60201c565b90508054600181161561009f5763f92ee8a95f526004601cfd5b8160c01c808260011c146100dd578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611815806101185f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038a578063db09da12146103c6578063dcc59b6f14610402578063f04e283e1461042c578063f2fde38b14610448578063fee81cf41461046457610129565b8063715018a6146102c657806387b9d25c146102d05780638da5cb5b146102fa578063a4d66daf14610324578063bb1757cf1461034e57610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461028057806354d1f13d146102bc57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611006565b6104a0565b604051610160919061104b565b60405180910390f35b348015610174575f80fd5b5061017d610519565b60405161018a919061107c565b60405180910390f35b34801561019e575f80fd5b506101a7610522565b6040516101b4919061107c565b60405180910390f35b6101c5610528565b005b3480156101d2575f80fd5b506101db610579565b6040516101e891906110a4565b60405180910390f35b3480156101fc575f80fd5b506102056105a0565b60405161021291906110fc565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c9190611176565b6105c3565b005b34801561024e575f80fd5b5061026960048036038101906102649190611176565b6106a3565b6040516102779291906111c1565b60405180910390f35b34801561028b575f80fd5b506102a660048036038101906102a19190611176565b6106d7565b6040516102b39190611258565b60405180910390f35b6102c461072e565b005b6102ce610767565b005b3480156102db575f80fd5b506102e461077a565b6040516102f191906112d3565b60405180910390f35b348015610305575f80fd5b5061030e61079f565b60405161031b91906110fc565b60405180910390f35b34801561032f575f80fd5b506103386107c7565b604051610345919061107c565b60405180910390f35b348015610359575f80fd5b50610374600480360381019061036f9190611316565b6107cd565b604051610381919061104b565b60405180910390f35b348015610395575f80fd5b506103b060048036038101906103ab9190611373565b610973565b6040516103bd919061104b565b60405180910390f35b3480156103d1575f80fd5b506103ec60048036038101906103e79190611316565b610990565b6040516103f9919061104b565b60405180910390f35b34801561040d575f80fd5b50610416610a96565b604051610423919061107c565b60405180910390f35b61044660048036038101906104419190611373565b610a9c565b005b610462600480360381019061045d9190611373565b610ada565b005b34801561046f575f80fd5b5061048a60048036038101906104859190611373565b610b03565b604051610497919061107c565b60405180910390f35b5f7fc2c281ec000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610512575061051182610b1c565b5b9050919050565b5f600254905090565b60025481565b5f610531610b95565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc2c281ec00000000000000000000000000000000000000000000000000000000905090565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6105cc610b9f565b905080546003825580156105fe5760018160011c14303b106105f55763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061060f91906114cc565b905061061a33610bc8565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160048190555050801561069e576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106f3576106f26113a2565b5b6040519080825280601f01601f1916602001820160405280156107255781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61076f610c9e565b6107785f610cd5565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f6107d6610c9e565b60045460015f8154809291906107eb90611524565b91905055101580610842575060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b15610879576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f806108d986610d9b565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016109399291906116d9565b5f604051808303815f87803b158015610950575f80fd5b505af1158015610962573d5f803e3d5ffd5b505050506001925050509392505050565b6005602052805f5260405f205f915054906101000a900460ff1681565b5f6004546001541080156109eb575060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a8d575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b8152600401610a4c9190611731565b602060405180830381865afa158015610a67573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a8b9190611787565b155b90509392505050565b60015481565b610aa4610c9e565b63389a75e1600c52805f526020600c208054421115610aca57636f5e88185f526004601cfd5b5f815550610ad781610cd5565b50565b610ae2610c9e565b8060601b610af757637448fbae5f526004601cfd5b610b0081610cd5565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b8e5750610b8d82610eba565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd0610f33565b15610c48577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0a57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9b565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610cd3576382b429005f526004601cfd5b565b610cdd610f33565b15610d42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d98565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610dba57610db96113a2565b5b604051908082528060200260200182016040528015610de85781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610e0757610e066113a2565b5b604051908082528060200260200182016040528015610e355781602001602082028036833780820191505090505b50905084825f81518110610e4c57610e4b6117b2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e9b57610e9a6117b2565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f2c5750610f2b82610f37565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fe581610fb1565b8114610fef575f80fd5b50565b5f8135905061100081610fdc565b92915050565b5f6020828403121561101b5761101a610fa9565b5b5f61102884828501610ff2565b91505092915050565b5f8115159050919050565b61104581611031565b82525050565b5f60208201905061105e5f83018461103c565b92915050565b5f819050919050565b61107681611064565b82525050565b5f60208201905061108f5f83018461106d565b92915050565b61109e81610fb1565b82525050565b5f6020820190506110b75f830184611095565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110e6826110bd565b9050919050565b6110f6816110dc565b82525050565b5f60208201905061110f5f8301846110ed565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261113657611135611115565b5b8235905067ffffffffffffffff81111561115357611152611119565b5b60208301915083600182028301111561116f5761116e61111d565b5b9250929050565b5f806020838503121561118c5761118b610fa9565b5b5f83013567ffffffffffffffff8111156111a9576111a8610fad565b5b6111b585828601611121565b92509250509250929050565b5f6040820190506111d45f83018561106d565b6111e160208301846110ed565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61122a826111e8565b61123481856111f2565b9350611244818560208601611202565b61124d81611210565b840191505092915050565b5f6020820190508181035f8301526112708184611220565b905092915050565b5f819050919050565b5f61129b611296611291846110bd565b611278565b6110bd565b9050919050565b5f6112ac82611281565b9050919050565b5f6112bd826112a2565b9050919050565b6112cd816112b3565b82525050565b5f6020820190506112e65f8301846112c4565b92915050565b6112f5816110dc565b81146112ff575f80fd5b50565b5f81359050611310816112ec565b92915050565b5f805f6040848603121561132d5761132c610fa9565b5b5f61133a86828701611302565b935050602084013567ffffffffffffffff81111561135b5761135a610fad565b5b61136786828701611121565b92509250509250925092565b5f6020828403121561138857611387610fa9565b5b5f61139584828501611302565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6113d882611210565b810181811067ffffffffffffffff821117156113f7576113f66113a2565b5b80604052505050565b5f611409610fa0565b905061141582826113cf565b919050565b5f611424826110dc565b9050919050565b6114348161141a565b811461143e575f80fd5b50565b5f8135905061144f8161142b565b92915050565b61145e81611064565b8114611468575f80fd5b50565b5f8135905061147981611455565b92915050565b5f604082840312156114945761149361139e565b5b61149e6040611400565b90505f6114ad84828501611441565b5f8301525060206114c08482850161146b565b60208301525092915050565b5f604082840312156114e1576114e0610fa9565b5b5f6114ee8482850161147f565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61152e82611064565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115605761155f6114f7565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61159d816110dc565b82525050565b5f6115ae8383611594565b60208301905092915050565b5f602082019050919050565b5f6115d08261156b565b6115da8185611575565b93506115e583611585565b805f5b838110156116155781516115fc88826115a3565b9750611607836115ba565b9250506001810190506115e8565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61165481611031565b82525050565b5f611665838361164b565b60208301905092915050565b5f602082019050919050565b5f61168782611622565b611691818561162c565b935061169c8361163c565b805f5b838110156116cc5781516116b3888261165a565b97506116be83611671565b92505060018101905061169f565b5085935050505092915050565b5f6040820190508181035f8301526116f181856115c6565b90508181036020830152611705818461167d565b90509392505050565b50565b5f61171c5f836111f2565b91506117278261170e565b5f82019050919050565b5f6040820190506117445f8301846110ed565b818103602083015261175581611711565b905092915050565b61176681611031565b8114611770575f80fd5b50565b5f815190506117818161175d565b92915050565b5f6020828403121561179c5761179b610fa9565b5b5f6117a984828501611773565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212202f2805b0b43803fbc9dd3f411ae04b22f4b0334ed912f80ca9b152bb7696ae2b64736f6c634300081a0033",d=class d extends m.DeployableTarget{constructor(){super(...arguments),this.abi=a.C}async owner(f){return await a.Am(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.mm(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.hm(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.cm(this._config,{address:this.assertValidAddress(),args:[f],...b})}async allowList(f){const b=await a.ym(this._config,{address:this.assertValidAddress(),...f});return new o.SimpleAllowList({config:this._config,account:this._account},b)}async limit(f){return await a.Tm(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:c}=await a.Vm(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.Om(this._config,e),result:c}}async isClaimable(f,b){return await a.wm(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...b})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.claims(f),this.limit(f)]);return e-b}buildParameters(f,b){const[e,c]=this.validateDeploymentConfig(f,b);return{abi:a.C,bytecode:h,args:[r(e)],...this.optionallyAttachAccount(c.account)}}buildClaimData(){return i.zeroHash}};d.bases={31337:void 0,...l.AllowListIncentive},d.registryType=u.RegistryType.INCENTIVE;let s=d;const r=({allowList:n,limit:f})=>i.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[n,f]);exports.allowListIncentiveAbi=a.C;exports.AllowListIncentive=s;exports.prepareAllowListIncentivePayload=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-pNKCp_Ez.cjs"),i=require("viem"),l=require("../deployments-DxkwtCyu.cjs");require("@wagmi/core");const o=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-B65fnca2.cjs");const u=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),h=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61180b806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038a578063db09da12146103c6578063dcc59b6f14610402578063f04e283e1461042c578063f2fde38b14610448578063fee81cf41461046457610129565b8063715018a6146102c657806387b9d25c146102d05780638da5cb5b146102fa578063a4d66daf14610324578063bb1757cf1461034e57610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461028057806354d1f13d146102bc57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190610ffc565b6104a0565b6040516101609190611041565b60405180910390f35b348015610174575f80fd5b5061017d610519565b60405161018a9190611072565b60405180910390f35b34801561019e575f80fd5b506101a7610521565b6040516101b49190611072565b60405180910390f35b6101c5610526565b005b3480156101d2575f80fd5b506101db610577565b6040516101e8919061109a565b60405180910390f35b3480156101fc575f80fd5b5061020561059e565b60405161021291906110f2565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c919061116c565b6105b9565b005b34801561024e575f80fd5b506102696004803603810190610264919061116c565b610699565b6040516102779291906111b7565b60405180910390f35b34801561028b575f80fd5b506102a660048036038101906102a1919061116c565b6106cd565b6040516102b3919061124e565b60405180910390f35b6102c4610724565b005b6102ce61075d565b005b3480156102db575f80fd5b506102e4610770565b6040516102f191906112c9565b60405180910390f35b348015610305575f80fd5b5061030e610795565b60405161031b91906110f2565b60405180910390f35b34801561032f575f80fd5b506103386107bd565b6040516103459190611072565b60405180910390f35b348015610359575f80fd5b50610374600480360381019061036f919061130c565b6107c3565b6040516103819190611041565b60405180910390f35b348015610395575f80fd5b506103b060048036038101906103ab9190611369565b610969565b6040516103bd9190611041565b60405180910390f35b3480156103d1575f80fd5b506103ec60048036038101906103e7919061130c565b610986565b6040516103f99190611041565b60405180910390f35b34801561040d575f80fd5b50610416610a8c565b6040516104239190611072565b60405180910390f35b61044660048036038101906104419190611369565b610a92565b005b610462600480360381019061045d9190611369565b610ad0565b005b34801561046f575f80fd5b5061048a60048036038101906104859190611369565b610af9565b6040516104979190611072565b60405180910390f35b5f7fc2c281ec000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610512575061051182610b12565b5b9050919050565b5f8054905090565b5f5481565b5f61052f610b8b565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc2c281ec00000000000000000000000000000000000000000000000000000000905090565b5f73deaddeaddeaddeaddeaddeaddeaddeaddeaddead905090565b5f6105c2610b95565b905080546003825580156105f45760018160011c14303b106105eb5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061060591906114c2565b905061061033610bbe565b805f015160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600281905550508015610694576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106e9576106e8611398565b5b6040519080825280601f01601f19166020018201604052801561071b5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610765610c94565b61076e5f610ccb565b565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60025481565b5f6107cc610c94565b60025460045f8154809291906107e19061151a565b91905055101580610838575060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561086f576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f806108cf86610d91565b9150915060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b815260040161092f9291906116cf565b5f604051808303815f87803b158015610946575f80fd5b505af1158015610958573d5f803e3d5ffd5b505050506001925050509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f6002546004541080156109e1575060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a83575060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b8152600401610a429190611727565b602060405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a81919061177d565b155b90509392505050565b60045481565b610a9a610c94565b63389a75e1600c52805f526020600c208054421115610ac057636f5e88185f526004601cfd5b5f815550610acd81610ccb565b50565b610ad8610c94565b8060601b610aed57637448fbae5f526004601cfd5b610af681610ccb565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b845750610b8382610eb0565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bc6610f29565b15610c3e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c91565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610cc9576382b429005f526004601cfd5b565b610cd3610f29565b15610d38577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d8e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610db057610daf611398565b5b604051908082528060200260200182016040528015610dde5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610dfd57610dfc611398565b5b604051908082528060200260200182016040528015610e2b5781602001602082028036833780820191505090505b50905084825f81518110610e4257610e416117a8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e9157610e906117a8565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f225750610f2182610f2d565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fdb81610fa7565b8114610fe5575f80fd5b50565b5f81359050610ff681610fd2565b92915050565b5f6020828403121561101157611010610f9f565b5b5f61101e84828501610fe8565b91505092915050565b5f8115159050919050565b61103b81611027565b82525050565b5f6020820190506110545f830184611032565b92915050565b5f819050919050565b61106c8161105a565b82525050565b5f6020820190506110855f830184611063565b92915050565b61109481610fa7565b82525050565b5f6020820190506110ad5f83018461108b565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110dc826110b3565b9050919050565b6110ec816110d2565b82525050565b5f6020820190506111055f8301846110e3565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261112c5761112b61110b565b5b8235905067ffffffffffffffff8111156111495761114861110f565b5b60208301915083600182028301111561116557611164611113565b5b9250929050565b5f806020838503121561118257611181610f9f565b5b5f83013567ffffffffffffffff81111561119f5761119e610fa3565b5b6111ab85828601611117565b92509250509250929050565b5f6040820190506111ca5f830185611063565b6111d760208301846110e3565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611220826111de565b61122a81856111e8565b935061123a8185602086016111f8565b61124381611206565b840191505092915050565b5f6020820190508181035f8301526112668184611216565b905092915050565b5f819050919050565b5f61129161128c611287846110b3565b61126e565b6110b3565b9050919050565b5f6112a282611277565b9050919050565b5f6112b382611298565b9050919050565b6112c3816112a9565b82525050565b5f6020820190506112dc5f8301846112ba565b92915050565b6112eb816110d2565b81146112f5575f80fd5b50565b5f81359050611306816112e2565b92915050565b5f805f6040848603121561132357611322610f9f565b5b5f611330868287016112f8565b935050602084013567ffffffffffffffff81111561135157611350610fa3565b5b61135d86828701611117565b92509250509250925092565b5f6020828403121561137e5761137d610f9f565b5b5f61138b848285016112f8565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6113ce82611206565b810181811067ffffffffffffffff821117156113ed576113ec611398565b5b80604052505050565b5f6113ff610f96565b905061140b82826113c5565b919050565b5f61141a826110d2565b9050919050565b61142a81611410565b8114611434575f80fd5b50565b5f8135905061144581611421565b92915050565b6114548161105a565b811461145e575f80fd5b50565b5f8135905061146f8161144b565b92915050565b5f6040828403121561148a57611489611394565b5b61149460406113f6565b90505f6114a384828501611437565b5f8301525060206114b684828501611461565b60208301525092915050565b5f604082840312156114d7576114d6610f9f565b5b5f6114e484828501611475565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115248261105a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611556576115556114ed565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b611593816110d2565b82525050565b5f6115a4838361158a565b60208301905092915050565b5f602082019050919050565b5f6115c682611561565b6115d0818561156b565b93506115db8361157b565b805f5b8381101561160b5781516115f28882611599565b97506115fd836115b0565b9250506001810190506115de565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61164a81611027565b82525050565b5f61165b8383611641565b60208301905092915050565b5f602082019050919050565b5f61167d82611618565b6116878185611622565b935061169283611632565b805f5b838110156116c25781516116a98882611650565b97506116b483611667565b925050600181019050611695565b5085935050505092915050565b5f6040820190508181035f8301526116e781856115bc565b905081810360208301526116fb8184611673565b90509392505050565b50565b5f6117125f836111e8565b915061171d82611704565b5f82019050919050565b5f60408201905061173a5f8301846110e3565b818103602083015261174b81611707565b905092915050565b61175c81611027565b8114611766575f80fd5b50565b5f8151905061177781611753565b92915050565b5f6020828403121561179257611791610f9f565b5b5f61179f84828501611769565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea2646970667358221220935f4f4158c09791d7426626cfe654f31510f1ebb6755c8cb47532588b8661bf64736f6c634300081a0033",d=class d extends u.DeployableTarget{constructor(){super(...arguments),this.abi=a.z}async owner(f){return await a.Jb(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.Ub(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.Yb(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.Gb(this._config,{address:this.assertValidAddress(),args:[f],...b})}async allowList(f){const b=await a.qb(this._config,{address:this.assertValidAddress(),...f});return new o.SimpleAllowList({config:this._config,account:this._account},b)}async limit(f){return await a.Qb(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:c}=await a.df(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.af(this._config,e),result:c}}async isClaimable(f,b){return await a.$b(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...b})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.claims(f),this.limit(f)]);return e-b}buildParameters(f,b){const[e,c]=this.validateDeploymentConfig(f,b);return{abi:a.z,bytecode:g,args:[r(e)],...this.optionallyAttachAccount(c.account)}}buildClaimData(){return i.zeroHash}};d.bases={31337:void 0,...l.AllowListIncentive},d.registryType=h.RegistryType.INCENTIVE;let s=d;const r=({allowList:n,limit:f})=>i.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[n,f]);exports.allowListIncentiveAbi=a.z;exports.AllowListIncentive=s;exports.prepareAllowListIncentivePayload=r;
2
2
  //# sourceMappingURL=AllowListIncentive.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AllowListIncentive.cjs","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\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 { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\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 `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\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_ALLOWLIST_INCENTIVE_BASE,\n ...(AllowListIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readAllowListIncentiveClaims(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>}\n */\n public async reward(params?: ReadParams) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\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 readAllowListIncentiveClaimed(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 {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(params?: ReadParams): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\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 readAllowListIncentiveLimit(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 a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} 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(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 an incentive can potentially be claimed by comparing limit and total claims. Does not take requesting user or underlying allowlist 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 limit and total claims. Does not take requesting user or underlying allowlist 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 {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the AllowListIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as AllowListIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because AllowListIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","zeroHash","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","encodeAbiParameters"],"mappings":"4/ZAsFaA,EAAN,MAAMA,UAA2BC,EAA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s","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\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 { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\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 `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\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_ALLOWLIST_INCENTIVE_BASE,\n ...(AllowListIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readAllowListIncentiveClaims(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>}\n */\n public async reward(params?: ReadParams) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\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 readAllowListIncentiveClaimed(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 {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(params?: ReadParams): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\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 readAllowListIncentiveLimit(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 a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} 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(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 an incentive can potentially be claimed by comparing limit and total claims. Does not take requesting user or underlying allowlist 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 limit and total claims. Does not take requesting user or underlying allowlist 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 {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the AllowListIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as AllowListIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because AllowListIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","zeroHash","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","encodeAbiParameters"],"mappings":"kzZAsFaA,EAAN,MAAMA,UAA2BC,EAAAA,gBAGtC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,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WA,MAAa,YACXF,EACAT,EACA,CACO,OAAA,MAAMe,EAAAA,GAAkC,KAAK,QAAS,CAC3D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,sBAAoBJ,CAAO,CAAC,EAEnC,GAAIT,CAAA,CACL,CACH,CAUA,MAAa,aAAaA,EAAqB,CAC7C,OAAQ,MAAM,KAAK,2BAA2BA,CAAM,EAAK,EAC3D,CAUA,MAAa,2BAA2BA,EAAqB,CAC3D,KAAM,CAACgB,EAAQC,CAAK,EAAI,MAAM,QAAQ,IAAI,CACxC,KAAK,OAAOjB,CAAM,EAClB,KAAK,MAAMA,CAAM,CAAA,CAClB,EACD,OAAOiB,EAAQD,CACjB,CAUgB,gBACdE,EACAC,EACyB,CACzB,KAAM,CAACV,EAASW,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKpB,EAAA,EACL,SAAAsB,EACA,KAAM,CAACC,EAAiCb,CAAO,CAAC,EAChD,GAAG,KAAK,wBAAwBW,EAAQ,OAAO,CAAA,CAEnD,CASO,gBAAiB,CACf,OAAAG,UACT,CACF,EApPE1B,EAAuB,MAAiC,CACtD,MAAO,OACP,GAAI2B,EAAA,kBAAA,EASN3B,EAAuB,aAA6B4B,EAAa,aAAA,UAvB5D,IAAMC,EAAN7B,EA0QA,MAAMyB,EAAmC,CAAC,CAC/C,UAAAK,EACA,MAAAV,CACF,IACSW,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,WAAY,EACrC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACD,EAAWV,CAAK,CAAA"}
@@ -1,13 +1,13 @@
1
- import { C as c, a5 as r, a6 as n, a7 as o, a8 as l, a9 as m, aa as h, ab as u, ac as g, ad as y } from "../generated-CDEDSOGZ.js";
2
- import { zeroHash as p, encodeAbiParameters as w } from "viem";
3
- import { A } from "../deployments-BdPDIh-i.js";
1
+ import { z as c, a5 as r, a6 as n, a7 as o, a8 as l, a9 as m, aa as h, ab as u, ac as g, ad as p } from "../generated-B0XfMfoq.js";
2
+ import { zeroHash as y, encodeAbiParameters as w } from "viem";
3
+ import { A } from "../deployments-ZLVwJGZD.js";
4
4
  import "@wagmi/core";
5
5
  import { SimpleAllowList as V } from "../AllowLists/SimpleAllowList.js";
6
- import "../SimpleDenyList-D-rGBaay.js";
7
- import { DeployableTarget as C } from "../Deployable/DeployableTarget.js";
6
+ import "../SimpleDenyList-UvXQl2vm.js";
7
+ import { DeployableTarget as _ } from "../Deployable/DeployableTarget.js";
8
8
  import { prepareClaimPayload as s } from "../claiming.js";
9
- import { RegistryType as _ } from "../utils.js";
10
- const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610062575f80fd5b5061007161007660201b60201c565b61010b565b5f6100856100e260201b60201c565b90508054600181161561009f5763f92ee8a95f526004601cfd5b8160c01c808260011c146100dd578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611815806101185f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038a578063db09da12146103c6578063dcc59b6f14610402578063f04e283e1461042c578063f2fde38b14610448578063fee81cf41461046457610129565b8063715018a6146102c657806387b9d25c146102d05780638da5cb5b146102fa578063a4d66daf14610324578063bb1757cf1461034e57610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461028057806354d1f13d146102bc57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190611006565b6104a0565b604051610160919061104b565b60405180910390f35b348015610174575f80fd5b5061017d610519565b60405161018a919061107c565b60405180910390f35b34801561019e575f80fd5b506101a7610522565b6040516101b4919061107c565b60405180910390f35b6101c5610528565b005b3480156101d2575f80fd5b506101db610579565b6040516101e891906110a4565b60405180910390f35b3480156101fc575f80fd5b506102056105a0565b60405161021291906110fc565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c9190611176565b6105c3565b005b34801561024e575f80fd5b5061026960048036038101906102649190611176565b6106a3565b6040516102779291906111c1565b60405180910390f35b34801561028b575f80fd5b506102a660048036038101906102a19190611176565b6106d7565b6040516102b39190611258565b60405180910390f35b6102c461072e565b005b6102ce610767565b005b3480156102db575f80fd5b506102e461077a565b6040516102f191906112d3565b60405180910390f35b348015610305575f80fd5b5061030e61079f565b60405161031b91906110fc565b60405180910390f35b34801561032f575f80fd5b506103386107c7565b604051610345919061107c565b60405180910390f35b348015610359575f80fd5b50610374600480360381019061036f9190611316565b6107cd565b604051610381919061104b565b60405180910390f35b348015610395575f80fd5b506103b060048036038101906103ab9190611373565b610973565b6040516103bd919061104b565b60405180910390f35b3480156103d1575f80fd5b506103ec60048036038101906103e79190611316565b610990565b6040516103f9919061104b565b60405180910390f35b34801561040d575f80fd5b50610416610a96565b604051610423919061107c565b60405180910390f35b61044660048036038101906104419190611373565b610a9c565b005b610462600480360381019061045d9190611373565b610ada565b005b34801561046f575f80fd5b5061048a60048036038101906104859190611373565b610b03565b604051610497919061107c565b60405180910390f35b5f7fc2c281ec000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610512575061051182610b1c565b5b9050919050565b5f600254905090565b60025481565b5f610531610b95565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc2c281ec00000000000000000000000000000000000000000000000000000000905090565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6105cc610b9f565b905080546003825580156105fe5760018160011c14303b106105f55763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061060f91906114cc565b905061061a33610bc8565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160048190555050801561069e576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106f3576106f26113a2565b5b6040519080825280601f01601f1916602001820160405280156107255781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61076f610c9e565b6107785f610cd5565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f6107d6610c9e565b60045460015f8154809291906107eb90611524565b91905055101580610842575060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b15610879576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f806108d986610d9b565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016109399291906116d9565b5f604051808303815f87803b158015610950575f80fd5b505af1158015610962573d5f803e3d5ffd5b505050506001925050509392505050565b6005602052805f5260405f205f915054906101000a900460ff1681565b5f6004546001541080156109eb575060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a8d575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b8152600401610a4c9190611731565b602060405180830381865afa158015610a67573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a8b9190611787565b155b90509392505050565b60015481565b610aa4610c9e565b63389a75e1600c52805f526020600c208054421115610aca57636f5e88185f526004601cfd5b5f815550610ad781610cd5565b50565b610ae2610c9e565b8060601b610af757637448fbae5f526004601cfd5b610b0081610cd5565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b8e5750610b8d82610eba565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd0610f33565b15610c48577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0a57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9b565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610cd3576382b429005f526004601cfd5b565b610cdd610f33565b15610d42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d98565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610dba57610db96113a2565b5b604051908082528060200260200182016040528015610de85781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610e0757610e066113a2565b5b604051908082528060200260200182016040528015610e355781602001602082028036833780820191505090505b50905084825f81518110610e4c57610e4b6117b2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e9b57610e9a6117b2565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f2c5750610f2b82610f37565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fe581610fb1565b8114610fef575f80fd5b50565b5f8135905061100081610fdc565b92915050565b5f6020828403121561101b5761101a610fa9565b5b5f61102884828501610ff2565b91505092915050565b5f8115159050919050565b61104581611031565b82525050565b5f60208201905061105e5f83018461103c565b92915050565b5f819050919050565b61107681611064565b82525050565b5f60208201905061108f5f83018461106d565b92915050565b61109e81610fb1565b82525050565b5f6020820190506110b75f830184611095565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110e6826110bd565b9050919050565b6110f6816110dc565b82525050565b5f60208201905061110f5f8301846110ed565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261113657611135611115565b5b8235905067ffffffffffffffff81111561115357611152611119565b5b60208301915083600182028301111561116f5761116e61111d565b5b9250929050565b5f806020838503121561118c5761118b610fa9565b5b5f83013567ffffffffffffffff8111156111a9576111a8610fad565b5b6111b585828601611121565b92509250509250929050565b5f6040820190506111d45f83018561106d565b6111e160208301846110ed565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61122a826111e8565b61123481856111f2565b9350611244818560208601611202565b61124d81611210565b840191505092915050565b5f6020820190508181035f8301526112708184611220565b905092915050565b5f819050919050565b5f61129b611296611291846110bd565b611278565b6110bd565b9050919050565b5f6112ac82611281565b9050919050565b5f6112bd826112a2565b9050919050565b6112cd816112b3565b82525050565b5f6020820190506112e65f8301846112c4565b92915050565b6112f5816110dc565b81146112ff575f80fd5b50565b5f81359050611310816112ec565b92915050565b5f805f6040848603121561132d5761132c610fa9565b5b5f61133a86828701611302565b935050602084013567ffffffffffffffff81111561135b5761135a610fad565b5b61136786828701611121565b92509250509250925092565b5f6020828403121561138857611387610fa9565b5b5f61139584828501611302565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6113d882611210565b810181811067ffffffffffffffff821117156113f7576113f66113a2565b5b80604052505050565b5f611409610fa0565b905061141582826113cf565b919050565b5f611424826110dc565b9050919050565b6114348161141a565b811461143e575f80fd5b50565b5f8135905061144f8161142b565b92915050565b61145e81611064565b8114611468575f80fd5b50565b5f8135905061147981611455565b92915050565b5f604082840312156114945761149361139e565b5b61149e6040611400565b90505f6114ad84828501611441565b5f8301525060206114c08482850161146b565b60208301525092915050565b5f604082840312156114e1576114e0610fa9565b5b5f6114ee8482850161147f565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61152e82611064565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115605761155f6114f7565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61159d816110dc565b82525050565b5f6115ae8383611594565b60208301905092915050565b5f602082019050919050565b5f6115d08261156b565b6115da8185611575565b93506115e583611585565b805f5b838110156116155781516115fc88826115a3565b9750611607836115ba565b9250506001810190506115e8565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61165481611031565b82525050565b5f611665838361164b565b60208301905092915050565b5f602082019050919050565b5f61168782611622565b611691818561162c565b935061169c8361163c565b805f5b838110156116cc5781516116b3888261165a565b97506116be83611671565b92505060018101905061169f565b5085935050505092915050565b5f6040820190508181035f8301526116f181856115c6565b90508181036020830152611705818461167d565b90509392505050565b50565b5f61171c5f836111f2565b91506117278261170e565b5f82019050919050565b5f6040820190506117445f8301846110ed565b818103602083015261175581611711565b905092915050565b61176681611031565b8114611770575f80fd5b50565b5f815190506117818161175d565b92915050565b5f6020828403121561179c5761179b610fa9565b5b5f6117a984828501611773565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212202f2805b0b43803fbc9dd3f411ae04b22f4b0334ed912f80ca9b152bb7696ae2b64736f6c634300081a0033", d = class d extends C {
9
+ import { RegistryType as C } from "../utils.js";
10
+ const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61180b806100bd5f395ff3fe608060405260043610610129575f3560e01c8063715018a6116100aa578063c884ef831161006e578063c884ef831461038a578063db09da12146103c6578063dcc59b6f14610402578063f04e283e1461042c578063f2fde38b14610448578063fee81cf41461046457610129565b8063715018a6146102c657806387b9d25c146102d05780638da5cb5b146102fa578063a4d66daf14610324578063bb1757cf1461034e57610129565b806338d52e0f116100f157806338d52e0f146101f1578063439fab911461021b578063474f5a44146102435780634e7165a21461028057806354d1f13d146102bc57610129565b806301ffc9a71461012d57806307621eca14610169578063228cb7331461019357806325692962146101bd57806328d6183b146101c7575b5f80fd5b348015610138575f80fd5b50610153600480360381019061014e9190610ffc565b6104a0565b6040516101609190611041565b60405180910390f35b348015610174575f80fd5b5061017d610519565b60405161018a9190611072565b60405180910390f35b34801561019e575f80fd5b506101a7610521565b6040516101b49190611072565b60405180910390f35b6101c5610526565b005b3480156101d2575f80fd5b506101db610577565b6040516101e8919061109a565b60405180910390f35b3480156101fc575f80fd5b5061020561059e565b60405161021291906110f2565b60405180910390f35b348015610226575f80fd5b50610241600480360381019061023c919061116c565b6105b9565b005b34801561024e575f80fd5b506102696004803603810190610264919061116c565b610699565b6040516102779291906111b7565b60405180910390f35b34801561028b575f80fd5b506102a660048036038101906102a1919061116c565b6106cd565b6040516102b3919061124e565b60405180910390f35b6102c4610724565b005b6102ce61075d565b005b3480156102db575f80fd5b506102e4610770565b6040516102f191906112c9565b60405180910390f35b348015610305575f80fd5b5061030e610795565b60405161031b91906110f2565b60405180910390f35b34801561032f575f80fd5b506103386107bd565b6040516103459190611072565b60405180910390f35b348015610359575f80fd5b50610374600480360381019061036f919061130c565b6107c3565b6040516103819190611041565b60405180910390f35b348015610395575f80fd5b506103b060048036038101906103ab9190611369565b610969565b6040516103bd9190611041565b60405180910390f35b3480156103d1575f80fd5b506103ec60048036038101906103e7919061130c565b610986565b6040516103f99190611041565b60405180910390f35b34801561040d575f80fd5b50610416610a8c565b6040516104239190611072565b60405180910390f35b61044660048036038101906104419190611369565b610a92565b005b610462600480360381019061045d9190611369565b610ad0565b005b34801561046f575f80fd5b5061048a60048036038101906104859190611369565b610af9565b6040516104979190611072565b60405180910390f35b5f7fc2c281ec000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610512575061051182610b12565b5b9050919050565b5f8054905090565b5f5481565b5f61052f610b8b565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fc2c281ec00000000000000000000000000000000000000000000000000000000905090565b5f73deaddeaddeaddeaddeaddeaddeaddeaddeaddead905090565b5f6105c2610b95565b905080546003825580156105f45760018160011c14303b106105eb5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061060591906114c2565b905061061033610bbe565b805f015160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600281905550508015610694576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106e9576106e8611398565b5b6040519080825280601f01601f19166020018201604052801561071b5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610765610c94565b61076e5f610ccb565b565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60025481565b5f6107cc610c94565b60025460045f8154809291906107e19061151a565b91905055101580610838575060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561086f576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f806108cf86610d91565b9150915060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b815260040161092f9291906116cf565b5f604051808303815f87803b158015610946575f80fd5b505af1158015610958573d5f803e3d5ffd5b505050506001925050509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f6002546004541080156109e1575060035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a83575060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b8152600401610a429190611727565b602060405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a81919061177d565b155b90509392505050565b60045481565b610a9a610c94565b63389a75e1600c52805f526020600c208054421115610ac057636f5e88185f526004601cfd5b5f815550610acd81610ccb565b50565b610ad8610c94565b8060601b610aed57637448fbae5f526004601cfd5b610af681610ccb565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b845750610b8382610eb0565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bc6610f29565b15610c3e577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c91565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610cc9576382b429005f526004601cfd5b565b610cd3610f29565b15610d38577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d8e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610db057610daf611398565b5b604051908082528060200260200182016040528015610dde5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610dfd57610dfc611398565b5b604051908082528060200260200182016040528015610e2b5781602001602082028036833780820191505090505b50905084825f81518110610e4257610e416117a8565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e9157610e906117a8565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610f225750610f2182610f2d565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fdb81610fa7565b8114610fe5575f80fd5b50565b5f81359050610ff681610fd2565b92915050565b5f6020828403121561101157611010610f9f565b5b5f61101e84828501610fe8565b91505092915050565b5f8115159050919050565b61103b81611027565b82525050565b5f6020820190506110545f830184611032565b92915050565b5f819050919050565b61106c8161105a565b82525050565b5f6020820190506110855f830184611063565b92915050565b61109481610fa7565b82525050565b5f6020820190506110ad5f83018461108b565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110dc826110b3565b9050919050565b6110ec816110d2565b82525050565b5f6020820190506111055f8301846110e3565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261112c5761112b61110b565b5b8235905067ffffffffffffffff8111156111495761114861110f565b5b60208301915083600182028301111561116557611164611113565b5b9250929050565b5f806020838503121561118257611181610f9f565b5b5f83013567ffffffffffffffff81111561119f5761119e610fa3565b5b6111ab85828601611117565b92509250509250929050565b5f6040820190506111ca5f830185611063565b6111d760208301846110e3565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611220826111de565b61122a81856111e8565b935061123a8185602086016111f8565b61124381611206565b840191505092915050565b5f6020820190508181035f8301526112668184611216565b905092915050565b5f819050919050565b5f61129161128c611287846110b3565b61126e565b6110b3565b9050919050565b5f6112a282611277565b9050919050565b5f6112b382611298565b9050919050565b6112c3816112a9565b82525050565b5f6020820190506112dc5f8301846112ba565b92915050565b6112eb816110d2565b81146112f5575f80fd5b50565b5f81359050611306816112e2565b92915050565b5f805f6040848603121561132357611322610f9f565b5b5f611330868287016112f8565b935050602084013567ffffffffffffffff81111561135157611350610fa3565b5b61135d86828701611117565b92509250509250925092565b5f6020828403121561137e5761137d610f9f565b5b5f61138b848285016112f8565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6113ce82611206565b810181811067ffffffffffffffff821117156113ed576113ec611398565b5b80604052505050565b5f6113ff610f96565b905061140b82826113c5565b919050565b5f61141a826110d2565b9050919050565b61142a81611410565b8114611434575f80fd5b50565b5f8135905061144581611421565b92915050565b6114548161105a565b811461145e575f80fd5b50565b5f8135905061146f8161144b565b92915050565b5f6040828403121561148a57611489611394565b5b61149460406113f6565b90505f6114a384828501611437565b5f8301525060206114b684828501611461565b60208301525092915050565b5f604082840312156114d7576114d6610f9f565b5b5f6114e484828501611475565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6115248261105a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611556576115556114ed565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b611593816110d2565b82525050565b5f6115a4838361158a565b60208301905092915050565b5f602082019050919050565b5f6115c682611561565b6115d0818561156b565b93506115db8361157b565b805f5b8381101561160b5781516115f28882611599565b97506115fd836115b0565b9250506001810190506115de565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61164a81611027565b82525050565b5f61165b8383611641565b60208301905092915050565b5f602082019050919050565b5f61167d82611618565b6116878185611622565b935061169283611632565b805f5b838110156116c25781516116a98882611650565b97506116b483611667565b925050600181019050611695565b5085935050505092915050565b5f6040820190508181035f8301526116e781856115bc565b905081810360208301526116fb8184611673565b90509392505050565b50565b5f6117125f836111e8565b915061171d82611704565b5f82019050919050565b5f60408201905061173a5f8301846110e3565b818103602083015261174b81611707565b905092915050565b61175c81611027565b8114611766575f80fd5b50565b5f8151905061177781611753565b92915050565b5f6020828403121561179257611791610f9f565b5b5f61179f84828501611769565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea2646970667358221220935f4f4158c09791d7426626cfe654f31510f1ebb6755c8cb47532588b8661bf64736f6c634300081a0033", e = class e extends _ {
11
11
  constructor() {
12
12
  super(...arguments), this.abi = c;
13
13
  }
@@ -132,7 +132,7 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
132
132
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - return true if successful, otherwise revert
133
133
  */
134
134
  async claimRaw(f, b) {
135
- const { request: a, result: e } = await u(
135
+ const { request: a, result: d } = await u(
136
136
  this._config,
137
137
  {
138
138
  address: this.assertValidAddress(),
@@ -142,7 +142,7 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
142
142
  ...b
143
143
  }
144
144
  );
145
- return { hash: await g(this._config, a), result: e };
145
+ return { hash: await g(this._config, a), result: d };
146
146
  }
147
147
  /**
148
148
  * Check if an incentive is claimable
@@ -154,7 +154,7 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
154
154
  * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
155
155
  */
156
156
  async isClaimable(f, b) {
157
- return await y(this._config, {
157
+ return await p(this._config, {
158
158
  address: this.assertValidAddress(),
159
159
  args: [s(f)],
160
160
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -196,7 +196,7 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
196
196
  * @returns {GenericDeployableParams}
197
197
  */
198
198
  buildParameters(f, b) {
199
- const [a, e] = this.validateDeploymentConfig(
199
+ const [a, d] = this.validateDeploymentConfig(
200
200
  f,
201
201
  b
202
202
  );
@@ -204,7 +204,7 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
204
204
  abi: c,
205
205
  bytecode: P,
206
206
  args: [R(a)],
207
- ...this.optionallyAttachAccount(e.account)
207
+ ...this.optionallyAttachAccount(d.account)
208
208
  };
209
209
  }
210
210
  /**
@@ -215,14 +215,14 @@ const P = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
215
215
  * @description This function returns `zeroHash` because AllowListIncentive doesn't use any specific claim data.
216
216
  */
217
217
  buildClaimData() {
218
- return p;
218
+ return y;
219
219
  }
220
220
  };
221
- d.bases = {
221
+ e.bases = {
222
222
  31337: void 0,
223
223
  ...A
224
- }, d.registryType = _.INCENTIVE;
225
- let t = d;
224
+ }, e.registryType = C.INCENTIVE;
225
+ let t = e;
226
226
  const R = ({
227
227
  allowList: i,
228
228
  limit: f
@@ -1 +1 @@
1
- {"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\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 { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\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 `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\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_ALLOWLIST_INCENTIVE_BASE,\n ...(AllowListIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readAllowListIncentiveClaims(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>}\n */\n public async reward(params?: ReadParams) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\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 readAllowListIncentiveClaimed(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 {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(params?: ReadParams): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\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 readAllowListIncentiveLimit(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 a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} 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(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 an incentive can potentially be claimed by comparing limit and total claims. Does not take requesting user or underlying allowlist 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 limit and total claims. Does not take requesting user or underlying allowlist 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 {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the AllowListIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as AllowListIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because AllowListIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","zeroHash","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","encodeAbiParameters"],"mappings":";;;;;;;;;0mZAsFaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,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,OAAOA,GAAqB;AAChC,WAAA,MAAME,EAA6B,KAAK,SAAS;AAAA,MACtD,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,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL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EACtD,OAAO;AAAA,EACP,GAAI2B;AAAA,GASN3B,EAAuB,eAA6B4B,EAAa;AAvB5D,IAAMC,IAAN7B;AA0QA,MAAMyB,IAAmC,CAAC;AAAA,EAC/C,WAAAK;AAAA,EACA,OAAAV;AACF,MACSW;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,YAAY;AAAA,IACrC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACD,GAAWV,CAAK;AAAA;"}
1
+ {"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\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 { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\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 `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\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_ALLOWLIST_INCENTIVE_BASE,\n ...(AllowListIncentiveBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readAllowListIncentiveClaims(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>}\n */\n public async reward(params?: ReadParams) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\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 readAllowListIncentiveClaimed(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 {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(params?: ReadParams): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\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 readAllowListIncentiveLimit(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 a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} 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(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 an incentive can potentially be claimed by comparing limit and total claims. Does not take requesting user or underlying allowlist 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 limit and total claims. Does not take requesting user or underlying allowlist 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 {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the AllowListIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as AllowListIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because AllowListIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","zeroHash","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","encodeAbiParameters"],"mappings":";;;;;;;;;g6YAsFaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,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,OAAOA,GAAqB;AAChC,WAAA,MAAME,EAA6B,KAAK,SAAS;AAAA,MACtD,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,EAA6B,KAAK,SAAS;AAAA,MACtD,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,EAA8B,KAAK,SAAS;AAAA,MACvD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CAAO;AAAA;AAAA,MAEd,GAAIJ;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,M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