@boostxyz/sdk 0.0.0-alpha.10
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/LICENSE +674 -0
- package/README.md +7 -0
- package/dist/Actions/Action.cjs +2 -0
- package/dist/Actions/Action.cjs.map +1 -0
- package/dist/Actions/Action.d.ts +31 -0
- package/dist/Actions/Action.d.ts.map +1 -0
- package/dist/Actions/Action.js +29 -0
- package/dist/Actions/Action.js.map +1 -0
- package/dist/Actions/ContractAction.d.ts +370 -0
- package/dist/Actions/ContractAction.d.ts.map +1 -0
- package/dist/Actions/ERC721MintAction.d.ts +513 -0
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.cjs +2 -0
- package/dist/Actions/EventAction.cjs.map +1 -0
- package/dist/Actions/EventAction.d.ts +694 -0
- package/dist/Actions/EventAction.d.ts.map +1 -0
- package/dist/Actions/EventAction.js +491 -0
- package/dist/Actions/EventAction.js.map +1 -0
- package/dist/AllowLists/AllowList.cjs +2 -0
- package/dist/AllowLists/AllowList.cjs.map +1 -0
- package/dist/AllowLists/AllowList.d.ts +32 -0
- package/dist/AllowLists/AllowList.d.ts.map +1 -0
- package/dist/AllowLists/AllowList.js +30 -0
- package/dist/AllowLists/AllowList.js.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +2 -0
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
- package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.js +154 -0
- package/dist/AllowLists/SimpleAllowList.js.map +1 -0
- package/dist/AllowLists/SimpleDenyList.cjs +2 -0
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
- package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleDenyList.js +115 -0
- package/dist/AllowLists/SimpleDenyList.js.map +1 -0
- package/dist/Auth/Auth.cjs +2 -0
- package/dist/Auth/Auth.cjs.map +1 -0
- package/dist/Auth/Auth.d.ts +10 -0
- package/dist/Auth/Auth.d.ts.map +1 -0
- package/dist/Auth/Auth.js +5 -0
- package/dist/Auth/Auth.js.map +1 -0
- package/dist/Auth/PassthroughAuth.cjs +2 -0
- package/dist/Auth/PassthroughAuth.cjs.map +1 -0
- package/dist/Auth/PassthroughAuth.d.ts +51 -0
- package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
- package/dist/Auth/PassthroughAuth.js +39 -0
- package/dist/Auth/PassthroughAuth.js.map +1 -0
- package/dist/Boost.cjs +2 -0
- package/dist/Boost.cjs.map +1 -0
- package/dist/Boost.d.ts +234 -0
- package/dist/Boost.d.ts.map +1 -0
- package/dist/Boost.js +162 -0
- package/dist/Boost.js.map +1 -0
- package/dist/BoostCore.cjs +3 -0
- package/dist/BoostCore.cjs.map +1 -0
- package/dist/BoostCore.d.ts +498 -0
- package/dist/BoostCore.d.ts.map +1 -0
- package/dist/BoostCore.js +1153 -0
- package/dist/BoostCore.js.map +1 -0
- package/dist/BoostRegistry.cjs +2 -0
- package/dist/BoostRegistry.cjs.map +1 -0
- package/dist/BoostRegistry.d.ts +243 -0
- package/dist/BoostRegistry.d.ts.map +1 -0
- package/dist/BoostRegistry.js +262 -0
- package/dist/BoostRegistry.js.map +1 -0
- package/dist/Budgets/Budget.cjs +2 -0
- package/dist/Budgets/Budget.cjs.map +1 -0
- package/dist/Budgets/Budget.d.ts +31 -0
- package/dist/Budgets/Budget.d.ts.map +1 -0
- package/dist/Budgets/Budget.js +29 -0
- package/dist/Budgets/Budget.js.map +1 -0
- package/dist/Budgets/ManagedBudget.cjs +2 -0
- package/dist/Budgets/ManagedBudget.cjs.map +1 -0
- package/dist/Budgets/ManagedBudget.d.ts +1103 -0
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
- package/dist/Budgets/ManagedBudget.js +516 -0
- package/dist/Budgets/ManagedBudget.js.map +1 -0
- package/dist/Budgets/SimpleBudget.d.ts +824 -0
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
- package/dist/Budgets/VestingBudget.d.ts +778 -0
- package/dist/Budgets/VestingBudget.d.ts.map +1 -0
- package/dist/Deployable/Contract.cjs +2 -0
- package/dist/Deployable/Contract.cjs.map +1 -0
- package/dist/Deployable/Contract.d.ts +125 -0
- package/dist/Deployable/Contract.d.ts.map +1 -0
- package/dist/Deployable/Contract.js +150 -0
- package/dist/Deployable/Contract.js.map +1 -0
- package/dist/Deployable/Deployable.cjs +2 -0
- package/dist/Deployable/Deployable.cjs.map +1 -0
- package/dist/Deployable/Deployable.d.ts +161 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -0
- package/dist/Deployable/Deployable.js +131 -0
- package/dist/Deployable/Deployable.js.map +1 -0
- package/dist/Deployable/DeployableTarget.cjs +2 -0
- package/dist/Deployable/DeployableTarget.cjs.map +1 -0
- package/dist/Deployable/DeployableTarget.d.ts +116 -0
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
- package/dist/Deployable/DeployableTarget.js +132 -0
- package/dist/Deployable/DeployableTarget.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +2 -0
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.d.ts +513 -0
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
- package/dist/Incentives/AllowListIncentive.js +201 -0
- package/dist/Incentives/AllowListIncentive.js.map +1 -0
- package/dist/Incentives/CGDAIncentive.cjs +2 -0
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
- package/dist/Incentives/CGDAIncentive.d.ts +644 -0
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
- package/dist/Incentives/CGDAIncentive.js +271 -0
- package/dist/Incentives/CGDAIncentive.js.map +1 -0
- package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.cjs +2 -0
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
- package/dist/Incentives/ERC20Incentive.d.ts +666 -0
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20Incentive.js +312 -0
- package/dist/Incentives/ERC20Incentive.js.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.cjs +2 -0
- package/dist/Incentives/Incentive.cjs.map +1 -0
- package/dist/Incentives/Incentive.d.ts +36 -0
- package/dist/Incentives/Incentive.d.ts.map +1 -0
- package/dist/Incentives/Incentive.js +299 -0
- package/dist/Incentives/Incentive.js.map +1 -0
- package/dist/Incentives/PointsIncentive.cjs +2 -0
- package/dist/Incentives/PointsIncentive.cjs.map +1 -0
- package/dist/Incentives/PointsIncentive.d.ts +659 -0
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
- package/dist/Incentives/PointsIncentive.js +215 -0
- package/dist/Incentives/PointsIncentive.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +2 -0
- package/dist/Validators/SignerValidator.cjs.map +1 -0
- package/dist/Validators/SignerValidator.d.ts +745 -0
- package/dist/Validators/SignerValidator.d.ts.map +1 -0
- package/dist/Validators/SignerValidator.js +293 -0
- package/dist/Validators/SignerValidator.js.map +1 -0
- package/dist/Validators/Validator.cjs +2 -0
- package/dist/Validators/Validator.cjs.map +1 -0
- package/dist/Validators/Validator.d.ts +31 -0
- package/dist/Validators/Validator.d.ts.map +1 -0
- package/dist/Validators/Validator.js +27 -0
- 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-CKCBwG16.cjs +2 -0
- package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
- package/dist/componentInterfaces-DYkaxBda.js +13 -0
- package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +441 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +262 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-BDeDiaCK.js +4625 -0
- package/dist/generated-BDeDiaCK.js.map +1 -0
- package/dist/generated-wKBNvm48.cjs +3 -0
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +113 -0
- 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 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.ts +116 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +30 -0
- package/dist/utils.js.map +1 -0
- package/package.json +211 -0
- package/src/Actions/Action.test.ts +75 -0
- package/src/Actions/Action.ts +61 -0
- package/src/Actions/ContractAction.test.ts +197 -0
- package/src/Actions/ContractAction.ts +301 -0
- package/src/Actions/ERC721MintAction.test.ts +112 -0
- package/src/Actions/ERC721MintAction.ts +292 -0
- package/src/Actions/EventAction.test.ts +205 -0
- package/src/Actions/EventAction.ts +811 -0
- package/src/AllowLists/AllowList.test.ts +64 -0
- package/src/AllowLists/AllowList.ts +60 -0
- package/src/AllowLists/SimpleAllowList.test.ts +52 -0
- package/src/AllowLists/SimpleAllowList.ts +284 -0
- package/src/AllowLists/SimpleDenyList.test.ts +52 -0
- package/src/AllowLists/SimpleDenyList.ts +227 -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 +290 -0
- package/src/BoostCore.test.ts +773 -0
- package/src/BoostCore.ts +1261 -0
- package/src/BoostRegistry.ts +467 -0
- package/src/Budgets/Budget.test.ts +27 -0
- package/src/Budgets/Budget.ts +61 -0
- package/src/Budgets/ManagedBudget.test.ts +154 -0
- package/src/Budgets/ManagedBudget.ts +796 -0
- package/src/Budgets/SimpleBudget.test.ts +152 -0
- package/src/Budgets/SimpleBudget.ts +564 -0
- package/src/Budgets/VestingBudget.test.ts +123 -0
- package/src/Budgets/VestingBudget.ts +602 -0
- package/src/Deployable/Contract.ts +229 -0
- package/src/Deployable/Deployable.ts +250 -0
- package/src/Deployable/DeployableTarget.ts +223 -0
- package/src/Incentives/AllowListIncentive.test.ts +143 -0
- package/src/Incentives/AllowListIncentive.ts +334 -0
- package/src/Incentives/CGDAIncentive.test.ts +132 -0
- package/src/Incentives/CGDAIncentive.ts +468 -0
- package/src/Incentives/ERC1155Incentive.test.ts +87 -0
- package/src/Incentives/ERC1155Incentive.ts +466 -0
- package/src/Incentives/ERC20Incentive.test.ts +130 -0
- package/src/Incentives/ERC20Incentive.ts +482 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
- package/src/Incentives/ERC20VariableIncentive.ts +420 -0
- package/src/Incentives/Incentive.test.ts +92 -0
- package/src/Incentives/Incentive.ts +85 -0
- package/src/Incentives/PointsIncentive.test.ts +139 -0
- package/src/Incentives/PointsIncentive.ts +365 -0
- package/src/Validators/SignerValidator.test.ts +159 -0
- package/src/Validators/SignerValidator.ts +681 -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 +542 -0
- package/src/index.test.ts +40 -0
- package/src/index.ts +53 -0
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +44 -0
- package/src/utils.ts +198 -0
|
@@ -0,0 +1,1153 @@
|
|
|
1
|
+
import { c as P, bd as k, be as G, bf as U, bg as W, bh as H, bi as Q, bj as J, bk as K, bl as X, bm as Y, bn as Z, bo as ff, bp as ef, bq as af, br as bf, bs as tf, bt as sf } from "./generated-BDeDiaCK.js";
|
|
2
|
+
import { getAccount as cf, waitForTransactionReceipt as nf } from "@wagmi/core";
|
|
3
|
+
import { createClient as df, custom as rf, parseEther as of, zeroAddress as w, zeroHash as o, parseEventLogs as uf } from "viem";
|
|
4
|
+
import { actionFromAddress as lf } from "./Actions/Action.js";
|
|
5
|
+
import { EventAction as hf } from "./Actions/EventAction.js";
|
|
6
|
+
import { allowListFromAddress as mf } from "./AllowLists/AllowList.js";
|
|
7
|
+
import { SimpleAllowList as gf } from "./AllowLists/SimpleAllowList.js";
|
|
8
|
+
import { SimpleDenyList as wf } from "./AllowLists/SimpleDenyList.js";
|
|
9
|
+
import { PassthroughAuth as pf } from "./Auth/PassthroughAuth.js";
|
|
10
|
+
import { prepareBoostPayload as Af, Boost as $ } from "./Boost.js";
|
|
11
|
+
import { budgetFromAddress as yf } from "./Budgets/Budget.js";
|
|
12
|
+
import { ManagedBudget as Cf } from "./Budgets/ManagedBudget.js";
|
|
13
|
+
import { Deployable as vf } from "./Deployable/Deployable.js";
|
|
14
|
+
import { AllowListIncentive as _f } from "./Incentives/AllowListIncentive.js";
|
|
15
|
+
import { CGDAIncentive as If } from "./Incentives/CGDAIncentive.js";
|
|
16
|
+
import { ERC20Incentive as Pf } from "./Incentives/ERC20Incentive.js";
|
|
17
|
+
import { incentiveFromAddress as Bf, ERC20VariableIncentive as Rf } from "./Incentives/Incentive.js";
|
|
18
|
+
import { PointsIncentive as Ff } from "./Incentives/PointsIncentive.js";
|
|
19
|
+
import { SignerValidator as Ef } from "./Validators/SignerValidator.js";
|
|
20
|
+
import { validatorFromAddress as Df } from "./Validators/Validator.js";
|
|
21
|
+
import { DeployableUnknownOwnerProvidedError as Vf, BudgetMustAuthorizeBoostCore as Lf, MustInitializeBudgetError as $f, IncentiveNotCloneableError as xf, BoostCoreNoIdentifierEmitted as Mf } from "./errors.js";
|
|
22
|
+
import { simulateContract as Nf, writeContract as Of } from "viem/actions";
|
|
23
|
+
import { parseAccount as Sf, getAddress as jf } from "viem/utils";
|
|
24
|
+
const qf = "0x60806040526544364c5bb0006004556103e860055f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506103e8600560086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555034801561006e575f80fd5b506040516135683803806135688339818101604052810190610090919061029f565b61009f3361012660201b60201c565b8160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506102dd565b61013461020260201b60201c565b156101ac577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561016e57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506101ff565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f90565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102338261020a565b9050919050565b5f61024482610229565b9050919050565b6102548161023a565b811461025e575f80fd5b50565b5f8151905061026f8161024b565b92915050565b61027e81610229565b8114610288575f80fd5b50565b5f8151905061029981610275565b92915050565b5f80604083850312156102b5576102b4610206565b5b5f6102c285828601610261565b92505060206102d38582860161028b565b9150509250929050565b61327e806102ea5f395ff3fe60806040526004361061014a575f3560e01c8063892b97f8116100b5578063d73792a91161006e578063d73792a9146103d0578063e21ff731146103fa578063eccc19a614610436578063f04e283e1461045e578063f2fde38b1461047a578063fee81cf4146104965761014a565b8063892b97f8146102e45780638da5cb5b1461030c5780638fe4f5231461033657806399d32fc414610352578063a92647dc1461037c578063b0e21e8a146103a65761014a565b806354d1f13d1161010757806354d1f13d146102365780635edb9eb014610240578063715018a61461026a578063730f9c57146102745780637b1039991461029057806384ae2bc6146102ba5761014a565b806313c8e2de1461014e578063256929621461018a5780632e75ab501461019457806339a51be5146101bc57806343bc42d3146101e657806346877b1a1461020e575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f91906122d2565b6104d2565b60405161018191906125c3565b60405180910390f35b6101926107ac565b005b34801561019f575f80fd5b506101ba60048036038101906101b591906122d2565b6107fd565b005b3480156101c7575f80fd5b506101d061080f565b6040516101dd91906125f2565b60405180910390f35b3480156101f1575f80fd5b5061020c60048036038101906102079190612635565b610834565b005b348015610219575f80fd5b50610234600480360381019061022f919061268a565b610867565b005b61023e6108b2565b005b34801561024b575f80fd5b506102546108eb565b60405161026191906126c4565b60405180910390f35b6102726108f6565b005b61028e6004803603810190610289919061273e565b610909565b005b34801561029b575f80fd5b506102a4610b9a565b6040516102b191906127f4565b60405180910390f35b3480156102c5575f80fd5b506102ce610bbf565b6040516102db919061281c565b60405180910390f35b3480156102ef575f80fd5b5061030a60048036038101906103059190612635565b610bd9565b005b348015610317575f80fd5b50610320610c0d565b60405161032d91906125f2565b60405180910390f35b610350600480360381019061034b9190612835565b610c35565b005b34801561035d575f80fd5b50610366610c4a565b60405161037391906126c4565b60405180910390f35b348015610387575f80fd5b50610390610c50565b60405161039d91906128d9565b60405180910390f35b3480156103b1575f80fd5b506103ba610c75565b6040516103c7919061281c565b60405180910390f35b3480156103db575f80fd5b506103e4610c8e565b6040516103f1919061281c565b60405180910390f35b348015610405575f80fd5b50610420600480360381019061041b91906128f2565b610c94565b60405161042d91906125c3565b60405180910390f35b348015610441575f80fd5b5061045c6004803603810190610457919061268a565b61164f565b005b6104786004803603810190610473919061268a565b61169a565b005b610494600480360381019061048f919061268a565b6116d8565b005b3480156104a1575f80fd5b506104bc60048036038101906104b7919061268a565b611701565b6040516104c991906126c4565b60405180910390f35b6104da612126565b5f82815481106104ed576104ec61293d565b5b905f5260205f209060080201604051806101200160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156106da57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610691575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016005820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b5f6107b561171a565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610805611724565b8060048190555050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61083c611724565b8060055f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b61086f611724565b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f8080549050905090565b6108fe611724565b6109075f61175b565b565b3068929eee149b4bd2126854036109275763ab143c065f526004601cfd5b3068929eee149b4bd21268555f8087815481106109475761094661293d565b5b905f5260205f20906008020190506004543410156109a2575f346004546040517f5c54305e0000000000000000000000000000000000000000000000000000000081526004016109999392919061296a565b60405180910390fd5b6109ac8186611821565b806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663703b690088888588886040518663ffffffff1660e01b8152600401610a109594939291906129f9565b6020604051808303815f875af1158015610a2c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a509190612a7a565b610a86576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806004018681548110610a9c57610a9b61293d565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb1757cf8386866040518463ffffffff1660e01b8152600401610b0093929190612aa5565b6020604051808303815f875af1158015610b1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b409190612a7a565b610b85578184846040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610b7c93929190612aa5565b60405180910390fd5b503868929eee149b4bd2126855505050505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560089054906101000a900467ffffffffffffffff1681565b610be1611724565b80600560086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b610c43858585858533610909565b5050505050565b60045481565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055f9054906101000a900467ffffffffffffffff1681565b61271081565b610c9c612126565b335f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015610d90575060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80826040518263ffffffff1660e01b8152600401610d4f91906125f2565b602060405180830381865afa158015610d6a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d8e9190612a7a565b155b15610dc7576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3068929eee149b4bd212685403610de55763ab143c065f526004601cfd5b3068929eee149b4bd21268555f610e3e85858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505061198f565b806020019051810190610e519190612f35565b9050610e5f815f0151611a28565b5f8060018160018154018082558091505003905f5260205f2090600802019050816101000151816007015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550815f0151816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160a0015160055f9054906101000a900467ffffffffffffffff16610f309190612fa9565b816005015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508160c00151600560089054906101000a900467ffffffffffffffff16610f7f9190612fa9565b8160050160086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508160e001518160060181905550610fe67fe67157950000000000000000000000000000000000000000000000000000000083602001516001611b03565b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110567fe2089f790000000000000000000000000000000000000000000000000000000083606001516001611b03565b816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110a88260800151835f0151611b25565b8160040190805190602001906110bf9291906121ec565b505f73ffffffffffffffffffffffffffffffffffffffff1682604001516020015173ffffffffffffffffffffffffffffffffffffffff16146111305761112b7f5912b89c0000000000000000000000000000000000000000000000000000000083604001516001611b03565b611219565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f5912b89c000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016111ab919061301e565b602060405180830381865afa1580156111c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111ea9190612a7a565b6111f4575f611218565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b5b816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16816007015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660015f805490506112de9190613037565b7f116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd8460040180549050856001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866002015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611383949392919061306a565b60405180910390a480604051806101200160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820180548060200260200160405190810160405280929190818152602001828054801561156d57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611524575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020016005820160089054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050935050503868929eee149b4bd21268555092915050565b611657611724565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6116a2611724565b63389a75e1600c52805f526020600c2080544211156116c857636f5e88185f526004601cfd5b5f8155506116d58161175b565b50565b6116e0611724565b8060601b6116f557637448fbae5f526004601cfd5b6116fe8161175b565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611759576382b429005f526004601cfd5b565b611763611eef565b156117c8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b821781555061181e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f600454031561198b575f60045490505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146118e7575f61271067ffffffffffffffff168460050160089054906101000a900467ffffffffffffffff1667ffffffffffffffff166004546118a291906130ad565b6118ac919061311b565b905080826118ba9190613037565b91506118e5818473ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b505b61193f6002826118f7919061311b565b846007015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b6119894760035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ef390919063ffffffff16565b505b5050565b6060815115611a235760405190506020810160048301805184518501811983525b80861015611a09576001860195508551601f1a806119f9576001870196508651601f1a5f198652607f81116119e757600181013887395b6001607f821601860195505050611a04565b808553600185019450505b6119b0565b81835260208501840385525f845260208401604052505050505b919050565b611a527fea5ad34e0000000000000000000000000000000000000000000000000000000082611f10565b8073ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80336040518263ffffffff1660e01b8152600401611a8b91906125f2565b602060405180830381865afa158015611aa6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aca9190612a7a565b611b00576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f611b12848460200151611f10565b611b1c8383612007565b90509392505050565b6060825167ffffffffffffffff811115611b4257611b41612ad9565b5b604051908082528060200260200182016040528015611b705781602001602082028036833780820191505090505b5090505f5b8351811015611ee857611bc67f5970a68900000000000000000000000000000000000000000000000000000000858381518110611bb557611bb461293d565b5b602002602001015160200151611f10565b838181518110611bd957611bd861293d565b5b60200260200101515f0151611c65577f5970a68900000000000000000000000000000000000000000000000000000000848281518110611c1c57611c1b61293d565b5b6020026020010151602001516040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401611c5c92919061314b565b60405180910390fd5b611caa7f5970a68900000000000000000000000000000000000000000000000000000000858381518110611c9c57611c9b61293d565b5b60200260200101515f611b03565b828281518110611cbd57611cbc61293d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f828281518110611d0b57611d0a61293d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16634e7165a2868481518110611d4157611d4061293d565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401611d6991906131b4565b5f60405180830381865afa158015611d83573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190611dab91906131d4565b90505f815114611e3c578373ffffffffffffffffffffffffffffffffffffffff1663fa4ca9b1826040518263ffffffff1660e01b8152600401611dee91906131b4565b6020604051808303815f875af1158015611e0a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e2e9190612a7a565b611e3b57611e3a61321b565b5b5b828281518110611e4f57611e4e61293d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663439fab91868481518110611e8557611e8461293d565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401611ead91906131b4565b5f604051808303815f87803b158015611ec4575f80fd5b505af1158015611ed6573d5f803e3d5ffd5b50505050508080600101915050611b75565b5092915050565b5f90565b5f385f3884865af1611f0c5763b12d13eb5f526004601cfd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611fbf57508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7836040518263ffffffff1660e01b8152600401611f7e919061301e565b602060405180830381865afa158015611f99573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fbd9190612a7a565b155b156120035781816040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401611ffa92919061314b565b60405180910390fd5b5050565b5f825f015161201a57826020015161203e565b61203d836020015173ffffffffffffffffffffffffffffffffffffffff166120c3565b5b9050825f0151801561204d5750815b156120bd578073ffffffffffffffffffffffffffffffffffffffff1663439fab9184604001516040518263ffffffff1660e01b815260040161208f91906131b4565b5f604051808303815f87803b1580156120a6575f80fd5b505af11580156120b8573d5f803e3d5ffd5b505050505b92915050565b5f6120ce5f836120d5565b9050919050565b5f6c5af43d3d93803e602a57fd5bf36021528160145273602c3d8160093d39f33d3d3d3d363d3d37363d735f526035600c84f090508061211c5763301164255f526004601cfd5b5f60215292915050565b6040518061012001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b828054828255905f5260205f20908101928215612262579160200282015b82811115612261578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061220a565b5b50905061226f9190612273565b5090565b5b8082111561228a575f815f905550600101612274565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6122b18161229f565b81146122bb575f80fd5b50565b5f813590506122cc816122a8565b92915050565b5f602082840312156122e7576122e6612297565b5b5f6122f4848285016122be565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61233f61233a612335846122fd565b61231c565b6122fd565b9050919050565b5f61235082612325565b9050919050565b5f61236182612346565b9050919050565b61237181612357565b82525050565b5f61238182612346565b9050919050565b61239181612377565b82525050565b5f6123a182612346565b9050919050565b6123b181612397565b82525050565b5f6123c182612325565b9050919050565b5f6123d2826123b7565b9050919050565b6123e2816123c8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f61241b82612346565b9050919050565b61242b81612411565b82525050565b5f61243c8383612422565b60208301905092915050565b5f602082019050919050565b5f61245e826123e8565b61246881856123f2565b935061247383612402565b805f5b838110156124a357815161248a8882612431565b975061249583612448565b925050600181019050612476565b5085935050505092915050565b5f67ffffffffffffffff82169050919050565b6124cc816124b0565b82525050565b6124db8161229f565b82525050565b5f6124eb826122fd565b9050919050565b6124fb816124e1565b82525050565b5f61012083015f8301516125175f860182612368565b50602083015161252a6020860182612388565b50604083015161253d60408601826123a8565b50606083015161255060608601826123d9565b50608083015184820360808601526125688282612454565b91505060a083015161257d60a08601826124c3565b5060c083015161259060c08601826124c3565b5060e08301516125a360e08601826124d2565b506101008301516125b86101008601826124f2565b508091505092915050565b5f6020820190508181035f8301526125db8184612501565b905092915050565b6125ec816124e1565b82525050565b5f6020820190506126055f8301846125e3565b92915050565b612614816124b0565b811461261e575f80fd5b50565b5f8135905061262f8161260b565b92915050565b5f6020828403121561264a57612649612297565b5b5f61265784828501612621565b91505092915050565b612669816124e1565b8114612673575f80fd5b50565b5f8135905061268481612660565b92915050565b5f6020828403121561269f5761269e612297565b5b5f6126ac84828501612676565b91505092915050565b6126be8161229f565b82525050565b5f6020820190506126d75f8301846126b5565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126126fe576126fd6126dd565b5b8235905067ffffffffffffffff81111561271b5761271a6126e1565b5b602083019150836001820283011115612737576127366126e5565b5b9250929050565b5f805f805f8060a0878903121561275857612757612297565b5b5f61276589828a016122be565b965050602061277689828a016122be565b955050604061278789828a01612676565b945050606087013567ffffffffffffffff8111156127a8576127a761229b565b5b6127b489828a016126e9565b935093505060806127c789828a01612676565b9150509295509295509295565b5f6127de82612346565b9050919050565b6127ee816127d4565b82525050565b5f6020820190506128075f8301846127e5565b92915050565b612816816124b0565b82525050565b5f60208201905061282f5f83018461280d565b92915050565b5f805f805f6080868803121561284e5761284d612297565b5b5f61285b888289016122be565b955050602061286c888289016122be565b945050604061287d88828901612676565b935050606086013567ffffffffffffffff81111561289e5761289d61229b565b5b6128aa888289016126e9565b92509250509295509295909350565b5f6128c382612346565b9050919050565b6128d3816128b9565b82525050565b5f6020820190506128ec5f8301846128ca565b92915050565b5f806020838503121561290857612907612297565b5b5f83013567ffffffffffffffff8111156129255761292461229b565b5b612931858286016126e9565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60608201905061297d5f8301866125e3565b61298a60208301856126b5565b61299760408301846126b5565b949350505050565b5f82825260208201905092915050565b828183375f83830152505050565b5f601f19601f8301169050919050565b5f6129d8838561299f565b93506129e58385846129af565b6129ee836129bd565b840190509392505050565b5f608082019050612a0c5f8301886126b5565b612a1960208301876126b5565b612a2660408301866125e3565b8181036060830152612a398184866129cd565b90509695505050505050565b5f8115159050919050565b612a5981612a45565b8114612a63575f80fd5b50565b5f81519050612a7481612a50565b92915050565b5f60208284031215612a8f57612a8e612297565b5b5f612a9c84828501612a66565b91505092915050565b5f604082019050612ab85f8301866125e3565b8181036020830152612acb8184866129cd565b9050949350505050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612b0f826129bd565b810181811067ffffffffffffffff82111715612b2e57612b2d612ad9565b5b80604052505050565b5f612b4061228e565b9050612b4c8282612b06565b919050565b5f80fd5b5f612b5f826122fd565b9050919050565b5f612b7082612b55565b9050919050565b612b8081612b66565b8114612b8a575f80fd5b50565b5f81519050612b9b81612b77565b92915050565b5f81519050612baf81612660565b92915050565b5f80fd5b5f67ffffffffffffffff821115612bd357612bd2612ad9565b5b612bdc826129bd565b9050602081019050919050565b8281835e5f83830152505050565b5f612c09612c0484612bb9565b612b37565b905082815260208101848484011115612c2557612c24612bb5565b5b612c30848285612be9565b509392505050565b5f82601f830112612c4c57612c4b6126dd565b5b8151612c5c848260208601612bf7565b91505092915050565b5f60608284031215612c7a57612c79612ad5565b5b612c846060612b37565b90505f612c9384828501612a66565b5f830152506020612ca684828501612ba1565b602083015250604082015167ffffffffffffffff811115612cca57612cc9612b51565b5b612cd684828501612c38565b60408301525092915050565b5f67ffffffffffffffff821115612cfc57612cfb612ad9565b5b602082029050602081019050919050565b5f612d1f612d1a84612ce2565b612b37565b90508083825260208201905060208402830185811115612d4257612d416126e5565b5b835b81811015612d8957805167ffffffffffffffff811115612d6757612d666126dd565b5b808601612d748982612c65565b85526020850194505050602081019050612d44565b5050509392505050565b5f82601f830112612da757612da66126dd565b5b8151612db7848260208601612d0d565b91505092915050565b5f81519050612dce8161260b565b92915050565b5f81519050612de2816122a8565b92915050565b5f6101208284031215612dfe57612dfd612ad5565b5b612e09610120612b37565b90505f612e1884828501612b8d565b5f83015250602082015167ffffffffffffffff811115612e3b57612e3a612b51565b5b612e4784828501612c65565b602083015250604082015167ffffffffffffffff811115612e6b57612e6a612b51565b5b612e7784828501612c65565b604083015250606082015167ffffffffffffffff811115612e9b57612e9a612b51565b5b612ea784828501612c65565b606083015250608082015167ffffffffffffffff811115612ecb57612eca612b51565b5b612ed784828501612d93565b60808301525060a0612eeb84828501612dc0565b60a08301525060c0612eff84828501612dc0565b60c08301525060e0612f1384828501612dd4565b60e083015250610100612f2884828501612ba1565b6101008301525092915050565b5f60208284031215612f4a57612f49612297565b5b5f82015167ffffffffffffffff811115612f6757612f6661229b565b5b612f7384828501612de8565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612fb3826124b0565b9150612fbe836124b0565b9250828201905067ffffffffffffffff811115612fde57612fdd612f7c565b5b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61301881612fe4565b82525050565b5f6020820190506130315f83018461300f565b92915050565b5f6130418261229f565b915061304c8361229f565b925082820390508181111561306457613063612f7c565b5b92915050565b5f60808201905061307d5f8301876126b5565b61308a60208301866125e3565b61309760408301856125e3565b6130a460608301846125e3565b95945050505050565b5f6130b78261229f565b91506130c28361229f565b92508282026130d08161229f565b915082820484148315176130e7576130e6612f7c565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6131258261229f565b91506131308361229f565b9250826131405761313f6130ee565b5b828204905092915050565b5f60408201905061315e5f83018561300f565b61316b60208301846125e3565b9392505050565b5f81519050919050565b5f61318682613172565b613190818561299f565b93506131a0818560208601612be9565b6131a9816129bd565b840191505092915050565b5f6020820190508181035f8301526131cc818461317c565b905092915050565b5f602082840312156131e9576131e8612297565b5b5f82015167ffffffffffffffff8111156132065761320561229b565b5b61321284828501612c38565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52600160045260245ffdfea2646970667358221220fb22934e0d9f7a8e32d07cd1f2621ea36204627afface45e5bc80aab6122bb7d64736f6c634300081a0033";
|
|
25
|
+
function M(b) {
|
|
26
|
+
const e = b.state.current, f = b.state.connections.get(e), a = f == null ? void 0 : f.accounts, s = a == null ? void 0 : a[0], t = b.chains.find((d) => d.id === (f == null ? void 0 : f.chainId)), c = b.state.status;
|
|
27
|
+
switch (c) {
|
|
28
|
+
case "connected":
|
|
29
|
+
return {
|
|
30
|
+
address: s,
|
|
31
|
+
addresses: a,
|
|
32
|
+
chain: t,
|
|
33
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
34
|
+
connector: f == null ? void 0 : f.connector,
|
|
35
|
+
isConnected: !0,
|
|
36
|
+
isConnecting: !1,
|
|
37
|
+
isDisconnected: !1,
|
|
38
|
+
isReconnecting: !1,
|
|
39
|
+
status: c
|
|
40
|
+
};
|
|
41
|
+
case "reconnecting":
|
|
42
|
+
return {
|
|
43
|
+
address: s,
|
|
44
|
+
addresses: a,
|
|
45
|
+
chain: t,
|
|
46
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
47
|
+
connector: f == null ? void 0 : f.connector,
|
|
48
|
+
isConnected: !!s,
|
|
49
|
+
isConnecting: !1,
|
|
50
|
+
isDisconnected: !1,
|
|
51
|
+
isReconnecting: !0,
|
|
52
|
+
status: c
|
|
53
|
+
};
|
|
54
|
+
case "connecting":
|
|
55
|
+
return {
|
|
56
|
+
address: s,
|
|
57
|
+
addresses: a,
|
|
58
|
+
chain: t,
|
|
59
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
60
|
+
connector: f == null ? void 0 : f.connector,
|
|
61
|
+
isConnected: !1,
|
|
62
|
+
isConnecting: !0,
|
|
63
|
+
isDisconnected: !1,
|
|
64
|
+
isReconnecting: !1,
|
|
65
|
+
status: c
|
|
66
|
+
};
|
|
67
|
+
case "disconnected":
|
|
68
|
+
return {
|
|
69
|
+
address: void 0,
|
|
70
|
+
addresses: void 0,
|
|
71
|
+
chain: void 0,
|
|
72
|
+
chainId: void 0,
|
|
73
|
+
connector: void 0,
|
|
74
|
+
isConnected: !1,
|
|
75
|
+
isConnecting: !1,
|
|
76
|
+
isDisconnected: !0,
|
|
77
|
+
isReconnecting: !1,
|
|
78
|
+
status: c
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function zf(b) {
|
|
83
|
+
return b.state.chainId;
|
|
84
|
+
}
|
|
85
|
+
function N(b, e, f) {
|
|
86
|
+
const a = b[e.name];
|
|
87
|
+
if (typeof a == "function")
|
|
88
|
+
return a;
|
|
89
|
+
const s = b[f];
|
|
90
|
+
return typeof s == "function" ? s : (t) => e(b, t);
|
|
91
|
+
}
|
|
92
|
+
const Tf = "2.13.0", kf = () => `@wagmi/core@${Tf}`;
|
|
93
|
+
var O = function(b, e, f, a) {
|
|
94
|
+
if (f === "a" && !a)
|
|
95
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
96
|
+
if (typeof e == "function" ? b !== e || !a : !e.has(b))
|
|
97
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
98
|
+
return f === "m" ? a : f === "a" ? a.call(b) : a ? a.value : e.get(b);
|
|
99
|
+
}, B, S;
|
|
100
|
+
class p extends Error {
|
|
101
|
+
get docsBaseUrl() {
|
|
102
|
+
return "https://wagmi.sh/core";
|
|
103
|
+
}
|
|
104
|
+
get version() {
|
|
105
|
+
return kf();
|
|
106
|
+
}
|
|
107
|
+
constructor(e, f = {}) {
|
|
108
|
+
var t;
|
|
109
|
+
super(), B.add(this), Object.defineProperty(this, "details", {
|
|
110
|
+
enumerable: !0,
|
|
111
|
+
configurable: !0,
|
|
112
|
+
writable: !0,
|
|
113
|
+
value: void 0
|
|
114
|
+
}), Object.defineProperty(this, "docsPath", {
|
|
115
|
+
enumerable: !0,
|
|
116
|
+
configurable: !0,
|
|
117
|
+
writable: !0,
|
|
118
|
+
value: void 0
|
|
119
|
+
}), Object.defineProperty(this, "metaMessages", {
|
|
120
|
+
enumerable: !0,
|
|
121
|
+
configurable: !0,
|
|
122
|
+
writable: !0,
|
|
123
|
+
value: void 0
|
|
124
|
+
}), Object.defineProperty(this, "shortMessage", {
|
|
125
|
+
enumerable: !0,
|
|
126
|
+
configurable: !0,
|
|
127
|
+
writable: !0,
|
|
128
|
+
value: void 0
|
|
129
|
+
}), Object.defineProperty(this, "name", {
|
|
130
|
+
enumerable: !0,
|
|
131
|
+
configurable: !0,
|
|
132
|
+
writable: !0,
|
|
133
|
+
value: "WagmiCoreError"
|
|
134
|
+
});
|
|
135
|
+
const a = f.cause instanceof p ? f.cause.details : (t = f.cause) != null && t.message ? f.cause.message : f.details, s = f.cause instanceof p && f.cause.docsPath || f.docsPath;
|
|
136
|
+
this.message = [
|
|
137
|
+
e || "An error occurred.",
|
|
138
|
+
"",
|
|
139
|
+
...f.metaMessages ? [...f.metaMessages, ""] : [],
|
|
140
|
+
...s ? [
|
|
141
|
+
`Docs: ${this.docsBaseUrl}${s}.html${f.docsSlug ? `#${f.docsSlug}` : ""}`
|
|
142
|
+
] : [],
|
|
143
|
+
...a ? [`Details: ${a}`] : [],
|
|
144
|
+
`Version: ${this.version}`
|
|
145
|
+
].join(`
|
|
146
|
+
`), f.cause && (this.cause = f.cause), this.details = a, this.docsPath = s, this.metaMessages = f.metaMessages, this.shortMessage = e;
|
|
147
|
+
}
|
|
148
|
+
walk(e) {
|
|
149
|
+
return O(this, B, "m", S).call(this, this, e);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
B = /* @__PURE__ */ new WeakSet(), S = function b(e, f) {
|
|
153
|
+
return f != null && f(e) ? e : e.cause ? O(this, B, "m", b).call(this, e.cause, f) : e;
|
|
154
|
+
};
|
|
155
|
+
class Gf extends p {
|
|
156
|
+
constructor() {
|
|
157
|
+
super("Connector not connected."), Object.defineProperty(this, "name", {
|
|
158
|
+
enumerable: !0,
|
|
159
|
+
configurable: !0,
|
|
160
|
+
writable: !0,
|
|
161
|
+
value: "ConnectorNotConnectedError"
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
class Uf extends p {
|
|
166
|
+
constructor({ address: e, connector: f }) {
|
|
167
|
+
super(`Account "${e}" not found for connector "${f.name}".`), Object.defineProperty(this, "name", {
|
|
168
|
+
enumerable: !0,
|
|
169
|
+
configurable: !0,
|
|
170
|
+
writable: !0,
|
|
171
|
+
value: "ConnectorAccountNotFoundError"
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
class Wf extends p {
|
|
176
|
+
constructor({ connectionChainId: e, connectorChainId: f }) {
|
|
177
|
+
super(`The current chain of the connector (id: ${f}) does not match the connection's chain (id: ${e}).`, {
|
|
178
|
+
metaMessages: [
|
|
179
|
+
`Current Chain ID: ${f}`,
|
|
180
|
+
`Expected Chain ID: ${e}`
|
|
181
|
+
]
|
|
182
|
+
}), Object.defineProperty(this, "name", {
|
|
183
|
+
enumerable: !0,
|
|
184
|
+
configurable: !0,
|
|
185
|
+
writable: !0,
|
|
186
|
+
value: "ConnectorChainMismatchError"
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function j(b, e = {}) {
|
|
191
|
+
let f;
|
|
192
|
+
if (e.connector) {
|
|
193
|
+
const { connector: n } = e, [u, g] = await Promise.all([
|
|
194
|
+
n.getAccounts(),
|
|
195
|
+
n.getChainId()
|
|
196
|
+
]);
|
|
197
|
+
f = {
|
|
198
|
+
accounts: u,
|
|
199
|
+
chainId: g,
|
|
200
|
+
connector: n
|
|
201
|
+
};
|
|
202
|
+
} else
|
|
203
|
+
f = b.state.connections.get(b.state.current);
|
|
204
|
+
if (!f)
|
|
205
|
+
throw new Gf();
|
|
206
|
+
const a = e.chainId ?? f.chainId, s = await f.connector.getChainId();
|
|
207
|
+
if (s !== f.chainId)
|
|
208
|
+
throw new Wf({
|
|
209
|
+
connectionChainId: f.chainId,
|
|
210
|
+
connectorChainId: s
|
|
211
|
+
});
|
|
212
|
+
const t = f.connector;
|
|
213
|
+
if (t.getClient)
|
|
214
|
+
return t.getClient({ chainId: a });
|
|
215
|
+
const c = Sf(e.account ?? f.accounts[0]);
|
|
216
|
+
c.address = jf(c.address);
|
|
217
|
+
const d = b.chains.find((n) => n.id === a), r = await f.connector.getProvider({ chainId: a });
|
|
218
|
+
if (e.account && !f.accounts.some((n) => n.toLowerCase() === c.address.toLowerCase()))
|
|
219
|
+
throw new Uf({
|
|
220
|
+
address: c.address,
|
|
221
|
+
connector: t
|
|
222
|
+
});
|
|
223
|
+
return df({
|
|
224
|
+
account: c,
|
|
225
|
+
chain: d,
|
|
226
|
+
name: "Connector Client",
|
|
227
|
+
transport: (n) => rf(r)({ ...n, retryCount: 0 })
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
async function Hf(b, e) {
|
|
231
|
+
const { abi: f, chainId: a, connector: s, ...t } = e;
|
|
232
|
+
let c;
|
|
233
|
+
e.account ? c = e.account : c = (await j(b, {
|
|
234
|
+
chainId: a,
|
|
235
|
+
connector: s
|
|
236
|
+
})).account;
|
|
237
|
+
const d = b.getClient({ chainId: a }), r = N(d, Nf, "simulateContract"), { result: n, request: u } = await r({ ...t, abi: f, account: c });
|
|
238
|
+
return {
|
|
239
|
+
chainId: d.chain.id,
|
|
240
|
+
result: n,
|
|
241
|
+
request: { __mode: "prepared", ...u, chainId: a }
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
async function x(b, e) {
|
|
245
|
+
const { account: f, chainId: a, connector: s, __mode: t, ...c } = e;
|
|
246
|
+
let d;
|
|
247
|
+
typeof f == "object" && f.type === "local" ? d = b.getClient({ chainId: a }) : d = await j(b, { account: f, chainId: a, connector: s });
|
|
248
|
+
const { connector: r } = M(b);
|
|
249
|
+
let n;
|
|
250
|
+
if (t === "prepared" || r != null && r.supportsSimulation)
|
|
251
|
+
n = c;
|
|
252
|
+
else {
|
|
253
|
+
const { request: A } = await Hf(b, {
|
|
254
|
+
...c,
|
|
255
|
+
account: f,
|
|
256
|
+
chainId: a
|
|
257
|
+
});
|
|
258
|
+
n = A;
|
|
259
|
+
}
|
|
260
|
+
return await N(d, Of, "writeContract")({
|
|
261
|
+
...n,
|
|
262
|
+
...f ? { account: f } : {},
|
|
263
|
+
chain: a ? { id: a } : null
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function Qf(b) {
|
|
267
|
+
return b.address !== void 0 && typeof b.address == "object" ? (e, f) => {
|
|
268
|
+
var c;
|
|
269
|
+
const a = zf(e), s = M(e);
|
|
270
|
+
let t;
|
|
271
|
+
return f.chainId ? t = f.chainId : f.account && f.account === s.address || f.account === void 0 ? t = s.chainId : t = a, x(e, {
|
|
272
|
+
...f,
|
|
273
|
+
...b.functionName ? { functionName: b.functionName } : {},
|
|
274
|
+
address: t ? (c = b.address) == null ? void 0 : c[t] : void 0,
|
|
275
|
+
abi: b.abi
|
|
276
|
+
});
|
|
277
|
+
} : (e, f) => x(e, {
|
|
278
|
+
...f,
|
|
279
|
+
...b.address ? { address: b.address } : {},
|
|
280
|
+
...b.functionName ? { functionName: b.functionName } : {},
|
|
281
|
+
abi: b.abi
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
const C0 = of("0.000075"), Jf = "0x0561e8fB1EFD614eb905CB93D548Bb217Ad07B92";
|
|
285
|
+
function Kf(b) {
|
|
286
|
+
return b.address;
|
|
287
|
+
}
|
|
288
|
+
function Xf(b) {
|
|
289
|
+
return b.registryAddress && b.protocolFeeReceiver;
|
|
290
|
+
}
|
|
291
|
+
class v0 extends vf {
|
|
292
|
+
/**
|
|
293
|
+
* Creates an instance of BoostCore.
|
|
294
|
+
*
|
|
295
|
+
* @constructor
|
|
296
|
+
* @param {BoostCoreConfig} param0
|
|
297
|
+
* @param {Config} param0.config
|
|
298
|
+
* @param {?Account} [param0.account]
|
|
299
|
+
* @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; })} param0....options
|
|
300
|
+
*/
|
|
301
|
+
constructor({ config: e, account: f, ...a }) {
|
|
302
|
+
Kf(a) && a.address ? super({ account: f, config: e }, a.address) : Xf(a) ? super({ account: f, config: e }, [
|
|
303
|
+
a.registryAddress,
|
|
304
|
+
a.protocolFeeReceiver
|
|
305
|
+
]) : super({ account: f, config: e }, Jf), this.abi = P;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Create a new Boost.
|
|
309
|
+
*
|
|
310
|
+
* @public
|
|
311
|
+
* @async
|
|
312
|
+
* @param {CreateBoostPayload} _boostPayload
|
|
313
|
+
* @param {?DeployableOptions} [_options]
|
|
314
|
+
* @returns {Boost}
|
|
315
|
+
*/
|
|
316
|
+
async createBoost(e, f) {
|
|
317
|
+
var L;
|
|
318
|
+
const a = this.assertValidAddress(), [s, t] = this.validateDeploymentConfig(
|
|
319
|
+
e,
|
|
320
|
+
f
|
|
321
|
+
);
|
|
322
|
+
let {
|
|
323
|
+
budget: c,
|
|
324
|
+
action: d,
|
|
325
|
+
validator: r,
|
|
326
|
+
allowList: n,
|
|
327
|
+
incentives: u,
|
|
328
|
+
protocolFee: g = 0n,
|
|
329
|
+
referralFee: A = 0n,
|
|
330
|
+
maxParticipants: R = 0n,
|
|
331
|
+
owner: m
|
|
332
|
+
} = s;
|
|
333
|
+
const F = Qf({
|
|
334
|
+
abi: P,
|
|
335
|
+
functionName: "createBoost",
|
|
336
|
+
address: this.address
|
|
337
|
+
});
|
|
338
|
+
if (!m && (m = ((L = this._account) == null ? void 0 : L.address) || cf(t.config).address || w, m === w))
|
|
339
|
+
throw new Vf();
|
|
340
|
+
let V = w;
|
|
341
|
+
if (c.address) {
|
|
342
|
+
if (V = c.address, !await c.isAuthorized(a))
|
|
343
|
+
throw new Lf(a);
|
|
344
|
+
} else
|
|
345
|
+
throw new $f();
|
|
346
|
+
let y = {
|
|
347
|
+
instance: w,
|
|
348
|
+
isBase: !0,
|
|
349
|
+
parameters: o
|
|
350
|
+
};
|
|
351
|
+
if (d.address) {
|
|
352
|
+
const i = d.address === d.base || d.isBase;
|
|
353
|
+
y = {
|
|
354
|
+
isBase: i,
|
|
355
|
+
instance: d.address,
|
|
356
|
+
parameters: i ? d.buildParameters(void 0, t).args.at(0) || o : o
|
|
357
|
+
};
|
|
358
|
+
} else
|
|
359
|
+
y.parameters = d.buildParameters(void 0, t).args.at(0) || o, y.instance = d.base;
|
|
360
|
+
let C = {
|
|
361
|
+
instance: w,
|
|
362
|
+
isBase: !0,
|
|
363
|
+
parameters: o
|
|
364
|
+
};
|
|
365
|
+
if (r.address) {
|
|
366
|
+
const i = r.address === r.base || r.isBase;
|
|
367
|
+
C = {
|
|
368
|
+
isBase: i,
|
|
369
|
+
instance: r.address,
|
|
370
|
+
parameters: i ? r.buildParameters(
|
|
371
|
+
{
|
|
372
|
+
signers: [m],
|
|
373
|
+
validatorCaller: a
|
|
374
|
+
},
|
|
375
|
+
t
|
|
376
|
+
).args.at(0) || o : o
|
|
377
|
+
};
|
|
378
|
+
} else
|
|
379
|
+
C.parameters = r.buildParameters(
|
|
380
|
+
{
|
|
381
|
+
signers: [m],
|
|
382
|
+
validatorCaller: a
|
|
383
|
+
},
|
|
384
|
+
t
|
|
385
|
+
).args.at(0) || o, C.instance = r.base;
|
|
386
|
+
let v = {
|
|
387
|
+
instance: w,
|
|
388
|
+
isBase: !0,
|
|
389
|
+
parameters: o
|
|
390
|
+
};
|
|
391
|
+
if (n.address) {
|
|
392
|
+
const i = n.address === n.base || n.isBase;
|
|
393
|
+
v = {
|
|
394
|
+
isBase: i,
|
|
395
|
+
instance: n.address,
|
|
396
|
+
parameters: i ? o : o
|
|
397
|
+
};
|
|
398
|
+
} else
|
|
399
|
+
v.parameters = n.buildParameters(void 0, t).args.at(0) || o, v.instance = n.base;
|
|
400
|
+
let _ = u.map(() => ({
|
|
401
|
+
instance: w,
|
|
402
|
+
isBase: !0,
|
|
403
|
+
parameters: o
|
|
404
|
+
}));
|
|
405
|
+
for (let i = 0; i < u.length; i++) {
|
|
406
|
+
const l = u.at(i);
|
|
407
|
+
if (l.address) {
|
|
408
|
+
const D = l.address === l.base || l.isBase;
|
|
409
|
+
if (!D)
|
|
410
|
+
throw new xf(l);
|
|
411
|
+
_[i] = {
|
|
412
|
+
isBase: D,
|
|
413
|
+
instance: l.address,
|
|
414
|
+
parameters: D ? l.buildParameters(void 0, t).args.at(0) || o : o
|
|
415
|
+
};
|
|
416
|
+
} else
|
|
417
|
+
_[i].parameters = l.buildParameters(void 0, t).args.at(0) || o, _[i].instance = l.base;
|
|
418
|
+
}
|
|
419
|
+
const q = {
|
|
420
|
+
budget: V,
|
|
421
|
+
action: y,
|
|
422
|
+
validator: C,
|
|
423
|
+
allowList: v,
|
|
424
|
+
incentives: _,
|
|
425
|
+
protocolFee: g,
|
|
426
|
+
referralFee: A,
|
|
427
|
+
maxParticipants: R,
|
|
428
|
+
owner: m
|
|
429
|
+
}, z = await F(t.config, {
|
|
430
|
+
args: [Af(q)],
|
|
431
|
+
...this.optionallyAttachAccount(t.account)
|
|
432
|
+
}), T = await nf(t.config, {
|
|
433
|
+
hash: z
|
|
434
|
+
}), I = uf({
|
|
435
|
+
abi: P,
|
|
436
|
+
eventName: "BoostCreated",
|
|
437
|
+
logs: T.logs
|
|
438
|
+
}).at(0);
|
|
439
|
+
let E = 0n;
|
|
440
|
+
if (!I)
|
|
441
|
+
throw new Mf();
|
|
442
|
+
E = I == null ? void 0 : I.args.boostIndex;
|
|
443
|
+
const h = await this.readBoost(E);
|
|
444
|
+
return new $({
|
|
445
|
+
id: E,
|
|
446
|
+
budget: c.at(h.budget),
|
|
447
|
+
action: d.at(h.action),
|
|
448
|
+
validator: r.at(h.validator),
|
|
449
|
+
allowList: n.at(h.allowList),
|
|
450
|
+
incentives: u.map(
|
|
451
|
+
(i, l) => (
|
|
452
|
+
// biome-ignore lint/style/noNonNullAssertion: this will never be undefined
|
|
453
|
+
i.at(h.incentives.at(l))
|
|
454
|
+
)
|
|
455
|
+
),
|
|
456
|
+
protocolFee: h.protocolFee,
|
|
457
|
+
referralFee: h.referralFee,
|
|
458
|
+
maxParticipants: h.maxParticipants,
|
|
459
|
+
owner: h.owner
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Claims one incentive from a given `Boost` by `boostId` and `incentiveId`
|
|
464
|
+
*
|
|
465
|
+
* @public
|
|
466
|
+
* @async
|
|
467
|
+
* @param {bigint} boostId
|
|
468
|
+
* @param {bigint} incentiveId
|
|
469
|
+
* @param {Address} address
|
|
470
|
+
* @param {Hex} data
|
|
471
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]
|
|
472
|
+
* @returns {unknown}
|
|
473
|
+
*/
|
|
474
|
+
async claimIncentive(e, f, a, s, t) {
|
|
475
|
+
return await this.awaitResult(
|
|
476
|
+
this.claimIncentiveRaw(e, f, a, s, t)
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Claim an incentive for a Boost
|
|
481
|
+
*
|
|
482
|
+
* @public
|
|
483
|
+
* @async
|
|
484
|
+
* @param {bigint} boostId - The ID of the Boost
|
|
485
|
+
* @param {bigint} incentiveId - The ID of the Incentive
|
|
486
|
+
* @param {Address} referrer - The address of the referrer (if any)
|
|
487
|
+
* @param {Hex} data- The data for the claim
|
|
488
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'claimIncentive'>} [params]
|
|
489
|
+
* @returns {unknown}
|
|
490
|
+
*/
|
|
491
|
+
async claimIncentiveRaw(e, f, a, s, t) {
|
|
492
|
+
const { request: c, result: d } = await k(
|
|
493
|
+
this._config,
|
|
494
|
+
{
|
|
495
|
+
address: this.assertValidAddress(),
|
|
496
|
+
args: [e, f, a, s],
|
|
497
|
+
...this.optionallyAttachAccount(),
|
|
498
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
499
|
+
...t
|
|
500
|
+
}
|
|
501
|
+
);
|
|
502
|
+
return { hash: await G(this._config, c), result: d };
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`
|
|
506
|
+
*
|
|
507
|
+
* @public
|
|
508
|
+
* @async
|
|
509
|
+
* @param {bigint} boostId
|
|
510
|
+
* @param {bigint} incentiveId
|
|
511
|
+
* @param {Address} referrer
|
|
512
|
+
* @param {Hex} data
|
|
513
|
+
* @param {Address} claimant
|
|
514
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]
|
|
515
|
+
* @returns {unknown}
|
|
516
|
+
*/
|
|
517
|
+
async claimIncentiveFor(e, f, a, s, t, c) {
|
|
518
|
+
return await this.awaitResult(
|
|
519
|
+
this.claimIncentiveForRaw(
|
|
520
|
+
e,
|
|
521
|
+
f,
|
|
522
|
+
a,
|
|
523
|
+
s,
|
|
524
|
+
t,
|
|
525
|
+
c
|
|
526
|
+
)
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Claim an incentive for a Boost on behalf of another user
|
|
531
|
+
*
|
|
532
|
+
* @public
|
|
533
|
+
* @async
|
|
534
|
+
* @param {bigint} boostId - The ID of the Boost
|
|
535
|
+
* @param {bigint} incentiveId - The ID of the Incentive
|
|
536
|
+
* @param {Address} referrer - The address of the referrer (if any)
|
|
537
|
+
* @param {Hex} data - The data for the claim
|
|
538
|
+
* @param {Address} claimant - The address of the user eligible for the incentive payout
|
|
539
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'claimIncentiveFor'>} [params]
|
|
540
|
+
* @returns {unknown}
|
|
541
|
+
*/
|
|
542
|
+
async claimIncentiveForRaw(e, f, a, s, t, c) {
|
|
543
|
+
const { request: d, result: r } = await U(
|
|
544
|
+
this._config,
|
|
545
|
+
{
|
|
546
|
+
address: this.assertValidAddress(),
|
|
547
|
+
args: [e, f, a, s, t],
|
|
548
|
+
...this.optionallyAttachAccount(),
|
|
549
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
550
|
+
...c
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
return { hash: await W(this._config, d), result: r };
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Get a Boost by index, will return the raw on chain representation of a Boost.
|
|
557
|
+
*
|
|
558
|
+
* @public
|
|
559
|
+
* @async
|
|
560
|
+
* @param {bigint} id
|
|
561
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]
|
|
562
|
+
* @returns {unknown}
|
|
563
|
+
*/
|
|
564
|
+
async readBoost(e, f) {
|
|
565
|
+
return await H(this._config, {
|
|
566
|
+
address: this.assertValidAddress(),
|
|
567
|
+
args: [e],
|
|
568
|
+
...this.optionallyAttachAccount(),
|
|
569
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
570
|
+
...f
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`
|
|
575
|
+
*
|
|
576
|
+
* @public
|
|
577
|
+
* @async
|
|
578
|
+
* @param {(string | bigint)} _id
|
|
579
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'getBoost'>} [params]
|
|
580
|
+
* @returns {unknown}
|
|
581
|
+
*/
|
|
582
|
+
async getBoost(e, f) {
|
|
583
|
+
let a;
|
|
584
|
+
typeof e == "string" ? a = BigInt(e) : a = e;
|
|
585
|
+
const {
|
|
586
|
+
protocolFee: s,
|
|
587
|
+
referralFee: t,
|
|
588
|
+
maxParticipants: c,
|
|
589
|
+
owner: d,
|
|
590
|
+
...r
|
|
591
|
+
} = await this.readBoost(a, f), n = {
|
|
592
|
+
config: this._config,
|
|
593
|
+
account: this._account
|
|
594
|
+
}, [u, g, A, R, m] = await Promise.all([
|
|
595
|
+
lf(n, r.action),
|
|
596
|
+
yf(n, r.budget),
|
|
597
|
+
Df(n, r.validator),
|
|
598
|
+
mf(n, r.allowList),
|
|
599
|
+
Promise.all(
|
|
600
|
+
r.incentives.map(
|
|
601
|
+
(F) => Bf(n, F)
|
|
602
|
+
)
|
|
603
|
+
)
|
|
604
|
+
]);
|
|
605
|
+
return new $({
|
|
606
|
+
id: a,
|
|
607
|
+
action: u,
|
|
608
|
+
budget: g,
|
|
609
|
+
validator: A,
|
|
610
|
+
allowList: R,
|
|
611
|
+
incentives: m,
|
|
612
|
+
protocolFee: s,
|
|
613
|
+
referralFee: t,
|
|
614
|
+
maxParticipants: c,
|
|
615
|
+
owner: d
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Retrieve the total number of deployed Boosts
|
|
620
|
+
*
|
|
621
|
+
* @public
|
|
622
|
+
* @async
|
|
623
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'getBoostCount'>} [params]
|
|
624
|
+
* @returns {Promise<bigint>}
|
|
625
|
+
*/
|
|
626
|
+
async getBoostCount(e) {
|
|
627
|
+
return await Q(this._config, {
|
|
628
|
+
address: this.assertValidAddress(),
|
|
629
|
+
args: [],
|
|
630
|
+
...this.optionallyAttachAccount(),
|
|
631
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
632
|
+
...e
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Checks if an address is authorized
|
|
637
|
+
*
|
|
638
|
+
* @public
|
|
639
|
+
* @async
|
|
640
|
+
* @param {Address} address
|
|
641
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &
|
|
642
|
+
* ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
|
|
643
|
+
* @returns {Promise<boolean>}
|
|
644
|
+
*/
|
|
645
|
+
async isAuthorized(e, f) {
|
|
646
|
+
const a = await this.createBoostAuth();
|
|
647
|
+
return J(this._config, {
|
|
648
|
+
address: a,
|
|
649
|
+
args: [e],
|
|
650
|
+
...this.optionallyAttachAccount(),
|
|
651
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
652
|
+
...f
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Retrieve the address of the current creation auth provider.
|
|
657
|
+
*
|
|
658
|
+
* @public
|
|
659
|
+
* @async
|
|
660
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'createBoostAuth'>} [params]
|
|
661
|
+
* @returns {unknown}
|
|
662
|
+
*/
|
|
663
|
+
async createBoostAuth(e) {
|
|
664
|
+
return await K(this._config, {
|
|
665
|
+
address: this.assertValidAddress(),
|
|
666
|
+
args: [],
|
|
667
|
+
...this.optionallyAttachAccount(),
|
|
668
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
669
|
+
...e
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Replace the current auth scheme.
|
|
674
|
+
*
|
|
675
|
+
* @public
|
|
676
|
+
* @async
|
|
677
|
+
* @param {Auth} auth
|
|
678
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]
|
|
679
|
+
* @returns {unknown}
|
|
680
|
+
*/
|
|
681
|
+
async setCreateBoostAuth(e, f) {
|
|
682
|
+
return await this.awaitResult(
|
|
683
|
+
this.setCreateBoostAuthRaw(e.assertValidAddress(), {
|
|
684
|
+
...f
|
|
685
|
+
})
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Set the createBoostAuth address
|
|
690
|
+
*
|
|
691
|
+
* @public
|
|
692
|
+
* @async
|
|
693
|
+
* @param {Address} address
|
|
694
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>} [params]
|
|
695
|
+
* @returns {unknown}
|
|
696
|
+
*/
|
|
697
|
+
async setCreateBoostAuthRaw(e, f) {
|
|
698
|
+
const { request: a, result: s } = await X(
|
|
699
|
+
this._config,
|
|
700
|
+
{
|
|
701
|
+
address: this.assertValidAddress(),
|
|
702
|
+
args: [e],
|
|
703
|
+
...this.optionallyAttachAccount(),
|
|
704
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
705
|
+
...f
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
return { hash: await Y(this._config, a), result: s };
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Get the protocol fee.
|
|
712
|
+
*
|
|
713
|
+
* @public
|
|
714
|
+
* @async
|
|
715
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'protocolFee'>} [params]
|
|
716
|
+
* @returns {unknown}
|
|
717
|
+
*/
|
|
718
|
+
async protocolFee(e) {
|
|
719
|
+
return await Z(this._config, {
|
|
720
|
+
address: this.assertValidAddress(),
|
|
721
|
+
args: [],
|
|
722
|
+
...this.optionallyAttachAccount(),
|
|
723
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
724
|
+
...e
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Get the protocol fee receiver.
|
|
729
|
+
*
|
|
730
|
+
* @public
|
|
731
|
+
* @async
|
|
732
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>} [params]
|
|
733
|
+
* @returns {unknown}
|
|
734
|
+
*/
|
|
735
|
+
async protocolFeeReceiver(e) {
|
|
736
|
+
return await ff(this._config, {
|
|
737
|
+
address: this.assertValidAddress(),
|
|
738
|
+
args: [],
|
|
739
|
+
...this.optionallyAttachAccount(),
|
|
740
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
741
|
+
...e
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Set the protocol fee receiver address. This function is only callable by the owner.
|
|
746
|
+
*
|
|
747
|
+
* @public
|
|
748
|
+
* @async
|
|
749
|
+
* @param {Address} address
|
|
750
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]
|
|
751
|
+
* @returns {unknown}
|
|
752
|
+
*/
|
|
753
|
+
async setProcolFeeReceiver(e, f) {
|
|
754
|
+
return await this.awaitResult(
|
|
755
|
+
this.setProcolFeeReceiverRaw(e, {
|
|
756
|
+
...f
|
|
757
|
+
})
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Set the protocol fee receiver address. This function is only callable by the owner.
|
|
762
|
+
*
|
|
763
|
+
* @public
|
|
764
|
+
* @async
|
|
765
|
+
* @param {Address} address
|
|
766
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>} [params]
|
|
767
|
+
* @returns {unknown}
|
|
768
|
+
*/
|
|
769
|
+
async setProcolFeeReceiverRaw(e, f) {
|
|
770
|
+
const { request: a, result: s } = await ef(
|
|
771
|
+
this._config,
|
|
772
|
+
{
|
|
773
|
+
address: this.assertValidAddress(),
|
|
774
|
+
args: [e],
|
|
775
|
+
...this.optionallyAttachAccount(),
|
|
776
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
777
|
+
...f
|
|
778
|
+
}
|
|
779
|
+
);
|
|
780
|
+
return { hash: await af(
|
|
781
|
+
this._config,
|
|
782
|
+
a
|
|
783
|
+
), result: s };
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Get the claim fee.
|
|
787
|
+
*
|
|
788
|
+
* @public
|
|
789
|
+
* @async
|
|
790
|
+
* @param {?ReadParams<typeof boostCoreAbi, 'claimFee'>} [params]
|
|
791
|
+
* @returns {unknown}
|
|
792
|
+
*/
|
|
793
|
+
async claimFee(e) {
|
|
794
|
+
return await bf(this._config, {
|
|
795
|
+
address: this.assertValidAddress(),
|
|
796
|
+
args: [],
|
|
797
|
+
...this.optionallyAttachAccount(),
|
|
798
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
799
|
+
...e
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Sets the claim fee.
|
|
804
|
+
*
|
|
805
|
+
* @public
|
|
806
|
+
* @async
|
|
807
|
+
* @param {bigint} claimFee
|
|
808
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]
|
|
809
|
+
* @returns {unknown}
|
|
810
|
+
*/
|
|
811
|
+
async setClaimFee(e, f) {
|
|
812
|
+
return await this.awaitResult(this.setClaimFeeRaw(e, f));
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Sets the claim fee.
|
|
816
|
+
*
|
|
817
|
+
* @public
|
|
818
|
+
* @async
|
|
819
|
+
* @param {bigint} claimFee
|
|
820
|
+
* @param {?WriteParams<typeof boostCoreAbi, 'setClaimFee'>} [params]
|
|
821
|
+
* @returns {unknown}
|
|
822
|
+
*/
|
|
823
|
+
async setClaimFeeRaw(e, f) {
|
|
824
|
+
const { request: a, result: s } = await tf(
|
|
825
|
+
this._config,
|
|
826
|
+
{
|
|
827
|
+
address: this.assertValidAddress(),
|
|
828
|
+
args: [e],
|
|
829
|
+
...this.optionallyAttachAccount(),
|
|
830
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
831
|
+
...f
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
return { hash: await sf(this._config, a), result: s };
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
|
|
838
|
+
*
|
|
839
|
+
* @example
|
|
840
|
+
* ```ts
|
|
841
|
+
* const auth = core.PassthroughAuth('0x') // is roughly equivalent to
|
|
842
|
+
* const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')
|
|
843
|
+
* ```
|
|
844
|
+
* @param {Address} address
|
|
845
|
+
* @returns {PassthroughAuth}
|
|
846
|
+
*/
|
|
847
|
+
PassthroughAuth(e) {
|
|
848
|
+
return new pf(
|
|
849
|
+
{ config: this._config, account: this._account },
|
|
850
|
+
e
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
// /**
|
|
854
|
+
// * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
855
|
+
// *
|
|
856
|
+
// * @example
|
|
857
|
+
// * ```ts
|
|
858
|
+
// * const action = core.ContractAction('0x') // is roughly equivalent to
|
|
859
|
+
// * const action = new ContractAction({ config: core._config, account: core._account }, '0x')
|
|
860
|
+
// * ```
|
|
861
|
+
// * @param {DeployablePayloadOrAddress<ContractActionPayload>} options
|
|
862
|
+
// * @param {?boolean} [isBase]
|
|
863
|
+
// * @returns {ContractAction}
|
|
864
|
+
// */
|
|
865
|
+
// ContractAction(
|
|
866
|
+
// options: DeployablePayloadOrAddress<ContractActionPayload>,
|
|
867
|
+
// isBase?: boolean,
|
|
868
|
+
// ) {
|
|
869
|
+
// return new ContractAction(
|
|
870
|
+
// { config: this._config, account: this._account },
|
|
871
|
+
// options,
|
|
872
|
+
// isBase,
|
|
873
|
+
// );
|
|
874
|
+
// }
|
|
875
|
+
/**
|
|
876
|
+
* Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
877
|
+
*
|
|
878
|
+
* @example
|
|
879
|
+
* ```ts
|
|
880
|
+
* const action = core.EventAction('0x') // is roughly equivalent to
|
|
881
|
+
* const action = new EventAction({ config: core._config, account: core._account }, '0x')
|
|
882
|
+
*/
|
|
883
|
+
EventAction(e, f) {
|
|
884
|
+
return new hf(
|
|
885
|
+
{ config: this._config, account: this._account },
|
|
886
|
+
e,
|
|
887
|
+
f
|
|
888
|
+
);
|
|
889
|
+
}
|
|
890
|
+
// /**
|
|
891
|
+
// * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
892
|
+
// *
|
|
893
|
+
// * @example
|
|
894
|
+
// * ```ts
|
|
895
|
+
// * const action = core.ERC721MintAction('0x') // is roughly equivalent to
|
|
896
|
+
// * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')
|
|
897
|
+
// * ```
|
|
898
|
+
// * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options
|
|
899
|
+
// * @param {?boolean} [isBase]
|
|
900
|
+
// * @returns {ERC721MintAction}
|
|
901
|
+
// */
|
|
902
|
+
// ERC721MintAction(
|
|
903
|
+
// options: DeployablePayloadOrAddress<ERC721MintActionPayload>,
|
|
904
|
+
// isBase?: boolean,
|
|
905
|
+
// ) {
|
|
906
|
+
// return new ERC721MintAction(
|
|
907
|
+
// { config: this._config, account: this._account },
|
|
908
|
+
// options,
|
|
909
|
+
// isBase,
|
|
910
|
+
// );
|
|
911
|
+
// }
|
|
912
|
+
/**
|
|
913
|
+
* Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.
|
|
914
|
+
*
|
|
915
|
+
* @example
|
|
916
|
+
* ```ts
|
|
917
|
+
* const list = core.SimpleAllowList('0x') // is roughly equivalent to
|
|
918
|
+
* const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')
|
|
919
|
+
* ```
|
|
920
|
+
* @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options
|
|
921
|
+
* @param {?boolean} [isBase]
|
|
922
|
+
* @returns {SimpleAllowList}
|
|
923
|
+
*/
|
|
924
|
+
SimpleAllowList(e, f) {
|
|
925
|
+
return new gf(
|
|
926
|
+
{ config: this._config, account: this._account },
|
|
927
|
+
e,
|
|
928
|
+
f
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.
|
|
933
|
+
*
|
|
934
|
+
* @example
|
|
935
|
+
* ```ts
|
|
936
|
+
* const list = core.SimpleDenyList('0x') // is roughly equivalent to
|
|
937
|
+
* const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')
|
|
938
|
+
* ```
|
|
939
|
+
* @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options
|
|
940
|
+
* @param {?boolean} [isBase]
|
|
941
|
+
* @returns {SimpleDenyList}
|
|
942
|
+
*/
|
|
943
|
+
SimpleDenyList(e, f) {
|
|
944
|
+
return new wf(
|
|
945
|
+
{ config: this._config, account: this._account },
|
|
946
|
+
e,
|
|
947
|
+
f
|
|
948
|
+
);
|
|
949
|
+
}
|
|
950
|
+
// /**
|
|
951
|
+
// * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
952
|
+
// *
|
|
953
|
+
// * @example
|
|
954
|
+
// * ```ts
|
|
955
|
+
// * const budget = core.SimpleBudget('0x') // is roughly equivalent to
|
|
956
|
+
// * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')
|
|
957
|
+
// * ```
|
|
958
|
+
// * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options
|
|
959
|
+
// * @returns {SimpleBudget}
|
|
960
|
+
// */
|
|
961
|
+
// SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {
|
|
962
|
+
// return new SimpleBudget(
|
|
963
|
+
// { config: this._config, account: this._account },
|
|
964
|
+
// options,
|
|
965
|
+
// );
|
|
966
|
+
// }
|
|
967
|
+
/**
|
|
968
|
+
* Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
969
|
+
*
|
|
970
|
+
* @example
|
|
971
|
+
* ```ts
|
|
972
|
+
* const budget = core.ManagedBudget('0x') // is roughly equivalent to
|
|
973
|
+
* const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')
|
|
974
|
+
* ```
|
|
975
|
+
* @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options
|
|
976
|
+
* @returns {ManagedBudget}
|
|
977
|
+
*/
|
|
978
|
+
ManagedBudget(e) {
|
|
979
|
+
return new Cf(
|
|
980
|
+
{ config: this._config, account: this._account },
|
|
981
|
+
e
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
// /**
|
|
985
|
+
// * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
986
|
+
// *
|
|
987
|
+
// * @example
|
|
988
|
+
// * ```ts
|
|
989
|
+
// * const budget = core.VestingBudget('0x') // is roughly equivalent to
|
|
990
|
+
// * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')
|
|
991
|
+
// * ```
|
|
992
|
+
// * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
|
|
993
|
+
// * @returns {VestingBudget}
|
|
994
|
+
// */
|
|
995
|
+
// VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {
|
|
996
|
+
// return new VestingBudget(
|
|
997
|
+
// { config: this._config, account: this._account },
|
|
998
|
+
// options,
|
|
999
|
+
// );
|
|
1000
|
+
// }
|
|
1001
|
+
/**
|
|
1002
|
+
* Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1003
|
+
*
|
|
1004
|
+
* @example
|
|
1005
|
+
* ```ts
|
|
1006
|
+
* const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to
|
|
1007
|
+
* const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })
|
|
1008
|
+
* ```
|
|
1009
|
+
* @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
|
|
1010
|
+
* @returns {VestingBudget}
|
|
1011
|
+
*/
|
|
1012
|
+
AllowListIncentive(e) {
|
|
1013
|
+
return new _f(
|
|
1014
|
+
{ config: this._config, account: this._account },
|
|
1015
|
+
e
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1020
|
+
*
|
|
1021
|
+
* @example
|
|
1022
|
+
* ```ts
|
|
1023
|
+
* const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to
|
|
1024
|
+
* const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })
|
|
1025
|
+
* ```
|
|
1026
|
+
* @param {CGDAIncentivePayload} options
|
|
1027
|
+
* @returns {CGDAIncentive}
|
|
1028
|
+
*/
|
|
1029
|
+
CGDAIncentive(e) {
|
|
1030
|
+
return new If(
|
|
1031
|
+
{ config: this._config, account: this._account },
|
|
1032
|
+
e
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1037
|
+
*
|
|
1038
|
+
* @example
|
|
1039
|
+
* ```ts
|
|
1040
|
+
* const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to
|
|
1041
|
+
* const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })
|
|
1042
|
+
* ```
|
|
1043
|
+
* @param {ERC20IncentivePayload} options
|
|
1044
|
+
* @returns {ERC20Incentive}
|
|
1045
|
+
*/
|
|
1046
|
+
ERC20Incentive(e) {
|
|
1047
|
+
return new Pf(
|
|
1048
|
+
{ config: this._config, account: this._account },
|
|
1049
|
+
e
|
|
1050
|
+
);
|
|
1051
|
+
}
|
|
1052
|
+
// /**
|
|
1053
|
+
// * Temporarily disabled until low level ABI encoding bugs are resolved
|
|
1054
|
+
// * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1055
|
+
// *
|
|
1056
|
+
// * @experimental
|
|
1057
|
+
// * @example
|
|
1058
|
+
// * ```ts
|
|
1059
|
+
// * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to
|
|
1060
|
+
// * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })
|
|
1061
|
+
// * ```
|
|
1062
|
+
// * @param {ERC1155IncentivePayload} options
|
|
1063
|
+
// * @returns {ERC1155Incentive}
|
|
1064
|
+
// */
|
|
1065
|
+
// ERC1155Incentive(options: ERC1155IncentivePayload) {
|
|
1066
|
+
// return new ERC1155Incentive(
|
|
1067
|
+
// { config: this._config, account: this._account },
|
|
1068
|
+
// options,
|
|
1069
|
+
// );
|
|
1070
|
+
// }
|
|
1071
|
+
/**
|
|
1072
|
+
* Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1073
|
+
*
|
|
1074
|
+
* @example
|
|
1075
|
+
* ```ts
|
|
1076
|
+
* const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to
|
|
1077
|
+
* const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })
|
|
1078
|
+
* ```
|
|
1079
|
+
* @param {PointsIncentivePayload} options
|
|
1080
|
+
* @returns {PointsIncentive}
|
|
1081
|
+
*/
|
|
1082
|
+
PointsIncentive(e) {
|
|
1083
|
+
return new Ff(
|
|
1084
|
+
{ config: this._config, account: this._account },
|
|
1085
|
+
e
|
|
1086
|
+
);
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.
|
|
1090
|
+
*
|
|
1091
|
+
* @example
|
|
1092
|
+
* ```ts
|
|
1093
|
+
* const validator = core.SignerValidator({ ... }) // is roughly equivalent to
|
|
1094
|
+
* const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })
|
|
1095
|
+
* ```
|
|
1096
|
+
* @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options
|
|
1097
|
+
* @param {?boolean} [isBase]
|
|
1098
|
+
* @returns {SignerValidator}
|
|
1099
|
+
*/
|
|
1100
|
+
SignerValidator(e, f) {
|
|
1101
|
+
return new Ef(
|
|
1102
|
+
{ config: this._config, account: this._account },
|
|
1103
|
+
e,
|
|
1104
|
+
f
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1109
|
+
*
|
|
1110
|
+
* @example
|
|
1111
|
+
* ```ts
|
|
1112
|
+
* const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to
|
|
1113
|
+
* const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })
|
|
1114
|
+
* ```
|
|
1115
|
+
* @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options
|
|
1116
|
+
* @param {?boolean} [isBase]
|
|
1117
|
+
* @returns {ERC20VariableIncentive}
|
|
1118
|
+
*/
|
|
1119
|
+
ERC20VariableIncentive(e, f) {
|
|
1120
|
+
return new Rf(
|
|
1121
|
+
{ config: this._config, account: this._account },
|
|
1122
|
+
e,
|
|
1123
|
+
f
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* @inheritdoc
|
|
1128
|
+
*
|
|
1129
|
+
* @public
|
|
1130
|
+
* @param {?[Address, Address]} [_payload]
|
|
1131
|
+
* @param {?DeployableOptions} [_options]
|
|
1132
|
+
* @returns {GenericDeployableParams}
|
|
1133
|
+
*/
|
|
1134
|
+
buildParameters(e, f) {
|
|
1135
|
+
const [a, s] = this.validateDeploymentConfig(
|
|
1136
|
+
e,
|
|
1137
|
+
f
|
|
1138
|
+
);
|
|
1139
|
+
return {
|
|
1140
|
+
abi: P,
|
|
1141
|
+
bytecode: qf,
|
|
1142
|
+
args: a,
|
|
1143
|
+
...this.optionallyAttachAccount(s.account)
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
export {
|
|
1148
|
+
Jf as BOOST_CORE_ADDRESS,
|
|
1149
|
+
C0 as BOOST_CORE_CLAIM_FEE,
|
|
1150
|
+
v0 as BoostCore,
|
|
1151
|
+
P as boostCoreAbi
|
|
1152
|
+
};
|
|
1153
|
+
//# sourceMappingURL=BoostCore.js.map
|