@boostxyz/sdk 0.0.0-alpha.20 → 0.0.0-alpha.21

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 (156) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +3 -3
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.d.ts.map +1 -1
  5. package/dist/Actions/EventAction.js +3 -3
  6. package/dist/AllowLists/AllowList.cjs +1 -1
  7. package/dist/AllowLists/AllowList.js +3 -3
  8. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  9. package/dist/AllowLists/SimpleAllowList.js +13 -13
  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/Boost.cjs +1 -1
  15. package/dist/Boost.cjs.map +1 -1
  16. package/dist/Boost.d.ts +5 -24
  17. package/dist/Boost.d.ts.map +1 -1
  18. package/dist/Boost.js +42 -44
  19. package/dist/Boost.js.map +1 -1
  20. package/dist/BoostCore-DolmDuXW.cjs +3 -0
  21. package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
  22. package/dist/BoostCore-Z97KVu4V.js +1448 -0
  23. package/dist/BoostCore-Z97KVu4V.js.map +1 -0
  24. package/dist/BoostCore.cjs +1 -1
  25. package/dist/BoostCore.d.ts +633 -47
  26. package/dist/BoostCore.d.ts.map +1 -1
  27. package/dist/BoostCore.js +6 -6
  28. package/dist/BoostRegistry.cjs +1 -1
  29. package/dist/BoostRegistry.cjs.map +1 -1
  30. package/dist/BoostRegistry.d.ts +31 -3
  31. package/dist/BoostRegistry.d.ts.map +1 -1
  32. package/dist/BoostRegistry.js +68 -48
  33. package/dist/BoostRegistry.js.map +1 -1
  34. package/dist/Budgets/Budget.cjs +1 -1
  35. package/dist/Budgets/Budget.js +2 -2
  36. package/dist/Budgets/ManagedBudget.cjs +1 -1
  37. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  38. package/dist/Budgets/ManagedBudget.d.ts +34 -4
  39. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +45 -45
  41. package/dist/Budgets/VestingBudget.d.ts +34 -4
  42. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  43. package/dist/Deployable/DeployableTarget.cjs +1 -1
  44. package/dist/Deployable/DeployableTarget.js +1 -1
  45. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  46. package/dist/Deployable/DeployableTargetWithRBAC.js +17 -17
  47. package/dist/EventAction-CBKzuNoN.cjs +2 -0
  48. package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
  49. package/dist/{EventAction-CIPqmAoP.js → EventAction-DWuuc_Qy.js} +295 -217
  50. package/dist/EventAction-DWuuc_Qy.js.map +1 -0
  51. package/dist/Incentive-BxzEtN26.js +298 -0
  52. package/dist/Incentive-BxzEtN26.js.map +1 -0
  53. package/dist/Incentive-CrF3-ayL.cjs +2 -0
  54. package/dist/Incentive-CrF3-ayL.cjs.map +1 -0
  55. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  56. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  57. package/dist/Incentives/AllowListIncentive.d.ts +16 -2
  58. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  59. package/dist/Incentives/AllowListIncentive.js +13 -13
  60. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  61. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  62. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  63. package/dist/Incentives/CGDAIncentive.d.ts +197 -4
  64. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.js +31 -31
  66. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  67. package/dist/Incentives/ERC1155Incentive.d.ts +192 -5
  68. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  70. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.d.ts +197 -4
  72. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  73. package/dist/Incentives/ERC20Incentive.js +17 -17
  74. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  75. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +189 -2
  76. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  77. package/dist/Incentives/ERC20VariableIncentive.d.ts +197 -4
  78. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  79. package/dist/Incentives/Incentive.cjs +1 -1
  80. package/dist/Incentives/Incentive.d.ts +1 -1
  81. package/dist/Incentives/Incentive.js +3 -3
  82. package/dist/Incentives/PointsIncentive.cjs +1 -1
  83. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  84. package/dist/Incentives/PointsIncentive.d.ts +16 -2
  85. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  86. package/dist/Incentives/PointsIncentive.js +8 -8
  87. package/dist/Incentives/PointsIncentive.js.map +1 -1
  88. package/dist/{SimpleDenyList-BwfNjRsg.cjs → SimpleDenyList-BUR17Tt1.cjs} +2 -2
  89. package/dist/{SimpleDenyList-BwfNjRsg.cjs.map → SimpleDenyList-BUR17Tt1.cjs.map} +1 -1
  90. package/dist/{SimpleDenyList-Cn5WpNn0.js → SimpleDenyList-CGaWjuld.js} +15 -15
  91. package/dist/{SimpleDenyList-Cn5WpNn0.js.map → SimpleDenyList-CGaWjuld.js.map} +1 -1
  92. package/dist/Validators/SignerValidator.cjs +1 -1
  93. package/dist/Validators/SignerValidator.js +3 -3
  94. package/dist/Validators/Validator.cjs +1 -1
  95. package/dist/Validators/Validator.js +6 -6
  96. package/dist/componentInterfaces-BBCFkrZv.js +14 -0
  97. package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
  98. package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
  99. package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
  100. package/dist/deployments-DVXioW2i.cjs +2 -0
  101. package/dist/deployments-DVXioW2i.cjs.map +1 -0
  102. package/dist/deployments-oykLv3_Z.js +43 -0
  103. package/dist/deployments-oykLv3_Z.js.map +1 -0
  104. package/dist/deployments.json +16 -13
  105. package/dist/errors.cjs +1 -1
  106. package/dist/errors.cjs.map +1 -1
  107. package/dist/errors.d.ts +18 -0
  108. package/dist/errors.d.ts.map +1 -1
  109. package/dist/errors.js +16 -4
  110. package/dist/errors.js.map +1 -1
  111. package/dist/{generated-B7VaSah4.js → generated-CKt2yCQd.js} +1071 -447
  112. package/dist/generated-CKt2yCQd.js.map +1 -0
  113. package/dist/generated-CyTNlOwM.cjs +3 -0
  114. package/dist/generated-CyTNlOwM.cjs.map +1 -0
  115. package/dist/index.cjs +1 -1
  116. package/dist/index.js +79 -78
  117. package/package.json +4 -4
  118. package/src/Actions/EventAction.ts +24 -20
  119. package/src/Boost.ts +5 -27
  120. package/src/BoostCore.test.ts +113 -46
  121. package/src/BoostCore.ts +162 -171
  122. package/src/BoostRegistry.test.ts +53 -0
  123. package/src/BoostRegistry.ts +48 -3
  124. package/src/Budgets/ManagedBudget.test.ts +7 -7
  125. package/src/Incentives/CGDAIncentive.test.ts +4 -1
  126. package/src/Incentives/CGDAIncentive.ts +6 -0
  127. package/src/Incentives/ERC20Incentive.test.ts +3 -0
  128. package/src/Incentives/ERC20Incentive.ts +6 -0
  129. package/src/Incentives/ERC20VariableIncentive.test.ts +3 -0
  130. package/src/Incentives/ERC20VariableIncentive.ts +6 -0
  131. package/src/Incentives/Incentive.test.ts +3 -0
  132. package/src/Incentives/Incentive.ts +1 -1
  133. package/src/Incentives/PointsIncentive.test.ts +1 -2
  134. package/src/errors.ts +22 -0
  135. package/dist/BoostCore-3-U1xTQN.cjs +0 -3
  136. package/dist/BoostCore-3-U1xTQN.cjs.map +0 -1
  137. package/dist/BoostCore-DVGBUr2y.js +0 -1477
  138. package/dist/BoostCore-DVGBUr2y.js.map +0 -1
  139. package/dist/EventAction-CIPqmAoP.js.map +0 -1
  140. package/dist/EventAction-d-oeqZQs.cjs +0 -2
  141. package/dist/EventAction-d-oeqZQs.cjs.map +0 -1
  142. package/dist/Incentive-Bp8Sez7M.js +0 -298
  143. package/dist/Incentive-Bp8Sez7M.js.map +0 -1
  144. package/dist/Incentive-Djnzseoj.cjs +0 -2
  145. package/dist/Incentive-Djnzseoj.cjs.map +0 -1
  146. package/dist/componentInterfaces-D09mhzxO.cjs +0 -2
  147. package/dist/componentInterfaces-D09mhzxO.cjs.map +0 -1
  148. package/dist/componentInterfaces-RXBMI5yH.js +0 -14
  149. package/dist/componentInterfaces-RXBMI5yH.js.map +0 -1
  150. package/dist/deployments-BM42vImE.js +0 -43
  151. package/dist/deployments-BM42vImE.js.map +0 -1
  152. package/dist/deployments-CMdF5uEC.cjs +0 -2
  153. package/dist/deployments-CMdF5uEC.cjs.map +0 -1
  154. package/dist/generated-B0tk-c9b.cjs +0 -3
  155. package/dist/generated-B0tk-c9b.cjs.map +0 -1
  156. package/dist/generated-B7VaSah4.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-B0tk-c9b.cjs"),c=require("./DeployableTarget.cjs");var n=(i=>(i[i.MANAGER=1n]="MANAGER",i[i.ADMIN=2n]="ADMIN",i))(n||{});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:o}=await e.Mg(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.fg(this._config,r),result:o}}async grantRoles(t,s,a){return await this.awaitResult(this.grantRolesRaw(t,s,a))}async grantRolesRaw(t,s,a){const{request:r,result:o}=await e.Ig(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.yg(this._config,r),result:o}}async revokeRoles(t,s,a){return await this.awaitResult(this.revokeRolesRaw(t,s,a))}async revokeRolesRaw(t,s,a){const{request:r,result:o}=await e.Og(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.bg(this._config,r),result:o}}async rolesOf(t,s){const a=await e.og(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s});return[n.MANAGER,n.ADMIN].filter(r=>(a&r)===r)}hasAnyRole(t,s,a){return e.ag(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}hasAllRoles(t,s,a){return e.ng(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}isAuthorized(t,s){return e.ig(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s})}}exports.rbacAbi=e.z;exports.DeployableTargetWithRBAC=l;exports.Roles=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../generated-CyTNlOwM.cjs"),c=require("./DeployableTarget.cjs");var n=(i=>(i[i.MANAGER=1n]="MANAGER",i[i.ADMIN=2n]="ADMIN",i))(n||{});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:o}=await e.CM(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.TM(this._config,r),result:o}}async grantRoles(t,s,a){return await this.awaitResult(this.grantRolesRaw(t,s,a))}async grantRolesRaw(t,s,a){const{request:r,result:o}=await e.gM(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.mM(this._config,r),result:o}}async revokeRoles(t,s,a){return await this.awaitResult(this.revokeRolesRaw(t,s,a))}async revokeRolesRaw(t,s,a){const{request:r,result:o}=await e.EM(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a});return{hash:await e.wM(this._config,r),result:o}}async rolesOf(t,s){const a=await e.lM(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s});return[n.MANAGER,n.ADMIN].filter(r=>(a&r)===r)}hasAnyRole(t,s,a){return e.rM(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}hasAllRoles(t,s,a){return e.sM(this._config,{address:this.assertValidAddress(),args:[t,s],...this.optionallyAttachAccount(),...a})}isAuthorized(t,s){return e.oM(this._config,{address:this.assertValidAddress(),args:[t],...this.optionallyAttachAccount(),...s})}}exports.rbacAbi=e.z;exports.DeployableTargetWithRBAC=l;exports.Roles=n;
