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