@boostxyz/sdk 5.5.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +4 -4
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts +2 -1
  6. package/dist/Actions/EventAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.js +110 -105
  8. package/dist/Actions/EventAction.js.map +1 -1
  9. package/dist/AllowLists/AllowList.cjs +1 -1
  10. package/dist/AllowLists/AllowList.js +3 -3
  11. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  12. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  13. package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
  14. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  15. package/dist/AllowLists/SimpleAllowList.js +25 -25
  16. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  17. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  18. package/dist/AllowLists/SimpleDenyList.js +3 -3
  19. package/dist/Auth/PassthroughAuth.cjs +1 -1
  20. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  21. package/dist/Auth/PassthroughAuth.js +14 -14
  22. package/dist/Boost.cjs.map +1 -1
  23. package/dist/Boost.js.map +1 -1
  24. package/dist/BoostCore.cjs +2 -2
  25. package/dist/BoostCore.cjs.map +1 -1
  26. package/dist/BoostCore.d.ts +261 -0
  27. package/dist/BoostCore.d.ts.map +1 -1
  28. package/dist/BoostCore.js +442 -262
  29. package/dist/BoostCore.js.map +1 -1
  30. package/dist/BoostRegistry.cjs +1 -1
  31. package/dist/BoostRegistry.cjs.map +1 -1
  32. package/dist/BoostRegistry.js +43 -43
  33. package/dist/BoostRegistry.js.map +1 -1
  34. package/dist/Budget-CsqSI4NH.cjs +2 -0
  35. package/dist/Budget-CsqSI4NH.cjs.map +1 -0
  36. package/dist/Budget-bMiAGF8s.js +922 -0
  37. package/dist/Budget-bMiAGF8s.js.map +1 -0
  38. package/dist/Budgets/Budget.cjs +1 -1
  39. package/dist/Budgets/Budget.d.ts +5 -4
  40. package/dist/Budgets/Budget.d.ts.map +1 -1
  41. package/dist/Budgets/Budget.js +3 -3
  42. package/dist/Budgets/ManagedBudget.cjs +1 -1
  43. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  44. package/dist/Budgets/ManagedBudget.js +53 -53
  45. package/dist/Budgets/ManagedBudgetWithFees.d.ts +26 -0
  46. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  47. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +1331 -0
  48. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -0
  49. package/dist/Deployable/DeployableTarget.cjs +1 -1
  50. package/dist/Deployable/DeployableTarget.js +1 -1
  51. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  52. package/dist/Deployable/DeployableTargetWithRBAC.js +15 -15
  53. package/dist/Incentive-DZLG6T1-.js +1036 -0
  54. package/dist/Incentive-DZLG6T1-.js.map +1 -0
  55. package/dist/Incentive-DvNdIJ_x.cjs +2 -0
  56. package/dist/Incentive-DvNdIJ_x.cjs.map +1 -0
  57. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  59. package/dist/Incentives/AllowListIncentive.d.ts +9 -1
  60. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  61. package/dist/Incentives/AllowListIncentive.js +64 -47
  62. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  63. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  64. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.d.ts +12 -1
  66. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  67. package/dist/Incentives/CGDAIncentive.js +64 -33
  68. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  70. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.d.ts +37 -1
  72. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  73. package/dist/Incentives/ERC20Incentive.js +73 -49
  74. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  75. package/dist/Incentives/ERC20PeggedIncentive.d.ts +35 -0
  76. package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
  77. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +35 -0
  78. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
  79. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  80. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  81. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +25 -0
  82. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  83. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +24 -24
  84. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  85. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  86. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  87. package/dist/Incentives/ERC20VariableIncentive.d.ts +35 -0
  88. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  89. package/dist/Incentives/ERC20VariableIncentive.js +55 -38
  90. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  91. package/dist/Incentives/Incentive.cjs +1 -1
  92. package/dist/Incentives/Incentive.d.ts +25 -0
  93. package/dist/Incentives/Incentive.d.ts.map +1 -1
  94. package/dist/Incentives/Incentive.js +3 -3
  95. package/dist/Incentives/PointsIncentive.cjs +1 -1
  96. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  97. package/dist/Incentives/PointsIncentive.d.ts +8 -0
  98. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  99. package/dist/Incentives/PointsIncentive.js +50 -28
  100. package/dist/Incentives/PointsIncentive.js.map +1 -1
  101. package/dist/SimpleDenyList-BAIrFBAW.cjs +2 -0
  102. package/dist/{SimpleDenyList-CsRXJPwm.cjs.map → SimpleDenyList-BAIrFBAW.cjs.map} +1 -1
  103. package/dist/SimpleDenyList-C734XLxt.js +133 -0
  104. package/dist/{SimpleDenyList-ByAr4X1r.js.map → SimpleDenyList-C734XLxt.js.map} +1 -1
  105. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  106. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  107. package/dist/Validators/LimitedSignerValidator.d.ts +1 -1
  108. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
  109. package/dist/Validators/LimitedSignerValidator.js +33 -33
  110. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  111. package/dist/Validators/SignerValidator.cjs +1 -1
  112. package/dist/Validators/SignerValidator.cjs.map +1 -1
  113. package/dist/Validators/SignerValidator.d.ts +1 -1
  114. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  115. package/dist/Validators/SignerValidator.js +26 -26
  116. package/dist/Validators/SignerValidator.js.map +1 -1
  117. package/dist/Validators/Validator.cjs +1 -1
  118. package/dist/Validators/Validator.js +4 -4
  119. package/dist/componentInterfaces-5Ezh3Pvx.js +19 -0
  120. package/dist/componentInterfaces-5Ezh3Pvx.js.map +1 -0
  121. package/dist/componentInterfaces-Cm4Zfn1v.cjs +2 -0
  122. package/dist/componentInterfaces-Cm4Zfn1v.cjs.map +1 -0
  123. package/dist/{deployments-D0fs26TV.js → deployments-3RHH-eW7.js} +47 -47
  124. package/dist/{deployments-D0fs26TV.js.map → deployments-3RHH-eW7.js.map} +1 -1
  125. package/dist/deployments-CIXw_WKk.cjs +2 -0
  126. package/dist/deployments-CIXw_WKk.cjs.map +1 -0
  127. package/dist/deployments.json +24 -24
  128. package/dist/errors.cjs +1 -1
  129. package/dist/errors.cjs.map +1 -1
  130. package/dist/errors.js +1 -1
  131. package/dist/errors.js.map +1 -1
  132. package/dist/generated-BPiHi7W2.cjs +3 -0
  133. package/dist/generated-BPiHi7W2.cjs.map +1 -0
  134. package/dist/{generated-Cyvr_Tjx.js → generated-CElkFqkY.js} +1510 -608
  135. package/dist/generated-CElkFqkY.js.map +1 -0
  136. package/dist/index.cjs +1 -1
  137. package/dist/index.d.ts +1 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +153 -150
  140. package/package.json +2 -2
  141. package/src/Actions/EventAction.ts +25 -6
  142. package/src/AllowLists/SimpleAllowList.ts +2 -2
  143. package/src/BoostCore.test.ts +124 -2
  144. package/src/BoostCore.ts +259 -0
  145. package/src/Budgets/Budget.ts +8 -2
  146. package/src/Budgets/ManagedBudgetWithFees.test.ts +0 -1
  147. package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +327 -0
  148. package/src/Budgets/ManagedBudgetWithFeesV2.ts +713 -0
  149. package/src/Incentives/AllowListIncentive.ts +17 -0
  150. package/src/Incentives/CGDAIncentive.ts +31 -0
  151. package/src/Incentives/ERC20Incentive.ts +27 -0
  152. package/src/Incentives/ERC20PeggedIncentive.ts +18 -0
  153. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +26 -0
  154. package/src/Incentives/ERC20VariableIncentive.ts +18 -0
  155. package/src/Incentives/PointsIncentive.ts +22 -0
  156. package/src/Validators/LimitedSignerValidator.ts +1 -1
  157. package/src/Validators/SignerValidator.ts +1 -1
  158. package/src/errors.ts +1 -1
  159. package/src/index.ts +1 -0
  160. package/dist/Budget-AoNx7uFd.cjs +0 -2
  161. package/dist/Budget-AoNx7uFd.cjs.map +0 -1
  162. package/dist/Budget-DYIV9iNK.js +0 -463
  163. package/dist/Budget-DYIV9iNK.js.map +0 -1
  164. package/dist/Incentive-BbkfwGOb.cjs +0 -2
  165. package/dist/Incentive-BbkfwGOb.cjs.map +0 -1
  166. package/dist/Incentive-qlnv5kQB.js +0 -991
  167. package/dist/Incentive-qlnv5kQB.js.map +0 -1
  168. package/dist/SimpleDenyList-ByAr4X1r.js +0 -133
  169. package/dist/SimpleDenyList-CsRXJPwm.cjs +0 -2
  170. package/dist/componentInterfaces-D7r9xJmt.cjs +0 -2
  171. package/dist/componentInterfaces-D7r9xJmt.cjs.map +0 -1
  172. package/dist/componentInterfaces-PR3ijhgZ.js +0 -18
  173. package/dist/componentInterfaces-PR3ijhgZ.js.map +0 -1
  174. package/dist/deployments-DoIOqxco.cjs +0 -2
  175. package/dist/deployments-DoIOqxco.cjs.map +0 -1
  176. package/dist/generated-Cyvr_Tjx.js.map +0 -1
  177. package/dist/generated-DtYPHhtX.cjs +0 -3
  178. package/dist/generated-DtYPHhtX.cjs.map +0 -1
