@boostxyz/sdk 0.0.0-alpha.17 → 0.0.0-alpha.18
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 +13 -13
- package/dist/Actions/ContractAction.d.ts +9 -9
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +12 -12
- 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 +32 -49
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +13 -962
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +5 -5
- package/dist/AllowLists/SimpleAllowList.js +24 -24
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +6 -6
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +18 -0
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs +3 -0
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
- package/dist/BoostCore-C00iqvks.js +1477 -0
- package/dist/BoostCore-C00iqvks.js.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +80 -35
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1273
- 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 +18 -18
- package/dist/BoostRegistry.js +28 -28
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +18 -18
- package/dist/Budgets/ManagedBudget.js +48 -48
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +23 -23
- 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 +4 -5
- 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.js +1 -1
- 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 +5 -5
- package/dist/Deployable/DeployableTarget.js +10 -10
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +15 -15
- package/dist/Deployable/DeployableTargetWithRBAC.js +32 -32
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/EventAction-BO5WI_5s.js +1355 -0
- package/dist/EventAction-BO5WI_5s.js.map +1 -0
- package/dist/EventAction-DBDRaG4A.cjs +2 -0
- package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
- package/dist/{Incentive-DJf-vdyL.js → Incentive-CF7kaz_9.js} +61 -62
- package/dist/Incentive-CF7kaz_9.js.map +1 -0
- package/dist/{Incentive-DNwROd1r.cjs → Incentive-Djnzseoj.cjs} +2 -2
- package/dist/Incentive-Djnzseoj.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +12 -12
- package/dist/Incentives/AllowListIncentive.js +19 -19
- 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 +15 -15
- package/dist/Incentives/CGDAIncentive.js +18 -18
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +23 -23
- package/dist/Incentives/ERC20Incentive.js +25 -25
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +3 -3
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +14 -14
- package/dist/Incentives/PointsIncentive.js +21 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-DMlUkmAn.cjs → SimpleDenyList-BwfNjRsg.cjs} +2 -2
- package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
- package/dist/{SimpleDenyList-DvUvmOeE.js → SimpleDenyList-D9i4rw_F.js} +9 -9
- package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +14 -14
- package/dist/Validators/SignerValidator.js +19 -19
- 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 +6 -6
- 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-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 +15 -12
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +132 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +122 -36
- package/dist/errors.js.map +1 -1
- package/dist/generated-B0tk-c9b.cjs +3 -0
- package/dist/generated-B0tk-c9b.cjs.map +1 -0
- package/dist/{generated-C_7Jx3YG.js → generated-B8VWObPa.js} +631 -343
- package/dist/generated-B8VWObPa.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +133 -125
- 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.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/src/Actions/ContractAction.ts +9 -10
- package/src/Actions/ERC721MintAction.ts +12 -13
- package/src/Actions/EventAction.test.ts +45 -54
- package/src/Actions/EventAction.ts +100 -100
- package/src/AllowLists/SimpleAllowList.ts +5 -5
- package/src/AllowLists/SimpleDenyList.ts +6 -6
- package/src/Boost.ts +19 -0
- package/src/BoostCore.test.ts +117 -1
- package/src/BoostCore.ts +113 -54
- package/src/BoostRegistry.ts +18 -18
- package/src/Budgets/ManagedBudget.ts +18 -18
- package/src/Budgets/VestingBudget.ts +23 -23
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +5 -5
- package/src/Deployable/DeployableTargetWithRBAC.ts +15 -15
- package/src/Incentives/AllowListIncentive.ts +12 -12
- package/src/Incentives/CGDAIncentive.ts +15 -15
- package/src/Incentives/ERC1155Incentive.ts +26 -26
- package/src/Incentives/ERC20Incentive.ts +23 -23
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
- package/src/Incentives/ERC20VariableIncentive.ts +19 -19
- package/src/Incentives/Incentive.ts +6 -5
- package/src/Incentives/PointsIncentive.test.ts +21 -21
- package/src/Incentives/PointsIncentive.ts +14 -14
- package/src/Validators/SignerValidator.ts +14 -14
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +165 -0
- package/src/index.ts +1 -0
- package/src/transfers.ts +1 -1
- package/src/utils.ts +1 -1
- package/dist/Incentive-DJf-vdyL.js.map +0 -1
- package/dist/Incentive-DNwROd1r.cjs.map +0 -1
- package/dist/SimpleDenyList-DMlUkmAn.cjs.map +0 -1
- package/dist/SimpleDenyList-DvUvmOeE.js.map +0 -1
- package/dist/componentInterfaces-BPVR_Ykd.js +0 -13
- package/dist/componentInterfaces-BPVR_Ykd.js.map +0 -1
- package/dist/componentInterfaces-BfppSIl4.cjs +0 -2
- package/dist/componentInterfaces-BfppSIl4.cjs.map +0 -1
- package/dist/deployments-BvFcK_eR.js +0 -40
- package/dist/deployments-BvFcK_eR.js.map +0 -1
- package/dist/deployments-Ho4PnGCS.cjs +0 -2
- package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
- package/dist/generated-CMQ6ZC2_.cjs +0 -3
- package/dist/generated-CMQ6ZC2_.cjs.map +0 -1
- package/dist/generated-C_7Jx3YG.js.map +0 -1
|
@@ -1,965 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const b0 = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220c0fb13f888b0a69e33db3d7586e65062d85bac26cd33b0773ccbf5249746b2b264736f6c634300081a0033", n0 = {
|
|
9
|
-
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
10
|
-
name: "Transfer",
|
|
11
|
-
type: "event",
|
|
12
|
-
inputs: [
|
|
13
|
-
{
|
|
14
|
-
type: "address",
|
|
15
|
-
indexed: !0
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
type: "address",
|
|
19
|
-
indexed: !0
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
type: "uint256",
|
|
23
|
-
indexed: !0
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e": {
|
|
28
|
-
name: "Purchased",
|
|
29
|
-
type: "event",
|
|
30
|
-
inputs: [
|
|
31
|
-
{
|
|
32
|
-
type: "address",
|
|
33
|
-
indexed: !0
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: "address",
|
|
37
|
-
indexed: !0
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
type: "uint256",
|
|
41
|
-
indexed: !0
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: "uint256"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
type: "uint256"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27": {
|
|
52
|
-
name: "NameRegistered",
|
|
53
|
-
type: "event",
|
|
54
|
-
inputs: [
|
|
55
|
-
{
|
|
56
|
-
type: "string"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: "bytes32"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
type: "address"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
type: "uint256"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
type: "uint256"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: "uint256"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f": {
|
|
76
|
-
name: "DelegateChanged",
|
|
77
|
-
type: "event",
|
|
78
|
-
inputs: [
|
|
79
|
-
{
|
|
80
|
-
type: "address",
|
|
81
|
-
indexed: !0
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: "address",
|
|
85
|
-
indexed: !0
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: "address",
|
|
89
|
-
indexed: !0
|
|
90
|
-
}
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0": {
|
|
94
|
-
name: "SwappedV3",
|
|
95
|
-
type: "event",
|
|
96
|
-
inputs: [
|
|
97
|
-
{
|
|
98
|
-
type: "bytes16"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
type: "address"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: "uint256"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
type: "address"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
type: "address",
|
|
111
|
-
indexed: !0
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
type: "address",
|
|
115
|
-
indexed: !0
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: "address",
|
|
119
|
-
indexed: !0
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
type: "uint256"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
type: "uint256"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: "uint256"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b": {
|
|
133
|
-
name: "InfoIndexed",
|
|
134
|
-
type: "event",
|
|
135
|
-
inputs: [
|
|
136
|
-
{
|
|
137
|
-
type: "address",
|
|
138
|
-
indexed: !0
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
type: "string",
|
|
142
|
-
indexed: !0
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c": {
|
|
147
|
-
name: "Info",
|
|
148
|
-
type: "event",
|
|
149
|
-
inputs: [
|
|
150
|
-
{
|
|
151
|
-
type: "address"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
type: "string"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
}, a0 = {
|
|
159
|
-
"Transfer(address indexed,address indexed,uint256 indexed)": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
|
160
|
-
"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)": "0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e",
|
|
161
|
-
"NameRegistered(string,bytes32,address,uint256,uint256,uint256)": "0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27",
|
|
162
|
-
"DelegateChanged(address indexed,address indexed,address indexed)": "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f",
|
|
163
|
-
"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)": "0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0",
|
|
164
|
-
"InfoIndexed(address indexed,string indexed)": "0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b",
|
|
165
|
-
"Info(address,string)": "0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c"
|
|
166
|
-
}, d0 = {
|
|
167
|
-
abi: n0,
|
|
168
|
-
selectors: a0
|
|
169
|
-
}, i0 = {
|
|
170
|
-
"0x0000000000000000000000000000000000000000000000000000000040c10f19": {
|
|
171
|
-
name: "mint",
|
|
172
|
-
type: "function",
|
|
173
|
-
stateMutability: "nonpayable",
|
|
174
|
-
inputs: [
|
|
175
|
-
{
|
|
176
|
-
type: "address",
|
|
177
|
-
name: "to"
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
type: "uint256",
|
|
181
|
-
name: "amount"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
outputs: []
|
|
185
|
-
},
|
|
186
|
-
"0x0000000000000000000000000000000000000000000000000000000017d304b0": {
|
|
187
|
-
name: "mintPayable",
|
|
188
|
-
type: "function",
|
|
189
|
-
stateMutability: "nonpayable",
|
|
190
|
-
inputs: [
|
|
191
|
-
{
|
|
192
|
-
type: "address",
|
|
193
|
-
name: "to"
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
type: "uint256",
|
|
197
|
-
name: "amount"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
outputs: []
|
|
201
|
-
},
|
|
202
|
-
"0x0000000000000000000000000000000000000000000000000000000024856bc3": {
|
|
203
|
-
name: "execute",
|
|
204
|
-
type: "function",
|
|
205
|
-
stateMutability: "nonpayable",
|
|
206
|
-
inputs: [
|
|
207
|
-
{
|
|
208
|
-
type: "bytes",
|
|
209
|
-
name: "commands"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
type: "bytes[]",
|
|
213
|
-
name: "inputs"
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
outputs: []
|
|
217
|
-
},
|
|
218
|
-
"0x0000000000000000000000000000000000000000000000000000000074694a2b": {
|
|
219
|
-
name: "register",
|
|
220
|
-
type: "function",
|
|
221
|
-
stateMutability: "nonpayable",
|
|
222
|
-
inputs: [
|
|
223
|
-
{
|
|
224
|
-
type: "string",
|
|
225
|
-
name: "name"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
type: "address",
|
|
229
|
-
name: "owner"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: "uint256",
|
|
233
|
-
name: "duration"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
type: "bytes32",
|
|
237
|
-
name: "secret"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
type: "address",
|
|
241
|
-
name: "resolver"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
type: "bytes[]",
|
|
245
|
-
name: "data"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
type: "bool",
|
|
249
|
-
name: "reverseRecord"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
type: "uint16",
|
|
253
|
-
name: "ownerControlledFuses"
|
|
254
|
-
}
|
|
255
|
-
],
|
|
256
|
-
outputs: []
|
|
257
|
-
},
|
|
258
|
-
"0x000000000000000000000000000000000000000000000000000000006a627842": {
|
|
259
|
-
name: "mint",
|
|
260
|
-
type: "function",
|
|
261
|
-
stateMutability: "nonpayable",
|
|
262
|
-
inputs: [
|
|
263
|
-
{
|
|
264
|
-
type: "address"
|
|
265
|
-
}
|
|
266
|
-
],
|
|
267
|
-
outputs: []
|
|
268
|
-
}
|
|
269
|
-
}, s0 = {
|
|
270
|
-
"mint(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000040c10f19",
|
|
271
|
-
"mintPayable(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000017d304b0",
|
|
272
|
-
"execute(bytes commands,bytes[] inputs)": "0x0000000000000000000000000000000000000000000000000000000024856bc3",
|
|
273
|
-
"register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)": "0x0000000000000000000000000000000000000000000000000000000074694a2b",
|
|
274
|
-
"mint(address)": "0x000000000000000000000000000000000000000000000000000000006a627842"
|
|
275
|
-
}, r0 = {
|
|
276
|
-
abi: i0,
|
|
277
|
-
selectors: s0
|
|
278
|
-
}, h = Symbol.for("@ts-pattern/matcher"), c0 = Symbol.for("@ts-pattern/isVariadic"), C = "@ts-pattern/anonymous-select-key", R = (t) => !!(t && typeof t == "object"), S = (t) => t && !!t[h], l = (t, f, e) => {
|
|
279
|
-
if (S(t)) {
|
|
280
|
-
const b = t[h](), { matched: n, selections: a } = b.match(f);
|
|
281
|
-
return n && a && Object.keys(a).forEach((i) => e(i, a[i])), n;
|
|
282
|
-
}
|
|
283
|
-
if (R(t)) {
|
|
284
|
-
if (!R(f)) return !1;
|
|
285
|
-
if (Array.isArray(t)) {
|
|
286
|
-
if (!Array.isArray(f)) return !1;
|
|
287
|
-
let b = [], n = [], a = [];
|
|
288
|
-
for (const i of t.keys()) {
|
|
289
|
-
const r = t[i];
|
|
290
|
-
S(r) && r[c0] ? a.push(r) : a.length ? n.push(r) : b.push(r);
|
|
291
|
-
}
|
|
292
|
-
if (a.length) {
|
|
293
|
-
if (a.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
294
|
-
if (f.length < b.length + n.length) return !1;
|
|
295
|
-
const i = f.slice(0, b.length), r = n.length === 0 ? [] : f.slice(-n.length), c = f.slice(b.length, n.length === 0 ? 1 / 0 : -n.length);
|
|
296
|
-
return b.every((o, A) => l(o, i[A], e)) && n.every((o, A) => l(o, r[A], e)) && (a.length === 0 || l(a[0], c, e));
|
|
297
|
-
}
|
|
298
|
-
return t.length === f.length && t.every((i, r) => l(i, f[r], e));
|
|
299
|
-
}
|
|
300
|
-
return Reflect.ownKeys(t).every((b) => {
|
|
301
|
-
const n = t[b];
|
|
302
|
-
return (b in f || S(a = n) && a[h]().matcherType === "optional") && l(n, f[b], e);
|
|
303
|
-
var a;
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
return Object.is(f, t);
|
|
307
|
-
}, v = (t) => {
|
|
308
|
-
var f, e, b;
|
|
309
|
-
return R(t) ? S(t) ? (f = (e = (b = t[h]()).getSelectionKeys) == null ? void 0 : e.call(b)) != null ? f : [] : Array.isArray(t) ? E(t, v) : E(Object.values(t), v) : [];
|
|
310
|
-
}, E = (t, f) => t.reduce((e, b) => e.concat(f(b)), []);
|
|
311
|
-
function u(t) {
|
|
312
|
-
return Object.assign(t, { optional: () => o0(t), and: (f) => s(t, f), or: (f) => u0(t, f), select: (f) => f === void 0 ? k(t) : k(f, t) });
|
|
313
|
-
}
|
|
314
|
-
function o0(t) {
|
|
315
|
-
return u({ [h]: () => ({ match: (f) => {
|
|
316
|
-
let e = {};
|
|
317
|
-
const b = (n, a) => {
|
|
318
|
-
e[n] = a;
|
|
319
|
-
};
|
|
320
|
-
return f === void 0 ? (v(t).forEach((n) => b(n, void 0)), { matched: !0, selections: e }) : { matched: l(t, f, b), selections: e };
|
|
321
|
-
}, getSelectionKeys: () => v(t), matcherType: "optional" }) });
|
|
322
|
-
}
|
|
323
|
-
function s(...t) {
|
|
324
|
-
return u({ [h]: () => ({ match: (f) => {
|
|
325
|
-
let e = {};
|
|
326
|
-
const b = (n, a) => {
|
|
327
|
-
e[n] = a;
|
|
328
|
-
};
|
|
329
|
-
return { matched: t.every((n) => l(n, f, b)), selections: e };
|
|
330
|
-
}, getSelectionKeys: () => E(t, v), matcherType: "and" }) });
|
|
331
|
-
}
|
|
332
|
-
function u0(...t) {
|
|
333
|
-
return u({ [h]: () => ({ match: (f) => {
|
|
334
|
-
let e = {};
|
|
335
|
-
const b = (n, a) => {
|
|
336
|
-
e[n] = a;
|
|
337
|
-
};
|
|
338
|
-
return E(t, v).forEach((n) => b(n, void 0)), { matched: t.some((n) => l(n, f, b)), selections: e };
|
|
339
|
-
}, getSelectionKeys: () => E(t, v), matcherType: "or" }) });
|
|
340
|
-
}
|
|
341
|
-
function d(t) {
|
|
342
|
-
return { [h]: () => ({ match: (f) => ({ matched: !!t(f) }) }) };
|
|
343
|
-
}
|
|
344
|
-
function k(...t) {
|
|
345
|
-
const f = typeof t[0] == "string" ? t[0] : void 0, e = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
|
|
346
|
-
return u({ [h]: () => ({ match: (b) => {
|
|
347
|
-
let n = { [f ?? C]: b };
|
|
348
|
-
return { matched: e === void 0 || l(e, b, (a, i) => {
|
|
349
|
-
n[a] = i;
|
|
350
|
-
}), selections: n };
|
|
351
|
-
}, getSelectionKeys: () => [f ?? C].concat(e === void 0 ? [] : v(e)) }) });
|
|
352
|
-
}
|
|
353
|
-
function p(t) {
|
|
354
|
-
return typeof t == "number";
|
|
355
|
-
}
|
|
356
|
-
function g(t) {
|
|
357
|
-
return typeof t == "string";
|
|
358
|
-
}
|
|
359
|
-
function m(t) {
|
|
360
|
-
return typeof t == "bigint";
|
|
361
|
-
}
|
|
362
|
-
u(d(function(t) {
|
|
363
|
-
return !0;
|
|
364
|
-
}));
|
|
365
|
-
const w = (t) => Object.assign(u(t), { startsWith: (f) => {
|
|
366
|
-
return w(s(t, (e = f, d((b) => g(b) && b.startsWith(e)))));
|
|
367
|
-
var e;
|
|
368
|
-
}, endsWith: (f) => {
|
|
369
|
-
return w(s(t, (e = f, d((b) => g(b) && b.endsWith(e)))));
|
|
370
|
-
var e;
|
|
371
|
-
}, minLength: (f) => w(s(t, ((e) => d((b) => g(b) && b.length >= e))(f))), length: (f) => w(s(t, ((e) => d((b) => g(b) && b.length === e))(f))), maxLength: (f) => w(s(t, ((e) => d((b) => g(b) && b.length <= e))(f))), includes: (f) => {
|
|
372
|
-
return w(s(t, (e = f, d((b) => g(b) && b.includes(e)))));
|
|
373
|
-
var e;
|
|
374
|
-
}, regex: (f) => {
|
|
375
|
-
return w(s(t, (e = f, d((b) => g(b) && !!b.match(e)))));
|
|
376
|
-
var e;
|
|
377
|
-
} });
|
|
378
|
-
w(d(g));
|
|
379
|
-
const y = (t) => Object.assign(u(t), { between: (f, e) => y(s(t, ((b, n) => d((a) => p(a) && b <= a && n >= a))(f, e))), lt: (f) => y(s(t, ((e) => d((b) => p(b) && b < e))(f))), gt: (f) => y(s(t, ((e) => d((b) => p(b) && b > e))(f))), lte: (f) => y(s(t, ((e) => d((b) => p(b) && b <= e))(f))), gte: (f) => y(s(t, ((e) => d((b) => p(b) && b >= e))(f))), int: () => y(s(t, d((f) => p(f) && Number.isInteger(f)))), finite: () => y(s(t, d((f) => p(f) && Number.isFinite(f)))), positive: () => y(s(t, d((f) => p(f) && f > 0))), negative: () => y(s(t, d((f) => p(f) && f < 0))) });
|
|
380
|
-
y(d(p));
|
|
381
|
-
const x = (t) => Object.assign(u(t), { between: (f, e) => x(s(t, ((b, n) => d((a) => m(a) && b <= a && n >= a))(f, e))), lt: (f) => x(s(t, ((e) => d((b) => m(b) && b < e))(f))), gt: (f) => x(s(t, ((e) => d((b) => m(b) && b > e))(f))), lte: (f) => x(s(t, ((e) => d((b) => m(b) && b <= e))(f))), gte: (f) => x(s(t, ((e) => d((b) => m(b) && b >= e))(f))), positive: () => x(s(t, d((f) => m(f) && f > 0))), negative: () => x(s(t, d((f) => m(f) && f < 0))) });
|
|
382
|
-
x(d(m));
|
|
383
|
-
u(d(function(t) {
|
|
384
|
-
return typeof t == "boolean";
|
|
385
|
-
}));
|
|
386
|
-
u(d(function(t) {
|
|
387
|
-
return typeof t == "symbol";
|
|
388
|
-
}));
|
|
389
|
-
u(d(function(t) {
|
|
390
|
-
return t == null;
|
|
391
|
-
}));
|
|
392
|
-
u(d(function(t) {
|
|
393
|
-
return t != null;
|
|
394
|
-
}));
|
|
395
|
-
class p0 extends Error {
|
|
396
|
-
constructor(f) {
|
|
397
|
-
let e;
|
|
398
|
-
try {
|
|
399
|
-
e = JSON.stringify(f);
|
|
400
|
-
} catch {
|
|
401
|
-
e = f;
|
|
402
|
-
}
|
|
403
|
-
super(`Pattern matching error: no pattern matches value ${e}`), this.input = void 0, this.input = f;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
const B = { matched: !1, value: void 0 };
|
|
407
|
-
function F(t) {
|
|
408
|
-
return new N(t, B);
|
|
409
|
-
}
|
|
410
|
-
class N {
|
|
411
|
-
constructor(f, e) {
|
|
412
|
-
this.input = void 0, this.state = void 0, this.input = f, this.state = e;
|
|
413
|
-
}
|
|
414
|
-
with(...f) {
|
|
415
|
-
if (this.state.matched) return this;
|
|
416
|
-
const e = f[f.length - 1], b = [f[0]];
|
|
417
|
-
let n;
|
|
418
|
-
f.length === 3 && typeof f[1] == "function" ? n = f[1] : f.length > 2 && b.push(...f.slice(1, f.length - 1));
|
|
419
|
-
let a = !1, i = {};
|
|
420
|
-
const r = (o, A) => {
|
|
421
|
-
a = !0, i[o] = A;
|
|
422
|
-
}, c = !b.some((o) => l(o, this.input, r)) || n && !n(this.input) ? B : { matched: !0, value: e(a ? C in i ? i[C] : i : this.input, this.input) };
|
|
423
|
-
return new N(this.input, c);
|
|
424
|
-
}
|
|
425
|
-
when(f, e) {
|
|
426
|
-
if (this.state.matched) return this;
|
|
427
|
-
const b = !!f(this.input);
|
|
428
|
-
return new N(this.input, b ? { matched: !0, value: e(this.input, this.input) } : B);
|
|
429
|
-
}
|
|
430
|
-
otherwise(f) {
|
|
431
|
-
return this.state.matched ? this.state.value : f(this.input);
|
|
432
|
-
}
|
|
433
|
-
exhaustive() {
|
|
434
|
-
if (this.state.matched) return this.state.value;
|
|
435
|
-
throw new p0(this.input);
|
|
436
|
-
}
|
|
437
|
-
run() {
|
|
438
|
-
return this.exhaustive();
|
|
439
|
-
}
|
|
440
|
-
returnType() {
|
|
441
|
-
return this;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
var y0 = /* @__PURE__ */ ((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))(y0 || {}), l0 = /* @__PURE__ */ ((t) => (t[t.UINT = 0] = "UINT", t[t.ADDRESS = 1] = "ADDRESS", t[t.BYTES = 2] = "BYTES", t[t.STRING = 3] = "STRING", t))(l0 || {}), h0 = /* @__PURE__ */ ((t) => (t[t.EVENT = 0] = "EVENT", t[t.FUNC = 1] = "FUNC", t))(h0 || {});
|
|
445
|
-
function g0(t) {
|
|
446
|
-
return Array.isArray(t.actionSteps);
|
|
447
|
-
}
|
|
448
|
-
const D = class D extends z {
|
|
449
|
-
constructor() {
|
|
450
|
-
super(...arguments), this.abi = P;
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* Gets a specific action event by index
|
|
454
|
-
*
|
|
455
|
-
* @public
|
|
456
|
-
* @async
|
|
457
|
-
* @param {number} index The index of the action event to retrieve
|
|
458
|
-
* @param {?ReadEventActionParams<'getActionStep'>} [params]
|
|
459
|
-
* @returns {Promise<ActionStep>}
|
|
460
|
-
*/
|
|
461
|
-
async getActionStep(f, e) {
|
|
462
|
-
return (await this.getActionSteps(e)).at(f);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Gets all action events
|
|
466
|
-
*
|
|
467
|
-
* @public
|
|
468
|
-
* @async
|
|
469
|
-
* @param {?ReadEventActionParams<'getActionSteps'>} [params]
|
|
470
|
-
* @returns {Promise<ActionStep[]>}
|
|
471
|
-
*/
|
|
472
|
-
async getActionSteps(f) {
|
|
473
|
-
const e = await G(this._config, {
|
|
474
|
-
address: this.assertValidAddress(),
|
|
475
|
-
...this.optionallyAttachAccount(),
|
|
476
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
477
|
-
...f
|
|
478
|
-
});
|
|
479
|
-
return m0(e.map(j));
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Gets the count of action events
|
|
483
|
-
*
|
|
484
|
-
* @public
|
|
485
|
-
* @async
|
|
486
|
-
* @param {?ReadEventActionParams<'getActionStepsCount'>} [params]
|
|
487
|
-
* @returns {Promise<bigint>}
|
|
488
|
-
*/
|
|
489
|
-
async getActionStepsCount(f) {
|
|
490
|
-
return (await this.getActionSteps(f)).length;
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Retrieves the payload describing how claimants can be identified from logs or function calls.
|
|
494
|
-
*
|
|
495
|
-
* @public
|
|
496
|
-
* @async
|
|
497
|
-
* @param {?ReadEventActionParams<'getActionClaimant'>} [params]
|
|
498
|
-
* @returns {Promise<ActionClaimant>}
|
|
499
|
-
*/
|
|
500
|
-
async getActionClaimant(f) {
|
|
501
|
-
const e = await K(this._config, {
|
|
502
|
-
address: this.assertValidAddress(),
|
|
503
|
-
...this.optionallyAttachAccount(),
|
|
504
|
-
...f
|
|
505
|
-
});
|
|
506
|
-
return j(e);
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Executes a prepared event action
|
|
510
|
-
*
|
|
511
|
-
* @public
|
|
512
|
-
* @async
|
|
513
|
-
* @param {Hex} data
|
|
514
|
-
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
515
|
-
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
516
|
-
*/
|
|
517
|
-
async execute(f, e) {
|
|
518
|
-
return await this.awaitResult(this.executeRaw(f, e));
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Executes a prepared event action
|
|
522
|
-
*
|
|
523
|
-
* @public
|
|
524
|
-
* @async
|
|
525
|
-
* @param {Hex} data
|
|
526
|
-
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
527
|
-
* @returns {unknown}
|
|
528
|
-
*/
|
|
529
|
-
async executeRaw(f, e) {
|
|
530
|
-
const { request: b, result: n } = await $(this._config, {
|
|
531
|
-
address: this.assertValidAddress(),
|
|
532
|
-
...this.optionallyAttachAccount(),
|
|
533
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
534
|
-
...e,
|
|
535
|
-
args: [f]
|
|
536
|
-
});
|
|
537
|
-
return { hash: await H(this._config, b), result: n };
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
|
|
541
|
-
* If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.
|
|
542
|
-
*
|
|
543
|
-
* @public
|
|
544
|
-
* @async
|
|
545
|
-
* @param {?TxParams} [params]
|
|
546
|
-
* @returns {Promise<boolean>}
|
|
547
|
-
*/
|
|
548
|
-
async validateActionSteps(f) {
|
|
549
|
-
const e = await this.getActionSteps();
|
|
550
|
-
for (const b of e)
|
|
551
|
-
if (!await this.isActionStepValid(b, f))
|
|
552
|
-
return !1;
|
|
553
|
-
return !0;
|
|
554
|
-
}
|
|
555
|
-
/**
|
|
556
|
-
* Validates a single action step with a given criteria against logs or function calls.
|
|
557
|
-
* If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
|
|
558
|
-
* For functions a hash is required.
|
|
559
|
-
*
|
|
560
|
-
* @public
|
|
561
|
-
* @async
|
|
562
|
-
* @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.
|
|
563
|
-
* @param {?TxParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.
|
|
564
|
-
* @returns {Promise<boolean>}
|
|
565
|
-
*/
|
|
566
|
-
async isActionStepValid(f, e) {
|
|
567
|
-
return f.signatureType === 0 ? await this.isActionEventValid(f, e) : f.signatureType === 1 ? await this.isActionFunctionValid(
|
|
568
|
-
f,
|
|
569
|
-
e
|
|
570
|
-
) : !1;
|
|
571
|
-
}
|
|
572
|
-
/**
|
|
573
|
-
* Validates a single action event with a given criteria against logs.
|
|
574
|
-
* If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
|
|
575
|
-
*
|
|
576
|
-
* @public
|
|
577
|
-
* @async
|
|
578
|
-
* @param {ActionStep} actionStep - The action step containing the event to validate.
|
|
579
|
-
* @param {?ValidateEventStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.
|
|
580
|
-
* @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.
|
|
581
|
-
*/
|
|
582
|
-
async isActionEventValid(f, e) {
|
|
583
|
-
const b = f.actionParameter, n = f.signature;
|
|
584
|
-
let a;
|
|
585
|
-
if (e != null && e.knownEvents ? a = e.knownEvents[n] : a = d0.abi[n], !a)
|
|
586
|
-
throw new Error(`No known ABI for given event signature: ${n}`);
|
|
587
|
-
if (this.isArraylikeIndexed(f, a))
|
|
588
|
-
throw new J(
|
|
589
|
-
f.actionParameter.fieldIndex,
|
|
590
|
-
a
|
|
591
|
-
);
|
|
592
|
-
const i = f.targetContract, r = (e == null ? void 0 : e.logs) || await q(this._config.getClient({ chainId: e == null ? void 0 : e.chainId }), {
|
|
593
|
-
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
594
|
-
...e,
|
|
595
|
-
address: i,
|
|
596
|
-
event: a
|
|
597
|
-
});
|
|
598
|
-
if (!r.length) return !1;
|
|
599
|
-
for (let c of r)
|
|
600
|
-
if (!this.validateLogAgainstCriteria(b, c))
|
|
601
|
-
return !1;
|
|
602
|
-
return !0;
|
|
603
|
-
}
|
|
604
|
-
/**
|
|
605
|
-
* Validates a single action function with a given criteria against the transaction input.
|
|
606
|
-
* If a transaction hash is provided in the optional `params` argument, then the transaction
|
|
607
|
-
* will be fetched and decoded using the configured client.
|
|
608
|
-
*
|
|
609
|
-
* @public
|
|
610
|
-
* @async
|
|
611
|
-
* @param {ActionStep} actionStep - The action step containing the function to validate.
|
|
612
|
-
* @param {?ValidateFunctionStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, transaction hash, and chain ID.
|
|
613
|
-
* @returns {Promise<boolean>} Resolves to true if the action function is valid, throws if the inputs are invalid, otherwise false.
|
|
614
|
-
*/
|
|
615
|
-
async isActionFunctionValid(f, e) {
|
|
616
|
-
const b = f.actionParameter;
|
|
617
|
-
let n = f.signature;
|
|
618
|
-
if (!e || !(e != null && e.hash))
|
|
619
|
-
throw new Error("Hash is required for function validation");
|
|
620
|
-
const i = await this._config.getClient({
|
|
621
|
-
chainId: e == null ? void 0 : e.chainId
|
|
622
|
-
}).getTransaction({ hash: e.hash }), r = r0.abi[n];
|
|
623
|
-
if (!r)
|
|
624
|
-
throw new Error(
|
|
625
|
-
`No known ABI for given function signature: ${n}`
|
|
626
|
-
);
|
|
627
|
-
let c;
|
|
628
|
-
try {
|
|
629
|
-
c = W({
|
|
630
|
-
abi: [r],
|
|
631
|
-
data: i.input
|
|
632
|
-
});
|
|
633
|
-
} catch (A) {
|
|
634
|
-
throw new V([r], A);
|
|
635
|
-
}
|
|
636
|
-
const o = c.args;
|
|
637
|
-
return !(!o || !c || !this.validateFunctionAgainstCriteria(
|
|
638
|
-
b,
|
|
639
|
-
o
|
|
640
|
-
));
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Validates a field against a given criteria.
|
|
644
|
-
*
|
|
645
|
-
* @param {Criteria} criteria - The criteria to validate against.
|
|
646
|
-
* @param {string | bigint} fieldValue - The field value to validate.
|
|
647
|
-
* @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.
|
|
648
|
-
*/
|
|
649
|
-
validateFieldAgainstCriteria(f, e, b) {
|
|
650
|
-
switch (f.filterType) {
|
|
651
|
-
case 0:
|
|
652
|
-
return F(f.fieldType).with(
|
|
653
|
-
1,
|
|
654
|
-
() => O(f.filterData, e)
|
|
655
|
-
).with(
|
|
656
|
-
0,
|
|
657
|
-
() => BigInt(e) === BigInt(f.filterData)
|
|
658
|
-
).with(
|
|
659
|
-
3,
|
|
660
|
-
() => e === I(f.filterData, "string")
|
|
661
|
-
).otherwise(() => e === f.filterData);
|
|
662
|
-
case 1:
|
|
663
|
-
return F(f.fieldType).with(
|
|
664
|
-
1,
|
|
665
|
-
() => !O(f.filterData, e)
|
|
666
|
-
).with(
|
|
667
|
-
0,
|
|
668
|
-
() => BigInt(e) !== BigInt(f.filterData)
|
|
669
|
-
).with(
|
|
670
|
-
3,
|
|
671
|
-
() => e !== I(f.filterData, "string")
|
|
672
|
-
).otherwise(() => e !== f.filterData);
|
|
673
|
-
case 2:
|
|
674
|
-
if (f.fieldType === 0)
|
|
675
|
-
return BigInt(e) > BigInt(f.filterData);
|
|
676
|
-
throw new U({
|
|
677
|
-
...b,
|
|
678
|
-
criteria: f,
|
|
679
|
-
fieldValue: e
|
|
680
|
-
});
|
|
681
|
-
case 3:
|
|
682
|
-
if (f.fieldType === 0)
|
|
683
|
-
return BigInt(e) < BigInt(f.filterData);
|
|
684
|
-
throw new U({
|
|
685
|
-
...b,
|
|
686
|
-
criteria: f,
|
|
687
|
-
fieldValue: e
|
|
688
|
-
});
|
|
689
|
-
case 4:
|
|
690
|
-
if (f.fieldType === 2 || f.fieldType === 3) {
|
|
691
|
-
let n;
|
|
692
|
-
return f.fieldType === 3 ? n = I(f.filterData, "string") : n = f.filterData.slice(2), e.includes(n);
|
|
693
|
-
}
|
|
694
|
-
throw new _({
|
|
695
|
-
...b,
|
|
696
|
-
criteria: f,
|
|
697
|
-
fieldValue: e
|
|
698
|
-
});
|
|
699
|
-
case 5:
|
|
700
|
-
if (typeof e != "string")
|
|
701
|
-
throw new _({
|
|
702
|
-
...b,
|
|
703
|
-
criteria: f,
|
|
704
|
-
fieldValue: e
|
|
705
|
-
});
|
|
706
|
-
if (f.fieldType === 3) {
|
|
707
|
-
const n = I(f.filterData, "string");
|
|
708
|
-
return new RegExp(n).test(e);
|
|
709
|
-
}
|
|
710
|
-
default:
|
|
711
|
-
throw new Y({
|
|
712
|
-
...b,
|
|
713
|
-
criteria: f,
|
|
714
|
-
fieldValue: e
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* Validates a {@link Log} against a given criteria.
|
|
720
|
-
*
|
|
721
|
-
* @param {Criteria} criteria - The criteria to validate against.
|
|
722
|
-
* @param {Log} log - The Viem event log.
|
|
723
|
-
* @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.
|
|
724
|
-
*/
|
|
725
|
-
validateLogAgainstCriteria(f, e) {
|
|
726
|
-
if (!Array.isArray(e.args) || e.args.length <= f.fieldIndex)
|
|
727
|
-
throw new Z({
|
|
728
|
-
log: e,
|
|
729
|
-
criteria: f,
|
|
730
|
-
fieldValue: void 0
|
|
731
|
-
});
|
|
732
|
-
const b = e.args.at(f.fieldIndex);
|
|
733
|
-
if (b === void 0)
|
|
734
|
-
throw new L({ log: e, criteria: f, fieldValue: b });
|
|
735
|
-
return this.validateFieldAgainstCriteria(f, b, { log: e });
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* Validates a function's decoded arguments against a given criteria.
|
|
739
|
-
*
|
|
740
|
-
* @param {Criteria} criteria - The criteria to validate against.
|
|
741
|
-
* @param {unknown[]} decodedArgs - The decoded arguments of the function call.
|
|
742
|
-
* @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.
|
|
743
|
-
*/
|
|
744
|
-
validateFunctionAgainstCriteria(f, e) {
|
|
745
|
-
const b = e[f.fieldIndex];
|
|
746
|
-
if (b === void 0)
|
|
747
|
-
throw new L({
|
|
748
|
-
criteria: f,
|
|
749
|
-
fieldValue: b
|
|
750
|
-
});
|
|
751
|
-
return this.validateFieldAgainstCriteria(f, b, {
|
|
752
|
-
decodedArgs: e
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* @inheritdoc
|
|
757
|
-
*
|
|
758
|
-
* @public
|
|
759
|
-
* @param {?EventActionPayload} [_payload]
|
|
760
|
-
* @param {?DeployableOptions} [_options]
|
|
761
|
-
* @returns {GenericDeployableParams}
|
|
762
|
-
*/
|
|
763
|
-
buildParameters(f, e) {
|
|
764
|
-
const [b, n] = this.validateDeploymentConfig(
|
|
765
|
-
f,
|
|
766
|
-
e
|
|
767
|
-
);
|
|
768
|
-
let a;
|
|
769
|
-
if (g0(b)) {
|
|
770
|
-
let i = b.actionSteps.filter((c) => !!c);
|
|
771
|
-
if (i.length === 0)
|
|
772
|
-
throw new f0();
|
|
773
|
-
if (i.length > 4)
|
|
774
|
-
throw new e0();
|
|
775
|
-
let r = Array.from({ length: 4 }, (c, o) => i.at(o) || i.at(-1));
|
|
776
|
-
a = {
|
|
777
|
-
actionClaimant: b.actionClaimant,
|
|
778
|
-
actionStepOne: r[0],
|
|
779
|
-
actionStepTwo: r[1],
|
|
780
|
-
actionStepThree: r[2],
|
|
781
|
-
actionStepFour: r[3]
|
|
782
|
-
};
|
|
783
|
-
} else
|
|
784
|
-
a = b;
|
|
785
|
-
return {
|
|
786
|
-
abi: P,
|
|
787
|
-
bytecode: b0,
|
|
788
|
-
args: [w0(a)],
|
|
789
|
-
...this.optionallyAttachAccount(n.account)
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
isArraylikeIndexed(f, e) {
|
|
793
|
-
var b;
|
|
794
|
-
return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((b = e.inputs[f.actionParameter.fieldIndex]) != null && b.indexed));
|
|
795
|
-
}
|
|
796
|
-
};
|
|
797
|
-
D.bases = {
|
|
798
|
-
...X
|
|
799
|
-
}, D.registryType = t0.ACTION;
|
|
800
|
-
let M = D;
|
|
801
|
-
function m0(t) {
|
|
802
|
-
const f = [], e = {};
|
|
803
|
-
for (let b of t) {
|
|
804
|
-
const n = JSON.stringify(b);
|
|
805
|
-
e[n] || (f.push(b), e[n] = !0);
|
|
806
|
-
}
|
|
807
|
-
return f;
|
|
808
|
-
}
|
|
809
|
-
function T(t) {
|
|
810
|
-
return {
|
|
811
|
-
...t,
|
|
812
|
-
chainid: BigInt(t.chainid)
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
function j(t) {
|
|
816
|
-
if (t.chainid > BigInt(Number.MAX_SAFE_INTEGER))
|
|
817
|
-
throw new Error("Chain ID exceeds max safe integer");
|
|
818
|
-
return {
|
|
819
|
-
...t,
|
|
820
|
-
chainid: Number(t.chainid)
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
function w0({
|
|
824
|
-
actionClaimant: t,
|
|
825
|
-
actionStepOne: f,
|
|
826
|
-
actionStepTwo: e,
|
|
827
|
-
actionStepThree: b,
|
|
828
|
-
actionStepFour: n
|
|
829
|
-
}) {
|
|
830
|
-
return Q(
|
|
831
|
-
[
|
|
832
|
-
{
|
|
833
|
-
type: "tuple",
|
|
834
|
-
name: "initPayload",
|
|
835
|
-
components: [
|
|
836
|
-
{
|
|
837
|
-
type: "tuple",
|
|
838
|
-
name: "actionClaimant",
|
|
839
|
-
components: [
|
|
840
|
-
{ type: "uint8", name: "signatureType" },
|
|
841
|
-
{ type: "bytes32", name: "signature" },
|
|
842
|
-
{ type: "uint8", name: "fieldIndex" },
|
|
843
|
-
{ type: "address", name: "targetContract" },
|
|
844
|
-
{ type: "uint256", name: "chainid" }
|
|
845
|
-
]
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
type: "tuple",
|
|
849
|
-
name: "actionStepOne",
|
|
850
|
-
components: [
|
|
851
|
-
{ type: "bytes32", name: "signature" },
|
|
852
|
-
{ type: "uint8", name: "signatureType" },
|
|
853
|
-
{ type: "uint8", name: "actionType" },
|
|
854
|
-
{ type: "address", name: "targetContract" },
|
|
855
|
-
{ type: "uint256", name: "chainid" },
|
|
856
|
-
{
|
|
857
|
-
type: "tuple",
|
|
858
|
-
name: "actionParameter",
|
|
859
|
-
components: [
|
|
860
|
-
{ type: "uint8", name: "filterType" },
|
|
861
|
-
{ type: "uint8", name: "fieldType" },
|
|
862
|
-
{ type: "uint8", name: "fieldIndex" },
|
|
863
|
-
{ type: "bytes", name: "filterData" }
|
|
864
|
-
]
|
|
865
|
-
}
|
|
866
|
-
]
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
type: "tuple",
|
|
870
|
-
name: "actionStepTwo",
|
|
871
|
-
components: [
|
|
872
|
-
{ type: "bytes32", name: "signature" },
|
|
873
|
-
{ type: "uint8", name: "signatureType" },
|
|
874
|
-
{ type: "uint8", name: "actionType" },
|
|
875
|
-
{ type: "address", name: "targetContract" },
|
|
876
|
-
{ type: "uint256", name: "chainid" },
|
|
877
|
-
{
|
|
878
|
-
type: "tuple",
|
|
879
|
-
name: "actionParameter",
|
|
880
|
-
components: [
|
|
881
|
-
{ type: "uint8", name: "filterType" },
|
|
882
|
-
{ type: "uint8", name: "fieldType" },
|
|
883
|
-
{ type: "uint8", name: "fieldIndex" },
|
|
884
|
-
{ type: "bytes", name: "filterData" }
|
|
885
|
-
]
|
|
886
|
-
}
|
|
887
|
-
]
|
|
888
|
-
},
|
|
889
|
-
{
|
|
890
|
-
type: "tuple",
|
|
891
|
-
name: "actionStepThree",
|
|
892
|
-
components: [
|
|
893
|
-
{ type: "bytes32", name: "signature" },
|
|
894
|
-
{ type: "uint8", name: "signatureType" },
|
|
895
|
-
{ type: "uint8", name: "actionType" },
|
|
896
|
-
{ type: "address", name: "targetContract" },
|
|
897
|
-
{ type: "uint256", name: "chainid" },
|
|
898
|
-
{
|
|
899
|
-
type: "tuple",
|
|
900
|
-
name: "actionParameter",
|
|
901
|
-
components: [
|
|
902
|
-
{ type: "uint8", name: "filterType" },
|
|
903
|
-
{ type: "uint8", name: "fieldType" },
|
|
904
|
-
{ type: "uint8", name: "fieldIndex" },
|
|
905
|
-
{ type: "bytes", name: "filterData" }
|
|
906
|
-
]
|
|
907
|
-
}
|
|
908
|
-
]
|
|
909
|
-
},
|
|
910
|
-
{
|
|
911
|
-
type: "tuple",
|
|
912
|
-
name: "actionStepFour",
|
|
913
|
-
components: [
|
|
914
|
-
{ type: "bytes32", name: "signature" },
|
|
915
|
-
{ type: "uint8", name: "signatureType" },
|
|
916
|
-
{ type: "uint8", name: "actionType" },
|
|
917
|
-
{ type: "address", name: "targetContract" },
|
|
918
|
-
{ type: "uint256", name: "chainid" },
|
|
919
|
-
{
|
|
920
|
-
type: "tuple",
|
|
921
|
-
name: "actionParameter",
|
|
922
|
-
components: [
|
|
923
|
-
{ type: "uint8", name: "filterType" },
|
|
924
|
-
{ type: "uint8", name: "fieldType" },
|
|
925
|
-
{ type: "uint8", name: "fieldIndex" },
|
|
926
|
-
{ type: "bytes", name: "filterData" }
|
|
927
|
-
]
|
|
928
|
-
}
|
|
929
|
-
]
|
|
930
|
-
}
|
|
931
|
-
]
|
|
932
|
-
}
|
|
933
|
-
],
|
|
934
|
-
[
|
|
935
|
-
{
|
|
936
|
-
actionClaimant: T(t),
|
|
937
|
-
actionStepOne: {
|
|
938
|
-
...T(f),
|
|
939
|
-
actionType: f.actionType || 0
|
|
940
|
-
},
|
|
941
|
-
actionStepTwo: {
|
|
942
|
-
...T(e),
|
|
943
|
-
actionType: e.actionType || 0
|
|
944
|
-
},
|
|
945
|
-
actionStepThree: {
|
|
946
|
-
...T(b),
|
|
947
|
-
actionType: b.actionType || 0
|
|
948
|
-
},
|
|
949
|
-
actionStepFour: {
|
|
950
|
-
...T(n),
|
|
951
|
-
actionType: n.actionType || 0
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
]
|
|
955
|
-
);
|
|
956
|
-
}
|
|
1
|
+
import "../generated-B8VWObPa.js";
|
|
2
|
+
import { E as n, F as s, P as y, S as l, i as v, p as E } from "../EventAction-BO5WI_5s.js";
|
|
3
|
+
import "viem";
|
|
4
|
+
import "../deployments-BM42vImE.js";
|
|
5
|
+
import "../Deployable/DeployableTarget.js";
|
|
6
|
+
import "../errors.js";
|
|
7
|
+
import "../utils.js";
|
|
957
8
|
export {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
9
|
+
n as EventAction,
|
|
10
|
+
s as FilterType,
|
|
11
|
+
y as PrimitiveType,
|
|
12
|
+
l as SignatureType,
|
|
13
|
+
v as isEventActionPayloadSimple,
|
|
14
|
+
E as prepareEventActionPayload
|
|
964
15
|
};
|
|
965
16
|
//# sourceMappingURL=EventAction.js.map
|