@boostxyz/sdk 7.0.0 → 7.2.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 +46 -0
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +395 -345
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +2 -2
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +79 -68
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +84 -73
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +179 -175
- package/package.json +1 -1
- package/src/Actions/EventAction.test.ts +90 -0
- package/src/Actions/EventAction.ts +119 -2
- package/src/BoostCore.ts +1 -1
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +24 -5
- package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +25 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cx as Q, cy as u0, cz as o0, cA as p0, cB as c0 } from "../generated-CINzoGbl.js";
|
|
2
|
-
import { getTransaction as
|
|
3
|
-
import { isAddressEqual as
|
|
2
|
+
import { getTransaction as k, getTransactionReceipt as j } from "@wagmi/core";
|
|
3
|
+
import { isAddressEqual as I, toEventSelector as z, decodeFunctionData as K, isAddress as X, decodeEventLog as M, zeroHash as S, fromHex as R, encodeAbiParameters as y0, pad as V, zeroAddress as b0, trim as l0 } from "viem";
|
|
4
4
|
import { i as h0 } from "../deployments-DKtAq6BT.js";
|
|
5
5
|
import { DeployableTarget as g0 } from "../Deployable/DeployableTarget.js";
|
|
6
|
-
import { ValidationAbiMissingError as
|
|
7
|
-
import { RegistryType as v0, CheatCodes as
|
|
8
|
-
const T0 = "0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033", I0 = {
|
|
6
|
+
import { ValidationAbiMissingError as _, FunctionDataDecodeError as Y, UnparseableAbiParamError as q, DecodedArgsMalformedError as x0, DecodedArgsError as A, FieldValueUndefinedError as Z, InvalidTupleDecodingError as T, UnrecognizedFilterTypeError as m0, FieldValueNotComparableError as J, InvalidNumericalCriteriaError as P, NoEventActionStepsProvidedError as w0, TooManyEventActionStepsProvidedError as A0, InvalidTupleEncodingError as W } from "../errors.js";
|
|
7
|
+
import { RegistryType as v0, CheatCodes as C, TRANSFER_SIGNATURE as H } from "../utils.js";
|
|
8
|
+
const T0 = "0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033", E0 = {
|
|
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
|
-
}, h = Symbol.for("@ts-pattern/matcher"),
|
|
1384
|
-
if (L(
|
|
1385
|
-
const n =
|
|
1386
|
-
return d && i && Object.keys(i).forEach((a) =>
|
|
1383
|
+
}, h = Symbol.for("@ts-pattern/matcher"), N0 = Symbol.for("@ts-pattern/isVariadic"), U = "@ts-pattern/anonymous-select-key", O = (e) => !!(e && typeof e == "object"), L = (e) => e && !!e[h], l = (e, f, t) => {
|
|
1384
|
+
if (L(e)) {
|
|
1385
|
+
const n = e[h](), { matched: d, selections: i } = n.match(f);
|
|
1386
|
+
return d && i && Object.keys(i).forEach((a) => t(a, i[a])), d;
|
|
1387
1387
|
}
|
|
1388
|
-
if (O(
|
|
1388
|
+
if (O(e)) {
|
|
1389
1389
|
if (!O(f)) return !1;
|
|
1390
|
-
if (Array.isArray(
|
|
1390
|
+
if (Array.isArray(e)) {
|
|
1391
1391
|
if (!Array.isArray(f)) return !1;
|
|
1392
1392
|
let n = [], d = [], i = [];
|
|
1393
|
-
for (const a of
|
|
1394
|
-
const
|
|
1395
|
-
L(
|
|
1393
|
+
for (const a of e.keys()) {
|
|
1394
|
+
const r = e[a];
|
|
1395
|
+
L(r) && r[N0] ? i.push(r) : i.length ? d.push(r) : n.push(r);
|
|
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 a = f.slice(0, n.length),
|
|
1401
|
-
return n.every((p,
|
|
1400
|
+
const a = f.slice(0, n.length), r = d.length === 0 ? [] : f.slice(-d.length), s = f.slice(n.length, d.length === 0 ? 1 / 0 : -d.length);
|
|
1401
|
+
return n.every((p, N) => l(p, a[N], t)) && d.every((p, N) => l(p, r[N], t)) && (i.length === 0 || l(i[0], s, t));
|
|
1402
1402
|
}
|
|
1403
|
-
return
|
|
1403
|
+
return e.length === f.length && e.every((a, r) => l(a, f[r], t));
|
|
1404
1404
|
}
|
|
1405
|
-
return Reflect.ownKeys(
|
|
1406
|
-
const d =
|
|
1407
|
-
return (n in f || L(i = d) && i[h]().matcherType === "optional") && l(d, f[n],
|
|
1405
|
+
return Reflect.ownKeys(e).every((n) => {
|
|
1406
|
+
const d = e[n];
|
|
1407
|
+
return (n in f || L(i = d) && i[h]().matcherType === "optional") && l(d, f[n], t);
|
|
1408
1408
|
var i;
|
|
1409
1409
|
});
|
|
1410
1410
|
}
|
|
1411
|
-
return Object.is(f,
|
|
1412
|
-
},
|
|
1413
|
-
var f,
|
|
1414
|
-
return O(
|
|
1415
|
-
},
|
|
1416
|
-
function c(
|
|
1417
|
-
return Object.assign(
|
|
1411
|
+
return Object.is(f, e);
|
|
1412
|
+
}, v = (e) => {
|
|
1413
|
+
var f, t, n;
|
|
1414
|
+
return O(e) ? L(e) ? (f = (t = (n = e[h]()).getSelectionKeys) == null ? void 0 : t.call(n)) != null ? f : [] : Array.isArray(e) ? B(e, v) : B(Object.values(e), v) : [];
|
|
1415
|
+
}, B = (e, f) => e.reduce((t, n) => t.concat(f(n)), []);
|
|
1416
|
+
function c(e) {
|
|
1417
|
+
return Object.assign(e, { optional: () => I0(e), and: (f) => o(e, f), or: (f) => S0(e, f), select: (f) => f === void 0 ? f0(e) : f0(f, e) });
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function I0(e) {
|
|
1420
1420
|
return c({ [h]: () => ({ match: (f) => {
|
|
1421
|
-
let
|
|
1421
|
+
let t = {};
|
|
1422
1422
|
const n = (d, i) => {
|
|
1423
|
-
|
|
1423
|
+
t[d] = i;
|
|
1424
1424
|
};
|
|
1425
|
-
return f === void 0 ? (
|
|
1426
|
-
}, getSelectionKeys: () =>
|
|
1425
|
+
return f === void 0 ? (v(e).forEach((d) => n(d, void 0)), { matched: !0, selections: t }) : { matched: l(e, f, n), selections: t };
|
|
1426
|
+
}, getSelectionKeys: () => v(e), matcherType: "optional" }) });
|
|
1427
1427
|
}
|
|
1428
|
-
function o(...
|
|
1428
|
+
function o(...e) {
|
|
1429
1429
|
return c({ [h]: () => ({ match: (f) => {
|
|
1430
|
-
let
|
|
1430
|
+
let t = {};
|
|
1431
1431
|
const n = (d, i) => {
|
|
1432
|
-
|
|
1432
|
+
t[d] = i;
|
|
1433
1433
|
};
|
|
1434
|
-
return { matched:
|
|
1435
|
-
}, getSelectionKeys: () =>
|
|
1434
|
+
return { matched: e.every((d) => l(d, f, n)), selections: t };
|
|
1435
|
+
}, getSelectionKeys: () => B(e, v), matcherType: "and" }) });
|
|
1436
1436
|
}
|
|
1437
|
-
function S0(...
|
|
1437
|
+
function S0(...e) {
|
|
1438
1438
|
return c({ [h]: () => ({ match: (f) => {
|
|
1439
|
-
let
|
|
1439
|
+
let t = {};
|
|
1440
1440
|
const n = (d, i) => {
|
|
1441
|
-
|
|
1441
|
+
t[d] = i;
|
|
1442
1442
|
};
|
|
1443
|
-
return
|
|
1444
|
-
}, getSelectionKeys: () =>
|
|
1443
|
+
return B(e, v).forEach((d) => n(d, void 0)), { matched: e.some((d) => l(d, f, n)), selections: t };
|
|
1444
|
+
}, getSelectionKeys: () => B(e, v), matcherType: "or" }) });
|
|
1445
1445
|
}
|
|
1446
|
-
function u(
|
|
1447
|
-
return { [h]: () => ({ match: (f) => ({ matched: !!
|
|
1446
|
+
function u(e) {
|
|
1447
|
+
return { [h]: () => ({ match: (f) => ({ matched: !!e(f) }) }) };
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const f = typeof
|
|
1449
|
+
function f0(...e) {
|
|
1450
|
+
const f = typeof e[0] == "string" ? e[0] : void 0, t = e.length === 2 ? e[1] : typeof e[0] == "string" ? void 0 : e[0];
|
|
1451
1451
|
return c({ [h]: () => ({ match: (n) => {
|
|
1452
|
-
let d = { [f ??
|
|
1453
|
-
return { matched:
|
|
1452
|
+
let d = { [f ?? U]: n };
|
|
1453
|
+
return { matched: t === void 0 || l(t, n, (i, a) => {
|
|
1454
1454
|
d[i] = a;
|
|
1455
1455
|
}), selections: d };
|
|
1456
|
-
}, getSelectionKeys: () => [f ??
|
|
1456
|
+
}, getSelectionKeys: () => [f ?? U].concat(t === void 0 ? [] : v(t)) }) });
|
|
1457
1457
|
}
|
|
1458
|
-
function y(
|
|
1459
|
-
return typeof
|
|
1458
|
+
function y(e) {
|
|
1459
|
+
return typeof e == "number";
|
|
1460
1460
|
}
|
|
1461
|
-
function g(
|
|
1462
|
-
return typeof
|
|
1461
|
+
function g(e) {
|
|
1462
|
+
return typeof e == "string";
|
|
1463
1463
|
}
|
|
1464
|
-
function x(
|
|
1465
|
-
return typeof
|
|
1464
|
+
function x(e) {
|
|
1465
|
+
return typeof e == "bigint";
|
|
1466
1466
|
}
|
|
1467
|
-
c(u(function(
|
|
1467
|
+
c(u(function(e) {
|
|
1468
1468
|
return !0;
|
|
1469
1469
|
}));
|
|
1470
|
-
const m = (
|
|
1471
|
-
return m(o(
|
|
1472
|
-
var
|
|
1470
|
+
const m = (e) => Object.assign(c(e), { startsWith: (f) => {
|
|
1471
|
+
return m(o(e, (t = f, u((n) => g(n) && n.startsWith(t)))));
|
|
1472
|
+
var t;
|
|
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(e, (t = f, u((n) => g(n) && n.endsWith(t)))));
|
|
1475
|
+
var t;
|
|
1476
|
+
}, minLength: (f) => m(o(e, ((t) => u((n) => g(n) && n.length >= t))(f))), length: (f) => m(o(e, ((t) => u((n) => g(n) && n.length === t))(f))), maxLength: (f) => m(o(e, ((t) => u((n) => g(n) && n.length <= t))(f))), includes: (f) => {
|
|
1477
|
+
return m(o(e, (t = f, u((n) => g(n) && n.includes(t)))));
|
|
1478
|
+
var t;
|
|
1479
1479
|
}, regex: (f) => {
|
|
1480
|
-
return m(o(
|
|
1481
|
-
var
|
|
1480
|
+
return m(o(e, (t = f, u((n) => g(n) && !!n.match(t)))));
|
|
1481
|
+
var t;
|
|
1482
1482
|
} });
|
|
1483
1483
|
m(u(g));
|
|
1484
|
-
const b = (
|
|
1484
|
+
const b = (e) => Object.assign(c(e), { between: (f, t) => b(o(e, ((n, d) => u((i) => y(i) && n <= i && d >= i))(f, t))), lt: (f) => b(o(e, ((t) => u((n) => y(n) && n < t))(f))), gt: (f) => b(o(e, ((t) => u((n) => y(n) && n > t))(f))), lte: (f) => b(o(e, ((t) => u((n) => y(n) && n <= t))(f))), gte: (f) => b(o(e, ((t) => u((n) => y(n) && n >= t))(f))), int: () => b(o(e, u((f) => y(f) && Number.isInteger(f)))), finite: () => b(o(e, u((f) => y(f) && Number.isFinite(f)))), positive: () => b(o(e, u((f) => y(f) && f > 0))), negative: () => b(o(e, u((f) => y(f) && f < 0))) });
|
|
1485
1485
|
b(u(y));
|
|
1486
|
-
const w = (
|
|
1486
|
+
const w = (e) => Object.assign(c(e), { between: (f, t) => w(o(e, ((n, d) => u((i) => x(i) && n <= i && d >= i))(f, t))), lt: (f) => w(o(e, ((t) => u((n) => x(n) && n < t))(f))), gt: (f) => w(o(e, ((t) => u((n) => x(n) && n > t))(f))), lte: (f) => w(o(e, ((t) => u((n) => x(n) && n <= t))(f))), gte: (f) => w(o(e, ((t) => u((n) => x(n) && n >= t))(f))), positive: () => w(o(e, u((f) => x(f) && f > 0))), negative: () => w(o(e, u((f) => x(f) && f < 0))) });
|
|
1487
1487
|
w(u(x));
|
|
1488
|
-
c(u(function(
|
|
1489
|
-
return typeof
|
|
1488
|
+
c(u(function(e) {
|
|
1489
|
+
return typeof e == "boolean";
|
|
1490
1490
|
}));
|
|
1491
|
-
c(u(function(
|
|
1492
|
-
return typeof
|
|
1491
|
+
c(u(function(e) {
|
|
1492
|
+
return typeof e == "symbol";
|
|
1493
1493
|
}));
|
|
1494
|
-
c(u(function(
|
|
1495
|
-
return
|
|
1494
|
+
c(u(function(e) {
|
|
1495
|
+
return e == null;
|
|
1496
1496
|
}));
|
|
1497
|
-
c(u(function(
|
|
1498
|
-
return
|
|
1497
|
+
c(u(function(e) {
|
|
1498
|
+
return e != null;
|
|
1499
1499
|
}));
|
|
1500
1500
|
class C0 extends Error {
|
|
1501
1501
|
constructor(f) {
|
|
1502
|
-
let
|
|
1502
|
+
let t;
|
|
1503
1503
|
try {
|
|
1504
|
-
|
|
1504
|
+
t = JSON.stringify(f);
|
|
1505
1505
|
} catch {
|
|
1506
|
-
|
|
1506
|
+
t = f;
|
|
1507
1507
|
}
|
|
1508
|
-
super(`Pattern matching error: no pattern matches value ${
|
|
1508
|
+
super(`Pattern matching error: no pattern matches value ${t}`), this.input = void 0, this.input = f;
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
const
|
|
1512
|
-
function
|
|
1513
|
-
return new
|
|
1511
|
+
const G = { matched: !1, value: void 0 };
|
|
1512
|
+
function e0(e) {
|
|
1513
|
+
return new $(e, G);
|
|
1514
1514
|
}
|
|
1515
|
-
class
|
|
1516
|
-
constructor(f,
|
|
1517
|
-
this.input = void 0, this.state = void 0, this.input = f, this.state =
|
|
1515
|
+
class $ {
|
|
1516
|
+
constructor(f, t) {
|
|
1517
|
+
this.input = void 0, this.state = void 0, this.input = f, this.state = t;
|
|
1518
1518
|
}
|
|
1519
1519
|
with(...f) {
|
|
1520
1520
|
if (this.state.matched) return this;
|
|
1521
|
-
const
|
|
1521
|
+
const t = 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
1524
|
let i = !1, a = {};
|
|
1525
|
-
const
|
|
1526
|
-
i = !0, a[p] =
|
|
1527
|
-
},
|
|
1528
|
-
return new
|
|
1525
|
+
const r = (p, N) => {
|
|
1526
|
+
i = !0, a[p] = N;
|
|
1527
|
+
}, s = !n.some((p) => l(p, this.input, r)) || d && !d(this.input) ? G : { matched: !0, value: t(i ? U in a ? a[U] : a : this.input, this.input) };
|
|
1528
|
+
return new $(this.input, s);
|
|
1529
1529
|
}
|
|
1530
|
-
when(f,
|
|
1530
|
+
when(f, t) {
|
|
1531
1531
|
if (this.state.matched) return this;
|
|
1532
1532
|
const n = !!f(this.input);
|
|
1533
|
-
return new
|
|
1533
|
+
return new $(this.input, n ? { matched: !0, value: t(this.input, this.input) } : G);
|
|
1534
1534
|
}
|
|
1535
1535
|
otherwise(f) {
|
|
1536
1536
|
return this.state.matched ? this.state.value : f(this.input);
|
|
@@ -1546,11 +1546,11 @@ class W {
|
|
|
1546
1546
|
return this;
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
var B0 = /* @__PURE__ */ ((
|
|
1550
|
-
function P0(
|
|
1551
|
-
return Array.isArray(
|
|
1549
|
+
var B0 = /* @__PURE__ */ ((e) => (e[e.EQUAL = 0] = "EQUAL", e[e.NOT_EQUAL = 1] = "NOT_EQUAL", e[e.GREATER_THAN = 2] = "GREATER_THAN", e[e.LESS_THAN = 3] = "LESS_THAN", e[e.CONTAINS = 4] = "CONTAINS", e[e.REGEX = 5] = "REGEX", e[e.GREATER_THAN_OR_EQUAL = 6] = "GREATER_THAN_OR_EQUAL", e[e.LESS_THAN_OR_EQUAL = 7] = "LESS_THAN_OR_EQUAL", e))(B0 || {}), k0 = /* @__PURE__ */ ((e) => (e[e.UINT = 0] = "UINT", e[e.ADDRESS = 1] = "ADDRESS", e[e.BYTES = 2] = "BYTES", e[e.STRING = 3] = "STRING", e[e.TUPLE = 4] = "TUPLE", e[e.INT = 5] = "INT", e))(k0 || {}), R0 = /* @__PURE__ */ ((e) => (e[e.EVENT = 0] = "EVENT", e[e.FUNC = 1] = "FUNC", e))(R0 || {}), _0 = /* @__PURE__ */ ((e) => (e[e.RAW = 0] = "RAW", e[e.WAD = 1] = "WAD", e))(_0 || {});
|
|
1550
|
+
function P0(e) {
|
|
1551
|
+
return Array.isArray(e.actionSteps);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const F = class F extends g0 {
|
|
1554
1554
|
constructor() {
|
|
1555
1555
|
super(...arguments), this.abi = Q;
|
|
1556
1556
|
}
|
|
@@ -1563,8 +1563,8 @@ const U = class U 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, t) {
|
|
1567
|
+
return (await this.getActionSteps(t)).at(f);
|
|
1568
1568
|
}
|
|
1569
1569
|
/**
|
|
1570
1570
|
* Gets all action events
|
|
@@ -1575,13 +1575,13 @@ const U = class U extends g0 {
|
|
|
1575
1575
|
* @returns {Promise<ActionStep[]>}
|
|
1576
1576
|
*/
|
|
1577
1577
|
async getActionSteps(f) {
|
|
1578
|
-
const
|
|
1578
|
+
const t = 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 L0(t.map(n0));
|
|
1585
1585
|
}
|
|
1586
1586
|
/**
|
|
1587
1587
|
* Gets the count of action events
|
|
@@ -1603,12 +1603,12 @@ const U = class U extends g0 {
|
|
|
1603
1603
|
* @returns {Promise<ActionClaimant>}
|
|
1604
1604
|
*/
|
|
1605
1605
|
async getActionClaimant(f) {
|
|
1606
|
-
const
|
|
1606
|
+
const t = await o0(this._config, {
|
|
1607
1607
|
address: this.assertValidAddress(),
|
|
1608
1608
|
...this.optionallyAttachAccount(),
|
|
1609
1609
|
...f
|
|
1610
1610
|
});
|
|
1611
|
-
return
|
|
1611
|
+
return n0(t);
|
|
1612
1612
|
}
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Executes a prepared event action
|
|
@@ -1619,8 +1619,8 @@ const U = class U 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, t) {
|
|
1623
|
+
return await this.awaitResult(this.executeRaw(f, t));
|
|
1624
1624
|
}
|
|
1625
1625
|
/**
|
|
1626
1626
|
* Executes a prepared event action
|
|
@@ -1631,12 +1631,12 @@ const U = class U 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,
|
|
1634
|
+
async executeRaw(f, t) {
|
|
1635
1635
|
const { request: n, result: d } = await p0(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
|
+
...t,
|
|
1640
1640
|
args: [f]
|
|
1641
1641
|
});
|
|
1642
1642
|
return { hash: await c0(this._config, n), result: d };
|
|
@@ -1675,24 +1675,24 @@ const U = class U 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, t) {
|
|
1679
|
+
if (f.fieldIndex === C.TX_SENDER_CLAIMANT) {
|
|
1680
|
+
if ("hash" in t) {
|
|
1681
|
+
const d = await k(this._config, {
|
|
1682
|
+
...t,
|
|
1683
1683
|
chainId: f.chainid
|
|
1684
1684
|
});
|
|
1685
|
-
return
|
|
1685
|
+
return t.notBeforeBlockNumber && d.blockNumber < t.notBeforeBlockNumber ? void 0 : d.from;
|
|
1686
1686
|
}
|
|
1687
|
-
if ("logs" in
|
|
1688
|
-
for (let d of
|
|
1687
|
+
if ("logs" in t) {
|
|
1688
|
+
for (let d of t.logs)
|
|
1689
1689
|
if (d.transactionHash) {
|
|
1690
|
-
const i = await
|
|
1691
|
-
...
|
|
1690
|
+
const i = await k(this._config, {
|
|
1691
|
+
...t,
|
|
1692
1692
|
hash: d.transactionHash,
|
|
1693
1693
|
chainId: f.chainid
|
|
1694
1694
|
});
|
|
1695
|
-
return
|
|
1695
|
+
return t.notBeforeBlockNumber && i.blockNumber < t.notBeforeBlockNumber ? void 0 : i.from;
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
1698
|
return;
|
|
@@ -1700,52 +1700,52 @@ const U = class U extends g0 {
|
|
|
1700
1700
|
const n = f.signature;
|
|
1701
1701
|
if (f.signatureType === 0) {
|
|
1702
1702
|
let d;
|
|
1703
|
-
if (
|
|
1704
|
-
throw new
|
|
1703
|
+
if (t.abiItem ? d = t.abiItem : d = t.knownSignatures[n], !d)
|
|
1704
|
+
throw new _(n);
|
|
1705
1705
|
let i;
|
|
1706
|
-
if ("logs" in
|
|
1707
|
-
for (let
|
|
1708
|
-
if (!
|
|
1706
|
+
if ("logs" in t) {
|
|
1707
|
+
for (let s of t.logs) {
|
|
1708
|
+
if (!I(s.address, f.targetContract)) continue;
|
|
1709
1709
|
let p = this.validateClaimantAgainstArgs(
|
|
1710
1710
|
f,
|
|
1711
|
-
|
|
1711
|
+
s
|
|
1712
1712
|
);
|
|
1713
|
-
|
|
1713
|
+
if (p) return p;
|
|
1714
1714
|
}
|
|
1715
1715
|
return i;
|
|
1716
1716
|
}
|
|
1717
1717
|
const a = await j(this._config, {
|
|
1718
|
-
...
|
|
1718
|
+
...t,
|
|
1719
1719
|
chainId: f.chainid
|
|
1720
1720
|
});
|
|
1721
|
-
if (
|
|
1721
|
+
if (t.notBeforeBlockNumber && a.blockNumber < t.notBeforeBlockNumber)
|
|
1722
1722
|
return;
|
|
1723
|
-
let
|
|
1724
|
-
n === H ? { decodedLogs:
|
|
1725
|
-
for (let
|
|
1726
|
-
if (!
|
|
1727
|
-
let p = this.validateClaimantAgainstArgs(f,
|
|
1728
|
-
|
|
1723
|
+
let r;
|
|
1724
|
+
n === H ? { decodedLogs: r } = await this.decodeTransferLogs(a) : r = a.logs.filter((s) => s.topics[0] === z(d)).map((s) => d0(d, s));
|
|
1725
|
+
for (let s of r) {
|
|
1726
|
+
if (!I(s.address, f.targetContract)) continue;
|
|
1727
|
+
let p = this.validateClaimantAgainstArgs(f, s);
|
|
1728
|
+
if (p) return p;
|
|
1729
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 t) {
|
|
1733
|
+
const d = await k(this._config, {
|
|
1734
|
+
...t,
|
|
1735
1735
|
chainId: f.chainid
|
|
1736
1736
|
});
|
|
1737
|
-
if (
|
|
1737
|
+
if (t.notBeforeBlockNumber && d.blockNumber < t.notBeforeBlockNumber || !I(d.to, f.targetContract)) return;
|
|
1738
1738
|
let i;
|
|
1739
|
-
if (
|
|
1740
|
-
throw new
|
|
1739
|
+
if (t.abiItem ? i = t.abiItem : i = t.knownSignatures[n], !i)
|
|
1740
|
+
throw new _(f.signature);
|
|
1741
1741
|
let a;
|
|
1742
1742
|
try {
|
|
1743
1743
|
a = K({
|
|
1744
1744
|
abi: [i],
|
|
1745
1745
|
data: d.input
|
|
1746
1746
|
});
|
|
1747
|
-
} catch (
|
|
1748
|
-
throw new
|
|
1747
|
+
} catch (r) {
|
|
1748
|
+
throw new Y([i], r);
|
|
1749
1749
|
}
|
|
1750
1750
|
return this.validateClaimantAgainstArgs(f, a);
|
|
1751
1751
|
}
|
|
@@ -1758,10 +1758,10 @@ const U = class U 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, t) {
|
|
1762
|
+
if (!t || !Array.isArray(t == null ? void 0 : t.args) || (t == null ? void 0 : t.args.length) <= f.fieldIndex)
|
|
1763
1763
|
return;
|
|
1764
|
-
const n =
|
|
1764
|
+
const n = t.args.at(f.fieldIndex);
|
|
1765
1765
|
if (X(n)) return n;
|
|
1766
1766
|
}
|
|
1767
1767
|
/**
|
|
@@ -1774,8 +1774,8 @@ const U = class U extends g0 {
|
|
|
1774
1774
|
* @returns {Promise<boolean>}
|
|
1775
1775
|
*/
|
|
1776
1776
|
async validateActionSteps(f) {
|
|
1777
|
-
const
|
|
1778
|
-
for (const n of
|
|
1777
|
+
const t = await this.getActionSteps();
|
|
1778
|
+
for (const n of t)
|
|
1779
1779
|
if (!await this.isActionStepValid(n, f))
|
|
1780
1780
|
return !1;
|
|
1781
1781
|
return !0;
|
|
@@ -1791,38 +1791,38 @@ const U = class U 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, t) {
|
|
1795
1795
|
if (f.signatureType === 0) {
|
|
1796
1796
|
const n = f.signature;
|
|
1797
1797
|
let d;
|
|
1798
|
-
if (
|
|
1799
|
-
throw new
|
|
1798
|
+
if (t.abiItem ? d = t.abiItem : d = t.knownSignatures[n], !d)
|
|
1799
|
+
throw new _(n);
|
|
1800
1800
|
if (this.isArraylikeIndexed(f, d))
|
|
1801
|
-
throw new
|
|
1801
|
+
throw new q(
|
|
1802
1802
|
f.actionParameter.fieldIndex,
|
|
1803
1803
|
d
|
|
1804
1804
|
);
|
|
1805
|
-
if ("logs" in
|
|
1806
|
-
return this.isActionEventValid(f,
|
|
1805
|
+
if ("logs" in t)
|
|
1806
|
+
return this.isActionEventValid(f, t.logs, d);
|
|
1807
1807
|
const i = await j(this._config, {
|
|
1808
|
-
...
|
|
1808
|
+
...t,
|
|
1809
1809
|
chainId: f.chainid
|
|
1810
1810
|
});
|
|
1811
|
-
if (
|
|
1811
|
+
if (t.notBeforeBlockNumber && i.blockNumber < t.notBeforeBlockNumber)
|
|
1812
1812
|
return !1;
|
|
1813
1813
|
if (f.signature === H) {
|
|
1814
|
-
const { decodedLogs:
|
|
1815
|
-
return this.isActionEventValid(f,
|
|
1814
|
+
const { decodedLogs: r, event: s } = await this.decodeTransferLogs(i);
|
|
1815
|
+
return this.isActionEventValid(f, r, s);
|
|
1816
1816
|
}
|
|
1817
|
-
const a = i.logs.filter((
|
|
1817
|
+
const a = i.logs.filter((r) => r.topics[0] === z(d)).map((r) => d0(d, r));
|
|
1818
1818
|
return this.isActionEventValid(f, a, d);
|
|
1819
1819
|
}
|
|
1820
|
-
if (f.signatureType === 1 && "hash" in
|
|
1821
|
-
const n = await
|
|
1822
|
-
...
|
|
1820
|
+
if (f.signatureType === 1 && "hash" in t) {
|
|
1821
|
+
const n = await k(this._config, {
|
|
1822
|
+
...t,
|
|
1823
1823
|
chainId: f.chainid
|
|
1824
1824
|
});
|
|
1825
|
-
return
|
|
1825
|
+
return t.notBeforeBlockNumber && n.blockNumber < t.notBeforeBlockNumber ? !1 : this.isActionFunctionValid(f, n, t);
|
|
1826
1826
|
}
|
|
1827
1827
|
return !1;
|
|
1828
1828
|
}
|
|
@@ -1835,10 +1835,10 @@ const U = class U 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, t, n) {
|
|
1839
1839
|
const d = f.actionParameter;
|
|
1840
|
-
if (!
|
|
1841
|
-
for (let i of
|
|
1840
|
+
if (!t.length) return !1;
|
|
1841
|
+
for (let i of t)
|
|
1842
1842
|
try {
|
|
1843
1843
|
if (!Array.isArray(i.args))
|
|
1844
1844
|
throw new x0({
|
|
@@ -1846,13 +1846,13 @@ const U = class U extends g0 {
|
|
|
1846
1846
|
criteria: d,
|
|
1847
1847
|
fieldValue: void 0
|
|
1848
1848
|
});
|
|
1849
|
-
const { value: a, type:
|
|
1849
|
+
const { value: a, type: r } = 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 = r, this.validateFieldAgainstCriteria(d, a, { log: i }))
|
|
1856
1856
|
return !0;
|
|
1857
1857
|
} catch {
|
|
1858
1858
|
}
|
|
@@ -1875,38 +1875,38 @@ const U = class U extends g0 {
|
|
|
1875
1875
|
* @throws {DecodedArgsError} - Throws if neither ERC20 nor ERC721 decoding succeeds
|
|
1876
1876
|
*/
|
|
1877
1877
|
async decodeTransferLogs(f) {
|
|
1878
|
-
const
|
|
1878
|
+
const t = f.logs.filter(
|
|
1879
1879
|
(d) => d.topics[0] === H
|
|
1880
1880
|
), n = structuredClone(
|
|
1881
|
-
|
|
1881
|
+
E0["Transfer(address indexed,address indexed,uint256 indexed)"]
|
|
1882
1882
|
);
|
|
1883
1883
|
try {
|
|
1884
1884
|
return {
|
|
1885
|
-
decodedLogs:
|
|
1886
|
-
const { eventName: a, args:
|
|
1885
|
+
decodedLogs: t.map((i) => {
|
|
1886
|
+
const { eventName: a, args: r } = M({
|
|
1887
1887
|
abi: [n],
|
|
1888
1888
|
data: i.data,
|
|
1889
1889
|
topics: i.topics
|
|
1890
1890
|
});
|
|
1891
|
-
return { ...i, eventName: a, args:
|
|
1891
|
+
return { ...i, eventName: a, args: r };
|
|
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: a, args:
|
|
1898
|
+
decodedLogs: t.map((i) => {
|
|
1899
|
+
const { eventName: a, args: r } = M({
|
|
1900
1900
|
abi: [n],
|
|
1901
1901
|
data: i.data,
|
|
1902
1902
|
topics: i.topics
|
|
1903
1903
|
});
|
|
1904
|
-
return { ...i, eventName: a, args:
|
|
1904
|
+
return { ...i, eventName: a, args: r };
|
|
1905
1905
|
}),
|
|
1906
1906
|
event: n
|
|
1907
1907
|
};
|
|
1908
1908
|
} catch {
|
|
1909
|
-
throw new
|
|
1909
|
+
throw new A("Failed to decode transfer logs");
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
@@ -1922,41 +1922,41 @@ const U = class U 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, t, n, d) {
|
|
1926
|
+
if (t === C.ANY_ACTION_PARAM)
|
|
1927
1927
|
return {
|
|
1928
|
-
value:
|
|
1928
|
+
value: S,
|
|
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) || t >= f.length)
|
|
1934
|
+
throw new Z({
|
|
1935
1935
|
fieldValue: f,
|
|
1936
1936
|
criteria: {
|
|
1937
1937
|
filterType: 0,
|
|
1938
1938
|
fieldType: d,
|
|
1939
|
-
fieldIndex:
|
|
1940
|
-
filterData:
|
|
1939
|
+
fieldIndex: t,
|
|
1940
|
+
filterData: S
|
|
1941
1941
|
}
|
|
1942
1942
|
});
|
|
1943
|
-
const a = n[
|
|
1943
|
+
const a = n[t];
|
|
1944
1944
|
if (!a || !a.type)
|
|
1945
|
-
throw new
|
|
1946
|
-
const
|
|
1947
|
-
if (
|
|
1948
|
-
throw new
|
|
1949
|
-
fieldValue:
|
|
1945
|
+
throw new q(t, a);
|
|
1946
|
+
const r = f[t], s = a0(a.type);
|
|
1947
|
+
if (s === 1 && (typeof r != "string" || !X(r)))
|
|
1948
|
+
throw new Z({
|
|
1949
|
+
fieldValue: r,
|
|
1950
1950
|
criteria: {
|
|
1951
|
-
fieldIndex:
|
|
1951
|
+
fieldIndex: t,
|
|
1952
1952
|
filterType: 0,
|
|
1953
|
-
fieldType:
|
|
1954
|
-
filterData:
|
|
1953
|
+
fieldType: s,
|
|
1954
|
+
filterData: S
|
|
1955
1955
|
}
|
|
1956
1956
|
});
|
|
1957
|
-
return { value:
|
|
1957
|
+
return { value: r, type: s };
|
|
1958
1958
|
}
|
|
1959
|
-
const i =
|
|
1959
|
+
const i = $0(t);
|
|
1960
1960
|
return i0(f, i, n);
|
|
1961
1961
|
}
|
|
1962
1962
|
/**
|
|
@@ -1972,31 +1972,31 @@ const U = class U 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, t, n) {
|
|
1976
1976
|
const d = f.actionParameter, i = f.signature;
|
|
1977
1977
|
let a;
|
|
1978
1978
|
if (n.abiItem ? a = n.abiItem : a = n.knownSignatures[i], !a)
|
|
1979
|
-
throw new
|
|
1980
|
-
let
|
|
1979
|
+
throw new _(i);
|
|
1980
|
+
let r;
|
|
1981
1981
|
try {
|
|
1982
|
-
|
|
1982
|
+
r = K({
|
|
1983
1983
|
abi: [a],
|
|
1984
|
-
data:
|
|
1984
|
+
data: t.input
|
|
1985
1985
|
});
|
|
1986
|
-
} catch (
|
|
1987
|
-
throw new
|
|
1986
|
+
} catch (s) {
|
|
1987
|
+
throw new Y([a], s);
|
|
1988
1988
|
}
|
|
1989
|
-
if (!(
|
|
1989
|
+
if (!(r != null && r.args))
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
try {
|
|
1992
|
-
const { value:
|
|
1993
|
-
|
|
1992
|
+
const { value: s, type: p } = this.parseFieldFromAbi(
|
|
1993
|
+
r.args,
|
|
1994
1994
|
d.fieldIndex,
|
|
1995
1995
|
a.inputs || [],
|
|
1996
1996
|
d.fieldType
|
|
1997
1997
|
);
|
|
1998
|
-
return d.fieldType = p, this.validateFieldAgainstCriteria(d,
|
|
1999
|
-
decodedArgs:
|
|
1998
|
+
return d.fieldType = p, this.validateFieldAgainstCriteria(d, s, {
|
|
1999
|
+
decodedArgs: r.args
|
|
2000
2000
|
});
|
|
2001
2001
|
} catch {
|
|
2002
2002
|
return !1;
|
|
@@ -2014,98 +2014,98 @@ const U = class U 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, t, n) {
|
|
2018
|
+
if (f.filterType === 0 && f.fieldType === 2 && f.fieldIndex === C.ANY_ACTION_PARAM)
|
|
2019
2019
|
return !0;
|
|
2020
2020
|
if (f.fieldType === 4)
|
|
2021
|
-
throw new
|
|
2021
|
+
throw new T(
|
|
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 e0(d).with(
|
|
2028
2028
|
1,
|
|
2029
|
-
() =>
|
|
2029
|
+
() => I(f.filterData, t)
|
|
2030
2030
|
).with(
|
|
2031
2031
|
0,
|
|
2032
|
-
() => BigInt(
|
|
2032
|
+
() => BigInt(t) === BigInt(f.filterData)
|
|
2033
2033
|
).with(
|
|
2034
2034
|
3,
|
|
2035
|
-
() =>
|
|
2036
|
-
).otherwise(() =>
|
|
2035
|
+
() => t === R(f.filterData, "string")
|
|
2036
|
+
).otherwise(() => t === f.filterData);
|
|
2037
2037
|
case 1:
|
|
2038
|
-
return
|
|
2038
|
+
return e0(d).with(
|
|
2039
2039
|
1,
|
|
2040
|
-
() => !
|
|
2040
|
+
() => !I(f.filterData, t)
|
|
2041
2041
|
).with(
|
|
2042
2042
|
0,
|
|
2043
|
-
() => BigInt(
|
|
2043
|
+
() => BigInt(t) !== BigInt(f.filterData)
|
|
2044
2044
|
).with(
|
|
2045
2045
|
5,
|
|
2046
|
-
() => BigInt(
|
|
2046
|
+
() => BigInt(t) !== BigInt(f.filterData)
|
|
2047
2047
|
).with(
|
|
2048
2048
|
3,
|
|
2049
|
-
() =>
|
|
2050
|
-
).otherwise(() =>
|
|
2049
|
+
() => t !== R(f.filterData, "string")
|
|
2050
|
+
).otherwise(() => t !== f.filterData);
|
|
2051
2051
|
case 2:
|
|
2052
2052
|
if (d === 0 || d === 5)
|
|
2053
|
-
return BigInt(
|
|
2054
|
-
throw new
|
|
2053
|
+
return BigInt(t) > BigInt(f.filterData);
|
|
2054
|
+
throw new P({
|
|
2055
2055
|
...n,
|
|
2056
2056
|
criteria: f,
|
|
2057
|
-
fieldValue:
|
|
2057
|
+
fieldValue: t
|
|
2058
2058
|
});
|
|
2059
2059
|
case 6:
|
|
2060
2060
|
if (d === 0 || d === 5)
|
|
2061
|
-
return BigInt(
|
|
2062
|
-
throw new
|
|
2061
|
+
return BigInt(t) >= BigInt(f.filterData);
|
|
2062
|
+
throw new P({
|
|
2063
2063
|
...n,
|
|
2064
2064
|
criteria: f,
|
|
2065
|
-
fieldValue:
|
|
2065
|
+
fieldValue: t
|
|
2066
2066
|
});
|
|
2067
2067
|
case 3:
|
|
2068
2068
|
if (d === 0 || d === 5)
|
|
2069
|
-
return BigInt(
|
|
2070
|
-
throw new
|
|
2069
|
+
return BigInt(t) < BigInt(f.filterData);
|
|
2070
|
+
throw new P({
|
|
2071
2071
|
...n,
|
|
2072
2072
|
criteria: f,
|
|
2073
|
-
fieldValue:
|
|
2073
|
+
fieldValue: t
|
|
2074
2074
|
});
|
|
2075
2075
|
case 7:
|
|
2076
2076
|
if (d === 0 || d === 5)
|
|
2077
|
-
return BigInt(
|
|
2078
|
-
throw new
|
|
2077
|
+
return BigInt(t) <= BigInt(f.filterData);
|
|
2078
|
+
throw new P({
|
|
2079
2079
|
...n,
|
|
2080
2080
|
criteria: f,
|
|
2081
|
-
fieldValue:
|
|
2081
|
+
fieldValue: t
|
|
2082
2082
|
});
|
|
2083
2083
|
case 4:
|
|
2084
2084
|
if (d === 2 || d === 3) {
|
|
2085
2085
|
let i;
|
|
2086
|
-
return d === 3 ? i =
|
|
2086
|
+
return d === 3 ? i = R(f.filterData, "string") : i = f.filterData.slice(2), t.includes(i);
|
|
2087
2087
|
}
|
|
2088
|
-
throw new
|
|
2088
|
+
throw new J({
|
|
2089
2089
|
...n,
|
|
2090
2090
|
criteria: f,
|
|
2091
|
-
fieldValue:
|
|
2091
|
+
fieldValue: t
|
|
2092
2092
|
});
|
|
2093
2093
|
case 5:
|
|
2094
|
-
if (typeof
|
|
2095
|
-
throw new
|
|
2094
|
+
if (typeof t != "string")
|
|
2095
|
+
throw new J({
|
|
2096
2096
|
...n,
|
|
2097
2097
|
criteria: f,
|
|
2098
|
-
fieldValue:
|
|
2098
|
+
fieldValue: t
|
|
2099
2099
|
});
|
|
2100
2100
|
if (d === 3) {
|
|
2101
|
-
const i =
|
|
2102
|
-
return new RegExp(i).test(
|
|
2101
|
+
const i = R(f.filterData, "string");
|
|
2102
|
+
return new RegExp(i).test(t);
|
|
2103
2103
|
}
|
|
2104
2104
|
default:
|
|
2105
2105
|
throw new m0({
|
|
2106
2106
|
...n,
|
|
2107
2107
|
criteria: f,
|
|
2108
|
-
fieldValue:
|
|
2108
|
+
fieldValue: t
|
|
2109
2109
|
});
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
@@ -2117,25 +2117,25 @@ const U = class U extends g0 {
|
|
|
2117
2117
|
* @param {?DeployableOptions} [_options]
|
|
2118
2118
|
* @returns {GenericDeployableParams}
|
|
2119
2119
|
*/
|
|
2120
|
-
buildParameters(f,
|
|
2120
|
+
buildParameters(f, t) {
|
|
2121
2121
|
const [n, d] = this.validateDeploymentConfig(
|
|
2122
2122
|
f,
|
|
2123
|
-
|
|
2123
|
+
t
|
|
2124
2124
|
);
|
|
2125
2125
|
let i;
|
|
2126
2126
|
if (P0(n)) {
|
|
2127
|
-
let a = n.actionSteps.filter((
|
|
2127
|
+
let a = n.actionSteps.filter((s) => !!s);
|
|
2128
2128
|
if (a.length === 0)
|
|
2129
2129
|
throw new w0();
|
|
2130
2130
|
if (a.length > 4)
|
|
2131
2131
|
throw new A0();
|
|
2132
|
-
let
|
|
2132
|
+
let r = Array.from({ length: 4 }, (s, p) => a.at(p) || a.at(-1));
|
|
2133
2133
|
i = {
|
|
2134
2134
|
actionClaimant: n.actionClaimant,
|
|
2135
|
-
actionStepOne:
|
|
2136
|
-
actionStepTwo:
|
|
2137
|
-
actionStepThree:
|
|
2138
|
-
actionStepFour:
|
|
2135
|
+
actionStepOne: r[0],
|
|
2136
|
+
actionStepTwo: r[1],
|
|
2137
|
+
actionStepThree: r[2],
|
|
2138
|
+
actionStepFour: r[3]
|
|
2139
2139
|
};
|
|
2140
2140
|
} else
|
|
2141
2141
|
i = n;
|
|
@@ -2155,46 +2155,46 @@ const U = class U extends g0 {
|
|
|
2155
2155
|
* @param {AbiEvent} event
|
|
2156
2156
|
* @returns {boolean}
|
|
2157
2157
|
*/
|
|
2158
|
-
isArraylikeIndexed(f,
|
|
2158
|
+
isArraylikeIndexed(f, t) {
|
|
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 = t.inputs[f.actionParameter.fieldIndex]) != null && n.indexed));
|
|
2161
2161
|
}
|
|
2162
2162
|
};
|
|
2163
|
-
|
|
2163
|
+
F.bases = {
|
|
2164
2164
|
31337: void 0,
|
|
2165
2165
|
...h0
|
|
2166
|
-
},
|
|
2167
|
-
let
|
|
2168
|
-
function
|
|
2169
|
-
return
|
|
2166
|
+
}, F.registryType = v0.ACTION;
|
|
2167
|
+
let t0 = F;
|
|
2168
|
+
function D0(e) {
|
|
2169
|
+
return e.type === "tuple" || e.type.startsWith("tuple[");
|
|
2170
2170
|
}
|
|
2171
|
-
function i0(
|
|
2171
|
+
function i0(e, f, t) {
|
|
2172
2172
|
if (!f.length)
|
|
2173
|
-
throw new
|
|
2173
|
+
throw new T(
|
|
2174
2174
|
"No indexes found; cannot parse TUPLE field"
|
|
2175
2175
|
);
|
|
2176
|
-
const n = f[0] ??
|
|
2177
|
-
if (n >=
|
|
2178
|
-
throw new
|
|
2179
|
-
const d =
|
|
2180
|
-
if (!
|
|
2181
|
-
const
|
|
2182
|
-
return { value: i, type:
|
|
2176
|
+
const n = f[0] ?? t.length + 1;
|
|
2177
|
+
if (n >= t.length)
|
|
2178
|
+
throw new T(void 0, n);
|
|
2179
|
+
const d = t[n], i = e[n];
|
|
2180
|
+
if (!D0(d)) {
|
|
2181
|
+
const s = a0(d.type);
|
|
2182
|
+
return { value: i, type: s };
|
|
2183
2183
|
}
|
|
2184
2184
|
if (!Array.isArray(i))
|
|
2185
|
-
throw new
|
|
2185
|
+
throw new T(
|
|
2186
2186
|
"rawValue is not an array, but param.type is tuple"
|
|
2187
2187
|
);
|
|
2188
2188
|
const a = f.slice(1);
|
|
2189
2189
|
if (!a.length)
|
|
2190
|
-
throw new
|
|
2191
|
-
const
|
|
2192
|
-
if (
|
|
2193
|
-
throw new
|
|
2190
|
+
throw new T(void 0, -1);
|
|
2191
|
+
const r = a[0] ?? d.components.length + 1;
|
|
2192
|
+
if (r >= d.components.length)
|
|
2193
|
+
throw new T(void 0, r);
|
|
2194
2194
|
return i0(i, a, d.components);
|
|
2195
2195
|
}
|
|
2196
|
-
function a0(
|
|
2197
|
-
const f =
|
|
2196
|
+
function a0(e) {
|
|
2197
|
+
const f = e.toLowerCase();
|
|
2198
2198
|
if (f.startsWith("uint"))
|
|
2199
2199
|
return 0;
|
|
2200
2200
|
if (f.startsWith("int"))
|
|
@@ -2205,57 +2205,57 @@ function a0(t) {
|
|
|
2205
2205
|
return 2;
|
|
2206
2206
|
if (f === "string")
|
|
2207
2207
|
return 3;
|
|
2208
|
-
throw new
|
|
2208
|
+
throw new A(`Unrecognized ABI type: ${e}`);
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2211
|
-
const f = [],
|
|
2212
|
-
for (let n of
|
|
2210
|
+
function L0(e) {
|
|
2211
|
+
const f = [], t = {};
|
|
2212
|
+
for (let n of e) {
|
|
2213
2213
|
const d = JSON.stringify(n);
|
|
2214
|
-
|
|
2214
|
+
t[d] || (f.push(n), t[d] = !0);
|
|
2215
2215
|
}
|
|
2216
2216
|
return f;
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2218
|
+
function r0(e) {
|
|
2219
2219
|
return {
|
|
2220
|
-
...
|
|
2221
|
-
chainid: BigInt(
|
|
2220
|
+
...e,
|
|
2221
|
+
chainid: BigInt(e.chainid)
|
|
2222
2222
|
};
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2225
|
-
if (
|
|
2224
|
+
function n0(e) {
|
|
2225
|
+
if (e.chainid > BigInt(Number.MAX_SAFE_INTEGER))
|
|
2226
2226
|
throw new Error("Chain ID exceeds max safe integer");
|
|
2227
2227
|
return {
|
|
2228
|
-
...
|
|
2229
|
-
chainid: Number(
|
|
2228
|
+
...e,
|
|
2229
|
+
chainid: Number(e.chainid)
|
|
2230
2230
|
};
|
|
2231
2231
|
}
|
|
2232
|
-
function
|
|
2233
|
-
const f =
|
|
2232
|
+
function s0(e) {
|
|
2233
|
+
const f = e.slice(2);
|
|
2234
2234
|
if (f.length === 8)
|
|
2235
2235
|
return 1;
|
|
2236
2236
|
if (f.length === 64)
|
|
2237
2237
|
return f.slice(0, 56) === "0".repeat(56) ? 1 : 0;
|
|
2238
2238
|
throw new Error("Invalid signature format");
|
|
2239
2239
|
}
|
|
2240
|
-
function W0(
|
|
2241
|
-
return l0(
|
|
2240
|
+
function W0(e) {
|
|
2241
|
+
return l0(V(e));
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2243
|
+
function D(e) {
|
|
2244
2244
|
return {
|
|
2245
|
-
...
|
|
2246
|
-
signatureType:
|
|
2247
|
-
signature:
|
|
2248
|
-
actionType:
|
|
2249
|
-
actionParameter:
|
|
2250
|
-
...
|
|
2251
|
-
filterData: W0(
|
|
2252
|
-
} :
|
|
2245
|
+
...r0(e),
|
|
2246
|
+
signatureType: e.signatureType ?? s0(e.signature),
|
|
2247
|
+
signature: V(e.signature),
|
|
2248
|
+
actionType: e.actionType || 0,
|
|
2249
|
+
actionParameter: e.actionParameter.fieldType === 0 ? {
|
|
2250
|
+
...e.actionParameter,
|
|
2251
|
+
filterData: W0(e.actionParameter.filterData)
|
|
2252
|
+
} : e.actionParameter
|
|
2253
2253
|
};
|
|
2254
2254
|
}
|
|
2255
2255
|
function U0({
|
|
2256
|
-
actionClaimant:
|
|
2256
|
+
actionClaimant: e,
|
|
2257
2257
|
actionStepOne: f,
|
|
2258
|
-
actionStepTwo:
|
|
2258
|
+
actionStepTwo: t,
|
|
2259
2259
|
actionStepThree: n,
|
|
2260
2260
|
actionStepFour: d
|
|
2261
2261
|
}) {
|
|
@@ -2366,14 +2366,14 @@ function U0({
|
|
|
2366
2366
|
[
|
|
2367
2367
|
{
|
|
2368
2368
|
actionClaimant: {
|
|
2369
|
-
...
|
|
2370
|
-
signatureType:
|
|
2371
|
-
signature:
|
|
2369
|
+
...r0(e),
|
|
2370
|
+
signatureType: e.signatureType ?? s0(e.signature),
|
|
2371
|
+
signature: V(e.signature)
|
|
2372
2372
|
},
|
|
2373
|
-
actionStepOne:
|
|
2374
|
-
actionStepTwo:
|
|
2375
|
-
actionStepThree:
|
|
2376
|
-
actionStepFour:
|
|
2373
|
+
actionStepOne: D(f),
|
|
2374
|
+
actionStepTwo: D(t),
|
|
2375
|
+
actionStepThree: D(n),
|
|
2376
|
+
actionStepFour: D(d)
|
|
2377
2377
|
}
|
|
2378
2378
|
]
|
|
2379
2379
|
);
|
|
@@ -2382,80 +2382,130 @@ function K0() {
|
|
|
2382
2382
|
return {
|
|
2383
2383
|
filterType: 0,
|
|
2384
2384
|
fieldType: 2,
|
|
2385
|
-
fieldIndex:
|
|
2386
|
-
filterData:
|
|
2385
|
+
fieldIndex: C.ANY_ACTION_PARAM,
|
|
2386
|
+
filterData: S
|
|
2387
2387
|
};
|
|
2388
2388
|
}
|
|
2389
|
-
function X0(
|
|
2389
|
+
function X0(e) {
|
|
2390
2390
|
return {
|
|
2391
2391
|
signatureType: 0,
|
|
2392
|
-
signature:
|
|
2393
|
-
fieldIndex:
|
|
2392
|
+
signature: S,
|
|
2393
|
+
fieldIndex: C.TX_SENDER_CLAIMANT,
|
|
2394
2394
|
targetContract: b0,
|
|
2395
|
-
chainid:
|
|
2395
|
+
chainid: e
|
|
2396
2396
|
};
|
|
2397
2397
|
}
|
|
2398
|
-
const
|
|
2399
|
-
function
|
|
2400
|
-
if (
|
|
2401
|
-
throw new
|
|
2398
|
+
const E = 63;
|
|
2399
|
+
function Y0(e) {
|
|
2400
|
+
if (e.length > 5)
|
|
2401
|
+
throw new W("Can only pack up to 5 indexes.");
|
|
2402
2402
|
let f = 0;
|
|
2403
|
-
return
|
|
2404
|
-
if (
|
|
2405
|
-
throw new
|
|
2406
|
-
`Index ${
|
|
2403
|
+
return e.forEach((t, n) => {
|
|
2404
|
+
if (t > E)
|
|
2405
|
+
throw new W(
|
|
2406
|
+
`Index ${t} exceeds the maximum allowed value (${E}).`
|
|
2407
2407
|
);
|
|
2408
|
-
f |= (
|
|
2409
|
-
}),
|
|
2408
|
+
f |= (t & E) << n * 6;
|
|
2409
|
+
}), e.length < 5 && (f |= E << e.length * 6), f;
|
|
2410
2410
|
}
|
|
2411
|
-
function
|
|
2411
|
+
function $0(e) {
|
|
2412
2412
|
const f = [];
|
|
2413
|
-
for (let
|
|
2414
|
-
const n =
|
|
2415
|
-
if (n ===
|
|
2413
|
+
for (let t = 0; t < 5; t++) {
|
|
2414
|
+
const n = e >> t * 6 & E;
|
|
2415
|
+
if (n === E) break;
|
|
2416
2416
|
f.push(n);
|
|
2417
2417
|
}
|
|
2418
2418
|
return f;
|
|
2419
2419
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const
|
|
2422
|
-
abi: [
|
|
2420
|
+
function d0(e, f) {
|
|
2421
|
+
const t = M({
|
|
2422
|
+
abi: [e],
|
|
2423
2423
|
data: f.data,
|
|
2424
2424
|
topics: f.topics
|
|
2425
|
-
}), n = Array.isArray(
|
|
2426
|
-
if (!
|
|
2425
|
+
}), n = Array.isArray(t.args) ? t.args : Object.values(t.args);
|
|
2426
|
+
if (!e.inputs.some((s) => s.indexed))
|
|
2427
2427
|
return {
|
|
2428
2428
|
...f,
|
|
2429
|
-
...
|
|
2429
|
+
...t
|
|
2430
2430
|
};
|
|
2431
2431
|
const d = [], i = [];
|
|
2432
|
-
for (let
|
|
2433
|
-
|
|
2434
|
-
const a = Array.from({ length:
|
|
2435
|
-
let
|
|
2436
|
-
for (let
|
|
2437
|
-
a[d[
|
|
2438
|
-
for (let
|
|
2439
|
-
a[i[
|
|
2432
|
+
for (let s = 0; s < e.inputs.length; s++)
|
|
2433
|
+
e.inputs[s].indexed ? d.push(s) : i.push(s);
|
|
2434
|
+
const a = Array.from({ length: e.inputs.length });
|
|
2435
|
+
let r = 0;
|
|
2436
|
+
for (let s = 0; s < d.length; s++)
|
|
2437
|
+
a[d[s]] = n[r++];
|
|
2438
|
+
for (let s = 0; s < i.length; s++)
|
|
2439
|
+
a[i[s]] = n[r++];
|
|
2440
2440
|
return {
|
|
2441
2441
|
...f,
|
|
2442
|
-
eventName:
|
|
2442
|
+
eventName: t.eventName,
|
|
2443
2443
|
args: a
|
|
2444
2444
|
};
|
|
2445
2445
|
}
|
|
2446
|
+
function q0([e, f]) {
|
|
2447
|
+
if (e < 0 || e > 13 || f < 0 || f > 13)
|
|
2448
|
+
throw new W(
|
|
2449
|
+
`Tuple indices must be between 0-13, got: [${e}, ${f}]`
|
|
2450
|
+
);
|
|
2451
|
+
return 32 + (e << 4) + f;
|
|
2452
|
+
}
|
|
2453
|
+
function F0(e) {
|
|
2454
|
+
if (e < 32 || e > 253)
|
|
2455
|
+
throw new W(
|
|
2456
|
+
`Field index must be between 32-253, got: ${e}`
|
|
2457
|
+
);
|
|
2458
|
+
const f = e - 32, t = f >> 4 & 15, n = f & 15;
|
|
2459
|
+
return [t, n];
|
|
2460
|
+
}
|
|
2461
|
+
function H0(e) {
|
|
2462
|
+
return e >= 32;
|
|
2463
|
+
}
|
|
2464
|
+
function Z0(e, f) {
|
|
2465
|
+
if (!H0(f))
|
|
2466
|
+
throw new A(
|
|
2467
|
+
`Field index ${f} is invalid. Expected index >= 32`
|
|
2468
|
+
);
|
|
2469
|
+
const [t, n] = F0(f);
|
|
2470
|
+
if (t === void 0 || n === void 0)
|
|
2471
|
+
throw new A(
|
|
2472
|
+
`Failed to unpack field indexes from ${f}`
|
|
2473
|
+
);
|
|
2474
|
+
if (!e || e.length <= t)
|
|
2475
|
+
throw new A(`Decoded args missing item at index ${t}`);
|
|
2476
|
+
const d = e[t];
|
|
2477
|
+
if (!d || !Array.isArray(d))
|
|
2478
|
+
throw new A(
|
|
2479
|
+
`Expected array at index ${t}, but got ${typeof d}`
|
|
2480
|
+
);
|
|
2481
|
+
if (d.length <= n)
|
|
2482
|
+
throw new A(
|
|
2483
|
+
`index ${n} is out of bounds. tuple length is ${d.length}`
|
|
2484
|
+
);
|
|
2485
|
+
const i = d[n];
|
|
2486
|
+
if (typeof i != "bigint")
|
|
2487
|
+
throw new A(
|
|
2488
|
+
`Expected bigint at tuple index ${n}, but got ${typeof i}`
|
|
2489
|
+
);
|
|
2490
|
+
return i;
|
|
2491
|
+
}
|
|
2446
2492
|
export {
|
|
2447
|
-
|
|
2493
|
+
t0 as EventAction,
|
|
2448
2494
|
B0 as FilterType,
|
|
2449
2495
|
k0 as PrimitiveType,
|
|
2450
2496
|
R0 as SignatureType,
|
|
2451
2497
|
_0 as ValueType,
|
|
2452
2498
|
K0 as anyActionParameter,
|
|
2453
|
-
|
|
2454
|
-
|
|
2499
|
+
d0 as decodeAndReorderLogArgs,
|
|
2500
|
+
s0 as detectSignatureType,
|
|
2501
|
+
Z0 as getScalarValueFromTuple,
|
|
2502
|
+
H0 as isCriteriaFieldIndexTuple,
|
|
2455
2503
|
P0 as isEventActionPayloadSimple,
|
|
2456
|
-
|
|
2504
|
+
q0 as packCriteriaFieldIndexes,
|
|
2505
|
+
Y0 as packFieldIndexes,
|
|
2457
2506
|
U0 as prepareEventActionPayload,
|
|
2458
2507
|
X0 as transactionSenderClaimant,
|
|
2459
|
-
|
|
2508
|
+
F0 as unpackCriteriaFieldIndexes,
|
|
2509
|
+
$0 as unpackFieldIndexes
|
|
2460
2510
|
};
|
|
2461
2511
|
//# sourceMappingURL=EventAction.js.map
|