@boostxyz/sdk 0.0.0-alpha.7 → 0.0.0-alpha.9
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.js +1 -1
- package/dist/Actions/ContractAction.d.ts +46 -3
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +37 -10
- 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 +257 -11
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +249 -82
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.d.ts +2 -2
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +33 -4
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +52 -37
- 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 +31 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +41 -129
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +93 -1
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +151 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +45 -7
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +352 -305
- 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 -4
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +36 -25
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +40 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +53 -36
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +33 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +54 -2
- 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.js +1 -1
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +8 -2
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +6 -0
- 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 +4 -3
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +31 -28
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +35 -5
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +33 -21
- 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 +89 -5
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +44 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +67 -6
- 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 +49 -5
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +46 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +42 -5
- 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.js +48 -32
- 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 +49 -5
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +38 -21
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +298 -5
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +151 -26
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +15 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -21
- package/dist/errors.js.map +1 -1
- package/dist/{generated-DGpIVcv5.js → generated-57_Kffpz.js} +293 -282
- package/dist/generated-57_Kffpz.js.map +1 -0
- package/dist/{generated-Cd-Fe7W7.cjs → generated-wKBNvm48.cjs} +3 -3
- package/dist/generated-wKBNvm48.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -124
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +2 -1371
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +26 -653
- package/dist/utils.js.map +1 -1
- package/package.json +17 -3
- package/src/Actions/Action.test.ts +5 -4
- package/src/Actions/ContractAction.test.ts +4 -6
- package/src/Actions/ContractAction.ts +73 -10
- package/src/Actions/ERC721MintAction.test.ts +2 -2
- package/src/Actions/ERC721MintAction.ts +70 -16
- package/src/Actions/EventAction.test.ts +43 -17
- package/src/Actions/EventAction.ts +451 -26
- package/src/AllowLists/SimpleAllowList.ts +51 -7
- package/src/AllowLists/SimpleDenyList.ts +47 -109
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +136 -1
- package/src/BoostCore.test.ts +4 -11
- package/src/BoostCore.ts +114 -45
- package/src/BoostRegistry.ts +39 -21
- package/src/Budgets/ManagedBudget.ts +69 -16
- package/src/Budgets/SimpleBudget.ts +57 -14
- package/src/Budgets/VestingBudget.ts +79 -9
- package/src/Deployable/Contract.ts +1 -1
- package/src/Deployable/Deployable.ts +8 -2
- package/src/Deployable/DeployableTarget.ts +19 -6
- package/src/Incentives/AllowListIncentive.test.ts +2 -5
- package/src/Incentives/AllowListIncentive.ts +59 -15
- package/src/Incentives/CGDAIncentive.test.ts +3 -7
- package/src/Incentives/CGDAIncentive.ts +123 -19
- package/src/Incentives/ERC1155Incentive.test.ts +2 -13
- package/src/Incentives/ERC1155Incentive.ts +104 -22
- package/src/Incentives/ERC20Incentive.test.ts +6 -17
- package/src/Incentives/ERC20Incentive.ts +86 -21
- package/src/Incentives/ERC20VariableIncentive.test.ts +4 -24
- package/src/Incentives/ERC20VariableIncentive.ts +71 -19
- package/src/Incentives/Incentive.test.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +3 -6
- package/src/Incentives/PointsIncentive.ts +79 -17
- package/src/Validators/SignerValidator.test.ts +3 -7
- package/src/Validators/SignerValidator.ts +422 -13
- package/src/claiming.ts +56 -0
- package/src/errors.ts +19 -1
- package/src/index.ts +10 -7
- package/src/transfers.ts +284 -0
- package/src/utils.ts +3 -2052
- package/dist/generated-Cd-Fe7W7.cjs.map +0 -1
- package/dist/generated-DGpIVcv5.js.map +0 -1
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { W as
|
|
2
|
-
import
|
|
3
|
-
import { isAddressEqual as S } from "viem";
|
|
4
|
-
import { getLogs as
|
|
5
|
-
import { DeployableTarget as
|
|
6
|
-
import { FieldValueUndefinedError as
|
|
7
|
-
import { RegistryType as
|
|
8
|
-
const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161239f6100c85f395f61034a015261239f5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b5919061145c565b610273565b6040516100c791906114a1565b60405180910390f35b6100ea60048036038101906100e5919061151b565b6102ec565b6040516100f89291906115d6565b60405180910390f35b34801561010c575f80fd5b50610115610321565b6040516101229190611613565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c91906116a6565b60405180910390f35b348015610160575f80fd5b5061017b6004803603810190610176919061151b565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906119de565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611a31565b610686565b6040516101da9190611acf565b60405180910390f35b3480156101ee575f80fd5b506102096004803603810190610204919061151b565b6108f1565b6040516102169190611aef565b60405180910390f35b34801561022a575f80fd5b50610233610925565b6040516102409190611b62565b60405180910390f35b348015610254575f80fd5b5061025d610a3c565b60405161026a9190611b8a565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e482610a48565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610ac1565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190612035565b610aea565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606001805480602002602001604051908101604052809291908181526020015f905b8282101561067d578382905f5260205f2090600302016040518060a00160405290815f82015f9054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160049054906101000a900460ff1660018111156104b4576104b36116f7565b5b60018111156104c6576104c56116f7565b5b81526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182016040518060800160405290815f82015f9054906101000a900460ff16600481111561056e5761056d6116f7565b5b60048111156105805761057f6116f7565b5b81526020015f820160019054906101000a900460ff1660038111156105a8576105a76116f7565b5b60038111156105ba576105b96116f7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ea906120a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610616906120a9565b80156106615780601f1061063857610100808354040283529160200191610661565b820191905f5260205f20905b81548152906001019060200180831161064457829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b61068e6112c1565b600182815481106106a2576106a16120d9565b5b905f5260205f2090600302016040518060a00160405290815f82015f9054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160049054906101000a900460ff1660018111156107305761072f6116f7565b5b6001811115610742576107416116f7565b5b81526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182016040518060800160405290815f82015f9054906101000a900460ff1660048111156107ea576107e96116f7565b5b60048111156107fc576107fb6116f7565b5b81526020015f820160019054906101000a900460ff166003811115610824576108236116f7565b5b6003811115610836576108356116f7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff168152602001600182018054610866906120a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610892906120a9565b80156108dd5780601f106108b4576101008083540402835291602001916108dd565b820191905f5260205f20905b8154815290600101906020018083116108c057829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61092d61133c565b5f6040518060800160405290815f82015f9054906101000a900460ff16600181111561095c5761095b6116f7565b5b600181111561096e5761096d6116f7565b5b81526020015f820160019054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f820160059054906101000a900460ff1660ff1660ff1681526020015f820160069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905090565b5f600180549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610aba5750610ab9826111bb565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610af2611234565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610b1f57610b1e6116f7565b5b02179055506020820151815f0160016101000a81548163ffffffff021916908360e01c02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090505060018160200151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610c2857610c276116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610cc457610cc36116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610cf357610cf26116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610d2d919061229a565b505050505060018160400151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610daa57610da96116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610e4657610e456116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610e7557610e746116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610eaf919061229a565b505050505060018160600151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff02191690836001811115610f2c57610f2b6116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff02191690836004811115610fc857610fc76116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610ff757610ff66116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081611031919061229a565b505050505060018160800151908060018154018082558091505060019003905f5260205f2090600302015f909190919091505f820151815f015f6101000a81548163ffffffff021916908360e01c02179055506020820151815f0160046101000a81548160ff021916908360018111156110ae576110ad6116f7565b5b02179055506040820151815f0160056101000a81548160ff021916908360ff1602179055506060820151815f0160066101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816001015f820151815f015f6101000a81548160ff0219169083600481111561114a576111496116f7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115611179576111786116f7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816111b3919061229a565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061122d575061122c82611258565b5b9050919050565b5f61123d610ac1565b905080546001166112555763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060a001604052805f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f6001811115611304576113036116f7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020016113366113aa565b81525090565b60405180608001604052805f600181111561135a576113596116f7565b5b81526020015f7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681525090565b60405180608001604052805f60048111156113c8576113c76116f7565b5b81526020015f60038111156113e0576113df6116f7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61143b81611407565b8114611445575f80fd5b50565b5f8135905061145681611432565b92915050565b5f60208284031215611471576114706113ff565b5b5f61147e84828501611448565b91505092915050565b5f8115159050919050565b61149b81611487565b82525050565b5f6020820190506114b45f830184611492565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126114db576114da6114ba565b5b8235905067ffffffffffffffff8111156114f8576114f76114be565b5b602083019150836001820283011115611514576115136114c2565b5b9250929050565b5f8060208385031215611531576115306113ff565b5b5f83013567ffffffffffffffff81111561154e5761154d611403565b5b61155a858286016114c6565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6115a882611566565b6115b28185611570565b93506115c2818560208601611580565b6115cb8161158e565b840191505092915050565b5f6040820190506115e95f830185611492565b81810360208301526115fb818461159e565b90509392505050565b61160d81611407565b82525050565b5f6020820190506116265f830184611604565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61166e6116696116648461162c565b61164b565b61162c565b9050919050565b5f61167f82611654565b9050919050565b5f61169082611675565b9050919050565b6116a081611686565b82525050565b5f6020820190506116b95f830184611697565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116f181611407565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611735576117346116f7565b5b50565b5f81905061174582611724565b919050565b5f61175482611738565b9050919050565b6117648161174a565b82525050565b5f60ff82169050919050565b61177f8161176a565b82525050565b5f61178f8261162c565b9050919050565b61179f81611785565b82525050565b600581106117b6576117b56116f7565b5b50565b5f8190506117c6826117a5565b919050565b5f6117d5826117b9565b9050919050565b6117e5816117cb565b82525050565b600481106117fc576117fb6116f7565b5b50565b5f81905061180c826117eb565b919050565b5f61181b826117ff565b9050919050565b61182b81611811565b82525050565b5f82825260208201905092915050565b5f61184b82611566565b6118558185611831565b9350611865818560208601611580565b61186e8161158e565b840191505092915050565b5f608083015f83015161188e5f8601826117dc565b5060208301516118a16020860182611822565b5060408301516118b46040860182611776565b50606083015184820360608601526118cc8282611841565b9150508091505092915050565b5f60a083015f8301516118ee5f8601826116e8565b506020830151611901602086018261175b565b5060408301516119146040860182611776565b5060608301516119276060860182611796565b506080830151848203608086015261193f8282611879565b9150508091505092915050565b5f61195783836118d9565b905092915050565b5f602082019050919050565b5f611975826116bf565b61197f81856116c9565b935083602082028501611991856116d9565b805f5b858110156119cc57848403895281516119ad858261194c565b94506119b88361195f565b925060208a01995050600181019050611994565b50829750879550505050505092915050565b5f6020820190508181035f8301526119f6818461196b565b905092915050565b5f819050919050565b611a10816119fe565b8114611a1a575f80fd5b50565b5f81359050611a2b81611a07565b92915050565b5f60208284031215611a4657611a456113ff565b5b5f611a5384828501611a1d565b91505092915050565b5f60a083015f830151611a715f8601826116e8565b506020830151611a84602086018261175b565b506040830151611a976040860182611776565b506060830151611aaa6060860182611796565b5060808301518482036080860152611ac28282611879565b9150508091505092915050565b5f6020820190508181035f830152611ae78184611a5c565b905092915050565b5f6020820190508181035f830152611b07818461159e565b905092915050565b608082015f820151611b235f85018261175b565b506020820151611b3660208501826116e8565b506040820151611b496040850182611776565b506060820151611b5c6060850182611796565b50505050565b5f608082019050611b755f830184611b0f565b92915050565b611b84816119fe565b82525050565b5f602082019050611b9d5f830184611b7b565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611bdd8261158e565b810181811067ffffffffffffffff82111715611bfc57611bfb611ba7565b5b80604052505050565b5f611c0e6113f6565b9050611c1a8282611bd4565b919050565b5f80fd5b60028110611c2f575f80fd5b50565b5f81359050611c4081611c23565b92915050565b611c4f8161176a565b8114611c59575f80fd5b50565b5f81359050611c6a81611c46565b92915050565b611c7981611785565b8114611c83575f80fd5b50565b5f81359050611c9481611c70565b92915050565b5f60808284031215611caf57611cae611ba3565b5b611cb96080611c05565b90505f611cc884828501611c32565b5f830152506020611cdb84828501611448565b6020830152506040611cef84828501611c5c565b6040830152506060611d0384828501611c86565b60608301525092915050565b60058110611d1b575f80fd5b50565b5f81359050611d2c81611d0f565b92915050565b60048110611d3e575f80fd5b50565b5f81359050611d4f81611d32565b92915050565b5f80fd5b5f67ffffffffffffffff821115611d7357611d72611ba7565b5b611d7c8261158e565b9050602081019050919050565b828183375f83830152505050565b5f611da9611da484611d59565b611c05565b905082815260208101848484011115611dc557611dc4611d55565b5b611dd0848285611d89565b509392505050565b5f82601f830112611dec57611deb6114ba565b5b8135611dfc848260208601611d97565b91505092915050565b5f60808284031215611e1a57611e19611ba3565b5b611e246080611c05565b90505f611e3384828501611d1e565b5f830152506020611e4684828501611d41565b6020830152506040611e5a84828501611c5c565b604083015250606082013567ffffffffffffffff811115611e7e57611e7d611c1f565b5b611e8a84828501611dd8565b60608301525092915050565b5f60a08284031215611eab57611eaa611ba3565b5b611eb560a0611c05565b90505f611ec484828501611448565b5f830152506020611ed784828501611c32565b6020830152506040611eeb84828501611c5c565b6040830152506060611eff84828501611c86565b606083015250608082013567ffffffffffffffff811115611f2357611f22611c1f565b5b611f2f84828501611e05565b60808301525092915050565b5f6101008284031215611f5157611f50611ba3565b5b611f5b60a0611c05565b90505f611f6a84828501611c9a565b5f83015250608082013567ffffffffffffffff811115611f8d57611f8c611c1f565b5b611f9984828501611e96565b60208301525060a082013567ffffffffffffffff811115611fbd57611fbc611c1f565b5b611fc984828501611e96565b60408301525060c082013567ffffffffffffffff811115611fed57611fec611c1f565b5b611ff984828501611e96565b60608301525060e082013567ffffffffffffffff81111561201d5761201c611c1f565b5b61202984828501611e96565b60808301525092915050565b5f6020828403121561204a576120496113ff565b5b5f82013567ffffffffffffffff81111561206757612066611403565b5b61207384828501611f3b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806120c057607f821691505b6020821081036120d3576120d261207c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026121627fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612127565b61216c8683612127565b95508019841693508086168417925050509392505050565b5f61219e612199612194846119fe565b61164b565b6119fe565b9050919050565b5f819050919050565b6121b783612184565b6121cb6121c3826121a5565b848454612133565b825550505050565b5f90565b6121df6121d3565b6121ea8184846121ae565b505050565b5b8181101561220d576122025f826121d7565b6001810190506121f0565b5050565b601f8211156122525761222381612106565b61222c84612118565b8101602085101561223b578190505b61224f61224785612118565b8301826121ef565b50505b505050565b5f82821c905092915050565b5f6122725f1984600802612257565b1980831691505092915050565b5f61228a8383612263565b9150826002028217905092915050565b6122a382611566565b67ffffffffffffffff8111156122bc576122bb611ba7565b5b6122c682546120a9565b6122d1828285612211565b5f60209050601f831160018114612302575f84156122f0578287015190505b6122fa858261227f565b865550612361565b601f19841661231086612106565b5f5b8281101561233757848901518255600182019150602085019450602081019050612312565b868310156123545784890151612350601f891682612263565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220232ad425d6a3fa9ff7de7b59ca0cdff9b09b560e5493bdfd8320e53da80c045964736f6c634300081a0033", o = class o extends E {
|
|
1
|
+
import { W as r, $ as m, G as h, t as g, k as A } from "../generated-57_Kffpz.js";
|
|
2
|
+
import T from "@boostxyz/signatures/events";
|
|
3
|
+
import { isAddressEqual as w, encodeAbiParameters as S } from "viem";
|
|
4
|
+
import { getLogs as E } from "viem/actions";
|
|
5
|
+
import { DeployableTarget as N } from "../Deployable/DeployableTarget.js";
|
|
6
|
+
import { FieldValueUndefinedError as C, UnrecognizedFilterTypeError as I, FieldValueNotComparableError as D, InvalidNumericalCriteriaError as p, NoEventActionStepsProvidedError as x, TooManyEventActionStepsProvidedError as R } from "../errors.js";
|
|
7
|
+
import { RegistryType as _ } from "../utils.js";
|
|
8
|
+
const v = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660048111156105305761052f6115d7565b5b6004811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600481111561076e5761076d6115d7565b5b60048111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836004811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600481111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600481111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600581106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60058110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220a8ee5f8b5a49a9c61c1747482b13d7b4617cfc02983722a0395994bf27c456a064736f6c634300081a0033";
|
|
9
|
+
var B = /* @__PURE__ */ ((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))(B || {}), U = /* @__PURE__ */ ((b) => (b[b.UINT = 0] = "UINT", b[b.ADDRESS = 1] = "ADDRESS", b[b.BYTES = 2] = "BYTES", b[b.STRING = 3] = "STRING", b))(U || {}), V = /* @__PURE__ */ ((b) => (b[b.EVENT = 0] = "EVENT", b[b.FUNC = 1] = "FUNC", b))(V || {});
|
|
10
|
+
function L(b) {
|
|
11
|
+
return Array.isArray(b.actionSteps);
|
|
12
|
+
}
|
|
13
|
+
const s = class s extends N {
|
|
9
14
|
constructor() {
|
|
10
|
-
super(...arguments), this.abi =
|
|
15
|
+
super(...arguments), this.abi = r;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
18
|
* Gets a specific action event by index
|
|
@@ -18,8 +23,8 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
18
23
|
* @param {?ReadParams<typeof eventActionAbi, 'getActionStep'>} [params]
|
|
19
24
|
* @returns {Promise<ActionStep>}
|
|
20
25
|
*/
|
|
21
|
-
async getActionStep(f,
|
|
22
|
-
return (await this.getActionSteps(
|
|
26
|
+
async getActionStep(f, e) {
|
|
27
|
+
return (await this.getActionSteps(e)).at(f);
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* Gets all action events
|
|
@@ -30,13 +35,13 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
30
35
|
* @returns {Promise<ActionStep[]>}
|
|
31
36
|
*/
|
|
32
37
|
async getActionSteps(f) {
|
|
33
|
-
const
|
|
38
|
+
const e = await m(this._config, {
|
|
34
39
|
address: this.assertValidAddress(),
|
|
35
40
|
...this.optionallyAttachAccount(),
|
|
36
41
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
37
42
|
...f
|
|
38
43
|
});
|
|
39
|
-
return
|
|
44
|
+
return O(e.map(y));
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Gets the count of action events
|
|
@@ -58,12 +63,13 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
58
63
|
* @returns {Promise<ActionClaimant>}
|
|
59
64
|
*/
|
|
60
65
|
async getActionClaimant(f) {
|
|
61
|
-
|
|
66
|
+
const e = await h(this._config, {
|
|
62
67
|
address: this.assertValidAddress(),
|
|
63
68
|
...this.optionallyAttachAccount(),
|
|
64
69
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
65
70
|
...f
|
|
66
71
|
});
|
|
72
|
+
return y(e);
|
|
67
73
|
}
|
|
68
74
|
/**
|
|
69
75
|
* Executes a prepared event action
|
|
@@ -74,8 +80,8 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
74
80
|
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
75
81
|
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
76
82
|
*/
|
|
77
|
-
async execute(f,
|
|
78
|
-
return this.awaitResult(this.executeRaw(f,
|
|
83
|
+
async execute(f, e) {
|
|
84
|
+
return await this.awaitResult(this.executeRaw(f, e));
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* Executes a prepared event action
|
|
@@ -86,15 +92,15 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
86
92
|
* @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
|
|
87
93
|
* @returns {unknown}
|
|
88
94
|
*/
|
|
89
|
-
async executeRaw(f,
|
|
90
|
-
const { request:
|
|
95
|
+
async executeRaw(f, e) {
|
|
96
|
+
const { request: a, result: t } = await g(this._config, {
|
|
91
97
|
address: this.assertValidAddress(),
|
|
92
98
|
...this.optionallyAttachAccount(),
|
|
93
99
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
94
|
-
...
|
|
100
|
+
...e,
|
|
95
101
|
args: [f]
|
|
96
102
|
});
|
|
97
|
-
return { hash: await
|
|
103
|
+
return { hash: await A(this._config, a), result: t };
|
|
98
104
|
}
|
|
99
105
|
/**
|
|
100
106
|
* Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
|
|
@@ -110,9 +116,9 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
110
116
|
* @returns {Promise<boolean>}
|
|
111
117
|
*/
|
|
112
118
|
async validateActionSteps(f) {
|
|
113
|
-
const
|
|
114
|
-
for (const
|
|
115
|
-
if (!await this.isActionStepValid(
|
|
119
|
+
const e = await this.getActionSteps(f);
|
|
120
|
+
for (const a of e)
|
|
121
|
+
if (!await this.isActionStepValid(a, f))
|
|
116
122
|
return !1;
|
|
117
123
|
return !0;
|
|
118
124
|
}
|
|
@@ -129,21 +135,21 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
129
135
|
* }} [params]
|
|
130
136
|
* @returns {Promise<boolean>}
|
|
131
137
|
*/
|
|
132
|
-
async isActionStepValid(f,
|
|
133
|
-
const
|
|
134
|
-
let
|
|
135
|
-
if (
|
|
138
|
+
async isActionStepValid(f, e) {
|
|
139
|
+
const a = f.actionParameter, t = f.signature;
|
|
140
|
+
let n;
|
|
141
|
+
if (e != null && e.knownEvents ? n = e.knownEvents[t] : n = T.abi[t], !n)
|
|
136
142
|
throw new Error(`No known ABI for given event signature: ${t}`);
|
|
137
|
-
const
|
|
143
|
+
const c = f.targetContract, d = (e == null ? void 0 : e.logs) || await E(this._config.getClient({ chainId: e == null ? void 0 : e.chainId }), {
|
|
138
144
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
139
|
-
...
|
|
140
|
-
address:
|
|
141
|
-
event:
|
|
145
|
+
...e,
|
|
146
|
+
address: c,
|
|
147
|
+
event: n
|
|
142
148
|
});
|
|
143
|
-
if (!
|
|
149
|
+
if (!d.length)
|
|
144
150
|
return !1;
|
|
145
|
-
for (let
|
|
146
|
-
if (!this.validateLogAgainstCriteria(
|
|
151
|
+
for (let o of d)
|
|
152
|
+
if (!this.validateLogAgainstCriteria(a, o))
|
|
147
153
|
return !1;
|
|
148
154
|
return !0;
|
|
149
155
|
}
|
|
@@ -152,34 +158,34 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
152
158
|
*
|
|
153
159
|
* @param {Criteria} criteria - The criteria to validate against.
|
|
154
160
|
* @param {Log} log - The Viem event log.
|
|
155
|
-
* @returns {
|
|
161
|
+
* @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
|
|
156
162
|
*/
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
throw new
|
|
163
|
+
validateLogAgainstCriteria(f, e) {
|
|
164
|
+
const a = e.topics.at(f.fieldIndex);
|
|
165
|
+
if (a === void 0)
|
|
166
|
+
throw new C({ log: e, criteria: f, fieldValue: a });
|
|
161
167
|
switch (f.filterType) {
|
|
162
|
-
case
|
|
163
|
-
return f.fieldType ===
|
|
168
|
+
case 0:
|
|
169
|
+
return f.fieldType === 1 ? w(
|
|
164
170
|
f.filterData,
|
|
165
|
-
`0x${
|
|
166
|
-
) :
|
|
167
|
-
case
|
|
168
|
-
return
|
|
169
|
-
case
|
|
170
|
-
if (f.fieldType ===
|
|
171
|
-
return BigInt(
|
|
172
|
-
throw new
|
|
173
|
-
case
|
|
174
|
-
if (f.fieldType ===
|
|
175
|
-
return BigInt(
|
|
176
|
-
throw new
|
|
177
|
-
case
|
|
178
|
-
if (f.fieldType ===
|
|
179
|
-
return
|
|
180
|
-
throw new
|
|
171
|
+
`0x${a.slice(-40)}`
|
|
172
|
+
) : a === f.filterData;
|
|
173
|
+
case 1:
|
|
174
|
+
return a !== f.filterData;
|
|
175
|
+
case 2:
|
|
176
|
+
if (f.fieldType === 0)
|
|
177
|
+
return BigInt(a) > BigInt(f.filterData);
|
|
178
|
+
throw new p({ log: e, criteria: f, fieldValue: a });
|
|
179
|
+
case 3:
|
|
180
|
+
if (f.fieldType === 0)
|
|
181
|
+
return BigInt(a) < BigInt(f.filterData);
|
|
182
|
+
throw new p({ log: e, criteria: f, fieldValue: a });
|
|
183
|
+
case 4:
|
|
184
|
+
if (f.fieldType === 2 || f.fieldType === 3)
|
|
185
|
+
return a.includes(f.filterData);
|
|
186
|
+
throw new D({ log: e, criteria: f, fieldValue: a });
|
|
181
187
|
default:
|
|
182
|
-
throw new
|
|
188
|
+
throw new I({ log: e, criteria: f, fieldValue: a });
|
|
183
189
|
}
|
|
184
190
|
}
|
|
185
191
|
/**
|
|
@@ -190,39 +196,200 @@ const R = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
190
196
|
* @param {?DeployableOptions} [_options]
|
|
191
197
|
* @returns {GenericDeployableParams}
|
|
192
198
|
*/
|
|
193
|
-
buildParameters(f,
|
|
194
|
-
const [
|
|
199
|
+
buildParameters(f, e) {
|
|
200
|
+
const [a, t] = this.validateDeploymentConfig(
|
|
195
201
|
f,
|
|
196
|
-
|
|
202
|
+
e
|
|
197
203
|
);
|
|
198
|
-
let
|
|
199
|
-
if (
|
|
200
|
-
let
|
|
201
|
-
if (
|
|
202
|
-
throw new
|
|
203
|
-
if (
|
|
204
|
-
throw new
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
actionClaimant:
|
|
208
|
-
actionStepOne:
|
|
209
|
-
actionStepTwo:
|
|
210
|
-
actionStepThree:
|
|
211
|
-
actionStepFour:
|
|
204
|
+
let n;
|
|
205
|
+
if (L(a)) {
|
|
206
|
+
let c = a.actionSteps.filter((o) => !!o);
|
|
207
|
+
if (c.length === 0)
|
|
208
|
+
throw new x();
|
|
209
|
+
if (c.length > 4)
|
|
210
|
+
throw new R();
|
|
211
|
+
let d = Array.from({ length: 4 }, (o, l) => c.at(l) || c.at(-1));
|
|
212
|
+
n = {
|
|
213
|
+
actionClaimant: a.actionClaimant,
|
|
214
|
+
actionStepOne: d[0],
|
|
215
|
+
actionStepTwo: d[1],
|
|
216
|
+
actionStepThree: d[2],
|
|
217
|
+
actionStepFour: d[3]
|
|
212
218
|
};
|
|
213
219
|
} else
|
|
214
|
-
|
|
220
|
+
n = a;
|
|
215
221
|
return {
|
|
216
|
-
abi:
|
|
217
|
-
bytecode:
|
|
218
|
-
args: [
|
|
222
|
+
abi: r,
|
|
223
|
+
bytecode: v,
|
|
224
|
+
args: [G(n)],
|
|
219
225
|
...this.optionallyAttachAccount(t.account)
|
|
220
226
|
};
|
|
221
227
|
}
|
|
222
228
|
};
|
|
223
|
-
|
|
224
|
-
let
|
|
229
|
+
s.base = "0x2bD655240116b18f5b9F24E4b7b51B87B7b33D37", s.registryType = _.ACTION;
|
|
230
|
+
let u = s;
|
|
231
|
+
function O(b) {
|
|
232
|
+
const f = [], e = {};
|
|
233
|
+
for (let a of b) {
|
|
234
|
+
const t = JSON.stringify(a);
|
|
235
|
+
e[t] || (f.push(a), e[t] = !0);
|
|
236
|
+
}
|
|
237
|
+
return f;
|
|
238
|
+
}
|
|
239
|
+
function i(b) {
|
|
240
|
+
return {
|
|
241
|
+
...b,
|
|
242
|
+
chainid: BigInt(b.chainid)
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function y(b) {
|
|
246
|
+
if (b.chainid > BigInt(Number.MAX_SAFE_INTEGER))
|
|
247
|
+
throw new Error("Chain ID exceeds max safe integer");
|
|
248
|
+
return {
|
|
249
|
+
...b,
|
|
250
|
+
chainid: Number(b.chainid)
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function G({
|
|
254
|
+
actionClaimant: b,
|
|
255
|
+
actionStepOne: f,
|
|
256
|
+
actionStepTwo: e,
|
|
257
|
+
actionStepThree: a,
|
|
258
|
+
actionStepFour: t
|
|
259
|
+
}) {
|
|
260
|
+
return S(
|
|
261
|
+
[
|
|
262
|
+
{
|
|
263
|
+
type: "tuple",
|
|
264
|
+
name: "initPayload",
|
|
265
|
+
components: [
|
|
266
|
+
{
|
|
267
|
+
type: "tuple",
|
|
268
|
+
name: "actionClaimant",
|
|
269
|
+
components: [
|
|
270
|
+
{ type: "uint8", name: "signatureType" },
|
|
271
|
+
{ type: "bytes32", name: "signature" },
|
|
272
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
273
|
+
{ type: "address", name: "targetContract" },
|
|
274
|
+
{ type: "uint256", name: "chainid" }
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
type: "tuple",
|
|
279
|
+
name: "actionStepOne",
|
|
280
|
+
components: [
|
|
281
|
+
{ type: "bytes32", name: "signature" },
|
|
282
|
+
{ type: "uint8", name: "signatureType" },
|
|
283
|
+
{ type: "uint8", name: "actionType" },
|
|
284
|
+
{ type: "address", name: "targetContract" },
|
|
285
|
+
{ type: "uint256", name: "chainid" },
|
|
286
|
+
{
|
|
287
|
+
type: "tuple",
|
|
288
|
+
name: "actionParameter",
|
|
289
|
+
components: [
|
|
290
|
+
{ type: "uint8", name: "filterType" },
|
|
291
|
+
{ type: "uint8", name: "fieldType" },
|
|
292
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
293
|
+
{ type: "bytes", name: "filterData" }
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: "tuple",
|
|
300
|
+
name: "actionStepTwo",
|
|
301
|
+
components: [
|
|
302
|
+
{ type: "bytes32", name: "signature" },
|
|
303
|
+
{ type: "uint8", name: "signatureType" },
|
|
304
|
+
{ type: "uint8", name: "actionType" },
|
|
305
|
+
{ type: "address", name: "targetContract" },
|
|
306
|
+
{ type: "uint256", name: "chainid" },
|
|
307
|
+
{
|
|
308
|
+
type: "tuple",
|
|
309
|
+
name: "actionParameter",
|
|
310
|
+
components: [
|
|
311
|
+
{ type: "uint8", name: "filterType" },
|
|
312
|
+
{ type: "uint8", name: "fieldType" },
|
|
313
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
314
|
+
{ type: "bytes", name: "filterData" }
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: "tuple",
|
|
321
|
+
name: "actionStepThree",
|
|
322
|
+
components: [
|
|
323
|
+
{ type: "bytes32", name: "signature" },
|
|
324
|
+
{ type: "uint8", name: "signatureType" },
|
|
325
|
+
{ type: "uint8", name: "actionType" },
|
|
326
|
+
{ type: "address", name: "targetContract" },
|
|
327
|
+
{ type: "uint256", name: "chainid" },
|
|
328
|
+
{
|
|
329
|
+
type: "tuple",
|
|
330
|
+
name: "actionParameter",
|
|
331
|
+
components: [
|
|
332
|
+
{ type: "uint8", name: "filterType" },
|
|
333
|
+
{ type: "uint8", name: "fieldType" },
|
|
334
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
335
|
+
{ type: "bytes", name: "filterData" }
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: "tuple",
|
|
342
|
+
name: "actionStepFour",
|
|
343
|
+
components: [
|
|
344
|
+
{ type: "bytes32", name: "signature" },
|
|
345
|
+
{ type: "uint8", name: "signatureType" },
|
|
346
|
+
{ type: "uint8", name: "actionType" },
|
|
347
|
+
{ type: "address", name: "targetContract" },
|
|
348
|
+
{ type: "uint256", name: "chainid" },
|
|
349
|
+
{
|
|
350
|
+
type: "tuple",
|
|
351
|
+
name: "actionParameter",
|
|
352
|
+
components: [
|
|
353
|
+
{ type: "uint8", name: "filterType" },
|
|
354
|
+
{ type: "uint8", name: "fieldType" },
|
|
355
|
+
{ type: "uint8", name: "fieldIndex" },
|
|
356
|
+
{ type: "bytes", name: "filterData" }
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
[
|
|
365
|
+
{
|
|
366
|
+
actionClaimant: i(b),
|
|
367
|
+
actionStepOne: {
|
|
368
|
+
...i(f),
|
|
369
|
+
actionType: f.actionType || 0
|
|
370
|
+
},
|
|
371
|
+
actionStepTwo: {
|
|
372
|
+
...i(e),
|
|
373
|
+
actionType: e.actionType || 0
|
|
374
|
+
},
|
|
375
|
+
actionStepThree: {
|
|
376
|
+
...i(a),
|
|
377
|
+
actionType: a.actionType || 0
|
|
378
|
+
},
|
|
379
|
+
actionStepFour: {
|
|
380
|
+
...i(t),
|
|
381
|
+
actionType: t.actionType || 0
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
);
|
|
386
|
+
}
|
|
225
387
|
export {
|
|
226
|
-
|
|
388
|
+
u as EventAction,
|
|
389
|
+
B as FilterType,
|
|
390
|
+
U as PrimitiveType,
|
|
391
|
+
V as SignatureType,
|
|
392
|
+
L as isEventActionPayloadSimple,
|
|
393
|
+
G as prepareEventActionPayload
|
|
227
394
|
};
|
|
228
395
|
//# sourceMappingURL=EventAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventAction.js","sources":["../../src/Actions/EventAction.ts"],"sourcesContent":["import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport {\n type Abi,\n type AbiEvent,\n type Address,\n type ContractEventName,\n type Hex,\n type Log,\n isAddressEqual,\n} from 'viem';\nimport { getLogs } from 'viem/actions';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnrecognizedFilterTypeError,\n} from '../errors';\nimport {\n type ActionClaimant,\n type ActionStep,\n type Criteria,\n type EventActionPayload,\n type EventActionPayloadRaw,\n FilterType,\n type GetLogsParams,\n PrimitiveType,\n type ReadParams,\n RegistryType,\n type WriteParams,\n dedupeActionSteps,\n isEventActionPayloadSimple,\n prepareEventActionPayload,\n} from '../utils';\n\nexport type { EventActionPayload };\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env.VITE_EVENT_ACTION_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadParams<typeof eventActionAbi, 'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadParams<typeof eventActionAbi, 'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadParams<typeof eventActionAbi, 'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as ActionStep[];\n return dedupeActionSteps(steps);\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadParams<typeof eventActionAbi, 'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadParams<typeof eventActionAbi, 'getActionClaimant'>,\n ) {\n return readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n }) as Promise<ActionClaimant>;\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {unknown}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'> &\n * GetLogsParams<Abi, ContractEventName<Abi>> & {\n * knownEvents?: Record<Hex, AbiEvent>;\n * logs?: Log[];\n * }} [params]\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(\n params?: ReadParams<typeof eventActionAbi, 'getActionSteps'> &\n GetLogsParams<Abi, ContractEventName<Abi>> & {\n knownEvents?: Record<Hex, AbiEvent>;\n logs?: Log[];\n },\n ) {\n const actionSteps = await this.getActionSteps(params);\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep\n * @param {?GetLogsParams<Abi, ContractEventName<Abi>> & {\n * knownEvents?: Record<Hex, AbiEvent>;\n * logs?: Log[];\n * }} [params]\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params?: GetLogsParams<Abi, ContractEventName<Abi>> & {\n knownEvents?: Record<Hex, AbiEvent>;\n logs?: Log[];\n },\n ) {\n const criteria = actionStep.actionParameter;\n const signature = actionStep.signature;\n let event: AbiEvent;\n // Lookup ABI based on event signature\n if (params?.knownEvents) {\n event = params.knownEvents[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n if (!event) {\n throw new Error(`No known ABI for given event signature: ${signature}`);\n }\n const targetContract = actionStep.targetContract;\n // Get all logs matching the event signature from the target contract\n const logs =\n params?.logs ||\n (await getLogs(this._config.getClient({ chainId: params?.chainId }), {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n ...(params as any),\n address: targetContract,\n event,\n }));\n if (!logs.length) return false;\n for (let log of logs) {\n if (!this.validateLogAgainstCriteria(criteria, log)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.\n */\n public async validateLogAgainstCriteria(criteria: Criteria, log: Log) {\n const fieldValue = log.topics.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n if (criteria.fieldType === PrimitiveType.ADDRESS) {\n return isAddressEqual(\n criteria.filterData,\n `0x${fieldValue.slice(-40)}`,\n );\n }\n return fieldValue === criteria.filterData;\n\n case FilterType.NOT_EQUAL:\n return fieldValue !== criteria.filterData;\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({ log, criteria, fieldValue });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({ log, criteria, fieldValue });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n return fieldValue.includes(criteria.filterData);\n }\n throw new FieldValueNotComparableError({ log, criteria, fieldValue });\n\n default:\n throw new UnrecognizedFilterTypeError({ log, criteria, fieldValue });\n }\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStep[] = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i)! || tmpSteps.slice(0, i).at(-1)!;\n });\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps.at(0)!,\n actionStepTwo: steps.at(1)!,\n actionStepThree: steps.at(2)!,\n actionStepFour: steps.at(3)!,\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","dedupeActionSteps","readEventActionGetActionClaimant","data","request","result","simulateEventActionExecute","writeEventActionExecute","actionSteps","actionStep","criteria","signature","event","events","targetContract","logs","getLogs","log","fieldValue","FieldValueUndefinedError","FilterType","PrimitiveType","isAddressEqual","InvalidNumericalCriteriaError","FieldValueNotComparableError","UnrecognizedFilterTypeError","_payload","_options","payload","options","rawPayload","isEventActionPayloadSimple","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","i","bytecode","prepareEventActionPayload","RegistryType","EventAction"],"mappings":";;;;;;;8tkBA2DaA,IAAN,MAAMA,UAAoBC,EAG/B;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2B/B,MAAa,cACXC,GACAC,GACA;AAEO,YADO,MAAM,KAAK,eAAeA,CAAM,GACjC,GAAGD,CAAK;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,eACXC,GACA;AACA,UAAMC,IAAS,MAAMC,EAA8B,KAAK,SAAS;AAAA,MAC/D,SAAS,KAAK,mBA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AACY,MAAAP,IAAA;AAAA,QACX,gBAAgBF,EAAQ;AAAA,QACxB,eAAe7B,EAAM,GAAG,CAAC;AAAA,QACzB,eAAeA,EAAM,GAAG,CAAC;AAAA,QACzB,iBAAiBA,EAAM,GAAG,CAAC;AAAA,QAC3B,gBAAgBA,EAAM,GAAG,CAAC;AAAA,MAAA;AAAA,IAC5B;AAEa,MAAA+B,IAAAF;AAER,WAAA;AAAA,MACL,KAAKhC;AAAAA,MACL,UAAA0C;AAAA,MACA,MAAM,CAACC,EAA0BT,CAAU,CAAC;AAAA,MAC5C,GAAG,KAAK,wBAAwBD,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AA7SyBnC,EAAA,OAAgB,8CAQvCA,EAAuB,eAA6B8C,EAAa;AA3B5D,IAAMC,IAAN/C;"}
|
|
1
|
+
{"version":3,"file":"EventAction.js","sources":["../../src/Actions/EventAction.ts"],"sourcesContent":["import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport {\n type Abi,\n type AbiEvent,\n type Address,\n type ContractEventName,\n type Hex,\n type Log,\n encodeAbiParameters,\n isAddressEqual,\n} from 'viem';\nimport { getLogs } from 'viem/actions';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnrecognizedFilterTypeError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env.VITE_EVENT_ACTION_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadParams<typeof eventActionAbi, 'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadParams<typeof eventActionAbi, 'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadParams<typeof eventActionAbi, 'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadParams<typeof eventActionAbi, 'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadParams<typeof eventActionAbi, 'getActionClaimant'>,\n ) {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]\n * @returns {unknown}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param {?ReadParams<typeof eventActionAbi, 'getActionSteps'> &\n * GetLogsParams<Abi, ContractEventName<Abi>> & {\n * knownEvents?: Record<Hex, AbiEvent>;\n * logs?: Log[];\n * }} [params]\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(\n params?: ReadParams<typeof eventActionAbi, 'getActionSteps'> &\n GetLogsParams<Abi, ContractEventName<Abi>> & {\n knownEvents?: Record<Hex, AbiEvent>;\n logs?: Log[];\n },\n ) {\n const actionSteps = await this.getActionSteps(params);\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep\n * @param {?GetLogsParams<Abi, ContractEventName<Abi>> & {\n * knownEvents?: Record<Hex, AbiEvent>;\n * logs?: Log[];\n * }} [params]\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params?: GetLogsParams<Abi, ContractEventName<Abi>> & {\n knownEvents?: Record<Hex, AbiEvent>;\n logs?: Log[];\n },\n ) {\n const criteria = actionStep.actionParameter;\n const signature = actionStep.signature;\n let event: AbiEvent;\n // Lookup ABI based on event signature\n if (params?.knownEvents) {\n event = params.knownEvents[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n if (!event) {\n throw new Error(`No known ABI for given event signature: ${signature}`);\n }\n const targetContract = actionStep.targetContract;\n // Get all logs matching the event signature from the target contract\n const logs =\n params?.logs ||\n (await getLogs(this._config.getClient({ chainId: params?.chainId }), {\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n ...(params as any),\n address: targetContract,\n event,\n }));\n if (!logs.length) return false;\n for (let log of logs) {\n if (!this.validateLogAgainstCriteria(criteria, log)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {boolean} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(criteria: Criteria, log: Log) {\n const fieldValue = log.topics.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n if (criteria.fieldType === PrimitiveType.ADDRESS) {\n return isAddressEqual(\n criteria.filterData,\n `0x${fieldValue.slice(-40)}`,\n );\n }\n return fieldValue === criteria.filterData;\n\n case FilterType.NOT_EQUAL:\n return fieldValue !== criteria.filterData;\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({ log, criteria, fieldValue });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({ log, criteria, fieldValue });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n return fieldValue.includes(criteria.filterData);\n }\n throw new FieldValueNotComparableError({ log, criteria, fieldValue });\n\n default:\n throw new UnrecognizedFilterTypeError({ log, criteria, fieldValue });\n }\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","actionSteps","actionStep","criteria","signature","event","events","targetContract","logs","getLogs","log","fieldValue","FieldValueUndefinedError","isAddressEqual","InvalidNumericalCriteriaError","FieldValueNotComparableError","UnrecognizedFilterTypeError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","i","bytecode","prepareEventActionPayload","RegistryType","EventAction","_steps","signatures","_toRawActionStep","obj","actionClaimant","actionStepOne","actionStepTwo","actionStepThree","actionStepFour","encodeAbiParameters"],"mappings":";;;;;;;;AAmDY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,QAAQ,CAAR,IAAA,SACAA,EAAAA,EAAA,YAAY,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,QAC1C;AAAA,QACA,eAAe;AAAA,UACb,GAAGH,EAAiBI,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,iBAAiB;AAAA,UACf,GAAGJ,EAAiBK,CAAe;AAAA,UACnC,YAAYA,EAAgB,cAAc;AAAA,QAC5C;AAAA,QACA,gBAAgB;AAAA,UACd,GAAGL,EAAiBM,CAAc;AAAA,UAClC,YAAYA,EAAe,cAAc;AAAA,QAC3C;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-wKBNvm48.cjs"),r=require("../componentInterfaces-CKCBwG16.cjs"),m=require("@wagmi/core"),a=require("../errors.cjs"),l=require("./SimpleAllowList.cjs"),s=require("./SimpleDenyList.cjs"),e={[r.ASimpleAllowList]:l.SimpleAllowList,[r.ASimpleDenyList]:s.SimpleDenyList};async function p(t,n){const o=await m.readContract(t.config,{abi:c.oe,functionName:"getComponentInterface",address:n}),i=e[o];if(!i)throw new a.InvalidComponentInterfaceError(Object.keys(e),o);return new i(t,n)}exports.SimpleAllowList=l.SimpleAllowList;exports.SimpleDenyList=s.SimpleDenyList;exports.AllowListByComponentInterface=e;exports.allowListFromAddress=p;
|
|
2
2
|
//# sourceMappingURL=AllowList.cjs.map
|