@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +2 -1
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +1 -1
- package/dist/Actions/Action.d.ts.map +1 -1
- package/dist/Actions/Action.js +14 -12
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +57 -14
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +50 -23
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +2 -1
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +405 -36
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -209
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +6 -5
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +46 -22
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +76 -76
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +12 -200
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +1 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.js +1 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.js +5 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -1
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +105 -14
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +138 -5
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore-DolmDuXW.cjs +3 -0
- package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
- package/dist/BoostCore-Z97KVu4V.js +1448 -0
- package/dist/BoostCore-Z97KVu4V.js.map +1 -0
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +788 -79
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +30 -1103
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -1
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +95 -26
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +183 -89
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -1
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +15 -13
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +112 -192
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +91 -291
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +277 -91
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +2 -1
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +7 -8
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +1 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +9 -3
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +10 -5
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +16 -15
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +49 -42
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-CBKzuNoN.cjs +2 -0
- package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
- package/dist/EventAction-DWuuc_Qy.js +1528 -0
- package/dist/EventAction-DWuuc_Qy.js.map +1 -0
- package/dist/Incentive-BxzEtN26.js +298 -0
- package/dist/Incentive-BxzEtN26.js.map +1 -0
- package/dist/Incentive-CrF3-ayL.cjs +2 -0
- package/dist/Incentive-CrF3-ayL.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +65 -21
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +52 -36
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +315 -26
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +64 -39
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +291 -43
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +2 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +270 -33
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +69 -46
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +338 -421
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +262 -32
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +2 -1
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +5 -8
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +17 -278
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +81 -23
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +57 -36
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
- package/dist/SimpleDenyList-CGaWjuld.js +132 -0
- package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +310 -17
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +165 -36
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -1
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +2 -2
- package/dist/Validators/Validator.d.ts.map +1 -1
- package/dist/Validators/Validator.js +10 -8
- package/dist/Validators/Validator.js.map +1 -0
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +44 -0
- package/dist/errors.cjs +2 -1
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +421 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +297 -39
- package/dist/errors.js.map +1 -0
- package/dist/{generated-x_abr3Yv.js → generated-CKt2yCQd.js} +3143 -3002
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +144 -1353
- package/dist/index.js.map +1 -0
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +2 -1
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +26 -1350
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -636
- package/dist/utils.js.map +1 -0
- package/package.json +37 -11
- package/src/Actions/Action.test.ts +79 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +300 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +291 -0
- package/src/Actions/EventAction.test.ts +787 -0
- package/src/Actions/EventAction.ts +1218 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +62 -0
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +262 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +250 -0
- package/src/Auth/Auth.ts +11 -0
- package/src/Auth/PassthroughAuth.test.ts +12 -0
- package/src/Auth/PassthroughAuth.ts +80 -0
- package/src/Boost.ts +287 -0
- package/src/BoostCore.test.ts +894 -0
- package/src/BoostCore.ts +1438 -0
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +588 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +60 -0
- package/src/Budgets/ManagedBudget.test.ts +217 -0
- package/src/Budgets/ManagedBudget.ts +534 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +530 -0
- package/src/Deployable/Contract.ts +228 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +234 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +336 -0
- package/src/Incentives/CGDAIncentive.test.ts +135 -0
- package/src/Incentives/CGDAIncentive.ts +476 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +465 -0
- package/src/Incentives/ERC20Incentive.test.ts +133 -0
- package/src/Incentives/ERC20Incentive.ts +490 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +139 -0
- package/src/Incentives/ERC20VariableIncentive.ts +428 -0
- package/src/Incentives/Incentive.test.ts +95 -0
- package/src/Incentives/Incentive.ts +86 -0
- package/src/Incentives/PointsIncentive.test.ts +138 -0
- package/src/Incentives/PointsIncentive.ts +367 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +683 -0
- package/src/Validators/Validator.test.ts +21 -0
- package/src/Validators/Validator.ts +55 -0
- package/src/claiming.ts +56 -0
- package/src/errors.ts +866 -0
- package/src/index.test.ts +122 -0
- package/src/index.ts +58 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +247 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/generated-BaaleHW-.cjs +0 -2
package/dist/BoostRegistry.js
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isAddress as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const p = "0x6080604052348015600e575f80fd5b50611b4e8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e0e565b6101f6565b6040516100b19190610e53565b60405180910390f35b6100d460048036038101906100cf9190610e9f565b61025f565b6040516100e191906110a7565b60405180910390f35b61010460048036038101906100ff91906110f1565b610471565b60405161011191906111d3565b60405180910390f35b610134600480360381019061012f9190610e9f565b610504565b6040516101419190611202565b60405180910390f35b610164600480360381019061015f919061129f565b6105ac565b6040516101719190611332565b60405180910390f35b610194600480360381019061018f919061134b565b6105ee565b005b6101b060048036038101906101ab91906113bc565b610818565b6040516101bd9190611332565b60405180910390f35b6101e060048036038101906101db919061146e565b610854565b6040516101ed9190611202565b60405180910390f35b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610267610d4e565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102a6576102a5610eca565b5b60048111156102b8576102b7610eca565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546103769061153e565b80601f01602080910402602001604051908101604052809291908181526020018280546103a29061153e565b80156103ed5780601f106103c4576101008083540402835291602001916103ed565b820191905f5260205f20905b8154815290600101906020018083116103d057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361046c57816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016104639190611332565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156104f857602002820191905f5260205f20905b8154815260200190600101908083116104e4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a757816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161059e9190611332565b60405180910390fd5b919050565b5f6105e386868686866040516020016105c894939291906115ef565b60405160208183030381529060405280519060200120610c1c565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016106489190611638565b602060405180830381865afa158015610663573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610687919061167b565b6106c857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106bf91906116b5565b60405180910390fd5b5f6106d4868686610818565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107775785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161076e9291906116dd565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107d9576107d8610eca565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd808560405161080891906116b5565b60405180910390a3505050505050565b5f61084b848484604051602001610830929190611704565b60405160208183030381529060405280519060200120610c1c565b90509392505050565b5f3068929eee149b4bd2126854036108735763ab143c065f526004601cfd5b3068929eee149b4bd212685561091b878787873360405160200161089b959493929190611750565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610c4e9092919063ffffffff16565b90505f61092b88883389896105ac565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109c99291906116dd565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a5157610a50610eca565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b0e57610b0d610eca565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bb49190611965565b5090505080886004811115610bcc57610bcb610eca565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610bfd929190611a34565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610c30929190611a7b565b60405160208183030381529060405280519060200120905092915050565b5f610c78838573ffffffffffffffffffffffffffffffffffffffff16610ce790919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610cb39190611af8565b5f604051808303815f87803b158015610cca575f80fd5b505af1158015610cdc573d5f803e3d5ffd5b505050509392505050565b5f610cf35f8484610cfb565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610d435763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610d6c57610d6b610eca565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ded81610db9565b8114610df7575f80fd5b50565b5f81359050610e0881610de4565b92915050565b5f60208284031215610e2357610e22610db1565b5b5f610e3084828501610dfa565b91505092915050565b5f8115159050919050565b610e4d81610e39565b82525050565b5f602082019050610e665f830184610e44565b92915050565b5f819050919050565b610e7e81610e6c565b8114610e88575f80fd5b50565b5f81359050610e9981610e75565b92915050565b5f60208284031215610eb457610eb3610db1565b5b5f610ec184828501610e8b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f0857610f07610eca565b5b50565b5f819050610f1882610ef7565b919050565b5f610f2782610f0b565b9050919050565b610f3781610f1d565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610f7f610f7a610f7584610f3d565b610f5c565b610f3d565b9050919050565b5f610f9082610f65565b9050919050565b5f610fa182610f86565b9050919050565b610fb181610f97565b82525050565b5f610fc182610f3d565b9050919050565b610fd181610fb7565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61101982610fd7565b6110238185610fe1565b9350611033818560208601610ff1565b61103c81610fff565b840191505092915050565b5f608083015f83015161105c5f860182610f2e565b50602083015161106f6020860182610fa8565b5060408301516110826040860182610fc8565b506060830151848203606086015261109a828261100f565b9150508091505092915050565b5f6020820190508181035f8301526110bf8184611047565b905092915050565b6110d081610fb7565b81146110da575f80fd5b50565b5f813590506110eb816110c7565b92915050565b5f6020828403121561110657611105610db1565b5b5f611113848285016110dd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61114e81610e6c565b82525050565b5f61115f8383611145565b60208301905092915050565b5f602082019050919050565b5f6111818261111c565b61118b8185611126565b935061119683611136565b805f5b838110156111c65781516111ad8882611154565b97506111b88361116b565b925050600181019050611199565b5085935050505092915050565b5f6020820190508181035f8301526111eb8184611177565b905092915050565b6111fc81610f97565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b60058110611227575f80fd5b50565b5f813590506112388161121b565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261125f5761125e61123e565b5b8235905067ffffffffffffffff81111561127c5761127b611242565b5b60208301915083600182028301111561129857611297611246565b5b9250929050565b5f805f805f608086880312156112b8576112b7610db1565b5b5f6112c58882890161122a565b95505060206112d6888289016110dd565b94505060406112e7888289016110dd565b935050606086013567ffffffffffffffff81111561130857611307610db5565b5b6113148882890161124a565b92509250509295509295909350565b61132c81610e6c565b82525050565b5f6020820190506113455f830184611323565b92915050565b5f805f806060858703121561136357611362610db1565b5b5f6113708782880161122a565b945050602085013567ffffffffffffffff81111561139157611390610db5565b5b61139d8782880161124a565b935093505060406113b0878288016110dd565b91505092959194509250565b5f805f604084860312156113d3576113d2610db1565b5b5f6113e08682870161122a565b935050602084013567ffffffffffffffff81111561140157611400610db5565b5b61140d8682870161124a565b92509250509250925092565b5f8083601f84011261142e5761142d61123e565b5b8235905067ffffffffffffffff81111561144b5761144a611242565b5b60208301915083600182028301111561146757611466611246565b5b9250929050565b5f805f805f806080878903121561148857611487610db1565b5b5f61149589828a0161122a565b96505060206114a689828a016110dd565b955050604087013567ffffffffffffffff8111156114c7576114c6610db5565b5b6114d389828a0161124a565b9450945050606087013567ffffffffffffffff8111156114f6576114f5610db5565b5b61150289828a01611419565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155557607f821691505b60208210810361156857611567611511565b5b50919050565b5f8160601b9050919050565b5f6115848261156e565b9050919050565b5f6115958261157a565b9050919050565b6115ad6115a882610fb7565b61158b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6115d683856115b3565b93506115e38385846115bd565b82840190509392505050565b5f6115fa828761159c565b60148201915061160a828661159c565b60148201915061161b8284866115cb565b915081905095945050505050565b61163281610db9565b82525050565b5f60208201905061164b5f830184611629565b92915050565b61165a81610e39565b8114611664575f80fd5b50565b5f8151905061167581611651565b92915050565b5f602082840312156116905761168f610db1565b5b5f61169d84828501611667565b91505092915050565b6116af81610fb7565b82525050565b5f6020820190506116c85f8301846116a6565b92915050565b6116d781610f1d565b82525050565b5f6040820190506116f05f8301856116ce565b6116fd6020830184611323565b9392505050565b5f6117108284866115cb565b91508190509392505050565b5f8160f81b9050919050565b5f6117328261171c565b9050919050565b61174a61174582610f1d565b611728565b82525050565b5f61175b8288611739565b60018201915061176b828761159c565b60148201915061177c8285876115cb565b9150611788828461159c565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026118247fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826117e9565b61182e86836117e9565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61186961186461185f84611846565b610f5c565b611846565b9050919050565b5f819050919050565b6118828361184f565b61189661188e82611870565b8484546117f5565b825550505050565b5f90565b6118aa61189e565b6118b5818484611879565b505050565b5b818110156118d8576118cd5f826118a2565b6001810190506118bb565b5050565b601f82111561191d576118ee816117c8565b6118f7846117da565b81016020851015611906578190505b61191a611912856117da565b8301826118ba565b50505b505050565b5f82821c905092915050565b5f61193d5f1984600802611922565b1980831691505092915050565b5f611955838361192e565b9150826002028217905092915050565b61196e82610fd7565b67ffffffffffffffff8111156119875761198661179b565b5b611991825461153e565b61199c8282856118dc565b5f60209050601f8311600181146119cd575f84156119bb578287015190505b6119c5858261194a565b865550611a2c565b601f1984166119db866117c8565b5f5b82811015611a02578489015182556001820191506020850194506020810190506119dd565b86831015611a1f5784890151611a1b601f89168261192e565b8355505b6001600288020188555050505b505050505050565b5f604082019050611a475f8301856116a6565b611a5460208301846111f3565b9392505050565b5f819050919050565b611a75611a7082610e6c565b611a5b565b82525050565b5f611a868285611739565b600182019150611a968284611a64565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611aca82611aa6565b611ad48185611ab0565b9350611ae4818560208601610ff1565b611aed81610fff565b840191505092915050565b5f6020820190508181035f830152611b108184611ac0565b90509291505056fea264697066735822122031d8b5092c0648488ea4f8c739d0ff5d8c5debf32ebfcd2f52c823a98c8a410064736f6c634300081a0033", m = "0x5cb8D869f2EE4e3D987Ac7bEB37D6812f5346DFC";
|
|
6
|
-
function R(d) {
|
|
7
|
-
|
|
1
|
+
import { n as _, K as A, Y as w, J as R, U as I, G as C, q as S, Z as r, i as D } from "./generated-CKt2yCQd.js";
|
|
2
|
+
import { isAddress as B } from "viem";
|
|
3
|
+
import { B as g } from "./deployments-oykLv3_Z.js";
|
|
4
|
+
import { Deployable as E } from "./Deployable/Deployable.js";
|
|
5
|
+
import { assertValidAddressByChainId as a } from "./utils.js";
|
|
6
|
+
const T = "0x6080604052348015600e575f80fd5b50611bc78061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e87565b6101f6565b6040516100b19190610ecc565b60405180910390f35b6100d460048036038101906100cf9190610f18565b61026f565b6040516100e19190611120565b60405180910390f35b61010460048036038101906100ff919061116a565b610481565b604051610111919061124c565b60405180910390f35b610134600480360381019061012f9190610f18565b610514565b604051610141919061127b565b60405180910390f35b610164600480360381019061015f9190611318565b6105bc565b60405161017191906113ab565b60405180910390f35b610194600480360381019061018f91906113c4565b6105fe565b005b6101b060048036038101906101ab9190611435565b610828565b6040516101bd91906113ab565b60405180910390f35b6101e060048036038101906101db91906114e7565b610864565b6040516101ed919061127b565b60405180910390f35b5f7fb09d9d54000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610268575061026782610c2c565b5b9050919050565b610277610dc7565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102b6576102b5610f43565b5b60048111156102c8576102c7610f43565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282018054610386906115b7565b80601f01602080910402602001604051908101604052809291908181526020018280546103b2906115b7565b80156103fd5780601f106103d4576101008083540402835291602001916103fd565b820191905f5260205f20905b8154815290600101906020018083116103e057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361047c57816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161047391906113ab565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561050857602002820191905f5260205f20905b8154815260200190600101908083116104f4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105b757816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016105ae91906113ab565b60405180910390fd5b919050565b5f6105f386868686866040516020016105d89493929190611668565b60405160208183030381529060405280519060200120610c95565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161065891906116b1565b602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061069791906116f4565b6106d857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106cf919061172e565b60405180910390fd5b5f6106e4868686610828565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107875785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161077e929190611756565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107e9576107e8610f43565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd8085604051610818919061172e565b60405180910390a3505050505050565b5f61085b84848460405160200161084092919061177d565b60405160208183030381529060405280519060200120610c95565b90509392505050565b5f3068929eee149b4bd2126854036108835763ab143c065f526004601cfd5b3068929eee149b4bd212685561092b87878787336040516020016108ab9594939291906117c9565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610cc79092919063ffffffff16565b90505f61093b88883389896105bc565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109d9929190611756565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a6157610a60610f43565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b1e57610b1d610f43565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bc491906119de565b5090505080886004811115610bdc57610bdb610f43565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610c0d929190611aad565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f8282604051602001610ca9929190611af4565b60405160208183030381529060405280519060200120905092915050565b5f610cf1838573ffffffffffffffffffffffffffffffffffffffff16610d6090919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610d2c9190611b71565b5f604051808303815f87803b158015610d43575f80fd5b505af1158015610d55573d5f803e3d5ffd5b505050509392505050565b5f610d6c5f8484610d74565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610dbc5763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610de557610de4610f43565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610e6681610e32565b8114610e70575f80fd5b50565b5f81359050610e8181610e5d565b92915050565b5f60208284031215610e9c57610e9b610e2a565b5b5f610ea984828501610e73565b91505092915050565b5f8115159050919050565b610ec681610eb2565b82525050565b5f602082019050610edf5f830184610ebd565b92915050565b5f819050919050565b610ef781610ee5565b8114610f01575f80fd5b50565b5f81359050610f1281610eee565b92915050565b5f60208284031215610f2d57610f2c610e2a565b5b5f610f3a84828501610f04565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f8157610f80610f43565b5b50565b5f819050610f9182610f70565b919050565b5f610fa082610f84565b9050919050565b610fb081610f96565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ff8610ff3610fee84610fb6565b610fd5565b610fb6565b9050919050565b5f61100982610fde565b9050919050565b5f61101a82610fff565b9050919050565b61102a81611010565b82525050565b5f61103a82610fb6565b9050919050565b61104a81611030565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61109282611050565b61109c818561105a565b93506110ac81856020860161106a565b6110b581611078565b840191505092915050565b5f608083015f8301516110d55f860182610fa7565b5060208301516110e86020860182611021565b5060408301516110fb6040860182611041565b50606083015184820360608601526111138282611088565b9150508091505092915050565b5f6020820190508181035f83015261113881846110c0565b905092915050565b61114981611030565b8114611153575f80fd5b50565b5f8135905061116481611140565b92915050565b5f6020828403121561117f5761117e610e2a565b5b5f61118c84828501611156565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6111c781610ee5565b82525050565b5f6111d883836111be565b60208301905092915050565b5f602082019050919050565b5f6111fa82611195565b611204818561119f565b935061120f836111af565b805f5b8381101561123f57815161122688826111cd565b9750611231836111e4565b925050600181019050611212565b5085935050505092915050565b5f6020820190508181035f83015261126481846111f0565b905092915050565b61127581611010565b82525050565b5f60208201905061128e5f83018461126c565b92915050565b600581106112a0575f80fd5b50565b5f813590506112b181611294565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d8576112d76112b7565b5b8235905067ffffffffffffffff8111156112f5576112f46112bb565b5b602083019150836001820283011115611311576113106112bf565b5b9250929050565b5f805f805f6080868803121561133157611330610e2a565b5b5f61133e888289016112a3565b955050602061134f88828901611156565b945050604061136088828901611156565b935050606086013567ffffffffffffffff81111561138157611380610e2e565b5b61138d888289016112c3565b92509250509295509295909350565b6113a581610ee5565b82525050565b5f6020820190506113be5f83018461139c565b92915050565b5f805f80606085870312156113dc576113db610e2a565b5b5f6113e9878288016112a3565b945050602085013567ffffffffffffffff81111561140a57611409610e2e565b5b611416878288016112c3565b9350935050604061142987828801611156565b91505092959194509250565b5f805f6040848603121561144c5761144b610e2a565b5b5f611459868287016112a3565b935050602084013567ffffffffffffffff81111561147a57611479610e2e565b5b611486868287016112c3565b92509250509250925092565b5f8083601f8401126114a7576114a66112b7565b5b8235905067ffffffffffffffff8111156114c4576114c36112bb565b5b6020830191508360018202830111156114e0576114df6112bf565b5b9250929050565b5f805f805f806080878903121561150157611500610e2a565b5b5f61150e89828a016112a3565b965050602061151f89828a01611156565b955050604087013567ffffffffffffffff8111156115405761153f610e2e565b5b61154c89828a016112c3565b9450945050606087013567ffffffffffffffff81111561156f5761156e610e2e565b5b61157b89828a01611492565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806115ce57607f821691505b6020821081036115e1576115e061158a565b5b50919050565b5f8160601b9050919050565b5f6115fd826115e7565b9050919050565b5f61160e826115f3565b9050919050565b61162661162182611030565b611604565b82525050565b5f81905092915050565b828183375f83830152505050565b5f61164f838561162c565b935061165c838584611636565b82840190509392505050565b5f6116738287611615565b6014820191506116838286611615565b601482019150611694828486611644565b915081905095945050505050565b6116ab81610e32565b82525050565b5f6020820190506116c45f8301846116a2565b92915050565b6116d381610eb2565b81146116dd575f80fd5b50565b5f815190506116ee816116ca565b92915050565b5f6020828403121561170957611708610e2a565b5b5f611716848285016116e0565b91505092915050565b61172881611030565b82525050565b5f6020820190506117415f83018461171f565b92915050565b61175081610f96565b82525050565b5f6040820190506117695f830185611747565b611776602083018461139c565b9392505050565b5f611789828486611644565b91508190509392505050565b5f8160f81b9050919050565b5f6117ab82611795565b9050919050565b6117c36117be82610f96565b6117a1565b82525050565b5f6117d482886117b2565b6001820191506117e48287611615565b6014820191506117f5828587611644565b91506118018284611615565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261189d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611862565b6118a78683611862565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6118e26118dd6118d8846118bf565b610fd5565b6118bf565b9050919050565b5f819050919050565b6118fb836118c8565b61190f611907826118e9565b84845461186e565b825550505050565b5f90565b611923611917565b61192e8184846118f2565b505050565b5b81811015611951576119465f8261191b565b600181019050611934565b5050565b601f8211156119965761196781611841565b61197084611853565b8101602085101561197f578190505b61199361198b85611853565b830182611933565b50505b505050565b5f82821c905092915050565b5f6119b65f198460080261199b565b1980831691505092915050565b5f6119ce83836119a7565b9150826002028217905092915050565b6119e782611050565b67ffffffffffffffff811115611a00576119ff611814565b5b611a0a82546115b7565b611a15828285611955565b5f60209050601f831160018114611a46575f8415611a34578287015190505b611a3e85826119c3565b865550611aa5565b601f198416611a5486611841565b5f5b82811015611a7b57848901518255600182019150602085019450602081019050611a56565b86831015611a985784890151611a94601f8916826119a7565b8355505b6001600288020188555050505b505050505050565b5f604082019050611ac05f83018561171f565b611acd602083018461126c565b9392505050565b5f819050919050565b611aee611ae982610ee5565b611ad4565b82525050565b5f611aff82856117b2565b600182019150611b0f8284611add565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611b4382611b1f565b611b4d8185611b29565b9350611b5d81856020860161106a565b611b6681611078565b840191505092915050565b5f6020820190508181035f830152611b898184611b39565b90509291505056fea26469706673582212204daf6f75f116e42e1398ed46c96f8a904f8674e8ecc760dd4700af150affefe664736f6c634300081a0033", J = g[11155111], u = {
|
|
7
|
+
...g,
|
|
8
|
+
31337: void 0
|
|
9
|
+
};
|
|
10
|
+
function G(t) {
|
|
11
|
+
return t.address && B(t.address);
|
|
8
12
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
13
|
+
function O(t) {
|
|
14
|
+
return t.address === null;
|
|
11
15
|
}
|
|
12
|
-
class
|
|
16
|
+
const n = class n extends E {
|
|
17
|
+
/**
|
|
18
|
+
* A getter that will return Boost registry's static addresses by numerical chain ID
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
* @readonly
|
|
22
|
+
* @type {Record<number, Address>}
|
|
23
|
+
*/
|
|
24
|
+
get addresses() {
|
|
25
|
+
return this.constructor.addresses;
|
|
26
|
+
}
|
|
13
27
|
/**
|
|
14
28
|
* Creates an instance of BoostRegistry.
|
|
15
29
|
*
|
|
@@ -20,8 +34,18 @@ class V extends A {
|
|
|
20
34
|
* @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)
|
|
21
35
|
* @param {({ address?: Address; } | {})} param0....options
|
|
22
36
|
*/
|
|
23
|
-
constructor({ config:
|
|
24
|
-
|
|
37
|
+
constructor({ config: e, account: f, ...b }) {
|
|
38
|
+
if (G(b) && b.address)
|
|
39
|
+
super({ account: f, config: e }, b.address);
|
|
40
|
+
else if (O(b))
|
|
41
|
+
super({ account: f, config: e }, []);
|
|
42
|
+
else {
|
|
43
|
+
const { address: c } = a(
|
|
44
|
+
e,
|
|
45
|
+
u
|
|
46
|
+
);
|
|
47
|
+
super({ account: f, config: e }, c);
|
|
48
|
+
}
|
|
25
49
|
}
|
|
26
50
|
/**
|
|
27
51
|
* Register a new base implementation of a given type
|
|
@@ -31,16 +55,16 @@ class V extends A {
|
|
|
31
55
|
* @param {RegistryType} registryType - The base type for the implementation
|
|
32
56
|
* @param {string} name - A name for the implementation (must be unique within the given type)
|
|
33
57
|
* @param {Address} implementation - The address of the implementation contract
|
|
34
|
-
* @param {?WriteParams
|
|
35
|
-
* @returns {
|
|
58
|
+
* @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call
|
|
59
|
+
* @returns {Promise<void>}
|
|
36
60
|
* @example
|
|
37
61
|
* ```ts
|
|
38
62
|
* await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)
|
|
39
63
|
* ```
|
|
40
64
|
*/
|
|
41
|
-
async register(
|
|
42
|
-
return this.awaitResult(
|
|
43
|
-
this.registerRaw(
|
|
65
|
+
async register(e, f, b, c) {
|
|
66
|
+
return await this.awaitResult(
|
|
67
|
+
this.registerRaw(e, f, b, c)
|
|
44
68
|
);
|
|
45
69
|
}
|
|
46
70
|
/**
|
|
@@ -50,21 +74,62 @@ class V extends A {
|
|
|
50
74
|
* @param {RegistryType} registryType
|
|
51
75
|
* @param {string} name
|
|
52
76
|
* @param {Address} implementation
|
|
53
|
-
* @param {?WriteParams
|
|
54
|
-
* @returns {
|
|
77
|
+
* @param {?WriteParams} [params]
|
|
78
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
55
79
|
*/
|
|
56
|
-
async registerRaw(
|
|
57
|
-
|
|
80
|
+
async registerRaw(e, f, b, c) {
|
|
81
|
+
var s;
|
|
82
|
+
const { request: d, result: i } = await _(
|
|
58
83
|
this._config,
|
|
59
84
|
{
|
|
60
|
-
|
|
61
|
-
|
|
85
|
+
...a(
|
|
86
|
+
this._config,
|
|
87
|
+
this.addresses,
|
|
88
|
+
((s = c == null ? void 0 : c.chain) == null ? void 0 : s.id) || (c == null ? void 0 : c.chainId)
|
|
89
|
+
),
|
|
90
|
+
args: [e, f, b],
|
|
62
91
|
...this.optionallyAttachAccount(),
|
|
63
92
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
64
|
-
...
|
|
93
|
+
...c
|
|
65
94
|
}
|
|
66
95
|
);
|
|
67
|
-
return { hash: await
|
|
96
|
+
return { hash: await A(this._config, d), result: i };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.
|
|
100
|
+
* This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
* @async
|
|
104
|
+
* @template {DeployableTarget} Target
|
|
105
|
+
* @param {string} displayName - The display name for the clone
|
|
106
|
+
* @param {Target} target - An instance of a target contract to clone and initialize
|
|
107
|
+
* @param {?WriteParams} [params]
|
|
108
|
+
* @returns {Promise<Target>} - The provided instance, but with a new address attached.
|
|
109
|
+
* biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
|
|
110
|
+
*/
|
|
111
|
+
initialize(e, f, b) {
|
|
112
|
+
return this.clone(e, f, b);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.
|
|
116
|
+
* This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
* @async
|
|
120
|
+
* @template {DeployableTarget} Target
|
|
121
|
+
* @param {string} displayName - The display name for the clone
|
|
122
|
+
* @param {Target} target - An instance of a target contract to clone and initialize
|
|
123
|
+
* @param {?WriteParams} [params]
|
|
124
|
+
* @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address
|
|
125
|
+
*/
|
|
126
|
+
async initializeRaw(e, f, b) {
|
|
127
|
+
const { hash: c, result: d } = await this.deployCloneRaw(
|
|
128
|
+
e,
|
|
129
|
+
f,
|
|
130
|
+
b
|
|
131
|
+
);
|
|
132
|
+
return { hash: c, result: d, target: f.at(d) };
|
|
68
133
|
}
|
|
69
134
|
/**
|
|
70
135
|
* Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.
|
|
@@ -74,13 +139,13 @@ class V extends A {
|
|
|
74
139
|
* @template {DeployableTarget} Target
|
|
75
140
|
* @param {string} displayName - The display name for the clone
|
|
76
141
|
* @param {Target} target - An instance of a target contract to clone and initialize
|
|
77
|
-
* @param {?WriteParams
|
|
78
|
-
* @returns {Target} - The provided instance, but with a new address attached.
|
|
142
|
+
* @param {?WriteParams} [params]
|
|
143
|
+
* @returns {Promise<Target>} - The provided instance, but with a new address attached.
|
|
79
144
|
* biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
|
|
80
145
|
*/
|
|
81
|
-
async clone(
|
|
82
|
-
const
|
|
83
|
-
return f.at(
|
|
146
|
+
async clone(e, f, b) {
|
|
147
|
+
const c = await this.deployClone(e, f, b);
|
|
148
|
+
return f.at(c);
|
|
84
149
|
}
|
|
85
150
|
/**
|
|
86
151
|
*
|
|
@@ -90,12 +155,14 @@ class V extends A {
|
|
|
90
155
|
* @template {DeployableTarget} Target
|
|
91
156
|
* @param {string} displayName
|
|
92
157
|
* @param {Target} target
|
|
93
|
-
* @param {?WriteParams
|
|
94
|
-
* @returns {
|
|
158
|
+
* @param {?WriteParams} [params]
|
|
159
|
+
* @returns {Promise<Address>}
|
|
95
160
|
* biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
|
|
96
161
|
*/
|
|
97
|
-
async deployClone(
|
|
98
|
-
return this.awaitResult(
|
|
162
|
+
async deployClone(e, f, b) {
|
|
163
|
+
return await this.awaitResult(
|
|
164
|
+
this.deployCloneRaw(e, f, b)
|
|
165
|
+
);
|
|
99
166
|
}
|
|
100
167
|
/**
|
|
101
168
|
* @see {@link clone}
|
|
@@ -103,30 +170,34 @@ class V extends A {
|
|
|
103
170
|
* @async
|
|
104
171
|
* @param {string} displayName
|
|
105
172
|
* @param {DeployableTarget} target
|
|
106
|
-
* @param {?WriteParams
|
|
107
|
-
* @returns {
|
|
173
|
+
* @param {?WriteParams} [params]
|
|
174
|
+
* @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash
|
|
108
175
|
* biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
|
|
109
176
|
*/
|
|
110
|
-
async deployCloneRaw(
|
|
111
|
-
|
|
177
|
+
async deployCloneRaw(e, f, b) {
|
|
178
|
+
var h, l;
|
|
179
|
+
const c = f.buildParameters(void 0, {
|
|
112
180
|
config: this._config,
|
|
113
181
|
account: this._account
|
|
114
|
-
}), {
|
|
182
|
+
}), { address: d } = a(
|
|
183
|
+
this._config,
|
|
184
|
+
f.bases,
|
|
185
|
+
((h = b == null ? void 0 : b.chain) == null ? void 0 : h.id) || (b == null ? void 0 : b.chainId)
|
|
186
|
+
), { request: i, result: o } = await w(
|
|
115
187
|
this._config,
|
|
116
188
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
],
|
|
189
|
+
...a(
|
|
190
|
+
this._config,
|
|
191
|
+
this.addresses,
|
|
192
|
+
((l = b == null ? void 0 : b.chain) == null ? void 0 : l.id) || (b == null ? void 0 : b.chainId)
|
|
193
|
+
),
|
|
194
|
+
args: [f.registryType, d, e, c.args[0]],
|
|
124
195
|
...this.optionallyAttachAccount(),
|
|
125
196
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
126
|
-
...
|
|
197
|
+
...b
|
|
127
198
|
}
|
|
128
199
|
);
|
|
129
|
-
return { hash: await
|
|
200
|
+
return { hash: await R(this._config, i), result: o };
|
|
130
201
|
}
|
|
131
202
|
/**
|
|
132
203
|
* Get the address of a registered base implementation.
|
|
@@ -135,31 +206,39 @@ class V extends A {
|
|
|
135
206
|
* @public
|
|
136
207
|
* @async
|
|
137
208
|
* @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})
|
|
138
|
-
* @param {?ReadParams
|
|
139
|
-
* @returns {
|
|
209
|
+
* @param {?ReadParams} [params]
|
|
210
|
+
* @returns {Promise<Address>} - The address of the implementation
|
|
140
211
|
*/
|
|
141
|
-
async getBaseImplementation(
|
|
142
|
-
return
|
|
143
|
-
|
|
144
|
-
|
|
212
|
+
async getBaseImplementation(e, f) {
|
|
213
|
+
return await I(this._config, {
|
|
214
|
+
...a(
|
|
215
|
+
this._config,
|
|
216
|
+
this.addresses,
|
|
217
|
+
f == null ? void 0 : f.chainId
|
|
218
|
+
),
|
|
219
|
+
args: [e],
|
|
145
220
|
...this.optionallyAttachAccount(),
|
|
146
221
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
147
222
|
...f
|
|
148
223
|
});
|
|
149
224
|
}
|
|
150
225
|
/**
|
|
151
|
-
* Get the address of a deployed clone by its identifier
|
|
226
|
+
* Get the address of a deployed clone by its identifier
|
|
152
227
|
*
|
|
153
228
|
* @public
|
|
154
229
|
* @async
|
|
155
230
|
* @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})
|
|
156
|
-
* @param {?ReadParams
|
|
157
|
-
* @returns {Promise<
|
|
231
|
+
* @param {?ReadParams} [params]
|
|
232
|
+
* @returns {Promise<Clone>} - The on-chain representation of the clone
|
|
158
233
|
*/
|
|
159
|
-
async getClone(
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
234
|
+
async getClone(e, f) {
|
|
235
|
+
return await C(this._config, {
|
|
236
|
+
...a(
|
|
237
|
+
this._config,
|
|
238
|
+
this.addresses,
|
|
239
|
+
f == null ? void 0 : f.chainId
|
|
240
|
+
),
|
|
241
|
+
args: [e],
|
|
163
242
|
...this.optionallyAttachAccount(),
|
|
164
243
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
165
244
|
...f
|
|
@@ -171,13 +250,17 @@ class V extends A {
|
|
|
171
250
|
* @public
|
|
172
251
|
* @async
|
|
173
252
|
* @param {Address} deployer - The address of the deployer
|
|
174
|
-
* @param {?ReadParams
|
|
175
|
-
* @returns {Promise<
|
|
253
|
+
* @param {?ReadParams} [params]
|
|
254
|
+
* @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer
|
|
176
255
|
*/
|
|
177
|
-
async getClones(
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
|
|
256
|
+
async getClones(e, f) {
|
|
257
|
+
return await S(this._config, {
|
|
258
|
+
...a(
|
|
259
|
+
this._config,
|
|
260
|
+
this.addresses,
|
|
261
|
+
f == null ? void 0 : f.chainId
|
|
262
|
+
),
|
|
263
|
+
args: [e],
|
|
181
264
|
...this.optionallyAttachAccount(),
|
|
182
265
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
183
266
|
...f
|
|
@@ -192,16 +275,20 @@ class V extends A {
|
|
|
192
275
|
* @param {Address} base - The address of the base implementation
|
|
193
276
|
* @param {Address} deployer - The address of the deployer
|
|
194
277
|
* @param {string} displayName - The display name of the clone
|
|
195
|
-
* @param {?ReadParams
|
|
278
|
+
* @param {?ReadParams} [params]
|
|
196
279
|
* @returns {Promise<Hex>} - The unique identifier for the clone
|
|
197
280
|
*/
|
|
198
|
-
async getCloneIdentifier(
|
|
199
|
-
return r(this._config, {
|
|
200
|
-
|
|
201
|
-
|
|
281
|
+
async getCloneIdentifier(e, f, b, c, d) {
|
|
282
|
+
return await r(this._config, {
|
|
283
|
+
...a(
|
|
284
|
+
this._config,
|
|
285
|
+
this.addresses,
|
|
286
|
+
d == null ? void 0 : d.chainId
|
|
287
|
+
),
|
|
288
|
+
args: [e, f, b, c],
|
|
202
289
|
...this.optionallyAttachAccount(),
|
|
203
290
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
204
|
-
...
|
|
291
|
+
...d
|
|
205
292
|
});
|
|
206
293
|
}
|
|
207
294
|
/**
|
|
@@ -211,16 +298,20 @@ class V extends A {
|
|
|
211
298
|
* @async
|
|
212
299
|
* @param {RegistryType} registryType - The base type for the implementation
|
|
213
300
|
* @param {string} displayName - The name of the implementation
|
|
214
|
-
* @param {?ReadParams
|
|
301
|
+
* @param {?ReadParams} [params]
|
|
215
302
|
* @returns {Promise<Hex>} - The unique identifier for the implementation
|
|
216
303
|
*/
|
|
217
|
-
async getIdentifier(
|
|
218
|
-
return r(this._config, {
|
|
219
|
-
|
|
220
|
-
|
|
304
|
+
async getIdentifier(e, f, b) {
|
|
305
|
+
return await r(this._config, {
|
|
306
|
+
...a(
|
|
307
|
+
this._config,
|
|
308
|
+
this.addresses,
|
|
309
|
+
b == null ? void 0 : b.chainId
|
|
310
|
+
),
|
|
311
|
+
args: [e, f],
|
|
221
312
|
...this.optionallyAttachAccount(),
|
|
222
313
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
223
|
-
...
|
|
314
|
+
...b
|
|
224
315
|
});
|
|
225
316
|
}
|
|
226
317
|
/**
|
|
@@ -231,20 +322,23 @@ class V extends A {
|
|
|
231
322
|
* @param {?DeployableOptions} [_options]
|
|
232
323
|
* @returns {GenericDeployableParams}
|
|
233
324
|
*/
|
|
234
|
-
buildParameters(
|
|
235
|
-
const [,
|
|
325
|
+
buildParameters(e, f) {
|
|
326
|
+
const [, b] = this.validateDeploymentConfig([], f);
|
|
236
327
|
return {
|
|
237
|
-
abi:
|
|
238
|
-
bytecode:
|
|
328
|
+
abi: D,
|
|
329
|
+
bytecode: T,
|
|
239
330
|
// biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize
|
|
240
331
|
args: [],
|
|
241
|
-
...this.optionallyAttachAccount(
|
|
332
|
+
...this.optionallyAttachAccount(b.account)
|
|
242
333
|
};
|
|
243
334
|
}
|
|
244
|
-
}
|
|
335
|
+
};
|
|
336
|
+
n.addresses = u;
|
|
337
|
+
let y = n;
|
|
245
338
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
339
|
+
J as BOOST_REGISTRY_ADDRESS,
|
|
340
|
+
u as BOOST_REGISTRY_ADDRESSES,
|
|
341
|
+
y as BoostRegistry,
|
|
342
|
+
D as boostRegistryAbi
|
|
250
343
|
};
|
|
344
|
+
//# sourceMappingURL=BoostRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n (BoostRegistryBases as Record<string, Address>)[__DEFAULT_CHAIN_ID__] ||\n zeroAddress;\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n ...(BoostRegistryBases as Record<number, Address>),\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n};\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [registryType, name, implementation],\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 writeBoostRegistryRegister(this._config, request);\n return { hash, result };\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.\n * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams} [params]\n * @returns {Promise<Address>}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { address: baseAddress } = assertValidAddressByChainId(\n this._config,\n target.bases,\n params?.chain?.id || params?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [target.registryType, baseAddress, displayName, payload.args[0]],\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 writeBoostRegistryDeployClone(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the address of a registered base implementation.\n * This function will revert if the implementation is not registered\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [deployer],\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\n /**\n * Build the identifier for a clone of a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {Address} base - The address of the base implementation\n * @param {Address} deployer - The address of the deployer\n * @param {string} displayName - The display name of the clone\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, base, deployer, displayName],\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\n /**\n * Build the identifier for a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} displayName - The name of the implementation\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\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\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESS","BoostRegistryBases","BOOST_REGISTRY_ADDRESSES","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","_a","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":"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"}
|
package/dist/Budgets/Budget.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-CyTNlOwM.cjs"),d=require("../componentInterfaces-DRI_dQ-P.cjs"),u=require("@wagmi/core"),g=require("../errors.cjs"),a=require("./ManagedBudget.cjs"),e={[d.AManagedBudget]:a.ManagedBudget};async function i(t,n){const r=await u.readContract(t.config,{abi:c.c,functionName:"getComponentInterface",address:n}),o=e[r];if(!o)throw new g.InvalidComponentInterfaceError(Object.keys(e),r);return new o(t,n)}exports.ManagedBudget=a.ManagedBudget;exports.BudgetByComponentInterface=e;exports.budgetFromAddress=i;
|
|
2
|
+
//# sourceMappingURL=Budget.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Budget.cjs","sources":["../../src/Budgets/Budget.ts"],"sourcesContent":["import { aBudgetAbi } from '@boostxyz/evm';\nimport { AManagedBudget } 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 { ManagedBudget } from './ManagedBudget';\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; // | 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};\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>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function budgetFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aBudgetAbi,\n functionName: 'getComponentInterface',\n address,\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":["BudgetByComponentInterface","AManagedBudget","ManagedBudget","budgetFromAddress","options","address","interfaceId","readContract","aBudgetAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"mQA0BaA,EAA6B,CAGxC,CAACC,EAAqB,cAAA,EAAGC,EAAA,aAC3B,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,EACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA2BM,CAAW,EACnD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA0B,EACtCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
|
package/dist/Budgets/Budget.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type Budget = ManagedBudget;
|
|
|
15
15
|
* @type {{ "0xa0109882": typeof ManagedBudget; }}
|
|
16
16
|
*/
|
|
17
17
|
export declare const BudgetByComponentInterface: {
|
|
18
|
-
|
|
18
|
+
[x: string]: typeof ManagedBudget;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Budget.d.ts","sourceRoot":"","sources":["../../src/Budgets/Budget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Budget.d.ts","sourceRoot":"","sources":["../../src/Budgets/Budget.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAEL,aAAa,GACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;CAItC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,0BAejB"}
|
package/dist/Budgets/Budget.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as a } from "../generated-CKt2yCQd.js";
|
|
2
|
+
import { a as m } from "../componentInterfaces-BBCFkrZv.js";
|
|
2
3
|
import { readContract as c } from "@wagmi/core";
|
|
3
|
-
import { InvalidComponentInterfaceError as
|
|
4
|
-
import { ManagedBudget as
|
|
4
|
+
import { InvalidComponentInterfaceError as f } from "../errors.js";
|
|
5
|
+
import { ManagedBudget as i } from "./ManagedBudget.js";
|
|
5
6
|
const r = {
|
|
6
7
|
// ['0x64683da1']: VestingBudget,
|
|
7
8
|
// ['0x2929d19c']: SimpleBudget,
|
|
8
|
-
|
|
9
|
+
[m]: i
|
|
9
10
|
};
|
|
10
|
-
async function
|
|
11
|
-
const
|
|
11
|
+
async function C(t, e) {
|
|
12
|
+
const o = await c(t.config, {
|
|
12
13
|
abi: a,
|
|
13
14
|
functionName: "getComponentInterface",
|
|
14
15
|
address: e
|
|
15
|
-
}),
|
|
16
|
-
if (!
|
|
17
|
-
throw new
|
|
16
|
+
}), n = r[o];
|
|
17
|
+
if (!n)
|
|
18
|
+
throw new f(
|
|
18
19
|
Object.keys(r),
|
|
19
|
-
|
|
20
|
+
o
|
|
20
21
|
);
|
|
21
|
-
return new
|
|
22
|
+
return new n(t, e);
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
25
|
r as BudgetByComponentInterface,
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
i as ManagedBudget,
|
|
27
|
+
C as budgetFromAddress
|
|
27
28
|
};
|
|
29
|
+
//# sourceMappingURL=Budget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Budget.js","sources":["../../src/Budgets/Budget.ts"],"sourcesContent":["import { aBudgetAbi } from '@boostxyz/evm';\nimport { AManagedBudget } 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 { ManagedBudget } from './ManagedBudget';\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; // | 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};\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>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function budgetFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aBudgetAbi,\n functionName: 'getComponentInterface',\n address,\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":["BudgetByComponentInterface","AManagedBudget","ManagedBudget","budgetFromAddress","options","address","interfaceId","readContract","aBudgetAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;AA0BO,MAAMA,IAA6B;AAAA;AAAA;AAAA,EAGxC,CAACC,CAAqB,GAAGC;AAC3B;AAYsB,eAAAC,EACpBC,GACAC,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaH,EAAQ,QAAQ;AAAA,IACtD,KAAKI;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,EAAA,CACD,GACKI,IAAOT,EAA2BM,CAAW;AACnD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA0B;AAAA,MACtCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}
|