@@ -0,0 +1,922 @@
1
+ import { p as l, a6 as y, a7 as A, a8 as p, a9 as m, aa as R, ab as _, ac as F, ad as B, ae as V, af as M, bL as q, bM as T, bN as I, bO as N, bP as O, ag as P, ah as C, ai as k, aj as z, r as w, bQ as H, bR as L, bS as X, bT as $, bU as K, bV as Q } from "./generated-CElkFqkY.js";
2
+ import { d as S, e as Y, f as J } from "./componentInterfaces-5Ezh3Pvx.js";
3
+ import { getAccount as D, readContract as Z } from "@wagmi/core";
4
+ import { DeployableUnknownOwnerProvidedError as W, InvalidComponentInterfaceError as f0 } from "./errors.js";
5
+ import { prepareTransfer as s, ManagedBudget as b0 } from "./Budgets/ManagedBudget.js";
6
+ import { zeroAddress as t, encodeAbiParameters as v, parseAbiParameters as x } from "viem";
7
+ import { f as E } from "./deployments-3RHH-eW7.js";
8
+ import { DeployableTargetWithRBAC as U } from "./Deployable/DeployableTargetWithRBAC.js";
9
+ import { RegistryType as j } from "./utils.js";
10
+ const a0 = "0x6080604052348015600e575f80fd5b506015601f565b601b601f565b607e565b63409feecd1980546001811615603c5763f92ee8a95f526004601cfd5b8160c01c808260011c146079578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6137998061008b5f395ff3fe6080604052600436106102ea575f3560e01c806375b238fc11610183578063dcc21361116100d5578063f8724aba11610089578063fe56e23211610063578063fe56e232146108e4578063fe9fbb8014610903578063fee81cf414610922576102f1565b8063f8724aba14610887578063f9a802c3146108a6578063fa4ca9b1146108c5576102f1565b8063f04e283e116100ba578063f04e283e1461081c578063f23a6e611461082f578063f2fde38b14610874576102f1565b8063dcc21361146107e9578063ec87621c14610808576102f1565b8063b300579311610137578063c6004a3a11610111578063c6004a3a14610774578063d2514e841461079f578063d8c12d22146107be576102f1565b8063b3005793146106ef578063bc197c811461070e578063be4994f814610755576102f1565b80638da5cb5b116101685780638da5cb5b14610690578063929470eb146106bb578063a6f7f5d6146106da576102f1565b806375b238fc1461063b578063774c33ab1461064f576102f1565b8063439fab911161023c578063514e62fc116101f05780635aef467a116101ca5780635aef467a1461060157806361400c9914610614578063715018a614610633576102f1565b8063514e62fc1461059057806354d1f13d146105c5578063578bcf35146105cd576102f1565b8063451cc19111610221578063451cc1911461053d578063474f5a441461055e5780634a4ee7b11461057d576102f1565b8063439fab91146104ff57806343cc96e11461051e576102f1565b80631c10893f1161029e57806328d6183b1161027857806328d6183b146104505780632de94807146104af5780634359d28a146104e0576102f1565b80631c10893f146104005780631cd64df4146104135780632569296214610448576102f1565b806314135ce0116102cf57806314135ce014610384578063183a4f6e146103af578063185832a3146103c4576102f1565b806301ffc9a71461032357806310098ad514610357576102f1565b366102f157005b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b34801561032e575f80fd5b5061034261033d3660046129b4565b610953565b60405190151581526020015b60405180910390f35b348015610362575f80fd5b50610376610371366004612a07565b610963565b60405190815260200161034e565b34801561038f575f80fd5b5061037661039e366004612a07565b60046020525f908152604090205481565b6103c26103bd366004612a22565b61098e565b005b3480156103cf575f80fd5b506103e36103de366004612a7e565b61099b565b604080519283526001600160a01b0390911660208301520161034e565b6103c261040e366004612ae0565b6109c3565b34801561041e575f80fd5b5061034261042d366004612ae0565b638b78c6d8600c9081525f9290925260209091205481161490565b6103c26109d9565b34801561045b575f80fd5b507fde98bbf0000000000000000000000000000000000000000000000000000000005b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161034e565b3480156104ba575f80fd5b506103766104c9366004612a07565b638b78c6d8600c9081525f91909152602090205490565b3480156104eb575f80fd5b506103c26104fa366004612b4b565b610a26565b34801561050a575f80fd5b506103c2610519366004612bb7565b610b20565b348015610529575f80fd5b506103c2610538366004612bf6565b610d2a565b348015610548575f80fd5b50610376610557366004612bb7565b5f92915050565b348015610569575f80fd5b50610376610578366004612bb7565b6110b3565b6103c261058b366004612ae0565b611269565b34801561059b575f80fd5b506103426105aa366004612ae0565b638b78c6d8600c9081525f9290925260209091205416151590565b6103c261127b565b3480156105d8575f80fd5b506103766105e7366004612a07565b6001600160a01b03165f9081526005602052604090205490565b61034261060f366004612bb7565b6112b4565b34801561061f575f80fd5b5061034261062e366004612c16565b6115b4565b6103c26115fb565b348015610646575f80fd5b50610376600281565b34801561065a575f80fd5b50610376610669366004612ae0565b6001600160a01b03919091165f908152600660209081526040808320938352929052205490565b34801561069b575f80fd5b50638b78c6d819546040516001600160a01b03909116815260200161034e565b3480156106c6575f80fd5b506103426106d5366004612c49565b61160e565b3480156106e5575f80fd5b5061037660015481565b3480156106fa575f80fd5b506103e3610709366004612a7e565b6116d4565b348015610719575f80fd5b5061047e610728366004612cae565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b348015610760575f80fd5b506103c261076f366004612b4b565b611842565b34801561077f575f80fd5b5061037661078e366004612a07565b60036020525f908152604090205481565b3480156107aa575f80fd5b506103766107b9366004612a07565b6118e0565b3480156107c9575f80fd5b506103766107d8366004612a07565b60026020525f908152604090205481565b3480156107f4575f80fd5b506103c2610803366004612b4b565b611920565b348015610813575f80fd5b50610376600181565b6103c261082a366004612a07565b6119be565b34801561083a575f80fd5b5061047e610849366004612d71565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b6103c2610882366004612a07565b6119f8565b348015610892575f80fd5b506103766108a1366004612ae0565b611a1e565b3480156108b1575f80fd5b506103766108c0366004612ae0565b611aab565b3480156108d0575f80fd5b506103426108df366004612bb7565b611b55565b3480156108ef575f80fd5b506103c26108fe366004612a22565b611e9d565b34801561090e575f80fd5b5061034261091d366004612a07565b611f50565b34801561092d575f80fd5b5061037661093c366004612a07565b63389a75e1600c9081525f91909152602090205490565b5f61095d82611f95565b92915050565b6001600160a01b0381165f9081526004602052604081205461098483611fea565b61095d9190612e15565b6109983382612019565b50565b5f806109aa87878787876116d4565b90925090506109b98484610d2a565b9550959350505050565b6109cb612024565b6109d5828261203e565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6002610a318161204a565b838214610a6a576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18575f848483818110610a8757610a87612e28565b9050602002016020810190610a9c9190612e62565b9050801515600103610ade57610ad9878784818110610abd57610abd612e28565b9050602002016020810190610ad29190612a07565b600161203e565b610b0f565b610b0f878784818110610af357610af3612e28565b9050602002016020810190610b089190612a07565b6001612019565b50600101610a6c565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610b715760018160011c14303b10610b685763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610b7f83850185612ff6565b9050610b8d815f015161207b565b5f5b816020015151811015610be857610be082602001518281518110610bb557610bb5612e28565b602002602001015183604001518381518110610bd357610bd3612e28565b60200260200101516120b6565b600101610b8f565b508060200151515f03610c5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f20636f726520636f6e74726163742073657400000000000000000000000060448201526064015b60405180910390fd5b80602001515f81518110610c7257610c72612e28565b6020908102919091018101515f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055606082015160018190556040519081527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd0978910160405180910390a1508015610d25576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f80546040517f13c8e2de000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03909116906313c8e2de906024015f60405180830381865afa158015610d89573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610dce9190810190613197565b90505f81608001518381518110610de757610de7612e28565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f7cc1d5bb0000000000000000000000000000000000000000000000000000000060048201529091506001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610e70573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e949190613274565b15610f6e575f816001600160a01b031663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ed7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efb919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610f3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f5f919061328f565b9050610b1886868685856120f7565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f903181110000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610fe9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061100d9190613274565b156102f1575f816001600160a01b031663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611050573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611074919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f3b573d5f803e3d5ffd5b5f60026110bf8161204a565b5f6110cc848601866132eb565b90505f80825160028111156110e3576110e36133d1565b148061110157506001825160028111156110ff576110ff6133d1565b145b15611158575f826060015180602001905181019061111f91906133fe565b602084015160408501518251929350611150921561113e5783516122fc565b61114b8660200151610963565b6122fc565b51905061125e565b60028251600281111561116d5761116d6133d1565b03611255575f826060015180602001905181019061118b9190613440565b905061124a83602001518460400151835f015184602001515f146111b3578460200151611240565b602087015185516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091526001600160a01b039091169062fdd58e90604401602060405180830381865afa15801561121c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611240919061328f565b856040015161246c565b60200151905061125e565b92506112629050565b9250505b5092915050565b611271612024565b6109d58282612019565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f806112c2838501856132eb565b90505f815160028111156112d8576112d86133d1565b03611351575f81606001518060200190518101906112f691906133fe565b8051909150341461134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b506115aa565b600181516002811115611366576113666133d1565b03611413575f816060015180602001905181019061138491906133fe565b6040830151815160208501519293506113a9926001600160a01b031691903090612660565b805160208301516113c3906001600160a01b0316306126b8565b101561134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b600281516002811115611428576114286133d1565b036115a1575f81606001518060200190518101906114469190613440565b905081602001516001600160a01b031663f242432a836040015130845f0151856020015186604001516040518663ffffffff1660e01b815260040161148f95949392919061354a565b5f604051808303815f87803b1580156114a6575f80fd5b505af11580156114b8573d5f803e3d5ffd5b5050506020808301519084015183516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192506001600160a01b03169062fdd58e90604401602060405180830381865afa15801561152a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061154e919061328f565b101561134b57602080830151908201516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b5f91505061095d565b5060019392505050565b5f805b828110156115aa576115e68484838181106115d4576115d4612e28565b90506020028101906108df9190613591565b6115f3575f91505061095d565b6001016115b7565b611603612024565b61160c5f6126eb565b565b5f61161833611f50565b61164e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f1fa2acdc0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690631fa2acdc9061169b90889088908890889030906004016135f2565b5f604051808303815f87803b1580156116b2575f80fd5b505af11580156116c4573d5f803e3d5ffd5b5060019998505050505050505050565b5f806116df33611f50565b611715576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060400160405280306001600160a01b0316815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250506040519293508a9290915081906001600160a01b0384169063dd98558c9061179390879060200161365e565b6040516020818303038152906040528a8a6040518463ffffffff1660e01b81526004016117c293929190613693565b60408051808303815f875af11580156117dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180191906136b7565b6001600160a01b0381165f9081526005602052604081208054939550919350849261182d908490612e15565b90915550919b909a5098505050505050505050565b600261184d8161204a565b838214611886576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576118d88686838181106118a5576118a5612e28565b90506020020160208101906118ba9190612a07565b8585848181106118cc576118cc612e28565b9050602002013561203e565b600101611888565b6001600160a01b0381165f90815260046020908152604080832054600590925282205461190c84610963565b61191691906136e6565b61095d91906136e6565b600261192b8161204a565b838214611964576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576119b686868381811061198357611983612e28565b90506020020160208101906119989190612a07565b8585848181106119aa576119aa612e28565b90506020020135612019565b600101611966565b6119c6612024565b63389a75e1600c52805f526020600c2080544211156119ec57636f5e88185f526004601cfd5b5f9055610998816126eb565b611a00612024565b8060601b611a1557637448fbae5f526004601cfd5b610998816126eb565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f906001600160a01b0384169062fdd58e90604401602060405180830381865afa158015611a80573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa4919061328f565b9392505050565b6001600160a01b0382165f8181526006602090815260408083208584529091528082205490517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018590529192909162fdd58e90604401602060405180830381865afa158015611b27573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4b919061328f565b611aa491906136e6565b5f611b5f33611f50565b611b95576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611ba2838501856132eb565b9050600181516002811115611bb957611bb96133d1565b1480611bd657505f81516002811115611bd457611bd46133d1565b145b15611d4f575f8160600151806020019051810190611bf491906133fe565b90505f612710600154835f0151611c0b91906136f9565b611c159190613710565b90505f611c258460200151610963565b90508082845f0151611c3791906136e6565b1115611c9c57602084015183518290611c519085906136e6565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b03909316600484015260248301919091526044820152606401610c53565b6040808501516001600160a01b03165f90815260026020529081208054849290611cc79084906136e6565b90915550506020808501516001600160a01b03165f9081526004909152604081208054849290611cf89084906136e6565b909155505082516020808601516001600160a01b03165f9081526005909152604081208054909190611d2b9084906136e6565b9091555050602084015160408501518451611d479291906122fc565b5050506115aa565b600281516002811115611d6457611d646133d1565b036115a1575f8160600151806020019051810190611d829190613440565b602083015181516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192505f916001600160a01b039091169062fdd58e90604401602060405180830381865afa158015611df0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e14919061328f565b90508082602001511115611e7657602080840151908301516040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482018390526044820152606401610c53565b611e9683602001518460400151845f01518560200151866040015161246c565b50506115aa565b6002611ea88161204a565b612710821115611f14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665652063616e6e6f74206578636565642031303025000000000000000000006044820152606401610c53565b60018290556040518281527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09789060200160405180910390a15050565b5f816001600160a01b0316611f68638b78c6d8195490565b6001600160a01b0316148061095d5750638b78c6d8600c9081525f8390526020902054600316151561095d565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fde98bbf000000000000000000000000000000000000000000000000000000000148061095d575061095d82612728565b5f6001600160a01b038216156120125761200d6001600160a01b038316306126b8565b61095d565b4792915050565b6109d582825f612815565b638b78c6d81954331461160c576382b429005f526004601cfd5b6109d582826001612815565b638b78c6d81954331461099857638b78c6d8600c52335f52806020600c205416610998576382b429005f526004601cfd5b6001600160a01b0316638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b5f8360800151858151811061210e5761210e612e28565b6020908102919091018101516001600160a01b0381165f908152600283526040808220546003909452812054919350818561214988866136f9565b6121539190613710565b61215d9190612e15565b905061216981836136e6565b6001600160a01b0385165f8181526003602090815260408083209490945583517f38d52e0f000000000000000000000000000000000000000000000000000000008152935191936338d52e0f92600480830193928290030181865afa1580156121d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121f89190613748565b60e08901516001600160a01b0382165f908152600460205260408120805493945091928592919061222a908490612e15565b90915550505f839003612269576040517fb2e783cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461227484866136e6565b0361229f576001600160a01b0386165f90815260026020908152604080832083905560039091528120555b806001600160a01b03168a8c7ff44ff640e648077f3acc130c6ce75240070e8c40adc85b0feeeec28d9dd921b4866040516122dc91815260200190565b60405180910390a46122ef8282856122fc565b5050505050505050505050565b3068929eee149b4bd21268540361231a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b038216612380576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301528316602482015260448101829052606401610c53565b61238983610963565b8111156123e4578261239a84610963565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101829052606401610c53565b6001600160a01b038316612401576123fc828261286c565b612415565b6124156001600160a01b0384168383612885565b604080516001600160a01b038481168252602082018490528516917fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd43542910160405180910390a23868929eee149b4bd2126855505050565b3068929eee149b4bd21268540361248a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b0384166124f0576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380871660048301528516602482015260448101839052606401610c53565b6124fa8584611a1e565b821115612556578461250c8685611a1e565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101839052606401610c53565b6001600160a01b0385165f908152600660209081526040808320868452909152812080548492906125889084906136e6565b90915550506040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063f242432a906125da903090889088908890889060040161354a565b5f604051808303815f87803b1580156125f1575f80fd5b505af1158015612603573d5f803e3d5ffd5b5050604080516001600160a01b03888116825260208201879052891693507fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd4354292500160405180910390a23868929eee149b4bd21268555050505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af13d1560015f511417166126ab57637939f4245f526004601cfd5b5f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5fbfaa4e0000000000000000000000000000000000000000000000000000000014806127ba57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061280657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b8061095d575061095d826128ce565b638b78c6d8600c52825f526020600c20805483811783612836575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f385f3884865af16109d55763b12d13eb5f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166128c5576390b8ec185f526004601cfd5b5f603452505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe49cedd700000000000000000000000000000000000000000000000000000000148061095d575061095d825f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061095d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461095d565b5f602082840312156129c4575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611aa4575f80fd5b6001600160a01b0381168114610998575f80fd5b5f60208284031215612a17575f80fd5b8135611aa4816129f3565b5f60208284031215612a32575f80fd5b5035919050565b5f8083601f840112612a49575f80fd5b50813567ffffffffffffffff811115612a60575f80fd5b602083019150836020828501011115612a77575f80fd5b9250929050565b5f805f805f60808688031215612a92575f80fd5b8535612a9d816129f3565b9450602086013567ffffffffffffffff811115612ab8575f80fd5b612ac488828901612a39565b9699909850959660408101359660609091013595509350505050565b5f8060408385031215612af1575f80fd5b8235612afc816129f3565b946020939093013593505050565b5f8083601f840112612b1a575f80fd5b50813567ffffffffffffffff811115612b31575f80fd5b6020830191508360208260051b8501011115612a77575f80fd5b5f805f8060408587031215612b5e575f80fd5b843567ffffffffffffffff811115612b74575f80fd5b612b8087828801612b0a565b909550935050602085013567ffffffffffffffff811115612b9f575f80fd5b612bab87828801612b0a565b95989497509550505050565b5f8060208385031215612bc8575f80fd5b823567ffffffffffffffff811115612bde575f80fd5b612bea85828601612a39565b90969095509350505050565b5f8060408385031215612c07575f80fd5b50508035926020909101359150565b5f8060208385031215612c27575f80fd5b823567ffffffffffffffff811115612c3d575f80fd5b612bea85828601612b0a565b5f805f805f60808688031215612c5d575f80fd5b8535612c68816129f3565b94506020860135935060408601359250606086013567ffffffffffffffff811115612c91575f80fd5b612c9d88828901612a39565b969995985093965092949392505050565b5f805f805f805f8060a0898b031215612cc5575f80fd5b8835612cd0816129f3565b97506020890135612ce0816129f3565b9650604089013567ffffffffffffffff811115612cfb575f80fd5b612d078b828c01612b0a565b909750955050606089013567ffffffffffffffff811115612d26575f80fd5b612d328b828c01612b0a565b909550935050608089013567ffffffffffffffff811115612d51575f80fd5b612d5d8b828c01612a39565b999c989b5096995094979396929594505050565b5f805f805f8060a08789031215612d86575f80fd5b8635612d91816129f3565b95506020870135612da1816129f3565b94506040870135935060608701359250608087013567ffffffffffffffff811115612dca575f80fd5b612dd689828a01612a39565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561095d5761095d612de8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8015158114610998575f80fd5b5f60208284031215612e72575f80fd5b8135611aa481612e55565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516080810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b60405290565b604051610100810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b6040516060810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612f6157612f61612e7d565b604052919050565b5f67ffffffffffffffff821115612f8257612f82612e7d565b5060051b60200190565b5f82601f830112612f9b575f80fd5b8135612fae612fa982612f69565b612f1a565b8082825260208201915060208360051b860101925085831115612fcf575f80fd5b602085015b83811015612fec578035835260209283019201612fd4565b5095945050505050565b5f60208284031215613006575f80fd5b813567ffffffffffffffff81111561301c575f80fd5b82016080818503121561302d575f80fd5b613035612eaa565b8135613040816129f3565b8152602082013567ffffffffffffffff81111561305b575f80fd5b8201601f8101861361306b575f80fd5b8035613079612fa982612f69565b8082825260208201915060208360051b85010192508883111561309a575f80fd5b6020840193505b828410156130c55783356130b4816129f3565b8252602093840193909101906130a1565b6020850152505050604082013567ffffffffffffffff8111156130e6575f80fd5b6130f286828501612f8c565b604083015250606091820135918101919091529392505050565b8051613117816129f3565b919050565b5f82601f83011261312b575f80fd5b8151613139612fa982612f69565b8082825260208201915060208360051b86010192508583111561315a575f80fd5b602085015b83811015612fec578051613172816129f3565b83526020928301920161315f565b805167ffffffffffffffff81168114613117575f80fd5b5f602082840312156131a7575f80fd5b815167ffffffffffffffff8111156131bd575f80fd5b820161010081850312156131cf575f80fd5b6131d7612ed3565b6131e08261310c565b81526131ee6020830161310c565b60208201526131ff6040830161310c565b60408201526132106060830161310c565b6060820152608082015167ffffffffffffffff81111561322e575f80fd5b61323a8682850161311c565b60808301525061324c60a08301613180565b60a082015260c0828101519082015261326760e0830161310c565b60e0820152949350505050565b5f60208284031215613284575f80fd5b8151611aa481612e55565b5f6020828403121561329f575f80fd5b5051919050565b5f67ffffffffffffffff8211156132bf576132bf612e7d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f602082840312156132fb575f80fd5b813567ffffffffffffffff811115613311575f80fd5b820160808185031215613322575f80fd5b61332a612eaa565b813560038110613338575f80fd5b81526020820135613348816129f3565b6020820152604082013561335b816129f3565b6040820152606082013567ffffffffffffffff811115613379575f80fd5b80830192505084601f83011261338d575f80fd5b813561339b612fa9826132a6565b8181528660208386010111156133af575f80fd5b816020850160208301375f918101602001919091526060820152949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f602082840312801561340f575f80fd5b506040516020810167ffffffffffffffff8111828210171561343357613433612e7d565b6040529151825250919050565b5f60208284031215613450575f80fd5b815167ffffffffffffffff811115613466575f80fd5b820160608185031215613477575f80fd5b61347f612ef7565b8151815260208083015190820152604082015167ffffffffffffffff8111156134a6575f80fd5b80830192505084601f8301126134ba575f80fd5b81516134c8612fa9826132a6565b8181528660208386010111156134dc575f80fd5b8160208501602083015e5f918101602001919091526040820152949350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6001600160a01b03861681526001600160a01b038516602082015283604082015282606082015260a060808201525f61358660a08301846134fe565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126135c4575f80fd5b83018035915067ffffffffffffffff8211156135de575f80fd5b602001915036819003821315612a77575f80fd5b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190506001600160a01b03831660608301529695505050505050565b602081526001600160a01b0382511660208201525f602083015160408084015261368b60608401826134fe565b949350505050565b606081525f6136a560608301866134fe565b60208301949094525060400152919050565b5f80604083850312156136c8575f80fd5b825160208401519092506136db816129f3565b809150509250929050565b8082018082111561095d5761095d612de8565b808202811582820484141761095d5761095d612de8565b5f82613743577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215613758575f80fd5b8151611aa4816129f356fea2646970667358221220dbd4f70bed9b922212a5c6bf33fbf9a035a23d8d6e2d872430cdd227c89ca9b664736f6c634300081a0033", n = class n extends U {
11
+ constructor() {
12
+ super(...arguments), this.abi = l;
13
+ }
14
+ /**
15
+ * Allocates assets to the budget.
16
+ * The caller must have already approved the contract to transfer the asset
17
+ * If the asset transfer fails, the allocation will revert
18
+ *
19
+ * @public
20
+ * @async
21
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
22
+ * @param {?WriteParams} [params]
23
+ * @returns {Promise<boolean>} - True if the allocation was successful
24
+ */
25
+ async allocate(f, b) {
26
+ return await this.awaitResult(this.allocateRaw(f, b));
27
+ }
28
+ /**
29
+ * Allocates assets to the budget.
30
+ * The caller must have already approved the contract to transfer the asset
31
+ * If the asset transfer fails, the allocation will revert
32
+ *
33
+ * @public
34
+ * @async
35
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
36
+ * @param {?WriteParams} [params]
37
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the allocation was successful
38
+ */
39
+ async allocateRaw(f, b) {
40
+ const { request: a, result: d } = await y(
41
+ this._config,
42
+ {
43
+ address: this.assertValidAddress(),
44
+ args: [s(f)],
45
+ ...this.optionallyAttachAccount(),
46
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
47
+ ...b
48
+ }
49
+ );
50
+ return { hash: await A(this._config, a), result: d };
51
+ }
52
+ /**
53
+ * Clawbacks assets from the budget.
54
+ * Only the owner can directly clawback assets from the budget
55
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
56
+ * If the asset transfer fails, the reclamation will revert
57
+ *
58
+ * @public
59
+ * @async
60
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
61
+ * @param {?WriteParams} [params]
62
+ * @returns {Promise<boolean>} - True if the request was successful
63
+ */
64
+ async clawback(f, b) {
65
+ return await this.awaitResult(this.clawbackRaw(f, b));
66
+ }
67
+ /**
68
+ * Clawbacks assets from the budget.
69
+ * Only the owner or admin can directly clawback assets from the budget
70
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
71
+ * If the asset transfer fails, the reclamation will revert
72
+ *
73
+ * @public
74
+ * @async
75
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
76
+ * @param {?WriteParams} [params]
77
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the request was successful
78
+ */
79
+ async clawbackRaw(f, b) {
80
+ const { request: a, result: d } = await p(
81
+ this._config,
82
+ {
83
+ address: this.assertValidAddress(),
84
+ args: [s(f)],
85
+ ...this.optionallyAttachAccount(),
86
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
87
+ ...b
88
+ }
89
+ );
90
+ return { hash: await m(this._config, a), result: d };
91
+ }
92
+ /**
93
+ * Clawbacks assets from an incentive associated with the budget via Boost Core.
94
+ * Only the authorized users can clawback assets from an incentive.
95
+ * If the asset transfer fails, the reclamation will revert.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const [amount, address] = await budgets.budget.clawbackFromTarget(
100
+ * core.assertValidAddress(),
101
+ * erc20Incentive.buildClawbackData(1n),
102
+ * boost.id,
103
+ * incentiveId,
104
+ * );
105
+ * ```
106
+ * @public
107
+ * @async
108
+ * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`
109
+ * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`
110
+ * @param {bigint | number} boostId - The ID of the boost
111
+ * @param {bigint | number} incentiveId - The ID of the incentive
112
+ * @param {?WriteParams} [params] - Optional write parameters
113
+ * @returns {Promise<[bigint, Address]>} - Returns a tuple of amount reclaimed and the address reclaimed from
114
+ */
115
+ async clawbackFromTarget(f, b, a, d, e) {
116
+ return await this.awaitResult(
117
+ this.clawbackFromTargetRaw(f, b, a, d, e)
118
+ );
119
+ }
120
+ /**
121
+ * Clawbacks assets from an incentive associated with the budget via Boost Core.
122
+ * Only the authorized users can clawback assets from an incentive.
123
+ * If the asset transfer fails, the reclamation will revert.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * const { hash, result: [ amount, address ] } = await budgets.budget.clawbackFromTargetRaw(
128
+ * core.assertValidAddress(),
129
+ * erc20Incentive.buildClawbackData(1n),
130
+ * boost.id,
131
+ * incentiveId,
132
+ * );
133
+ * ```
134
+ * @public
135
+ * @async
136
+ * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`
137
+ * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`
138
+ * @param {bigint | number} boostId - The ID of the boost
139
+ * @param {bigint | number} incentiveId - The ID of the incentive
140
+ * @param {?WriteParams} [params] - Optional write parameters
141
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns transaction hash and simulated result
142
+ */
143
+ async clawbackFromTargetRaw(f, b, a, d, e) {
144
+ const { request: c, result: r } = await R(
145
+ this._config,
146
+ {
147
+ address: this.assertValidAddress(),
148
+ args: [f, b, BigInt(a), BigInt(d)],
149
+ ...this.optionallyAttachAccount(),
150
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
151
+ ...e
152
+ }
153
+ );
154
+ return { hash: await _(
155
+ this._config,
156
+ c
157
+ ), result: r };
158
+ }
159
+ /**
160
+ * Disburses assets from the budget to a single recipient
161
+ * If the asset transfer fails, the disbursement will revert
162
+ *
163
+ * @public
164
+ * @async
165
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
166
+ * @param {?WriteParams} [params]
167
+ * @returns {Promise<boolean>} - True if the disbursement was successful
168
+ */
169
+ async disburse(f, b) {
170
+ return await this.awaitResult(this.disburseRaw(f, b));
171
+ }
172
+ /**
173
+ * Disburses assets from the budget to a single recipient
174
+ * If the asset transfer fails, the disbursement will revert
175
+ *
176
+ * @public
177
+ * @async
178
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
179
+ * @param {?WriteParams} [params]
180
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the disbursement was successful
181
+ */
182
+ async disburseRaw(f, b) {
183
+ const { request: a, result: d } = await F(
184
+ this._config,
185
+ {
186
+ address: this.assertValidAddress(),
187
+ args: [s(f)],
188
+ ...this.optionallyAttachAccount(),
189
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
190
+ ...b
191
+ }
192
+ );
193
+ return { hash: await B(this._config, a), result: d };
194
+ }
195
+ /**
196
+ * Disburses assets from the budget to multiple recipients
197
+ *
198
+ * @public
199
+ * @async
200
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
201
+ * @param {?WriteParams} [params]
202
+ * @returns {Promise<boolean>} - True if all disbursements were successful
203
+ */
204
+ async disburseBatch(f, b) {
205
+ return await this.awaitResult(this.disburseBatchRaw(f, b));
206
+ }
207
+ /**
208
+ * Disburses assets from the budget to multiple recipients
209
+ *
210
+ * @public
211
+ * @async
212
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
213
+ * @param {?WriteParams} [params]
214
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if all disbursements were successful
215
+ */
216
+ async disburseBatchRaw(f, b) {
217
+ const { request: a, result: d } = await V(
218
+ this._config,
219
+ {
220
+ address: this.assertValidAddress(),
221
+ args: [f.map(s)],
222
+ ...this.optionallyAttachAccount(),
223
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
224
+ ...b
225
+ }
226
+ );
227
+ return { hash: await M(this._config, a), result: d };
228
+ }
229
+ /**
230
+ * Pays out reserved management fees to the boost owner
231
+ * for a given incentive
232
+ *
233
+ * @public
234
+ * @async
235
+ * @param {bigint | string} boostId
236
+ * @param {bigint | string} incentiveId
237
+ * @param {?WriteParams} [params]
238
+ * @returns {Promise<boolean>} - True if the payout was successful
239
+ */
240
+ async payManagementFee(f, b, a) {
241
+ return await this.awaitResult(
242
+ this.payManagementFeeRaw(f, b, a)
243
+ );
244
+ }
245
+ /**
246
+ * Pays out reserved management fees to the boost owner
247
+ *
248
+ * @public
249
+ * @async
250
+ * @param bigint boostId
251
+ * @param bigint incentiveId
252
+ * @param {?WriteParams} [params]
253
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the payout was successful
254
+ */
255
+ async payManagementFeeRaw(f, b, a) {
256
+ const { request: d, result: e } = await q(this._config, {
257
+ address: this.assertValidAddress(),
258
+ args: [f, b],
259
+ ...this.optionallyAttachAccount(),
260
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
261
+ ...a
262
+ });
263
+ return { hash: await T(
264
+ this._config,
265
+ d
266
+ ), result: e };
267
+ }
268
+ /**
269
+ * Sets the management fee for the budget
270
+ * @public
271
+ * @async
272
+ * @param {bigint} managementFee
273
+ * @param {?WriteParams} [params]
274
+ * @returns {Promise<void>} - will throw if the transaction fails
275
+ */
276
+ async setManagementFee(f, b) {
277
+ return await this.awaitResult(
278
+ this.setManagementFeeRaw(f, b)
279
+ );
280
+ }
281
+ /**
282
+ * Sets the management fee for the budget
283
+ * @public
284
+ * @async
285
+ * @param {bigint} managementFee
286
+ * @param {?WriteParams} [params]
287
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
288
+ */
289
+ async setManagementFeeRaw(f, b) {
290
+ const { request: a, result: d } = await I(this._config, {
291
+ address: this.assertValidAddress(),
292
+ args: [f],
293
+ ...this.optionallyAttachAccount(),
294
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
295
+ ...b
296
+ });
297
+ return { hash: await N(
298
+ this._config,
299
+ a
300
+ ), result: d };
301
+ }
302
+ /**
303
+ * Get the configured management fee for the budget
304
+ * @public
305
+ * @param {?ReadParams} [params]
306
+ * @returns {Promise<bigint>} - The management fee
307
+ */
308
+ async managementFee(f) {
309
+ return await O(this._config, {
310
+ address: this.assertValidAddress(),
311
+ args: [],
312
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
313
+ ...f
314
+ });
315
+ }
316
+ /**
317
+ * Get the owner of the budget
318
+ *
319
+ * @public
320
+ * @param {?ReadParams} [params]
321
+ * @returns {Promise<Address>}
322
+ */
323
+ owner(f) {
324
+ return P(this._config, {
325
+ address: this.assertValidAddress(),
326
+ args: [],
327
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
328
+ ...f
329
+ });
330
+ }
331
+ /**
332
+ * Get the total amount of assets allocated to the budget, including any that have been distributed
333
+ * If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed
334
+ *
335
+ * @public
336
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"] - The address of the asset
337
+ * @param {?(bigint | undefined)} [tokenId] - The ID of the token
338
+ * @param {?ReadParams} [params]
339
+ * @returns {Promise<bigint>} - The total amount of assets
340
+ */
341
+ total(f = t, b, a) {
342
+ return C(this._config, {
343
+ address: this.assertValidAddress(),
344
+ args: b ? [f, b] : [f],
345
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
346
+ ...a
347
+ });
348
+ }
349
+ /**
350
+ * Get the amount of assets available for distribution from the budget.
351
+ * If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget
352
+ *
353
+ * @public
354
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
355
+ * @param {?(bigint | undefined)} [tokenId]
356
+ * @param {?ReadParams} [params]
357
+ * @returns {Promise<bigint>} - The amount of assets available
358
+ */
359
+ available(f = t, b, a) {
360
+ return k(this._config, {
361
+ address: this.assertValidAddress(),
362
+ args: b ? [f, b] : [f],
363
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
364
+ ...a
365
+ });
366
+ }
367
+ /**
368
+ * Get the amount of assets that have been distributed from the budget.
369
+ * If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget
370
+ *
371
+ * @public
372
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
373
+ * @param {?(bigint | undefined)} [tokenId]
374
+ * @param {?ReadParams} [params]
375
+ * @returns {Promise<bigint>} - The amount of assets distributed
376
+ */
377
+ distributed(f = t, b, a) {
378
+ return z(this._config, {
379
+ address: this.assertValidAddress(),
380
+ args: b ? [f, b] : [f],
381
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
382
+ ...a
383
+ });
384
+ }
385
+ /**
386
+ * @inheritdoc
387
+ *
388
+ * @public
389
+ * @param {?ManagedBudgetWithFeesPayload} [_payload]
390
+ * @param {?DeployableOptions} [_options]
391
+ * @returns {GenericDeployableParams}
392
+ */
393
+ buildParameters(f, b) {
394
+ var e;
395
+ const [a, d] = this.validateDeploymentConfig(
396
+ f,
397
+ b
398
+ );
399
+ if (!a.owner || a.owner === t) {
400
+ const c = d.account ? d.account.address : d.config ? D(d.config).address : (e = this._account) == null ? void 0 : e.address;
401
+ if (c)
402
+ a.owner = c;
403
+ else
404
+ throw new W();
405
+ }
406
+ return {
407
+ abi: l,
408
+ bytecode: a0,
409
+ args: [d0(a)],
410
+ ...this.optionallyAttachAccount(d.account)
411
+ };
412
+ }
413
+ };
414
+ n.bases = {
415
+ 31337: void 0,
416
+ ...E
417
+ }, n.registryType = j.BUDGET;
418
+ let h = n;
419
+ const d0 = ({
420
+ owner: i,
421
+ authorized: f,
422
+ roles: b,
423
+ managementFee: a
424
+ }) => v(
425
+ x([
426
+ "ManagedBudgetWithFeesPayload payload",
427
+ "struct ManagedBudgetWithFeesPayload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }"
428
+ ]),
429
+ [
430
+ {
431
+ owner: i,
432
+ authorized: f,
433
+ roles: b,
434
+ managementFee: a
435
+ }
436
+ ]
437
+ ), e0 = "0x6080604052348015600e575f80fd5b5060156025565b601b6025565b60216025565b6084565b63409feecd198054600181161560425763f92ee8a95f526004601cfd5b8160c01c808260011c14607f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b613d94806100915f395ff3fe608060405260043610610316575f3560e01c8063774c33ab11610199578063dcc21361116100e0578063f8724aba11610089578063fe56e23211610063578063fe56e2321461099b578063fe9fbb80146109ba578063fee81cf4146109d95761031d565b8063f8724aba1461093e578063f9a802c31461095d578063fa4ca9b11461097c5761031d565b8063f04e283e116100ba578063f04e283e146108d3578063f23a6e61146108e6578063f2fde38b1461092b5761031d565b8063dcc2136114610872578063eaefb5cf14610891578063ec87621c146108bf5761031d565b8063b5e4f55d11610142578063c6004a3a1161011c578063c6004a3a146107fd578063d2514e8414610828578063d8c12d22146108475761031d565b8063b5e4f55d14610778578063bc197c8114610797578063be4994f8146107de5761031d565b8063929470eb11610173578063929470eb14610725578063a6f7f5d614610744578063b3005793146107595761031d565b8063774c33ab1461069a57806380009630146106db5780638da5cb5b146106fa5761031d565b806343cc96e11161025d57806354feede51161020657806361400c99116101e057806361400c991461065f578063715018a61461067e57806375b238fc146106865761031d565b806354feede5146105f9578063578bcf35146106185780635aef467a1461064c5761031d565b80634a4ee7b1116102375780634a4ee7b1146105a9578063514e62fc146105bc57806354d1f13d146105f15761031d565b806343cc96e11461054a578063451cc19114610569578063474f5a441461058a5761031d565b80631cd64df4116102bf5780632de94807116102995780632de94807146104db5780634359d28a1461050c578063439fab911461052b5761031d565b80631cd64df41461043f578063256929621461047457806328d6183b1461047c5761031d565b8063183a4f6e116102f0578063183a4f6e146103db578063185832a3146103f05780631c10893f1461042c5761031d565b806301ffc9a71461034f57806310098ad51461038357806314135ce0146103b05761031d565b3661031d57005b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b34801561035a575f80fd5b5061036e610369366004612f80565b610a0a565b60405190151581526020015b60405180910390f35b34801561038e575f80fd5b506103a261039d366004612fd3565b610a1a565b60405190815260200161037a565b3480156103bb575f80fd5b506103a26103ca366004612fd3565b60046020525f908152604090205481565b6103ee6103e9366004612fee565b610a45565b005b3480156103fb575f80fd5b5061040f61040a36600461304a565b610a52565b604080519283526001600160a01b0390911660208301520161037a565b6103ee61043a3660046130ac565b610a7a565b34801561044a575f80fd5b5061036e6104593660046130ac565b638b78c6d8600c9081525f9290925260209091205481161490565b6103ee610a90565b348015610487575f80fd5b507fa2dceadb000000000000000000000000000000000000000000000000000000005b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161037a565b3480156104e6575f80fd5b506103a26104f5366004612fd3565b638b78c6d8600c9081525f91909152602090205490565b348015610517575f80fd5b506103ee610526366004613117565b610add565b348015610536575f80fd5b506103ee610545366004613183565b610bd7565b348015610555575f80fd5b506103ee6105643660046131c2565b610db2565b348015610574575f80fd5b506103a2610583366004613183565b5f92915050565b348015610595575f80fd5b506103a26105a4366004613183565b61111d565b6103ee6105b73660046130ac565b6112d3565b3480156105c7575f80fd5b5061036e6105d63660046130ac565b638b78c6d8600c9081525f9290925260209091205416151590565b6103ee6112e5565b348015610604575f80fd5b506103ee6106133660046131e2565b61131e565b348015610623575f80fd5b506103a2610632366004612fd3565b6001600160a01b03165f9081526006602052604090205490565b61036e61065a366004613183565b6116e1565b34801561066a575f80fd5b5061036e610679366004613214565b6119e1565b6103ee611a28565b348015610691575f80fd5b506103a2600281565b3480156106a5575f80fd5b506103a26106b43660046130ac565b6001600160a01b03919091165f908152600760209081526040808320938352929052205490565b3480156106e6575f80fd5b506103ee6106f5366004612fd3565b611a3b565b348015610705575f80fd5b50638b78c6d819546040516001600160a01b03909116815260200161037a565b348015610730575f80fd5b5061036e61073f366004613247565b611a4f565b34801561074f575f80fd5b506103a260015481565b348015610764575f80fd5b5061040f61077336600461304a565b611b15565b348015610783575f80fd5b5061040f6107923660046132ac565b611b71565b3480156107a2575f80fd5b506104aa6107b1366004613321565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156107e9575f80fd5b506103ee6107f8366004613117565b611b9b565b348015610808575f80fd5b506103a2610817366004612fd3565b60036020525f908152604090205481565b348015610833575f80fd5b506103a2610842366004612fd3565b611c39565b348015610852575f80fd5b506103a2610861366004612fd3565b60026020525f908152604090205481565b34801561087d575f80fd5b506103ee61088c366004613117565b611c79565b34801561089c575f80fd5b5061036e6108ab366004612fd3565b60056020525f908152604090205460ff1681565b3480156108ca575f80fd5b506103a2600181565b6103ee6108e1366004612fd3565b611d17565b3480156108f1575f80fd5b506104aa6109003660046133e4565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b6103ee610939366004612fd3565b611d51565b348015610949575f80fd5b506103a26109583660046130ac565b611d77565b348015610968575f80fd5b506103a26109773660046130ac565b611e04565b348015610987575f80fd5b5061036e610996366004613183565b611eae565b3480156109a6575f80fd5b506103ee6109b5366004612fee565b6121f6565b3480156109c5575f80fd5b5061036e6109d4366004612fd3565b6122a9565b3480156109e4575f80fd5b506103a26109f3366004612fd3565b63389a75e1600c9081525f91909152602090205490565b5f610a14826122ee565b92915050565b6001600160a01b0381165f90815260046020526040812054610a3b83612343565b610a149190613488565b610a4f3382612372565b50565b5f80610a618787878787611b15565b9092509050610a708484610db2565b9550959350505050565b610a8261237d565b610a8c8282612397565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6002610ae8816123a3565b838214610b21576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610bcf575f848483818110610b3e57610b3e61349b565b9050602002016020810190610b5391906134d5565b9050801515600103610b9557610b90878784818110610b7457610b7461349b565b9050602002016020810190610b899190612fd3565b6001612397565b610bc6565b610bc6878784818110610baa57610baa61349b565b9050602002016020810190610bbf9190612fd3565b6001612372565b50600101610b23565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610c285760018160011c14303b10610c1f5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610c368385018561364b565b9050610c44815f01516123d4565b60015b816020015151811015610ca057610c9882602001518281518110610c6d57610c6d61349b565b602002602001015183604001518381518110610c8b57610c8b61349b565b602002602001015161240f565b600101610c47565b508060200151515f03610d14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f20636f726520636f6e74726163742073657400000000000000000000000060448201526064015b60405180910390fd5b610d3a81602001515f81518110610d2d57610d2d61349b565b6020026020010151612450565b606081015160018190556040519081527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09789060200160405180910390a1508015610dad576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f80546040517f13c8e2de000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03909116906313c8e2de906024015f60405180830381865afa158015610e11573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610e3891908101906137ec565b90505f81608001518381518110610e5157610e5161349b565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f7cc1d5bb0000000000000000000000000000000000000000000000000000000060048201529091506001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610eda573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efe91906138c9565b15610fd8575f816001600160a01b031663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610f41573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6591906138e4565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610fa5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fc991906138e4565b9050610bcf8686868585612505565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f903181110000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611053573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061107791906138c9565b1561031d575f816001600160a01b031663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af11580156110ba573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110de91906138e4565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fa5573d5f803e3d5ffd5b5f6002611129816123a3565b5f61113684860186613922565b90505f808251600281111561114d5761114d613a08565b148061116b575060018251600281111561116957611169613a08565b145b156111c2575f82606001518060200190518101906111899190613a35565b6020840151604085015182519293506111ba92156111a857835161270a565b6111b58660200151610a1a565b61270a565b5190506112c8565b6002825160028111156111d7576111d7613a08565b036112bf575f82606001518060200190518101906111f59190613a77565b90506112b483602001518460400151835f015184602001515f1461121d5784602001516112aa565b602087015185516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091526001600160a01b039091169062fdd58e90604401602060405180830381865afa158015611286573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112aa91906138e4565b856040015161287a565b6020015190506112c8565b92506112cc9050565b9250505b5092915050565b6112db61237d565b610a8c8282612372565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6001600160a01b0383165f9081526005602052604090205460ff1661136f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f13c8e2de000000000000000000000000000000000000000000000000000000008152600481018390525f906001600160a01b038516906313c8e2de906024015f60405180830381865afa1580156113cc573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526113f391908101906137ec565b90505f8160800151838151811061140c5761140c61349b565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f7cc1d5bb0000000000000000000000000000000000000000000000000000000060048201529091506001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611495573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114b991906138c9565b1561159c575f816001600160a01b031663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af11580156114fc573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061152091906138e4565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611560573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061158491906138e4565b90506115938686868585612505565b50505050505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f903181110000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611617573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061163b91906138c9565b1561031d575f816001600160a01b031663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af115801561167e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116a291906138e4565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611560573d5f803e3d5ffd5b5f806116ef83850185613922565b90505f8151600281111561170557611705613a08565b0361177e575f81606001518060200190518101906117239190613a35565b8051909150341461177857602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610d0b565b506119d7565b60018151600281111561179357611793613a08565b03611840575f81606001518060200190518101906117b19190613a35565b6040830151815160208501519293506117d6926001600160a01b031691903090612a6e565b805160208301516117f0906001600160a01b031630612ac6565b101561177857602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610d0b565b60028151600281111561185557611855613a08565b036119ce575f81606001518060200190518101906118739190613a77565b905081602001516001600160a01b031663f242432a836040015130845f0151856020015186604001516040518663ffffffff1660e01b81526004016118bc959493929190613b63565b5f604051808303815f87803b1580156118d3575f80fd5b505af11580156118e5573d5f803e3d5ffd5b5050506020808301519084015183516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192506001600160a01b03169062fdd58e90604401602060405180830381865afa158015611957573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061197b91906138e4565b101561177857602080830151908201516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610d0b565b5f915050610a14565b5060019392505050565b5f805b828110156119d757611a13848483818110611a0157611a0161349b565b90506020028101906109969190613baa565b611a20575f915050610a14565b6001016119e4565b611a3061237d565b611a395f612af9565b565b6002611a46816123a3565b610a8c82612450565b5f611a59336122a9565b611a8f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f1fa2acdc0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690631fa2acdc90611adc9088908890889088903090600401613c0b565b5f604051808303815f87803b158015611af3575f80fd5b505af1158015611b05573d5f803e3d5ffd5b5060019998505050505050505050565b5f80611b20336122a9565b611b56576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b638787878787612b36565b915091509550959350505050565b5f80611b808888888787612b36565b9092509050611b9085858561131e565b965096945050505050565b6002611ba6816123a3565b838214611bdf576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610bcf57611c31868683818110611bfe57611bfe61349b565b9050602002016020810190611c139190612fd3565b858584818110611c2557611c2561349b565b90506020020135612397565b600101611be1565b6001600160a01b0381165f908152600460209081526040808320546006909252822054611c6584610a1a565b611c6f9190613c59565b610a149190613c59565b6002611c84816123a3565b838214611cbd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610bcf57611d0f868683818110611cdc57611cdc61349b565b9050602002016020810190611cf19190612fd3565b858584818110611d0357611d0361349b565b90506020020135612372565b600101611cbf565b611d1f61237d565b63389a75e1600c52805f526020600c208054421115611d4557636f5e88185f526004601cfd5b5f9055610a4f81612af9565b611d5961237d565b8060601b611d6e57637448fbae5f526004601cfd5b610a4f81612af9565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f906001600160a01b0384169062fdd58e90604401602060405180830381865afa158015611dd9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dfd91906138e4565b9392505050565b6001600160a01b0382165f8181526007602090815260408083208584529091528082205490517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018590529192909162fdd58e90604401602060405180830381865afa158015611e80573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ea491906138e4565b611dfd9190613c59565b5f611eb8336122a9565b611eee576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611efb83850185613922565b9050600181516002811115611f1257611f12613a08565b1480611f2f57505f81516002811115611f2d57611f2d613a08565b145b156120a8575f8160600151806020019051810190611f4d9190613a35565b90505f612710600154835f0151611f649190613c6c565b611f6e9190613c83565b90505f611f7e8460200151610a1a565b90508082845f0151611f909190613c59565b1115611ff557602084015183518290611faa908590613c59565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b03909316600484015260248301919091526044820152606401610d0b565b6040808501516001600160a01b03165f90815260026020529081208054849290612020908490613c59565b90915550506020808501516001600160a01b03165f9081526004909152604081208054849290612051908490613c59565b909155505082516020808601516001600160a01b03165f9081526006909152604081208054909190612084908490613c59565b90915550506020840151604085015184516120a092919061270a565b5050506119d7565b6002815160028111156120bd576120bd613a08565b036119ce575f81606001518060200190518101906120db9190613a77565b602083015181516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192505f916001600160a01b039091169062fdd58e90604401602060405180830381865afa158015612149573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061216d91906138e4565b905080826020015111156121cf57602080840151908301516040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482018390526044820152606401610d0b565b6121ef83602001518460400151845f01518560200151866040015161287a565b50506119d7565b6002612201816123a3565b61271082111561226d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665652063616e6e6f74206578636565642031303025000000000000000000006044820152606401610d0b565b60018290556040518281527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09789060200160405180910390a15050565b5f816001600160a01b03166122c1638b78c6d8195490565b6001600160a01b03161480610a145750638b78c6d8600c9081525f83905260209020546003161515610a14565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fde98bbf0000000000000000000000000000000000000000000000000000000001480610a145750610a1482612ca4565b5f6001600160a01b0382161561236b576123666001600160a01b03831630612ac6565b610a14565b4792915050565b610a8c82825f612cf9565b638b78c6d819543314611a39576382b429005f526004601cfd5b610a8c82826001612cf9565b638b78c6d819543314610a4f57638b78c6d8600c52335f52806020600c205416610a4f576382b429005f526004601cfd5b6001600160a01b0316638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b5f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081178255815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091556124c690829061240f565b6040516001600160a01b03821681527f11dd8c34fa7e859614e12db6445bd13eb507b6e1a382ae61214d4e5c349df0729060200160405180910390a150565b5f8360800151858151811061251c5761251c61349b565b6020908102919091018101516001600160a01b0381165f90815260028352604080822054600390945281205491935081856125578886613c6c565b6125619190613c83565b61256b9190613488565b90506125778183613c59565b6001600160a01b0385165f8181526003602090815260408083209490945583517f38d52e0f000000000000000000000000000000000000000000000000000000008152935191936338d52e0f92600480830193928290030181865afa1580156125e2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126069190613cbb565b60e08901516001600160a01b0382165f9081526004602052604081208054939450919285929190612638908490613488565b90915550505f839003612677576040517fb2e783cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846126828486613c59565b036126ad576001600160a01b0386165f90815260026020908152604080832083905560039091528120555b806001600160a01b03168a8c7ff44ff640e648077f3acc130c6ce75240070e8c40adc85b0feeeec28d9dd921b4866040516126ea91815260200190565b60405180910390a46126fd82828561270a565b5050505050505050505050565b3068929eee149b4bd2126854036127285763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b03821661278e576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301528316602482015260448101829052606401610d0b565b61279783610a1a565b8111156127f257826127a884610a1a565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101829052606401610d0b565b6001600160a01b03831661280f5761280a8282612d50565b612823565b6128236001600160a01b0384168383612d69565b604080516001600160a01b038481168252602082018490528516917fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd43542910160405180910390a23868929eee149b4bd2126855505050565b3068929eee149b4bd2126854036128985763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b0384166128fe576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380871660048301528516602482015260448101839052606401610d0b565b6129088584611d77565b821115612964578461291a8685611d77565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101839052606401610d0b565b6001600160a01b0385165f90815260076020908152604080832086845290915281208054849290612996908490613c59565b90915550506040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063f242432a906129e89030908890889088908890600401613b63565b5f604051808303815f87803b1580156129ff575f80fd5b505af1158015612a11573d5f803e3d5ffd5b5050604080516001600160a01b03888116825260208201879052891693507fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd4354292500160405180910390a23868929eee149b4bd21268555050505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af13d1560015f51141716612ab957637939f4245f526004601cfd5b5f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f80612b41336122a9565b612b77576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060400160405280306001600160a01b0316815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250506040519293508a9290915081906001600160a01b0384169063dd98558c90612bf5908790602001613cd6565b6040516020818303038152906040528a8a6040518463ffffffff1660e01b8152600401612c2493929190613d0b565b60408051808303815f875af1158015612c3f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c639190613d2f565b6001600160a01b0381165f90815260066020526040812080549395509193508492612c8f908490613488565b90915550919b909a5098505050505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fde98bbf0000000000000000000000000000000000000000000000000000000001480610a145750610a1482612db2565b638b78c6d8600c52825f526020600c20805483811783612d1a575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f385f3884865af1610a8c5763b12d13eb5f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f51141716612da9576390b8ec185f526004601cfd5b5f603452505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5fbfaa4e000000000000000000000000000000000000000000000000000000001480612e4457507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b80612e9057507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b80610a145750610a14825f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe49cedd7000000000000000000000000000000000000000000000000000000001480610a145750610a14825f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d000000000000000000000000000000000000000000000000000000001480610a1457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a14565b5f60208284031215612f90575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611dfd575f80fd5b6001600160a01b0381168114610a4f575f80fd5b5f60208284031215612fe3575f80fd5b8135611dfd81612fbf565b5f60208284031215612ffe575f80fd5b5035919050565b5f8083601f840112613015575f80fd5b50813567ffffffffffffffff81111561302c575f80fd5b602083019150836020828501011115613043575f80fd5b9250929050565b5f805f805f6080868803121561305e575f80fd5b853561306981612fbf565b9450602086013567ffffffffffffffff811115613084575f80fd5b61309088828901613005565b9699909850959660408101359660609091013595509350505050565b5f80604083850312156130bd575f80fd5b82356130c881612fbf565b946020939093013593505050565b5f8083601f8401126130e6575f80fd5b50813567ffffffffffffffff8111156130fd575f80fd5b6020830191508360208260051b8501011115613043575f80fd5b5f805f806040858703121561312a575f80fd5b843567ffffffffffffffff811115613140575f80fd5b61314c878288016130d6565b909550935050602085013567ffffffffffffffff81111561316b575f80fd5b613177878288016130d6565b95989497509550505050565b5f8060208385031215613194575f80fd5b823567ffffffffffffffff8111156131aa575f80fd5b6131b685828601613005565b90969095509350505050565b5f80604083850312156131d3575f80fd5b50508035926020909101359150565b5f805f606084860312156131f4575f80fd5b83356131ff81612fbf565b95602085013595506040909401359392505050565b5f8060208385031215613225575f80fd5b823567ffffffffffffffff81111561323b575f80fd5b6131b6858286016130d6565b5f805f805f6080868803121561325b575f80fd5b853561326681612fbf565b94506020860135935060408601359250606086013567ffffffffffffffff81111561328f575f80fd5b61329b88828901613005565b969995985093965092949392505050565b5f805f805f8060a087890312156132c1575f80fd5b86356132cc81612fbf565b9550602087013567ffffffffffffffff8111156132e7575f80fd5b6132f389828a01613005565b909650945050604087013561330781612fbf565b959894975092956060810135946080909101359350915050565b5f805f805f805f8060a0898b031215613338575f80fd5b883561334381612fbf565b9750602089013561335381612fbf565b9650604089013567ffffffffffffffff81111561336e575f80fd5b61337a8b828c016130d6565b909750955050606089013567ffffffffffffffff811115613399575f80fd5b6133a58b828c016130d6565b909550935050608089013567ffffffffffffffff8111156133c4575f80fd5b6133d08b828c01613005565b999c989b5096995094979396929594505050565b5f805f805f8060a087890312156133f9575f80fd5b863561340481612fbf565b9550602087013561341481612fbf565b94506040870135935060608701359250608087013567ffffffffffffffff81111561343d575f80fd5b61344989828a01613005565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610a1457610a1461345b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8015158114610a4f575f80fd5b5f602082840312156134e5575f80fd5b8135611dfd816134c8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516080810167ffffffffffffffff81118282101715613540576135406134f0565b60405290565b604051610100810167ffffffffffffffff81118282101715613540576135406134f0565b6040516060810167ffffffffffffffff81118282101715613540576135406134f0565b604051601f8201601f1916810167ffffffffffffffff811182821017156135b6576135b66134f0565b604052919050565b5f67ffffffffffffffff8211156135d7576135d76134f0565b5060051b60200190565b5f82601f8301126135f0575f80fd5b81356136036135fe826135be565b61358d565b8082825260208201915060208360051b860101925085831115613624575f80fd5b602085015b83811015613641578035835260209283019201613629565b5095945050505050565b5f6020828403121561365b575f80fd5b813567ffffffffffffffff811115613671575f80fd5b820160808185031215613682575f80fd5b61368a61351d565b813561369581612fbf565b8152602082013567ffffffffffffffff8111156136b0575f80fd5b8201601f810186136136c0575f80fd5b80356136ce6135fe826135be565b8082825260208201915060208360051b8501019250888311156136ef575f80fd5b6020840193505b8284101561371a57833561370981612fbf565b8252602093840193909101906136f6565b6020850152505050604082013567ffffffffffffffff81111561373b575f80fd5b613747868285016135e1565b604083015250606091820135918101919091529392505050565b805161376c81612fbf565b919050565b5f82601f830112613780575f80fd5b815161378e6135fe826135be565b8082825260208201915060208360051b8601019250858311156137af575f80fd5b602085015b838110156136415780516137c781612fbf565b8352602092830192016137b4565b805167ffffffffffffffff8116811461376c575f80fd5b5f602082840312156137fc575f80fd5b815167ffffffffffffffff811115613812575f80fd5b82016101008185031215613824575f80fd5b61382c613546565b61383582613761565b815261384360208301613761565b602082015261385460408301613761565b604082015261386560608301613761565b6060820152608082015167ffffffffffffffff811115613883575f80fd5b61388f86828501613771565b6080830152506138a160a083016137d5565b60a082015260c082810151908201526138bc60e08301613761565b60e0820152949350505050565b5f602082840312156138d9575f80fd5b8151611dfd816134c8565b5f602082840312156138f4575f80fd5b5051919050565b5f67ffffffffffffffff821115613914576139146134f0565b50601f01601f191660200190565b5f60208284031215613932575f80fd5b813567ffffffffffffffff811115613948575f80fd5b820160808185031215613959575f80fd5b61396161351d565b81356003811061396f575f80fd5b8152602082013561397f81612fbf565b6020820152604082013561399281612fbf565b6040820152606082013567ffffffffffffffff8111156139b0575f80fd5b80830192505084601f8301126139c4575f80fd5b81356139d26135fe826138fb565b8181528660208386010111156139e6575f80fd5b816020850160208301375f918101602001919091526060820152949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f6020828403128015613a46575f80fd5b506040516020810167ffffffffffffffff81118282101715613a6a57613a6a6134f0565b6040529151825250919050565b5f60208284031215613a87575f80fd5b815167ffffffffffffffff811115613a9d575f80fd5b820160608185031215613aae575f80fd5b613ab661356a565b8151815260208083015190820152604082015167ffffffffffffffff811115613add575f80fd5b80830192505084601f830112613af1575f80fd5b8151613aff6135fe826138fb565b818152866020838601011115613b13575f80fd5b8160208501602083015e5f918101602001919091526040820152949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03861681526001600160a01b038516602082015283604082015282606082015260a060808201525f613b9f60a0830184613b35565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613bdd575f80fd5b83018035915067ffffffffffffffff821115613bf7575f80fd5b602001915036819003821315613043575f80fd5b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a0601f19601f86011683010190506001600160a01b03831660608301529695505050505050565b80820180821115610a1457610a1461345b565b8082028115828204841417610a1457610a1461345b565b5f82613cb6577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215613ccb575f80fd5b8151611dfd81612fbf565b602081526001600160a01b0382511660208201525f6020830151604080840152613d036060840182613b35565b949350505050565b606081525f613d1d6060830186613b35565b60208301949094525060400152919050565b5f8060408385031215613d40575f80fd5b82516020840151909250613d5381612fbf565b80915050925092905056fea2646970667358221220cca11825ffeee8b8c8a4abd0f0e1467bea1cbdc64017e22d37ba8b9ec9bdfff964736f6c634300081a0033", o = class o extends U {
438
+ constructor() {
439
+ super(...arguments), this.abi = w;
440
+ }
441
+ /**
442
+ * Allocates assets to the budget.
443
+ * The caller must have already approved the contract to transfer the asset
444
+ * If the asset transfer fails, the allocation will revert
445
+ *
446
+ * @public
447
+ * @async
448
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
449
+ * @param {?WriteParams} [params]
450
+ * @returns {Promise<boolean>} - True if the allocation was successful
451
+ */
452
+ async allocate(f, b) {
453
+ return await this.awaitResult(this.allocateRaw(f, b));
454
+ }
455
+ /**
456
+ * Allocates assets to the budget.
457
+ * The caller must have already approved the contract to transfer the asset
458
+ * If the asset transfer fails, the allocation will revert
459
+ *
460
+ * @public
461
+ * @async
462
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
463
+ * @param {?WriteParams} [params]
464
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the allocation was successful
465
+ */
466
+ async allocateRaw(f, b) {
467
+ const { request: a, result: d } = await y(
468
+ this._config,
469
+ {
470
+ address: this.assertValidAddress(),
471
+ args: [s(f)],
472
+ ...this.optionallyAttachAccount(),
473
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
474
+ ...b
475
+ }
476
+ );
477
+ return { hash: await A(this._config, a), result: d };
478
+ }
479
+ /**
480
+ * Clawbacks assets from the budget.
481
+ * Only the owner can directly clawback assets from the budget
482
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
483
+ * If the asset transfer fails, the reclamation will revert
484
+ *
485
+ * @public
486
+ * @async
487
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
488
+ * @param {?WriteParams} [params]
489
+ * @returns {Promise<boolean>} - True if the request was successful
490
+ */
491
+ async clawback(f, b) {
492
+ return await this.awaitResult(this.clawbackRaw(f, b));
493
+ }
494
+ /**
495
+ * Clawbacks assets from the budget.
496
+ * Only the owner or admin can directly clawback assets from the budget
497
+ * If the amount is zero, the entire balance of the asset will be transferred to the receiver
498
+ * If the asset transfer fails, the reclamation will revert
499
+ *
500
+ * @public
501
+ * @async
502
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
503
+ * @param {?WriteParams} [params]
504
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the request was successful
505
+ */
506
+ async clawbackRaw(f, b) {
507
+ const { request: a, result: d } = await p(
508
+ this._config,
509
+ {
510
+ address: this.assertValidAddress(),
511
+ args: [s(f)],
512
+ ...this.optionallyAttachAccount(),
513
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
514
+ ...b
515
+ }
516
+ );
517
+ return { hash: await m(this._config, a), result: d };
518
+ }
519
+ /**
520
+ * Clawbacks assets from an incentive associated with the budget via Boost Core.
521
+ * Only the authorized users can clawback assets from an incentive.
522
+ * If the asset transfer fails, the reclamation will revert.
523
+ *
524
+ * @example
525
+ * ```ts
526
+ * const [amount, address] = await budgets.budget.clawbackFromTarget(
527
+ * core.assertValidAddress(),
528
+ * erc20Incentive.buildClawbackData(1n),
529
+ * boost.id,
530
+ * incentiveId,
531
+ * );
532
+ * ```
533
+ * @public
534
+ * @async
535
+ * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`
536
+ * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`
537
+ * @param {bigint | number} boostId - The ID of the boost
538
+ * @param {bigint | number} incentiveId - The ID of the incentive
539
+ * @param {?WriteParams} [params] - Optional write parameters
540
+ * @returns {Promise<[bigint, Address]>} - Returns a tuple of amount reclaimed and the address reclaimed from
541
+ */
542
+ async clawbackFromTarget(f, b, a, d, e) {
543
+ return await this.awaitResult(
544
+ this.clawbackFromTargetRaw(f, b, a, d, e)
545
+ );
546
+ }
547
+ /**
548
+ * Clawbacks assets from an incentive associated with the budget via Boost Core.
549
+ * Only the authorized users can clawback assets from an incentive.
550
+ * If the asset transfer fails, the reclamation will revert.
551
+ *
552
+ * @example
553
+ * ```ts
554
+ * const { hash, result: [ amount, address ] } = await budgets.budget.clawbackFromTargetRaw(
555
+ * core.assertValidAddress(),
556
+ * erc20Incentive.buildClawbackData(1n),
557
+ * boost.id,
558
+ * incentiveId,
559
+ * );
560
+ * ```
561
+ * @public
562
+ * @async
563
+ * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`
564
+ * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`
565
+ * @param {bigint | number} boostId - The ID of the boost
566
+ * @param {bigint | number} incentiveId - The ID of the incentive
567
+ * @param {?WriteParams} [params] - Optional write parameters
568
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns transaction hash and simulated result
569
+ */
570
+ async clawbackFromTargetRaw(f, b, a, d, e) {
571
+ const { request: c, result: r } = await R(
572
+ this._config,
573
+ {
574
+ address: this.assertValidAddress(),
575
+ args: [f, b, BigInt(a), BigInt(d)],
576
+ ...this.optionallyAttachAccount(),
577
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
578
+ ...e
579
+ }
580
+ );
581
+ return { hash: await _(
582
+ this._config,
583
+ c
584
+ ), result: r };
585
+ }
586
+ /**
587
+ * Disburses assets from the budget to a single recipient
588
+ * If the asset transfer fails, the disbursement will revert
589
+ *
590
+ * @public
591
+ * @async
592
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
593
+ * @param {?WriteParams} [params]
594
+ * @returns {Promise<boolean>} - True if the disbursement was successful
595
+ */
596
+ async disburse(f, b) {
597
+ return await this.awaitResult(this.disburseRaw(f, b));
598
+ }
599
+ /**
600
+ * Disburses assets from the budget to a single recipient
601
+ * If the asset transfer fails, the disbursement will revert
602
+ *
603
+ * @public
604
+ * @async
605
+ * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer
606
+ * @param {?WriteParams} [params]
607
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the disbursement was successful
608
+ */
609
+ async disburseRaw(f, b) {
610
+ const { request: a, result: d } = await F(
611
+ this._config,
612
+ {
613
+ address: this.assertValidAddress(),
614
+ args: [s(f)],
615
+ ...this.optionallyAttachAccount(),
616
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
617
+ ...b
618
+ }
619
+ );
620
+ return { hash: await B(this._config, a), result: d };
621
+ }
622
+ /**
623
+ * Disburses assets from the budget to multiple recipients
624
+ *
625
+ * @public
626
+ * @async
627
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
628
+ * @param {?WriteParams} [params]
629
+ * @returns {Promise<boolean>} - True if all disbursements were successful
630
+ */
631
+ async disburseBatch(f, b) {
632
+ return await this.awaitResult(this.disburseBatchRaw(f, b));
633
+ }
634
+ /**
635
+ * Disburses assets from the budget to multiple recipients
636
+ *
637
+ * @public
638
+ * @async
639
+ * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers
640
+ * @param {?WriteParams} [params]
641
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if all disbursements were successful
642
+ */
643
+ async disburseBatchRaw(f, b) {
644
+ const { request: a, result: d } = await V(
645
+ this._config,
646
+ {
647
+ address: this.assertValidAddress(),
648
+ args: [f.map(s)],
649
+ ...this.optionallyAttachAccount(),
650
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
651
+ ...b
652
+ }
653
+ );
654
+ return { hash: await M(this._config, a), result: d };
655
+ }
656
+ /**
657
+ * Pays out reserved management fees to the boost owner
658
+ * for a given incentive
659
+ *
660
+ * @public
661
+ * @async
662
+ * @param {bigint | string} boostId
663
+ * @param {bigint | string} incentiveId
664
+ * @param {?WriteParams} [params]
665
+ * @returns {Promise<boolean>} - True if the payout was successful
666
+ */
667
+ async payManagementFee(f, b, a, d) {
668
+ return a ? await this.awaitResult(
669
+ this.payManagementFeeWithCoreRaw(a, f, b)
670
+ ) : await this.awaitResult(
671
+ this.payManagementFeeRaw(f, b, d)
672
+ );
673
+ }
674
+ /**
675
+ * Pays out reserved management fees to the boost owner
676
+ *
677
+ * @public
678
+ * @async
679
+ * @param {Address} boostCore
680
+ * @param bigint boostId
681
+ * @param bigint incentiveId
682
+ * @param {?WriteParams} [params]
683
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the payout was successful
684
+ */
685
+ async payManagementFeeRaw(f, b, a) {
686
+ const { request: d, result: e } = await q(this._config, {
687
+ address: this.assertValidAddress(),
688
+ args: [f, b],
689
+ ...this.optionallyAttachAccount(),
690
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
691
+ ...a
692
+ });
693
+ return { hash: await T(
694
+ this._config,
695
+ // @ts-ignore getting a type: 'legacy' | undefined is not assignable to type 'eip7702' | undefined error
696
+ d
697
+ ), result: e };
698
+ }
699
+ /**
700
+ * Pays out reserved management fees to the boost owner
701
+ *
702
+ * @public
703
+ * @async
704
+ * @param {Address} boostCore
705
+ * @param bigint boostId
706
+ * @param bigint incentiveId
707
+ * @param {?WriteParams} [params]
708
+ * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the payout was successful
709
+ */
710
+ async payManagementFeeWithCoreRaw(f, b, a, d) {
711
+ const { request: e, result: c } = await H(this._config, {
712
+ address: this.assertValidAddress(),
713
+ args: [f, b, a],
714
+ ...this.optionallyAttachAccount(),
715
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
716
+ ...d
717
+ });
718
+ return { hash: await L(
719
+ this._config,
720
+ // @ts-ignore getting a type: 'legacy' | undefined is not assignable to type 'eip7702' | undefined error
721
+ e
722
+ ), result: c };
723
+ }
724
+ /**
725
+ * Sets the management fee for the budget
726
+ * @public
727
+ * @async
728
+ * @param {bigint} managementFee
729
+ * @param {?WriteParams} [params]
730
+ * @returns {Promise<void>} - will throw if the transaction fails
731
+ */
732
+ async setManagementFee(f, b) {
733
+ return await this.awaitResult(
734
+ this.setManagementFeeRaw(f, b)
735
+ );
736
+ }
737
+ /**
738
+ * Sets the management fee for the budget
739
+ * @public
740
+ * @async
741
+ * @param {bigint} managementFee
742
+ * @param {?WriteParams} [params]
743
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
744
+ */
745
+ async setManagementFeeRaw(f, b) {
746
+ const { request: a, result: d } = await X(this._config, {
747
+ address: this.assertValidAddress(),
748
+ args: [f],
749
+ ...this.optionallyAttachAccount(),
750
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
751
+ ...b
752
+ });
753
+ return { hash: await $(
754
+ this._config,
755
+ a
756
+ ), result: d };
757
+ }
758
+ /**
759
+ * Get the configured management fee for the budget
760
+ * @public
761
+ * @param {?ReadParams} [params]
762
+ * @returns {Promise<bigint>} - The management fee
763
+ */
764
+ async managementFee(f) {
765
+ return await K(this._config, {
766
+ address: this.assertValidAddress(),
767
+ args: [],
768
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
769
+ ...f
770
+ });
771
+ }
772
+ /**
773
+ * Get the owner of the budget
774
+ *
775
+ * @public
776
+ * @param {?ReadParams} [params]
777
+ * @returns {Promise<Address>}
778
+ */
779
+ owner(f) {
780
+ return P(this._config, {
781
+ address: this.assertValidAddress(),
782
+ args: [],
783
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
784
+ ...f
785
+ });
786
+ }
787
+ /**
788
+ * Get the total amount of assets allocated to the budget, including any that have been distributed
789
+ * If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed
790
+ *
791
+ * @public
792
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"] - The address of the asset
793
+ * @param {?(bigint | undefined)} [tokenId] - The ID of the token
794
+ * @param {?ReadParams} [params]
795
+ * @returns {Promise<bigint>} - The total amount of assets
796
+ */
797
+ total(f = t, b, a) {
798
+ return C(this._config, {
799
+ address: this.assertValidAddress(),
800
+ args: b ? [f, b] : [f],
801
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
802
+ ...a
803
+ });
804
+ }
805
+ /**
806
+ * Get the amount of assets available for distribution from the budget.
807
+ * If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget
808
+ *
809
+ * @public
810
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
811
+ * @param {?(bigint | undefined)} [tokenId]
812
+ * @param {?ReadParams} [params]
813
+ * @returns {Promise<bigint>} - The amount of assets available
814
+ */
815
+ available(f = t, b, a) {
816
+ return k(this._config, {
817
+ address: this.assertValidAddress(),
818
+ args: b ? [f, b] : [f],
819
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
820
+ ...a
821
+ });
822
+ }
823
+ /**
824
+ * Get the amount of assets that have been distributed from the budget.
825
+ * If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget
826
+ *
827
+ * @public
828
+ * @param {Address} [asset="0x0000000000000000000000000000000000000000"]
829
+ * @param {?(bigint | undefined)} [tokenId]
830
+ * @param {?ReadParams} [params]
831
+ * @returns {Promise<bigint>} - The amount of assets distributed
832
+ */
833
+ distributed(f = t, b, a) {
834
+ return z(this._config, {
835
+ address: this.assertValidAddress(),
836
+ args: b ? [f, b] : [f],
837
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
838
+ ...a
839
+ });
840
+ }
841
+ /**
842
+ * @inheritdoc
843
+ *
844
+ * @public
845
+ * @param {?ManagedBudgetWithFeesV2Payload} [_payload]
846
+ * @param {?DeployableOptions} [_options]
847
+ * @returns {GenericDeployableParams}
848
+ */
849
+ buildParameters(f, b) {
850
+ var e;
851
+ const [a, d] = this.validateDeploymentConfig(
852
+ f,
853
+ b
854
+ );
855
+ if (!a.owner || a.owner === t) {
856
+ const c = d.account ? d.account.address : d.config ? D(d.config).address : (e = this._account) == null ? void 0 : e.address;
857
+ if (c)
858
+ a.owner = c;
859
+ else
860
+ throw new W();
861
+ }
862
+ return {
863
+ abi: w,
864
+ bytecode: e0,
865
+ args: [c0(a)],
866
+ ...this.optionallyAttachAccount(d.account)
867
+ };
868
+ }
869
+ };
870
+ o.bases = {
871
+ 31337: void 0,
872
+ ...E
873
+ }, o.registryType = j.BUDGET;
874
+ let u = o;
875
+ const c0 = ({
876
+ owner: i,
877
+ authorized: f,
878
+ roles: b,
879
+ managementFee: a
880
+ }) => v(
881
+ x([
882
+ "ManagedBudgetWithFeesV2Payload payload",
883
+ "struct ManagedBudgetWithFeesV2Payload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }"
884
+ ]),
885
+ [
886
+ {
887
+ owner: i,
888
+ authorized: f,
889
+ roles: b,
890
+ managementFee: a
891
+ }
892
+ ]
893
+ ), g = {
894
+ // ['0x64683da1']: VestingBudget,
895
+ // ['0x2929d19c']: SimpleBudget,
896
+ [S]: b0,
897
+ [Y]: h,
898
+ [J]: u
899
+ };
900
+ async function w0(i, f, b) {
901
+ const a = await Z(i.config, {
902
+ abi: Q,
903
+ functionName: "getComponentInterface",
904
+ address: f,
905
+ ...b
906
+ }), d = g[a];
907
+ if (!d)
908
+ throw new f0(
909
+ Object.keys(g),
910
+ a
911
+ );
912
+ return new d(i, f);
913
+ }
914
+ export {
915
+ g as B,
916
+ h as M,
917
+ u as a,
918
+ w0 as b,
919
+ c0 as c,
920
+ d0 as p
921
+ };
922
+ //# sourceMappingURL=Budget-bMiAGF8s.js.map