@boostxyz/sdk 7.2.0 → 7.4.0
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/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +29 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +481 -397
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +2 -2
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.js +4 -4
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +1 -1
- package/dist/{Budget-uGKa2qzz.cjs → Budget-CBvRK5Ia.cjs} +2 -2
- package/dist/{Budget-uGKa2qzz.cjs.map → Budget-CBvRK5Ia.cjs.map} +1 -1
- package/dist/{Budget-B-grnRq9.js → Budget-DlN8SRIG.js} +2 -2
- package/dist/{Budget-B-grnRq9.js.map → Budget-DlN8SRIG.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.js +1 -1
- package/dist/{Incentive-Dufx0ZjH.cjs → Incentive-CoOu1lA8.cjs} +2 -2
- package/dist/{Incentive-Dufx0ZjH.cjs.map → Incentive-CoOu1lA8.cjs.map} +1 -1
- package/dist/{Incentive-Bz_g-nID.js → Incentive-OiTBMgKz.js} +2 -2
- package/dist/{Incentive-Bz_g-nID.js.map → Incentive-OiTBMgKz.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +2 -2
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +173 -149
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts +3 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +127 -103
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +1 -1
- package/dist/{SimpleDenyList-B2YDJ_gk.cjs → SimpleDenyList-DMTx64jC.cjs} +2 -2
- package/dist/{SimpleDenyList-B2YDJ_gk.cjs.map → SimpleDenyList-DMTx64jC.cjs.map} +1 -1
- package/dist/{SimpleDenyList-BlLgvhjE.js → SimpleDenyList-DWaW4ZEU.js} +2 -2
- package/dist/{SimpleDenyList-BlLgvhjE.js.map → SimpleDenyList-DWaW4ZEU.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +1 -1
- package/dist/{deployments-DKtAq6BT.js → deployments-CW15LXS5.js} +29 -9
- package/dist/{deployments-DKtAq6BT.js.map → deployments-CW15LXS5.js.map} +1 -1
- package/dist/deployments-DKScOGTf.cjs +2 -0
- package/dist/deployments-DKScOGTf.cjs.map +1 -0
- package/dist/deployments.json +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/Actions/EventAction.ts +144 -5
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +47 -8
- package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +49 -8
- package/dist/deployments-Dk-Z1L2X.cjs +0 -2
- package/dist/deployments-Dk-Z1L2X.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { cx as
|
|
2
|
-
import { getTransaction as
|
|
3
|
-
import { isAddressEqual as
|
|
4
|
-
import { i as
|
|
5
|
-
import { DeployableTarget as
|
|
6
|
-
import { ValidationAbiMissingError as
|
|
7
|
-
import { RegistryType as v0, CheatCodes as
|
|
8
|
-
const T0 = "0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033", E0 = {
|
|
1
|
+
import { cx as K, cy as u0, cz as o0, cA as c0, cB as p0 } from "../generated-CINzoGbl.js";
|
|
2
|
+
import { getTransaction as L, getTransactionReceipt as O } from "@wagmi/core";
|
|
3
|
+
import { isAddressEqual as T, toEventSelector as G, decodeFunctionData as X, isAddress as Y, decodeEventLog as V, zeroHash as C, fromHex as R, encodeAbiParameters as y0, pad as z, zeroAddress as b0, trim as l0 } from "viem";
|
|
4
|
+
import { i as g0 } from "../deployments-CW15LXS5.js";
|
|
5
|
+
import { DeployableTarget as h0 } from "../Deployable/DeployableTarget.js";
|
|
6
|
+
import { ValidationAbiMissingError as N, FunctionDataDecodeError as q, UnparseableAbiParamError as Z, DecodedArgsMalformedError as x0, DecodedArgsError as A, FieldValueUndefinedError as J, InvalidTupleDecodingError as S, UnrecognizedFilterTypeError as m0, FieldValueNotComparableError as f0, InvalidNumericalCriteriaError as _, NoEventActionStepsProvidedError as w0, TooManyEventActionStepsProvidedError as A0, InvalidTupleEncodingError as U } from "../errors.js";
|
|
7
|
+
import { RegistryType as v0, CheatCodes as B, TRANSFER_SIGNATURE as P } from "../utils.js";
|
|
8
|
+
const T0 = "0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033", S0 = {
|
|
9
9
|
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
|
|
10
10
|
name: "Transfer",
|
|
11
11
|
type: "event",
|
|
@@ -1380,157 +1380,157 @@ const T0 = "0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
1380
1380
|
}
|
|
1381
1381
|
]
|
|
1382
1382
|
}
|
|
1383
|
-
},
|
|
1384
|
-
if (
|
|
1385
|
-
const n =
|
|
1386
|
-
return d && i && Object.keys(i).forEach((
|
|
1383
|
+
}, g = Symbol.for("@ts-pattern/matcher"), E0 = Symbol.for("@ts-pattern/isVariadic"), $ = "@ts-pattern/anonymous-select-key", Q = (t) => !!(t && typeof t == "object"), F = (t) => t && !!t[g], l = (t, f, e) => {
|
|
1384
|
+
if (F(t)) {
|
|
1385
|
+
const n = t[g](), { matched: d, selections: i } = n.match(f);
|
|
1386
|
+
return d && i && Object.keys(i).forEach((r) => e(r, i[r])), d;
|
|
1387
1387
|
}
|
|
1388
|
-
if (
|
|
1389
|
-
if (!
|
|
1390
|
-
if (Array.isArray(
|
|
1388
|
+
if (Q(t)) {
|
|
1389
|
+
if (!Q(f)) return !1;
|
|
1390
|
+
if (Array.isArray(t)) {
|
|
1391
1391
|
if (!Array.isArray(f)) return !1;
|
|
1392
1392
|
let n = [], d = [], i = [];
|
|
1393
|
-
for (const
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1393
|
+
for (const r of t.keys()) {
|
|
1394
|
+
const a = t[r];
|
|
1395
|
+
F(a) && a[E0] ? i.push(a) : i.length ? d.push(a) : n.push(a);
|
|
1396
1396
|
}
|
|
1397
1397
|
if (i.length) {
|
|
1398
1398
|
if (i.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
1399
1399
|
if (f.length < n.length + d.length) return !1;
|
|
1400
|
-
const
|
|
1401
|
-
return n.every((
|
|
1400
|
+
const r = f.slice(0, n.length), a = d.length === 0 ? [] : f.slice(-d.length), s = f.slice(n.length, d.length === 0 ? 1 / 0 : -d.length);
|
|
1401
|
+
return n.every((c, I) => l(c, r[I], e)) && d.every((c, I) => l(c, a[I], e)) && (i.length === 0 || l(i[0], s, e));
|
|
1402
1402
|
}
|
|
1403
|
-
return
|
|
1403
|
+
return t.length === f.length && t.every((r, a) => l(r, f[a], e));
|
|
1404
1404
|
}
|
|
1405
|
-
return Reflect.ownKeys(
|
|
1406
|
-
const d =
|
|
1407
|
-
return (n in f ||
|
|
1405
|
+
return Reflect.ownKeys(t).every((n) => {
|
|
1406
|
+
const d = t[n];
|
|
1407
|
+
return (n in f || F(i = d) && i[g]().matcherType === "optional") && l(d, f[n], e);
|
|
1408
1408
|
var i;
|
|
1409
1409
|
});
|
|
1410
1410
|
}
|
|
1411
|
-
return Object.is(f,
|
|
1412
|
-
}, v = (
|
|
1413
|
-
var f,
|
|
1414
|
-
return
|
|
1415
|
-
},
|
|
1416
|
-
function
|
|
1417
|
-
return Object.assign(
|
|
1411
|
+
return Object.is(f, t);
|
|
1412
|
+
}, v = (t) => {
|
|
1413
|
+
var f, e, n;
|
|
1414
|
+
return Q(t) ? F(t) ? (f = (e = (n = t[g]()).getSelectionKeys) == null ? void 0 : e.call(n)) != null ? f : [] : Array.isArray(t) ? k(t, v) : k(Object.values(t), v) : [];
|
|
1415
|
+
}, k = (t, f) => t.reduce((e, n) => e.concat(f(n)), []);
|
|
1416
|
+
function p(t) {
|
|
1417
|
+
return Object.assign(t, { optional: () => I0(t), and: (f) => o(t, f), or: (f) => N0(t, f), select: (f) => f === void 0 ? e0(t) : e0(f, t) });
|
|
1418
1418
|
}
|
|
1419
|
-
function I0(
|
|
1420
|
-
return
|
|
1421
|
-
let
|
|
1419
|
+
function I0(t) {
|
|
1420
|
+
return p({ [g]: () => ({ match: (f) => {
|
|
1421
|
+
let e = {};
|
|
1422
1422
|
const n = (d, i) => {
|
|
1423
|
-
|
|
1423
|
+
e[d] = i;
|
|
1424
1424
|
};
|
|
1425
|
-
return f === void 0 ? (v(
|
|
1426
|
-
}, getSelectionKeys: () => v(
|
|
1425
|
+
return f === void 0 ? (v(t).forEach((d) => n(d, void 0)), { matched: !0, selections: e }) : { matched: l(t, f, n), selections: e };
|
|
1426
|
+
}, getSelectionKeys: () => v(t), matcherType: "optional" }) });
|
|
1427
1427
|
}
|
|
1428
|
-
function o(...
|
|
1429
|
-
return
|
|
1430
|
-
let
|
|
1428
|
+
function o(...t) {
|
|
1429
|
+
return p({ [g]: () => ({ match: (f) => {
|
|
1430
|
+
let e = {};
|
|
1431
1431
|
const n = (d, i) => {
|
|
1432
|
-
|
|
1432
|
+
e[d] = i;
|
|
1433
1433
|
};
|
|
1434
|
-
return { matched:
|
|
1435
|
-
}, getSelectionKeys: () =>
|
|
1434
|
+
return { matched: t.every((d) => l(d, f, n)), selections: e };
|
|
1435
|
+
}, getSelectionKeys: () => k(t, v), matcherType: "and" }) });
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
return
|
|
1439
|
-
let
|
|
1437
|
+
function N0(...t) {
|
|
1438
|
+
return p({ [g]: () => ({ match: (f) => {
|
|
1439
|
+
let e = {};
|
|
1440
1440
|
const n = (d, i) => {
|
|
1441
|
-
|
|
1441
|
+
e[d] = i;
|
|
1442
1442
|
};
|
|
1443
|
-
return
|
|
1444
|
-
}, getSelectionKeys: () =>
|
|
1443
|
+
return k(t, v).forEach((d) => n(d, void 0)), { matched: t.some((d) => l(d, f, n)), selections: e };
|
|
1444
|
+
}, getSelectionKeys: () => k(t, v), matcherType: "or" }) });
|
|
1445
1445
|
}
|
|
1446
|
-
function u(
|
|
1447
|
-
return { [
|
|
1446
|
+
function u(t) {
|
|
1447
|
+
return { [g]: () => ({ match: (f) => ({ matched: !!t(f) }) }) };
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const f = typeof
|
|
1451
|
-
return
|
|
1452
|
-
let d = { [f ??
|
|
1453
|
-
return { matched:
|
|
1454
|
-
d[i] =
|
|
1449
|
+
function e0(...t) {
|
|
1450
|
+
const f = typeof t[0] == "string" ? t[0] : void 0, e = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
|
|
1451
|
+
return p({ [g]: () => ({ match: (n) => {
|
|
1452
|
+
let d = { [f ?? $]: n };
|
|
1453
|
+
return { matched: e === void 0 || l(e, n, (i, r) => {
|
|
1454
|
+
d[i] = r;
|
|
1455
1455
|
}), selections: d };
|
|
1456
|
-
}, getSelectionKeys: () => [f ??
|
|
1456
|
+
}, getSelectionKeys: () => [f ?? $].concat(e === void 0 ? [] : v(e)) }) });
|
|
1457
1457
|
}
|
|
1458
|
-
function y(
|
|
1459
|
-
return typeof
|
|
1458
|
+
function y(t) {
|
|
1459
|
+
return typeof t == "number";
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return typeof
|
|
1461
|
+
function h(t) {
|
|
1462
|
+
return typeof t == "string";
|
|
1463
1463
|
}
|
|
1464
|
-
function x(
|
|
1465
|
-
return typeof
|
|
1464
|
+
function x(t) {
|
|
1465
|
+
return typeof t == "bigint";
|
|
1466
1466
|
}
|
|
1467
|
-
|
|
1467
|
+
p(u(function(t) {
|
|
1468
1468
|
return !0;
|
|
1469
1469
|
}));
|
|
1470
|
-
const m = (
|
|
1471
|
-
return m(o(
|
|
1472
|
-
var
|
|
1470
|
+
const m = (t) => Object.assign(p(t), { startsWith: (f) => {
|
|
1471
|
+
return m(o(t, (e = f, u((n) => h(n) && n.startsWith(e)))));
|
|
1472
|
+
var e;
|
|
1473
1473
|
}, endsWith: (f) => {
|
|
1474
|
-
return m(o(
|
|
1475
|
-
var
|
|
1476
|
-
}, minLength: (f) => m(o(
|
|
1477
|
-
return m(o(
|
|
1478
|
-
var
|
|
1474
|
+
return m(o(t, (e = f, u((n) => h(n) && n.endsWith(e)))));
|
|
1475
|
+
var e;
|
|
1476
|
+
}, minLength: (f) => m(o(t, ((e) => u((n) => h(n) && n.length >= e))(f))), length: (f) => m(o(t, ((e) => u((n) => h(n) && n.length === e))(f))), maxLength: (f) => m(o(t, ((e) => u((n) => h(n) && n.length <= e))(f))), includes: (f) => {
|
|
1477
|
+
return m(o(t, (e = f, u((n) => h(n) && n.includes(e)))));
|
|
1478
|
+
var e;
|
|
1479
1479
|
}, regex: (f) => {
|
|
1480
|
-
return m(o(
|
|
1481
|
-
var
|
|
1480
|
+
return m(o(t, (e = f, u((n) => h(n) && !!n.match(e)))));
|
|
1481
|
+
var e;
|
|
1482
1482
|
} });
|
|
1483
|
-
m(u(
|
|
1484
|
-
const b = (
|
|
1483
|
+
m(u(h));
|
|
1484
|
+
const b = (t) => Object.assign(p(t), { between: (f, e) => b(o(t, ((n, d) => u((i) => y(i) && n <= i && d >= i))(f, e))), lt: (f) => b(o(t, ((e) => u((n) => y(n) && n < e))(f))), gt: (f) => b(o(t, ((e) => u((n) => y(n) && n > e))(f))), lte: (f) => b(o(t, ((e) => u((n) => y(n) && n <= e))(f))), gte: (f) => b(o(t, ((e) => u((n) => y(n) && n >= e))(f))), int: () => b(o(t, u((f) => y(f) && Number.isInteger(f)))), finite: () => b(o(t, u((f) => y(f) && Number.isFinite(f)))), positive: () => b(o(t, u((f) => y(f) && f > 0))), negative: () => b(o(t, u((f) => y(f) && f < 0))) });
|
|
1485
1485
|
b(u(y));
|
|
1486
|
-
const w = (
|
|
1486
|
+
const w = (t) => Object.assign(p(t), { between: (f, e) => w(o(t, ((n, d) => u((i) => x(i) && n <= i && d >= i))(f, e))), lt: (f) => w(o(t, ((e) => u((n) => x(n) && n < e))(f))), gt: (f) => w(o(t, ((e) => u((n) => x(n) && n > e))(f))), lte: (f) => w(o(t, ((e) => u((n) => x(n) && n <= e))(f))), gte: (f) => w(o(t, ((e) => u((n) => x(n) && n >= e))(f))), positive: () => w(o(t, u((f) => x(f) && f > 0))), negative: () => w(o(t, u((f) => x(f) && f < 0))) });
|
|
1487
1487
|
w(u(x));
|
|
1488
|
-
|
|
1489
|
-
return typeof
|
|
1488
|
+
p(u(function(t) {
|
|
1489
|
+
return typeof t == "boolean";
|
|
1490
1490
|
}));
|
|
1491
|
-
|
|
1492
|
-
return typeof
|
|
1491
|
+
p(u(function(t) {
|
|
1492
|
+
return typeof t == "symbol";
|
|
1493
1493
|
}));
|
|
1494
|
-
|
|
1495
|
-
return
|
|
1494
|
+
p(u(function(t) {
|
|
1495
|
+
return t == null;
|
|
1496
1496
|
}));
|
|
1497
|
-
|
|
1498
|
-
return
|
|
1497
|
+
p(u(function(t) {
|
|
1498
|
+
return t != null;
|
|
1499
1499
|
}));
|
|
1500
1500
|
class C0 extends Error {
|
|
1501
1501
|
constructor(f) {
|
|
1502
|
-
let
|
|
1502
|
+
let e;
|
|
1503
1503
|
try {
|
|
1504
|
-
|
|
1504
|
+
e = JSON.stringify(f);
|
|
1505
1505
|
} catch {
|
|
1506
|
-
|
|
1506
|
+
e = f;
|
|
1507
1507
|
}
|
|
1508
|
-
super(`Pattern matching error: no pattern matches value ${
|
|
1508
|
+
super(`Pattern matching error: no pattern matches value ${e}`), this.input = void 0, this.input = f;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
const
|
|
1512
|
-
function
|
|
1513
|
-
return new
|
|
1511
|
+
const j = { matched: !1, value: void 0 };
|
|
1512
|
+
function t0(t) {
|
|
1513
|
+
return new M(t, j);
|
|
1514
1514
|
}
|
|
1515
|
-
class
|
|
1516
|
-
constructor(f,
|
|
1517
|
-
this.input = void 0, this.state = void 0, this.input = f, this.state =
|
|
1515
|
+
class M {
|
|
1516
|
+
constructor(f, e) {
|
|
1517
|
+
this.input = void 0, this.state = void 0, this.input = f, this.state = e;
|
|
1518
1518
|
}
|
|
1519
1519
|
with(...f) {
|
|
1520
1520
|
if (this.state.matched) return this;
|
|
1521
|
-
const
|
|
1521
|
+
const e = f[f.length - 1], n = [f[0]];
|
|
1522
1522
|
let d;
|
|
1523
1523
|
f.length === 3 && typeof f[1] == "function" ? d = f[1] : f.length > 2 && n.push(...f.slice(1, f.length - 1));
|
|
1524
|
-
let i = !1,
|
|
1525
|
-
const
|
|
1526
|
-
i = !0,
|
|
1527
|
-
}, s = !n.some((
|
|
1528
|
-
return new
|
|
1524
|
+
let i = !1, r = {};
|
|
1525
|
+
const a = (c, I) => {
|
|
1526
|
+
i = !0, r[c] = I;
|
|
1527
|
+
}, s = !n.some((c) => l(c, this.input, a)) || d && !d(this.input) ? j : { matched: !0, value: e(i ? $ in r ? r[$] : r : this.input, this.input) };
|
|
1528
|
+
return new M(this.input, s);
|
|
1529
1529
|
}
|
|
1530
|
-
when(f,
|
|
1530
|
+
when(f, e) {
|
|
1531
1531
|
if (this.state.matched) return this;
|
|
1532
1532
|
const n = !!f(this.input);
|
|
1533
|
-
return new
|
|
1533
|
+
return new M(this.input, n ? { matched: !0, value: e(this.input, this.input) } : j);
|
|
1534
1534
|
}
|
|
1535
1535
|
otherwise(f) {
|
|
1536
1536
|
return this.state.matched ? this.state.value : f(this.input);
|
|
@@ -1546,13 +1546,13 @@ class $ {
|
|
|
1546
1546
|
return this;
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
var B0 = /* @__PURE__ */ ((
|
|
1550
|
-
function
|
|
1551
|
-
return Array.isArray(
|
|
1549
|
+
var B0 = /* @__PURE__ */ ((t) => (t[t.EQUAL = 0] = "EQUAL", t[t.NOT_EQUAL = 1] = "NOT_EQUAL", t[t.GREATER_THAN = 2] = "GREATER_THAN", t[t.LESS_THAN = 3] = "LESS_THAN", t[t.CONTAINS = 4] = "CONTAINS", t[t.REGEX = 5] = "REGEX", t[t.GREATER_THAN_OR_EQUAL = 6] = "GREATER_THAN_OR_EQUAL", t[t.LESS_THAN_OR_EQUAL = 7] = "LESS_THAN_OR_EQUAL", t))(B0 || {}), k0 = /* @__PURE__ */ ((t) => (t[t.UINT = 0] = "UINT", t[t.ADDRESS = 1] = "ADDRESS", t[t.BYTES = 2] = "BYTES", t[t.STRING = 3] = "STRING", t[t.TUPLE = 4] = "TUPLE", t[t.INT = 5] = "INT", t))(k0 || {}), L0 = /* @__PURE__ */ ((t) => (t[t.EVENT = 0] = "EVENT", t[t.FUNC = 1] = "FUNC", t))(L0 || {}), R0 = /* @__PURE__ */ ((t) => (t[t.RAW = 0] = "RAW", t[t.WAD = 1] = "WAD", t))(R0 || {});
|
|
1550
|
+
function _0(t) {
|
|
1551
|
+
return Array.isArray(t.actionSteps);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const H = class H extends h0 {
|
|
1554
1554
|
constructor() {
|
|
1555
|
-
super(...arguments), this.abi =
|
|
1555
|
+
super(...arguments), this.abi = K;
|
|
1556
1556
|
}
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Gets a specific action event by index
|
|
@@ -1563,8 +1563,8 @@ const F = class F extends g0 {
|
|
|
1563
1563
|
* @param {?ReadEventActionParams<'getActionStep'>} [params]
|
|
1564
1564
|
* @returns {Promise<ActionStep>}
|
|
1565
1565
|
*/
|
|
1566
|
-
async getActionStep(f,
|
|
1567
|
-
return (await this.getActionSteps(
|
|
1566
|
+
async getActionStep(f, e) {
|
|
1567
|
+
return (await this.getActionSteps(e)).at(f);
|
|
1568
1568
|
}
|
|
1569
1569
|
/**
|
|
1570
1570
|
* Gets all action events
|
|
@@ -1575,13 +1575,13 @@ const F = class F extends g0 {
|
|
|
1575
1575
|
* @returns {Promise<ActionStep[]>}
|
|
1576
1576
|
*/
|
|
1577
1577
|
async getActionSteps(f) {
|
|
1578
|
-
const
|
|
1578
|
+
const e = await u0(this._config, {
|
|
1579
1579
|
address: this.assertValidAddress(),
|
|
1580
1580
|
...this.optionallyAttachAccount(),
|
|
1581
1581
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
1582
1582
|
...f
|
|
1583
1583
|
});
|
|
1584
|
-
return
|
|
1584
|
+
return D0(e.map(d0));
|
|
1585
1585
|
}
|
|
1586
1586
|
/**
|
|
1587
1587
|
* Gets the count of action events
|
|
@@ -1603,12 +1603,12 @@ const F = class F extends g0 {
|
|
|
1603
1603
|
* @returns {Promise<ActionClaimant>}
|
|
1604
1604
|
*/
|
|
1605
1605
|
async getActionClaimant(f) {
|
|
1606
|
-
const
|
|
1606
|
+
const e = await o0(this._config, {
|
|
1607
1607
|
address: this.assertValidAddress(),
|
|
1608
1608
|
...this.optionallyAttachAccount(),
|
|
1609
1609
|
...f
|
|
1610
1610
|
});
|
|
1611
|
-
return
|
|
1611
|
+
return d0(e);
|
|
1612
1612
|
}
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Executes a prepared event action
|
|
@@ -1619,8 +1619,8 @@ const F = class F extends g0 {
|
|
|
1619
1619
|
* @param {?WriteParams} [params]
|
|
1620
1620
|
* @returns {Promise<readonly [boolean, `0x${string}`]>}
|
|
1621
1621
|
*/
|
|
1622
|
-
async execute(f,
|
|
1623
|
-
return await this.awaitResult(this.executeRaw(f,
|
|
1622
|
+
async execute(f, e) {
|
|
1623
|
+
return await this.awaitResult(this.executeRaw(f, e));
|
|
1624
1624
|
}
|
|
1625
1625
|
/**
|
|
1626
1626
|
* Executes a prepared event action
|
|
@@ -1631,15 +1631,15 @@ const F = class F extends g0 {
|
|
|
1631
1631
|
* @param {?WriteParams} [params]
|
|
1632
1632
|
* @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}
|
|
1633
1633
|
*/
|
|
1634
|
-
async executeRaw(f,
|
|
1635
|
-
const { request: n, result: d } = await
|
|
1634
|
+
async executeRaw(f, e) {
|
|
1635
|
+
const { request: n, result: d } = await c0(this._config, {
|
|
1636
1636
|
address: this.assertValidAddress(),
|
|
1637
1637
|
...this.optionallyAttachAccount(),
|
|
1638
1638
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
1639
|
-
...
|
|
1639
|
+
...e,
|
|
1640
1640
|
args: [f]
|
|
1641
1641
|
});
|
|
1642
|
-
return { hash: await
|
|
1642
|
+
return { hash: await p0(this._config, n), result: d };
|
|
1643
1643
|
}
|
|
1644
1644
|
/**
|
|
1645
1645
|
* Derives the action claimant address from a transaction based on the provided ActionClaimant configuration.
|
|
@@ -1675,24 +1675,24 @@ const F = class F extends g0 {
|
|
|
1675
1675
|
* @throws {ValidationAbiMissingError} If the ABI for the specified signature is not found.
|
|
1676
1676
|
* @throws {FunctionDataDecodeError} If there's an error decoding function data (for function-based derivation).
|
|
1677
1677
|
*/
|
|
1678
|
-
async deriveActionClaimantFromTransaction(f,
|
|
1679
|
-
if (f.fieldIndex ===
|
|
1680
|
-
if ("hash" in
|
|
1681
|
-
const d = await
|
|
1682
|
-
...
|
|
1678
|
+
async deriveActionClaimantFromTransaction(f, e) {
|
|
1679
|
+
if (f.fieldIndex === B.TX_SENDER_CLAIMANT) {
|
|
1680
|
+
if ("hash" in e) {
|
|
1681
|
+
const d = await L(this._config, {
|
|
1682
|
+
...e,
|
|
1683
1683
|
chainId: f.chainid
|
|
1684
1684
|
});
|
|
1685
|
-
return
|
|
1685
|
+
return e.notBeforeBlockNumber && d.blockNumber < e.notBeforeBlockNumber ? void 0 : d.from;
|
|
1686
1686
|
}
|
|
1687
|
-
if ("logs" in
|
|
1688
|
-
for (let d of
|
|
1687
|
+
if ("logs" in e) {
|
|
1688
|
+
for (let d of e.logs)
|
|
1689
1689
|
if (d.transactionHash) {
|
|
1690
|
-
const i = await
|
|
1691
|
-
...
|
|
1690
|
+
const i = await L(this._config, {
|
|
1691
|
+
...e,
|
|
1692
1692
|
hash: d.transactionHash,
|
|
1693
1693
|
chainId: f.chainid
|
|
1694
1694
|
});
|
|
1695
|
-
return
|
|
1695
|
+
return e.notBeforeBlockNumber && i.blockNumber < e.notBeforeBlockNumber ? void 0 : i.from;
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
return;
|
|
@@ -1700,54 +1700,54 @@ const F = class F extends g0 {
|
|
|
1700
1700
|
const n = f.signature;
|
|
1701
1701
|
if (f.signatureType === 0) {
|
|
1702
1702
|
let d;
|
|
1703
|
-
if (
|
|
1704
|
-
throw new
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
for (
|
|
1708
|
-
if (!
|
|
1709
|
-
|
|
1703
|
+
if (e.abiItem ? d = e.abiItem : d = e.knownSignatures[n], !d)
|
|
1704
|
+
throw new N(n);
|
|
1705
|
+
if ("logs" in e) {
|
|
1706
|
+
const a = e.logs.filter((s) => s.topics[0] === n).map((s) => W(d, s));
|
|
1707
|
+
for (const s of a) {
|
|
1708
|
+
if (!T(s.address, f.targetContract)) continue;
|
|
1709
|
+
const c = this.validateClaimantAgainstArgs(
|
|
1710
1710
|
f,
|
|
1711
1711
|
s
|
|
1712
1712
|
);
|
|
1713
|
-
if (
|
|
1713
|
+
if (c) return c;
|
|
1714
1714
|
}
|
|
1715
|
-
return i;
|
|
1716
1715
|
}
|
|
1717
|
-
|
|
1718
|
-
|
|
1716
|
+
if (!("hash" in e))
|
|
1717
|
+
return;
|
|
1718
|
+
const i = await O(this._config, {
|
|
1719
|
+
...e,
|
|
1719
1720
|
chainId: f.chainid
|
|
1720
1721
|
});
|
|
1721
|
-
if (
|
|
1722
|
+
if (e.notBeforeBlockNumber && i.blockNumber < e.notBeforeBlockNumber)
|
|
1722
1723
|
return;
|
|
1723
1724
|
let r;
|
|
1724
|
-
n ===
|
|
1725
|
-
for (let
|
|
1726
|
-
if (!
|
|
1727
|
-
let
|
|
1728
|
-
if (
|
|
1725
|
+
n === P ? { decodedLogs: r } = await this.decodeTransferLogs(i) : r = i.logs.filter((a) => a.topics[0] === G(d)).map((a) => W(d, a));
|
|
1726
|
+
for (let a of r) {
|
|
1727
|
+
if (!T(a.address, f.targetContract)) continue;
|
|
1728
|
+
let s = this.validateClaimantAgainstArgs(f, a);
|
|
1729
|
+
if (s) return s;
|
|
1729
1730
|
}
|
|
1730
|
-
return i;
|
|
1731
1731
|
}
|
|
1732
|
-
if (f.signatureType === 1 && "hash" in
|
|
1733
|
-
const d = await
|
|
1734
|
-
...
|
|
1732
|
+
if (f.signatureType === 1 && "hash" in e) {
|
|
1733
|
+
const d = await L(this._config, {
|
|
1734
|
+
...e,
|
|
1735
1735
|
chainId: f.chainid
|
|
1736
1736
|
});
|
|
1737
|
-
if (
|
|
1737
|
+
if (e.notBeforeBlockNumber && d.blockNumber < e.notBeforeBlockNumber || !T(d.to, f.targetContract)) return;
|
|
1738
1738
|
let i;
|
|
1739
|
-
if (
|
|
1740
|
-
throw new
|
|
1741
|
-
let
|
|
1739
|
+
if (e.abiItem ? i = e.abiItem : i = e.knownSignatures[n], !i)
|
|
1740
|
+
throw new N(f.signature);
|
|
1741
|
+
let r;
|
|
1742
1742
|
try {
|
|
1743
|
-
|
|
1743
|
+
r = X({
|
|
1744
1744
|
abi: [i],
|
|
1745
1745
|
data: d.input
|
|
1746
1746
|
});
|
|
1747
|
-
} catch (
|
|
1748
|
-
throw new
|
|
1747
|
+
} catch (a) {
|
|
1748
|
+
throw new q([i], a);
|
|
1749
1749
|
}
|
|
1750
|
-
return this.validateClaimantAgainstArgs(f,
|
|
1750
|
+
return this.validateClaimantAgainstArgs(f, r);
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
1753
|
/**
|
|
@@ -1758,11 +1758,11 @@ const F = class F extends g0 {
|
|
|
1758
1758
|
* @param {Array<any> | readonly unknown[] | Record<string, unknown>} [logOrFnData.args] - The arguments from the log or function data.
|
|
1759
1759
|
* @returns {Address | undefined} The validated address if found and valid, otherwise undefined.
|
|
1760
1760
|
*/
|
|
1761
|
-
validateClaimantAgainstArgs(f,
|
|
1762
|
-
if (!
|
|
1761
|
+
validateClaimantAgainstArgs(f, e) {
|
|
1762
|
+
if (!e || !Array.isArray(e == null ? void 0 : e.args) || (e == null ? void 0 : e.args.length) <= f.fieldIndex)
|
|
1763
1763
|
return;
|
|
1764
|
-
const n =
|
|
1765
|
-
if (
|
|
1764
|
+
const n = e.args.at(f.fieldIndex);
|
|
1765
|
+
if (Y(n)) return n;
|
|
1766
1766
|
}
|
|
1767
1767
|
/**
|
|
1768
1768
|
* Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
|
|
@@ -1774,8 +1774,8 @@ const F = class F extends g0 {
|
|
|
1774
1774
|
* @returns {Promise<boolean>}
|
|
1775
1775
|
*/
|
|
1776
1776
|
async validateActionSteps(f) {
|
|
1777
|
-
const
|
|
1778
|
-
for (const n of
|
|
1777
|
+
const e = await this.getActionSteps();
|
|
1778
|
+
for (const n of e)
|
|
1779
1779
|
if (!await this.isActionStepValid(n, f))
|
|
1780
1780
|
return !1;
|
|
1781
1781
|
return !0;
|
|
@@ -1791,38 +1791,38 @@ const F = class F extends g0 {
|
|
|
1791
1791
|
* @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.
|
|
1792
1792
|
* @returns {Promise<boolean>}
|
|
1793
1793
|
*/
|
|
1794
|
-
async isActionStepValid(f,
|
|
1794
|
+
async isActionStepValid(f, e) {
|
|
1795
1795
|
if (f.signatureType === 0) {
|
|
1796
1796
|
const n = f.signature;
|
|
1797
1797
|
let d;
|
|
1798
|
-
if (
|
|
1799
|
-
throw new
|
|
1798
|
+
if (e.abiItem ? d = e.abiItem : d = e.knownSignatures[n], !d)
|
|
1799
|
+
throw new N(n);
|
|
1800
1800
|
if (this.isArraylikeIndexed(f, d))
|
|
1801
|
-
throw new
|
|
1801
|
+
throw new Z(
|
|
1802
1802
|
f.actionParameter.fieldIndex,
|
|
1803
1803
|
d
|
|
1804
1804
|
);
|
|
1805
|
-
if ("logs" in
|
|
1806
|
-
return this.isActionEventValid(f,
|
|
1807
|
-
const i = await
|
|
1808
|
-
...
|
|
1805
|
+
if ("logs" in e)
|
|
1806
|
+
return this.isActionEventValid(f, e.logs, d);
|
|
1807
|
+
const i = await O(this._config, {
|
|
1808
|
+
...e,
|
|
1809
1809
|
chainId: f.chainid
|
|
1810
1810
|
});
|
|
1811
|
-
if (
|
|
1811
|
+
if (e.notBeforeBlockNumber && i.blockNumber < e.notBeforeBlockNumber)
|
|
1812
1812
|
return !1;
|
|
1813
|
-
if (f.signature ===
|
|
1814
|
-
const { decodedLogs:
|
|
1815
|
-
return this.isActionEventValid(f,
|
|
1813
|
+
if (f.signature === P) {
|
|
1814
|
+
const { decodedLogs: a, event: s } = await this.decodeTransferLogs(i);
|
|
1815
|
+
return this.isActionEventValid(f, a, s);
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1818
|
-
return this.isActionEventValid(f,
|
|
1817
|
+
const r = i.logs.filter((a) => a.topics[0] === G(d)).map((a) => W(d, a));
|
|
1818
|
+
return this.isActionEventValid(f, r, d);
|
|
1819
1819
|
}
|
|
1820
|
-
if (f.signatureType === 1 && "hash" in
|
|
1821
|
-
const n = await
|
|
1822
|
-
...
|
|
1820
|
+
if (f.signatureType === 1 && "hash" in e) {
|
|
1821
|
+
const n = await L(this._config, {
|
|
1822
|
+
...e,
|
|
1823
1823
|
chainId: f.chainid
|
|
1824
1824
|
});
|
|
1825
|
-
return
|
|
1825
|
+
return e.notBeforeBlockNumber && n.blockNumber < e.notBeforeBlockNumber ? !1 : this.isActionFunctionValid(f, n, e);
|
|
1826
1826
|
}
|
|
1827
1827
|
return !1;
|
|
1828
1828
|
}
|
|
@@ -1835,10 +1835,10 @@ const F = class F extends g0 {
|
|
|
1835
1835
|
* @param {AbiEvent} eventAbi - The ABI definition of the event
|
|
1836
1836
|
* @returns {boolean} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.
|
|
1837
1837
|
*/
|
|
1838
|
-
isActionEventValid(f,
|
|
1838
|
+
isActionEventValid(f, e, n) {
|
|
1839
1839
|
const d = f.actionParameter;
|
|
1840
|
-
if (!
|
|
1841
|
-
for (let i of
|
|
1840
|
+
if (!e.length) return !1;
|
|
1841
|
+
for (let i of e)
|
|
1842
1842
|
try {
|
|
1843
1843
|
if (!Array.isArray(i.args))
|
|
1844
1844
|
throw new x0({
|
|
@@ -1846,13 +1846,13 @@ const F = class F extends g0 {
|
|
|
1846
1846
|
criteria: d,
|
|
1847
1847
|
fieldValue: void 0
|
|
1848
1848
|
});
|
|
1849
|
-
const { value:
|
|
1849
|
+
const { value: r, type: a } = this.parseFieldFromAbi(
|
|
1850
1850
|
i.args,
|
|
1851
1851
|
d.fieldIndex,
|
|
1852
1852
|
n.inputs || [],
|
|
1853
1853
|
d.fieldType
|
|
1854
1854
|
);
|
|
1855
|
-
if (d.fieldType =
|
|
1855
|
+
if (d.fieldType = a, this.validateFieldAgainstCriteria(d, r, { log: i }))
|
|
1856
1856
|
return !0;
|
|
1857
1857
|
} catch {
|
|
1858
1858
|
}
|
|
@@ -1875,33 +1875,33 @@ const F = class F extends g0 {
|
|
|
1875
1875
|
* @throws {DecodedArgsError} - Throws if neither ERC20 nor ERC721 decoding succeeds
|
|
1876
1876
|
*/
|
|
1877
1877
|
async decodeTransferLogs(f) {
|
|
1878
|
-
const
|
|
1879
|
-
(d) => d.topics[0] ===
|
|
1878
|
+
const e = f.logs.filter(
|
|
1879
|
+
(d) => d.topics[0] === P
|
|
1880
1880
|
), n = structuredClone(
|
|
1881
|
-
|
|
1881
|
+
S0["Transfer(address indexed,address indexed,uint256 indexed)"]
|
|
1882
1882
|
);
|
|
1883
1883
|
try {
|
|
1884
1884
|
return {
|
|
1885
|
-
decodedLogs:
|
|
1886
|
-
const { eventName:
|
|
1885
|
+
decodedLogs: e.map((i) => {
|
|
1886
|
+
const { eventName: r, args: a } = V({
|
|
1887
1887
|
abi: [n],
|
|
1888
1888
|
data: i.data,
|
|
1889
1889
|
topics: i.topics
|
|
1890
1890
|
});
|
|
1891
|
-
return { ...i, eventName:
|
|
1891
|
+
return { ...i, eventName: r, args: a };
|
|
1892
1892
|
}),
|
|
1893
1893
|
event: n
|
|
1894
1894
|
};
|
|
1895
1895
|
} catch {
|
|
1896
1896
|
try {
|
|
1897
1897
|
return n.inputs[2].indexed = !1, {
|
|
1898
|
-
decodedLogs:
|
|
1899
|
-
const { eventName:
|
|
1898
|
+
decodedLogs: e.map((i) => {
|
|
1899
|
+
const { eventName: r, args: a } = V({
|
|
1900
1900
|
abi: [n],
|
|
1901
1901
|
data: i.data,
|
|
1902
1902
|
topics: i.topics
|
|
1903
1903
|
});
|
|
1904
|
-
return { ...i, eventName:
|
|
1904
|
+
return { ...i, eventName: r, args: a };
|
|
1905
1905
|
}),
|
|
1906
1906
|
event: n
|
|
1907
1907
|
};
|
|
@@ -1922,41 +1922,41 @@ const F = class F extends g0 {
|
|
|
1922
1922
|
* @param {PrimitiveType} declaredType - Either TUPLE or a standard scalar type
|
|
1923
1923
|
* @returns {{ value: string | bigint | Hex; type: Exclude<PrimitiveType, PrimitiveType.TUPLE> }}
|
|
1924
1924
|
*/
|
|
1925
|
-
parseFieldFromAbi(f,
|
|
1926
|
-
if (
|
|
1925
|
+
parseFieldFromAbi(f, e, n, d) {
|
|
1926
|
+
if (e === B.ANY_ACTION_PARAM)
|
|
1927
1927
|
return {
|
|
1928
|
-
value:
|
|
1928
|
+
value: C,
|
|
1929
1929
|
type: 2
|
|
1930
1930
|
/* BYTES */
|
|
1931
1931
|
};
|
|
1932
1932
|
if (d !== 4) {
|
|
1933
|
-
if (!Array.isArray(f) ||
|
|
1934
|
-
throw new
|
|
1933
|
+
if (!Array.isArray(f) || e >= f.length)
|
|
1934
|
+
throw new J({
|
|
1935
1935
|
fieldValue: f,
|
|
1936
1936
|
criteria: {
|
|
1937
1937
|
filterType: 0,
|
|
1938
1938
|
fieldType: d,
|
|
1939
|
-
fieldIndex:
|
|
1940
|
-
filterData:
|
|
1939
|
+
fieldIndex: e,
|
|
1940
|
+
filterData: C
|
|
1941
1941
|
}
|
|
1942
1942
|
});
|
|
1943
|
-
const
|
|
1944
|
-
if (!
|
|
1945
|
-
throw new
|
|
1946
|
-
const
|
|
1947
|
-
if (s === 1 && (typeof
|
|
1948
|
-
throw new
|
|
1949
|
-
fieldValue:
|
|
1943
|
+
const r = n[e];
|
|
1944
|
+
if (!r || !r.type)
|
|
1945
|
+
throw new Z(e, r);
|
|
1946
|
+
const a = f[e], s = a0(r.type);
|
|
1947
|
+
if (s === 1 && (typeof a != "string" || !Y(a)))
|
|
1948
|
+
throw new J({
|
|
1949
|
+
fieldValue: a,
|
|
1950
1950
|
criteria: {
|
|
1951
|
-
fieldIndex:
|
|
1951
|
+
fieldIndex: e,
|
|
1952
1952
|
filterType: 0,
|
|
1953
1953
|
fieldType: s,
|
|
1954
|
-
filterData:
|
|
1954
|
+
filterData: C
|
|
1955
1955
|
}
|
|
1956
1956
|
});
|
|
1957
|
-
return { value:
|
|
1957
|
+
return { value: a, type: s };
|
|
1958
1958
|
}
|
|
1959
|
-
const i =
|
|
1959
|
+
const i = U0(e);
|
|
1960
1960
|
return i0(f, i, n);
|
|
1961
1961
|
}
|
|
1962
1962
|
/**
|
|
@@ -1972,31 +1972,31 @@ const F = class F extends g0 {
|
|
|
1972
1972
|
* @throws {ValidationAbiMissingError} Throws if the ABI for the function signature is not found.
|
|
1973
1973
|
* @throws {FunctionDataDecodeError} Throws if there's an error decoding the function data.
|
|
1974
1974
|
*/
|
|
1975
|
-
isActionFunctionValid(f,
|
|
1975
|
+
isActionFunctionValid(f, e, n) {
|
|
1976
1976
|
const d = f.actionParameter, i = f.signature;
|
|
1977
|
-
let a;
|
|
1978
|
-
if (n.abiItem ? a = n.abiItem : a = n.knownSignatures[i], !a)
|
|
1979
|
-
throw new _(i);
|
|
1980
1977
|
let r;
|
|
1978
|
+
if (n.abiItem ? r = n.abiItem : r = n.knownSignatures[i], !r)
|
|
1979
|
+
throw new N(i);
|
|
1980
|
+
let a;
|
|
1981
1981
|
try {
|
|
1982
|
-
|
|
1983
|
-
abi: [
|
|
1984
|
-
data:
|
|
1982
|
+
a = X({
|
|
1983
|
+
abi: [r],
|
|
1984
|
+
data: e.input
|
|
1985
1985
|
});
|
|
1986
1986
|
} catch (s) {
|
|
1987
|
-
throw new
|
|
1987
|
+
throw new q([r], s);
|
|
1988
1988
|
}
|
|
1989
|
-
if (!(
|
|
1989
|
+
if (!(a != null && a.args))
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
try {
|
|
1992
|
-
const { value: s, type:
|
|
1993
|
-
|
|
1992
|
+
const { value: s, type: c } = this.parseFieldFromAbi(
|
|
1993
|
+
a.args,
|
|
1994
1994
|
d.fieldIndex,
|
|
1995
|
-
|
|
1995
|
+
r.inputs || [],
|
|
1996
1996
|
d.fieldType
|
|
1997
1997
|
);
|
|
1998
|
-
return d.fieldType =
|
|
1999
|
-
decodedArgs:
|
|
1998
|
+
return d.fieldType = c, this.validateFieldAgainstCriteria(d, s, {
|
|
1999
|
+
decodedArgs: a.args
|
|
2000
2000
|
});
|
|
2001
2001
|
} catch {
|
|
2002
2002
|
return !1;
|
|
@@ -2014,98 +2014,98 @@ const F = class F extends g0 {
|
|
|
2014
2014
|
* @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.
|
|
2015
2015
|
* @returns {boolean} - Returns true if the field passes the criteria, false otherwise.
|
|
2016
2016
|
*/
|
|
2017
|
-
validateFieldAgainstCriteria(f,
|
|
2018
|
-
if (f.filterType === 0 && f.fieldType === 2 && f.fieldIndex ===
|
|
2017
|
+
validateFieldAgainstCriteria(f, e, n) {
|
|
2018
|
+
if (f.filterType === 0 && f.fieldType === 2 && f.fieldIndex === B.ANY_ACTION_PARAM)
|
|
2019
2019
|
return !0;
|
|
2020
2020
|
if (f.fieldType === 4)
|
|
2021
|
-
throw new
|
|
2021
|
+
throw new S(
|
|
2022
2022
|
"Tuples should not be passed into validateFieldAgainstCriteria"
|
|
2023
2023
|
);
|
|
2024
2024
|
const d = f.fieldType;
|
|
2025
2025
|
switch (f.filterType) {
|
|
2026
2026
|
case 0:
|
|
2027
|
-
return
|
|
2027
|
+
return t0(d).with(
|
|
2028
2028
|
1,
|
|
2029
|
-
() =>
|
|
2029
|
+
() => T(f.filterData, e)
|
|
2030
2030
|
).with(
|
|
2031
2031
|
0,
|
|
2032
|
-
() => BigInt(
|
|
2032
|
+
() => BigInt(e) === BigInt(f.filterData)
|
|
2033
2033
|
).with(
|
|
2034
2034
|
3,
|
|
2035
|
-
() =>
|
|
2036
|
-
).otherwise(() =>
|
|
2035
|
+
() => e === R(f.filterData, "string")
|
|
2036
|
+
).otherwise(() => e === f.filterData);
|
|
2037
2037
|
case 1:
|
|
2038
|
-
return
|
|
2038
|
+
return t0(d).with(
|
|
2039
2039
|
1,
|
|
2040
|
-
() => !
|
|
2040
|
+
() => !T(f.filterData, e)
|
|
2041
2041
|
).with(
|
|
2042
2042
|
0,
|
|
2043
|
-
() => BigInt(
|
|
2043
|
+
() => BigInt(e) !== BigInt(f.filterData)
|
|
2044
2044
|
).with(
|
|
2045
2045
|
5,
|
|
2046
|
-
() => BigInt(
|
|
2046
|
+
() => BigInt(e) !== BigInt(f.filterData)
|
|
2047
2047
|
).with(
|
|
2048
2048
|
3,
|
|
2049
|
-
() =>
|
|
2050
|
-
).otherwise(() =>
|
|
2049
|
+
() => e !== R(f.filterData, "string")
|
|
2050
|
+
).otherwise(() => e !== f.filterData);
|
|
2051
2051
|
case 2:
|
|
2052
2052
|
if (d === 0 || d === 5)
|
|
2053
|
-
return BigInt(
|
|
2054
|
-
throw new
|
|
2053
|
+
return BigInt(e) > BigInt(f.filterData);
|
|
2054
|
+
throw new _({
|
|
2055
2055
|
...n,
|
|
2056
2056
|
criteria: f,
|
|
2057
|
-
fieldValue:
|
|
2057
|
+
fieldValue: e
|
|
2058
2058
|
});
|
|
2059
2059
|
case 6:
|
|
2060
2060
|
if (d === 0 || d === 5)
|
|
2061
|
-
return BigInt(
|
|
2062
|
-
throw new
|
|
2061
|
+
return BigInt(e) >= BigInt(f.filterData);
|
|
2062
|
+
throw new _({
|
|
2063
2063
|
...n,
|
|
2064
2064
|
criteria: f,
|
|
2065
|
-
fieldValue:
|
|
2065
|
+
fieldValue: e
|
|
2066
2066
|
});
|
|
2067
2067
|
case 3:
|
|
2068
2068
|
if (d === 0 || d === 5)
|
|
2069
|
-
return BigInt(
|
|
2070
|
-
throw new
|
|
2069
|
+
return BigInt(e) < BigInt(f.filterData);
|
|
2070
|
+
throw new _({
|
|
2071
2071
|
...n,
|
|
2072
2072
|
criteria: f,
|
|
2073
|
-
fieldValue:
|
|
2073
|
+
fieldValue: e
|
|
2074
2074
|
});
|
|
2075
2075
|
case 7:
|
|
2076
2076
|
if (d === 0 || d === 5)
|
|
2077
|
-
return BigInt(
|
|
2078
|
-
throw new
|
|
2077
|
+
return BigInt(e) <= BigInt(f.filterData);
|
|
2078
|
+
throw new _({
|
|
2079
2079
|
...n,
|
|
2080
2080
|
criteria: f,
|
|
2081
|
-
fieldValue:
|
|
2081
|
+
fieldValue: e
|
|
2082
2082
|
});
|
|
2083
2083
|
case 4:
|
|
2084
2084
|
if (d === 2 || d === 3) {
|
|
2085
2085
|
let i;
|
|
2086
|
-
return d === 3 ? i = R(f.filterData, "string") : i = f.filterData.slice(2),
|
|
2086
|
+
return d === 3 ? i = R(f.filterData, "string") : i = f.filterData.slice(2), e.includes(i);
|
|
2087
2087
|
}
|
|
2088
|
-
throw new
|
|
2088
|
+
throw new f0({
|
|
2089
2089
|
...n,
|
|
2090
2090
|
criteria: f,
|
|
2091
|
-
fieldValue:
|
|
2091
|
+
fieldValue: e
|
|
2092
2092
|
});
|
|
2093
2093
|
case 5:
|
|
2094
|
-
if (typeof
|
|
2095
|
-
throw new
|
|
2094
|
+
if (typeof e != "string")
|
|
2095
|
+
throw new f0({
|
|
2096
2096
|
...n,
|
|
2097
2097
|
criteria: f,
|
|
2098
|
-
fieldValue:
|
|
2098
|
+
fieldValue: e
|
|
2099
2099
|
});
|
|
2100
2100
|
if (d === 3) {
|
|
2101
2101
|
const i = R(f.filterData, "string");
|
|
2102
|
-
return new RegExp(i).test(
|
|
2102
|
+
return new RegExp(i).test(e);
|
|
2103
2103
|
}
|
|
2104
2104
|
default:
|
|
2105
2105
|
throw new m0({
|
|
2106
2106
|
...n,
|
|
2107
2107
|
criteria: f,
|
|
2108
|
-
fieldValue:
|
|
2108
|
+
fieldValue: e
|
|
2109
2109
|
});
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
@@ -2117,32 +2117,32 @@ const F = class F extends g0 {
|
|
|
2117
2117
|
* @param {?DeployableOptions} [_options]
|
|
2118
2118
|
* @returns {GenericDeployableParams}
|
|
2119
2119
|
*/
|
|
2120
|
-
buildParameters(f,
|
|
2120
|
+
buildParameters(f, e) {
|
|
2121
2121
|
const [n, d] = this.validateDeploymentConfig(
|
|
2122
2122
|
f,
|
|
2123
|
-
|
|
2123
|
+
e
|
|
2124
2124
|
);
|
|
2125
2125
|
let i;
|
|
2126
|
-
if (
|
|
2127
|
-
let
|
|
2128
|
-
if (
|
|
2126
|
+
if (_0(n)) {
|
|
2127
|
+
let r = n.actionSteps.filter((s) => !!s);
|
|
2128
|
+
if (r.length === 0)
|
|
2129
2129
|
throw new w0();
|
|
2130
|
-
if (
|
|
2130
|
+
if (r.length > 4)
|
|
2131
2131
|
throw new A0();
|
|
2132
|
-
let
|
|
2132
|
+
let a = Array.from({ length: 4 }, (s, c) => r.at(c) || r.at(-1));
|
|
2133
2133
|
i = {
|
|
2134
2134
|
actionClaimant: n.actionClaimant,
|
|
2135
|
-
actionStepOne:
|
|
2136
|
-
actionStepTwo:
|
|
2137
|
-
actionStepThree:
|
|
2138
|
-
actionStepFour:
|
|
2135
|
+
actionStepOne: a[0],
|
|
2136
|
+
actionStepTwo: a[1],
|
|
2137
|
+
actionStepThree: a[2],
|
|
2138
|
+
actionStepFour: a[3]
|
|
2139
2139
|
};
|
|
2140
2140
|
} else
|
|
2141
2141
|
i = n;
|
|
2142
2142
|
return {
|
|
2143
|
-
abi:
|
|
2143
|
+
abi: K,
|
|
2144
2144
|
bytecode: T0,
|
|
2145
|
-
args: [
|
|
2145
|
+
args: [F0(i)],
|
|
2146
2146
|
...this.optionallyAttachAccount(d.account)
|
|
2147
2147
|
};
|
|
2148
2148
|
}
|
|
@@ -2155,46 +2155,130 @@ const F = class F extends g0 {
|
|
|
2155
2155
|
* @param {AbiEvent} event
|
|
2156
2156
|
* @returns {boolean}
|
|
2157
2157
|
*/
|
|
2158
|
-
isArraylikeIndexed(f,
|
|
2158
|
+
isArraylikeIndexed(f, e) {
|
|
2159
2159
|
var n;
|
|
2160
|
-
return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((n =
|
|
2160
|
+
return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((n = e.inputs[f.actionParameter.fieldIndex]) != null && n.indexed));
|
|
2161
|
+
}
|
|
2162
|
+
/**
|
|
2163
|
+
* Retrieves logs that match the criteria for event-based action steps.
|
|
2164
|
+
*
|
|
2165
|
+
* @public
|
|
2166
|
+
* @async
|
|
2167
|
+
* @param {ValidateActionStepParams} params - Parameters for fetching and filtering logs.
|
|
2168
|
+
* @returns {Promise<EventLog[]>} - A promise that resolves to an array of matching event logs.
|
|
2169
|
+
*/
|
|
2170
|
+
async getLogsForActionSteps(f) {
|
|
2171
|
+
const e = await this.getActionSteps(), n = [];
|
|
2172
|
+
for (const d of e)
|
|
2173
|
+
if (d.signatureType === 0) {
|
|
2174
|
+
const i = await this.getLogsForActionStep(d, f);
|
|
2175
|
+
n.push(...i);
|
|
2176
|
+
}
|
|
2177
|
+
return n;
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* Finds logs that match the criteria for a specific action step.
|
|
2181
|
+
*
|
|
2182
|
+
* @public
|
|
2183
|
+
* @async
|
|
2184
|
+
* @param {ActionStep} actionStep - The action step to find logs for
|
|
2185
|
+
* @param {ValidateActionStepParams} params - Parameters for validation
|
|
2186
|
+
* @returns {Promise<EventLog[]>}
|
|
2187
|
+
*/
|
|
2188
|
+
async getLogsForActionStep(f, e) {
|
|
2189
|
+
if (f.signatureType !== 0)
|
|
2190
|
+
return [];
|
|
2191
|
+
const n = f.signature;
|
|
2192
|
+
let d;
|
|
2193
|
+
if (e.abiItem ? d = e.abiItem : d = e.knownSignatures[n], !d)
|
|
2194
|
+
throw new N(n);
|
|
2195
|
+
if ("logs" in e)
|
|
2196
|
+
return this.filterLogsByActionStepCriteria(
|
|
2197
|
+
f,
|
|
2198
|
+
e.logs,
|
|
2199
|
+
d
|
|
2200
|
+
);
|
|
2201
|
+
const i = await O(this._config, {
|
|
2202
|
+
...e,
|
|
2203
|
+
chainId: f.chainid
|
|
2204
|
+
});
|
|
2205
|
+
if (e.notBeforeBlockNumber && i.blockNumber < e.notBeforeBlockNumber)
|
|
2206
|
+
return [];
|
|
2207
|
+
if (f.signature === P) {
|
|
2208
|
+
const { decodedLogs: a, event: s } = await this.decodeTransferLogs(i);
|
|
2209
|
+
return this.filterLogsByActionStepCriteria(
|
|
2210
|
+
f,
|
|
2211
|
+
a,
|
|
2212
|
+
s
|
|
2213
|
+
);
|
|
2214
|
+
}
|
|
2215
|
+
const r = i.logs.filter((a) => a.topics[0] === G(d)).map((a) => W(d, a));
|
|
2216
|
+
return this.filterLogsByActionStepCriteria(f, r, d);
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Filters logs that meet the given action step criteria
|
|
2220
|
+
*
|
|
2221
|
+
* @private
|
|
2222
|
+
* @param {ActionStep} actionStep
|
|
2223
|
+
* @param {EventLogs} logs
|
|
2224
|
+
* @param {AbiEvent} eventAbi
|
|
2225
|
+
* @returns {EventLog[]}
|
|
2226
|
+
*/
|
|
2227
|
+
filterLogsByActionStepCriteria(f, e, n) {
|
|
2228
|
+
const d = f.actionParameter, i = [];
|
|
2229
|
+
if (!e.length) return i;
|
|
2230
|
+
for (let r of e)
|
|
2231
|
+
if (T(r.address, f.targetContract))
|
|
2232
|
+
try {
|
|
2233
|
+
if (!Array.isArray(r.args))
|
|
2234
|
+
continue;
|
|
2235
|
+
const { value: a, type: s } = this.parseFieldFromAbi(
|
|
2236
|
+
r.args,
|
|
2237
|
+
d.fieldIndex,
|
|
2238
|
+
n.inputs || [],
|
|
2239
|
+
d.fieldType
|
|
2240
|
+
);
|
|
2241
|
+
d.fieldType = s, this.validateFieldAgainstCriteria(d, a, { log: r }) && i.push(r);
|
|
2242
|
+
} catch {
|
|
2243
|
+
}
|
|
2244
|
+
return i;
|
|
2161
2245
|
}
|
|
2162
2246
|
};
|
|
2163
|
-
|
|
2247
|
+
H.bases = {
|
|
2164
2248
|
31337: void 0,
|
|
2165
|
-
...
|
|
2166
|
-
},
|
|
2167
|
-
let
|
|
2168
|
-
function
|
|
2169
|
-
return
|
|
2249
|
+
...g0
|
|
2250
|
+
}, H.registryType = v0.ACTION;
|
|
2251
|
+
let n0 = H;
|
|
2252
|
+
function P0(t) {
|
|
2253
|
+
return t.type === "tuple" || t.type.startsWith("tuple[");
|
|
2170
2254
|
}
|
|
2171
|
-
function i0(
|
|
2255
|
+
function i0(t, f, e) {
|
|
2172
2256
|
if (!f.length)
|
|
2173
|
-
throw new
|
|
2257
|
+
throw new S(
|
|
2174
2258
|
"No indexes found; cannot parse TUPLE field"
|
|
2175
2259
|
);
|
|
2176
|
-
const n = f[0] ??
|
|
2177
|
-
if (n >=
|
|
2178
|
-
throw new
|
|
2179
|
-
const d =
|
|
2180
|
-
if (!
|
|
2260
|
+
const n = f[0] ?? e.length + 1;
|
|
2261
|
+
if (n >= e.length)
|
|
2262
|
+
throw new S(void 0, n);
|
|
2263
|
+
const d = e[n], i = t[n];
|
|
2264
|
+
if (!P0(d)) {
|
|
2181
2265
|
const s = a0(d.type);
|
|
2182
2266
|
return { value: i, type: s };
|
|
2183
2267
|
}
|
|
2184
2268
|
if (!Array.isArray(i))
|
|
2185
|
-
throw new
|
|
2269
|
+
throw new S(
|
|
2186
2270
|
"rawValue is not an array, but param.type is tuple"
|
|
2187
2271
|
);
|
|
2188
|
-
const
|
|
2189
|
-
if (!
|
|
2190
|
-
throw new
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2193
|
-
throw new
|
|
2194
|
-
return i0(i,
|
|
2272
|
+
const r = f.slice(1);
|
|
2273
|
+
if (!r.length)
|
|
2274
|
+
throw new S(void 0, -1);
|
|
2275
|
+
const a = r[0] ?? d.components.length + 1;
|
|
2276
|
+
if (a >= d.components.length)
|
|
2277
|
+
throw new S(void 0, a);
|
|
2278
|
+
return i0(i, r, d.components);
|
|
2195
2279
|
}
|
|
2196
|
-
function a0(
|
|
2197
|
-
const f =
|
|
2280
|
+
function a0(t) {
|
|
2281
|
+
const f = t.toLowerCase();
|
|
2198
2282
|
if (f.startsWith("uint"))
|
|
2199
2283
|
return 0;
|
|
2200
2284
|
if (f.startsWith("int"))
|
|
@@ -2205,57 +2289,57 @@ function a0(e) {
|
|
|
2205
2289
|
return 2;
|
|
2206
2290
|
if (f === "string")
|
|
2207
2291
|
return 3;
|
|
2208
|
-
throw new A(`Unrecognized ABI type: ${
|
|
2292
|
+
throw new A(`Unrecognized ABI type: ${t}`);
|
|
2209
2293
|
}
|
|
2210
|
-
function
|
|
2211
|
-
const f = [],
|
|
2212
|
-
for (let n of
|
|
2294
|
+
function D0(t) {
|
|
2295
|
+
const f = [], e = {};
|
|
2296
|
+
for (let n of t) {
|
|
2213
2297
|
const d = JSON.stringify(n);
|
|
2214
|
-
|
|
2298
|
+
e[d] || (f.push(n), e[d] = !0);
|
|
2215
2299
|
}
|
|
2216
2300
|
return f;
|
|
2217
2301
|
}
|
|
2218
|
-
function r0(
|
|
2302
|
+
function r0(t) {
|
|
2219
2303
|
return {
|
|
2220
|
-
...
|
|
2221
|
-
chainid: BigInt(
|
|
2304
|
+
...t,
|
|
2305
|
+
chainid: BigInt(t.chainid)
|
|
2222
2306
|
};
|
|
2223
2307
|
}
|
|
2224
|
-
function
|
|
2225
|
-
if (
|
|
2308
|
+
function d0(t) {
|
|
2309
|
+
if (t.chainid > BigInt(Number.MAX_SAFE_INTEGER))
|
|
2226
2310
|
throw new Error("Chain ID exceeds max safe integer");
|
|
2227
2311
|
return {
|
|
2228
|
-
...
|
|
2229
|
-
chainid: Number(
|
|
2312
|
+
...t,
|
|
2313
|
+
chainid: Number(t.chainid)
|
|
2230
2314
|
};
|
|
2231
2315
|
}
|
|
2232
|
-
function s0(
|
|
2233
|
-
const f =
|
|
2316
|
+
function s0(t) {
|
|
2317
|
+
const f = t.slice(2);
|
|
2234
2318
|
if (f.length === 8)
|
|
2235
2319
|
return 1;
|
|
2236
2320
|
if (f.length === 64)
|
|
2237
2321
|
return f.slice(0, 56) === "0".repeat(56) ? 1 : 0;
|
|
2238
2322
|
throw new Error("Invalid signature format");
|
|
2239
2323
|
}
|
|
2240
|
-
function W0(
|
|
2241
|
-
return l0(
|
|
2324
|
+
function W0(t) {
|
|
2325
|
+
return l0(z(t));
|
|
2242
2326
|
}
|
|
2243
|
-
function D(
|
|
2327
|
+
function D(t) {
|
|
2244
2328
|
return {
|
|
2245
|
-
...r0(
|
|
2246
|
-
signatureType:
|
|
2247
|
-
signature:
|
|
2248
|
-
actionType:
|
|
2249
|
-
actionParameter:
|
|
2250
|
-
...
|
|
2251
|
-
filterData: W0(
|
|
2252
|
-
} :
|
|
2329
|
+
...r0(t),
|
|
2330
|
+
signatureType: t.signatureType ?? s0(t.signature),
|
|
2331
|
+
signature: z(t.signature),
|
|
2332
|
+
actionType: t.actionType || 0,
|
|
2333
|
+
actionParameter: t.actionParameter.fieldType === 0 ? {
|
|
2334
|
+
...t.actionParameter,
|
|
2335
|
+
filterData: W0(t.actionParameter.filterData)
|
|
2336
|
+
} : t.actionParameter
|
|
2253
2337
|
};
|
|
2254
2338
|
}
|
|
2255
|
-
function
|
|
2256
|
-
actionClaimant:
|
|
2339
|
+
function F0({
|
|
2340
|
+
actionClaimant: t,
|
|
2257
2341
|
actionStepOne: f,
|
|
2258
|
-
actionStepTwo:
|
|
2342
|
+
actionStepTwo: e,
|
|
2259
2343
|
actionStepThree: n,
|
|
2260
2344
|
actionStepFour: d
|
|
2261
2345
|
}) {
|
|
@@ -2366,12 +2450,12 @@ function U0({
|
|
|
2366
2450
|
[
|
|
2367
2451
|
{
|
|
2368
2452
|
actionClaimant: {
|
|
2369
|
-
...r0(
|
|
2370
|
-
signatureType:
|
|
2371
|
-
signature:
|
|
2453
|
+
...r0(t),
|
|
2454
|
+
signatureType: t.signatureType ?? s0(t.signature),
|
|
2455
|
+
signature: z(t.signature)
|
|
2372
2456
|
},
|
|
2373
2457
|
actionStepOne: D(f),
|
|
2374
|
-
actionStepTwo: D(
|
|
2458
|
+
actionStepTwo: D(e),
|
|
2375
2459
|
actionStepThree: D(n),
|
|
2376
2460
|
actionStepFour: D(d)
|
|
2377
2461
|
}
|
|
@@ -2382,101 +2466,101 @@ function K0() {
|
|
|
2382
2466
|
return {
|
|
2383
2467
|
filterType: 0,
|
|
2384
2468
|
fieldType: 2,
|
|
2385
|
-
fieldIndex:
|
|
2386
|
-
filterData:
|
|
2469
|
+
fieldIndex: B.ANY_ACTION_PARAM,
|
|
2470
|
+
filterData: C
|
|
2387
2471
|
};
|
|
2388
2472
|
}
|
|
2389
|
-
function X0(
|
|
2473
|
+
function X0(t) {
|
|
2390
2474
|
return {
|
|
2391
2475
|
signatureType: 0,
|
|
2392
|
-
signature:
|
|
2393
|
-
fieldIndex:
|
|
2476
|
+
signature: C,
|
|
2477
|
+
fieldIndex: B.TX_SENDER_CLAIMANT,
|
|
2394
2478
|
targetContract: b0,
|
|
2395
|
-
chainid:
|
|
2479
|
+
chainid: t
|
|
2396
2480
|
};
|
|
2397
2481
|
}
|
|
2398
2482
|
const E = 63;
|
|
2399
|
-
function Y0(
|
|
2400
|
-
if (
|
|
2401
|
-
throw new
|
|
2483
|
+
function Y0(t) {
|
|
2484
|
+
if (t.length > 5)
|
|
2485
|
+
throw new U("Can only pack up to 5 indexes.");
|
|
2402
2486
|
let f = 0;
|
|
2403
|
-
return
|
|
2404
|
-
if (
|
|
2405
|
-
throw new
|
|
2406
|
-
`Index ${
|
|
2487
|
+
return t.forEach((e, n) => {
|
|
2488
|
+
if (e > E)
|
|
2489
|
+
throw new U(
|
|
2490
|
+
`Index ${e} exceeds the maximum allowed value (${E}).`
|
|
2407
2491
|
);
|
|
2408
|
-
f |= (
|
|
2409
|
-
}),
|
|
2492
|
+
f |= (e & E) << n * 6;
|
|
2493
|
+
}), t.length < 5 && (f |= E << t.length * 6), f;
|
|
2410
2494
|
}
|
|
2411
|
-
function
|
|
2495
|
+
function U0(t) {
|
|
2412
2496
|
const f = [];
|
|
2413
|
-
for (let
|
|
2414
|
-
const n =
|
|
2497
|
+
for (let e = 0; e < 5; e++) {
|
|
2498
|
+
const n = t >> e * 6 & E;
|
|
2415
2499
|
if (n === E) break;
|
|
2416
2500
|
f.push(n);
|
|
2417
2501
|
}
|
|
2418
2502
|
return f;
|
|
2419
2503
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const
|
|
2422
|
-
abi: [
|
|
2504
|
+
function W(t, f) {
|
|
2505
|
+
const e = V({
|
|
2506
|
+
abi: [t],
|
|
2423
2507
|
data: f.data,
|
|
2424
2508
|
topics: f.topics
|
|
2425
|
-
}), n = Array.isArray(
|
|
2426
|
-
if (!
|
|
2509
|
+
}), n = Array.isArray(e.args) ? e.args : Object.values(e.args);
|
|
2510
|
+
if (!t.inputs.some((s) => s.indexed))
|
|
2427
2511
|
return {
|
|
2428
2512
|
...f,
|
|
2429
|
-
...
|
|
2513
|
+
...e
|
|
2430
2514
|
};
|
|
2431
2515
|
const d = [], i = [];
|
|
2432
|
-
for (let s = 0; s <
|
|
2433
|
-
|
|
2434
|
-
const
|
|
2435
|
-
let
|
|
2516
|
+
for (let s = 0; s < t.inputs.length; s++)
|
|
2517
|
+
t.inputs[s].indexed ? d.push(s) : i.push(s);
|
|
2518
|
+
const r = Array.from({ length: t.inputs.length });
|
|
2519
|
+
let a = 0;
|
|
2436
2520
|
for (let s = 0; s < d.length; s++)
|
|
2437
|
-
|
|
2521
|
+
r[d[s]] = n[a++];
|
|
2438
2522
|
for (let s = 0; s < i.length; s++)
|
|
2439
|
-
|
|
2523
|
+
r[i[s]] = n[a++];
|
|
2440
2524
|
return {
|
|
2441
2525
|
...f,
|
|
2442
|
-
eventName:
|
|
2443
|
-
args:
|
|
2526
|
+
eventName: e.eventName,
|
|
2527
|
+
args: r
|
|
2444
2528
|
};
|
|
2445
2529
|
}
|
|
2446
|
-
function q0([
|
|
2447
|
-
if (
|
|
2448
|
-
throw new
|
|
2449
|
-
`Tuple indices must be between 0-13, got: [${
|
|
2530
|
+
function q0([t, f]) {
|
|
2531
|
+
if (t < 0 || t > 13 || f < 0 || f > 13)
|
|
2532
|
+
throw new U(
|
|
2533
|
+
`Tuple indices must be between 0-13, got: [${t}, ${f}]`
|
|
2450
2534
|
);
|
|
2451
|
-
return 32 + (
|
|
2535
|
+
return 32 + (t << 4) + f;
|
|
2452
2536
|
}
|
|
2453
|
-
function
|
|
2454
|
-
if (
|
|
2455
|
-
throw new
|
|
2456
|
-
`Field index must be between 32-253, got: ${
|
|
2537
|
+
function $0(t) {
|
|
2538
|
+
if (t < 32 || t > 253)
|
|
2539
|
+
throw new U(
|
|
2540
|
+
`Field index must be between 32-253, got: ${t}`
|
|
2457
2541
|
);
|
|
2458
|
-
const f =
|
|
2459
|
-
return [
|
|
2542
|
+
const f = t - 32, e = f >> 4 & 15, n = f & 15;
|
|
2543
|
+
return [e, n];
|
|
2460
2544
|
}
|
|
2461
|
-
function
|
|
2462
|
-
return
|
|
2545
|
+
function M0(t) {
|
|
2546
|
+
return t >= 32;
|
|
2463
2547
|
}
|
|
2464
|
-
function Z0(
|
|
2465
|
-
if (!
|
|
2548
|
+
function Z0(t, f) {
|
|
2549
|
+
if (!M0(f))
|
|
2466
2550
|
throw new A(
|
|
2467
2551
|
`Field index ${f} is invalid. Expected index >= 32`
|
|
2468
2552
|
);
|
|
2469
|
-
const [
|
|
2470
|
-
if (
|
|
2553
|
+
const [e, n] = $0(f);
|
|
2554
|
+
if (e === void 0 || n === void 0)
|
|
2471
2555
|
throw new A(
|
|
2472
2556
|
`Failed to unpack field indexes from ${f}`
|
|
2473
2557
|
);
|
|
2474
|
-
if (!
|
|
2475
|
-
throw new A(`Decoded args missing item at index ${
|
|
2476
|
-
const d = e
|
|
2558
|
+
if (!t || t.length <= e)
|
|
2559
|
+
throw new A(`Decoded args missing item at index ${e}`);
|
|
2560
|
+
const d = t[e];
|
|
2477
2561
|
if (!d || !Array.isArray(d))
|
|
2478
2562
|
throw new A(
|
|
2479
|
-
`Expected array at index ${
|
|
2563
|
+
`Expected array at index ${e}, but got ${typeof d}`
|
|
2480
2564
|
);
|
|
2481
2565
|
if (d.length <= n)
|
|
2482
2566
|
throw new A(
|
|
@@ -2490,22 +2574,22 @@ function Z0(e, f) {
|
|
|
2490
2574
|
return i;
|
|
2491
2575
|
}
|
|
2492
2576
|
export {
|
|
2493
|
-
|
|
2577
|
+
n0 as EventAction,
|
|
2494
2578
|
B0 as FilterType,
|
|
2495
2579
|
k0 as PrimitiveType,
|
|
2496
|
-
|
|
2497
|
-
|
|
2580
|
+
L0 as SignatureType,
|
|
2581
|
+
R0 as ValueType,
|
|
2498
2582
|
K0 as anyActionParameter,
|
|
2499
|
-
|
|
2583
|
+
W as decodeAndReorderLogArgs,
|
|
2500
2584
|
s0 as detectSignatureType,
|
|
2501
2585
|
Z0 as getScalarValueFromTuple,
|
|
2502
|
-
|
|
2503
|
-
|
|
2586
|
+
M0 as isCriteriaFieldIndexTuple,
|
|
2587
|
+
_0 as isEventActionPayloadSimple,
|
|
2504
2588
|
q0 as packCriteriaFieldIndexes,
|
|
2505
2589
|
Y0 as packFieldIndexes,
|
|
2506
|
-
|
|
2590
|
+
F0 as prepareEventActionPayload,
|
|
2507
2591
|
X0 as transactionSenderClaimant,
|
|
2508
|
-
|
|
2509
|
-
|
|
2592
|
+
$0 as unpackCriteriaFieldIndexes,
|
|
2593
|
+
U0 as unpackFieldIndexes
|
|
2510
2594
|
};
|
|
2511
2595
|
//# sourceMappingURL=EventAction.js.map
|