2
2
  //# sourceMappingURL=DeployableTargetWithRBAC.cjs.map
@@ -1,8 +1,8 @@
1
- import { M as h, f as c, e as l, h as d, i as A, j as g, o as u, k as w, n as y, m as R } from "../generated-B7VaSah4.js";
2
- import { z as N } from "../generated-B7VaSah4.js";
3
- import { DeployableTarget as f } from "./DeployableTarget.js";
4
- var o = /* @__PURE__ */ ((r) => (r[r.MANAGER = 1n] = "MANAGER", r[r.ADMIN = 2n] = "ADMIN", r))(o || {});
5
- class M extends f {
1
+ import { C as n, e as c, h as l, m as d, E as A, j as u, l as g, r as w, s as R, o as y } from "../generated-CKt2yCQd.js";
2
+ import { z as N } from "../generated-CKt2yCQd.js";
3
+ import { DeployableTarget as M } from "./DeployableTarget.js";
4
+ var o = /* @__PURE__ */ ((i) => (i[i.MANAGER = 1n] = "MANAGER", i[i.ADMIN = 2n] = "ADMIN", i))(o || {});
5
+ class _ extends M {
6
6
  /**
7
7
  * Set the authorized status of the given accounts
8
8
  * The mechanism for managing authorization is left to the implementing contract
@@ -31,14 +31,14 @@ class M extends f {
31
31
  * @returns {Promise<void>}
32
32
  */
33
33
  async setAuthorizedRaw(s, t, a) {
34
- const { request: i, result: e } = await h(this._config, {
34
+ const { request: r, result: e } = await n(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, i), result: e };
41
+ return { hash: await c(this._config, r), result: e };
42
42
  }
43
43
  /**
44
44
  * Grant many accounts permissions on the rbac.
@@ -72,7 +72,7 @@ class M extends f {
72
72
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
73
73
  */
74
74
  async grantRolesRaw(s, t, a) {
75
- const { request: i, result: e } = await l(this._config, {
75
+ const { request: r, result: e } = await l(this._config, {
76
76
  address: this.assertValidAddress(),
77
77
  args: [s, t],
78
78
  ...this.optionallyAttachAccount(),
@@ -82,7 +82,7 @@ class M extends f {
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
- i
85
+ r
86
86
  ), result: e };
87
87
  }
88
88
  /**
@@ -118,17 +118,17 @@ class M extends f {
118
118
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
119
119
  */
120
120
  async revokeRolesRaw(s, t, a) {
121
- const { request: i, result: e } = await A(this._config, {
121
+ const { request: r, result: e } = await A(this._config, {
122
122
  address: this.assertValidAddress(),
123
123
  args: [s, t],
124
124
  ...this.optionallyAttachAccount(),
125
125
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
126
126
  ...a
127
127
  });
128
- return { hash: await g(
128
+ return { hash: await u(
129
129
  this._config,
130
130
  // biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
131
- i
131
+ r
132
132
  ), result: e };
133
133
  }
134
134
  /**
@@ -142,7 +142,7 @@ class M extends f {
142
142
  * @returns {Promise<Array<RbacRoles>>}
143
143
  */
144
144
  async rolesOf(s, t) {
145
- const a = await u(this._config, {
145
+ const a = await g(this._config, {
146
146
  address: this.assertValidAddress(),
147
147
  args: [s],
148
148
  ...this.optionallyAttachAccount(),
@@ -150,7 +150,7 @@ class M extends f {
150
150
  ...t
151
151
  });
152
152
  return [o.MANAGER, o.ADMIN].filter(
153
- (i) => (a & i) === i
153
+ (r) => (a & r) === r
154
154
  );
155
155
  }
156
156
  /**
@@ -188,7 +188,7 @@ class M extends f {
188
188
  * @returns {Promise<boolean>}
189
189
  */
190
190
  hasAllRoles(s, t, a) {
191
- return y(this._config, {
191
+ return R(this._config, {
192
192
  address: this.assertValidAddress(),
193
193
  args: [s, t],
194
194
  ...this.optionallyAttachAccount(),
@@ -205,7 +205,7 @@ class M extends f {
205
205
  * @returns {Promise<boolean>} - True if the account is authorized
206
206
  */
207
207
  isAuthorized(s, t) {
208
- return R(this._config, {
208
+ return y(this._config, {
209
209
  address: this.assertValidAddress(),
210
210
  args: [s],
211
211
  ...this.optionallyAttachAccount(),
@@ -215,7 +215,7 @@ class M extends f {
215
215
  }
216
216
  }
217
217
  export {
218
- M as DeployableTargetWithRBAC,
218
+ _ as DeployableTargetWithRBAC,
219
219
  o as Roles,
220
220
  N as rbacAbi
221
221
  };
@@ -0,0 +1,2 @@
1
+ "use strict";const E=require("./generated-CyTNlOwM.cjs"),L=require("@wagmi/core"),p=require("viem"),W=require("./deployments-DVXioW2i.cjs"),X=require("./Deployable/DeployableTarget.cjs"),u=require("./errors.cjs"),Q=require("./utils.cjs"),$="0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea26469706673582212208eb365eda8d73b432dcac87772fa84d3bb11eb90f5c05dbe00a55fa3412254c364736f6c634300081a0033",z={"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32,address,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},J={"Transfer(address indexed,address indexed,uint256 indexed)":"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":"Transfer(address indexed,address indexed,uint256 indexed)","Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e","0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)","NameRegistered(string,bytes32,address,uint256,uint256,uint256)":"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27","0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":"NameRegistered(string,bytes32,address,uint256,uint256,uint256)","DelegateChanged(address indexed,address indexed,address indexed)":"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f","0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":"DelegateChanged(address indexed,address indexed,address indexed)","SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0","0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)","VoteCast(address indexed,uint256,uint8,uint256,string)":"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4","0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":"VoteCast(address indexed,uint256,uint8,uint256,string)","InfoIndexed(address indexed,string indexed)":"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b","0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":"InfoIndexed(address indexed,string indexed)","Info(address,string)":"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c","0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":"Info(address,string)"},M={abi:z,selectors:J},Y={"0x0000000000000000000000000000000000000000000000000000000040c10f19":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"mint(address to, uint256 amount)":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"0x00000000000000000000000000000000000000000000000000000000a836f32f":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"string"}],outputs:[]},"mint(address,uint256,address,uint256,address,string)":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"string"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000017d304b0":{name:"mintPayable",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"mintPayable(address to, uint256 amount)":{name:"mintPayable",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000024856bc3":{name:"execute",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes",name:"commands"},{type:"bytes[]",name:"inputs"}],outputs:[]},"execute(bytes commands,bytes[] inputs)":{name:"execute",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes",name:"commands"},{type:"bytes[]",name:"inputs"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000074694a2b":{name:"register",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"address",name:"owner"},{type:"uint256",name:"duration"},{type:"bytes32",name:"secret"},{type:"address",name:"resolver"},{type:"bytes[]",name:"data"},{type:"bool",name:"reverseRecord"},{type:"uint16",name:"ownerControlledFuses"}],outputs:[]},"register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)":{name:"register",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"address",name:"owner"},{type:"uint256",name:"duration"},{type:"bytes32",name:"secret"},{type:"address",name:"resolver"},{type:"bytes[]",name:"data"},{type:"bool",name:"reverseRecord"},{type:"uint16",name:"ownerControlledFuses"}],outputs:[]},"0x00000000000000000000000000000000000000000000000000000000eb9019d4":{name:"getVotes",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint256",name:"blockNumber"}],outputs:[{type:"uint256"}]},"getVotes(address account, uint256 blockNumber) view returns (uint256)":{name:"getVotes",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint256",name:"blockNumber"}],outputs:[{type:"uint256"}]},"0x0000000000000000000000000000000000000000000000000000000023b872dd":{name:"transferFrom",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"address"},{type:"uint256"}],outputs:[]},"transferFrom(address,address,uint256)":{name:"transferFrom",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"address"},{type:"uint256"}],outputs:[]},"0x000000000000000000000000000000000000000000000000000000006a627842":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"}],outputs:[]},"mint(address)":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"}],outputs:[]}},Z={"mint(address to, uint256 amount)":"0x0000000000000000000000000000000000000000000000000000000040c10f19","0x0000000000000000000000000000000000000000000000000000000040c10f19":"mint(address to, uint256 amount)","mint(address,uint256,address,uint256,address,string)":"0x00000000000000000000000000000000000000000000000000000000a836f32f","0x00000000000000000000000000000000000000000000000000000000a836f32f":"mint(address,uint256,address,uint256,address,string)","mintPayable(address to, uint256 amount)":"0x0000000000000000000000000000000000000000000000000000000017d304b0","0x0000000000000000000000000000000000000000000000000000000017d304b0":"mintPayable(address to, uint256 amount)","execute(bytes commands,bytes[] inputs)":"0x0000000000000000000000000000000000000000000000000000000024856bc3","0x0000000000000000000000000000000000000000000000000000000024856bc3":"execute(bytes commands,bytes[] inputs)","register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)":"0x0000000000000000000000000000000000000000000000000000000074694a2b","0x0000000000000000000000000000000000000000000000000000000074694a2b":"register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)","getVotes(address account, uint256 blockNumber) view returns (uint256)":"0x00000000000000000000000000000000000000000000000000000000eb9019d4","0x00000000000000000000000000000000000000000000000000000000eb9019d4":"getVotes(address account, uint256 blockNumber) view returns (uint256)","transferFrom(address,address,uint256)":"0x0000000000000000000000000000000000000000000000000000000023b872dd","0x0000000000000000000000000000000000000000000000000000000023b872dd":"transferFrom(address,address,uint256)","mint(address)":"0x000000000000000000000000000000000000000000000000000000006a627842","0x000000000000000000000000000000000000000000000000000000006a627842":"mint(address)"},V={abi:Y,selectors:Z},x=Symbol.for("@ts-pattern/matcher"),f0=Symbol.for("@ts-pattern/isVariadic"),P="@ts-pattern/anonymous-select-key",B=t=>!!(t&&typeof t=="object"),N=t=>t&&!!t[x],g=(t,f,e)=>{if(N(t)){const n=t[x](),{matched:a,selections:d}=n.match(f);return a&&d&&Object.keys(d).forEach(s=>e(s,d[s])),a}if(B(t)){if(!B(f))return!1;if(Array.isArray(t)){if(!Array.isArray(f))return!1;let n=[],a=[],d=[];for(const s of t.keys()){const b=t[s];N(b)&&b[f0]?d.push(b):d.length?a.push(b):n.push(b)}if(d.length){if(d.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<n.length+a.length)return!1;const s=f.slice(0,n.length),b=a.length===0?[]:f.slice(-a.length),r=f.slice(n.length,a.length===0?1/0:-a.length);return n.every((o,h)=>g(o,s[h],e))&&a.every((o,h)=>g(o,b[h],e))&&(d.length===0||g(d[0],r,e))}return t.length===f.length&&t.every((s,b)=>g(s,f[b],e))}return Reflect.ownKeys(t).every(n=>{const a=t[n];return(n in f||N(d=a)&&d[x]().matcherType==="optional")&&g(a,f[n],e);var d})}return Object.is(f,t)},T=t=>{var f,e,n;return B(t)?N(t)?(f=(e=(n=t[x]()).getSelectionKeys)==null?void 0:e.call(n))!=null?f:[]:Array.isArray(t)?S(t,T):S(Object.values(t),T):[]},S=(t,f)=>t.reduce((e,n)=>e.concat(f(n)),[]);function y(t){return Object.assign(t,{optional:()=>e0(t),and:f=>c(t,f),or:f=>t0(t,f),select:f=>f===void 0?q(t):q(f,t)})}function e0(t){return y({[x]:()=>({match:f=>{let e={};const n=(a,d)=>{e[a]=d};return f===void 0?(T(t).forEach(a=>n(a,void 0)),{matched:!0,selections:e}):{matched:g(t,f,n),selections:e}},getSelectionKeys:()=>T(t),matcherType:"optional"})})}function c(...t){return y({[x]:()=>({match:f=>{let e={};const n=(a,d)=>{e[a]=d};return{matched:t.every(a=>g(a,f,n)),selections:e}},getSelectionKeys:()=>S(t,T),matcherType:"and"})})}function t0(...t){return y({[x]:()=>({match:f=>{let e={};const n=(a,d)=>{e[a]=d};return S(t,T).forEach(a=>n(a,void 0)),{matched:t.some(a=>g(a,f,n)),selections:e}},getSelectionKeys:()=>S(t,T),matcherType:"or"})})}function i(t){return{[x]:()=>({match:f=>({matched:!!t(f)})})}}function q(...t){const f=typeof t[0]=="string"?t[0]:void 0,e=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return y({[x]:()=>({match:n=>{let a={[f??P]:n};return{matched:e===void 0||g(e,n,(d,s)=>{a[d]=s}),selections:a}},getSelectionKeys:()=>[f??P].concat(e===void 0?[]:T(e))})})}function l(t){return typeof t=="number"}function w(t){return typeof t=="string"}function v(t){return typeof t=="bigint"}y(i(function(t){return!0}));const A=t=>Object.assign(y(t),{startsWith:f=>{return A(c(t,(e=f,i(n=>w(n)&&n.startsWith(e)))));var e},endsWith:f=>{return A(c(t,(e=f,i(n=>w(n)&&n.endsWith(e)))));var e},minLength:f=>A(c(t,(e=>i(n=>w(n)&&n.length>=e))(f))),length:f=>A(c(t,(e=>i(n=>w(n)&&n.length===e))(f))),maxLength:f=>A(c(t,(e=>i(n=>w(n)&&n.length<=e))(f))),includes:f=>{return A(c(t,(e=f,i(n=>w(n)&&n.includes(e)))));var e},regex:f=>{return A(c(t,(e=f,i(n=>w(n)&&!!n.match(e)))));var e}});A(i(w));const m=t=>Object.assign(y(t),{between:(f,e)=>m(c(t,((n,a)=>i(d=>l(d)&&n<=d&&a>=d))(f,e))),lt:f=>m(c(t,(e=>i(n=>l(n)&&n<e))(f))),gt:f=>m(c(t,(e=>i(n=>l(n)&&n>e))(f))),lte:f=>m(c(t,(e=>i(n=>l(n)&&n<=e))(f))),gte:f=>m(c(t,(e=>i(n=>l(n)&&n>=e))(f))),int:()=>m(c(t,i(f=>l(f)&&Number.isInteger(f)))),finite:()=>m(c(t,i(f=>l(f)&&Number.isFinite(f)))),positive:()=>m(c(t,i(f=>l(f)&&f>0))),negative:()=>m(c(t,i(f=>l(f)&&f<0)))});m(i(l));const I=t=>Object.assign(y(t),{between:(f,e)=>I(c(t,((n,a)=>i(d=>v(d)&&n<=d&&a>=d))(f,e))),lt:f=>I(c(t,(e=>i(n=>v(n)&&n<e))(f))),gt:f=>I(c(t,(e=>i(n=>v(n)&&n>e))(f))),lte:f=>I(c(t,(e=>i(n=>v(n)&&n<=e))(f))),gte:f=>I(c(t,(e=>i(n=>v(n)&&n>=e))(f))),positive:()=>I(c(t,i(f=>v(f)&&f>0))),negative:()=>I(c(t,i(f=>v(f)&&f<0)))});I(i(v));y(i(function(t){return typeof t=="boolean"}));y(i(function(t){return typeof t=="symbol"}));y(i(function(t){return t==null}));y(i(function(t){return t!=null}));class n0 extends Error{constructor(f){let e;try{e=JSON.stringify(f)}catch{e=f}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=f}}const _={matched:!1,value:void 0};function U(t){return new R(t,_)}class R{constructor(f,e){this.input=void 0,this.state=void 0,this.input=f,this.state=e}with(...f){if(this.state.matched)return this;const e=f[f.length-1],n=[f[0]];let a;f.length===3&&typeof f[1]=="function"?a=f[1]:f.length>2&&n.push(...f.slice(1,f.length-1));let d=!1,s={};const b=(o,h)=>{d=!0,s[o]=h},r=!n.some(o=>g(o,this.input,b))||a&&!a(this.input)?_:{matched:!0,value:e(d?P in s?s[P]:s:this.input,this.input)};return new R(this.input,r)}when(f,e){if(this.state.matched)return this;const n=!!f(this.input);return new R(this.input,n?{matched:!0,value:e(this.input,this.input)}:_)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new n0(this.input)}run(){return this.exhaustive()}returnType(){return this}}var H=(t=>(t[t.EQUAL=0]="EQUAL",t[t.NOT_EQUAL=1]="NOT_EQUAL",t[t.GREATER_THAN=2]="GREATER_THAN",t[t.LESS_THAN=3]="LESS_THAN",t[t.CONTAINS=4]="CONTAINS",t[t.REGEX=5]="REGEX",t))(H||{}),G=(t=>(t[t.UINT=0]="UINT",t[t.ADDRESS=1]="ADDRESS",t[t.BYTES=2]="BYTES",t[t.STRING=3]="STRING",t))(G||{}),j=(t=>(t[t.EVENT=0]="EVENT",t[t.FUNC=1]="FUNC",t))(j||{});function K(t){return Array.isArray(t.actionSteps)}const D=class D extends X.DeployableTarget{constructor(){super(...arguments),this.abi=E.X}async getActionStep(f,e){return(await this.getActionSteps(e)).at(f)}async getActionSteps(f){const e=await E.zI(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return a0(e.map(F))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const e=await E.EI(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return F(e)}async execute(f,e){return await this.awaitResult(this.executeRaw(f,e))}async executeRaw(f,e){const{request:n,result:a}=await E.DI(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[f]});return{hash:await E.VI(this._config,n),result:a}}async deriveActionClaimantFromTransaction(f,e){const n=f.signature;if(f.signatureType===0){let a;if(e.abiItem?a=e.abiItem:a={...M.abi,...e.knownSignatures||{}}[n],!a)throw new u.ValidationAbiMissingError(n);let d;if("logs"in e){for(let r of e.logs){if(!p.isAddressEqual(r.address,f.targetContract))continue;let o=this.validateClaimantAgainstArgs(f,r);o&&(d=o)}return d}const b=(await L.getTransactionReceipt(this._config,e)).logs.map(r=>{const{eventName:o,args:h}=p.decodeEventLog({abi:[a],data:r.data,topics:r.topics});return{...r,eventName:o,args:h}});for(let r of b){if(!p.isAddressEqual(r.address,f.targetContract))continue;let o=this.validateClaimantAgainstArgs(f,r);o&&(d=o)}return d}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const a=await L.getTransaction(this._config,{hash:e.hash});if(!p.isAddressEqual(a.to,f.targetContract))return;let d;if(e.abiItem?d=e.abiItem:d={...V.abi,...e.knownSignatures||{}}[n],!d)throw new u.ValidationAbiMissingError(f.signature);let s;try{s=p.decodeFunctionData({abi:[d],data:a.input})}catch(b){throw new u.FunctionDataDecodeError([d],b)}return this.validateClaimantAgainstArgs(f,s)}}validateClaimantAgainstArgs(f,e){if(!e||!Array.isArray(e==null?void 0:e.args)||(e==null?void 0:e.args.length)<=f.fieldIndex)return;const n=e.args.at(f.fieldIndex);if(p.isAddress(n))return n}async validateActionSteps(f){const e=await this.getActionSteps();for(const n of e)if(!await this.isActionStepValid(n,f))return!1;return!0}async isActionStepValid(f,e){if(f.signatureType===0){const n=f.signature;let a;if(e.abiItem?a=e.abiItem:a={...M.abi,...e.knownSignatures||{}}[n],!a)throw new u.ValidationAbiMissingError(n);if(this.isArraylikeIndexed(f,a))throw new u.UnparseableAbiParamError(f.actionParameter.fieldIndex,a);if("logs"in e)return this.isActionEventValid(f,e.logs);const b=(await this._config.getClient({chainId:e.chainId}).getTransactionReceipt({hash:e.hash})).logs.map(r=>{const{eventName:o,args:h}=p.decodeEventLog({abi:[a],data:r.data,topics:r.topics});return{...r,eventName:o,args:h}});return this.isActionEventValid(f,b)}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const a=await this._config.getClient({chainId:e.chainId}).getTransaction({hash:e.hash});return this.isActionFunctionValid(f,a,e)}return!1}isActionEventValid(f,e){const n=f.actionParameter;if(!e.length)return!1;for(let a of e)if(this.validateLogAgainstCriteria(n,a))return!0;return!1}isActionFunctionValid(f,e,n){const a=f.actionParameter;let d=f.signature,s;if(n!=null&&n.abiItem?s=n==null?void 0:n.abiItem:s={...V.abi,...(n==null?void 0:n.knownSignatures)||{}}[d],!s)throw new u.ValidationAbiMissingError(d);let b;try{b=p.decodeFunctionData({abi:[s],data:e.input})}catch(o){throw new u.FunctionDataDecodeError([s],o)}const r=b.args;return!(!r||!b||!this.validateFunctionAgainstCriteria(a,r))}validateFieldAgainstCriteria(f,e,n){switch(f.filterType){case 0:return U(f.fieldType).with(1,()=>p.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)===BigInt(f.filterData)).with(3,()=>e===p.fromHex(f.filterData,"string")).otherwise(()=>e===f.filterData);case 1:return U(f.fieldType).with(1,()=>!p.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)!==BigInt(f.filterData)).with(3,()=>e!==p.fromHex(f.filterData,"string")).otherwise(()=>e!==f.filterData);case 2:if(f.fieldType===0)return BigInt(e)>BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 3:if(f.fieldType===0)return BigInt(e)<BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 4:if(f.fieldType===2||f.fieldType===3){let a;return f.fieldType===3?a=p.fromHex(f.filterData,"string"):a=f.filterData.slice(2),e.includes(a)}throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});case 5:if(typeof e!="string")throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});if(f.fieldType===3){const a=p.fromHex(f.filterData,"string");return new RegExp(a).test(e)}default:throw new u.UnrecognizedFilterTypeError({...n,criteria:f,fieldValue:e})}}validateLogAgainstCriteria(f,e){if(!Array.isArray(e.args)||e.args.length<=f.fieldIndex)throw new u.DecodedArgsMalformedError({log:e,criteria:f,fieldValue:void 0});const n=e.args.at(f.fieldIndex);if(n===void 0)throw new u.FieldValueUndefinedError({log:e,criteria:f,fieldValue:n});return this.validateFieldAgainstCriteria(f,n,{log:e})}validateFunctionAgainstCriteria(f,e){const n=e[f.fieldIndex];if(n===void 0)throw new u.FieldValueUndefinedError({criteria:f,fieldValue:n});return this.validateFieldAgainstCriteria(f,n,{decodedArgs:e})}buildParameters(f,e){const[n,a]=this.validateDeploymentConfig(f,e);let d;if(K(n)){let s=n.actionSteps.filter(r=>!!r);if(s.length===0)throw new u.NoEventActionStepsProvidedError;if(s.length>4)throw new u.TooManyEventActionStepsProvidedError;let b=Array.from({length:4},(r,o)=>s.at(o)||s.at(-1));d={actionClaimant:n.actionClaimant,actionStepOne:b[0],actionStepTwo:b[1],actionStepThree:b[2],actionStepFour:b[3]}}else d=n;return{abi:E.X,bytecode:$,args:[O(d)],...this.optionallyAttachAccount(a.account)}}isArraylikeIndexed(f,e){var n;return!!((f.actionParameter.fieldType===3||f.actionParameter.fieldType===2)&&((n=e.inputs[f.actionParameter.fieldIndex])!=null&&n.indexed))}};D.bases={...W.EventAction},D.registryType=Q.RegistryType.ACTION;let k=D;function a0(t){const f=[],e={};for(let n of t){const a=JSON.stringify(n);e[a]||(f.push(n),e[a]=!0)}return f}function C(t){return{...t,chainid:BigInt(t.chainid)}}function F(t){if(t.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...t,chainid:Number(t.chainid)}}function O({actionClaimant:t,actionStepOne:f,actionStepTwo:e,actionStepThree:n,actionStepFour:a}){return p.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:C(t),actionStepOne:{...C(f),actionType:f.actionType||0},actionStepTwo:{...C(e),actionType:e.actionType||0},actionStepThree:{...C(n),actionType:n.actionType||0},actionStepFour:{...C(a),actionType:a.actionType||0}}])}exports.EventAction=k;exports.FilterType=H;exports.PrimitiveType=G;exports.SignatureType=j;exports.events=M;exports.functions=V;exports.isEventActionPayloadSimple=K;exports.prepareEventActionPayload=O;
2
+ //# sourceMappingURL=EventAction-CBKzuNoN.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventAction-CBKzuNoN.cjs","sources":["../../../node_modules/.pnpm/ts-pattern@5.4.0/node_modules/ts-pattern/dist/index.js","../src/Actions/EventAction.ts"],"sourcesContent":["const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&\"optional\"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"and\"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function w(t){return\"bigint\"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return\"boolean\"==typeof t})),B=u(p(function(t){return\"symbol\"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match};\n//# sourceMappingURL=index.js.map\n","import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport {\n GetTransactionReceiptParameters,\n getTransaction,\n getTransactionReceipt,\n} from '@wagmi/core';\nimport { match } from 'ts-pattern';\nimport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n AbiItem,\n type Address,\n type ContractEventName,\n type ContractFunctionName,\n type GetLogsReturnType,\n type GetTransactionParameters,\n type Hex,\n type Log,\n type PublicClient,\n type Transaction,\n decodeEventLog,\n decodeFunctionData,\n encodeAbiParameters,\n fromHex,\n isAddress,\n isAddressEqual,\n} from 'viem';\nimport { EventAction as EventActionBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsMalformedError,\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n FunctionDataDecodeError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnparseableAbiParamError,\n UnrecognizedFilterTypeError,\n ValidationAbiMissingError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n REGEX = 5,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n\n/**\n * Parameters for validating an action step.\n *\n * @typedef {Object} ValidateActionStepParams\n * @property {Record<Hex, AbiEvent | AbiFunction>} [knownSignatures] - Optional record of known events, keyed by 32 byte selectors.\n * @property {AbiEvent | AbiFunction} [abiItem] - Optional ABI item definition.\n * @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.\n * @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.\n * @property {number} [chainId] - Chain ID for the transaction. Required if 'hash' is provided.\n */\nexport type ValidateActionStepParams = {\n knownSignatures?: Record<Hex, AbiEvent | AbiFunction>;\n abiItem?: AbiEvent | AbiFunction;\n} & ({ logs: EventLogs } | { hash: Hex; chainId: number });\n\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * Array of event logs to pass into TxParams\n * @export\n * @typedef {EventLogs}\n */\nexport type EventLogs = GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n\n/**\n * Getter params from the event action contract\n *\n * @export\n * @typedef {ReadEventActionParams}\n * @param {fnName} fnName - The getter function name\n */\nexport type ReadEventActionParams<\n fnName extends ContractFunctionName<typeof eventActionAbi, 'pure' | 'view'>,\n> = ReadParams<typeof eventActionAbi, fnName>;\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(EventActionBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadEventActionParams<'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadEventActionParams<'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadEventActionParams<'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\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 })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadEventActionParams<'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadEventActionParams<'getActionClaimant'>,\n ): Promise<ActionClaimant> {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n ...params,\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\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 args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Derives the action claimant address from a transaction based on the provided ActionClaimant configuration.\n * This method supports both event-based and function-based claimant derivation.\n *\n ** @example\n * // Example usage\n * const eventAction = boost.action as EventAction\n * const claimant = await eventAction.getActionClaimant() // {\n * signatureType: SignatureType.EVENT,\n * signature: '0x1234...',\n * fieldIndex: 2,\n * targetContract: '0xabcd...',\n * chainid: 1\n * };\n * const params: ValidateActionStepParams = {\n * hash: '0x5678...',\n * chainId: 1,\n * knownSignatures?: {\n * '0x1234...': {}\n * }\n * };\n * const claimantAddress = await eventAction.deriveActionClaimantFromTransaction(claimant, params);\n *\n * @param {ActionClaimant} claimant - The configuration specifying how to derive the claimant.\n * @param {ValidateActionStepParams} params - Parameters for validation, including transaction hash, known signatures, logs, and chain ID.\n * @returns {Promise<Address | undefined>} The derived claimant address if found, undefined otherwise.\n * @throws {ValidationAbiMissingError} If the ABI for the specified signature is not found.\n * @throws {FunctionDataDecodeError} If there's an error decoding function data (for function-based derivation).\n */\n public async deriveActionClaimantFromTransaction(\n claimant: ActionClaimant,\n params: ValidateActionStepParams,\n ): Promise<Address | undefined> {\n const signature = claimant.signature;\n if (claimant.signatureType === SignatureType.EVENT) {\n let event: AbiEvent;\n if (params.abiItem) event = params.abiItem as AbiEvent;\n else {\n const sigPool: Record<Hex, AbiEvent> = {\n ...(events.abi as Record<Hex, AbiEvent>),\n ...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),\n };\n event = sigPool[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let address: Address | undefined;\n if ('logs' in params) {\n for (let log of params.logs) {\n if (!isAddressEqual(log.address, claimant.targetContract)) continue;\n let addressCandidate = this.validateClaimantAgainstArgs(\n claimant,\n log,\n );\n if (addressCandidate) address = addressCandidate;\n }\n return address;\n }\n const receipt = await getTransactionReceipt(this._config, params);\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n return { ...log, eventName, args };\n });\n\n for (let log of decodedLogs) {\n if (!isAddressEqual(log.address, claimant.targetContract)) continue;\n let addressCandidate = this.validateClaimantAgainstArgs(claimant, log);\n if (addressCandidate) address = addressCandidate;\n }\n return address;\n }\n if (\n claimant.signatureType === SignatureType.FUNC &&\n 'hash' in params &&\n 'chainId' in params\n ) {\n const transaction = await getTransaction(this._config, {\n hash: params.hash,\n });\n if (!isAddressEqual(transaction.to!, claimant.targetContract)) return;\n let func: AbiFunction;\n if (params.abiItem) func = params.abiItem as AbiFunction;\n else {\n const sigPool: Record<Hex, AbiFunction> = {\n ...(functions.abi as Record<Hex, AbiFunction>),\n ...((params.knownSignatures as Record<Hex, AbiFunction>) || {}),\n };\n func = sigPool[signature] as AbiFunction;\n }\n if (!func) {\n throw new ValidationAbiMissingError(claimant.signature);\n }\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n return this.validateClaimantAgainstArgs(claimant, decodedData);\n }\n }\n\n /**\n * Validates the action claimant against the arguments of a log or function data.\n *\n * @param {ActionClaimant} claimant - The action claimant to validate.\n * @param {Object} [logOrFnData] - Optional object containing the arguments to validate against.\n * @param {Array<any> | readonly unknown[] | Record<string, unknown>} [logOrFnData.args] - The arguments from the log or function data.\n * @returns {Address | undefined} The validated address if found and valid, otherwise undefined.\n */\n public validateClaimantAgainstArgs(\n claimant: ActionClaimant,\n logOrFnData?: {\n args: Array<unknown> | readonly unknown[] | Record<string, unknown>;\n },\n ): Address | undefined {\n if (\n !logOrFnData ||\n !Array.isArray(logOrFnData?.args) ||\n logOrFnData?.args.length <= claimant.fieldIndex\n ) {\n return;\n }\n const maybeAddress = logOrFnData.args.at(claimant.fieldIndex);\n if (isAddress(maybeAddress)) return maybeAddress;\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param ValidateActionStepParams params\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(params: ValidateActionStepParams) {\n const actionSteps = await this.getActionSteps();\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs or function calls.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n * For functions a hash is required.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (actionStep.signatureType === SignatureType.EVENT) {\n const signature = actionStep.signature;\n let event: AbiEvent;\n if (params.abiItem) event = params.abiItem as AbiEvent;\n else {\n const sigPool: Record<Hex, AbiEvent> = {\n ...(events.abi as Record<Hex, AbiEvent>),\n ...((params.knownSignatures as Record<Hex, AbiEvent>) || {}),\n };\n event = sigPool[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n if (this.isArraylikeIndexed(actionStep, event)) {\n // If the field is indexed, we can't filter on it\n throw new UnparseableAbiParamError(\n actionStep.actionParameter.fieldIndex,\n event,\n );\n }\n\n // Use the provided logs, no need to fetch receipt\n if ('logs' in params) {\n return this.isActionEventValid(actionStep, params.logs);\n }\n\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const receipt = await client.getTransactionReceipt({\n hash: params.hash,\n });\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n\n return { ...log, eventName, args };\n });\n\n return this.isActionEventValid(actionStep, decodedLogs);\n }\n if (actionStep.signatureType === SignatureType.FUNC) {\n if ('hash' in params && 'chainId' in params) {\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const transaction = await client.getTransaction({\n hash: params.hash,\n });\n return this.isActionFunctionValid(actionStep, transaction, params);\n }\n }\n return false;\n }\n\n /**\n * Validates a single action event with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the event to validate.\n * @param {EventLogs} logs - Event logs to validate the given step against\n * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.\n */\n public isActionEventValid(actionStep: ActionStep, logs: EventLogs) {\n const criteria = actionStep.actionParameter;\n if (!logs.length) return false;\n for (let log of logs) {\n if (this.validateLogAgainstCriteria(criteria, log)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Validates a single action function with a given criteria against the transaction input.\n *\n * @public\n * @param {ActionStep} actionStep - The action step containing the function to validate.\n * @param {Transaction} transaction - The transaction that will be validated against.\n * @param {Object} [params] - Optional parameters for validation.\n * @param {AbiItem} [params.abiItem] - The ABI item for the function, if known.\n * @param {Record<Hex, AbiEvent | AbiFunction>} [params.knownSignatures] - A record of known signatures.\n * @returns {boolean} Returns true if the action function is valid, false otherwise.\n * @throws {ValidationAbiMissingError} Throws if the ABI for the function signature is not found.\n * @throws {FunctionDataDecodeError} Throws if there's an error decoding the function data.\n */\n public isActionFunctionValid(\n actionStep: ActionStep,\n transaction: Transaction,\n params?: Pick<ValidateActionStepParams, 'abiItem' | 'knownSignatures'>,\n ) {\n const criteria = actionStep.actionParameter;\n let signature = actionStep.signature;\n\n let func: AbiFunction;\n if (params?.abiItem) func = params?.abiItem as AbiFunction;\n else {\n const sigPool: Record<Hex, AbiFunction> = {\n ...(functions.abi as Record<Hex, AbiFunction>),\n ...((params?.knownSignatures as Record<Hex, AbiFunction>) || {}),\n };\n func = sigPool[signature] as AbiFunction;\n }\n if (!func) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n\n // Validate the criteria against decoded arguments using fieldIndex\n const decodedArgs = decodedData.args;\n\n if (!decodedArgs || !decodedData) return false;\n\n if (\n !this.validateFunctionAgainstCriteria(\n criteria,\n decodedArgs as (string | bigint)[],\n )\n ) {\n return false;\n }\n\n return true;\n }\n /**\n * Validates a field against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {string | bigint | Hex} fieldValue - The field value to validate.\n * @param {Object} input - Additional context for validation.\n * @param {EventLogs[0]} [input.log] - The event log, if validating an event.\n * @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.\n * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.\n */\n public validateFieldAgainstCriteria(\n criteria: Criteria,\n fieldValue: string | bigint | Hex,\n input:\n | { log: EventLogs[0] }\n | { decodedArgs: readonly (string | bigint)[] },\n ): boolean {\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n return match(criteria.fieldType)\n .with(PrimitiveType.ADDRESS, () =>\n isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) === BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue === fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue === criteria.filterData);\n\n case FilterType.NOT_EQUAL:\n return match(criteria.fieldType)\n .with(\n PrimitiveType.ADDRESS,\n () => !isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) !== BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue !== fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue !== criteria.filterData);\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n let substring;\n if (criteria.fieldType === PrimitiveType.STRING) {\n substring = fromHex(criteria.filterData, 'string');\n } else {\n // truncate the `0x` prefix\n substring = criteria.filterData.slice(2);\n }\n return (fieldValue as string).includes(substring);\n }\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.REGEX:\n if (typeof fieldValue !== 'string') {\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n\n if (criteria.fieldType === PrimitiveType.STRING) {\n // fieldValue is decoded by the ABI\n const regexString = fromHex(criteria.filterData, 'string');\n return new RegExp(regexString).test(fieldValue);\n }\n\n default:\n throw new UnrecognizedFilterTypeError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {boolean} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(\n criteria: Criteria,\n log: EventLogs[0],\n ): boolean {\n if (!Array.isArray(log.args) || log.args.length <= criteria.fieldIndex) {\n throw new DecodedArgsMalformedError({\n log,\n criteria,\n fieldValue: undefined,\n });\n }\n\n const fieldValue = log.args.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, { log });\n }\n\n /**\n * Validates a function's decoded arguments against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {unknown[]} decodedArgs - The decoded arguments of the function call.\n * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.\n */\n public validateFunctionAgainstCriteria(\n criteria: Criteria,\n decodedArgs: readonly (string | bigint)[],\n ): boolean {\n const fieldValue = decodedArgs[criteria.fieldIndex];\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({\n criteria,\n fieldValue,\n });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, {\n decodedArgs,\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n public isArraylikeIndexed(step: ActionStep, event: AbiEvent) {\n if (\n (step.actionParameter.fieldType === PrimitiveType.STRING ||\n step.actionParameter.fieldType === PrimitiveType.BYTES) &&\n event.inputs[step.actionParameter.fieldIndex]?.indexed\n ) {\n return true;\n }\n return false;\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["t","e","n","r","i","s","o","c","a","u","h","m","d","y","p","v","b","w","j","x","A","W","$","z","I","FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","claimant","signature","event","events","ValidationAbiMissingError","address","log","isAddressEqual","addressCandidate","decodedLogs","getTransactionReceipt","eventName","args","decodeEventLog","transaction","getTransaction","func","functions","decodedData","decodeFunctionData","FunctionDataDecodeError","logOrFnData","maybeAddress","isAddress","actionSteps","actionStep","UnparseableAbiParamError","logs","criteria","decodedArgs","fieldValue","input","match","fromHex","InvalidNumericalCriteriaError","substring","FieldValueNotComparableError","regexString","UnrecognizedFilterTypeError","DecodedArgsMalformedError","FieldValueUndefinedError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","bytecode","prepareEventActionPayload","_a","EventActionBases","RegistryType","EventAction","_steps","signatures","_toRawActionStep","obj","actionClaimant","actionStepOne","actionStepTwo","actionStepThree","actionStepFour","encodeAbiParameters"],"mappings":"2k6BAAMA,EAAE,OAAO,IAAI,qBAAqB,EAAEC,GAAE,OAAO,IAAI,wBAAwB,EAAEC,EAAE,mCAAmCC,EAAE,GAAG,GAAQ,GAAa,OAAO,GAAjB,UAAoBC,EAAEH,GAAGA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