@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
|
@@ -0,0 +1,1448 @@
|
|
|
1
|
+
import { be as R, bf as k, T as C, bg as G, bh as W, bi as H, bj as K, bk as X, bl as Y, bm as J, bn as Q, bo as Z, bp as ff, bq as bf, br as ef, bs as af, bt as cf, bu as df } from "./generated-CKt2yCQd.js";
|
|
2
|
+
import { getTransaction as tf, getTransactionReceipt as N, waitForTransactionReceipt as nf, getAccount as sf } from "@wagmi/core";
|
|
3
|
+
import { createClient as of, custom as rf, parseEventLogs as A, decodeFunctionData as uf, encodeAbiParameters as lf, parseEther as hf, zeroAddress as v, zeroHash as r } from "viem";
|
|
4
|
+
import { e as gf, f as O } from "./deployments-oykLv3_Z.js";
|
|
5
|
+
import { actionFromAddress as wf } from "./Actions/Action.js";
|
|
6
|
+
import { S as F, e as vf, f as mf, E as Cf } from "./EventAction-DWuuc_Qy.js";
|
|
7
|
+
import { allowListFromAddress as yf, OpenAllowList as If } from "./AllowLists/AllowList.js";
|
|
8
|
+
import { SimpleAllowList as Af } from "./AllowLists/SimpleAllowList.js";
|
|
9
|
+
import { S as Pf } from "./SimpleDenyList-CGaWjuld.js";
|
|
10
|
+
import { PassthroughAuth as Bf } from "./Auth/PassthroughAuth.js";
|
|
11
|
+
import { prepareBoostPayload as p, Boost as D } from "./Boost.js";
|
|
12
|
+
import { budgetFromAddress as Ef } from "./Budgets/Budget.js";
|
|
13
|
+
import { ManagedBudget as _f } from "./Budgets/ManagedBudget.js";
|
|
14
|
+
import { Deployable as Rf } from "./Deployable/Deployable.js";
|
|
15
|
+
import { AllowListIncentive as Ff } from "./Incentives/AllowListIncentive.js";
|
|
16
|
+
import { CGDAIncentive as pf } from "./Incentives/CGDAIncentive.js";
|
|
17
|
+
import { ERC20Incentive as Df } from "./Incentives/ERC20Incentive.js";
|
|
18
|
+
import { DeployableTarget as $f } from "./Deployable/DeployableTarget.js";
|
|
19
|
+
import { IncentiveCriteriaNotFoundError as xf, NoMatchingLogsError as $, DecodedArgsError as y, InvalidCriteriaTypeError as Lf, BoostCoreNoIdentifierEmitted as Sf, DeployableUnknownOwnerProvidedError as Nf, BudgetMustAuthorizeBoostCore as Of, MustInitializeBudgetError as Tf, IncentiveNotCloneableError as jf, BoostNotFoundError as Mf } from "./errors.js";
|
|
20
|
+
import { i as Vf, E as qf } from "./Incentive-BxzEtN26.js";
|
|
21
|
+
import { PointsIncentive as zf } from "./Incentives/PointsIncentive.js";
|
|
22
|
+
import { SignerValidator as Uf } from "./Validators/SignerValidator.js";
|
|
23
|
+
import { validatorFromAddress as kf } from "./Validators/Validator.js";
|
|
24
|
+
import { assertValidAddressByChainId as u } from "./utils.js";
|
|
25
|
+
import { simulateContract as Gf, writeContract as Wf } from "viem/actions";
|
|
26
|
+
import { parseAccount as Hf, getAddress as Kf } from "viem/utils";
|
|
27
|
+
const Xf = "0x60806040526103e8600360146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555034801561003a575f80fd5b50604051615301380380615301833981810160405281019061005c919061026b565b61006b336100f260201b60201c565b8160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506102a9565b6101006101ce60201b60201c565b15610178577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780541561013a57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3506101cb565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f90565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101ff826101d6565b9050919050565b5f610210826101f5565b9050919050565b61022081610206565b811461022a575f80fd5b50565b5f8151905061023b81610217565b92915050565b61024a816101f5565b8114610254575f80fd5b50565b5f8151905061026581610241565b92915050565b5f8060408385031215610281576102806101d2565b5b5f61028e8582860161022d565b925050602061029f85828601610257565b9150509250929050565b61504b806102b65f395ff3fe60806040526004361061014a575f3560e01c80637b103999116100b5578063dd98558c1161006e578063dd98558c146103fa578063e21ff73114610437578063eccc19a614610473578063f04e283e1461049b578063f2fde38b146104b7578063fee81cf4146104d35761014a565b80637b1039991461030c5780638da5cb5b146103365780638fe4f52314610360578063a92647dc1461037c578063b0e21e8a146103a6578063d73792a9146103d05761014a565b806354d1f13d1161010757806354d1f13d1461024a5780635edb9eb0146102545780635f32c23e1461027e57806360777795146102a6578063715018a6146102e6578063730f9c57146102f05761014a565b80630250e72b1461014e57806313c8e2de1461018a57806325692962146101c657806339a51be5146101d057806343bc42d3146101fa57806346877b1a14610222575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f91906137f5565b61050f565b6040516101819190613950565b60405180910390f35b348015610195575f80fd5b506101b060048036038101906101ab9190613993565b6105e6565b6040516101bd9190613c21565b60405180910390f35b6101ce61088e565b005b3480156101db575f80fd5b506101e46108df565b6040516101f19190613c50565b60405180910390f35b348015610205575f80fd5b50610220600480360381019061021b9190613c93565b610904565b005b34801561022d575f80fd5b5061024860048036038101906102439190613ce8565b610938565b005b610252610983565b005b34801561025f575f80fd5b506102686109bc565b6040516102759190613d22565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f9190613d3b565b6109c7565b005b3480156102b1575f80fd5b506102cc60048036038101906102c791906137f5565b610b53565b6040516102dd959493929190613d88565b60405180910390f35b6102ee610bb0565b005b61030a60048036038101906103059190613e3a565b610bc3565b005b348015610317575f80fd5b50610320611104565b60405161032d9190613ef0565b60405180910390f35b348015610341575f80fd5b5061034a611129565b6040516103579190613c50565b60405180910390f35b61037a60048036038101906103759190613f09565b611151565b005b348015610387575f80fd5b50610390611166565b60405161039d9190613fad565b60405180910390f35b3480156103b1575f80fd5b506103ba61118b565b6040516103c79190613fd5565b60405180910390f35b3480156103db575f80fd5b506103e46111a5565b6040516103f19190613fd5565b60405180910390f35b348015610405575f80fd5b50610420600480360381019061041b9190613fee565b6111ab565b60405161042e92919061405f565b60405180910390f35b348015610442575f80fd5b5061045d60048036038101906104589190614086565b6118af565b60405161046a9190613c21565b60405180910390f35b34801561047e575f80fd5b5061049960048036038101906104949190613ce8565b61229d565b005b6104b560048036038101906104b09190613ce8565b6122e8565b005b6104d160048036038101906104cc9190613ce8565b612326565b005b3480156104de575f80fd5b506104f960048036038101906104f49190613ce8565b61234f565b6040516105069190613d22565b60405180910390f35b610517613607565b60045f8381526020019081526020015f206040518060a00160405290815f82015f9054906101000a900460ff16600281111561055657610555613820565b5b600281111561056857610567613820565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152602001600282015481526020016003820154815250509050919050565b6105ee613659565b5f8281548110610601576106006140d1565b5b905f5260205f209060080201604051806101000160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156107ee57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116107a5575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050919050565b5f610897612368565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61090c612372565b80600360146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b610940612372565b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f8080549050905090565b3068929eee149b4bd2126854036109e55763ab143c065f526004601cfd5b3068929eee149b4bd21268555f6109fc83836123a9565b90505f60045f8381526020019081526020015f2090505f816002015461271067ffffffffffffffff168360010154610a34919061412b565b610a3e9190614199565b90505f610a4a836123db565b905081811115610b3f575f8282610a6191906141c9565b90505f61271067ffffffffffffffff16856002015483610a81919061412b565b610a8b9190614199565b9050610a9785826125e1565b80856001015410610ac15780856001015f828254610ab591906141c9565b92505081905550610acb565b5f85600101819055505b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1687897f42ca2b02f2bdb76fff6e99ea9a7b4d9767b45bdd42d6be831eeb9f3d5cb20b1784604051610b349190613d22565b60405180910390a450505b505050503868929eee149b4bd21268555050565b6004602052805f5260405f205f91509050805f015f9054906101000a900460ff1690805f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154905085565b610bb8612372565b610bc15f6127c2565b565b3068929eee149b4bd212685403610be15763ab143c065f526004601cfd5b3068929eee149b4bd21268555f808781548110610c0157610c006140d1565b5b905f5260205f20906008020190505f610c1a88886123a9565b90505f60045f8381526020019081526020015f209050826002015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de8588886040518463ffffffff1660e01b8152600401610c9093929190614256565b602060405180830381865afa158015610cab573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ccf91906142bb565b610d05576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663703b69008a8a878a8a6040518663ffffffff1660e01b8152600401610d699594939291906142e6565b6020604051808303815f875af1158015610d85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610da991906142bb565b610ddf576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8073ffffffffffffffffffffffffffffffffffffffff16825f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e3c575f610e46565b610e45826123db565b5b9050836004018981548110610e5e57610e5d6140d1565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb1757cf8689896040518463ffffffff1660e01b8152600401610ec293929190614256565b6020604051808303815f875af1158015610ede573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f0291906142bb565b610f47578487876040517f4139d81d000000000000000000000000000000000000000000000000000000008152600401610f3e93929190614256565b60405180910390fd5b5f8073ffffffffffffffffffffffffffffffffffffffff16835f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610fa4575f610fae565b610fad836123db565b5b90505f818311610fbe575f610fcb565b8183610fca91906141c9565b5b90505f61271067ffffffffffffffff16856002015483610feb919061412b565b610ff59190614199565b90505f8111156110955761100985826125e1565b80856001015f82825461101c91906141c9565b9250508190555060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168c8e7f42ca2b02f2bdb76fff6e99ea9a7b4d9767b45bdd42d6be831eeb9f3d5cb20b178460405161108c9190613d22565b60405180910390a45b8773ffffffffffffffffffffffffffffffffffffffff168c8e7f0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b2595478e8e8e6040516110e193929190614256565b60405180910390a4505050505050503868929eee149b4bd2126855505050505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b61115f858585858533610bc3565b5050505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360149054906101000a900467ffffffffffffffff1681565b61271081565b5f803068929eee149b4bd2126854036111cb5763ab143c065f526004601cfd5b3068929eee149b4bd21268555f8085815481106111eb576111ea6140d1565b5b905f5260205f209060080201604051806101000160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156113d857602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161138f575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114dc576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6114e786866123a9565b90505f60045f8381526020019081526020015f2090505f898981019061150d91906144bd565b90505f81602001518060200190518101906115289190614518565b90505f61271067ffffffffffffffff16846002015483611548919061412b565b6115529190614199565b90505f81111561176f57600160028111156115705761156f613820565b5b845f015f9054906101000a900460ff16600281111561159257611591613820565b5b14806115d057505f60028111156115ac576115ab613820565b5b845f015f9054906101000a900460ff1660028111156115ce576115cd613820565b5b145b1561162b57611626835f015182865f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166128889092919063ffffffff16565b6116fd565b60028081111561163e5761163d613820565b5b845f015f9054906101000a900460ff1660028111156116605761165f613820565b5b036116fc57835f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30855f01518760030154856040518563ffffffff1660e01b81526004016116ce9493929190614566565b5f604051808303815f87803b1580156116e5575f80fd5b505af11580156116f7573d5f803e3d5ffd5b505050505b5b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16898b7f42ca2b02f2bdb76fff6e99ea9a7b4d9767b45bdd42d6be831eeb9f3d5cb20b17846040516117669190613d22565b60405180910390a45b5f8087608001518b81518110611788576117876140d1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663474f5a44866040516020016117bc9190614656565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016117e791906146ae565b60408051808303815f875af1158015611802573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061182691906146e2565b915091505f820361187257338e8e6040517f9ecd71a900000000000000000000000000000000000000000000000000000000815260040161186993929190614256565b60405180910390fd5b82866001015f82825461188591906141c9565b9250508190555081819950995050505050505050503868929eee149b4bd212685594509492505050565b6118b7613659565b335f73ffffffffffffffffffffffffffffffffffffffff1660025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580156119ab575060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80826040518263ffffffff1660e01b815260040161196a9190613c50565b602060405180830381865afa158015611985573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119a991906142bb565b155b156119e2576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3068929eee149b4bd212685403611a005763ab143c065f526004601cfd5b3068929eee149b4bd21268555f611a5985858080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050506128d1565b806020019051810190611a6c9190614a80565b9050611a7a815f015161296a565b5f8060018160018154018082558091505003905f5260205f20906008020190508160e00151816007015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550815f0151816003015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160a00151600360149054906101000a900467ffffffffffffffff16611b4b9190614ac7565b816005015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508160c001518160060181905550611bb17fe67157950000000000000000000000000000000000000000000000000000000083602001516001612a45565b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c217fe2089f790000000000000000000000000000000000000000000000000000000083606001516001612a45565b816002015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611c738260800151835f0151612a67565b816004019080519060200190611c8a92919061370f565b505f73ffffffffffffffffffffffffffffffffffffffff1682604001516020015173ffffffffffffffffffffffffffffffffffffffff1614611cfb57611cf67f5912b89c0000000000000000000000000000000000000000000000000000000083604001516001612a45565b611de4565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f5912b89c000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401611d769190614b3c565b602060405180830381865afa158015611d91573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611db591906142bb565b611dbf575f611de3565b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff165b5b816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f73ffffffffffffffffffffffffffffffffffffffff16816001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611eda577f5912b89c000000000000000000000000000000000000000000000000000000005f6040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401611ed1929190614b55565b60405180910390fd5b805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16816007015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660015f80549050611f5e91906141c9565b7f116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd8460040180549050856001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866002015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876003015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516120039493929190614b7c565b60405180910390a480604051806101000160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156121ed57602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116121a4575b50505050508152602001600582015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160068201548152602001600782015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050935050503868929eee149b4bd21268555092915050565b6122a5612372565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6122f0612372565b63389a75e1600c52805f526020600c20805442111561231657636f5e88185f526004601cfd5b5f815550612323816127c2565b50565b61232e612372565b8060601b61234357637448fbae5f526004601cfd5b61234c816127c2565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146123a7576382b429005f526004601cfd5b565b5f82826040516020016123bd929190614bdf565b60405160208183030381529060405280519060200120905092915050565b5f600160028111156123f0576123ef613820565b5b825f015f9054906101000a900460ff16600281111561241257612411613820565b5b148061245057505f600281111561242c5761242b613820565b5b825f015f9054906101000a900460ff16600281111561244e5761244d613820565b5b145b156124f757815f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016124b19190613c50565b602060405180830381865afa1580156124cc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124f09190614518565b90506125dc565b60028081111561250a57612509613820565b5b825f015f9054906101000a900460ff16600281111561252c5761252b613820565b5b036125d857815f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e3084600301546040518363ffffffff1660e01b8152600401612592929190614c0a565b602060405180830381865afa1580156125ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125d19190614518565b90506125dc565b5f90505b919050565b600160028111156125f5576125f4613820565b5b825f015f9054906101000a900460ff16600281111561261757612616613820565b5b148061265557505f600281111561263157612630613820565b5b825f015f9054906101000a900460ff16600281111561265357612652613820565b5b145b156126ce576126c960035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682845f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166128889092919063ffffffff16565b6127be565b6002808111156126e1576126e0613820565b5b825f015f9054906101000a900460ff16600281111561270357612702613820565b5b036127bd57815f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a3060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff168560030154856040518563ffffffff1660e01b815260040161278f9493929190614566565b5f604051808303815f87803b1580156127a6575f80fd5b505af11580156127b8573d5f803e3d5ffd5b505050505b5b5050565b6127ca612f75565b1561282f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550612885565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166128c8576390b8ec185f526004601cfd5b5f603452505050565b60608151156129655760405190506020810160048301805184518501811983525b8086101561294b576001860195508551601f1a8061293b576001870196508651601f1a5f198652607f811161292957600181013887395b6001607f821601860195505050612946565b808553600185019450505b6128f2565b81835260208501840385525f845260208401604052505050505b919050565b6129947fe49cedd70000000000000000000000000000000000000000000000000000000082612f79565b8073ffffffffffffffffffffffffffffffffffffffff1663fe9fbb80336040518263ffffffff1660e01b81526004016129cd9190613c50565b602060405180830381865afa1580156129e8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a0c91906142bb565b612a42576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b5f612a54848460200151612f79565b612a5e8383613070565b90509392505050565b6060825167ffffffffffffffff811115612a8457612a83614336565b5b604051908082528060200260200182016040528015612ab25781602001602082028036833780820191505090505b5090505f5b8351811015612f6e57612b087fa921670500000000000000000000000000000000000000000000000000000000858381518110612af757612af66140d1565b5b602002602001015160200151612f79565b838181518110612b1b57612b1a6140d1565b5b60200260200101515f0151612ba7577fa921670500000000000000000000000000000000000000000000000000000000848281518110612b5e57612b5d6140d1565b5b6020026020010151602001516040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401612b9e929190614b55565b60405180910390fd5b612bec7fa921670500000000000000000000000000000000000000000000000000000000858381518110612bde57612bdd6140d1565b5b60200260200101515f612a45565b828281518110612bff57612bfe6140d1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505f828281518110612c4d57612c4c6140d1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16634e7165a2868481518110612c8357612c826140d1565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401612cab91906146ae565b5f60405180830381865afa158015612cc5573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190612ced9190614c31565b90505f815114612ec2575f80612d028361312c565b915091508573ffffffffffffffffffffffffffffffffffffffff1663fa4ca9b1836040518263ffffffff1660e01b8152600401612d3f91906146ae565b6020604051808303815f875af1158015612d5b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d7f91906142bb565b612db5576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663fa4ca9b1846040518263ffffffff1660e01b8152600401612dee91906146ae565b6020604051808303815f875af1158015612e0a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e2e91906142bb565b612e64576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83806020019051810190612e799190614d2c565b9050612ebe60015f80549050612e8f91906141c9565b86836020015185855f01518d8b81518110612ead57612eac6140d1565b5b602002602001015160400151613428565b5050505b828281518110612ed557612ed46140d1565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663439fab91868481518110612f0b57612f0a6140d1565b5b6020026020010151604001516040518263ffffffff1660e01b8152600401612f3391906146ae565b5f604051808303815f87803b158015612f4a575f80fd5b505af1158015612f5c573d5f803e3d5ffd5b50505050508080600101915050612ab7565b5092915050565b5f90565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061302857508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7836040518263ffffffff1660e01b8152600401612fe79190614b3c565b602060405180830381865afa158015613002573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061302691906142bb565b155b1561306c5781816040517fe1c44448000000000000000000000000000000000000000000000000000000008152600401613063929190614b55565b60405180910390fd5b5050565b5f825f01516130835782602001516130a7565b6130a6836020015173ffffffffffffffffffffffffffffffffffffffff166135a4565b5b9050825f015180156130b65750815b15613126578073ffffffffffffffffffffffffffffffffffffffff1663439fab9184604001516040518263ffffffff1660e01b81526004016130f891906146ae565b5f604051808303815f87803b15801561310f575f80fd5b505af1158015613121573d5f803e3d5ffd5b505050505b92915050565b60605f80838060200190518101906131449190614d2c565b90506001600281111561315a57613159613820565b5b815f015160028111156131705761316f613820565b5b14806131a257505f600281111561318a57613189613820565b5b815f015160028111156131a05761319f613820565b5b145b156132ab575f81606001518060200190518101906131c09190614dac565b90505f61271067ffffffffffffffff16600360149054906101000a900467ffffffffffffffff1667ffffffffffffffff16835f01516131ff919061412b565b6132099190614199565b90505f60405180602001604052808381525090508060405160200161322e9190614df1565b604051602081830303815290604052846060018190525030846040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360405160200161328e9190614e6a565b604051602081830303815290604052829550955050505050613423565b6002808111156132be576132bd613820565b5b815f015160028111156132d4576132d3613820565b5b036133f1575f81606001518060200190518101906132f29190614f07565b90505f61271067ffffffffffffffff16600360149054906101000a900467ffffffffffffffff1667ffffffffffffffff168360200151613332919061412b565b61333c9190614199565b90505f6040518060600160405280845f0151815260200183815260200184604001518152509050806040516020016133749190614f9b565b604051602081830303815290604052846060018190525030846040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050836040516020016133d49190614e6a565b604051602081830303815290604052829550955050505050613423565b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b915091565b60605f60028081111561343e5761343d613820565b5b84600281111561345157613450613820565b5b03613474578280602001905181019061346a9190614fbb565b5080915050613478565b8291505b5f6040518060a0016040528086600281111561349757613496613820565b5b81526020018873ffffffffffffffffffffffffffffffffffffffff168152602001878152602001600360149054906101000a900467ffffffffffffffff1667ffffffffffffffff1681526020018381525090508060045f6134f88c8c6123a9565b81526020019081526020015f205f820151815f015f6101000a81548160ff0219169083600281111561352d5761352c613820565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600101556060820151816002015560808201518160030155905050505050505050505050565b5f6135af5f836135b6565b9050919050565b5f6c5af43d3d93803e602a57fd5bf36021528160145273602c3d8160093d39f33d3d3d3d363d3d37363d735f526035600c84f09050806135fd5763301164255f526004601cfd5b5f60215292915050565b6040518060a001604052805f600281111561362557613624613820565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81526020015f81525090565b6040518061010001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f81526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b828054828255905f5260205f20908101928215613785579160200282015b82811115613784578251825f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061372d565b5b5090506137929190613796565b5090565b5b808211156137ad575f815f905550600101613797565b5090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6137d4816137c2565b81146137de575f80fd5b50565b5f813590506137ef816137cb565b92915050565b5f6020828403121561380a576138096137ba565b5b5f613817848285016137e1565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6003811061385e5761385d613820565b5b50565b5f81905061386e8261384d565b919050565b5f61387d82613861565b9050919050565b61388d81613873565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6138bc82613893565b9050919050565b6138cc816138b2565b82525050565b5f819050919050565b6138e4816138d2565b82525050565b60a082015f8201516138fe5f850182613884565b50602082015161391160208501826138c3565b50604082015161392460408501826138db565b50606082015161393760608501826138db565b50608082015161394a60808501826138db565b50505050565b5f60a0820190506139635f8301846138ea565b92915050565b613972816138d2565b811461397c575f80fd5b50565b5f8135905061398d81613969565b92915050565b5f602082840312156139a8576139a76137ba565b5b5f6139b58482850161397f565b91505092915050565b5f819050919050565b5f6139e16139dc6139d784613893565b6139be565b613893565b9050919050565b5f6139f2826139c7565b9050919050565b5f613a03826139e8565b9050919050565b613a13816139f9565b82525050565b5f613a23826139e8565b9050919050565b613a3381613a19565b82525050565b5f613a43826139e8565b9050919050565b613a5381613a39565b82525050565b5f613a63826139c7565b9050919050565b5f613a7482613a59565b9050919050565b613a8481613a6a565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f613abd826139e8565b9050919050565b613acd81613ab3565b82525050565b5f613ade8383613ac4565b60208301905092915050565b5f602082019050919050565b5f613b0082613a8a565b613b0a8185613a94565b9350613b1583613aa4565b805f5b83811015613b45578151613b2c8882613ad3565b9750613b3783613aea565b925050600181019050613b18565b5085935050505092915050565b5f67ffffffffffffffff82169050919050565b613b6e81613b52565b82525050565b5f61010083015f830151613b8a5f860182613a0a565b506020830151613b9d6020860182613a2a565b506040830151613bb06040860182613a4a565b506060830151613bc36060860182613a7b565b5060808301518482036080860152613bdb8282613af6565b91505060a0830151613bf060a0860182613b65565b5060c0830151613c0360c08601826138db565b5060e0830151613c1660e08601826138c3565b508091505092915050565b5f6020820190508181035f830152613c398184613b74565b905092915050565b613c4a816138b2565b82525050565b5f602082019050613c635f830184613c41565b92915050565b613c7281613b52565b8114613c7c575f80fd5b50565b5f81359050613c8d81613c69565b92915050565b5f60208284031215613ca857613ca76137ba565b5b5f613cb584828501613c7f565b91505092915050565b613cc7816138b2565b8114613cd1575f80fd5b50565b5f81359050613ce281613cbe565b92915050565b5f60208284031215613cfd57613cfc6137ba565b5b5f613d0a84828501613cd4565b91505092915050565b613d1c816138d2565b82525050565b5f602082019050613d355f830184613d13565b92915050565b5f8060408385031215613d5157613d506137ba565b5b5f613d5e8582860161397f565b9250506020613d6f8582860161397f565b9150509250929050565b613d8281613873565b82525050565b5f60a082019050613d9b5f830188613d79565b613da86020830187613c41565b613db56040830186613d13565b613dc26060830185613d13565b613dcf6080830184613d13565b9695505050505050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112613dfa57613df9613dd9565b5b8235905067ffffffffffffffff811115613e1757613e16613ddd565b5b602083019150836001820283011115613e3357613e32613de1565b5b9250929050565b5f805f805f8060a08789031215613e5457613e536137ba565b5b5f613e6189828a0161397f565b9650506020613e7289828a0161397f565b9550506040613e8389828a01613cd4565b945050606087013567ffffffffffffffff811115613ea457613ea36137be565b5b613eb089828a01613de5565b93509350506080613ec389828a01613cd4565b9150509295509295509295565b5f613eda826139e8565b9050919050565b613eea81613ed0565b82525050565b5f602082019050613f035f830184613ee1565b92915050565b5f805f805f60808688031215613f2257613f216137ba565b5b5f613f2f8882890161397f565b9550506020613f408882890161397f565b9450506040613f5188828901613cd4565b935050606086013567ffffffffffffffff811115613f7257613f716137be565b5b613f7e88828901613de5565b92509250509295509295909350565b5f613f97826139e8565b9050919050565b613fa781613f8d565b82525050565b5f602082019050613fc05f830184613f9e565b92915050565b613fcf81613b52565b82525050565b5f602082019050613fe85f830184613fc6565b92915050565b5f805f8060608587031215614006576140056137ba565b5b5f85013567ffffffffffffffff811115614023576140226137be565b5b61402f87828801613de5565b945094505060206140428782880161397f565b92505060406140538782880161397f565b91505092959194509250565b5f6040820190506140725f830185613d13565b61407f6020830184613c41565b9392505050565b5f806020838503121561409c5761409b6137ba565b5b5f83013567ffffffffffffffff8111156140b9576140b86137be565b5b6140c585828601613de5565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f614135826138d2565b9150614140836138d2565b925082820261414e816138d2565b91508282048414831517614165576141646140fe565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6141a3826138d2565b91506141ae836138d2565b9250826141be576141bd61416c565b5b828204905092915050565b5f6141d3826138d2565b91506141de836138d2565b92508282039050818111156141f6576141f56140fe565b5b92915050565b5f82825260208201905092915050565b828183375f83830152505050565b5f601f19601f8301169050919050565b5f61423583856141fc565b935061424283858461420c565b61424b8361421a565b840190509392505050565b5f6040820190506142695f830186613c41565b818103602083015261427c81848661422a565b9050949350505050565b5f8115159050919050565b61429a81614286565b81146142a4575f80fd5b50565b5f815190506142b581614291565b92915050565b5f602082840312156142d0576142cf6137ba565b5b5f6142dd848285016142a7565b91505092915050565b5f6080820190506142f95f830188613d13565b6143066020830187613d13565b6143136040830186613c41565b818103606083015261432681848661422a565b90509695505050505050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61436c8261421a565b810181811067ffffffffffffffff8211171561438b5761438a614336565b5b80604052505050565b5f61439d6137b1565b90506143a98282614363565b919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff8211156143d0576143cf614336565b5b6143d98261421a565b9050602081019050919050565b5f6143f86143f3846143b6565b614394565b905082815260208101848484011115614414576144136143b2565b5b61441f84828561420c565b509392505050565b5f82601f83011261443b5761443a613dd9565b5b813561444b8482602086016143e6565b91505092915050565b5f6040828403121561446957614468614332565b5b6144736040614394565b90505f61448284828501613cd4565b5f83015250602082013567ffffffffffffffff8111156144a5576144a46143ae565b5b6144b184828501614427565b60208301525092915050565b5f602082840312156144d2576144d16137ba565b5b5f82013567ffffffffffffffff8111156144ef576144ee6137be565b5b6144fb84828501614454565b91505092915050565b5f8151905061451281613969565b92915050565b5f6020828403121561452d5761452c6137ba565b5b5f61453a84828501614504565b91505092915050565b50565b5f6145515f836141fc565b915061455c82614543565b5f82019050919050565b5f60a0820190506145795f830187613c41565b6145866020830186613c41565b6145936040830185613d13565b6145a06060830184613d13565b81810360808301526145b181614546565b905095945050505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6145ee826145bc565b6145f881856145c6565b93506146088185602086016145d6565b6146118161421a565b840191505092915050565b5f604083015f8301516146315f8601826138c3565b506020830151848203602086015261464982826145e4565b9150508091505092915050565b5f6020820190508181035f83015261466e818461461c565b905092915050565b5f614680826145bc565b61468a81856141fc565b935061469a8185602086016145d6565b6146a38161421a565b840191505092915050565b5f6020820190508181035f8301526146c68184614676565b905092915050565b5f815190506146dc81613cbe565b92915050565b5f80604083850312156146f8576146f76137ba565b5b5f61470585828601614504565b9250506020614716858286016146ce565b9150509250929050565b5f61472a82613893565b9050919050565b5f61473b82614720565b9050919050565b61474b81614731565b8114614755575f80fd5b50565b5f8151905061476681614742565b92915050565b5f61477e614779846143b6565b614394565b90508281526020810184848401111561479a576147996143b2565b5b6147a58482856145d6565b509392505050565b5f82601f8301126147c1576147c0613dd9565b5b81516147d184826020860161476c565b91505092915050565b5f606082840312156147ef576147ee614332565b5b6147f96060614394565b90505f614808848285016142a7565b5f83015250602061481b848285016146ce565b602083015250604082015167ffffffffffffffff81111561483f5761483e6143ae565b5b61484b848285016147ad565b60408301525092915050565b5f67ffffffffffffffff82111561487157614870614336565b5b602082029050602081019050919050565b5f61489461488f84614857565b614394565b905080838252602082019050602084028301858111156148b7576148b6613de1565b5b835b818110156148fe57805167ffffffffffffffff8111156148dc576148db613dd9565b5b8086016148e989826147da565b855260208501945050506020810190506148b9565b5050509392505050565b5f82601f83011261491c5761491b613dd9565b5b815161492c848260208601614882565b91505092915050565b5f8151905061494381613c69565b92915050565b5f610100828403121561495f5761495e614332565b5b61496a610100614394565b90505f61497984828501614758565b5f83015250602082015167ffffffffffffffff81111561499c5761499b6143ae565b5b6149a8848285016147da565b602083015250604082015167ffffffffffffffff8111156149cc576149cb6143ae565b5b6149d8848285016147da565b604083015250606082015167ffffffffffffffff8111156149fc576149fb6143ae565b5b614a08848285016147da565b606083015250608082015167ffffffffffffffff811115614a2c57614a2b6143ae565b5b614a3884828501614908565b60808301525060a0614a4c84828501614935565b60a08301525060c0614a6084828501614504565b60c08301525060e0614a74848285016146ce565b60e08301525092915050565b5f60208284031215614a9557614a946137ba565b5b5f82015167ffffffffffffffff811115614ab257614ab16137be565b5b614abe84828501614949565b91505092915050565b5f614ad182613b52565b9150614adc83613b52565b9250828201905067ffffffffffffffff811115614afc57614afb6140fe565b5b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b614b3681614b02565b82525050565b5f602082019050614b4f5f830184614b2d565b92915050565b5f604082019050614b685f830185614b2d565b614b756020830184613c41565b9392505050565b5f608082019050614b8f5f830187613d13565b614b9c6020830186613c41565b614ba96040830185613c41565b614bb66060830184613c41565b95945050505050565b5f819050919050565b614bd9614bd4826138d2565b614bbf565b82525050565b5f614bea8285614bc8565b602082019150614bfa8284614bc8565b6020820191508190509392505050565b5f604082019050614c1d5f830185613c41565b614c2a6020830184613d13565b9392505050565b5f60208284031215614c4657614c456137ba565b5b5f82015167ffffffffffffffff811115614c6357614c626137be565b5b614c6f848285016147ad565b91505092915050565b60038110614c84575f80fd5b50565b5f81519050614c9581614c78565b92915050565b5f60808284031215614cb057614caf614332565b5b614cba6080614394565b90505f614cc984828501614c87565b5f830152506020614cdc848285016146ce565b6020830152506040614cf0848285016146ce565b604083015250606082015167ffffffffffffffff811115614d1457614d136143ae565b5b614d20848285016147ad565b60608301525092915050565b5f60208284031215614d4157614d406137ba565b5b5f82015167ffffffffffffffff811115614d5e57614d5d6137be565b5b614d6a84828501614c9b565b91505092915050565b5f60208284031215614d8857614d87614332565b5b614d926020614394565b90505f614da184828501614504565b5f8301525092915050565b5f60208284031215614dc157614dc06137ba565b5b5f614dce84828501614d73565b91505092915050565b602082015f820151614deb5f8501826138db565b50505050565b5f602082019050614e045f830184614dd7565b92915050565b5f608083015f830151614e1f5f860182613884565b506020830151614e3260208601826138c3565b506040830151614e4560408601826138c3565b5060608301518482036060860152614e5d82826145e4565b9150508091505092915050565b5f6020820190508181035f830152614e828184614e0a565b905092915050565b5f60608284031215614e9f57614e9e614332565b5b614ea96060614394565b90505f614eb884828501614504565b5f830152506020614ecb84828501614504565b602083015250604082015167ffffffffffffffff811115614eef57614eee6143ae565b5b614efb848285016147ad565b60408301525092915050565b5f60208284031215614f1c57614f1b6137ba565b5b5f82015167ffffffffffffffff811115614f3957614f386137be565b5b614f4584828501614e8a565b91505092915050565b5f606083015f830151614f635f8601826138db565b506020830151614f7660208601826138db565b5060408301518482036040860152614f8e82826145e4565b9150508091505092915050565b5f6020820190508181035f830152614fb38184614f4e565b905092915050565b5f8060408385031215614fd157614fd06137ba565b5b5f614fde85828601614504565b925050602083015167ffffffffffffffff811115614fff57614ffe6137be565b5b61500b858286016147ad565b915050925092905056fea26469706673582212203580a1d8ccee15c9bebb899877d678d5be9a5409bd783ba5aada109aa42bf6cc64736f6c634300081a0033";
|
|
28
|
+
function T(c) {
|
|
29
|
+
const b = c.state.current, f = c.state.connections.get(b), e = f == null ? void 0 : f.accounts, a = e == null ? void 0 : e[0], d = c.chains.find((n) => n.id === (f == null ? void 0 : f.chainId)), t = c.state.status;
|
|
30
|
+
switch (t) {
|
|
31
|
+
case "connected":
|
|
32
|
+
return {
|
|
33
|
+
address: a,
|
|
34
|
+
addresses: e,
|
|
35
|
+
chain: d,
|
|
36
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
37
|
+
connector: f == null ? void 0 : f.connector,
|
|
38
|
+
isConnected: !0,
|
|
39
|
+
isConnecting: !1,
|
|
40
|
+
isDisconnected: !1,
|
|
41
|
+
isReconnecting: !1,
|
|
42
|
+
status: t
|
|
43
|
+
};
|
|
44
|
+
case "reconnecting":
|
|
45
|
+
return {
|
|
46
|
+
address: a,
|
|
47
|
+
addresses: e,
|
|
48
|
+
chain: d,
|
|
49
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
50
|
+
connector: f == null ? void 0 : f.connector,
|
|
51
|
+
isConnected: !!a,
|
|
52
|
+
isConnecting: !1,
|
|
53
|
+
isDisconnected: !1,
|
|
54
|
+
isReconnecting: !0,
|
|
55
|
+
status: t
|
|
56
|
+
};
|
|
57
|
+
case "connecting":
|
|
58
|
+
return {
|
|
59
|
+
address: a,
|
|
60
|
+
addresses: e,
|
|
61
|
+
chain: d,
|
|
62
|
+
chainId: f == null ? void 0 : f.chainId,
|
|
63
|
+
connector: f == null ? void 0 : f.connector,
|
|
64
|
+
isConnected: !1,
|
|
65
|
+
isConnecting: !0,
|
|
66
|
+
isDisconnected: !1,
|
|
67
|
+
isReconnecting: !1,
|
|
68
|
+
status: t
|
|
69
|
+
};
|
|
70
|
+
case "disconnected":
|
|
71
|
+
return {
|
|
72
|
+
address: void 0,
|
|
73
|
+
addresses: void 0,
|
|
74
|
+
chain: void 0,
|
|
75
|
+
chainId: void 0,
|
|
76
|
+
connector: void 0,
|
|
77
|
+
isConnected: !1,
|
|
78
|
+
isConnecting: !1,
|
|
79
|
+
isDisconnected: !0,
|
|
80
|
+
isReconnecting: !1,
|
|
81
|
+
status: t
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function Yf(c) {
|
|
86
|
+
return c.state.chainId;
|
|
87
|
+
}
|
|
88
|
+
function j(c, b, f) {
|
|
89
|
+
const e = c[b.name];
|
|
90
|
+
if (typeof e == "function")
|
|
91
|
+
return e;
|
|
92
|
+
const a = c[f];
|
|
93
|
+
return typeof a == "function" ? a : (d) => b(c, d);
|
|
94
|
+
}
|
|
95
|
+
const Jf = "2.13.8", Qf = () => `@wagmi/core@${Jf}`;
|
|
96
|
+
var M = function(c, b, f, e) {
|
|
97
|
+
if (f === "a" && !e) throw new TypeError("Private accessor was defined without a getter");
|
|
98
|
+
if (typeof b == "function" ? c !== b || !e : !b.has(c)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
99
|
+
return f === "m" ? e : f === "a" ? e.call(c) : e ? e.value : b.get(c);
|
|
100
|
+
}, I, V;
|
|
101
|
+
class m extends Error {
|
|
102
|
+
get docsBaseUrl() {
|
|
103
|
+
return "https://wagmi.sh/core";
|
|
104
|
+
}
|
|
105
|
+
get version() {
|
|
106
|
+
return Qf();
|
|
107
|
+
}
|
|
108
|
+
constructor(b, f = {}) {
|
|
109
|
+
var d;
|
|
110
|
+
super(), I.add(this), Object.defineProperty(this, "details", {
|
|
111
|
+
enumerable: !0,
|
|
112
|
+
configurable: !0,
|
|
113
|
+
writable: !0,
|
|
114
|
+
value: void 0
|
|
115
|
+
}), Object.defineProperty(this, "docsPath", {
|
|
116
|
+
enumerable: !0,
|
|
117
|
+
configurable: !0,
|
|
118
|
+
writable: !0,
|
|
119
|
+
value: void 0
|
|
120
|
+
}), Object.defineProperty(this, "metaMessages", {
|
|
121
|
+
enumerable: !0,
|
|
122
|
+
configurable: !0,
|
|
123
|
+
writable: !0,
|
|
124
|
+
value: void 0
|
|
125
|
+
}), Object.defineProperty(this, "shortMessage", {
|
|
126
|
+
enumerable: !0,
|
|
127
|
+
configurable: !0,
|
|
128
|
+
writable: !0,
|
|
129
|
+
value: void 0
|
|
130
|
+
}), Object.defineProperty(this, "name", {
|
|
131
|
+
enumerable: !0,
|
|
132
|
+
configurable: !0,
|
|
133
|
+
writable: !0,
|
|
134
|
+
value: "WagmiCoreError"
|
|
135
|
+
});
|
|
136
|
+
const e = f.cause instanceof m ? f.cause.details : (d = f.cause) != null && d.message ? f.cause.message : f.details, a = f.cause instanceof m && f.cause.docsPath || f.docsPath;
|
|
137
|
+
this.message = [
|
|
138
|
+
b || "An error occurred.",
|
|
139
|
+
"",
|
|
140
|
+
...f.metaMessages ? [...f.metaMessages, ""] : [],
|
|
141
|
+
...a ? [
|
|
142
|
+
`Docs: ${this.docsBaseUrl}${a}.html${f.docsSlug ? `#${f.docsSlug}` : ""}`
|
|
143
|
+
] : [],
|
|
144
|
+
...e ? [`Details: ${e}`] : [],
|
|
145
|
+
`Version: ${this.version}`
|
|
146
|
+
].join(`
|
|
147
|
+
`), f.cause && (this.cause = f.cause), this.details = e, this.docsPath = a, this.metaMessages = f.metaMessages, this.shortMessage = b;
|
|
148
|
+
}
|
|
149
|
+
walk(b) {
|
|
150
|
+
return M(this, I, "m", V).call(this, this, b);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
I = /* @__PURE__ */ new WeakSet(), V = function c(b, f) {
|
|
154
|
+
return f != null && f(b) ? b : b.cause ? M(this, I, "m", c).call(this, b.cause, f) : b;
|
|
155
|
+
};
|
|
156
|
+
class Zf extends m {
|
|
157
|
+
constructor() {
|
|
158
|
+
super("Connector not connected."), Object.defineProperty(this, "name", {
|
|
159
|
+
enumerable: !0,
|
|
160
|
+
configurable: !0,
|
|
161
|
+
writable: !0,
|
|
162
|
+
value: "ConnectorNotConnectedError"
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
class f0 extends m {
|
|
167
|
+
constructor({ address: b, connector: f }) {
|
|
168
|
+
super(`Account "${b}" not found for connector "${f.name}".`), Object.defineProperty(this, "name", {
|
|
169
|
+
enumerable: !0,
|
|
170
|
+
configurable: !0,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: "ConnectorAccountNotFoundError"
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
class b0 extends m {
|
|
177
|
+
constructor({ connectionChainId: b, connectorChainId: f }) {
|
|
178
|
+
super(`The current chain of the connector (id: ${f}) does not match the connection's chain (id: ${b}).`, {
|
|
179
|
+
metaMessages: [
|
|
180
|
+
`Current Chain ID: ${f}`,
|
|
181
|
+
`Expected Chain ID: ${b}`
|
|
182
|
+
]
|
|
183
|
+
}), Object.defineProperty(this, "name", {
|
|
184
|
+
enumerable: !0,
|
|
185
|
+
configurable: !0,
|
|
186
|
+
writable: !0,
|
|
187
|
+
value: "ConnectorChainMismatchError"
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
class e0 extends m {
|
|
192
|
+
constructor({ connector: b }) {
|
|
193
|
+
super(`Connector "${b.name}" unavailable while reconnecting.`, {
|
|
194
|
+
details: [
|
|
195
|
+
"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uuid`.",
|
|
196
|
+
"All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
|
|
197
|
+
"This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
|
|
198
|
+
].join(" ")
|
|
199
|
+
}), Object.defineProperty(this, "name", {
|
|
200
|
+
enumerable: !0,
|
|
201
|
+
configurable: !0,
|
|
202
|
+
writable: !0,
|
|
203
|
+
value: "ConnectorUnavailableReconnectingError"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
async function q(c, b = {}) {
|
|
208
|
+
let f;
|
|
209
|
+
if (b.connector) {
|
|
210
|
+
const { connector: i } = b;
|
|
211
|
+
if (c.state.status === "reconnecting" && !i.getAccounts && !i.getChainId)
|
|
212
|
+
throw new e0({ connector: i });
|
|
213
|
+
const [g, w] = await Promise.all([
|
|
214
|
+
i.getAccounts(),
|
|
215
|
+
i.getChainId()
|
|
216
|
+
]);
|
|
217
|
+
f = {
|
|
218
|
+
accounts: g,
|
|
219
|
+
chainId: w,
|
|
220
|
+
connector: i
|
|
221
|
+
};
|
|
222
|
+
} else
|
|
223
|
+
f = c.state.connections.get(c.state.current);
|
|
224
|
+
if (!f)
|
|
225
|
+
throw new Zf();
|
|
226
|
+
const e = b.chainId ?? f.chainId, a = await f.connector.getChainId();
|
|
227
|
+
if (a !== f.chainId)
|
|
228
|
+
throw new b0({
|
|
229
|
+
connectionChainId: f.chainId,
|
|
230
|
+
connectorChainId: a
|
|
231
|
+
});
|
|
232
|
+
const d = f.connector;
|
|
233
|
+
if (d.getClient)
|
|
234
|
+
return d.getClient({ chainId: e });
|
|
235
|
+
const t = Hf(b.account ?? f.accounts[0]);
|
|
236
|
+
if (t.address = Kf(t.address), b.account && !f.accounts.some((i) => i.toLowerCase() === t.address.toLowerCase()))
|
|
237
|
+
throw new f0({
|
|
238
|
+
address: t.address,
|
|
239
|
+
connector: d
|
|
240
|
+
});
|
|
241
|
+
const n = c.chains.find((i) => i.id === e), s = await f.connector.getProvider({ chainId: e });
|
|
242
|
+
return of({
|
|
243
|
+
account: t,
|
|
244
|
+
chain: n,
|
|
245
|
+
name: "Connector Client",
|
|
246
|
+
transport: (i) => rf(s)({ ...i, retryCount: 0 })
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
async function a0(c, b) {
|
|
250
|
+
const { abi: f, chainId: e, connector: a, ...d } = b;
|
|
251
|
+
let t;
|
|
252
|
+
b.account ? t = b.account : t = (await q(c, {
|
|
253
|
+
chainId: e,
|
|
254
|
+
connector: a
|
|
255
|
+
})).account;
|
|
256
|
+
const n = c.getClient({ chainId: e }), s = j(n, Gf, "simulateContract"), { result: i, request: g } = await s({ ...d, abi: f, account: t });
|
|
257
|
+
return {
|
|
258
|
+
chainId: n.chain.id,
|
|
259
|
+
result: i,
|
|
260
|
+
request: { __mode: "prepared", ...g, chainId: e }
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
async function x(c, b) {
|
|
264
|
+
const { account: f, chainId: e, connector: a, __mode: d, ...t } = b;
|
|
265
|
+
let n;
|
|
266
|
+
typeof f == "object" && f.type === "local" ? n = c.getClient({ chainId: e }) : n = await q(c, { account: f, chainId: e, connector: a });
|
|
267
|
+
const { connector: s } = T(c);
|
|
268
|
+
let i;
|
|
269
|
+
if (d === "prepared" || s != null && s.supportsSimulation)
|
|
270
|
+
i = t;
|
|
271
|
+
else {
|
|
272
|
+
const { request: o } = await a0(c, {
|
|
273
|
+
...t,
|
|
274
|
+
account: f,
|
|
275
|
+
chainId: e
|
|
276
|
+
});
|
|
277
|
+
i = o;
|
|
278
|
+
}
|
|
279
|
+
return await j(n, Wf, "writeContract")({
|
|
280
|
+
...i,
|
|
281
|
+
...f ? { account: f } : {},
|
|
282
|
+
chain: e ? { id: e } : null
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function c0(c) {
|
|
286
|
+
return c.address !== void 0 && typeof c.address == "object" ? (b, f) => {
|
|
287
|
+
var t;
|
|
288
|
+
const e = Yf(b), a = T(b);
|
|
289
|
+
let d;
|
|
290
|
+
return f.chainId ? d = f.chainId : f.account && f.account === a.address || f.account === void 0 ? d = a.chainId : d = e, x(b, {
|
|
291
|
+
...f,
|
|
292
|
+
...c.functionName ? { functionName: c.functionName } : {},
|
|
293
|
+
address: d ? (t = c.address) == null ? void 0 : t[d] : void 0,
|
|
294
|
+
abi: c.abi
|
|
295
|
+
});
|
|
296
|
+
} : (b, f) => x(b, {
|
|
297
|
+
...f,
|
|
298
|
+
...c.address ? { address: c.address } : {},
|
|
299
|
+
...c.functionName ? { functionName: c.functionName } : {},
|
|
300
|
+
abi: c.abi
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
const d0 = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610062575f80fd5b5061007161007660201b60201c565b61010b565b5f6100856100e260201b60201c565b90508054600181161561009f5763f92ee8a95f526004601cfd5b8160c01c808260011c146100dd578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b612b11806101185f395ff3fe608060405260043610610203575f3560e01c8063715018a611610117578063d54ad2a11161009f578063ec87621c1161006e578063ec87621c14610707578063f04e283e14610731578063f2fde38b1461074d578063fe9fbb8014610769578063fee81cf4146107a557610203565b8063d54ad2a11461064f578063db09da1214610679578063dcc59b6f146106b5578063e6670829146106df57610203565b80638da5cb5b116100e65780638da5cb5b14610559578063a4d66daf14610583578063a871ced2146105ad578063bb1757cf146105d7578063c884ef831461061357610203565b8063715018a6146104d057806375b238fc146104da578063775486871461050457806380fd60051461053157610203565b80632de948071161019a578063474f5a4411610169578063474f5a44146103f55780634a4ee7b1146104325780634e7165a21461044e578063514e62fc1461048a57806354d1f13d146104c657610203565b80632de948071461033f57806338d52e0f1461037b5780634359d28a146103a5578063439fab91146103cd57610203565b80631cd64df4116101d65780631cd64df4146102a5578063228cb733146102e1578063256929621461030b57806328d6183b1461031557610203565b806301ffc9a71461020757806307621eca14610243578063183a4f6e1461026d5780631c10893f14610289575b5f80fd5b348015610212575f80fd5b5061022d60048036038101906102289190611abd565b6107e1565b60405161023a9190611b02565b60405180910390f35b34801561024e575f80fd5b5061025761085a565b6040516102649190611b33565b60405180910390f35b61028760048036038101906102829190611b76565b610863565b005b6102a3600480360381019061029e9190611bfb565b610870565b005b3480156102b0575f80fd5b506102cb60048036038101906102c69190611bfb565b610886565b6040516102d89190611b02565b60405180910390f35b3480156102ec575f80fd5b506102f561089c565b6040516103029190611b33565b60405180910390f35b6103136108a2565b005b348015610320575f80fd5b506103296108f3565b6040516103369190611c48565b60405180910390f35b34801561034a575f80fd5b5061036560048036038101906103609190611c61565b61091a565b6040516103729190611b33565b60405180910390f35b348015610386575f80fd5b5061038f610933565b60405161039c9190611c9b565b60405180910390f35b3480156103b0575f80fd5b506103cb60048036038101906103c69190611d6a565b610956565b005b3480156103d8575f80fd5b506103f360048036038101906103ee9190611e3d565b610a64565b005b348015610400575f80fd5b5061041b60048036038101906104169190611e3d565b610ccc565b604051610429929190611e88565b60405180910390f35b61044c60048036038101906104479190611bfb565b610e30565b005b348015610459575f80fd5b50610474600480360381019061046f9190611e3d565b610e46565b6040516104819190611f1f565b60405180910390f35b348015610495575f80fd5b506104b060048036038101906104ab9190611bfb565b610f14565b6040516104bd9190611b02565b60405180910390f35b6104ce610f2b565b005b6104d8610f64565b005b3480156104e5575f80fd5b506104ee610f77565b6040516104fb9190611b33565b60405180910390f35b34801561050f575f80fd5b50610518610f7c565b6040516105289493929190611fe5565b60405180910390f35b34801561053c575f80fd5b506105576004803603810190610552919061207d565b610fd1565b005b348015610564575f80fd5b5061056d611087565b60405161057a9190611c9b565b60405180910390f35b34801561058e575f80fd5b506105976110af565b6040516105a49190611b33565b60405180910390f35b3480156105b8575f80fd5b506105c16110b5565b6040516105ce919061218a565b60405180910390f35b3480156105e2575f80fd5b506105fd60048036038101906105f891906121a3565b611184565b60405161060a9190611b02565b60405180910390f35b34801561061e575f80fd5b5061063960048036038101906106349190611c61565b611378565b6040516106469190611b02565b60405180910390f35b34801561065a575f80fd5b50610663611395565b6040516106709190611b33565b60405180910390f35b348015610684575f80fd5b5061069f600480360381019061069a91906121a3565b61139b565b6040516106ac9190611b02565b60405180910390f35b3480156106c0575f80fd5b506106c96113ae565b6040516106d69190611b33565b60405180910390f35b3480156106ea575f80fd5b506107056004803603810190610700919061207d565b6113b4565b005b348015610712575f80fd5b5061071b61146a565b6040516107289190611b33565b60405180910390f35b61074b60048036038101906107469190611c61565b61146f565b005b61076760048036038101906107629190611c61565b6114ad565b005b348015610774575f80fd5b5061078f600480360381019061078a9190611c61565b6114d6565b60405161079c9190611b02565b60405180910390f35b3480156107b0575f80fd5b506107cb60048036038101906107c69190611c61565b611529565b6040516107d89190611b33565b60405180910390f35b5f7f90318111000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610853575061085282611542565b5b9050919050565b5f600254905090565b61086d33826115bb565b50565b6108786115ca565b6108828282611601565b5050565b5f81826108928561091a565b1614905092915050565b60025481565b5f6108ab611611565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f9031811100000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026109618161161b565b8282905085859050146109a0576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610a5c575f8484838181106109c1576109c0612200565b5b90506020020160208101906109d69190612257565b90506001151581151503610a1b57610a168787848181106109fa576109f9612200565b5b9050602002016020810190610a0f9190611c61565b6001611601565b610a4e565b610a4d878784818110610a3157610a30612200565b5b9050602002016020810190610a469190611c61565b60016115bb565b5b5080806001019150506109a2565b505050505050565b5f610a6d611650565b90508054600382558015610a9f5760018160011c14303b10610a965763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610aa933611679565b5f8383810190610ab99190612463565b90505f815f015190505f826020015190505f836040015190505f846060015190505f8203610b13576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f610b3d308673ffffffffffffffffffffffffffffffffffffffff1661174f90919063ffffffff16565b905082811015610b8b57855f015181846040517f5c54305e000000000000000000000000000000000000000000000000000000008152600401610b829392919061248e565b60405180910390fd5b845f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600281905550826004819055505f6005819055508160065f820151815f015f6101000a81548160ff02191690836001811115610c0a57610c09611f3f565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050610c8c33611679565b5050505050508015610cc7576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610cd981611782565b5f8585810190610ce991906125dc565b90505f8160200151806020019051810190610d049190612637565b90508060045f828254610d17919061268f565b92505081905550610d6b825f0151825f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117a99092919063ffffffff16565b815f015173ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d35f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16845f015184604051602001610ddd93929190612727565b604051602081830303815290604052604051610df99190611f1f565b60405180910390a2805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16945094505050509250929050565b610e386115ca565b610e4282826115bb565b5050565b60605f808484810190610e59919061279e565b9250509150604051806080016040528060016002811115610e7d57610e7c611f3f565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610ed99190612817565b604051602081830303815290604052815250604051602001610efb919061291e565b6040516020818303038152906040529250505092915050565b5f8082610f208561091a565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610f6c6115ca565b610f755f6117f2565b565b600281565b6006805f015f9054906101000a900460ff1690806001015490806002015f9054906101000a900460ff16908060020160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b6002610fdc8161161b565b82829050858590501461101b576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8585905081101561107f5761107286868381811061103e5761103d612200565b5b90506020020160208101906110539190611c61565b85858481811061106657611065612200565b5b905060200201356115bb565b808060010191505061101d565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b6110bd611a05565b60066040518060800160405290815f82015f9054906101000a900460ff1660018111156110ed576110ec611f3f565b5b60018111156110ff576110fe611f3f565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b5f61118d6115ca565b5f838381019061119d91906129c3565b90505f81602001518060200190518101906111b89190612637565b90505f6111c4876118b8565b6111fa576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6002540361120b5781905061122f565b670de0b6b3a7640000826002546112229190612a0a565b61122c9190612a78565b90505b600454816005546112409190612aa8565b1115611278576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f8282546112899190612aa8565b925050819055506112da87825f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117a99092919063ffffffff16565b8673ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d35f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff16898460405160200161134693929190612727565b6040516020818303038152906040526040516113629190611f1f565b60405180910390a2600193505050509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b60055481565b5f6113a5846118b8565b90509392505050565b60015481565b60026113bf8161161b565b8282905085859050146113fe576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b858590508110156114625761145586868381811061142157611420612200565b5b90506020020160208101906114369190611c61565b85858481811061144957611448612200565b5b90506020020135611601565b8080600101915050611400565b505050505050565b600181565b6114776115ca565b63389a75e1600c52805f526020600c20805442111561149d57636f5e88185f526004601cfd5b5f8155506114aa816117f2565b50565b6114b56115ca565b8060601b6114ca57637448fbae5f526004601cfd5b6114d3816117f2565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff166114f6611087565b73ffffffffffffffffffffffffffffffffffffffff1614806115225750611521826002600117610f14565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806115b457506115b3826118c7565b5b9050919050565b6115c682825f611940565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146115ff576382b429005f526004601cfd5b565b61160d82826001611940565b5050565b5f6202a300905090565b638b78c6d81954331461164d57638b78c6d8600c52335f52806020600c20541661164c576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611681611998565b156116f9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156116bb57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35061174c565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b638b78c6d8600c52335f52806020600c2054166117a6576382b429005f526004601cfd5b50565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166117e9576390b8ec185f526004601cfd5b5f603452505050565b6117fa611998565b1561185f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506118b5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f600454600554109050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061193957506119388261199c565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361196257848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60405180608001604052805f6001811115611a2357611a22611f3f565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a9c81611a68565b8114611aa6575f80fd5b50565b5f81359050611ab781611a93565b92915050565b5f60208284031215611ad257611ad1611a60565b5b5f611adf84828501611aa9565b91505092915050565b5f8115159050919050565b611afc81611ae8565b82525050565b5f602082019050611b155f830184611af3565b92915050565b5f819050919050565b611b2d81611b1b565b82525050565b5f602082019050611b465f830184611b24565b92915050565b611b5581611b1b565b8114611b5f575f80fd5b50565b5f81359050611b7081611b4c565b92915050565b5f60208284031215611b8b57611b8a611a60565b5b5f611b9884828501611b62565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611bca82611ba1565b9050919050565b611bda81611bc0565b8114611be4575f80fd5b50565b5f81359050611bf581611bd1565b92915050565b5f8060408385031215611c1157611c10611a60565b5b5f611c1e85828601611be7565b9250506020611c2f85828601611b62565b9150509250929050565b611c4281611a68565b82525050565b5f602082019050611c5b5f830184611c39565b92915050565b5f60208284031215611c7657611c75611a60565b5b5f611c8384828501611be7565b91505092915050565b611c9581611bc0565b82525050565b5f602082019050611cae5f830184611c8c565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112611cd557611cd4611cb4565b5b8235905067ffffffffffffffff811115611cf257611cf1611cb8565b5b602083019150836020820283011115611d0e57611d0d611cbc565b5b9250929050565b5f8083601f840112611d2a57611d29611cb4565b5b8235905067ffffffffffffffff811115611d4757611d46611cb8565b5b602083019150836020820283011115611d6357611d62611cbc565b5b9250929050565b5f805f8060408587031215611d8257611d81611a60565b5b5f85013567ffffffffffffffff811115611d9f57611d9e611a64565b5b611dab87828801611cc0565b9450945050602085013567ffffffffffffffff811115611dce57611dcd611a64565b5b611dda87828801611d15565b925092505092959194509250565b5f8083601f840112611dfd57611dfc611cb4565b5b8235905067ffffffffffffffff811115611e1a57611e19611cb8565b5b602083019150836001820283011115611e3657611e35611cbc565b5b9250929050565b5f8060208385031215611e5357611e52611a60565b5b5f83013567ffffffffffffffff811115611e7057611e6f611a64565b5b611e7c85828601611de8565b92509250509250929050565b5f604082019050611e9b5f830185611b24565b611ea86020830184611c8c565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611ef182611eaf565b611efb8185611eb9565b9350611f0b818560208601611ec9565b611f1481611ed7565b840191505092915050565b5f6020820190508181035f830152611f378184611ee7565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611f7d57611f7c611f3f565b5b50565b5f819050611f8d82611f6c565b919050565b5f611f9c82611f80565b9050919050565b611fac81611f92565b82525050565b5f819050919050565b611fc481611fb2565b82525050565b5f60ff82169050919050565b611fdf81611fca565b82525050565b5f608082019050611ff85f830187611fa3565b6120056020830186611fbb565b6120126040830185611fd6565b61201f6060830184611c8c565b95945050505050565b5f8083601f84011261203d5761203c611cb4565b5b8235905067ffffffffffffffff81111561205a57612059611cb8565b5b60208301915083602082028301111561207657612075611cbc565b5b9250929050565b5f805f806040858703121561209557612094611a60565b5b5f85013567ffffffffffffffff8111156120b2576120b1611a64565b5b6120be87828801611cc0565b9450945050602085013567ffffffffffffffff8111156120e1576120e0611a64565b5b6120ed87828801612028565b925092505092959194509250565b61210481611f92565b82525050565b61211381611fb2565b82525050565b61212281611fca565b82525050565b61213181611bc0565b82525050565b608082015f82015161214b5f8501826120fb565b50602082015161215e602085018261210a565b5060408201516121716040850182612119565b5060608201516121846060850182612128565b50505050565b5f60808201905061219d5f830184612137565b92915050565b5f805f604084860312156121ba576121b9611a60565b5b5f6121c786828701611be7565b935050602084013567ffffffffffffffff8111156121e8576121e7611a64565b5b6121f486828701611de8565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61223681611ae8565b8114612240575f80fd5b50565b5f813590506122518161222d565b92915050565b5f6020828403121561226c5761226b611a60565b5b5f61227984828501612243565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6122bc82611ed7565b810181811067ffffffffffffffff821117156122db576122da612286565b5b80604052505050565b5f6122ed611a57565b90506122f982826122b3565b919050565b5f80fd5b6002811061230e575f80fd5b50565b5f8135905061231f81612302565b92915050565b61232e81611fb2565b8114612338575f80fd5b50565b5f8135905061234981612325565b92915050565b61235881611fca565b8114612362575f80fd5b50565b5f813590506123738161234f565b92915050565b5f6080828403121561238e5761238d612282565b5b61239860806122e4565b90505f6123a784828501612311565b5f8301525060206123ba8482850161233b565b60208301525060406123ce84828501612365565b60408301525060606123e284828501611be7565b60608301525092915050565b5f60e0828403121561240357612402612282565b5b61240d60806122e4565b90505f61241c84828501611be7565b5f83015250602061242f84828501611b62565b602083015250604061244384828501611b62565b604083015250606061245784828501612379565b60608301525092915050565b5f60e0828403121561247857612477611a60565b5b5f612485848285016123ee565b91505092915050565b5f6060820190506124a15f830186611c8c565b6124ae6020830185611b24565b6124bb6040830184611b24565b949350505050565b5f80fd5b5f67ffffffffffffffff8211156124e1576124e0612286565b5b6124ea82611ed7565b9050602081019050919050565b828183375f83830152505050565b5f612517612512846124c7565b6122e4565b905082815260208101848484011115612533576125326124c3565b5b61253e8482856124f7565b509392505050565b5f82601f83011261255a57612559611cb4565b5b813561256a848260208601612505565b91505092915050565b5f6040828403121561258857612587612282565b5b61259260406122e4565b90505f6125a184828501611be7565b5f83015250602082013567ffffffffffffffff8111156125c4576125c36122fe565b5b6125d084828501612546565b60208301525092915050565b5f602082840312156125f1576125f0611a60565b5b5f82013567ffffffffffffffff81111561260e5761260d611a64565b5b61261a84828501612573565b91505092915050565b5f8151905061263181611b4c565b92915050565b5f6020828403121561264c5761264b611a60565b5b5f61265984828501612623565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61269982611b1b565b91506126a483611b1b565b92508282039050818111156126bc576126bb612662565b5b92915050565b5f8160601b9050919050565b5f6126d8826126c2565b9050919050565b5f6126e9826126ce565b9050919050565b6127016126fc82611bc0565b6126df565b82525050565b5f819050919050565b61272161271c82611b1b565b612707565b82525050565b5f61273282866126f0565b60148201915061274282856126f0565b6014820191506127528284612710565b602082019150819050949350505050565b5f61276d82611ba1565b9050919050565b61277d81612763565b8114612787575f80fd5b50565b5f8135905061279881612774565b92915050565b5f805f606084860312156127b5576127b4611a60565b5b5f6127c28682870161278a565b93505060206127d386828701611b62565b92505060406127e486828701611b62565b9150509250925092565b6127f781611b1b565b82525050565b602082015f8201516128115f8501826127ee565b50505050565b5f60208201905061282a5f8301846127fd565b92915050565b6003811061284157612840611f3f565b5b50565b5f81905061285182612830565b919050565b5f61286082612844565b9050919050565b61287081612856565b82525050565b5f82825260208201905092915050565b5f61289082611eaf565b61289a8185612876565b93506128aa818560208601611ec9565b6128b381611ed7565b840191505092915050565b5f608083015f8301516128d35f860182612867565b5060208301516128e66020860182612128565b5060408301516128f96040860182612128565b50606083015184820360608601526129118282612886565b9150508091505092915050565b5f6020820190508181035f83015261293681846128be565b905092915050565b5f6040828403121561295357612952612282565b5b61295d60406122e4565b90505f82013567ffffffffffffffff81111561297c5761297b6122fe565b5b61298884828501612546565b5f83015250602082013567ffffffffffffffff8111156129ab576129aa6122fe565b5b6129b784828501612546565b60208301525092915050565b5f602082840312156129d8576129d7611a60565b5b5f82013567ffffffffffffffff8111156129f5576129f4611a64565b5b612a018482850161293e565b91505092915050565b5f612a1482611b1b565b9150612a1f83611b1b565b9250828202612a2d81611b1b565b91508282048414831517612a4457612a43612662565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612a8282611b1b565b9150612a8d83611b1b565b925082612a9d57612a9c612a4b565b5b828204905092915050565b5f612ab282611b1b565b9150612abd83611b1b565b9250828201905080821115612ad557612ad4612662565b5b9291505056fea2646970667358221220ba55e60a6a2fc2b8adce3a15e2d9022755a6bff864a799f9c63dbf918ad37c5264736f6c634300081a0033", B = class B extends $f {
|
|
304
|
+
constructor() {
|
|
305
|
+
super(...arguments), this.abi = R;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
*Functions from the ERC20VariableIncentive contract
|
|
309
|
+
*/
|
|
310
|
+
/**
|
|
311
|
+
* Fetches the IncentiveCriteria struct from the contract
|
|
312
|
+
*
|
|
313
|
+
* @returns {Promise<IncentiveCriteria>} Incentive criteria structure
|
|
314
|
+
* @throws {IncentiveCriteriaNotFoundError}
|
|
315
|
+
*/
|
|
316
|
+
async getIncentiveCriteria() {
|
|
317
|
+
try {
|
|
318
|
+
return await k(
|
|
319
|
+
this._config,
|
|
320
|
+
{
|
|
321
|
+
address: this.assertValidAddress()
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
} catch (b) {
|
|
325
|
+
throw new xf(b);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Fetches the incentive scalar from a transaction hash
|
|
330
|
+
*
|
|
331
|
+
* @param {GetIncentiveScalarParams} params
|
|
332
|
+
* @returns {Promise<bigint>}
|
|
333
|
+
* @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}
|
|
334
|
+
*/
|
|
335
|
+
async getIncentiveScalar({
|
|
336
|
+
hash: b
|
|
337
|
+
}) {
|
|
338
|
+
var a;
|
|
339
|
+
const f = await this.getIncentiveCriteria(), e = await tf(this._config, {
|
|
340
|
+
hash: b
|
|
341
|
+
});
|
|
342
|
+
if (f.criteriaType === F.EVENT) {
|
|
343
|
+
const t = (await N(this._config, {
|
|
344
|
+
hash: b
|
|
345
|
+
})).logs;
|
|
346
|
+
if (t.length === 0)
|
|
347
|
+
throw new $(
|
|
348
|
+
`No logs found for event signature ${f.signature}`
|
|
349
|
+
);
|
|
350
|
+
try {
|
|
351
|
+
const n = vf.abi[f.signature], s = A({
|
|
352
|
+
abi: [n],
|
|
353
|
+
logs: t
|
|
354
|
+
});
|
|
355
|
+
if (s == null || s.length === 0)
|
|
356
|
+
throw new $(
|
|
357
|
+
`No logs found for event signature ${f.signature}`
|
|
358
|
+
);
|
|
359
|
+
const i = ((a = s[0]) == null ? void 0 : a.args)[f.fieldIndex];
|
|
360
|
+
if (i === void 0)
|
|
361
|
+
throw new y(
|
|
362
|
+
`Decoded argument at index ${f.fieldIndex} is undefined`
|
|
363
|
+
);
|
|
364
|
+
return BigInt(i);
|
|
365
|
+
} catch (n) {
|
|
366
|
+
throw new y(
|
|
367
|
+
`Failed to decode event log for signature ${f.signature}: ${n.message}`
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
} else if (f.criteriaType === F.FUNC)
|
|
371
|
+
try {
|
|
372
|
+
const d = mf.abi[f.signature], n = uf({
|
|
373
|
+
abi: [d],
|
|
374
|
+
data: e.input
|
|
375
|
+
}).args[f.fieldIndex];
|
|
376
|
+
if (n == null)
|
|
377
|
+
throw new y(
|
|
378
|
+
`Decoded argument at index ${f.fieldIndex} is undefined`
|
|
379
|
+
);
|
|
380
|
+
return BigInt(n);
|
|
381
|
+
} catch (d) {
|
|
382
|
+
throw new y(
|
|
383
|
+
`Failed to decode function data for signature ${f.signature}: ${d.message}`
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
else
|
|
387
|
+
throw new Lf(
|
|
388
|
+
`Invalid criteria type ${f.criteriaType}`
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* @inheritdoc
|
|
393
|
+
*
|
|
394
|
+
* @public
|
|
395
|
+
* @param {?ERC20VariableCriteriaIncentivePayload} [_payload]
|
|
396
|
+
* @param {?DeployableOptions} [_options]
|
|
397
|
+
* @returns {GenericDeployableParams}
|
|
398
|
+
*/
|
|
399
|
+
buildParameters(b, f) {
|
|
400
|
+
const [e, a] = this.validateDeploymentConfig(
|
|
401
|
+
b,
|
|
402
|
+
f
|
|
403
|
+
);
|
|
404
|
+
return {
|
|
405
|
+
abi: R,
|
|
406
|
+
bytecode: d0,
|
|
407
|
+
args: [t0(e)],
|
|
408
|
+
...this.optionallyAttachAccount(a.account)
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
B.bases = {
|
|
413
|
+
...gf
|
|
414
|
+
};
|
|
415
|
+
let P = B;
|
|
416
|
+
function t0({
|
|
417
|
+
asset: c,
|
|
418
|
+
reward: b,
|
|
419
|
+
limit: f,
|
|
420
|
+
criteria: e
|
|
421
|
+
}) {
|
|
422
|
+
return lf(
|
|
423
|
+
[
|
|
424
|
+
{
|
|
425
|
+
type: "tuple",
|
|
426
|
+
name: "initPayloadExtended",
|
|
427
|
+
components: [
|
|
428
|
+
{ type: "address", name: "asset" },
|
|
429
|
+
{ type: "uint256", name: "reward" },
|
|
430
|
+
{ type: "uint256", name: "limit" },
|
|
431
|
+
{
|
|
432
|
+
type: "tuple",
|
|
433
|
+
name: "criteria",
|
|
434
|
+
components: [
|
|
435
|
+
{ type: "uint8", name: "criteriaType" },
|
|
436
|
+
{ type: "bytes32", name: "signature" },
|
|
437
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
438
|
+
{ type: "address", name: "targetContract" }
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
[
|
|
445
|
+
{
|
|
446
|
+
asset: c,
|
|
447
|
+
reward: b,
|
|
448
|
+
limit: f,
|
|
449
|
+
criteria: {
|
|
450
|
+
criteriaType: e.criteriaType,
|
|
451
|
+
signature: e.signature,
|
|
452
|
+
fieldIndex: e.fieldIndex,
|
|
453
|
+
targetContract: e.targetContract
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
const N0 = hf("0.000075"), O0 = O[11155111], L = {
|
|
460
|
+
...O,
|
|
461
|
+
31337: void 0
|
|
462
|
+
};
|
|
463
|
+
function n0(c) {
|
|
464
|
+
return c.address;
|
|
465
|
+
}
|
|
466
|
+
function i0(c) {
|
|
467
|
+
return c.registryAddress && c.protocolFeeReceiver;
|
|
468
|
+
}
|
|
469
|
+
const E = class E extends Rf {
|
|
470
|
+
/**
|
|
471
|
+
* A getter that will return Boost core's static addresses by numerical chain ID
|
|
472
|
+
*
|
|
473
|
+
* @public
|
|
474
|
+
* @readonly
|
|
475
|
+
* @type {Record<number, Address>}
|
|
476
|
+
*/
|
|
477
|
+
get addresses() {
|
|
478
|
+
return this.constructor.addresses;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Creates an instance of BoostCore.
|
|
482
|
+
*
|
|
483
|
+
* @constructor
|
|
484
|
+
* @param {BoostCoreConfig} param0
|
|
485
|
+
* @param {Config} param0.config
|
|
486
|
+
* @param {?Account} [param0.account]
|
|
487
|
+
* @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; })} param0....options
|
|
488
|
+
*/
|
|
489
|
+
constructor({ config: b, account: f, ...e }) {
|
|
490
|
+
if (n0(e) && e.address)
|
|
491
|
+
super({ account: f, config: b }, e.address);
|
|
492
|
+
else if (i0(e))
|
|
493
|
+
super({ account: f, config: b }, [
|
|
494
|
+
e.registryAddress,
|
|
495
|
+
e.protocolFeeReceiver
|
|
496
|
+
]);
|
|
497
|
+
else {
|
|
498
|
+
const { address: a } = u(
|
|
499
|
+
b,
|
|
500
|
+
L
|
|
501
|
+
);
|
|
502
|
+
super({ account: f, config: b }, a);
|
|
503
|
+
}
|
|
504
|
+
this.abi = C;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Create a new Boost.
|
|
508
|
+
*
|
|
509
|
+
* @public
|
|
510
|
+
* @async
|
|
511
|
+
* @param {CreateBoostPayload} _boostPayload
|
|
512
|
+
* @param {?DeployableOptions} [_params]
|
|
513
|
+
* @returns {Promise<Boost>}
|
|
514
|
+
*/
|
|
515
|
+
async createBoost(b, f) {
|
|
516
|
+
var _;
|
|
517
|
+
const [e, a] = this.validateDeploymentConfig(b, f), d = ((_ = f == null ? void 0 : f.chain) == null ? void 0 : _.id) || (f == null ? void 0 : f.chainId), { chainId: t, address: n } = u(
|
|
518
|
+
a.config,
|
|
519
|
+
this.addresses,
|
|
520
|
+
d
|
|
521
|
+
), s = c0({
|
|
522
|
+
abi: C,
|
|
523
|
+
functionName: "createBoost",
|
|
524
|
+
address: n
|
|
525
|
+
}), i = await this.prepareCreateBoostPayload(
|
|
526
|
+
n,
|
|
527
|
+
t,
|
|
528
|
+
e,
|
|
529
|
+
a
|
|
530
|
+
), g = await s(a.config, {
|
|
531
|
+
...this.optionallyAttachAccount(a.account),
|
|
532
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
533
|
+
...f,
|
|
534
|
+
chainId: t,
|
|
535
|
+
args: [p(i)]
|
|
536
|
+
}), w = await nf(a.config, {
|
|
537
|
+
hash: g
|
|
538
|
+
}), o = A({
|
|
539
|
+
abi: C,
|
|
540
|
+
eventName: "BoostCreated",
|
|
541
|
+
logs: w.logs
|
|
542
|
+
}).at(0);
|
|
543
|
+
let h = 0n;
|
|
544
|
+
if (!o) throw new Sf();
|
|
545
|
+
h = o == null ? void 0 : o.args.boostId;
|
|
546
|
+
const l = await this.readBoost(h);
|
|
547
|
+
return new D({
|
|
548
|
+
id: h,
|
|
549
|
+
budget: e.budget.at(l.budget),
|
|
550
|
+
action: e.action.at(l.action),
|
|
551
|
+
validator: e.validator.at(l.validator),
|
|
552
|
+
allowList: e.allowList.at(l.allowList),
|
|
553
|
+
incentives: e.incentives.map(
|
|
554
|
+
(z, U) => (
|
|
555
|
+
// biome-ignore lint/style/noNonNullAssertion: this will never be undefined
|
|
556
|
+
z.at(l.incentives.at(U))
|
|
557
|
+
)
|
|
558
|
+
),
|
|
559
|
+
protocolFee: l.protocolFee,
|
|
560
|
+
maxParticipants: l.maxParticipants,
|
|
561
|
+
owner: l.owner
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Returns a simulated Boost creation.
|
|
566
|
+
*
|
|
567
|
+
* @public
|
|
568
|
+
* @async
|
|
569
|
+
* @param {CreateBoostPayload} _boostPayload
|
|
570
|
+
* @param {?DeployableOptions} [_params]
|
|
571
|
+
* @returns {Promise<SimulateContractReturnType>}
|
|
572
|
+
*/
|
|
573
|
+
async simulateCreateBoost(b, f) {
|
|
574
|
+
var i;
|
|
575
|
+
const [e, a] = this.validateDeploymentConfig(b, f), d = ((i = f == null ? void 0 : f.chain) == null ? void 0 : i.id) || (f == null ? void 0 : f.chainId), { chainId: t, address: n } = u(
|
|
576
|
+
a.config,
|
|
577
|
+
this.addresses,
|
|
578
|
+
d
|
|
579
|
+
), s = await this.prepareCreateBoostPayload(
|
|
580
|
+
n,
|
|
581
|
+
t,
|
|
582
|
+
e,
|
|
583
|
+
a
|
|
584
|
+
);
|
|
585
|
+
return await G(this._config, {
|
|
586
|
+
...this.optionallyAttachAccount(),
|
|
587
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
588
|
+
...f,
|
|
589
|
+
address: n,
|
|
590
|
+
chainId: t,
|
|
591
|
+
args: [p(s)]
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
// This function mutates payload, which isn't awesome but it's fine
|
|
595
|
+
async prepareCreateBoostPayload(b, f, e, a) {
|
|
596
|
+
var w;
|
|
597
|
+
if (!e.owner && (e.owner = ((w = this._account) == null ? void 0 : w.address) || sf(a.config).address || v, e.owner === v))
|
|
598
|
+
throw new Nf();
|
|
599
|
+
e.validator || (e.validator = this.SignerValidator({
|
|
600
|
+
signers: [e.owner],
|
|
601
|
+
validatorCaller: b
|
|
602
|
+
}));
|
|
603
|
+
let d = v;
|
|
604
|
+
if (e.budget.address) {
|
|
605
|
+
if (d = e.budget.address, !await e.budget.isAuthorized(b))
|
|
606
|
+
throw new Of(b);
|
|
607
|
+
} else
|
|
608
|
+
throw new Tf();
|
|
609
|
+
let t = {
|
|
610
|
+
instance: v,
|
|
611
|
+
isBase: !0,
|
|
612
|
+
parameters: r
|
|
613
|
+
};
|
|
614
|
+
if (e.action.address) {
|
|
615
|
+
const o = e.action.isBase;
|
|
616
|
+
t = {
|
|
617
|
+
isBase: o,
|
|
618
|
+
instance: e.action.address,
|
|
619
|
+
parameters: o ? e.action.buildParameters(void 0, a).args.at(0) || r : r
|
|
620
|
+
};
|
|
621
|
+
} else
|
|
622
|
+
t.parameters = e.action.buildParameters(void 0, a).args.at(0) || r, t.instance = u(
|
|
623
|
+
a.config,
|
|
624
|
+
e.action.bases,
|
|
625
|
+
f
|
|
626
|
+
).address;
|
|
627
|
+
let n = {
|
|
628
|
+
instance: v,
|
|
629
|
+
isBase: !0,
|
|
630
|
+
parameters: r
|
|
631
|
+
};
|
|
632
|
+
if (e.validator.address) {
|
|
633
|
+
const o = e.validator.isBase;
|
|
634
|
+
n = {
|
|
635
|
+
isBase: o,
|
|
636
|
+
instance: e.validator.address,
|
|
637
|
+
parameters: o ? e.validator.buildParameters(void 0, a).args.at(0) || r : r
|
|
638
|
+
};
|
|
639
|
+
} else
|
|
640
|
+
n.parameters = e.validator.buildParameters(void 0, a).args.at(0) || r, n.instance = u(
|
|
641
|
+
a.config,
|
|
642
|
+
e.validator.bases,
|
|
643
|
+
f
|
|
644
|
+
).address;
|
|
645
|
+
let s = {
|
|
646
|
+
instance: v,
|
|
647
|
+
isBase: !0,
|
|
648
|
+
parameters: r
|
|
649
|
+
};
|
|
650
|
+
if (e.allowList.address) {
|
|
651
|
+
const o = e.allowList.isBase;
|
|
652
|
+
s = {
|
|
653
|
+
isBase: o,
|
|
654
|
+
instance: e.allowList.address,
|
|
655
|
+
parameters: o ? r : r
|
|
656
|
+
};
|
|
657
|
+
} else
|
|
658
|
+
s.parameters = e.allowList.buildParameters(void 0, a).args.at(0) || r, s.instance = u(
|
|
659
|
+
a.config,
|
|
660
|
+
e.allowList.bases,
|
|
661
|
+
f
|
|
662
|
+
).address;
|
|
663
|
+
const i = e.incentives.map(() => ({
|
|
664
|
+
instance: v,
|
|
665
|
+
isBase: !0,
|
|
666
|
+
parameters: r
|
|
667
|
+
}));
|
|
668
|
+
for (let o = 0; o < e.incentives.length; o++) {
|
|
669
|
+
const h = e.incentives.at(o);
|
|
670
|
+
if (h.address) {
|
|
671
|
+
const l = h.isBase;
|
|
672
|
+
if (!l) throw new jf(h);
|
|
673
|
+
i[o] = {
|
|
674
|
+
isBase: l,
|
|
675
|
+
instance: h.address,
|
|
676
|
+
parameters: l ? h.buildParameters(void 0, a).args.at(0) || r : r
|
|
677
|
+
};
|
|
678
|
+
} else
|
|
679
|
+
i[o].parameters = h.buildParameters(void 0, a).args.at(0) || r, i[o].instance = u(
|
|
680
|
+
a.config,
|
|
681
|
+
h.bases,
|
|
682
|
+
f
|
|
683
|
+
).address;
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
budget: d,
|
|
687
|
+
action: t,
|
|
688
|
+
validator: n,
|
|
689
|
+
allowList: s,
|
|
690
|
+
incentives: i,
|
|
691
|
+
protocolFee: e.protocolFee || 0n,
|
|
692
|
+
maxParticipants: e.maxParticipants || 0n,
|
|
693
|
+
owner: e.owner
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Claims one incentive from a given `Boost` by `boostId` and `incentiveId`
|
|
698
|
+
*
|
|
699
|
+
* @public
|
|
700
|
+
* @async
|
|
701
|
+
* @param {bigint} boostId
|
|
702
|
+
* @param {bigint} incentiveId
|
|
703
|
+
* @param {Address} address
|
|
704
|
+
* @param {Hex} data
|
|
705
|
+
* @param {?WriteParams} [params]
|
|
706
|
+
* @returns {Promise<void>}
|
|
707
|
+
*/
|
|
708
|
+
async claimIncentive(b, f, e, a, d) {
|
|
709
|
+
return await this.awaitResult(
|
|
710
|
+
this.claimIncentiveRaw(b, f, e, a, d)
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Claim an incentive for a Boost
|
|
715
|
+
*
|
|
716
|
+
* @public
|
|
717
|
+
* @async
|
|
718
|
+
* @param {bigint} boostId - The ID of the Boost
|
|
719
|
+
* @param {bigint} incentiveId - The ID of the Incentive
|
|
720
|
+
* @param {Address} referrer - The address of the referrer (if any)
|
|
721
|
+
* @param {Hex} data- The data for the claim
|
|
722
|
+
* @param {?WriteParams} [params]
|
|
723
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
724
|
+
*/
|
|
725
|
+
async claimIncentiveRaw(b, f, e, a, d) {
|
|
726
|
+
var i;
|
|
727
|
+
const { request: t, result: n } = await W(
|
|
728
|
+
this._config,
|
|
729
|
+
{
|
|
730
|
+
...u(
|
|
731
|
+
this._config,
|
|
732
|
+
this.addresses,
|
|
733
|
+
((i = d == null ? void 0 : d.chain) == null ? void 0 : i.id) || (d == null ? void 0 : d.chainId)
|
|
734
|
+
),
|
|
735
|
+
args: [b, f, e, a],
|
|
736
|
+
...this.optionallyAttachAccount(),
|
|
737
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
738
|
+
...d
|
|
739
|
+
}
|
|
740
|
+
);
|
|
741
|
+
return { hash: await H(this._config, t), result: n };
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`
|
|
745
|
+
*
|
|
746
|
+
* @public
|
|
747
|
+
* @async
|
|
748
|
+
* @param {bigint} boostId
|
|
749
|
+
* @param {bigint} incentiveId
|
|
750
|
+
* @param {Address} referrer
|
|
751
|
+
* @param {Hex} data
|
|
752
|
+
* @param {Address} claimant
|
|
753
|
+
* @param {?WriteParams} [params]
|
|
754
|
+
* @returns {Promise<void>}
|
|
755
|
+
*/
|
|
756
|
+
async claimIncentiveFor(b, f, e, a, d, t) {
|
|
757
|
+
return await this.awaitResult(
|
|
758
|
+
this.claimIncentiveForRaw(
|
|
759
|
+
b,
|
|
760
|
+
f,
|
|
761
|
+
e,
|
|
762
|
+
a,
|
|
763
|
+
d,
|
|
764
|
+
t
|
|
765
|
+
)
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Claim an incentive for a Boost on behalf of another user
|
|
770
|
+
*
|
|
771
|
+
* @public
|
|
772
|
+
* @async
|
|
773
|
+
* @param {bigint} boostId - The ID of the Boost
|
|
774
|
+
* @param {bigint} incentiveId - The ID of the Incentive
|
|
775
|
+
* @param {Address} referrer - The address of the referrer (if any)
|
|
776
|
+
* @param {Hex} data - The data for the claim
|
|
777
|
+
* @param {Address} claimant - The address of the user eligible for the incentive payout
|
|
778
|
+
* @param {?WriteParams} [params]
|
|
779
|
+
* @returns {Promise<{ hash: Hex; result: void; }>}
|
|
780
|
+
*/
|
|
781
|
+
async claimIncentiveForRaw(b, f, e, a, d, t) {
|
|
782
|
+
var g;
|
|
783
|
+
const { request: n, result: s } = await K(
|
|
784
|
+
this._config,
|
|
785
|
+
{
|
|
786
|
+
...u(
|
|
787
|
+
this._config,
|
|
788
|
+
this.addresses,
|
|
789
|
+
((g = t == null ? void 0 : t.chain) == null ? void 0 : g.id) || (t == null ? void 0 : t.chainId)
|
|
790
|
+
),
|
|
791
|
+
args: [b, f, e, a, d],
|
|
792
|
+
...this.optionallyAttachAccount(),
|
|
793
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
794
|
+
...t
|
|
795
|
+
}
|
|
796
|
+
);
|
|
797
|
+
return { hash: await X(this._config, n), result: s };
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Get a Boost by index, will return the raw on chain representation of a Boost.
|
|
801
|
+
*
|
|
802
|
+
* @public
|
|
803
|
+
* @async
|
|
804
|
+
* @param {bigint | string} id
|
|
805
|
+
* @param {?ReadParams} [params]
|
|
806
|
+
* @returns {Promise<RawBoost>}
|
|
807
|
+
* @throws {@link BoostNotFoundError}
|
|
808
|
+
*/
|
|
809
|
+
async readBoost(b, f) {
|
|
810
|
+
var e;
|
|
811
|
+
try {
|
|
812
|
+
let a;
|
|
813
|
+
return typeof b == "string" ? a = BigInt(b) : a = b, await Y(this._config, {
|
|
814
|
+
...u(
|
|
815
|
+
this._config,
|
|
816
|
+
this.addresses,
|
|
817
|
+
f == null ? void 0 : f.chainId
|
|
818
|
+
),
|
|
819
|
+
args: [a],
|
|
820
|
+
...this.optionallyAttachAccount(),
|
|
821
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
822
|
+
...f
|
|
823
|
+
});
|
|
824
|
+
} catch (a) {
|
|
825
|
+
throw (e = a == null ? void 0 : a.message) != null && e.includes("bounds") ? new Mf(String(b)) : a;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* 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`
|
|
830
|
+
*
|
|
831
|
+
* @public
|
|
832
|
+
* @async
|
|
833
|
+
* @param {(string | bigint)} _id
|
|
834
|
+
* @param {?ReadParams} [params]
|
|
835
|
+
* @returns {Promise<Boost>}
|
|
836
|
+
* @throws {@link BoostNotFoundError}
|
|
837
|
+
*/
|
|
838
|
+
async getBoost(b, f) {
|
|
839
|
+
let e;
|
|
840
|
+
typeof b == "string" ? e = BigInt(b) : e = b;
|
|
841
|
+
const { protocolFee: a, maxParticipants: d, owner: t, ...n } = await this.readBoost(e, f), s = {
|
|
842
|
+
config: this._config,
|
|
843
|
+
account: this._account
|
|
844
|
+
}, [i, g, w, o, h] = await Promise.all([
|
|
845
|
+
wf(s, n.action),
|
|
846
|
+
Ef(s, n.budget),
|
|
847
|
+
kf(s, n.validator),
|
|
848
|
+
yf(s, n.allowList),
|
|
849
|
+
Promise.all(
|
|
850
|
+
n.incentives.map(
|
|
851
|
+
(l) => Vf(s, l)
|
|
852
|
+
)
|
|
853
|
+
)
|
|
854
|
+
]);
|
|
855
|
+
return new D({
|
|
856
|
+
id: e,
|
|
857
|
+
action: i,
|
|
858
|
+
budget: g,
|
|
859
|
+
validator: w,
|
|
860
|
+
allowList: o,
|
|
861
|
+
incentives: h,
|
|
862
|
+
protocolFee: a,
|
|
863
|
+
maxParticipants: d,
|
|
864
|
+
owner: t
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Retrieve the total number of deployed Boosts
|
|
869
|
+
*
|
|
870
|
+
* @public
|
|
871
|
+
* @async
|
|
872
|
+
* @param {?ReadParams} [params]
|
|
873
|
+
* @returns {Promise<bigint>}
|
|
874
|
+
*/
|
|
875
|
+
async getBoostCount(b) {
|
|
876
|
+
return await J(this._config, {
|
|
877
|
+
...u(
|
|
878
|
+
this._config,
|
|
879
|
+
this.addresses,
|
|
880
|
+
b == null ? void 0 : b.chainId
|
|
881
|
+
),
|
|
882
|
+
args: [],
|
|
883
|
+
...this.optionallyAttachAccount(),
|
|
884
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
885
|
+
...b
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Checks if an address is authorized
|
|
890
|
+
*
|
|
891
|
+
* @public
|
|
892
|
+
* @async
|
|
893
|
+
* @param {Address} address
|
|
894
|
+
* @param {?ReadParams &
|
|
895
|
+
* ReadParams<typeof iAuthAbi, 'isAuthorized'>} [params]
|
|
896
|
+
* @returns {Promise<boolean>}
|
|
897
|
+
*/
|
|
898
|
+
async isAuthorized(b, f) {
|
|
899
|
+
const e = await this.createBoostAuth(f);
|
|
900
|
+
return Q(this._config, {
|
|
901
|
+
address: e,
|
|
902
|
+
args: [b],
|
|
903
|
+
...this.optionallyAttachAccount(),
|
|
904
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
905
|
+
...f
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Retrieve the address of the current creation auth provider.
|
|
910
|
+
*
|
|
911
|
+
* @public
|
|
912
|
+
* @async
|
|
913
|
+
* @param {?ReadParams} [params]
|
|
914
|
+
* @returns {Promise<Address>}
|
|
915
|
+
*/
|
|
916
|
+
async createBoostAuth(b) {
|
|
917
|
+
return await Z(this._config, {
|
|
918
|
+
...u(
|
|
919
|
+
this._config,
|
|
920
|
+
this.addresses,
|
|
921
|
+
b == null ? void 0 : b.chainId
|
|
922
|
+
),
|
|
923
|
+
args: [],
|
|
924
|
+
...this.optionallyAttachAccount(),
|
|
925
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
926
|
+
...b
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Replace the current auth scheme.
|
|
931
|
+
*
|
|
932
|
+
* @public
|
|
933
|
+
* @async
|
|
934
|
+
* @param {Auth} auth
|
|
935
|
+
* @param {?WriteParams} [params]
|
|
936
|
+
* @returns {Promise<void>}
|
|
937
|
+
*/
|
|
938
|
+
async setCreateBoostAuth(b, f) {
|
|
939
|
+
return await this.awaitResult(
|
|
940
|
+
this.setCreateBoostAuthRaw(b.assertValidAddress(), {
|
|
941
|
+
...f
|
|
942
|
+
})
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Set the createBoostAuth address
|
|
947
|
+
*
|
|
948
|
+
* @public
|
|
949
|
+
* @async
|
|
950
|
+
* @param {Address} address
|
|
951
|
+
* @param {?WriteParams} [params]
|
|
952
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
953
|
+
*/
|
|
954
|
+
async setCreateBoostAuthRaw(b, f) {
|
|
955
|
+
const { request: e, result: a } = await ff(
|
|
956
|
+
this._config,
|
|
957
|
+
{
|
|
958
|
+
...u(
|
|
959
|
+
this._config,
|
|
960
|
+
this.addresses,
|
|
961
|
+
f == null ? void 0 : f.chainId
|
|
962
|
+
),
|
|
963
|
+
args: [b],
|
|
964
|
+
...this.optionallyAttachAccount(),
|
|
965
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
966
|
+
...f
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
return { hash: await bf(this._config, e), result: a };
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* Get the protocol fee.
|
|
973
|
+
*
|
|
974
|
+
* @public
|
|
975
|
+
* @async
|
|
976
|
+
* @param {?ReadParams} [params]
|
|
977
|
+
* @returns {unknown}
|
|
978
|
+
*/
|
|
979
|
+
async protocolFee(b) {
|
|
980
|
+
return await ef(this._config, {
|
|
981
|
+
...u(
|
|
982
|
+
this._config,
|
|
983
|
+
this.addresses,
|
|
984
|
+
b == null ? void 0 : b.chainId
|
|
985
|
+
),
|
|
986
|
+
args: [],
|
|
987
|
+
...this.optionallyAttachAccount(),
|
|
988
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
989
|
+
...b
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* Get the protocol fee receiver.
|
|
994
|
+
*
|
|
995
|
+
* @public
|
|
996
|
+
* @async
|
|
997
|
+
* @param {?ReadParams} [params]
|
|
998
|
+
* @returns {Promise<Address>}
|
|
999
|
+
*/
|
|
1000
|
+
async protocolFeeReceiver(b) {
|
|
1001
|
+
return await af(this._config, {
|
|
1002
|
+
...u(
|
|
1003
|
+
this._config,
|
|
1004
|
+
this.addresses,
|
|
1005
|
+
b == null ? void 0 : b.chainId
|
|
1006
|
+
),
|
|
1007
|
+
args: [],
|
|
1008
|
+
...this.optionallyAttachAccount(),
|
|
1009
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
1010
|
+
...b
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Set the protocol fee receiver address. This function is only callable by the owner.
|
|
1015
|
+
*
|
|
1016
|
+
* @public
|
|
1017
|
+
* @async
|
|
1018
|
+
* @param {Address} address
|
|
1019
|
+
* @param {?WriteParams} [params]
|
|
1020
|
+
* @returns {Promise<void>}
|
|
1021
|
+
*/
|
|
1022
|
+
async setProcolFeeReceiver(b, f) {
|
|
1023
|
+
return await this.awaitResult(
|
|
1024
|
+
this.setProcolFeeReceiverRaw(b, {
|
|
1025
|
+
...f
|
|
1026
|
+
})
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Set the protocol fee receiver address. This function is only callable by the owner.
|
|
1031
|
+
*
|
|
1032
|
+
* @public
|
|
1033
|
+
* @async
|
|
1034
|
+
* @param {Address} address
|
|
1035
|
+
* @param {?WriteParams} [params]
|
|
1036
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
1037
|
+
*/
|
|
1038
|
+
async setProcolFeeReceiverRaw(b, f) {
|
|
1039
|
+
const { request: e, result: a } = await cf(
|
|
1040
|
+
this._config,
|
|
1041
|
+
{
|
|
1042
|
+
...u(
|
|
1043
|
+
this._config,
|
|
1044
|
+
this.addresses,
|
|
1045
|
+
f == null ? void 0 : f.chainId
|
|
1046
|
+
),
|
|
1047
|
+
args: [b],
|
|
1048
|
+
...this.optionallyAttachAccount(),
|
|
1049
|
+
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
1050
|
+
...f
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
1053
|
+
return { hash: await df(
|
|
1054
|
+
this._config,
|
|
1055
|
+
e
|
|
1056
|
+
), result: a };
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Retrieves the claim information from a transaction receipt.
|
|
1060
|
+
*
|
|
1061
|
+
* @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.
|
|
1062
|
+
* @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.
|
|
1063
|
+
*
|
|
1064
|
+
* @description
|
|
1065
|
+
* This method retrieves the transaction receipt using the provided parameters,
|
|
1066
|
+
* then parses the logs to find the 'BoostClaimed' event.
|
|
1067
|
+
* If found, it returns the arguments of the event, which include the boost ID,
|
|
1068
|
+
* incentive ID, claimer address, and claimed amount.
|
|
1069
|
+
*
|
|
1070
|
+
* @example
|
|
1071
|
+
* ```ts
|
|
1072
|
+
* const claimInfo = await boostCore.getClaimFromTransaction({
|
|
1073
|
+
* hash: '0x...',
|
|
1074
|
+
* chainId: 1
|
|
1075
|
+
* });
|
|
1076
|
+
* if (claimInfo) {
|
|
1077
|
+
* console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);
|
|
1078
|
+
* }
|
|
1079
|
+
* ```
|
|
1080
|
+
*/
|
|
1081
|
+
async getClaimFromTransaction(b) {
|
|
1082
|
+
var a;
|
|
1083
|
+
const f = await N(this._config, b);
|
|
1084
|
+
return (a = A({
|
|
1085
|
+
abi: C,
|
|
1086
|
+
eventName: "BoostClaimed",
|
|
1087
|
+
logs: f.logs
|
|
1088
|
+
}).at(0)) == null ? void 0 : a.args;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.
|
|
1092
|
+
*
|
|
1093
|
+
* @example
|
|
1094
|
+
* ```ts
|
|
1095
|
+
* const auth = core.PassthroughAuth('0x') // is roughly equivalent to
|
|
1096
|
+
* const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')
|
|
1097
|
+
* ```
|
|
1098
|
+
* @param {Address} address
|
|
1099
|
+
* @returns {PassthroughAuth}
|
|
1100
|
+
*/
|
|
1101
|
+
PassthroughAuth(b) {
|
|
1102
|
+
return new Bf(
|
|
1103
|
+
{ config: this._config, account: this._account },
|
|
1104
|
+
b
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
// /**
|
|
1108
|
+
// * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
1109
|
+
// *
|
|
1110
|
+
// * @example
|
|
1111
|
+
// * ```ts
|
|
1112
|
+
// * const action = core.ContractAction('0x') // is roughly equivalent to
|
|
1113
|
+
// * const action = new ContractAction({ config: core._config, account: core._account }, '0x')
|
|
1114
|
+
// * ```
|
|
1115
|
+
// * @param {DeployablePayloadOrAddress<ContractActionPayload>} options
|
|
1116
|
+
// * @param {?boolean} [isBase]
|
|
1117
|
+
// * @returns {ContractAction}
|
|
1118
|
+
// */
|
|
1119
|
+
// ContractAction(
|
|
1120
|
+
// options: DeployablePayloadOrAddress<ContractActionPayload>,
|
|
1121
|
+
// isBase?: boolean,
|
|
1122
|
+
// ) {
|
|
1123
|
+
// return new ContractAction(
|
|
1124
|
+
// { config: this._config, account: this._account },
|
|
1125
|
+
// options,
|
|
1126
|
+
// isBase,
|
|
1127
|
+
// );
|
|
1128
|
+
// }
|
|
1129
|
+
/**
|
|
1130
|
+
* Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
1131
|
+
*
|
|
1132
|
+
* @example
|
|
1133
|
+
* ```ts
|
|
1134
|
+
* const action = core.EventAction('0x') // is roughly equivalent to
|
|
1135
|
+
* const action = new EventAction({ config: core._config, account: core._account }, '0x')
|
|
1136
|
+
*/
|
|
1137
|
+
EventAction(b, f) {
|
|
1138
|
+
return new Cf(
|
|
1139
|
+
{ config: this._config, account: this._account },
|
|
1140
|
+
b,
|
|
1141
|
+
f
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
// /**
|
|
1145
|
+
// * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.
|
|
1146
|
+
// *
|
|
1147
|
+
// * @example
|
|
1148
|
+
// * ```ts
|
|
1149
|
+
// * const action = core.ERC721MintAction('0x') // is roughly equivalent to
|
|
1150
|
+
// * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')
|
|
1151
|
+
// * ```
|
|
1152
|
+
// * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options
|
|
1153
|
+
// * @param {?boolean} [isBase]
|
|
1154
|
+
// * @returns {ERC721MintAction}
|
|
1155
|
+
// */
|
|
1156
|
+
// ERC721MintAction(
|
|
1157
|
+
// options: DeployablePayloadOrAddress<ERC721MintActionPayload>,
|
|
1158
|
+
// isBase?: boolean,
|
|
1159
|
+
// ) {
|
|
1160
|
+
// return new ERC721MintAction(
|
|
1161
|
+
// { config: this._config, account: this._account },
|
|
1162
|
+
// options,
|
|
1163
|
+
// isBase,
|
|
1164
|
+
// );
|
|
1165
|
+
// }
|
|
1166
|
+
/**
|
|
1167
|
+
* Bound {@link OpenAllowList} constructor that reuses the same configuration as the Boost Core instance.
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* const list = core.OpenAllowList('0x') // is roughly equivalent to
|
|
1172
|
+
* const list = new OpenAllowList({ config: core._config, account: core._account }, '0x')
|
|
1173
|
+
* ```
|
|
1174
|
+
* @param {?boolean} [isBase]
|
|
1175
|
+
* @returns {OpenAllowList}
|
|
1176
|
+
*/
|
|
1177
|
+
OpenAllowList(b) {
|
|
1178
|
+
return new If(
|
|
1179
|
+
{ config: this._config, account: this._account },
|
|
1180
|
+
void 0,
|
|
1181
|
+
b
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.
|
|
1186
|
+
*
|
|
1187
|
+
* @example
|
|
1188
|
+
* ```ts
|
|
1189
|
+
* const list = core.SimpleAllowList('0x') // is roughly equivalent to
|
|
1190
|
+
* const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')
|
|
1191
|
+
* ```
|
|
1192
|
+
* @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options
|
|
1193
|
+
* @param {?boolean} [isBase]
|
|
1194
|
+
* @returns {SimpleAllowList}
|
|
1195
|
+
*/
|
|
1196
|
+
SimpleAllowList(b, f) {
|
|
1197
|
+
return new Af(
|
|
1198
|
+
{ config: this._config, account: this._account },
|
|
1199
|
+
b,
|
|
1200
|
+
f
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.
|
|
1205
|
+
*
|
|
1206
|
+
* @example
|
|
1207
|
+
* ```ts
|
|
1208
|
+
* const list = core.SimpleDenyList('0x') // is roughly equivalent to
|
|
1209
|
+
* const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')
|
|
1210
|
+
* ```
|
|
1211
|
+
* @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options
|
|
1212
|
+
* @param {?boolean} [isBase]
|
|
1213
|
+
* @returns {SimpleDenyList}
|
|
1214
|
+
*/
|
|
1215
|
+
SimpleDenyList(b, f) {
|
|
1216
|
+
return new Pf(
|
|
1217
|
+
{ config: this._config, account: this._account },
|
|
1218
|
+
b,
|
|
1219
|
+
f
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
// /**
|
|
1223
|
+
// * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
1224
|
+
// *
|
|
1225
|
+
// * @example
|
|
1226
|
+
// * ```ts
|
|
1227
|
+
// * const budget = core.SimpleBudget('0x') // is roughly equivalent to
|
|
1228
|
+
// * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')
|
|
1229
|
+
// * ```
|
|
1230
|
+
// * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options
|
|
1231
|
+
// * @returns {SimpleBudget}
|
|
1232
|
+
// */
|
|
1233
|
+
// SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {
|
|
1234
|
+
// return new SimpleBudget(
|
|
1235
|
+
// { config: this._config, account: this._account },
|
|
1236
|
+
// options,
|
|
1237
|
+
// );
|
|
1238
|
+
// }
|
|
1239
|
+
/**
|
|
1240
|
+
* Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
1241
|
+
*
|
|
1242
|
+
* @example
|
|
1243
|
+
* ```ts
|
|
1244
|
+
* const budget = core.ManagedBudget('0x') // is roughly equivalent to
|
|
1245
|
+
* const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')
|
|
1246
|
+
* ```
|
|
1247
|
+
* @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options
|
|
1248
|
+
* @returns {ManagedBudget}
|
|
1249
|
+
*/
|
|
1250
|
+
ManagedBudget(b) {
|
|
1251
|
+
return new _f(
|
|
1252
|
+
{ config: this._config, account: this._account },
|
|
1253
|
+
b
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
// /**
|
|
1257
|
+
// * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.
|
|
1258
|
+
// *
|
|
1259
|
+
// * @example
|
|
1260
|
+
// * ```ts
|
|
1261
|
+
// * const budget = core.VestingBudget('0x') // is roughly equivalent to
|
|
1262
|
+
// * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')
|
|
1263
|
+
// * ```
|
|
1264
|
+
// * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
|
|
1265
|
+
// * @returns {VestingBudget}
|
|
1266
|
+
// */
|
|
1267
|
+
// VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {
|
|
1268
|
+
// return new VestingBudget(
|
|
1269
|
+
// { config: this._config, account: this._account },
|
|
1270
|
+
// options,
|
|
1271
|
+
// );
|
|
1272
|
+
// }
|
|
1273
|
+
/**
|
|
1274
|
+
* Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1275
|
+
*
|
|
1276
|
+
* @example
|
|
1277
|
+
* ```ts
|
|
1278
|
+
* const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to
|
|
1279
|
+
* const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })
|
|
1280
|
+
* ```
|
|
1281
|
+
* @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options
|
|
1282
|
+
* @returns {VestingBudget}
|
|
1283
|
+
*/
|
|
1284
|
+
AllowListIncentive(b) {
|
|
1285
|
+
return new Ff(
|
|
1286
|
+
{ config: this._config, account: this._account },
|
|
1287
|
+
b
|
|
1288
|
+
);
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* ```ts
|
|
1295
|
+
* const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to
|
|
1296
|
+
* const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })
|
|
1297
|
+
* ```
|
|
1298
|
+
* @param {CGDAIncentivePayload} options
|
|
1299
|
+
* @returns {CGDAIncentive}
|
|
1300
|
+
*/
|
|
1301
|
+
CGDAIncentive(b) {
|
|
1302
|
+
return new pf(
|
|
1303
|
+
{ config: this._config, account: this._account },
|
|
1304
|
+
b
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1309
|
+
*
|
|
1310
|
+
* @example
|
|
1311
|
+
* ```ts
|
|
1312
|
+
* const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to
|
|
1313
|
+
* const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })
|
|
1314
|
+
* ```
|
|
1315
|
+
* @param {ERC20IncentivePayload} options
|
|
1316
|
+
* @returns {ERC20Incentive}
|
|
1317
|
+
*/
|
|
1318
|
+
ERC20Incentive(b) {
|
|
1319
|
+
return new Df(
|
|
1320
|
+
{ config: this._config, account: this._account },
|
|
1321
|
+
b
|
|
1322
|
+
);
|
|
1323
|
+
}
|
|
1324
|
+
// /**
|
|
1325
|
+
// * Temporarily disabled until low level ABI encoding bugs are resolved
|
|
1326
|
+
// * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1327
|
+
// *
|
|
1328
|
+
// * @experimental
|
|
1329
|
+
// * @example
|
|
1330
|
+
// * ```ts
|
|
1331
|
+
// * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to
|
|
1332
|
+
// * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })
|
|
1333
|
+
// * ```
|
|
1334
|
+
// * @param {ERC1155IncentivePayload} options
|
|
1335
|
+
// * @returns {ERC1155Incentive}
|
|
1336
|
+
// */
|
|
1337
|
+
// ERC1155Incentive(options: ERC1155IncentivePayload) {
|
|
1338
|
+
// return new ERC1155Incentive(
|
|
1339
|
+
// { config: this._config, account: this._account },
|
|
1340
|
+
// options,
|
|
1341
|
+
// );
|
|
1342
|
+
// }
|
|
1343
|
+
/**
|
|
1344
|
+
* Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1345
|
+
*
|
|
1346
|
+
* @example
|
|
1347
|
+
* ```ts
|
|
1348
|
+
* const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to
|
|
1349
|
+
* const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })
|
|
1350
|
+
* ```
|
|
1351
|
+
* @param {PointsIncentivePayload} options
|
|
1352
|
+
* @returns {PointsIncentive}
|
|
1353
|
+
*/
|
|
1354
|
+
PointsIncentive(b) {
|
|
1355
|
+
return new zf(
|
|
1356
|
+
{ config: this._config, account: this._account },
|
|
1357
|
+
b
|
|
1358
|
+
);
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.
|
|
1362
|
+
*
|
|
1363
|
+
* @example
|
|
1364
|
+
* ```ts
|
|
1365
|
+
* const validator = core.SignerValidator({ ... }) // is roughly equivalent to
|
|
1366
|
+
* const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })
|
|
1367
|
+
* ```
|
|
1368
|
+
* @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options
|
|
1369
|
+
* @param {?boolean} [isBase]
|
|
1370
|
+
* @returns {SignerValidator}
|
|
1371
|
+
*/
|
|
1372
|
+
SignerValidator(b, f) {
|
|
1373
|
+
return new Uf(
|
|
1374
|
+
{ config: this._config, account: this._account },
|
|
1375
|
+
b,
|
|
1376
|
+
f
|
|
1377
|
+
);
|
|
1378
|
+
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1381
|
+
*
|
|
1382
|
+
* @example
|
|
1383
|
+
* ```ts
|
|
1384
|
+
* const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to
|
|
1385
|
+
* const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })
|
|
1386
|
+
* ```
|
|
1387
|
+
* @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options
|
|
1388
|
+
* @param {?boolean} [isBase]
|
|
1389
|
+
* @returns {ERC20VariableCrtieriaIncentive}
|
|
1390
|
+
* */
|
|
1391
|
+
ERC20VariableCriteriaIncentive(b, f) {
|
|
1392
|
+
return new P(
|
|
1393
|
+
{ config: this._config, account: this._account },
|
|
1394
|
+
b,
|
|
1395
|
+
f
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.
|
|
1400
|
+
*
|
|
1401
|
+
* @example
|
|
1402
|
+
* ```ts
|
|
1403
|
+
* const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to
|
|
1404
|
+
* const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })
|
|
1405
|
+
* ```
|
|
1406
|
+
* @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options
|
|
1407
|
+
* @param {?boolean} [isBase]
|
|
1408
|
+
* @returns {ERC20VariableIncentive}
|
|
1409
|
+
*/
|
|
1410
|
+
ERC20VariableIncentive(b, f) {
|
|
1411
|
+
return new qf(
|
|
1412
|
+
{ config: this._config, account: this._account },
|
|
1413
|
+
b,
|
|
1414
|
+
f
|
|
1415
|
+
);
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* @inheritdoc
|
|
1419
|
+
*
|
|
1420
|
+
* @public
|
|
1421
|
+
* @param {?[Address, Address]} [_payload]
|
|
1422
|
+
* @param {?DeployableOptions} [_options]
|
|
1423
|
+
* @returns {GenericDeployableParams}
|
|
1424
|
+
*/
|
|
1425
|
+
buildParameters(b, f) {
|
|
1426
|
+
const [e, a] = this.validateDeploymentConfig(
|
|
1427
|
+
b,
|
|
1428
|
+
f
|
|
1429
|
+
);
|
|
1430
|
+
return {
|
|
1431
|
+
abi: C,
|
|
1432
|
+
bytecode: Xf,
|
|
1433
|
+
args: e,
|
|
1434
|
+
...this.optionallyAttachAccount(a.account)
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
};
|
|
1438
|
+
E.addresses = L;
|
|
1439
|
+
let S = E;
|
|
1440
|
+
export {
|
|
1441
|
+
N0 as B,
|
|
1442
|
+
P as E,
|
|
1443
|
+
O0 as a,
|
|
1444
|
+
L as b,
|
|
1445
|
+
S as c,
|
|
1446
|
+
t0 as p
|
|
1447
|
+
};
|
|
1448
|
+
//# sourceMappingURL=BoostCore-Z97KVu4V.js.map
|