@boostxyz/sdk 6.0.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.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +2 -2
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.js +40 -40
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +14 -0
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +119 -101
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +2 -2
- package/dist/Budget-CsqSI4NH.cjs +2 -0
- package/dist/Budget-CsqSI4NH.cjs.map +1 -0
- package/dist/Budget-bMiAGF8s.js +922 -0
- package/dist/Budget-bMiAGF8s.js.map +1 -0
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.d.ts +5 -4
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +3 -3
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +2 -2
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts +1331 -0
- package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +2 -2
- package/dist/{Incentive-Boviez4z.js → Incentive-DZLG6T1-.js} +27 -27
- package/dist/{Incentive-Boviez4z.js.map → Incentive-DZLG6T1-.js.map} +1 -1
- package/dist/{Incentive-wM4zizTH.cjs → Incentive-DvNdIJ_x.cjs} +2 -2
- package/dist/{Incentive-wM4zizTH.cjs.map → Incentive-DvNdIJ_x.cjs.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +3 -3
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +2 -2
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +2 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +2 -2
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +2 -2
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +2 -2
- package/dist/{SimpleDenyList-Cybtz7AK.cjs → SimpleDenyList-BAIrFBAW.cjs} +2 -2
- package/dist/{SimpleDenyList-Cybtz7AK.cjs.map → SimpleDenyList-BAIrFBAW.cjs.map} +1 -1
- package/dist/{SimpleDenyList-CW4RwwRw.js → SimpleDenyList-C734XLxt.js} +11 -11
- package/dist/{SimpleDenyList-CW4RwwRw.js.map → SimpleDenyList-C734XLxt.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +2 -2
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +1 -1
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +2 -2
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/componentInterfaces-5Ezh3Pvx.js +19 -0
- package/dist/componentInterfaces-5Ezh3Pvx.js.map +1 -0
- package/dist/componentInterfaces-Cm4Zfn1v.cjs +2 -0
- package/dist/componentInterfaces-Cm4Zfn1v.cjs.map +1 -0
- package/dist/{deployments-DqjtOTUr.js → deployments-3RHH-eW7.js} +3 -3
- package/dist/{deployments-DqjtOTUr.js.map → deployments-3RHH-eW7.js.map} +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/generated-BPiHi7W2.cjs +3 -0
- package/dist/{generated-DgXPUgXl.cjs.map → generated-BPiHi7W2.cjs.map} +1 -1
- package/dist/{generated-pJZHmRCK.js → generated-CElkFqkY.js} +1315 -682
- package/dist/{generated-pJZHmRCK.js.map → generated-CElkFqkY.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +155 -152
- package/package.json +2 -2
- package/src/AllowLists/SimpleAllowList.ts +2 -2
- package/src/BoostCore.ts +36 -4
- package/src/Budgets/Budget.ts +8 -2
- package/src/Budgets/ManagedBudgetWithFees.test.ts +0 -1
- package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +327 -0
- package/src/Budgets/ManagedBudgetWithFeesV2.ts +713 -0
- package/src/Validators/LimitedSignerValidator.ts +1 -1
- package/src/Validators/SignerValidator.ts +1 -1
- package/src/errors.ts +1 -1
- package/src/index.ts +1 -0
- package/dist/Budget-DMbfdTom.cjs +0 -2
- package/dist/Budget-DMbfdTom.cjs.map +0 -1
- package/dist/Budget-DO6sGTIR.js +0 -463
- package/dist/Budget-DO6sGTIR.js.map +0 -1
- package/dist/componentInterfaces-D7r9xJmt.cjs +0 -2
- package/dist/componentInterfaces-D7r9xJmt.cjs.map +0 -1
- package/dist/componentInterfaces-PR3ijhgZ.js +0 -18
- package/dist/componentInterfaces-PR3ijhgZ.js.map +0 -1
- package/dist/generated-DgXPUgXl.cjs +0 -3
package/dist/Budget-DO6sGTIR.js
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
import { p as o, a5 as l, a6 as g, a7 as w, a8 as m, a9 as y, aa as p, ab as A, ac as B, ad as R, ae as F, bF as _, bG as V, bH as M, bI as T, bJ as q, af as z, ag as C, ah as I, ai as P, bK as k } from "./generated-pJZHmRCK.js";
|
|
2
|
-
import { d as v, e as D } from "./componentInterfaces-PR3ijhgZ.js";
|
|
3
|
-
import { getAccount as E, readContract as x } from "@wagmi/core";
|
|
4
|
-
import { DeployableUnknownOwnerProvidedError as G, InvalidComponentInterfaceError as W } from "./errors.js";
|
|
5
|
-
import { prepareTransfer as t, ManagedBudget as j } from "./Budgets/ManagedBudget.js";
|
|
6
|
-
import { zeroAddress as r, encodeAbiParameters as K, parseAbiParameters as N } from "viem";
|
|
7
|
-
import { e as O } from "./deployments-DqjtOTUr.js";
|
|
8
|
-
import { DeployableTargetWithRBAC as U } from "./Deployable/DeployableTargetWithRBAC.js";
|
|
9
|
-
import { RegistryType as H } from "./utils.js";
|
|
10
|
-
const J = "0x6080604052348015600e575f80fd5b506015601f565b601b601f565b607e565b63409feecd1980546001811615603c5763f92ee8a95f526004601cfd5b8160c01c808260011c146079578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6137998061008b5f395ff3fe6080604052600436106102ea575f3560e01c806375b238fc11610183578063dcc21361116100d5578063f8724aba11610089578063fe56e23211610063578063fe56e232146108e4578063fe9fbb8014610903578063fee81cf414610922576102f1565b8063f8724aba14610887578063f9a802c3146108a6578063fa4ca9b1146108c5576102f1565b8063f04e283e116100ba578063f04e283e1461081c578063f23a6e611461082f578063f2fde38b14610874576102f1565b8063dcc21361146107e9578063ec87621c14610808576102f1565b8063b300579311610137578063c6004a3a11610111578063c6004a3a14610774578063d2514e841461079f578063d8c12d22146107be576102f1565b8063b3005793146106ef578063bc197c811461070e578063be4994f814610755576102f1565b80638da5cb5b116101685780638da5cb5b14610690578063929470eb146106bb578063a6f7f5d6146106da576102f1565b806375b238fc1461063b578063774c33ab1461064f576102f1565b8063439fab911161023c578063514e62fc116101f05780635aef467a116101ca5780635aef467a1461060157806361400c9914610614578063715018a614610633576102f1565b8063514e62fc1461059057806354d1f13d146105c5578063578bcf35146105cd576102f1565b8063451cc19111610221578063451cc1911461053d578063474f5a441461055e5780634a4ee7b11461057d576102f1565b8063439fab91146104ff57806343cc96e11461051e576102f1565b80631c10893f1161029e57806328d6183b1161027857806328d6183b146104505780632de94807146104af5780634359d28a146104e0576102f1565b80631c10893f146104005780631cd64df4146104135780632569296214610448576102f1565b806314135ce0116102cf57806314135ce014610384578063183a4f6e146103af578063185832a3146103c4576102f1565b806301ffc9a71461032357806310098ad514610357576102f1565b366102f157005b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b34801561032e575f80fd5b5061034261033d3660046129b4565b610953565b60405190151581526020015b60405180910390f35b348015610362575f80fd5b50610376610371366004612a07565b610963565b60405190815260200161034e565b34801561038f575f80fd5b5061037661039e366004612a07565b60046020525f908152604090205481565b6103c26103bd366004612a22565b61098e565b005b3480156103cf575f80fd5b506103e36103de366004612a7e565b61099b565b604080519283526001600160a01b0390911660208301520161034e565b6103c261040e366004612ae0565b6109c3565b34801561041e575f80fd5b5061034261042d366004612ae0565b638b78c6d8600c9081525f9290925260209091205481161490565b6103c26109d9565b34801561045b575f80fd5b507fde98bbf0000000000000000000000000000000000000000000000000000000005b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161034e565b3480156104ba575f80fd5b506103766104c9366004612a07565b638b78c6d8600c9081525f91909152602090205490565b3480156104eb575f80fd5b506103c26104fa366004612b4b565b610a26565b34801561050a575f80fd5b506103c2610519366004612bb7565b610b20565b348015610529575f80fd5b506103c2610538366004612bf6565b610d2a565b348015610548575f80fd5b50610376610557366004612bb7565b5f92915050565b348015610569575f80fd5b50610376610578366004612bb7565b6110b3565b6103c261058b366004612ae0565b611269565b34801561059b575f80fd5b506103426105aa366004612ae0565b638b78c6d8600c9081525f9290925260209091205416151590565b6103c261127b565b3480156105d8575f80fd5b506103766105e7366004612a07565b6001600160a01b03165f9081526005602052604090205490565b61034261060f366004612bb7565b6112b4565b34801561061f575f80fd5b5061034261062e366004612c16565b6115b4565b6103c26115fb565b348015610646575f80fd5b50610376600281565b34801561065a575f80fd5b50610376610669366004612ae0565b6001600160a01b03919091165f908152600660209081526040808320938352929052205490565b34801561069b575f80fd5b50638b78c6d819546040516001600160a01b03909116815260200161034e565b3480156106c6575f80fd5b506103426106d5366004612c49565b61160e565b3480156106e5575f80fd5b5061037660015481565b3480156106fa575f80fd5b506103e3610709366004612a7e565b6116d4565b348015610719575f80fd5b5061047e610728366004612cae565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b348015610760575f80fd5b506103c261076f366004612b4b565b611842565b34801561077f575f80fd5b5061037661078e366004612a07565b60036020525f908152604090205481565b3480156107aa575f80fd5b506103766107b9366004612a07565b6118e0565b3480156107c9575f80fd5b506103766107d8366004612a07565b60026020525f908152604090205481565b3480156107f4575f80fd5b506103c2610803366004612b4b565b611920565b348015610813575f80fd5b50610376600181565b6103c261082a366004612a07565b6119be565b34801561083a575f80fd5b5061047e610849366004612d71565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b6103c2610882366004612a07565b6119f8565b348015610892575f80fd5b506103766108a1366004612ae0565b611a1e565b3480156108b1575f80fd5b506103766108c0366004612ae0565b611aab565b3480156108d0575f80fd5b506103426108df366004612bb7565b611b55565b3480156108ef575f80fd5b506103c26108fe366004612a22565b611e9d565b34801561090e575f80fd5b5061034261091d366004612a07565b611f50565b34801561092d575f80fd5b5061037661093c366004612a07565b63389a75e1600c9081525f91909152602090205490565b5f61095d82611f95565b92915050565b6001600160a01b0381165f9081526004602052604081205461098483611fea565b61095d9190612e15565b6109983382612019565b50565b5f806109aa87878787876116d4565b90925090506109b98484610d2a565b9550959350505050565b6109cb612024565b6109d5828261203e565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6002610a318161204a565b838214610a6a576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18575f848483818110610a8757610a87612e28565b9050602002016020810190610a9c9190612e62565b9050801515600103610ade57610ad9878784818110610abd57610abd612e28565b9050602002016020810190610ad29190612a07565b600161203e565b610b0f565b610b0f878784818110610af357610af3612e28565b9050602002016020810190610b089190612a07565b6001612019565b50600101610a6c565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610b715760018160011c14303b10610b685763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610b7f83850185612ff6565b9050610b8d815f015161207b565b5f5b816020015151811015610be857610be082602001518281518110610bb557610bb5612e28565b602002602001015183604001518381518110610bd357610bd3612e28565b60200260200101516120b6565b600101610b8f565b508060200151515f03610c5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f20636f726520636f6e74726163742073657400000000000000000000000060448201526064015b60405180910390fd5b80602001515f81518110610c7257610c72612e28565b6020908102919091018101515f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055606082015160018190556040519081527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd0978910160405180910390a1508015610d25576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f80546040517f13c8e2de000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03909116906313c8e2de906024015f60405180830381865afa158015610d89573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610dce9190810190613197565b90505f81608001518381518110610de757610de7612e28565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f7cc1d5bb0000000000000000000000000000000000000000000000000000000060048201529091506001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610e70573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e949190613274565b15610f6e575f816001600160a01b031663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ed7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efb919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610f3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f5f919061328f565b9050610b1886868685856120f7565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f903181110000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610fe9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061100d9190613274565b156102f1575f816001600160a01b031663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611050573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611074919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f3b573d5f803e3d5ffd5b5f60026110bf8161204a565b5f6110cc848601866132eb565b90505f80825160028111156110e3576110e36133d1565b148061110157506001825160028111156110ff576110ff6133d1565b145b15611158575f826060015180602001905181019061111f91906133fe565b602084015160408501518251929350611150921561113e5783516122fc565b61114b8660200151610963565b6122fc565b51905061125e565b60028251600281111561116d5761116d6133d1565b03611255575f826060015180602001905181019061118b9190613440565b905061124a83602001518460400151835f015184602001515f146111b3578460200151611240565b602087015185516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091526001600160a01b039091169062fdd58e90604401602060405180830381865afa15801561121c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611240919061328f565b856040015161246c565b60200151905061125e565b92506112629050565b9250505b5092915050565b611271612024565b6109d58282612019565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f806112c2838501856132eb565b90505f815160028111156112d8576112d86133d1565b03611351575f81606001518060200190518101906112f691906133fe565b8051909150341461134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b506115aa565b600181516002811115611366576113666133d1565b03611413575f816060015180602001905181019061138491906133fe565b6040830151815160208501519293506113a9926001600160a01b031691903090612660565b805160208301516113c3906001600160a01b0316306126b8565b101561134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b600281516002811115611428576114286133d1565b036115a1575f81606001518060200190518101906114469190613440565b905081602001516001600160a01b031663f242432a836040015130845f0151856020015186604001516040518663ffffffff1660e01b815260040161148f95949392919061354a565b5f604051808303815f87803b1580156114a6575f80fd5b505af11580156114b8573d5f803e3d5ffd5b5050506020808301519084015183516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192506001600160a01b03169062fdd58e90604401602060405180830381865afa15801561152a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061154e919061328f565b101561134b57602080830151908201516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b5f91505061095d565b5060019392505050565b5f805b828110156115aa576115e68484838181106115d4576115d4612e28565b90506020028101906108df9190613591565b6115f3575f91505061095d565b6001016115b7565b611603612024565b61160c5f6126eb565b565b5f61161833611f50565b61164e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f1fa2acdc0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690631fa2acdc9061169b90889088908890889030906004016135f2565b5f604051808303815f87803b1580156116b2575f80fd5b505af11580156116c4573d5f803e3d5ffd5b5060019998505050505050505050565b5f806116df33611f50565b611715576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060400160405280306001600160a01b0316815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250506040519293508a9290915081906001600160a01b0384169063dd98558c9061179390879060200161365e565b6040516020818303038152906040528a8a6040518463ffffffff1660e01b81526004016117c293929190613693565b60408051808303815f875af11580156117dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180191906136b7565b6001600160a01b0381165f9081526005602052604081208054939550919350849261182d908490612e15565b90915550919b909a5098505050505050505050565b600261184d8161204a565b838214611886576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576118d88686838181106118a5576118a5612e28565b90506020020160208101906118ba9190612a07565b8585848181106118cc576118cc612e28565b9050602002013561203e565b600101611888565b6001600160a01b0381165f90815260046020908152604080832054600590925282205461190c84610963565b61191691906136e6565b61095d91906136e6565b600261192b8161204a565b838214611964576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576119b686868381811061198357611983612e28565b90506020020160208101906119989190612a07565b8585848181106119aa576119aa612e28565b90506020020135612019565b600101611966565b6119c6612024565b63389a75e1600c52805f526020600c2080544211156119ec57636f5e88185f526004601cfd5b5f9055610998816126eb565b611a00612024565b8060601b611a1557637448fbae5f526004601cfd5b610998816126eb565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f906001600160a01b0384169062fdd58e90604401602060405180830381865afa158015611a80573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa4919061328f565b9392505050565b6001600160a01b0382165f8181526006602090815260408083208584529091528082205490517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018590529192909162fdd58e90604401602060405180830381865afa158015611b27573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4b919061328f565b611aa491906136e6565b5f611b5f33611f50565b611b95576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611ba2838501856132eb565b9050600181516002811115611bb957611bb96133d1565b1480611bd657505f81516002811115611bd457611bd46133d1565b145b15611d4f575f8160600151806020019051810190611bf491906133fe565b90505f612710600154835f0151611c0b91906136f9565b611c159190613710565b90505f611c258460200151610963565b90508082845f0151611c3791906136e6565b1115611c9c57602084015183518290611c519085906136e6565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b03909316600484015260248301919091526044820152606401610c53565b6040808501516001600160a01b03165f90815260026020529081208054849290611cc79084906136e6565b90915550506020808501516001600160a01b03165f9081526004909152604081208054849290611cf89084906136e6565b909155505082516020808601516001600160a01b03165f9081526005909152604081208054909190611d2b9084906136e6565b9091555050602084015160408501518451611d479291906122fc565b5050506115aa565b600281516002811115611d6457611d646133d1565b036115a1575f8160600151806020019051810190611d829190613440565b602083015181516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192505f916001600160a01b039091169062fdd58e90604401602060405180830381865afa158015611df0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e14919061328f565b90508082602001511115611e7657602080840151908301516040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482018390526044820152606401610c53565b611e9683602001518460400151845f01518560200151866040015161246c565b50506115aa565b6002611ea88161204a565b612710821115611f14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665652063616e6e6f74206578636565642031303025000000000000000000006044820152606401610c53565b60018290556040518281527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09789060200160405180910390a15050565b5f816001600160a01b0316611f68638b78c6d8195490565b6001600160a01b0316148061095d5750638b78c6d8600c9081525f8390526020902054600316151561095d565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fde98bbf000000000000000000000000000000000000000000000000000000000148061095d575061095d82612728565b5f6001600160a01b038216156120125761200d6001600160a01b038316306126b8565b61095d565b4792915050565b6109d582825f612815565b638b78c6d81954331461160c576382b429005f526004601cfd5b6109d582826001612815565b638b78c6d81954331461099857638b78c6d8600c52335f52806020600c205416610998576382b429005f526004601cfd5b6001600160a01b0316638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b5f8360800151858151811061210e5761210e612e28565b6020908102919091018101516001600160a01b0381165f908152600283526040808220546003909452812054919350818561214988866136f9565b6121539190613710565b61215d9190612e15565b905061216981836136e6565b6001600160a01b0385165f8181526003602090815260408083209490945583517f38d52e0f000000000000000000000000000000000000000000000000000000008152935191936338d52e0f92600480830193928290030181865afa1580156121d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121f89190613748565b60e08901516001600160a01b0382165f908152600460205260408120805493945091928592919061222a908490612e15565b90915550505f839003612269576040517fb2e783cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461227484866136e6565b0361229f576001600160a01b0386165f90815260026020908152604080832083905560039091528120555b806001600160a01b03168a8c7ff44ff640e648077f3acc130c6ce75240070e8c40adc85b0feeeec28d9dd921b4866040516122dc91815260200190565b60405180910390a46122ef8282856122fc565b5050505050505050505050565b3068929eee149b4bd21268540361231a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b038216612380576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301528316602482015260448101829052606401610c53565b61238983610963565b8111156123e4578261239a84610963565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101829052606401610c53565b6001600160a01b038316612401576123fc828261286c565b612415565b6124156001600160a01b0384168383612885565b604080516001600160a01b038481168252602082018490528516917fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd43542910160405180910390a23868929eee149b4bd2126855505050565b3068929eee149b4bd21268540361248a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b0384166124f0576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380871660048301528516602482015260448101839052606401610c53565b6124fa8584611a1e565b821115612556578461250c8685611a1e565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101839052606401610c53565b6001600160a01b0385165f908152600660209081526040808320868452909152812080548492906125889084906136e6565b90915550506040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063f242432a906125da903090889088908890889060040161354a565b5f604051808303815f87803b1580156125f1575f80fd5b505af1158015612603573d5f803e3d5ffd5b5050604080516001600160a01b03888116825260208201879052891693507fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd4354292500160405180910390a23868929eee149b4bd21268555050505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af13d1560015f511417166126ab57637939f4245f526004601cfd5b5f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5fbfaa4e0000000000000000000000000000000000000000000000000000000014806127ba57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061280657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b8061095d575061095d826128ce565b638b78c6d8600c52825f526020600c20805483811783612836575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f385f3884865af16109d55763b12d13eb5f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166128c5576390b8ec185f526004601cfd5b5f603452505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe49cedd700000000000000000000000000000000000000000000000000000000148061095d575061095d825f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061095d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461095d565b5f602082840312156129c4575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611aa4575f80fd5b6001600160a01b0381168114610998575f80fd5b5f60208284031215612a17575f80fd5b8135611aa4816129f3565b5f60208284031215612a32575f80fd5b5035919050565b5f8083601f840112612a49575f80fd5b50813567ffffffffffffffff811115612a60575f80fd5b602083019150836020828501011115612a77575f80fd5b9250929050565b5f805f805f60808688031215612a92575f80fd5b8535612a9d816129f3565b9450602086013567ffffffffffffffff811115612ab8575f80fd5b612ac488828901612a39565b9699909850959660408101359660609091013595509350505050565b5f8060408385031215612af1575f80fd5b8235612afc816129f3565b946020939093013593505050565b5f8083601f840112612b1a575f80fd5b50813567ffffffffffffffff811115612b31575f80fd5b6020830191508360208260051b8501011115612a77575f80fd5b5f805f8060408587031215612b5e575f80fd5b843567ffffffffffffffff811115612b74575f80fd5b612b8087828801612b0a565b909550935050602085013567ffffffffffffffff811115612b9f575f80fd5b612bab87828801612b0a565b95989497509550505050565b5f8060208385031215612bc8575f80fd5b823567ffffffffffffffff811115612bde575f80fd5b612bea85828601612a39565b90969095509350505050565b5f8060408385031215612c07575f80fd5b50508035926020909101359150565b5f8060208385031215612c27575f80fd5b823567ffffffffffffffff811115612c3d575f80fd5b612bea85828601612b0a565b5f805f805f60808688031215612c5d575f80fd5b8535612c68816129f3565b94506020860135935060408601359250606086013567ffffffffffffffff811115612c91575f80fd5b612c9d88828901612a39565b969995985093965092949392505050565b5f805f805f805f8060a0898b031215612cc5575f80fd5b8835612cd0816129f3565b97506020890135612ce0816129f3565b9650604089013567ffffffffffffffff811115612cfb575f80fd5b612d078b828c01612b0a565b909750955050606089013567ffffffffffffffff811115612d26575f80fd5b612d328b828c01612b0a565b909550935050608089013567ffffffffffffffff811115612d51575f80fd5b612d5d8b828c01612a39565b999c989b5096995094979396929594505050565b5f805f805f8060a08789031215612d86575f80fd5b8635612d91816129f3565b95506020870135612da1816129f3565b94506040870135935060608701359250608087013567ffffffffffffffff811115612dca575f80fd5b612dd689828a01612a39565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561095d5761095d612de8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8015158114610998575f80fd5b5f60208284031215612e72575f80fd5b8135611aa481612e55565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516080810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b60405290565b604051610100810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b6040516060810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612f6157612f61612e7d565b604052919050565b5f67ffffffffffffffff821115612f8257612f82612e7d565b5060051b60200190565b5f82601f830112612f9b575f80fd5b8135612fae612fa982612f69565b612f1a565b8082825260208201915060208360051b860101925085831115612fcf575f80fd5b602085015b83811015612fec578035835260209283019201612fd4565b5095945050505050565b5f60208284031215613006575f80fd5b813567ffffffffffffffff81111561301c575f80fd5b82016080818503121561302d575f80fd5b613035612eaa565b8135613040816129f3565b8152602082013567ffffffffffffffff81111561305b575f80fd5b8201601f8101861361306b575f80fd5b8035613079612fa982612f69565b8082825260208201915060208360051b85010192508883111561309a575f80fd5b6020840193505b828410156130c55783356130b4816129f3565b8252602093840193909101906130a1565b6020850152505050604082013567ffffffffffffffff8111156130e6575f80fd5b6130f286828501612f8c565b604083015250606091820135918101919091529392505050565b8051613117816129f3565b919050565b5f82601f83011261312b575f80fd5b8151613139612fa982612f69565b8082825260208201915060208360051b86010192508583111561315a575f80fd5b602085015b83811015612fec578051613172816129f3565b83526020928301920161315f565b805167ffffffffffffffff81168114613117575f80fd5b5f602082840312156131a7575f80fd5b815167ffffffffffffffff8111156131bd575f80fd5b820161010081850312156131cf575f80fd5b6131d7612ed3565b6131e08261310c565b81526131ee6020830161310c565b60208201526131ff6040830161310c565b60408201526132106060830161310c565b6060820152608082015167ffffffffffffffff81111561322e575f80fd5b61323a8682850161311c565b60808301525061324c60a08301613180565b60a082015260c0828101519082015261326760e0830161310c565b60e0820152949350505050565b5f60208284031215613284575f80fd5b8151611aa481612e55565b5f6020828403121561329f575f80fd5b5051919050565b5f67ffffffffffffffff8211156132bf576132bf612e7d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f602082840312156132fb575f80fd5b813567ffffffffffffffff811115613311575f80fd5b820160808185031215613322575f80fd5b61332a612eaa565b813560038110613338575f80fd5b81526020820135613348816129f3565b6020820152604082013561335b816129f3565b6040820152606082013567ffffffffffffffff811115613379575f80fd5b80830192505084601f83011261338d575f80fd5b813561339b612fa9826132a6565b8181528660208386010111156133af575f80fd5b816020850160208301375f918101602001919091526060820152949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f602082840312801561340f575f80fd5b506040516020810167ffffffffffffffff8111828210171561343357613433612e7d565b6040529151825250919050565b5f60208284031215613450575f80fd5b815167ffffffffffffffff811115613466575f80fd5b820160608185031215613477575f80fd5b61347f612ef7565b8151815260208083015190820152604082015167ffffffffffffffff8111156134a6575f80fd5b80830192505084601f8301126134ba575f80fd5b81516134c8612fa9826132a6565b8181528660208386010111156134dc575f80fd5b8160208501602083015e5f918101602001919091526040820152949350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6001600160a01b03861681526001600160a01b038516602082015283604082015282606082015260a060808201525f61358660a08301846134fe565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126135c4575f80fd5b83018035915067ffffffffffffffff8211156135de575f80fd5b602001915036819003821315612a77575f80fd5b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190506001600160a01b03831660608301529695505050505050565b602081526001600160a01b0382511660208201525f602083015160408084015261368b60608401826134fe565b949350505050565b606081525f6136a560608301866134fe565b60208301949094525060400152919050565b5f80604083850312156136c8575f80fd5b825160208401519092506136db816129f3565b809150509250929050565b8082018082111561095d5761095d612de8565b808202811582820484141761095d5761095d612de8565b5f82613743577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215613758575f80fd5b8151611aa4816129f356fea2646970667358221220dbd4f70bed9b922212a5c6bf33fbf9a035a23d8d6e2d872430cdd227c89ca9b664736f6c634300081a0033", i = class i extends U {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments), this.abi = o;
|
|
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: e } = await l(
|
|
41
|
-
this._config,
|
|
42
|
-
{
|
|
43
|
-
address: this.assertValidAddress(),
|
|
44
|
-
args: [t(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 g(this._config, a), result: e };
|
|
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: e } = await w(
|
|
81
|
-
this._config,
|
|
82
|
-
{
|
|
83
|
-
address: this.assertValidAddress(),
|
|
84
|
-
args: [t(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: e };
|
|
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, e, d) {
|
|
116
|
-
return await this.awaitResult(
|
|
117
|
-
this.clawbackFromTargetRaw(f, b, a, e, d)
|
|
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, e, d) {
|
|
144
|
-
const { request: c, result: u } = await y(
|
|
145
|
-
this._config,
|
|
146
|
-
{
|
|
147
|
-
address: this.assertValidAddress(),
|
|
148
|
-
args: [f, b, BigInt(a), BigInt(e)],
|
|
149
|
-
...this.optionallyAttachAccount(),
|
|
150
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
151
|
-
...d
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
return { hash: await p(
|
|
155
|
-
this._config,
|
|
156
|
-
c
|
|
157
|
-
), result: u };
|
|
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: e } = await A(
|
|
184
|
-
this._config,
|
|
185
|
-
{
|
|
186
|
-
address: this.assertValidAddress(),
|
|
187
|
-
args: [t(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: e };
|
|
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: e } = await R(
|
|
218
|
-
this._config,
|
|
219
|
-
{
|
|
220
|
-
address: this.assertValidAddress(),
|
|
221
|
-
args: [f.map(t)],
|
|
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 F(this._config, a), result: e };
|
|
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: e, result: d } = await _(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 V(
|
|
264
|
-
this._config,
|
|
265
|
-
e
|
|
266
|
-
), result: d };
|
|
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: e } = await M(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 T(
|
|
298
|
-
this._config,
|
|
299
|
-
a
|
|
300
|
-
), result: e };
|
|
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 q(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 z(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 = r, 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 = r, b, a) {
|
|
360
|
-
return I(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 = r, b, a) {
|
|
378
|
-
return P(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 d;
|
|
395
|
-
const [a, e] = this.validateDeploymentConfig(
|
|
396
|
-
f,
|
|
397
|
-
b
|
|
398
|
-
);
|
|
399
|
-
if (!a.owner || a.owner === r) {
|
|
400
|
-
const c = e.account ? e.account.address : e.config ? E(e.config).address : (d = this._account) == null ? void 0 : d.address;
|
|
401
|
-
if (c)
|
|
402
|
-
a.owner = c;
|
|
403
|
-
else
|
|
404
|
-
throw new G();
|
|
405
|
-
}
|
|
406
|
-
return {
|
|
407
|
-
abi: o,
|
|
408
|
-
bytecode: J,
|
|
409
|
-
args: [L(a)],
|
|
410
|
-
...this.optionallyAttachAccount(e.account)
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
i.bases = {
|
|
415
|
-
31337: void 0,
|
|
416
|
-
...O
|
|
417
|
-
}, i.registryType = H.BUDGET;
|
|
418
|
-
let n = i;
|
|
419
|
-
const L = ({
|
|
420
|
-
owner: s,
|
|
421
|
-
authorized: f,
|
|
422
|
-
roles: b,
|
|
423
|
-
managementFee: a
|
|
424
|
-
}) => K(
|
|
425
|
-
N([
|
|
426
|
-
"ManagedBudgetWithFeesPayload payload",
|
|
427
|
-
"struct ManagedBudgetWithFeesPayload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }"
|
|
428
|
-
]),
|
|
429
|
-
[
|
|
430
|
-
{
|
|
431
|
-
owner: s,
|
|
432
|
-
authorized: f,
|
|
433
|
-
roles: b,
|
|
434
|
-
managementFee: a
|
|
435
|
-
}
|
|
436
|
-
]
|
|
437
|
-
), h = {
|
|
438
|
-
// ['0x64683da1']: VestingBudget,
|
|
439
|
-
// ['0x2929d19c']: SimpleBudget,
|
|
440
|
-
[v]: j,
|
|
441
|
-
[D]: n
|
|
442
|
-
};
|
|
443
|
-
async function d0(s, f, b) {
|
|
444
|
-
const a = await x(s.config, {
|
|
445
|
-
abi: k,
|
|
446
|
-
functionName: "getComponentInterface",
|
|
447
|
-
address: f,
|
|
448
|
-
...b
|
|
449
|
-
}), e = h[a];
|
|
450
|
-
if (!e)
|
|
451
|
-
throw new W(
|
|
452
|
-
Object.keys(h),
|
|
453
|
-
a
|
|
454
|
-
);
|
|
455
|
-
return new e(s, f);
|
|
456
|
-
}
|
|
457
|
-
export {
|
|
458
|
-
h as B,
|
|
459
|
-
n as M,
|
|
460
|
-
d0 as b,
|
|
461
|
-
L as p
|
|
462
|
-
};
|
|
463
|
-
//# sourceMappingURL=Budget-DO6sGTIR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Budget-DO6sGTIR.js","sources":["../src/Budgets/ManagedBudgetWithFees.ts","../src/Budgets/Budget.ts"],"sourcesContent":["import {\n managedBudgetWithFeesAbi,\n readManagedBudgetAvailable,\n readManagedBudgetDistributed,\n readManagedBudgetOwner,\n readManagedBudgetTotal,\n readManagedBudgetWithFeesManagementFee,\n simulateManagedBudgetAllocate,\n simulateManagedBudgetClawback,\n simulateManagedBudgetClawbackFromTarget,\n simulateManagedBudgetDisburse,\n simulateManagedBudgetDisburseBatch,\n simulateManagedBudgetWithFeesPayManagementFee,\n simulateManagedBudgetWithFeesSetManagementFee,\n writeManagedBudgetAllocate,\n writeManagedBudgetClawback,\n writeManagedBudgetClawbackFromTarget,\n writeManagedBudgetDisburse,\n writeManagedBudgetDisburseBatch,\n writeManagedBudgetWithFeesPayManagementFee,\n writeManagedBudgetWithFeesSetManagementFee,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/budgets/ManagedBudgetWithFees.sol/ManagedBudgetWithFees.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ManagedBudgetWithFees as ManagedBudgetWithFeesBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n type Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport type {\n ERC1155TransferPayload,\n FungibleTransferPayload,\n} from '../transfers';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\nimport { prepareTransfer } from './ManagedBudget';\nexport { managedBudgetWithFeesAbi };\nexport type { ERC1155TransferPayload, FungibleTransferPayload };\n\n/**\n * The object representation of a `ManagedBudgetWithFeesPayload.InitPayload`\n *\n * @export\n * @interface ManagedBudgetWithFeesPayload\n * @typedef {ManagedBudgetWithFeesPayload}\n */\nexport interface ManagedBudgetWithFeesPayload {\n /**\n * The budget's owner\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.\n *\n * @type {Address[]}\n */\n authorized: Address[];\n /**\n * List of roles to assign to the corresponding account by index.\n *\n * @type {Roles[]}\n */\n roles: Roles[];\n /**\n * Management Fee rate for incentive payouts\n *\n * @type {bigint}\n */\n managementFee: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `ManagedBudgetWithFees` event types.\n *\n * @export\n * @typedef {ManagedBudgetWithFeesLog}\n * @template {ContractEventName<typeof managedBudgetWithFeesAbi>} [event=ContractEventName<\n * typeof managedBudgetWithFeesAbi\n * >]\n */\nexport type ManagedBudgetWithFeesLog<\n event extends ContractEventName<\n typeof managedBudgetWithFeesAbi\n > = ContractEventName<typeof managedBudgetWithFeesAbi>,\n> = GenericLog<typeof managedBudgetWithFeesAbi, event>;\n\n/**\n * A minimal budget implementation that simply holds and distributes tokens (ERC20-like and native)\n * This type of budget supports ETH, ERC20, and ERC1155 assets only\n *\n * @export\n * @class ManagedBudgetWithFees\n * @typedef {ManagedBudgetWithFees}\n * @extends {DeployableTargetWithRBAC<ManagedBudgetWithFeesPayload>}\n */\nexport class ManagedBudgetWithFees extends DeployableTargetWithRBAC<\n ManagedBudgetWithFeesPayload,\n typeof managedBudgetWithFeesAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = managedBudgetWithFeesAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_MANAGED_BUDGET_WITH_FEES_BASE,\n ...(ManagedBudgetWithFeesBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.BUDGET;\n\n /**\n * Allocates assets to the budget.\n * The caller must have already approved the contract to transfer the asset\n * If the asset transfer fails, the allocation will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the allocation was successful\n */\n public async allocate(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.allocateRaw(transfer, params));\n }\n\n /**\n * Allocates assets to the budget.\n * The caller must have already approved the contract to transfer the asset\n * If the asset transfer fails, the allocation will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the allocation was successful\n */\n public async allocateRaw(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateManagedBudgetAllocate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareTransfer(transfer)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeManagedBudgetAllocate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawbacks assets from the budget.\n * Only the owner can directly clawback assets from the budget\n * If the amount is zero, the entire balance of the asset will be transferred to the receiver\n * If the asset transfer fails, the reclamation will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the request was successful\n */\n public async clawback(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.clawbackRaw(transfer, params));\n }\n\n /**\n * Clawbacks assets from the budget.\n * Only the owner or admin can directly clawback assets from the budget\n * If the amount is zero, the entire balance of the asset will be transferred to the receiver\n * If the asset transfer fails, the reclamation will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the request was successful\n */\n public async clawbackRaw(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateManagedBudgetClawback(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareTransfer(transfer)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeManagedBudgetClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawbacks assets from an incentive associated with the budget via Boost Core.\n * Only the authorized users can clawback assets from an incentive.\n * If the asset transfer fails, the reclamation will revert.\n *\n * @example\n * ```ts\n * const [amount, address] = await budgets.budget.clawbackFromTarget(\n * core.assertValidAddress(),\n * erc20Incentive.buildClawbackData(1n),\n * boost.id,\n * incentiveId,\n * );\n * ```\n * @public\n * @async\n * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`\n * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`\n * @param {bigint | number} boostId - The ID of the boost\n * @param {bigint | number} incentiveId - The ID of the incentive\n * @param {?WriteParams} [params] - Optional write parameters\n * @returns {Promise<[bigint, Address]>} - Returns a tuple of amount reclaimed and the address reclaimed from\n */\n public async clawbackFromTarget(\n target: Address,\n data: Hex,\n boostId: bigint | number,\n incentiveId: bigint | number,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.clawbackFromTargetRaw(target, data, boostId, incentiveId, params),\n );\n }\n\n /**\n * Clawbacks assets from an incentive associated with the budget via Boost Core.\n * Only the authorized users can clawback assets from an incentive.\n * If the asset transfer fails, the reclamation will revert.\n *\n * @example\n * ```ts\n * const { hash, result: [ amount, address ] } = await budgets.budget.clawbackFromTargetRaw(\n * core.assertValidAddress(),\n * erc20Incentive.buildClawbackData(1n),\n * boost.id,\n * incentiveId,\n * );\n * ```\n * @public\n * @async\n * @param {Address} target - The address of a contract implementing clawback, typically `BoostCore`\n * @param {Hex} data - The encoded data payload for the clawback, can be acquired with `incentive.buildClawbackData`\n * @param {bigint | number} boostId - The ID of the boost\n * @param {bigint | number} incentiveId - The ID of the incentive\n * @param {?WriteParams} [params] - Optional write parameters\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns transaction hash and simulated result\n */\n public async clawbackFromTargetRaw(\n target: Address,\n data: Hex,\n boostId: bigint | number,\n incentiveId: bigint | number,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateManagedBudgetClawbackFromTarget(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [target, data, BigInt(boostId), BigInt(incentiveId)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeManagedBudgetClawbackFromTarget(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Disburses assets from the budget to a single recipient\n * If the asset transfer fails, the disbursement will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the disbursement was successful\n */\n public async disburse(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.disburseRaw(transfer, params));\n }\n\n /**\n * Disburses assets from the budget to a single recipient\n * If the asset transfer fails, the disbursement will revert\n *\n * @public\n * @async\n * @param {(FungibleTransferPayload | ERC1155TransferPayload)} transfer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the disbursement was successful\n */\n public async disburseRaw(\n transfer: FungibleTransferPayload | ERC1155TransferPayload,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateManagedBudgetDisburse(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareTransfer(transfer)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeManagedBudgetDisburse(this._config, request);\n return { hash, result };\n }\n\n /**\n * Disburses assets from the budget to multiple recipients\n *\n * @public\n * @async\n * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if all disbursements were successful\n */\n public async disburseBatch(\n transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>,\n params?: WriteParams,\n ) {\n return await this.awaitResult(this.disburseBatchRaw(transfers, params));\n }\n\n /**\n * Disburses assets from the budget to multiple recipients\n *\n * @public\n * @async\n * @param {Array<FungibleTransferPayload | ERC1155TransferPayload>} transfers\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if all disbursements were successful\n */\n public async disburseBatchRaw(\n transfers: Array<FungibleTransferPayload | ERC1155TransferPayload>,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateManagedBudgetDisburseBatch(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [transfers.map(prepareTransfer)],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeManagedBudgetDisburseBatch(this._config, request);\n return { hash, result };\n }\n\n /**\n * Pays out reserved management fees to the boost owner\n * for a given incentive\n *\n * @public\n * @async\n * @param {bigint | string} boostId\n * @param {bigint | string} incentiveId\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the payout was successful\n */\n public async payManagementFee(\n boostId: bigint | string,\n incentiveId: bigint | string,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.payManagementFeeRaw(boostId, incentiveId, params),\n );\n }\n\n /**\n * Pays out reserved management fees to the boost owner\n *\n * @public\n * @async\n * @param bigint boostId\n * @param bigint incentiveId\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the payout was successful\n */\n public async payManagementFeeRaw(\n boostId: bigint | string,\n incentiveId: bigint | string,\n params?: WriteParams,\n ) {\n const { request, result } =\n await simulateManagedBudgetWithFeesPayManagementFee(this._config, {\n address: this.assertValidAddress(),\n args: [boostId, incentiveId],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n const hash = await writeManagedBudgetWithFeesPayManagementFee(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Sets the management fee for the budget\n * @public\n * @async\n * @param {bigint} managementFee\n * @param {?WriteParams} [params]\n * @returns {Promise<void>} - will throw if the transaction fails\n */\n public async setManagementFee(managementFee: bigint, params?: WriteParams) {\n return await this.awaitResult(\n this.setManagementFeeRaw(managementFee, params),\n );\n }\n\n /**\n * Sets the management fee for the budget\n * @public\n * @async\n * @param {bigint} managementFee\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setManagementFeeRaw(\n managementFee: bigint,\n params?: WriteParams,\n ) {\n const { request, result } =\n await simulateManagedBudgetWithFeesSetManagementFee(this._config, {\n address: this.assertValidAddress(),\n args: [managementFee],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n const hash = await writeManagedBudgetWithFeesSetManagementFee(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Get the configured management fee for the budget\n * @public\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The management fee\n */\n public async managementFee(params?: ReadParams) {\n return await readManagedBudgetWithFeesManagementFee(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the owner of the budget\n *\n * @public\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public owner(params?: ReadParams) {\n return readManagedBudgetOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the total amount of assets allocated to the budget, including any that have been distributed\n * If a tokenId is provided, get the total amount of ERC1155 assets allocated to the budget, including any that have been distributed\n *\n * @public\n * @param {Address} [asset=\"0x0000000000000000000000000000000000000000\"] - The address of the asset\n * @param {?(bigint | undefined)} [tokenId] - The ID of the token\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The total amount of assets\n */\n public total(\n asset: Address = zeroAddress,\n tokenId?: bigint | undefined,\n params?: ReadParams,\n ) {\n return readManagedBudgetTotal(this._config, {\n address: this.assertValidAddress(),\n args: tokenId ? [asset, tokenId] : [asset],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the amount of assets available for distribution from the budget.\n * If a tokenId is provided, get the amount of ERC1155 assets available for distribution from the budget\n *\n * @public\n * @param {Address} [asset=\"0x0000000000000000000000000000000000000000\"]\n * @param {?(bigint | undefined)} [tokenId]\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The amount of assets available\n */\n public available(\n asset: Address = zeroAddress,\n tokenId?: bigint | undefined,\n params?: ReadParams,\n ) {\n return readManagedBudgetAvailable(this._config, {\n address: this.assertValidAddress(),\n args: tokenId ? [asset, tokenId] : [asset],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the amount of assets that have been distributed from the budget.\n * If a tokenId is provided, get the amount of ERC1155 assets that have been distributed from the budget\n *\n * @public\n * @param {Address} [asset=\"0x0000000000000000000000000000000000000000\"]\n * @param {?(bigint | undefined)} [tokenId]\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The amount of assets distributed\n */\n public distributed(\n asset: Address = zeroAddress,\n tokenId?: bigint | undefined,\n params?: ReadParams,\n ) {\n return readManagedBudgetDistributed(this._config, {\n address: this.assertValidAddress(),\n args: tokenId ? [asset, tokenId] : [asset],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ManagedBudgetWithFeesPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ManagedBudgetWithFeesPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: managedBudgetWithFeesAbi,\n bytecode: bytecode as Hex,\n args: [prepareManagedBudgetWithFeesPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link ManagedBudgetWithFeesPayload}, properly encode a `ManagedBudgetWithFees.InitPayload` for use with {@link ManagedBudgetWithFees} initialization.\n *\n * @param {ManagedBudgetWithFeesPayload} param0\n * @param {Address} param0.owner - The budget's owner\n * @param {{}} param0.authorized - List of accounts authorized to use the budget. This list should include a Boost core address to interact with the protocol.\n * @param {{}} param0.roles - List of roles to assign to the corresponding account by index.\n * @returns {Hex}\n */\nexport const prepareManagedBudgetWithFeesPayload = ({\n owner,\n authorized,\n roles,\n managementFee,\n}: ManagedBudgetWithFeesPayload) => {\n return encodeAbiParameters(\n parseAbiParameters([\n 'ManagedBudgetWithFeesPayload payload',\n 'struct ManagedBudgetWithFeesPayload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }',\n ]),\n [\n {\n owner,\n authorized,\n roles: roles as unknown as Array<bigint>,\n managementFee,\n },\n ],\n );\n};\n","import { aBudgetAbi } from '@boostxyz/evm';\nimport {\n AManagedBudget,\n AManagedBudgetWithFees,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { ManagedBudget } from './ManagedBudget';\nimport { ManagedBudgetWithFees } from './ManagedBudgetWithFees';\n\nexport {\n // VestingBudget,\n ManagedBudget,\n};\n\n/**\n * A union type representing all valid protocol Budget implementations\n *\n * @export\n * @typedef {Budget}\n */\nexport type Budget = ManagedBudget | ManagedBudgetWithFees; // | VestingBudget\n\n/**\n * A map of Budget component interfaces to their constructors.\n *\n * @type {{ \"0xa0109882\": typeof ManagedBudget; }}\n */\nexport const BudgetByComponentInterface = {\n // ['0x64683da1']: VestingBudget,\n // ['0x2929d19c']: SimpleBudget,\n [AManagedBudget as Hex]: ManagedBudget,\n [AManagedBudgetWithFees as Hex]: ManagedBudgetWithFees,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<ManagedBudget | ManagedBudgetWithFees>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function budgetFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aBudgetAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof BudgetByComponentInterface;\n const Ctor = BudgetByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(BudgetByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ManagedBudgetWithFees","DeployableTargetWithRBAC","managedBudgetWithFeesAbi","transfer","params","request","result","simulateManagedBudgetAllocate","prepareTransfer","writeManagedBudgetAllocate","simulateManagedBudgetClawback","writeManagedBudgetClawback","target","data","boostId","incentiveId","simulateManagedBudgetClawbackFromTarget","writeManagedBudgetClawbackFromTarget","simulateManagedBudgetDisburse","writeManagedBudgetDisburse","transfers","simulateManagedBudgetDisburseBatch","writeManagedBudgetDisburseBatch","simulateManagedBudgetWithFeesPayManagementFee","writeManagedBudgetWithFeesPayManagementFee","managementFee","simulateManagedBudgetWithFeesSetManagementFee","writeManagedBudgetWithFeesSetManagementFee","readManagedBudgetWithFeesManagementFee","readManagedBudgetOwner","asset","zeroAddress","tokenId","readManagedBudgetTotal","readManagedBudgetAvailable","readManagedBudgetDistributed","_payload","_options","payload","options","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareManagedBudgetWithFeesPayload","ManagedBudgetWithFeesBases","RegistryType","ManagedBudgetWithFees","authorized","roles","encodeAbiParameters","parseAbiParameters","BudgetByComponentInterface","AManagedBudget","ManagedBudget","AManagedBudgetWithFees","budgetFromAddress","address","interfaceId","readContract","aBudgetAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;;;;wl4BAkHaA,IAAN,MAAMA,UAA8BC,EAGzC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgC/B,MAAa,SACXC,GACAC,GACA;AACA,WAAO,MAAM,KAAK,YAAY,KAAK,YAAYD,GAAUC,CAAM,CAAC;AAAA,EAClE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,MAAa,YACXD,GACAC,GACA;AACA,UAAM,EAAE,SAAAC,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAACC,EAAgBL,CAAQ,CAAC;AAAA,QAChC,GAAG,KAAK,wBAAwB;AAAA;AAAA,QAEhC,GAAIC;AAAA,MACN;AAAA,IAAA;AAGK,WAAA,EAAE,MADI,MAAMK,EAA2B,KAAK,SAASJ,CAAO,GACpD,QAAAC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAa,SACXH,GACAC,GACA;AACA,WAAO,MAAM,KAAK,YAAY,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sB,eAAAS,GACpBlB,GACAmB,GACAtD,GACA;AACA,QAAMuD,IAAe,MAAMC,EAAarB,EAAQ,QAAQ;AAAA,IACtD,KAAKsB;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,IACA,GAAGtD;AAAA,EAAA,CACJ,GACK0D,IAAOT,EAA2BM,CAAW;AACnD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA0B;AAAA,MACtCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKvB,GAASmB,CAAO;AAClC;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e="0xc2c281ec",n="0x53cf8555",t="0x7cc1d5bb",i="0x56586338",c="0xf60c99c9",A="0x52b8e45c",a="0x90318111",s="0x7687b0ed",o="0x5fbfaa4e",d="0xde98bbf0",l="0x0d36a40d",r="0xb8ce7b22",g="0x1392d798",v="0x3d30a22c";exports.AAllowListIncentive=e;exports.ACGDAIncentive=n;exports.AERC20Incentive=t;exports.AERC20PeggedIncentive=i;exports.AERC20PeggedVariableCriteriaIncentive=c;exports.AERC20VariableCriteriaIncentive=A;exports.AERC20VariableIncentive=a;exports.AEventAction=s;exports.AManagedBudget=o;exports.AManagedBudgetWithFees=d;exports.APointsIncentive=l;exports.ASignerValidator=r;exports.ASimpleAllowList=g;exports.ASimpleDenyList=v;
|
|
2
|
-
//# sourceMappingURL=componentInterfaces-D7r9xJmt.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentInterfaces-D7r9xJmt.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const e = "0xc2c281ec", n = "0x53cf8555", c = "0x7cc1d5bb", t = "0x56586338", a = "0xf60c99c9", s = "0x52b8e45c", i = "0x90318111", o = "0x7687b0ed", A = "0x5fbfaa4e", d = "0xde98bbf0", x = "0x0d36a40d", b = "0xb8ce7b22", l = "0x1392d798", g = "0x3d30a22c";
|
|
2
|
-
export {
|
|
3
|
-
o as A,
|
|
4
|
-
b as a,
|
|
5
|
-
l as b,
|
|
6
|
-
g as c,
|
|
7
|
-
A as d,
|
|
8
|
-
d as e,
|
|
9
|
-
x as f,
|
|
10
|
-
c as g,
|
|
11
|
-
a as h,
|
|
12
|
-
t as i,
|
|
13
|
-
e as j,
|
|
14
|
-
n as k,
|
|
15
|
-
i as l,
|
|
16
|
-
s as m
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=componentInterfaces-PR3ijhgZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"componentInterfaces-PR3ijhgZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|