@boostxyz/sdk 0.0.0-alpha.9 → 1.1.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +2 -2
- package/dist/Actions/ContractAction.d.ts +11 -11
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +14 -14
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +174 -41
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +557 -129
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.d.ts +6 -4
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +45 -23
- package/dist/AllowLists/AllowList.js.map +1 -1
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +92 -37
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +60 -75
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +203 -11
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +11 -112
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +20 -21
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +43 -57
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-Btl5BdAs.cjs +3 -0
- package/dist/BoostCore-Btl5BdAs.cjs.map +1 -0
- package/dist/BoostCore-CD56zbYX.js +2641 -0
- package/dist/BoostCore-CD56zbYX.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +749 -78
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1150
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +80 -25
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +164 -82
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +103 -221
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +81 -298
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +223 -89
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +5 -7
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +3 -5
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +13 -13
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +28 -25
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +248 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +320 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/Incentive-CcnOIc8L.cjs +2 -0
- package/dist/Incentive-CcnOIc8L.cjs.map +1 -0
- package/dist/Incentive-rM5nKznp.js +313 -0
- package/dist/Incentive-rM5nKznp.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +38 -16
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +43 -29
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +234 -21
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +46 -32
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +224 -37
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +234 -30
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +62 -46
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +333 -438
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +231 -29
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +4 -4
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +16 -296
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +40 -18
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +38 -24
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BDXpY74P.js +133 -0
- package/dist/SimpleDenyList-BDXpY74P.js.map +1 -0
- package/dist/SimpleDenyList-DNj5qDWM.cjs +2 -0
- package/dist/SimpleDenyList-DNj5qDWM.cjs.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +16 -16
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +32 -28
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DF_6-7hH.cjs +2 -0
- package/dist/deployments-DF_6-7hH.cjs.map +1 -0
- package/dist/deployments-fJsWblwS.js +56 -0
- package/dist/deployments-fJsWblwS.js.map +1 -0
- package/dist/deployments.json +58 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +256 -20
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +183 -26
- package/dist/errors.js.map +1 -1
- package/dist/{generated-57_Kffpz.js → generated-CsNyWPKA.js} +3843 -2084
- package/dist/generated-CsNyWPKA.js.map +1 -0
- package/dist/generated-DHerxf1y.cjs +3 -0
- package/dist/generated-DHerxf1y.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +142 -108
- package/dist/index.js.map +1 -1
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +26 -12
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -23
- package/dist/utils.js.map +1 -1
- package/package.json +20 -10
- package/src/Actions/Action.test.ts +14 -13
- package/src/Actions/ContractAction.test.ts +10 -10
- package/src/Actions/ContractAction.ts +11 -12
- package/src/Actions/ERC721MintAction.test.ts +6 -6
- package/src/Actions/ERC721MintAction.ts +14 -15
- package/src/Actions/EventAction.test.ts +735 -109
- package/src/Actions/EventAction.ts +527 -88
- package/src/AllowLists/AllowList.test.ts +7 -7
- package/src/AllowLists/AllowList.ts +5 -3
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +4 -4
- package/src/AllowLists/SimpleAllowList.ts +40 -61
- package/src/AllowLists/SimpleDenyList.test.ts +4 -4
- package/src/AllowLists/SimpleDenyList.ts +41 -17
- package/src/Auth/PassthroughAuth.test.ts +1 -1
- package/src/Boost.ts +21 -24
- package/src/BoostCore.test.ts +361 -306
- package/src/BoostCore.ts +403 -220
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +161 -40
- package/src/Budgets/Budget.test.ts +2 -2
- package/src/Budgets/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.test.ts +106 -19
- package/src/Budgets/ManagedBudget.ts +49 -321
- package/src/Budgets/VestingBudget.test.ts +7 -7
- package/src/Budgets/VestingBudget.ts +36 -106
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +30 -19
- package/src/Deployable/DeployableTargetWithRBAC.test.ts +103 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +447 -0
- package/src/Incentives/AllowListIncentive.test.ts +12 -12
- package/src/Incentives/AllowListIncentive.ts +30 -15
- package/src/Incentives/CGDAIncentive.test.ts +9 -6
- package/src/Incentives/CGDAIncentive.ts +39 -18
- package/src/Incentives/ERC1155Incentive.test.ts +3 -3
- package/src/Incentives/ERC1155Incentive.ts +30 -29
- package/src/Incentives/ERC20Incentive.test.ts +9 -6
- package/src/Incentives/ERC20Incentive.ts +54 -27
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +325 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +8 -11
- package/src/Incentives/ERC20VariableIncentive.ts +50 -26
- package/src/Incentives/Incentive.test.ts +4 -1
- package/src/Incentives/Incentive.ts +7 -6
- package/src/Incentives/PointsIncentive.test.ts +24 -25
- package/src/Incentives/PointsIncentive.ts +32 -17
- package/src/Validators/SignerValidator.test.ts +6 -6
- package/src/Validators/SignerValidator.ts +20 -17
- package/src/Validators/Validator.test.ts +2 -2
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +345 -21
- package/src/index.test.ts +118 -36
- package/src/index.ts +5 -0
- package/src/transfers.ts +1 -1
- package/src/utils.test.ts +2 -2
- package/src/utils.ts +61 -12
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-DYkaxBda.js +0 -13
- package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
- package/dist/generated-57_Kffpz.js.map +0 -1
- package/dist/generated-wKBNvm48.cjs +0 -3
- package/dist/generated-wKBNvm48.cjs.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -564
package/dist/Actions/Action.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-DHerxf1y.cjs"),a=require("../componentInterfaces-DRI_dQ-P.cjs"),s=require("@wagmi/core"),f=require("../errors.cjs"),c=require("./EventAction.cjs"),e={[a.AEventAction]:c.EventAction};async function u(n,t){const o=await s.readContract(n.config,{abi:i.te,functionName:"getComponentInterface",address:t}),r=e[o];if(!r)throw new f.InvalidComponentInterfaceError(Object.keys(e),o);return new r(n,t)}exports.EventAction=c.EventAction;exports.ActionByComponentInterface=e;exports.actionFromAddress=u;
|
|
2
2
|
//# sourceMappingURL=Action.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.cjs","sources":["../../src/Actions/Action.ts"],"sourcesContent":["import { aActionAbi } from '@boostxyz/evm';\nimport { AEventAction } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { EventAction } from './EventAction';\n\nexport {\n // ContractAction,\n // ERC721MintAction,\n EventAction,\n};\n\n/**\n * A union type representing all valid protocol Action implementations\n *\n * @export\n * @typedef {Action}\n */\nexport type Action = EventAction; // | ContractAction | ERC721MintAction\n\n/**\n * A map of Action component interfaces to their constructors.\n *\n * @type {{ \"0x7687b0ed\": EventAction; }}\n */\nexport const ActionByComponentInterface = {\n // ['0x6c3129aa']: ContractAction,\n // ['0x97e083eb']: ERC721MintAction,\n [AEventAction as Hex]: EventAction,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<EventAction>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function actionFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aActionAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ActionByComponentInterface;\n const Ctor = ActionByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ActionByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ActionByComponentInterface","AEventAction","EventAction","actionFromAddress","options","address","interfaceId","readContract","aActionAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"iQA2BaA,EAA6B,CAGxC,CAACC,EAAmB,YAAA,EAAGC,EAAA,WACzB,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,
|
|
1
|
+
{"version":3,"file":"Action.cjs","sources":["../../src/Actions/Action.ts"],"sourcesContent":["import { aActionAbi } from '@boostxyz/evm';\nimport { AEventAction } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { EventAction } from './EventAction';\n\nexport {\n // ContractAction,\n // ERC721MintAction,\n EventAction,\n};\n\n/**\n * A union type representing all valid protocol Action implementations\n *\n * @export\n * @typedef {Action}\n */\nexport type Action = EventAction; // | ContractAction | ERC721MintAction\n\n/**\n * A map of Action component interfaces to their constructors.\n *\n * @type {{ \"0x7687b0ed\": EventAction; }}\n */\nexport const ActionByComponentInterface = {\n // ['0x6c3129aa']: ContractAction,\n // ['0x97e083eb']: ERC721MintAction,\n [AEventAction as Hex]: EventAction,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<EventAction>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function actionFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aActionAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ActionByComponentInterface;\n const Ctor = ActionByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ActionByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ActionByComponentInterface","AEventAction","EventAction","actionFromAddress","options","address","interfaceId","readContract","aActionAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"iQA2BaA,EAA6B,CAGxC,CAACC,EAAmB,YAAA,EAAGC,EAAA,WACzB,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,GACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA2BM,CAAW,EACnD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA0B,EACtCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
|
package/dist/Actions/Action.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as i } from "../componentInterfaces-
|
|
1
|
+
import { t as c } from "../generated-CsNyWPKA.js";
|
|
2
|
+
import { A as i } from "../componentInterfaces-BBCFkrZv.js";
|
|
3
3
|
import { readContract as m } from "@wagmi/core";
|
|
4
4
|
import { InvalidComponentInterfaceError as a } from "../errors.js";
|
|
5
5
|
import { EventAction as f } from "./EventAction.js";
|
|
@@ -265,9 +265,9 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
265
265
|
*
|
|
266
266
|
* @public
|
|
267
267
|
* @static
|
|
268
|
-
* @type {Address}
|
|
268
|
+
* @type {Record<number, Address>}
|
|
269
269
|
*/
|
|
270
|
-
static
|
|
270
|
+
static bases: Record<number, Address>;
|
|
271
271
|
/**
|
|
272
272
|
* @inheritdoc
|
|
273
273
|
*
|
|
@@ -281,7 +281,7 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
281
281
|
*
|
|
282
282
|
* @public
|
|
283
283
|
* @async
|
|
284
|
-
* @param {?ReadParams
|
|
284
|
+
* @param {?ReadParams} [params]
|
|
285
285
|
* @returns {Promise<bigint>}
|
|
286
286
|
*/
|
|
287
287
|
chainId(params?: ReadParams<typeof contractActionAbi, 'chainId'>): Promise<bigint>;
|
|
@@ -290,7 +290,7 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
290
290
|
*
|
|
291
291
|
* @public
|
|
292
292
|
* @async
|
|
293
|
-
* @param {?ReadParams
|
|
293
|
+
* @param {?ReadParams} [params]
|
|
294
294
|
* @returns {Promise<`0x${string}`>}
|
|
295
295
|
*/
|
|
296
296
|
target(params?: ReadParams<typeof contractActionAbi, 'target'>): Promise<`0x${string}`>;
|
|
@@ -300,7 +300,7 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
300
300
|
* @example `function mint(address to, uint256 amount)`
|
|
301
301
|
* @public
|
|
302
302
|
* @async
|
|
303
|
-
* @param {?ReadParams
|
|
303
|
+
* @param {?ReadParams} [params]
|
|
304
304
|
* @returns {Promise<`0x${string}`>}
|
|
305
305
|
*/
|
|
306
306
|
selector(params?: ReadParams<typeof contractActionAbi, 'selector'>): Promise<`0x${string}`>;
|
|
@@ -309,7 +309,7 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
309
309
|
*
|
|
310
310
|
* @public
|
|
311
311
|
* @async
|
|
312
|
-
* @param {?ReadParams
|
|
312
|
+
* @param {?ReadParams} [params]
|
|
313
313
|
* @returns {Promise<bigint>}
|
|
314
314
|
*/
|
|
315
315
|
value(params?: ReadParams<typeof contractActionAbi, 'value'>): Promise<bigint>;
|
|
@@ -319,7 +319,7 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
319
319
|
* @public
|
|
320
320
|
* @async
|
|
321
321
|
* @param {Hex} data
|
|
322
|
-
* @param {?WriteParams
|
|
322
|
+
* @param {?WriteParams} [params]
|
|
323
323
|
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
324
324
|
*/
|
|
325
325
|
execute(data: Hex, params?: WriteParams<typeof contractActionAbi, 'execute'>): Promise<readonly [boolean, `0x${string}`]>;
|
|
@@ -329,8 +329,8 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
329
329
|
* @public
|
|
330
330
|
* @async
|
|
331
331
|
* @param {Hex} data
|
|
332
|
-
* @param {?WriteParams
|
|
333
|
-
* @returns {
|
|
332
|
+
* @param {?WriteParams} [params]
|
|
333
|
+
* @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}
|
|
334
334
|
*/
|
|
335
335
|
executeRaw(data: Hex, params?: WriteParams<typeof contractActionAbi, 'execute'>): Promise<{
|
|
336
336
|
hash: `0x${string}`;
|
|
@@ -342,8 +342,8 @@ export declare class ContractAction<ContractActionAbi extends Abi = typeof contr
|
|
|
342
342
|
* @public
|
|
343
343
|
* @async
|
|
344
344
|
* @param {Hex} calldata
|
|
345
|
-
* @param {?ReadParams
|
|
346
|
-
* @returns {
|
|
345
|
+
* @param {?ReadParams} [params]
|
|
346
|
+
* @returns {Promise<`0x${string}`>}
|
|
347
347
|
*/
|
|
348
348
|
prepare(calldata: Hex, params?: ReadParams<typeof contractActionAbi, 'prepare'>): Promise<`0x${string}`>;
|
|
349
349
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractAction.d.ts","sourceRoot":"","sources":["../../src/Actions/ContractAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAQlB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAGT,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OA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;;;OAQG;IACU,QAAQ,CACnB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,UAAU,CAAC;IAU3D;;;;;;;OAOG;IACU,KAAK,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC;IASzE;;;;;;;;OAQG;IACU,OAAO,CAClB,IAAI,EAAE,GAAG,EACT,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC;IAK3D;;;;;;;;OAQG;IACU,UAAU,CACrB,IAAI,EAAE,GAAG,EACT,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC;;;;IAgB3D;;;;;;;;OAQG;IACU,OAAO,CAClB,QAAQ,EAAE,GAAG,EACb,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,SAAS,CAAC;IAW1D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,GACN,EAAE,qBAAqB,iBAQvB"}
|
|
@@ -399,9 +399,9 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
399
399
|
*
|
|
400
400
|
* @public
|
|
401
401
|
* @static
|
|
402
|
-
* @type {Address}
|
|
402
|
+
* @type {Record<number, Address>}
|
|
403
403
|
*/
|
|
404
|
-
static
|
|
404
|
+
static bases: Record<number, Address>;
|
|
405
405
|
/**
|
|
406
406
|
* @inheritdoc
|
|
407
407
|
*
|
|
@@ -417,8 +417,8 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
417
417
|
* @public
|
|
418
418
|
* @async
|
|
419
419
|
* @param {bigint} token
|
|
420
|
-
* @param {?ReadParams
|
|
421
|
-
* @returns {
|
|
420
|
+
* @param {?ReadParams} [params]
|
|
421
|
+
* @returns {Promise<boolean>}
|
|
422
422
|
*/
|
|
423
423
|
validated(token: bigint, params?: ReadParams<typeof erc721MintActionAbi, 'validated'>): Promise<boolean>;
|
|
424
424
|
/**
|
|
@@ -427,8 +427,8 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
427
427
|
* @public
|
|
428
428
|
* @async
|
|
429
429
|
* @param {Hex} data
|
|
430
|
-
* @param {?WriteParams
|
|
431
|
-
* @returns {
|
|
430
|
+
* @param {?WriteParams} [params]
|
|
431
|
+
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
432
432
|
*/
|
|
433
433
|
execute(data: Hex, params?: WriteParams<typeof erc721MintActionAbi, 'execute'>): Promise<readonly [boolean, `0x${string}`]>;
|
|
434
434
|
/**
|
|
@@ -437,8 +437,8 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
437
437
|
* @public
|
|
438
438
|
* @async
|
|
439
439
|
* @param {Hex} data
|
|
440
|
-
* @param {?WriteParams
|
|
441
|
-
* @returns {
|
|
440
|
+
* @param {?WriteParams} [params]
|
|
441
|
+
* @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}
|
|
442
442
|
*/
|
|
443
443
|
executeRaw(data: Hex, params?: WriteParams<typeof erc721MintActionAbi, 'execute'>): Promise<{
|
|
444
444
|
hash: `0x${string}`;
|
|
@@ -450,8 +450,8 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
450
450
|
* @public
|
|
451
451
|
* @async
|
|
452
452
|
* @param {Hex} data
|
|
453
|
-
* @param {?ReadParams
|
|
454
|
-
* @returns {
|
|
453
|
+
* @param {?ReadParams} [params]
|
|
454
|
+
* @returns {Promise<`0x${string}`>}
|
|
455
455
|
*/
|
|
456
456
|
prepare(data: Hex, params?: ReadParams<typeof erc721MintActionAbi, 'prepare'>): Promise<`0x${string}`>;
|
|
457
457
|
/**
|
|
@@ -461,8 +461,8 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
461
461
|
* @async
|
|
462
462
|
* @param {Address} holder - The holder
|
|
463
463
|
* @param {BigInt} tokenId - The token ID
|
|
464
|
-
* @param {?WriteParams
|
|
465
|
-
* @returns {Promise<
|
|
464
|
+
* @param {?WriteParams} [params]
|
|
465
|
+
* @returns {Promise<boolean>} - True if the action has been validated for the user
|
|
466
466
|
*/
|
|
467
467
|
protected validate(holder: Address, tokenId: bigint, params?: WriteParams<typeof erc721MintActionAbi, 'validate'>): Promise<boolean>;
|
|
468
468
|
/**
|
|
@@ -472,7 +472,7 @@ export declare class ERC721MintAction extends ContractAction<typeof erc721MintAc
|
|
|
472
472
|
* @async
|
|
473
473
|
* @param {Address} holder - The holder
|
|
474
474
|
* @param {BigInt} tokenId - The token ID
|
|
475
|
-
* @param {?WriteParams
|
|
475
|
+
* @param {?WriteParams} [params]
|
|
476
476
|
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the action has been validated for the user
|
|
477
477
|
*/
|
|
478
478
|
protected validateRaw(holder: Address, tokenId: bigint, params?: WriteParams<typeof erc721MintActionAbi, 'validate'>): Promise<{
|
|
@@ -507,7 +507,7 @@ export declare function prepareERC721MintActionValidate(holder: Address, payload
|
|
|
507
507
|
* @param {Address} param0.target - The target contract address
|
|
508
508
|
* @param {Hex} param0.selector - The selector for the function to be called
|
|
509
509
|
* @param {bigint} param0.value - The native token value to send with the function call
|
|
510
|
-
* @returns {
|
|
510
|
+
* @returns {Hex}
|
|
511
511
|
*/
|
|
512
512
|
export declare function prepareERC721MintActionPayload({ chainId, target, selector, value, }: ContractActionPayload): `0x${string}`;
|
|
513
513
|
//# sourceMappingURL=ERC721MintAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ERC721MintAction.d.ts","sourceRoot":"","sources":["../../src/Actions/ERC721MintAction.ts"],"names":[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AgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,iBAShB;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,GACN,EAAE,qBAAqB,iBAEvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../generated-wKBNvm48.cjs"),w=require("@boostxyz/signatures/events"),l=require("viem"),E=require("viem/actions"),N=require("../Deployable/DeployableTarget.cjs"),c=require("../errors.cjs"),C=require("../utils.cjs"),I="0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660048111156105305761052f6115d7565b5b6004811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600481111561076e5761076d6115d7565b5b60048111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600481111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600481111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600581106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60058110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220a8ee5f8b5a49a9c61c1747482b13d7b4617cfc02983722a0395994bf27c456a064736f6c634300081a0033";var m=(b=>(b[b.EQUAL=0]="EQUAL",b[b.NOT_EQUAL=1]="NOT_EQUAL",b[b.GREATER_THAN=2]="GREATER_THAN",b[b.LESS_THAN=3]="LESS_THAN",b[b.CONTAINS=4]="CONTAINS",b))(m||{}),g=(b=>(b[b.UINT=0]="UINT",b[b.ADDRESS=1]="ADDRESS",b[b.BYTES=2]="BYTES",b[b.STRING=3]="STRING",b))(g||{}),h=(b=>(b[b.EVENT=0]="EVENT",b[b.FUNC=1]="FUNC",b))(h||{});function A(b){return Array.isArray(b.actionSteps)}const p=class p extends N.DeployableTarget{constructor(){super(...arguments),this.abi=s.W}async getActionStep(f,e){return(await this.getActionSteps(e)).at(f)}async getActionSteps(f){const e=await s.$f(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return D(e.map(y))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const e=await s.Gf(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return y(e)}async execute(f,e){return await this.awaitResult(this.executeRaw(f,e))}async executeRaw(f,e){const{request:t,result:a}=await s.tv(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[f]});return{hash:await s.Xf(this._config,t),result:a}}async validateActionSteps(f){const e=await this.getActionSteps(f);for(const t of e)if(!await this.isActionStepValid(t,f))return!1;return!0}async isActionStepValid(f,e){const t=f.actionParameter,a=f.signature;let n;if(e!=null&&e.knownEvents?n=e.knownEvents[a]:n=w.abi[a],!n)throw new Error(`No known ABI for given event signature: ${a}`);const i=f.targetContract,d=(e==null?void 0:e.logs)||await E.getLogs(this._config.getClient({chainId:e==null?void 0:e.chainId}),{...e,address:i,event:n});if(!d.length)return!1;for(let r of d)if(!this.validateLogAgainstCriteria(t,r))return!1;return!0}validateLogAgainstCriteria(f,e){const t=e.topics.at(f.fieldIndex);if(t===void 0)throw new c.FieldValueUndefinedError({log:e,criteria:f,fieldValue:t});switch(f.filterType){case 0:return f.fieldType===1?l.isAddressEqual(f.filterData,`0x${t.slice(-40)}`):t===f.filterData;case 1:return t!==f.filterData;case 2:if(f.fieldType===0)return BigInt(t)>BigInt(f.filterData);throw new c.InvalidNumericalCriteriaError({log:e,criteria:f,fieldValue:t});case 3:if(f.fieldType===0)return BigInt(t)<BigInt(f.filterData);throw new c.InvalidNumericalCriteriaError({log:e,criteria:f,fieldValue:t});case 4:if(f.fieldType===2||f.fieldType===3)return t.includes(f.filterData);throw new c.FieldValueNotComparableError({log:e,criteria:f,fieldValue:t});default:throw new c.UnrecognizedFilterTypeError({log:e,criteria:f,fieldValue:t})}}buildParameters(f,e){const[t,a]=this.validateDeploymentConfig(f,e);let n;if(A(t)){let i=t.actionSteps.filter(r=>!!r);if(i.length===0)throw new c.NoEventActionStepsProvidedError;if(i.length>4)throw new c.TooManyEventActionStepsProvidedError;let d=Array.from({length:4},(r,S)=>i.at(S)||i.at(-1));n={actionClaimant:t.actionClaimant,actionStepOne:d[0],actionStepTwo:d[1],actionStepThree:d[2],actionStepFour:d[3]}}else n=t;return{abi:s.W,bytecode:I,args:[T(n)],...this.optionallyAttachAccount(a.account)}}};p.base="0x2bD655240116b18f5b9F24E4b7b51B87B7b33D37",p.registryType=C.RegistryType.ACTION;let u=p;function D(b){const f=[],e={};for(let t of b){const a=JSON.stringify(t);e[a]||(f.push(t),e[a]=!0)}return f}function o(b){return{...b,chainid:BigInt(b.chainid)}}function y(b){if(b.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...b,chainid:Number(b.chainid)}}function T({actionClaimant:b,actionStepOne:f,actionStepTwo:e,actionStepThree:t,actionStepFour:a}){return l.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:o(b),actionStepOne:{...o(f),actionType:f.actionType||0},actionStepTwo:{...o(e),actionType:e.actionType||0},actionStepThree:{...o(t),actionType:t.actionType||0},actionStepFour:{...o(a),actionType:a.actionType||0}}])}exports.EventAction=u;exports.FilterType=m;exports.PrimitiveType=g;exports.SignatureType=h;exports.isEventActionPayloadSimple=A;exports.prepareEventActionPayload=T;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../generated-DHerxf1y.cjs"),q=require("@wagmi/core"),u=require("viem"),O=require("../deployments-DF_6-7hH.cjs"),z=require("../Deployable/DeployableTarget.cjs"),l=require("../errors.cjs"),W=require("../utils.cjs"),X="0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea26469706673582212208eb365eda8d73b432dcac87772fa84d3bb11eb90f5c05dbe00a55fa3412254c364736f6c634300081a0033",A=Symbol.for("@ts-pattern/matcher"),Q=Symbol.for("@ts-pattern/isVariadic"),P="@ts-pattern/anonymous-select-key",B=t=>!!(t&&typeof t=="object"),N=t=>t&&!!t[A],g=(t,f,e)=>{if(N(t)){const b=t[A](),{matched:n,selections:a}=b.match(f);return n&&a&&Object.keys(a).forEach(i=>e(i,a[i])),n}if(B(t)){if(!B(f))return!1;if(Array.isArray(t)){if(!Array.isArray(f))return!1;let b=[],n=[],a=[];for(const i of t.keys()){const s=t[i];N(s)&&s[Q]?a.push(s):a.length?n.push(s):b.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<b.length+n.length)return!1;const i=f.slice(0,b.length),s=n.length===0?[]:f.slice(-n.length),d=f.slice(b.length,n.length===0?1/0:-n.length);return b.every((o,m)=>g(o,i[m],e))&&n.every((o,m)=>g(o,s[m],e))&&(a.length===0||g(a[0],d,e))}return t.length===f.length&&t.every((i,s)=>g(i,f[s],e))}return Reflect.ownKeys(t).every(b=>{const n=t[b];return(b in f||N(a=n)&&a[A]().matcherType==="optional")&&g(n,f[b],e);var a})}return Object.is(f,t)},I=t=>{var f,e,b;return B(t)?N(t)?(f=(e=(b=t[A]()).getSelectionKeys)==null?void 0:e.call(b))!=null?f:[]:Array.isArray(t)?x(t,I):x(Object.values(t),I):[]},x=(t,f)=>t.reduce((e,b)=>e.concat(f(b)),[]);function h(t){return Object.assign(t,{optional:()=>F(t),and:f=>c(t,f),or:f=>J(t,f),select:f=>f===void 0?U(t):U(f,t)})}function F(t){return h({[A]:()=>({match:f=>{let e={};const b=(n,a)=>{e[n]=a};return f===void 0?(I(t).forEach(n=>b(n,void 0)),{matched:!0,selections:e}):{matched:g(t,f,b),selections:e}},getSelectionKeys:()=>I(t),matcherType:"optional"})})}function c(...t){return h({[A]:()=>({match:f=>{let e={};const b=(n,a)=>{e[n]=a};return{matched:t.every(n=>g(n,f,b)),selections:e}},getSelectionKeys:()=>x(t,I),matcherType:"and"})})}function J(...t){return h({[A]:()=>({match:f=>{let e={};const b=(n,a)=>{e[n]=a};return x(t,I).forEach(n=>b(n,void 0)),{matched:t.some(n=>g(n,f,b)),selections:e}},getSelectionKeys:()=>x(t,I),matcherType:"or"})})}function r(t){return{[A]:()=>({match:f=>({matched:!!t(f)})})}}function U(...t){const f=typeof t[0]=="string"?t[0]:void 0,e=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return h({[A]:()=>({match:b=>{let n={[f??P]:b};return{matched:e===void 0||g(e,b,(a,i)=>{n[a]=i}),selections:n}},getSelectionKeys:()=>[f??P].concat(e===void 0?[]:I(e))})})}function p(t){return typeof t=="number"}function w(t){return typeof t=="string"}function v(t){return typeof t=="bigint"}h(r(function(t){return!0}));const T=t=>Object.assign(h(t),{startsWith:f=>{return T(c(t,(e=f,r(b=>w(b)&&b.startsWith(e)))));var e},endsWith:f=>{return T(c(t,(e=f,r(b=>w(b)&&b.endsWith(e)))));var e},minLength:f=>T(c(t,(e=>r(b=>w(b)&&b.length>=e))(f))),length:f=>T(c(t,(e=>r(b=>w(b)&&b.length===e))(f))),maxLength:f=>T(c(t,(e=>r(b=>w(b)&&b.length<=e))(f))),includes:f=>{return T(c(t,(e=f,r(b=>w(b)&&b.includes(e)))));var e},regex:f=>{return T(c(t,(e=f,r(b=>w(b)&&!!b.match(e)))));var e}});T(r(w));const y=t=>Object.assign(h(t),{between:(f,e)=>y(c(t,((b,n)=>r(a=>p(a)&&b<=a&&n>=a))(f,e))),lt:f=>y(c(t,(e=>r(b=>p(b)&&b<e))(f))),gt:f=>y(c(t,(e=>r(b=>p(b)&&b>e))(f))),lte:f=>y(c(t,(e=>r(b=>p(b)&&b<=e))(f))),gte:f=>y(c(t,(e=>r(b=>p(b)&&b>=e))(f))),int:()=>y(c(t,r(f=>p(f)&&Number.isInteger(f)))),finite:()=>y(c(t,r(f=>p(f)&&Number.isFinite(f)))),positive:()=>y(c(t,r(f=>p(f)&&f>0))),negative:()=>y(c(t,r(f=>p(f)&&f<0)))});y(r(p));const E=t=>Object.assign(h(t),{between:(f,e)=>E(c(t,((b,n)=>r(a=>v(a)&&b<=a&&n>=a))(f,e))),lt:f=>E(c(t,(e=>r(b=>v(b)&&b<e))(f))),gt:f=>E(c(t,(e=>r(b=>v(b)&&b>e))(f))),lte:f=>E(c(t,(e=>r(b=>v(b)&&b<=e))(f))),gte:f=>E(c(t,(e=>r(b=>v(b)&&b>=e))(f))),positive:()=>E(c(t,r(f=>v(f)&&f>0))),negative:()=>E(c(t,r(f=>v(f)&&f<0)))});E(r(v));h(r(function(t){return typeof t=="boolean"}));h(r(function(t){return typeof t=="symbol"}));h(r(function(t){return t==null}));h(r(function(t){return t!=null}));class Y extends Error{constructor(f){let e;try{e=JSON.stringify(f)}catch{e=f}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=f}}const _={matched:!1,value:void 0};function H(t){return new D(t,_)}class D{constructor(f,e){this.input=void 0,this.state=void 0,this.input=f,this.state=e}with(...f){if(this.state.matched)return this;const e=f[f.length-1],b=[f[0]];let n;f.length===3&&typeof f[1]=="function"?n=f[1]:f.length>2&&b.push(...f.slice(1,f.length-1));let a=!1,i={};const s=(o,m)=>{a=!0,i[o]=m},d=!b.some(o=>g(o,this.input,s))||n&&!n(this.input)?_:{matched:!0,value:e(a?P in i?i[P]:i:this.input,this.input)};return new D(this.input,d)}when(f,e){if(this.state.matched)return this;const b=!!f(this.input);return new D(this.input,b?{matched:!0,value:e(this.input,this.input)}:_)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new Y(this.input)}run(){return this.exhaustive()}returnType(){return this}}var M=(t=>(t[t.EQUAL=0]="EQUAL",t[t.NOT_EQUAL=1]="NOT_EQUAL",t[t.GREATER_THAN=2]="GREATER_THAN",t[t.LESS_THAN=3]="LESS_THAN",t[t.CONTAINS=4]="CONTAINS",t[t.REGEX=5]="REGEX",t))(M||{}),j=(t=>(t[t.UINT=0]="UINT",t[t.ADDRESS=1]="ADDRESS",t[t.BYTES=2]="BYTES",t[t.STRING=3]="STRING",t))(j||{}),G=(t=>(t[t.EVENT=0]="EVENT",t[t.FUNC=1]="FUNC",t))(G||{});function V(t){return Array.isArray(t.actionSteps)}const R=class R extends z.DeployableTarget{constructor(){super(...arguments),this.abi=S.X}async getActionStep(f,e){return(await this.getActionSteps(e)).at(f)}async getActionSteps(f){const e=await S.A2(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return $(e.map(k))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const e=await S.w2(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return k(e)}async execute(f,e){return await this.awaitResult(this.executeRaw(f,e))}async executeRaw(f,e){const{request:b,result:n}=await S.C2(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[f]});return{hash:await S.R2(this._config,b),result:n}}async deriveActionClaimantFromTransaction(f,e){const b=f.signature;if(f.signatureType===0){let n;if(e.abiItem?n=e.abiItem:n=e.knownSignatures[b],!n)throw new l.ValidationAbiMissingError(b);let a;if("logs"in e){for(let d of e.logs){if(!u.isAddressEqual(d.address,f.targetContract))continue;let o=this.validateClaimantAgainstArgs(f,d);o&&(a=o)}return a}const s=(await q.getTransactionReceipt(this._config,e)).logs.map(d=>{const{eventName:o,args:m}=u.decodeEventLog({abi:[n],data:d.data,topics:d.topics});return{...d,eventName:o,args:m}});for(let d of s){if(!u.isAddressEqual(d.address,f.targetContract))continue;let o=this.validateClaimantAgainstArgs(f,d);o&&(a=o)}return a}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const n=await q.getTransaction(this._config,{hash:e.hash});if(!u.isAddressEqual(n.to,f.targetContract))return;let a;if(e.abiItem?a=e.abiItem:a=e.knownSignatures[b],!a)throw new l.ValidationAbiMissingError(f.signature);let i;try{i=u.decodeFunctionData({abi:[a],data:n.input})}catch(s){throw new l.FunctionDataDecodeError([a],s)}return this.validateClaimantAgainstArgs(f,i)}}validateClaimantAgainstArgs(f,e){if(!e||!Array.isArray(e==null?void 0:e.args)||(e==null?void 0:e.args.length)<=f.fieldIndex)return;const b=e.args.at(f.fieldIndex);if(u.isAddress(b))return b}async validateActionSteps(f){const e=await this.getActionSteps();for(const b of e)if(!await this.isActionStepValid(b,f))return!1;return!0}async isActionStepValid(f,e){if(f.signatureType===0){const b=f.signature;let n;if(e.abiItem?n=e.abiItem:n=e.knownSignatures[b],!n)throw new l.ValidationAbiMissingError(b);if(this.isArraylikeIndexed(f,n))throw new l.UnparseableAbiParamError(f.actionParameter.fieldIndex,n);if("logs"in e)return this.isActionEventValid(f,e.logs);const s=(await this._config.getClient({chainId:e.chainId}).getTransactionReceipt({hash:e.hash})).logs.map(d=>{const{eventName:o,args:m}=u.decodeEventLog({abi:[n],data:d.data,topics:d.topics});return{...d,eventName:o,args:m}});return this.isActionEventValid(f,s)}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const n=await this._config.getClient({chainId:e.chainId}).getTransaction({hash:e.hash});return this.isActionFunctionValid(f,n,e)}return!1}isActionEventValid(f,e){const b=f.actionParameter;if(!e.length)return!1;for(let n of e)if(this.validateLogAgainstCriteria(b,n))return!0;return!1}isActionFunctionValid(f,e,b){const n=f.actionParameter;let a=f.signature,i;if(b.abiItem?i=b==null?void 0:b.abiItem:i=b.knownSignatures[a],!i)throw new l.ValidationAbiMissingError(a);let s;try{s=u.decodeFunctionData({abi:[i],data:e.input})}catch(o){throw new l.FunctionDataDecodeError([i],o)}const d=s.args;return!(!d||!s||!this.validateFunctionAgainstCriteria(n,d))}validateFieldAgainstCriteria(f,e,b){if(f.filterType===0&&f.fieldType===2&&f.fieldIndex===255)return!0;switch(f.filterType){case 0:return H(f.fieldType).with(1,()=>u.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)===BigInt(f.filterData)).with(3,()=>e===u.fromHex(f.filterData,"string")).otherwise(()=>e===f.filterData);case 1:return H(f.fieldType).with(1,()=>!u.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)!==BigInt(f.filterData)).with(3,()=>e!==u.fromHex(f.filterData,"string")).otherwise(()=>e!==f.filterData);case 2:if(f.fieldType===0)return BigInt(e)>BigInt(f.filterData);throw new l.InvalidNumericalCriteriaError({...b,criteria:f,fieldValue:e});case 3:if(f.fieldType===0)return BigInt(e)<BigInt(f.filterData);throw new l.InvalidNumericalCriteriaError({...b,criteria:f,fieldValue:e});case 4:if(f.fieldType===2||f.fieldType===3){let n;return f.fieldType===3?n=u.fromHex(f.filterData,"string"):n=f.filterData.slice(2),e.includes(n)}throw new l.FieldValueNotComparableError({...b,criteria:f,fieldValue:e});case 5:if(typeof e!="string")throw new l.FieldValueNotComparableError({...b,criteria:f,fieldValue:e});if(f.fieldType===3){const n=u.fromHex(f.filterData,"string");return new RegExp(n).test(e)}default:throw new l.UnrecognizedFilterTypeError({...b,criteria:f,fieldValue:e})}}validateLogAgainstCriteria(f,e){if(!Array.isArray(e.args)||e.args.length<=f.fieldIndex&&f.fieldIndex!==255)throw new l.DecodedArgsMalformedError({log:e,criteria:f,fieldValue:void 0});const b=f.fieldIndex===255?u.zeroHash:e.args.at(f.fieldIndex);if(b===void 0)throw new l.FieldValueUndefinedError({log:e,criteria:f,fieldValue:b});return this.validateFieldAgainstCriteria(f,b,{log:e})}validateFunctionAgainstCriteria(f,e){const b=f.fieldIndex===255?u.zeroHash:e[f.fieldIndex];if(b===void 0)throw new l.FieldValueUndefinedError({criteria:f,fieldValue:b});return this.validateFieldAgainstCriteria(f,b,{decodedArgs:e})}buildParameters(f,e){const[b,n]=this.validateDeploymentConfig(f,e);let a;if(V(b)){let i=b.actionSteps.filter(d=>!!d);if(i.length===0)throw new l.NoEventActionStepsProvidedError;if(i.length>4)throw new l.TooManyEventActionStepsProvidedError;let s=Array.from({length:4},(d,o)=>i.at(o)||i.at(-1));a={actionClaimant:b.actionClaimant,actionStepOne:s[0],actionStepTwo:s[1],actionStepThree:s[2],actionStepFour:s[3]}}else a=b;return{abi:S.X,bytecode:X,args:[K(a)],...this.optionallyAttachAccount(n.account)}}isArraylikeIndexed(f,e){var b;return!!((f.actionParameter.fieldType===3||f.actionParameter.fieldType===2)&&((b=e.inputs[f.actionParameter.fieldIndex])!=null&&b.indexed))}};R.bases={31337:void 0,...O.EventAction},R.registryType=W.RegistryType.ACTION;let L=R;function $(t){const f=[],e={};for(let b of t){const n=JSON.stringify(b);e[n]||(f.push(b),e[n]=!0)}return f}function C(t){return{...t,chainid:BigInt(t.chainid)}}function k(t){if(t.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...t,chainid:Number(t.chainid)}}function K({actionClaimant:t,actionStepOne:f,actionStepTwo:e,actionStepThree:b,actionStepFour:n}){return u.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:C(t),actionStepOne:{...C(f),actionType:f.actionType||0},actionStepTwo:{...C(e),actionType:e.actionType||0},actionStepThree:{...C(b),actionType:b.actionType||0},actionStepFour:{...C(n),actionType:n.actionType||0}}])}function Z(){return{filterType:0,fieldType:2,fieldIndex:255,filterData:u.zeroHash}}exports.EventAction=L;exports.FilterType=M;exports.PrimitiveType=j;exports.SignatureType=G;exports.anyActionParameter=Z;exports.isEventActionPayloadSimple=V;exports.prepareEventActionPayload=K;
|
|
2
2
|
//# sourceMappingURL=EventAction.cjs.map
|