@boostxyz/sdk 5.2.1 → 5.3.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/README.md +10 -0
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +82 -38
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +437 -297
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +2 -2
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +42 -1
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +360 -318
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +2 -2
- package/dist/{Budget-N0YEfSt2.cjs → Budget-AoNx7uFd.cjs} +2 -2
- package/dist/{Budget-N0YEfSt2.cjs.map → Budget-AoNx7uFd.cjs.map} +1 -1
- package/dist/{Budget-C0SMvfEl.js → Budget-DYIV9iNK.js} +3 -3
- package/dist/{Budget-C0SMvfEl.js.map → Budget-DYIV9iNK.js.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +2 -2
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +2 -2
- package/dist/Incentive-BbkfwGOb.cjs +2 -0
- package/dist/Incentive-BbkfwGOb.cjs.map +1 -0
- package/dist/{Incentive-DBZHQ9Np.js → Incentive-qlnv5kQB.js} +77 -50
- package/dist/Incentive-qlnv5kQB.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +3 -3
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +2 -2
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +6 -6
- package/dist/Incentives/ERC20PeggedIncentive.d.ts +10 -1
- package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +2 -2
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +2 -2
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +2 -2
- package/dist/{SimpleDenyList-B8QeJthf.js → SimpleDenyList-ByAr4X1r.js} +3 -3
- package/dist/{SimpleDenyList-B8QeJthf.js.map → SimpleDenyList-ByAr4X1r.js.map} +1 -1
- package/dist/{SimpleDenyList-DIb4xX3j.cjs → SimpleDenyList-CsRXJPwm.cjs} +2 -2
- package/dist/{SimpleDenyList-DIb4xX3j.cjs.map → SimpleDenyList-CsRXJPwm.cjs.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +2 -2
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +2 -2
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/{deployments-COxshLqt.js → deployments-D0fs26TV.js} +16 -16
- package/dist/{deployments-COxshLqt.js.map → deployments-D0fs26TV.js.map} +1 -1
- package/dist/{deployments-BGpr4ppG.cjs → deployments-DoIOqxco.cjs} +2 -2
- package/dist/deployments-DoIOqxco.cjs.map +1 -0
- package/dist/deployments.json +3 -3
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +40 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +42 -16
- package/dist/errors.js.map +1 -1
- package/dist/{generated-ClbO_ULI.js → generated-Cyvr_Tjx.js} +446 -438
- package/dist/generated-Cyvr_Tjx.js.map +1 -0
- package/dist/{generated-CRD9XfOT.cjs → generated-DtYPHhtX.cjs} +2 -2
- package/dist/generated-DtYPHhtX.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +160 -155
- package/package.json +1 -1
- package/src/Actions/EventAction.test.ts +285 -3
- package/src/Actions/EventAction.ts +402 -124
- package/src/BoostCore.test.ts +51 -3
- package/src/BoostCore.ts +73 -0
- package/src/Incentives/ERC20PeggedIncentive.ts +33 -4
- package/src/errors.ts +50 -0
- package/dist/Incentive-BpZePiOD.cjs +0 -2
- package/dist/Incentive-BpZePiOD.cjs.map +0 -1
- package/dist/Incentive-DBZHQ9Np.js.map +0 -1
- package/dist/deployments-BGpr4ppG.cjs.map +0 -1
- package/dist/generated-CRD9XfOT.cjs.map +0 -1
- package/dist/generated-ClbO_ULI.js.map +0 -1
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
import { bL as
|
|
2
|
-
import { getTransaction as
|
|
3
|
-
import { isAddressEqual as
|
|
4
|
-
import { f as
|
|
5
|
-
import { DeployableTarget as
|
|
6
|
-
import { ValidationAbiMissingError as
|
|
7
|
-
import { RegistryType as
|
|
8
|
-
const l0 = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6080516123db6100c85f395f61034a01526123db5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611385565b610273565b6040516100c791906113ca565b60405180910390f35b6100ea60048036038101906100e59190611444565b6102ec565b6040516100f89291906114ff565b60405180910390f35b34801561010c575f80fd5b50610115610321565b604051610122919061153c565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c91906115cf565b60405180910390f35b348015610160575f80fd5b5061017b60048036038101906101769190611444565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e919061193b565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611985565b610648565b6040516101da9190611a36565b60405180910390f35b3480156101ee575f80fd5b5061020960048036038101906102049190611444565b610875565b6040516102169190611a56565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611adc565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611b04565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190612002565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a57610469611629565b5b600181111561047c5761047b611629565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660078111156105305761052f611629565b5b600781111561054257610541611629565b5b81526020015f820160019054906101000a900460ff16600381111561056a57610569611629565b5b600381111561057c5761057b611629565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612076565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612076565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b610650611216565b60048281548110610664576106636120a6565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a7611629565b5b60018111156106ba576106b9611629565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600781111561076e5761076d611629565b5b60078111156107805761077f611629565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a7611629565b5b60038111156107ba576107b9611629565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612076565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612076565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b161127b565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df611629565b5b60018111156108f2576108f1611629565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe82611110565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611189565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a63611629565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b45611629565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610bee57610bed611629565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c611629565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612267565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba611629565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610d6357610d62611629565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d91611629565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612267565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f611629565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610ed857610ed7611629565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f06611629565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612267565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa4611629565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600781111561104d5761104c611629565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b611629565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612267565b50505050507ff2cd382b92e0609edafee04c969decf0c2d04013cd112d0f0818268b11e84c69815f01518260200151836040015184606001518560800151604051611105959493929190612336565b60405180910390a150565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111825750611181826111ad565b5b9050919050565b5f611192610a06565b905080546001166111aa5763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f600181111561123d5761123c611629565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020016112756112d3565b81525090565b6040518060a001604052805f600181111561129957611298611629565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f60078111156112f1576112f0611629565b5b81526020015f600381111561130957611308611629565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61136481611330565b811461136e575f80fd5b50565b5f8135905061137f8161135b565b92915050565b5f6020828403121561139a57611399611328565b5b5f6113a784828501611371565b91505092915050565b5f8115159050919050565b6113c4816113b0565b82525050565b5f6020820190506113dd5f8301846113bb565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112611404576114036113e3565b5b8235905067ffffffffffffffff811115611421576114206113e7565b5b60208301915083600182028301111561143d5761143c6113eb565b5b9250929050565b5f806020838503121561145a57611459611328565b5b5f83013567ffffffffffffffff8111156114775761147661132c565b5b611483858286016113ef565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6114d18261148f565b6114db8185611499565b93506114eb8185602086016114a9565b6114f4816114b7565b840191505092915050565b5f6040820190506115125f8301856113bb565b818103602083015261152481846114c7565b90509392505050565b61153681611330565b82525050565b5f60208201905061154f5f83018461152d565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61159761159261158d84611555565b611574565b611555565b9050919050565b5f6115a88261157d565b9050919050565b5f6115b98261159e565b9050919050565b6115c9816115af565b82525050565b5f6020820190506115e25f8301846115c0565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b61162381611611565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6002811061166757611666611629565b5b50565b5f81905061167782611656565b919050565b5f6116868261166a565b9050919050565b6116968161167c565b82525050565b5f60ff82169050919050565b6116b18161169c565b82525050565b5f6116c182611555565b9050919050565b6116d1816116b7565b82525050565b5f819050919050565b6116e9816116d7565b82525050565b60088110611700576116ff611629565b5b50565b5f819050611710826116ef565b919050565b5f61171f82611703565b9050919050565b61172f81611715565b82525050565b6004811061174657611745611629565b5b50565b5f81905061175682611735565b919050565b5f61176582611749565b9050919050565b6117758161175b565b82525050565b5f82825260208201905092915050565b5f6117958261148f565b61179f818561177b565b93506117af8185602086016114a9565b6117b8816114b7565b840191505092915050565b5f608083015f8301516117d85f860182611726565b5060208301516117eb602086018261176c565b5060408301516117fe60408601826116a8565b5060608301518482036060860152611816828261178b565b9150508091505092915050565b5f60c083015f8301516118385f86018261161a565b50602083015161184b602086018261168d565b50604083015161185e60408601826116a8565b50606083015161187160608601826116c8565b50608083015161188460808601826116e0565b5060a083015184820360a086015261189c82826117c3565b9150508091505092915050565b5f6118b48383611823565b905092915050565b5f602082019050919050565b5f6118d2826115e8565b6118dc81856115f2565b9350836020820285016118ee85611602565b805f5b85811015611929578484038952815161190a85826118a9565b9450611915836118bc565b925060208a019950506001810190506118f1565b50829750879550505050505092915050565b5f6020820190508181035f83015261195381846118c8565b905092915050565b611964816116d7565b811461196e575f80fd5b50565b5f8135905061197f8161195b565b92915050565b5f6020828403121561199a57611999611328565b5b5f6119a784828501611971565b91505092915050565b5f60c083015f8301516119c55f86018261161a565b5060208301516119d8602086018261168d565b5060408301516119eb60408601826116a8565b5060608301516119fe60608601826116c8565b506080830151611a1160808601826116e0565b5060a083015184820360a0860152611a2982826117c3565b9150508091505092915050565b5f6020820190508181035f830152611a4e81846119b0565b905092915050565b5f6020820190508181035f830152611a6e81846114c7565b905092915050565b60a082015f820151611a8a5f85018261168d565b506020820151611a9d602085018261161a565b506040820151611ab060408501826116a8565b506060820151611ac360608501826116c8565b506080820151611ad660808501826116e0565b50505050565b5f60a082019050611aef5f830184611a76565b92915050565b611afe816116d7565b82525050565b5f602082019050611b175f830184611af5565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b57826114b7565b810181811067ffffffffffffffff82111715611b7657611b75611b21565b5b80604052505050565b5f611b8861131f565b9050611b948282611b4e565b919050565b5f80fd5b60028110611ba9575f80fd5b50565b5f81359050611bba81611b9d565b92915050565b611bc981611611565b8114611bd3575f80fd5b50565b5f81359050611be481611bc0565b92915050565b611bf38161169c565b8114611bfd575f80fd5b50565b5f81359050611c0e81611bea565b92915050565b611c1d816116b7565b8114611c27575f80fd5b50565b5f81359050611c3881611c14565b92915050565b5f60a08284031215611c5357611c52611b1d565b5b611c5d60a0611b7f565b90505f611c6c84828501611bac565b5f830152506020611c7f84828501611bd6565b6020830152506040611c9384828501611c00565b6040830152506060611ca784828501611c2a565b6060830152506080611cbb84828501611971565b60808301525092915050565b60088110611cd3575f80fd5b50565b5f81359050611ce481611cc7565b92915050565b60048110611cf6575f80fd5b50565b5f81359050611d0781611cea565b92915050565b5f80fd5b5f67ffffffffffffffff821115611d2b57611d2a611b21565b5b611d34826114b7565b9050602081019050919050565b828183375f83830152505050565b5f611d61611d5c84611d11565b611b7f565b905082815260208101848484011115611d7d57611d7c611d0d565b5b611d88848285611d41565b509392505050565b5f82601f830112611da457611da36113e3565b5b8135611db4848260208601611d4f565b91505092915050565b5f60808284031215611dd257611dd1611b1d565b5b611ddc6080611b7f565b90505f611deb84828501611cd6565b5f830152506020611dfe84828501611cf9565b6020830152506040611e1284828501611c00565b604083015250606082013567ffffffffffffffff811115611e3657611e35611b99565b5b611e4284828501611d90565b60608301525092915050565b5f60c08284031215611e6357611e62611b1d565b5b611e6d60c0611b7f565b90505f611e7c84828501611bd6565b5f830152506020611e8f84828501611bac565b6020830152506040611ea384828501611c00565b6040830152506060611eb784828501611c2a565b6060830152506080611ecb84828501611971565b60808301525060a082013567ffffffffffffffff811115611eef57611eee611b99565b5b611efb84828501611dbd565b60a08301525092915050565b5f6101208284031215611f1d57611f1c611b1d565b5b611f2760a0611b7f565b90505f611f3684828501611c3e565b5f8301525060a082013567ffffffffffffffff811115611f5957611f58611b99565b5b611f6584828501611e4e565b60208301525060c082013567ffffffffffffffff811115611f8957611f88611b99565b5b611f9584828501611e4e565b60408301525060e082013567ffffffffffffffff811115611fb957611fb8611b99565b5b611fc584828501611e4e565b60608301525061010082013567ffffffffffffffff811115611fea57611fe9611b99565b5b611ff684828501611e4e565b60808301525092915050565b5f6020828403121561201757612016611328565b5b5f82013567ffffffffffffffff8111156120345761203361132c565b5b61204084828501611f07565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061208d57607f821691505b6020821081036120a05761209f612049565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261212f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120f4565b61213986836120f4565b95508019841693508086168417925050509392505050565b5f61216b612166612161846116d7565b611574565b6116d7565b9050919050565b5f819050919050565b61218483612151565b61219861219082612172565b848454612100565b825550505050565b5f90565b6121ac6121a0565b6121b781848461217b565b505050565b5b818110156121da576121cf5f826121a4565b6001810190506121bd565b5050565b601f82111561221f576121f0816120d3565b6121f9846120e5565b81016020851015612208578190505b61221c612214856120e5565b8301826121bc565b50505b505050565b5f82821c905092915050565b5f61223f5f1984600802612224565b1980831691505092915050565b5f6122578383612230565b9150826002028217905092915050565b6122708261148f565b67ffffffffffffffff81111561228957612288611b21565b5b6122938254612076565b61229e8282856121de565b5f60209050601f8311600181146122cf575f84156122bd578287015190505b6122c7858261224c565b86555061232e565b601f1984166122dd866120d3565b5f5b82811015612304578489015182556001820191506020850194506020810190506122df565b86831015612321578489015161231d601f891682612230565b8355505b6001600288020188555050505b505050505050565b5f6101208201905061234a5f830188611a76565b81810360a083015261235c81876119b0565b905081810360c083015261237081866119b0565b905081810360e083015261238481856119b0565b905081810361010083015261239981846119b0565b9050969550505050505056fea2646970667358221220c439b0e7103744e8335fa5fdedab4933ee347354f81aabdc240c3ec23e6a35fb64736f6c634300081a0033", y = Symbol.for("@ts-pattern/matcher"), h0 = Symbol.for("@ts-pattern/isVariadic"), L = "@ts-pattern/anonymous-select-key", O = (t) => !!(t && typeof t == "object"), P = (t) => t && !!t[y], g = (t, f, e) => {
|
|
1
|
+
import { bL as W, bM as i0, bN as r0, bO as s0, bP as o0 } from "../generated-Cyvr_Tjx.js";
|
|
2
|
+
import { getTransaction as _, getTransactionReceipt as Q } from "@wagmi/core";
|
|
3
|
+
import { isAddressEqual as N, toEventSelector as j, decodeFunctionData as X, isAddress as K, decodeEventLog as H, zeroHash as x, fromHex as R, encodeAbiParameters as c0, zeroAddress as d0 } from "viem";
|
|
4
|
+
import { f as u0 } from "../deployments-D0fs26TV.js";
|
|
5
|
+
import { DeployableTarget as l0 } from "../Deployable/DeployableTarget.js";
|
|
6
|
+
import { ValidationAbiMissingError as k, FunctionDataDecodeError as $, UnparseableAbiParamError as z, DecodedArgsMalformedError as h0, DecodedArgsError as n0, FieldValueUndefinedError as Y, InvalidTupleDecodingError as v, UnrecognizedFilterTypeError as p0, FieldValueNotComparableError as V, InvalidNumericalCriteriaError as L, NoEventActionStepsProvidedError as y0, TooManyEventActionStepsProvidedError as g0, InvalidTupleEncodingError as F } from "../errors.js";
|
|
7
|
+
import { RegistryType as m0, CheatCodes as S, TRANSFER_SIGNATURE as q } from "../utils.js";
|
|
8
|
+
const A0 = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6080516124506100c85f395f61034a01526124505ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b591906113b2565b610273565b6040516100c791906113f7565b60405180910390f35b6100ea60048036038101906100e59190611471565b6102ec565b6040516100f892919061152c565b60405180910390f35b34801561010c575f80fd5b50610115610321565b6040516101229190611569565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c91906115fc565b60405180910390f35b348015610160575f80fd5b5061017b60048036038101906101769190611471565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e9190611986565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c891906119d0565b610651565b6040516101da9190611a81565b60405180910390f35b3480156101ee575f80fd5b5061020960048036038101906102049190611471565b610887565b6040516102169190611aa1565b60405180910390f35b34801561022a575f80fd5b506102336108bb565b6040516102409190611b27565b60405180910390f35b348015610254575f80fd5b5061025d610993565b60405161026a9190611b4f565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261099f565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a18565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190612077565b610a41565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610648578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a57610469611656565b5b600181111561047c5761047b611656565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660078111156105305761052f611656565b5b600781111561054257610541611656565b5b81526020015f820160019054906101000a900460ff16600481111561056a57610569611656565b5b600481111561057c5761057b611656565b5b81526020015f820160029054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820180546105b5906120eb565b80601f01602080910402602001604051908101604052809291908181526020018280546105e1906120eb565b801561062c5780601f106106035761010080835404028352916020019161062c565b820191905f5260205f20905b81548152906001019060200180831161060f57829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b610659611240565b6004828154811061066d5761066c61211b565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106b1576106b0611656565b5b60018111156106c3576106c2611656565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600781111561077757610776611656565b5b600781111561078957610788611656565b5b81526020015f820160019054906101000a900460ff1660048111156107b1576107b0611656565b5b60048111156107c3576107c2611656565b5b81526020015f820160029054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820180546107fc906120eb565b80601f0160208091040260200160405190810160405280929190818152602001828054610828906120eb565b80156108735780601f1061084a57610100808354040283529160200191610873565b820191905f5260205f20905b81548152906001019060200180831161085657829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108c36112a5565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108f2576108f1611656565b5b600181111561090457610903611656565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a115750610a108261113a565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a496111b3565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a7657610a75611656565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b5857610b57611656565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610c0057610bff611656565b5b02179055506020820151815f0160016101000a81548160ff02191690836004811115610c2f57610c2e611656565b5b02179055506040820151815f0160026101000a81548163ffffffff021916908363ffffffff1602179055506060820151816001019081610c6f91906122dc565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cd357610cd2611656565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610d7b57610d7a611656565b5b02179055506020820151815f0160016101000a81548160ff02191690836004811115610daa57610da9611656565b5b02179055506040820151815f0160026101000a81548163ffffffff021916908363ffffffff1602179055506060820151816001019081610dea91906122dc565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e4e57610e4d611656565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836007811115610ef657610ef5611656565b5b02179055506020820151815f0160016101000a81548160ff02191690836004811115610f2557610f24611656565b5b02179055506040820151815f0160026101000a81548163ffffffff021916908363ffffffff1602179055506060820151816001019081610f6591906122dc565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fc957610fc8611656565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600781111561107157611070611656565b5b02179055506020820151815f0160016101000a81548160ff021916908360048111156110a05761109f611656565b5b02179055506040820151815f0160026101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010190816110e091906122dc565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161112f9594939291906123ab565b60405180910390a150565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806111ac57506111ab826111d7565b5b9050919050565b5f6111bc610a18565b905080546001166111d45763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f600181111561126757611266611656565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f815260200161129f6112fd565b81525090565b6040518060a001604052805f60018111156112c3576112c2611656565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600781111561131b5761131a611656565b5b81526020015f600481111561133357611332611656565b5b81526020015f63ffffffff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6113918161135d565b811461139b575f80fd5b50565b5f813590506113ac81611388565b92915050565b5f602082840312156113c7576113c6611355565b5b5f6113d48482850161139e565b91505092915050565b5f8115159050919050565b6113f1816113dd565b82525050565b5f60208201905061140a5f8301846113e8565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261143157611430611410565b5b8235905067ffffffffffffffff81111561144e5761144d611414565b5b60208301915083600182028301111561146a57611469611418565b5b9250929050565b5f806020838503121561148757611486611355565b5b5f83013567ffffffffffffffff8111156114a4576114a3611359565b5b6114b08582860161141c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6114fe826114bc565b61150881856114c6565b93506115188185602086016114d6565b611521816114e4565b840191505092915050565b5f60408201905061153f5f8301856113e8565b818103602083015261155181846114f4565b90509392505050565b6115638161135d565b82525050565b5f60208201905061157c5f83018461155a565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6115c46115bf6115ba84611582565b6115a1565b611582565b9050919050565b5f6115d5826115aa565b9050919050565b5f6115e6826115cb565b9050919050565b6115f6816115dc565b82525050565b5f60208201905061160f5f8301846115ed565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6116508161163e565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6002811061169457611693611656565b5b50565b5f8190506116a482611683565b919050565b5f6116b382611697565b9050919050565b6116c3816116a9565b82525050565b5f60ff82169050919050565b6116de816116c9565b82525050565b5f6116ee82611582565b9050919050565b6116fe816116e4565b82525050565b5f819050919050565b61171681611704565b82525050565b6008811061172d5761172c611656565b5b50565b5f81905061173d8261171c565b919050565b5f61174c82611730565b9050919050565b61175c81611742565b82525050565b6005811061177357611772611656565b5b50565b5f81905061178382611762565b919050565b5f61179282611776565b9050919050565b6117a281611788565b82525050565b5f63ffffffff82169050919050565b6117c0816117a8565b82525050565b5f82825260208201905092915050565b5f6117e0826114bc565b6117ea81856117c6565b93506117fa8185602086016114d6565b611803816114e4565b840191505092915050565b5f608083015f8301516118235f860182611753565b5060208301516118366020860182611799565b50604083015161184960408601826117b7565b506060830151848203606086015261186182826117d6565b9150508091505092915050565b5f60c083015f8301516118835f860182611647565b50602083015161189660208601826116ba565b5060408301516118a960408601826116d5565b5060608301516118bc60608601826116f5565b5060808301516118cf608086018261170d565b5060a083015184820360a08601526118e7828261180e565b9150508091505092915050565b5f6118ff838361186e565b905092915050565b5f602082019050919050565b5f61191d82611615565b611927818561161f565b9350836020820285016119398561162f565b805f5b85811015611974578484038952815161195585826118f4565b945061196083611907565b925060208a0199505060018101905061193c565b50829750879550505050505092915050565b5f6020820190508181035f83015261199e8184611913565b905092915050565b6119af81611704565b81146119b9575f80fd5b50565b5f813590506119ca816119a6565b92915050565b5f602082840312156119e5576119e4611355565b5b5f6119f2848285016119bc565b91505092915050565b5f60c083015f830151611a105f860182611647565b506020830151611a2360208601826116ba565b506040830151611a3660408601826116d5565b506060830151611a4960608601826116f5565b506080830151611a5c608086018261170d565b5060a083015184820360a0860152611a74828261180e565b9150508091505092915050565b5f6020820190508181035f830152611a9981846119fb565b905092915050565b5f6020820190508181035f830152611ab981846114f4565b905092915050565b60a082015f820151611ad55f8501826116ba565b506020820151611ae86020850182611647565b506040820151611afb60408501826116d5565b506060820151611b0e60608501826116f5565b506080820151611b21608085018261170d565b50505050565b5f60a082019050611b3a5f830184611ac1565b92915050565b611b4981611704565b82525050565b5f602082019050611b625f830184611b40565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611ba2826114e4565b810181811067ffffffffffffffff82111715611bc157611bc0611b6c565b5b80604052505050565b5f611bd361134c565b9050611bdf8282611b99565b919050565b5f80fd5b60028110611bf4575f80fd5b50565b5f81359050611c0581611be8565b92915050565b611c148161163e565b8114611c1e575f80fd5b50565b5f81359050611c2f81611c0b565b92915050565b611c3e816116c9565b8114611c48575f80fd5b50565b5f81359050611c5981611c35565b92915050565b611c68816116e4565b8114611c72575f80fd5b50565b5f81359050611c8381611c5f565b92915050565b5f60a08284031215611c9e57611c9d611b68565b5b611ca860a0611bca565b90505f611cb784828501611bf7565b5f830152506020611cca84828501611c21565b6020830152506040611cde84828501611c4b565b6040830152506060611cf284828501611c75565b6060830152506080611d06848285016119bc565b60808301525092915050565b60088110611d1e575f80fd5b50565b5f81359050611d2f81611d12565b92915050565b60058110611d41575f80fd5b50565b5f81359050611d5281611d35565b92915050565b611d61816117a8565b8114611d6b575f80fd5b50565b5f81359050611d7c81611d58565b92915050565b5f80fd5b5f67ffffffffffffffff821115611da057611d9f611b6c565b5b611da9826114e4565b9050602081019050919050565b828183375f83830152505050565b5f611dd6611dd184611d86565b611bca565b905082815260208101848484011115611df257611df1611d82565b5b611dfd848285611db6565b509392505050565b5f82601f830112611e1957611e18611410565b5b8135611e29848260208601611dc4565b91505092915050565b5f60808284031215611e4757611e46611b68565b5b611e516080611bca565b90505f611e6084828501611d21565b5f830152506020611e7384828501611d44565b6020830152506040611e8784828501611d6e565b604083015250606082013567ffffffffffffffff811115611eab57611eaa611be4565b5b611eb784828501611e05565b60608301525092915050565b5f60c08284031215611ed857611ed7611b68565b5b611ee260c0611bca565b90505f611ef184828501611c21565b5f830152506020611f0484828501611bf7565b6020830152506040611f1884828501611c4b565b6040830152506060611f2c84828501611c75565b6060830152506080611f40848285016119bc565b60808301525060a082013567ffffffffffffffff811115611f6457611f63611be4565b5b611f7084828501611e32565b60a08301525092915050565b5f6101208284031215611f9257611f91611b68565b5b611f9c60a0611bca565b90505f611fab84828501611c89565b5f8301525060a082013567ffffffffffffffff811115611fce57611fcd611be4565b5b611fda84828501611ec3565b60208301525060c082013567ffffffffffffffff811115611ffe57611ffd611be4565b5b61200a84828501611ec3565b60408301525060e082013567ffffffffffffffff81111561202e5761202d611be4565b5b61203a84828501611ec3565b60608301525061010082013567ffffffffffffffff81111561205f5761205e611be4565b5b61206b84828501611ec3565b60808301525092915050565b5f6020828403121561208c5761208b611355565b5b5f82013567ffffffffffffffff8111156120a9576120a8611359565b5b6120b584828501611f7c565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061210257607f821691505b602082108103612115576121146120be565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026121a47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612169565b6121ae8683612169565b95508019841693508086168417925050509392505050565b5f6121e06121db6121d684611704565b6115a1565b611704565b9050919050565b5f819050919050565b6121f9836121c6565b61220d612205826121e7565b848454612175565b825550505050565b5f90565b612221612215565b61222c8184846121f0565b505050565b5b8181101561224f576122445f82612219565b600181019050612232565b5050565b601f8211156122945761226581612148565b61226e8461215a565b8101602085101561227d578190505b6122916122898561215a565b830182612231565b50505b505050565b5f82821c905092915050565b5f6122b45f1984600802612299565b1980831691505092915050565b5f6122cc83836122a5565b9150826002028217905092915050565b6122e5826114bc565b67ffffffffffffffff8111156122fe576122fd611b6c565b5b61230882546120eb565b612313828285612253565b5f60209050601f831160018114612344575f8415612332578287015190505b61233c85826122c1565b8655506123a3565b601f19841661235286612148565b5f5b8281101561237957848901518255600182019150602085019450602081019050612354565b868310156123965784890151612392601f8916826122a5565b8355505b6001600288020188555050505b505050505050565b5f610120820190506123bf5f830188611ac1565b81810360a08301526123d181876119fb565b905081810360c08301526123e581866119fb565b905081810360e08301526123f981856119fb565b905081810361010083015261240e81846119fb565b9050969550505050505056fea2646970667358221220c7ff4a150897568d1b0cf381b80c7477adfb1d4a61c0f1dbe23de1a9fd54af2f64736f6c634300081a0033", y = Symbol.for("@ts-pattern/matcher"), w0 = Symbol.for("@ts-pattern/isVariadic"), D = "@ts-pattern/anonymous-select-key", M = (t) => !!(t && typeof t == "object"), P = (t) => t && !!t[y], p = (t, f, e) => {
|
|
9
9
|
if (P(t)) {
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const n = t[y](), { matched: b, selections: a } = n.match(f);
|
|
11
|
+
return b && a && Object.keys(a).forEach((i) => e(i, a[i])), b;
|
|
12
12
|
}
|
|
13
|
-
if (
|
|
14
|
-
if (!
|
|
13
|
+
if (M(t)) {
|
|
14
|
+
if (!M(f)) return !1;
|
|
15
15
|
if (Array.isArray(t)) {
|
|
16
16
|
if (!Array.isArray(f)) return !1;
|
|
17
|
-
let
|
|
17
|
+
let n = [], b = [], a = [];
|
|
18
18
|
for (const i of t.keys()) {
|
|
19
19
|
const r = t[i];
|
|
20
|
-
P(r) && r[
|
|
20
|
+
P(r) && r[w0] ? a.push(r) : a.length ? b.push(r) : n.push(r);
|
|
21
21
|
}
|
|
22
22
|
if (a.length) {
|
|
23
23
|
if (a.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
24
|
-
if (f.length <
|
|
25
|
-
const i = f.slice(0,
|
|
26
|
-
return
|
|
24
|
+
if (f.length < n.length + b.length) return !1;
|
|
25
|
+
const i = f.slice(0, n.length), r = b.length === 0 ? [] : f.slice(-b.length), s = f.slice(n.length, b.length === 0 ? 1 / 0 : -b.length);
|
|
26
|
+
return n.every((d, E) => p(d, i[E], e)) && b.every((d, E) => p(d, r[E], e)) && (a.length === 0 || p(a[0], s, e));
|
|
27
27
|
}
|
|
28
|
-
return t.length === f.length && t.every((i, r) =>
|
|
28
|
+
return t.length === f.length && t.every((i, r) => p(i, f[r], e));
|
|
29
29
|
}
|
|
30
|
-
return Reflect.ownKeys(t).every((
|
|
31
|
-
const
|
|
32
|
-
return (
|
|
30
|
+
return Reflect.ownKeys(t).every((n) => {
|
|
31
|
+
const b = t[n];
|
|
32
|
+
return (n in f || P(a = b) && a[y]().matcherType === "optional") && p(b, f[n], e);
|
|
33
33
|
var a;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
return Object.is(f, t);
|
|
37
37
|
}, T = (t) => {
|
|
38
|
-
var f, e,
|
|
39
|
-
return
|
|
40
|
-
},
|
|
38
|
+
var f, e, n;
|
|
39
|
+
return M(t) ? P(t) ? (f = (e = (n = t[y]()).getSelectionKeys) == null ? void 0 : e.call(n)) != null ? f : [] : Array.isArray(t) ? C(t, T) : C(Object.values(t), T) : [];
|
|
40
|
+
}, C = (t, f) => t.reduce((e, n) => e.concat(f(n)), []);
|
|
41
41
|
function u(t) {
|
|
42
|
-
return Object.assign(t, { optional: () =>
|
|
42
|
+
return Object.assign(t, { optional: () => T0(t), and: (f) => c(t, f), or: (f) => v0(t, f), select: (f) => f === void 0 ? J(t) : J(f, t) });
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function T0(t) {
|
|
45
45
|
return u({ [y]: () => ({ match: (f) => {
|
|
46
46
|
let e = {};
|
|
47
|
-
const
|
|
48
|
-
e[
|
|
47
|
+
const n = (b, a) => {
|
|
48
|
+
e[b] = a;
|
|
49
49
|
};
|
|
50
|
-
return f === void 0 ? (T(t).forEach((
|
|
50
|
+
return f === void 0 ? (T(t).forEach((b) => n(b, void 0)), { matched: !0, selections: e }) : { matched: p(t, f, n), selections: e };
|
|
51
51
|
}, getSelectionKeys: () => T(t), matcherType: "optional" }) });
|
|
52
52
|
}
|
|
53
53
|
function c(...t) {
|
|
54
54
|
return u({ [y]: () => ({ match: (f) => {
|
|
55
55
|
let e = {};
|
|
56
|
-
const
|
|
57
|
-
e[
|
|
56
|
+
const n = (b, a) => {
|
|
57
|
+
e[b] = a;
|
|
58
58
|
};
|
|
59
|
-
return { matched: t.every((
|
|
60
|
-
}, getSelectionKeys: () =>
|
|
59
|
+
return { matched: t.every((b) => p(b, f, n)), selections: e };
|
|
60
|
+
}, getSelectionKeys: () => C(t, T), matcherType: "and" }) });
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function v0(...t) {
|
|
63
63
|
return u({ [y]: () => ({ match: (f) => {
|
|
64
64
|
let e = {};
|
|
65
|
-
const
|
|
66
|
-
e[
|
|
65
|
+
const n = (b, a) => {
|
|
66
|
+
e[b] = a;
|
|
67
67
|
};
|
|
68
|
-
return
|
|
69
|
-
}, getSelectionKeys: () =>
|
|
68
|
+
return C(t, T).forEach((b) => n(b, void 0)), { matched: t.some((b) => p(b, f, n)), selections: e };
|
|
69
|
+
}, getSelectionKeys: () => C(t, T), matcherType: "or" }) });
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function o(t) {
|
|
72
72
|
return { [y]: () => ({ match: (f) => ({ matched: !!t(f) }) }) };
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function J(...t) {
|
|
75
75
|
const f = typeof t[0] == "string" ? t[0] : void 0, e = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
|
|
76
|
-
return u({ [y]: () => ({ match: (
|
|
77
|
-
let
|
|
78
|
-
return { matched: e === void 0 ||
|
|
79
|
-
|
|
80
|
-
}), selections:
|
|
81
|
-
}, getSelectionKeys: () => [f ??
|
|
76
|
+
return u({ [y]: () => ({ match: (n) => {
|
|
77
|
+
let b = { [f ?? D]: n };
|
|
78
|
+
return { matched: e === void 0 || p(e, n, (a, i) => {
|
|
79
|
+
b[a] = i;
|
|
80
|
+
}), selections: b };
|
|
81
|
+
}, getSelectionKeys: () => [f ?? D].concat(e === void 0 ? [] : T(e)) }) });
|
|
82
82
|
}
|
|
83
83
|
function l(t) {
|
|
84
84
|
return typeof t == "number";
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function g(t) {
|
|
87
87
|
return typeof t == "string";
|
|
88
88
|
}
|
|
89
89
|
function m(t) {
|
|
90
90
|
return typeof t == "bigint";
|
|
91
91
|
}
|
|
92
|
-
u(
|
|
92
|
+
u(o(function(t) {
|
|
93
93
|
return !0;
|
|
94
94
|
}));
|
|
95
95
|
const A = (t) => Object.assign(u(t), { startsWith: (f) => {
|
|
96
|
-
return A(c(t, (e = f,
|
|
96
|
+
return A(c(t, (e = f, o((n) => g(n) && n.startsWith(e)))));
|
|
97
97
|
var e;
|
|
98
98
|
}, endsWith: (f) => {
|
|
99
|
-
return A(c(t, (e = f,
|
|
99
|
+
return A(c(t, (e = f, o((n) => g(n) && n.endsWith(e)))));
|
|
100
100
|
var e;
|
|
101
|
-
}, minLength: (f) => A(c(t, ((e) =>
|
|
102
|
-
return A(c(t, (e = f,
|
|
101
|
+
}, minLength: (f) => A(c(t, ((e) => o((n) => g(n) && n.length >= e))(f))), length: (f) => A(c(t, ((e) => o((n) => g(n) && n.length === e))(f))), maxLength: (f) => A(c(t, ((e) => o((n) => g(n) && n.length <= e))(f))), includes: (f) => {
|
|
102
|
+
return A(c(t, (e = f, o((n) => g(n) && n.includes(e)))));
|
|
103
103
|
var e;
|
|
104
104
|
}, regex: (f) => {
|
|
105
|
-
return A(c(t, (e = f,
|
|
105
|
+
return A(c(t, (e = f, o((n) => g(n) && !!n.match(e)))));
|
|
106
106
|
var e;
|
|
107
107
|
} });
|
|
108
|
-
A(
|
|
109
|
-
const h = (t) => Object.assign(u(t), { between: (f, e) => h(c(t, ((
|
|
110
|
-
h(
|
|
111
|
-
const w = (t) => Object.assign(u(t), { between: (f, e) => w(c(t, ((
|
|
112
|
-
w(
|
|
113
|
-
u(
|
|
108
|
+
A(o(g));
|
|
109
|
+
const h = (t) => Object.assign(u(t), { between: (f, e) => h(c(t, ((n, b) => o((a) => l(a) && n <= a && b >= a))(f, e))), lt: (f) => h(c(t, ((e) => o((n) => l(n) && n < e))(f))), gt: (f) => h(c(t, ((e) => o((n) => l(n) && n > e))(f))), lte: (f) => h(c(t, ((e) => o((n) => l(n) && n <= e))(f))), gte: (f) => h(c(t, ((e) => o((n) => l(n) && n >= e))(f))), int: () => h(c(t, o((f) => l(f) && Number.isInteger(f)))), finite: () => h(c(t, o((f) => l(f) && Number.isFinite(f)))), positive: () => h(c(t, o((f) => l(f) && f > 0))), negative: () => h(c(t, o((f) => l(f) && f < 0))) });
|
|
110
|
+
h(o(l));
|
|
111
|
+
const w = (t) => Object.assign(u(t), { between: (f, e) => w(c(t, ((n, b) => o((a) => m(a) && n <= a && b >= a))(f, e))), lt: (f) => w(c(t, ((e) => o((n) => m(n) && n < e))(f))), gt: (f) => w(c(t, ((e) => o((n) => m(n) && n > e))(f))), lte: (f) => w(c(t, ((e) => o((n) => m(n) && n <= e))(f))), gte: (f) => w(c(t, ((e) => o((n) => m(n) && n >= e))(f))), positive: () => w(c(t, o((f) => m(f) && f > 0))), negative: () => w(c(t, o((f) => m(f) && f < 0))) });
|
|
112
|
+
w(o(m));
|
|
113
|
+
u(o(function(t) {
|
|
114
114
|
return typeof t == "boolean";
|
|
115
115
|
}));
|
|
116
|
-
u(
|
|
116
|
+
u(o(function(t) {
|
|
117
117
|
return typeof t == "symbol";
|
|
118
118
|
}));
|
|
119
|
-
u(
|
|
119
|
+
u(o(function(t) {
|
|
120
120
|
return t == null;
|
|
121
121
|
}));
|
|
122
|
-
u(
|
|
122
|
+
u(o(function(t) {
|
|
123
123
|
return t != null;
|
|
124
124
|
}));
|
|
125
|
-
class
|
|
125
|
+
class E0 extends Error {
|
|
126
126
|
constructor(f) {
|
|
127
127
|
let e;
|
|
128
128
|
try {
|
|
@@ -133,36 +133,36 @@ class p0 extends Error {
|
|
|
133
133
|
super(`Pattern matching error: no pattern matches value ${e}`), this.input = void 0, this.input = f;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
return new
|
|
136
|
+
const G = { matched: !1, value: void 0 };
|
|
137
|
+
function Z(t) {
|
|
138
|
+
return new U(t, G);
|
|
139
139
|
}
|
|
140
|
-
class
|
|
140
|
+
class U {
|
|
141
141
|
constructor(f, e) {
|
|
142
142
|
this.input = void 0, this.state = void 0, this.input = f, this.state = e;
|
|
143
143
|
}
|
|
144
144
|
with(...f) {
|
|
145
145
|
if (this.state.matched) return this;
|
|
146
|
-
const e = f[f.length - 1],
|
|
147
|
-
let
|
|
148
|
-
f.length === 3 && typeof f[1] == "function" ?
|
|
146
|
+
const e = f[f.length - 1], n = [f[0]];
|
|
147
|
+
let b;
|
|
148
|
+
f.length === 3 && typeof f[1] == "function" ? b = f[1] : f.length > 2 && n.push(...f.slice(1, f.length - 1));
|
|
149
149
|
let a = !1, i = {};
|
|
150
|
-
const r = (d,
|
|
151
|
-
a = !0, i[d] =
|
|
152
|
-
},
|
|
153
|
-
return new
|
|
150
|
+
const r = (d, E) => {
|
|
151
|
+
a = !0, i[d] = E;
|
|
152
|
+
}, s = !n.some((d) => p(d, this.input, r)) || b && !b(this.input) ? G : { matched: !0, value: e(a ? D in i ? i[D] : i : this.input, this.input) };
|
|
153
|
+
return new U(this.input, s);
|
|
154
154
|
}
|
|
155
155
|
when(f, e) {
|
|
156
156
|
if (this.state.matched) return this;
|
|
157
|
-
const
|
|
158
|
-
return new
|
|
157
|
+
const n = !!f(this.input);
|
|
158
|
+
return new U(this.input, n ? { matched: !0, value: e(this.input, this.input) } : G);
|
|
159
159
|
}
|
|
160
160
|
otherwise(f) {
|
|
161
161
|
return this.state.matched ? this.state.value : f(this.input);
|
|
162
162
|
}
|
|
163
163
|
exhaustive() {
|
|
164
164
|
if (this.state.matched) return this.state.value;
|
|
165
|
-
throw new
|
|
165
|
+
throw new E0(this.input);
|
|
166
166
|
}
|
|
167
167
|
run() {
|
|
168
168
|
return this.exhaustive();
|
|
@@ -171,13 +171,13 @@ class D {
|
|
|
171
171
|
return this;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
var
|
|
175
|
-
function
|
|
174
|
+
var N0 = /* @__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))(N0 || {}), I0 = /* @__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))(I0 || {}), x0 = /* @__PURE__ */ ((t) => (t[t.EVENT = 0] = "EVENT", t[t.FUNC = 1] = "FUNC", t))(x0 || {});
|
|
175
|
+
function S0(t) {
|
|
176
176
|
return Array.isArray(t.actionSteps);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
178
|
+
const O = class O extends l0 {
|
|
179
179
|
constructor() {
|
|
180
|
-
super(...arguments), this.abi =
|
|
180
|
+
super(...arguments), this.abi = W;
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
183
|
* Gets a specific action event by index
|
|
@@ -200,13 +200,13 @@ const U = class U extends a0 {
|
|
|
200
200
|
* @returns {Promise<ActionStep[]>}
|
|
201
201
|
*/
|
|
202
202
|
async getActionSteps(f) {
|
|
203
|
-
const e = await
|
|
203
|
+
const e = await i0(this._config, {
|
|
204
204
|
address: this.assertValidAddress(),
|
|
205
205
|
...this.optionallyAttachAccount(),
|
|
206
206
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
207
207
|
...f
|
|
208
208
|
});
|
|
209
|
-
return
|
|
209
|
+
return C0(e.map(e0));
|
|
210
210
|
}
|
|
211
211
|
/**
|
|
212
212
|
* Gets the count of action events
|
|
@@ -228,12 +228,12 @@ const U = class U extends a0 {
|
|
|
228
228
|
* @returns {Promise<ActionClaimant>}
|
|
229
229
|
*/
|
|
230
230
|
async getActionClaimant(f) {
|
|
231
|
-
const e = await
|
|
231
|
+
const e = await r0(this._config, {
|
|
232
232
|
address: this.assertValidAddress(),
|
|
233
233
|
...this.optionallyAttachAccount(),
|
|
234
234
|
...f
|
|
235
235
|
});
|
|
236
|
-
return
|
|
236
|
+
return e0(e);
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Executes a prepared event action
|
|
@@ -257,14 +257,14 @@ const U = class U extends a0 {
|
|
|
257
257
|
* @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}
|
|
258
258
|
*/
|
|
259
259
|
async executeRaw(f, e) {
|
|
260
|
-
const { request:
|
|
260
|
+
const { request: n, result: b } = await s0(this._config, {
|
|
261
261
|
address: this.assertValidAddress(),
|
|
262
262
|
...this.optionallyAttachAccount(),
|
|
263
263
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
264
264
|
...e,
|
|
265
265
|
args: [f]
|
|
266
266
|
});
|
|
267
|
-
return { hash: await
|
|
267
|
+
return { hash: await o0(this._config, n), result: b };
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* Derives the action claimant address from a transaction based on the provided ActionClaimant configuration.
|
|
@@ -301,20 +301,20 @@ const U = class U extends a0 {
|
|
|
301
301
|
* @throws {FunctionDataDecodeError} If there's an error decoding function data (for function-based derivation).
|
|
302
302
|
*/
|
|
303
303
|
async deriveActionClaimantFromTransaction(f, e) {
|
|
304
|
-
if (f.fieldIndex ===
|
|
304
|
+
if (f.fieldIndex === S.TX_SENDER_CLAIMANT) {
|
|
305
305
|
if ("hash" in e) {
|
|
306
|
-
const
|
|
306
|
+
const b = await _(this._config, {
|
|
307
307
|
...e,
|
|
308
308
|
chainId: f.chainid
|
|
309
309
|
});
|
|
310
|
-
return e.notBeforeBlockNumber &&
|
|
310
|
+
return e.notBeforeBlockNumber && b.blockNumber < e.notBeforeBlockNumber ? void 0 : b.from;
|
|
311
311
|
}
|
|
312
312
|
if ("logs" in e) {
|
|
313
|
-
for (let
|
|
314
|
-
if (
|
|
315
|
-
const a = await
|
|
313
|
+
for (let b of e.logs)
|
|
314
|
+
if (b.transactionHash) {
|
|
315
|
+
const a = await _(this._config, {
|
|
316
316
|
...e,
|
|
317
|
-
hash:
|
|
317
|
+
hash: b.transactionHash,
|
|
318
318
|
chainId: f.chainid
|
|
319
319
|
});
|
|
320
320
|
return e.notBeforeBlockNumber && a.blockNumber < e.notBeforeBlockNumber ? void 0 : a.from;
|
|
@@ -322,61 +322,54 @@ const U = class U extends a0 {
|
|
|
322
322
|
}
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
|
-
const
|
|
325
|
+
const n = f.signature;
|
|
326
326
|
if (f.signatureType === 0) {
|
|
327
|
-
let
|
|
328
|
-
if (e.abiItem ?
|
|
329
|
-
throw new
|
|
327
|
+
let b;
|
|
328
|
+
if (e.abiItem ? b = e.abiItem : b = e.knownSignatures[n], !b)
|
|
329
|
+
throw new k(n);
|
|
330
330
|
let a;
|
|
331
331
|
if ("logs" in e) {
|
|
332
|
-
for (let
|
|
333
|
-
if (!
|
|
332
|
+
for (let s of e.logs) {
|
|
333
|
+
if (!N(s.address, f.targetContract)) continue;
|
|
334
334
|
let d = this.validateClaimantAgainstArgs(
|
|
335
335
|
f,
|
|
336
|
-
|
|
336
|
+
s
|
|
337
337
|
);
|
|
338
338
|
d && (a = d);
|
|
339
339
|
}
|
|
340
340
|
return a;
|
|
341
341
|
}
|
|
342
|
-
const i = await
|
|
342
|
+
const i = await Q(this._config, {
|
|
343
343
|
...e,
|
|
344
344
|
chainId: f.chainid
|
|
345
345
|
});
|
|
346
346
|
if (e.notBeforeBlockNumber && i.blockNumber < e.notBeforeBlockNumber)
|
|
347
347
|
return;
|
|
348
|
-
const r = i.logs.filter((
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
topics: o.topics
|
|
353
|
-
});
|
|
354
|
-
return { ...o, eventName: d, args: v };
|
|
355
|
-
});
|
|
356
|
-
for (let o of r) {
|
|
357
|
-
if (!E(o.address, f.targetContract)) continue;
|
|
358
|
-
let d = this.validateClaimantAgainstArgs(f, o);
|
|
348
|
+
const r = i.logs.filter((s) => s.topics[0] === j(b)).map((s) => t0(b, s));
|
|
349
|
+
for (let s of r) {
|
|
350
|
+
if (!N(s.address, f.targetContract)) continue;
|
|
351
|
+
let d = this.validateClaimantAgainstArgs(f, s);
|
|
359
352
|
d && (a = d);
|
|
360
353
|
}
|
|
361
354
|
return a;
|
|
362
355
|
}
|
|
363
356
|
if (f.signatureType === 1 && "hash" in e) {
|
|
364
|
-
const
|
|
357
|
+
const b = await _(this._config, {
|
|
365
358
|
...e,
|
|
366
359
|
chainId: f.chainid
|
|
367
360
|
});
|
|
368
|
-
if (e.notBeforeBlockNumber &&
|
|
361
|
+
if (e.notBeforeBlockNumber && b.blockNumber < e.notBeforeBlockNumber || !N(b.to, f.targetContract)) return;
|
|
369
362
|
let a;
|
|
370
|
-
if (e.abiItem ? a = e.abiItem : a = e.knownSignatures[
|
|
371
|
-
throw new
|
|
363
|
+
if (e.abiItem ? a = e.abiItem : a = e.knownSignatures[n], !a)
|
|
364
|
+
throw new k(f.signature);
|
|
372
365
|
let i;
|
|
373
366
|
try {
|
|
374
|
-
i =
|
|
367
|
+
i = X({
|
|
375
368
|
abi: [a],
|
|
376
|
-
data:
|
|
369
|
+
data: b.input
|
|
377
370
|
});
|
|
378
371
|
} catch (r) {
|
|
379
|
-
throw new
|
|
372
|
+
throw new $([a], r);
|
|
380
373
|
}
|
|
381
374
|
return this.validateClaimantAgainstArgs(f, i);
|
|
382
375
|
}
|
|
@@ -392,8 +385,8 @@ const U = class U extends a0 {
|
|
|
392
385
|
validateClaimantAgainstArgs(f, e) {
|
|
393
386
|
if (!e || !Array.isArray(e == null ? void 0 : e.args) || (e == null ? void 0 : e.args.length) <= f.fieldIndex)
|
|
394
387
|
return;
|
|
395
|
-
const
|
|
396
|
-
if (
|
|
388
|
+
const n = e.args.at(f.fieldIndex);
|
|
389
|
+
if (K(n)) return n;
|
|
397
390
|
}
|
|
398
391
|
/**
|
|
399
392
|
* Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
|
|
@@ -406,8 +399,8 @@ const U = class U extends a0 {
|
|
|
406
399
|
*/
|
|
407
400
|
async validateActionSteps(f) {
|
|
408
401
|
const e = await this.getActionSteps();
|
|
409
|
-
for (const
|
|
410
|
-
if (!await this.isActionStepValid(
|
|
402
|
+
for (const n of e)
|
|
403
|
+
if (!await this.isActionStepValid(n, f))
|
|
411
404
|
return !1;
|
|
412
405
|
return !0;
|
|
413
406
|
}
|
|
@@ -424,60 +417,67 @@ const U = class U extends a0 {
|
|
|
424
417
|
*/
|
|
425
418
|
async isActionStepValid(f, e) {
|
|
426
419
|
if (f.signatureType === 0) {
|
|
427
|
-
const
|
|
428
|
-
let
|
|
429
|
-
if (e.abiItem ?
|
|
430
|
-
throw new
|
|
431
|
-
if (this.isArraylikeIndexed(f,
|
|
432
|
-
throw new
|
|
420
|
+
const n = f.signature;
|
|
421
|
+
let b;
|
|
422
|
+
if (e.abiItem ? b = e.abiItem : b = e.knownSignatures[n], !b)
|
|
423
|
+
throw new k(n);
|
|
424
|
+
if (this.isArraylikeIndexed(f, b))
|
|
425
|
+
throw new z(
|
|
433
426
|
f.actionParameter.fieldIndex,
|
|
434
|
-
|
|
427
|
+
b
|
|
435
428
|
);
|
|
436
429
|
if ("logs" in e)
|
|
437
|
-
return this.isActionEventValid(f, e.logs);
|
|
438
|
-
const a = await
|
|
430
|
+
return this.isActionEventValid(f, e.logs, b);
|
|
431
|
+
const a = await Q(this._config, {
|
|
439
432
|
...e,
|
|
440
433
|
chainId: f.chainid
|
|
441
434
|
});
|
|
442
435
|
if (e.notBeforeBlockNumber && a.blockNumber < e.notBeforeBlockNumber)
|
|
443
436
|
return !1;
|
|
444
|
-
if (f.signature ===
|
|
437
|
+
if (f.signature === q)
|
|
445
438
|
return this.decodeTransferLogs(a, f);
|
|
446
|
-
const i = a.logs.filter((r) => r.topics[0] ===
|
|
447
|
-
|
|
448
|
-
abi: [n],
|
|
449
|
-
data: r.data,
|
|
450
|
-
topics: r.topics
|
|
451
|
-
});
|
|
452
|
-
return { ...r, eventName: o, args: d };
|
|
453
|
-
});
|
|
454
|
-
return this.isActionEventValid(f, i);
|
|
439
|
+
const i = a.logs.filter((r) => r.topics[0] === j(b)).map((r) => t0(b, r));
|
|
440
|
+
return this.isActionEventValid(f, i, b);
|
|
455
441
|
}
|
|
456
442
|
if (f.signatureType === 1 && "hash" in e) {
|
|
457
|
-
const
|
|
443
|
+
const n = await _(this._config, {
|
|
458
444
|
...e,
|
|
459
445
|
chainId: f.chainid
|
|
460
446
|
});
|
|
461
|
-
return e.notBeforeBlockNumber &&
|
|
447
|
+
return e.notBeforeBlockNumber && n.blockNumber < e.notBeforeBlockNumber ? !1 : this.isActionFunctionValid(f, n, e);
|
|
462
448
|
}
|
|
463
449
|
return !1;
|
|
464
450
|
}
|
|
465
451
|
/**
|
|
466
452
|
* Validates a single action event with a given criteria against logs.
|
|
467
|
-
* If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
|
|
468
453
|
*
|
|
469
454
|
* @public
|
|
470
|
-
* @async
|
|
471
455
|
* @param {ActionStep} actionStep - The action step containing the event to validate.
|
|
472
456
|
* @param {EventLogs} logs - Event logs to validate the given step against
|
|
473
|
-
* @
|
|
457
|
+
* @param {AbiEvent} eventAbi - The ABI definition of the event
|
|
458
|
+
* @returns {boolean} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.
|
|
474
459
|
*/
|
|
475
|
-
isActionEventValid(f, e) {
|
|
460
|
+
isActionEventValid(f, e, n) {
|
|
476
461
|
const b = f.actionParameter;
|
|
477
462
|
if (!e.length) return !1;
|
|
478
|
-
for (let
|
|
479
|
-
|
|
480
|
-
|
|
463
|
+
for (let a of e)
|
|
464
|
+
try {
|
|
465
|
+
if (!Array.isArray(a.args))
|
|
466
|
+
throw new h0({
|
|
467
|
+
log: a,
|
|
468
|
+
criteria: b,
|
|
469
|
+
fieldValue: void 0
|
|
470
|
+
});
|
|
471
|
+
const { value: i, type: r } = this.parseFieldFromAbi(
|
|
472
|
+
a.args,
|
|
473
|
+
b.fieldIndex,
|
|
474
|
+
n.inputs || [],
|
|
475
|
+
b.fieldType
|
|
476
|
+
);
|
|
477
|
+
if (b.fieldType = r, this.validateFieldAgainstCriteria(b, i, { log: a }))
|
|
478
|
+
return !0;
|
|
479
|
+
} catch {
|
|
480
|
+
}
|
|
481
481
|
return !1;
|
|
482
482
|
}
|
|
483
483
|
/**
|
|
@@ -498,12 +498,12 @@ const U = class U extends a0 {
|
|
|
498
498
|
* @throws {DecodedArgsError} - Throws if neither ERC20 nor ERC721 decoding succeeds
|
|
499
499
|
*/
|
|
500
500
|
async decodeTransferLogs(f, e) {
|
|
501
|
-
const
|
|
502
|
-
(
|
|
501
|
+
const n = f.logs.filter(
|
|
502
|
+
(b) => b.topics[0] === q
|
|
503
503
|
);
|
|
504
504
|
try {
|
|
505
|
-
const
|
|
506
|
-
const { eventName: i, args: r } =
|
|
505
|
+
const b = n.map((a) => {
|
|
506
|
+
const { eventName: i, args: r } = H({
|
|
507
507
|
abi: [
|
|
508
508
|
{
|
|
509
509
|
name: "Transfer",
|
|
@@ -520,11 +520,19 @@ const U = class U extends a0 {
|
|
|
520
520
|
});
|
|
521
521
|
return { ...a, eventName: i, args: r };
|
|
522
522
|
});
|
|
523
|
-
return this.isActionEventValid(e,
|
|
523
|
+
return this.isActionEventValid(e, b, {
|
|
524
|
+
name: "Transfer",
|
|
525
|
+
type: "event",
|
|
526
|
+
inputs: [
|
|
527
|
+
{ type: "address", indexed: !0 },
|
|
528
|
+
{ type: "address", indexed: !0 },
|
|
529
|
+
{ type: "uint256", indexed: !0 }
|
|
530
|
+
]
|
|
531
|
+
});
|
|
524
532
|
} catch {
|
|
525
533
|
try {
|
|
526
|
-
const
|
|
527
|
-
const { eventName: i, args: r } =
|
|
534
|
+
const b = n.map((a) => {
|
|
535
|
+
const { eventName: i, args: r } = H({
|
|
528
536
|
abi: [
|
|
529
537
|
{
|
|
530
538
|
name: "Transfer",
|
|
@@ -541,12 +549,69 @@ const U = class U extends a0 {
|
|
|
541
549
|
});
|
|
542
550
|
return { ...a, eventName: i, args: r };
|
|
543
551
|
});
|
|
544
|
-
return this.isActionEventValid(e,
|
|
552
|
+
return this.isActionEventValid(e, b, {
|
|
553
|
+
name: "Transfer",
|
|
554
|
+
type: "event",
|
|
555
|
+
inputs: [
|
|
556
|
+
{ type: "address", indexed: !0 },
|
|
557
|
+
{ type: "address", indexed: !0 },
|
|
558
|
+
{ type: "uint256" }
|
|
559
|
+
]
|
|
560
|
+
});
|
|
545
561
|
} catch {
|
|
546
|
-
throw new
|
|
562
|
+
throw new n0("Failed to decode transfer logs");
|
|
547
563
|
}
|
|
548
564
|
}
|
|
549
565
|
}
|
|
566
|
+
/**
|
|
567
|
+
* Parses the final (scalar) field from a set of decoded arguments, given an ABI definition.
|
|
568
|
+
* If the fieldType is TUPLE, we decode `fieldIndex` as a bitpacked array of indexes to drill down
|
|
569
|
+
* into nested tuples. Otherwise, we parse the single `fieldIndex` as normal.
|
|
570
|
+
*
|
|
571
|
+
* @public
|
|
572
|
+
* @param {readonly unknown[]} allArgs - The decoded arguments array from an event log or function call.
|
|
573
|
+
* @param {number} criteriaIndex - The field index (bitpacked if TUPLE).
|
|
574
|
+
* @param {AbiParameter[]} abiInputs - The ABI inputs describing each decoded argument.
|
|
575
|
+
* @param {PrimitiveType} declaredType - Either TUPLE or a standard scalar type
|
|
576
|
+
* @returns {{ value: string | bigint | Hex; type: Exclude<PrimitiveType, PrimitiveType.TUPLE> }}
|
|
577
|
+
*/
|
|
578
|
+
parseFieldFromAbi(f, e, n, b) {
|
|
579
|
+
if (e === S.ANY_ACTION_PARAM)
|
|
580
|
+
return {
|
|
581
|
+
value: x,
|
|
582
|
+
type: 2
|
|
583
|
+
/* BYTES */
|
|
584
|
+
};
|
|
585
|
+
if (b !== 4) {
|
|
586
|
+
if (!Array.isArray(f) || e >= f.length)
|
|
587
|
+
throw new Y({
|
|
588
|
+
fieldValue: f,
|
|
589
|
+
criteria: {
|
|
590
|
+
filterType: 0,
|
|
591
|
+
fieldType: b,
|
|
592
|
+
fieldIndex: e,
|
|
593
|
+
filterData: x
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
const i = n[e];
|
|
597
|
+
if (!i || !i.type)
|
|
598
|
+
throw new z(e, i);
|
|
599
|
+
const r = f[e], s = a0(i.type);
|
|
600
|
+
if (s === 1 && (typeof r != "string" || !K(r)))
|
|
601
|
+
throw new Y({
|
|
602
|
+
fieldValue: r,
|
|
603
|
+
criteria: {
|
|
604
|
+
fieldIndex: e,
|
|
605
|
+
filterType: 0,
|
|
606
|
+
fieldType: s,
|
|
607
|
+
filterData: x
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
return { value: r, type: s };
|
|
611
|
+
}
|
|
612
|
+
const a = R0(e);
|
|
613
|
+
return b0(f, a, n);
|
|
614
|
+
}
|
|
550
615
|
/**
|
|
551
616
|
* Validates a single action function with a given criteria against the transaction input.
|
|
552
617
|
*
|
|
@@ -560,162 +625,140 @@ const U = class U extends a0 {
|
|
|
560
625
|
* @throws {ValidationAbiMissingError} Throws if the ABI for the function signature is not found.
|
|
561
626
|
* @throws {FunctionDataDecodeError} Throws if there's an error decoding the function data.
|
|
562
627
|
*/
|
|
563
|
-
isActionFunctionValid(f, e,
|
|
564
|
-
const
|
|
565
|
-
let
|
|
566
|
-
if (
|
|
567
|
-
throw new
|
|
628
|
+
isActionFunctionValid(f, e, n) {
|
|
629
|
+
const b = f.actionParameter, a = f.signature;
|
|
630
|
+
let i;
|
|
631
|
+
if (n.abiItem ? i = n.abiItem : i = n.knownSignatures[a], !i)
|
|
632
|
+
throw new k(a);
|
|
568
633
|
let r;
|
|
569
634
|
try {
|
|
570
|
-
r =
|
|
635
|
+
r = X({
|
|
571
636
|
abi: [i],
|
|
572
637
|
data: e.input
|
|
573
638
|
});
|
|
574
|
-
} catch (
|
|
575
|
-
throw new
|
|
639
|
+
} catch (s) {
|
|
640
|
+
throw new $([i], s);
|
|
641
|
+
}
|
|
642
|
+
if (!(r != null && r.args))
|
|
643
|
+
return !1;
|
|
644
|
+
try {
|
|
645
|
+
const { value: s, type: d } = this.parseFieldFromAbi(
|
|
646
|
+
r.args,
|
|
647
|
+
b.fieldIndex,
|
|
648
|
+
i.inputs || [],
|
|
649
|
+
b.fieldType
|
|
650
|
+
);
|
|
651
|
+
return b.fieldType = d, this.validateFieldAgainstCriteria(b, s, {
|
|
652
|
+
decodedArgs: r.args
|
|
653
|
+
});
|
|
654
|
+
} catch {
|
|
655
|
+
return !1;
|
|
576
656
|
}
|
|
577
|
-
const o = r.args;
|
|
578
|
-
return !(!o || !r || !this.validateFunctionAgainstCriteria(
|
|
579
|
-
n,
|
|
580
|
-
o
|
|
581
|
-
));
|
|
582
657
|
}
|
|
583
658
|
/**
|
|
584
|
-
* Validates a field against a given criteria.
|
|
659
|
+
* Validates a field against a given criteria. The field is assumed to be a non-tuple scalar,
|
|
660
|
+
* along with its final resolved `PrimitiveType`. (Any TUPLE logic has been extracted elsewhere.)
|
|
585
661
|
*
|
|
586
662
|
* @param {Criteria} criteria - The criteria to validate against.
|
|
587
663
|
* @param {string | bigint | Hex} fieldValue - The field value to validate.
|
|
664
|
+
* @param {Exclude<PrimitiveType, PrimitiveType.TUPLE>} fieldType - The final resolved primitive type.
|
|
588
665
|
* @param {Object} input - Additional context for validation.
|
|
589
666
|
* @param {EventLogs[0]} [input.log] - The event log, if validating an event.
|
|
590
667
|
* @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.
|
|
591
|
-
* @returns {
|
|
668
|
+
* @returns {boolean} - Returns true if the field passes the criteria, false otherwise.
|
|
592
669
|
*/
|
|
593
|
-
validateFieldAgainstCriteria(f, e,
|
|
594
|
-
if (f.filterType === 0 && f.fieldType === 2 && f.fieldIndex ===
|
|
670
|
+
validateFieldAgainstCriteria(f, e, n) {
|
|
671
|
+
if (f.filterType === 0 && f.fieldType === 2 && f.fieldIndex === S.ANY_ACTION_PARAM)
|
|
595
672
|
return !0;
|
|
673
|
+
if (f.fieldType === 4)
|
|
674
|
+
throw new v(
|
|
675
|
+
"Tuples should not be passed into validateFieldAgainstCriteria"
|
|
676
|
+
);
|
|
677
|
+
const b = f.fieldType;
|
|
596
678
|
switch (f.filterType) {
|
|
597
679
|
case 0:
|
|
598
|
-
return
|
|
680
|
+
return Z(b).with(
|
|
599
681
|
1,
|
|
600
|
-
() =>
|
|
682
|
+
() => N(f.filterData, e)
|
|
601
683
|
).with(
|
|
602
684
|
0,
|
|
603
685
|
() => BigInt(e) === BigInt(f.filterData)
|
|
604
686
|
).with(
|
|
605
687
|
3,
|
|
606
|
-
() => e ===
|
|
688
|
+
() => e === R(f.filterData, "string")
|
|
607
689
|
).otherwise(() => e === f.filterData);
|
|
608
690
|
case 1:
|
|
609
|
-
return
|
|
691
|
+
return Z(b).with(
|
|
610
692
|
1,
|
|
611
|
-
() => !
|
|
693
|
+
() => !N(f.filterData, e)
|
|
612
694
|
).with(
|
|
613
695
|
0,
|
|
614
696
|
() => BigInt(e) !== BigInt(f.filterData)
|
|
615
697
|
).with(
|
|
616
698
|
3,
|
|
617
|
-
() => e !==
|
|
699
|
+
() => e !== R(f.filterData, "string")
|
|
618
700
|
).otherwise(() => e !== f.filterData);
|
|
619
701
|
case 2:
|
|
620
|
-
if (
|
|
702
|
+
if (b === 0)
|
|
621
703
|
return BigInt(e) > BigInt(f.filterData);
|
|
622
|
-
throw new
|
|
623
|
-
...
|
|
704
|
+
throw new L({
|
|
705
|
+
...n,
|
|
624
706
|
criteria: f,
|
|
625
707
|
fieldValue: e
|
|
626
708
|
});
|
|
627
709
|
case 6:
|
|
628
|
-
if (
|
|
710
|
+
if (b === 0)
|
|
629
711
|
return BigInt(e) >= BigInt(f.filterData);
|
|
630
|
-
throw new
|
|
631
|
-
...
|
|
712
|
+
throw new L({
|
|
713
|
+
...n,
|
|
632
714
|
criteria: f,
|
|
633
715
|
fieldValue: e
|
|
634
716
|
});
|
|
635
717
|
case 3:
|
|
636
|
-
if (
|
|
718
|
+
if (b === 0)
|
|
637
719
|
return BigInt(e) < BigInt(f.filterData);
|
|
638
|
-
throw new
|
|
639
|
-
...
|
|
720
|
+
throw new L({
|
|
721
|
+
...n,
|
|
640
722
|
criteria: f,
|
|
641
723
|
fieldValue: e
|
|
642
724
|
});
|
|
643
725
|
case 7:
|
|
644
|
-
if (
|
|
726
|
+
if (b === 0)
|
|
645
727
|
return BigInt(e) <= BigInt(f.filterData);
|
|
646
|
-
throw new
|
|
647
|
-
...
|
|
728
|
+
throw new L({
|
|
729
|
+
...n,
|
|
648
730
|
criteria: f,
|
|
649
731
|
fieldValue: e
|
|
650
732
|
});
|
|
651
733
|
case 4:
|
|
652
|
-
if (
|
|
653
|
-
let
|
|
654
|
-
return
|
|
734
|
+
if (b === 2 || b === 3) {
|
|
735
|
+
let a;
|
|
736
|
+
return b === 3 ? a = R(f.filterData, "string") : a = f.filterData.slice(2), e.includes(a);
|
|
655
737
|
}
|
|
656
|
-
throw new
|
|
657
|
-
...
|
|
738
|
+
throw new V({
|
|
739
|
+
...n,
|
|
658
740
|
criteria: f,
|
|
659
741
|
fieldValue: e
|
|
660
742
|
});
|
|
661
743
|
case 5:
|
|
662
744
|
if (typeof e != "string")
|
|
663
|
-
throw new
|
|
664
|
-
...
|
|
745
|
+
throw new V({
|
|
746
|
+
...n,
|
|
665
747
|
criteria: f,
|
|
666
748
|
fieldValue: e
|
|
667
749
|
});
|
|
668
|
-
if (
|
|
669
|
-
const
|
|
670
|
-
return new RegExp(
|
|
750
|
+
if (b === 3) {
|
|
751
|
+
const a = R(f.filterData, "string");
|
|
752
|
+
return new RegExp(a).test(e);
|
|
671
753
|
}
|
|
672
754
|
default:
|
|
673
|
-
throw new
|
|
674
|
-
...
|
|
755
|
+
throw new p0({
|
|
756
|
+
...n,
|
|
675
757
|
criteria: f,
|
|
676
758
|
fieldValue: e
|
|
677
759
|
});
|
|
678
760
|
}
|
|
679
761
|
}
|
|
680
|
-
/**
|
|
681
|
-
* Validates a {@link Log} against a given criteria.
|
|
682
|
-
* If the criteria's fieldIndex is 255 (using CheatCodes enum), it is reserved for anyValidation
|
|
683
|
-
*
|
|
684
|
-
* @param {Criteria} criteria - The criteria to validate against.
|
|
685
|
-
* @param {Log} log - The Viem event log.
|
|
686
|
-
* @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
|
|
687
|
-
*/
|
|
688
|
-
validateLogAgainstCriteria(f, e) {
|
|
689
|
-
if (!Array.isArray(e.args) || e.args.length <= f.fieldIndex && f.fieldIndex !== N.ANY_ACTION_PARAM)
|
|
690
|
-
throw new o0({
|
|
691
|
-
log: e,
|
|
692
|
-
criteria: f,
|
|
693
|
-
fieldValue: void 0
|
|
694
|
-
});
|
|
695
|
-
const b = f.fieldIndex === N.ANY_ACTION_PARAM ? k : e.args.at(f.fieldIndex);
|
|
696
|
-
if (b === void 0)
|
|
697
|
-
throw new W({ log: e, criteria: f, fieldValue: b });
|
|
698
|
-
return this.validateFieldAgainstCriteria(f, b, { log: e });
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* Validates a function's decoded arguments against a given criteria.
|
|
702
|
-
* If the criteria's fieldIndex is 255 (using CheatCodes enum), it is reserved for anyValidation
|
|
703
|
-
*
|
|
704
|
-
* @param {Criteria} criteria - The criteria to validate against.
|
|
705
|
-
* @param {unknown[]} decodedArgs - The decoded arguments of the function call.
|
|
706
|
-
* @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.
|
|
707
|
-
*/
|
|
708
|
-
validateFunctionAgainstCriteria(f, e) {
|
|
709
|
-
const b = f.fieldIndex === N.ANY_ACTION_PARAM ? k : e[f.fieldIndex];
|
|
710
|
-
if (b === void 0)
|
|
711
|
-
throw new W({
|
|
712
|
-
criteria: f,
|
|
713
|
-
fieldValue: b
|
|
714
|
-
});
|
|
715
|
-
return this.validateFieldAgainstCriteria(f, b, {
|
|
716
|
-
decodedArgs: e
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
762
|
/**
|
|
720
763
|
* @inheritdoc
|
|
721
764
|
*
|
|
@@ -725,49 +768,98 @@ const U = class U extends a0 {
|
|
|
725
768
|
* @returns {GenericDeployableParams}
|
|
726
769
|
*/
|
|
727
770
|
buildParameters(f, e) {
|
|
728
|
-
const [
|
|
771
|
+
const [n, b] = this.validateDeploymentConfig(
|
|
729
772
|
f,
|
|
730
773
|
e
|
|
731
774
|
);
|
|
732
775
|
let a;
|
|
733
|
-
if (
|
|
734
|
-
let i =
|
|
776
|
+
if (S0(n)) {
|
|
777
|
+
let i = n.actionSteps.filter((s) => !!s);
|
|
735
778
|
if (i.length === 0)
|
|
736
|
-
throw new
|
|
779
|
+
throw new y0();
|
|
737
780
|
if (i.length > 4)
|
|
738
|
-
throw new
|
|
739
|
-
let r = Array.from({ length: 4 }, (
|
|
781
|
+
throw new g0();
|
|
782
|
+
let r = Array.from({ length: 4 }, (s, d) => i.at(d) || i.at(-1));
|
|
740
783
|
a = {
|
|
741
|
-
actionClaimant:
|
|
784
|
+
actionClaimant: n.actionClaimant,
|
|
742
785
|
actionStepOne: r[0],
|
|
743
786
|
actionStepTwo: r[1],
|
|
744
787
|
actionStepThree: r[2],
|
|
745
788
|
actionStepFour: r[3]
|
|
746
789
|
};
|
|
747
790
|
} else
|
|
748
|
-
a =
|
|
791
|
+
a = n;
|
|
749
792
|
return {
|
|
750
|
-
abi:
|
|
751
|
-
bytecode:
|
|
752
|
-
args: [
|
|
753
|
-
...this.optionallyAttachAccount(
|
|
793
|
+
abi: W,
|
|
794
|
+
bytecode: A0,
|
|
795
|
+
args: [_0(a)],
|
|
796
|
+
...this.optionallyAttachAccount(b.account)
|
|
754
797
|
};
|
|
755
798
|
}
|
|
799
|
+
/**
|
|
800
|
+
* Determines whether a string or bytes field is indexed in the event definition.
|
|
801
|
+
* If the user tries to filter on an indexed string/bytes, we throw an error.
|
|
802
|
+
*
|
|
803
|
+
* @public
|
|
804
|
+
* @param {ActionStep} step
|
|
805
|
+
* @param {AbiEvent} event
|
|
806
|
+
* @returns {boolean}
|
|
807
|
+
*/
|
|
756
808
|
isArraylikeIndexed(f, e) {
|
|
757
|
-
var
|
|
758
|
-
return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((
|
|
809
|
+
var n;
|
|
810
|
+
return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((n = e.inputs[f.actionParameter.fieldIndex]) != null && n.indexed));
|
|
759
811
|
}
|
|
760
812
|
};
|
|
761
|
-
|
|
813
|
+
O.bases = {
|
|
762
814
|
31337: void 0,
|
|
763
|
-
...
|
|
764
|
-
},
|
|
765
|
-
let
|
|
766
|
-
function
|
|
815
|
+
...u0
|
|
816
|
+
}, O.registryType = m0.ACTION;
|
|
817
|
+
let f0 = O;
|
|
818
|
+
function B0(t) {
|
|
819
|
+
return t.type === "tuple" || t.type.startsWith("tuple[");
|
|
820
|
+
}
|
|
821
|
+
function b0(t, f, e) {
|
|
822
|
+
if (!f.length)
|
|
823
|
+
throw new v(
|
|
824
|
+
"No indexes found; cannot parse TUPLE field"
|
|
825
|
+
);
|
|
826
|
+
const n = f[0] ?? e.length + 1;
|
|
827
|
+
if (n >= e.length)
|
|
828
|
+
throw new v(void 0, n);
|
|
829
|
+
const b = e[n], a = t[n];
|
|
830
|
+
if (!B0(b)) {
|
|
831
|
+
const s = a0(b.type);
|
|
832
|
+
return { value: a, type: s };
|
|
833
|
+
}
|
|
834
|
+
if (!Array.isArray(a))
|
|
835
|
+
throw new v(
|
|
836
|
+
"rawValue is not an array, but param.type is tuple"
|
|
837
|
+
);
|
|
838
|
+
const i = f.slice(1);
|
|
839
|
+
if (!i.length)
|
|
840
|
+
throw new v(void 0, -1);
|
|
841
|
+
const r = i[0] ?? b.components.length + 1;
|
|
842
|
+
if (r >= b.components.length)
|
|
843
|
+
throw new v(void 0, r);
|
|
844
|
+
return b0(a, i, b.components);
|
|
845
|
+
}
|
|
846
|
+
function a0(t) {
|
|
847
|
+
const f = t.toLowerCase();
|
|
848
|
+
if (f.startsWith("uint") || f.startsWith("int"))
|
|
849
|
+
return 0;
|
|
850
|
+
if (f === "address")
|
|
851
|
+
return 1;
|
|
852
|
+
if (f === "bytes" || f.startsWith("bytes"))
|
|
853
|
+
return 2;
|
|
854
|
+
if (f === "string")
|
|
855
|
+
return 3;
|
|
856
|
+
throw new n0(`Unrecognized ABI type: ${t}`);
|
|
857
|
+
}
|
|
858
|
+
function C0(t) {
|
|
767
859
|
const f = [], e = {};
|
|
768
|
-
for (let
|
|
769
|
-
const
|
|
770
|
-
e[
|
|
860
|
+
for (let n of t) {
|
|
861
|
+
const b = JSON.stringify(n);
|
|
862
|
+
e[b] || (f.push(n), e[b] = !0);
|
|
771
863
|
}
|
|
772
864
|
return f;
|
|
773
865
|
}
|
|
@@ -777,7 +869,7 @@ function I(t) {
|
|
|
777
869
|
chainid: BigInt(t.chainid)
|
|
778
870
|
};
|
|
779
871
|
}
|
|
780
|
-
function
|
|
872
|
+
function e0(t) {
|
|
781
873
|
if (t.chainid > BigInt(Number.MAX_SAFE_INTEGER))
|
|
782
874
|
throw new Error("Chain ID exceeds max safe integer");
|
|
783
875
|
return {
|
|
@@ -785,14 +877,14 @@ function J(t) {
|
|
|
785
877
|
chainid: Number(t.chainid)
|
|
786
878
|
};
|
|
787
879
|
}
|
|
788
|
-
function
|
|
880
|
+
function _0({
|
|
789
881
|
actionClaimant: t,
|
|
790
882
|
actionStepOne: f,
|
|
791
883
|
actionStepTwo: e,
|
|
792
|
-
actionStepThree:
|
|
793
|
-
actionStepFour:
|
|
884
|
+
actionStepThree: n,
|
|
885
|
+
actionStepFour: b
|
|
794
886
|
}) {
|
|
795
|
-
return
|
|
887
|
+
return c0(
|
|
796
888
|
[
|
|
797
889
|
{
|
|
798
890
|
type: "tuple",
|
|
@@ -824,7 +916,7 @@ function N0({
|
|
|
824
916
|
components: [
|
|
825
917
|
{ type: "uint8", name: "filterType" },
|
|
826
918
|
{ type: "uint8", name: "fieldType" },
|
|
827
|
-
{ type: "
|
|
919
|
+
{ type: "uint32", name: "fieldIndex" },
|
|
828
920
|
{ type: "bytes", name: "filterData" }
|
|
829
921
|
]
|
|
830
922
|
}
|
|
@@ -845,7 +937,7 @@ function N0({
|
|
|
845
937
|
components: [
|
|
846
938
|
{ type: "uint8", name: "filterType" },
|
|
847
939
|
{ type: "uint8", name: "fieldType" },
|
|
848
|
-
{ type: "
|
|
940
|
+
{ type: "uint32", name: "fieldIndex" },
|
|
849
941
|
{ type: "bytes", name: "filterData" }
|
|
850
942
|
]
|
|
851
943
|
}
|
|
@@ -866,7 +958,7 @@ function N0({
|
|
|
866
958
|
components: [
|
|
867
959
|
{ type: "uint8", name: "filterType" },
|
|
868
960
|
{ type: "uint8", name: "fieldType" },
|
|
869
|
-
{ type: "
|
|
961
|
+
{ type: "uint32", name: "fieldIndex" },
|
|
870
962
|
{ type: "bytes", name: "filterData" }
|
|
871
963
|
]
|
|
872
964
|
}
|
|
@@ -887,7 +979,7 @@ function N0({
|
|
|
887
979
|
components: [
|
|
888
980
|
{ type: "uint8", name: "filterType" },
|
|
889
981
|
{ type: "uint8", name: "fieldType" },
|
|
890
|
-
{ type: "
|
|
982
|
+
{ type: "uint32", name: "fieldIndex" },
|
|
891
983
|
{ type: "bytes", name: "filterData" }
|
|
892
984
|
]
|
|
893
985
|
}
|
|
@@ -908,42 +1000,90 @@ function N0({
|
|
|
908
1000
|
actionType: e.actionType || 0
|
|
909
1001
|
},
|
|
910
1002
|
actionStepThree: {
|
|
911
|
-
...I(b),
|
|
912
|
-
actionType: b.actionType || 0
|
|
913
|
-
},
|
|
914
|
-
actionStepFour: {
|
|
915
1003
|
...I(n),
|
|
916
1004
|
actionType: n.actionType || 0
|
|
1005
|
+
},
|
|
1006
|
+
actionStepFour: {
|
|
1007
|
+
...I(b),
|
|
1008
|
+
actionType: b.actionType || 0
|
|
917
1009
|
}
|
|
918
1010
|
}
|
|
919
1011
|
]
|
|
920
1012
|
);
|
|
921
1013
|
}
|
|
922
|
-
function
|
|
1014
|
+
function M0() {
|
|
923
1015
|
return {
|
|
924
1016
|
filterType: 0,
|
|
925
1017
|
fieldType: 2,
|
|
926
|
-
fieldIndex:
|
|
927
|
-
filterData:
|
|
1018
|
+
fieldIndex: S.ANY_ACTION_PARAM,
|
|
1019
|
+
filterData: x
|
|
928
1020
|
};
|
|
929
1021
|
}
|
|
930
|
-
function
|
|
1022
|
+
function G0(t) {
|
|
931
1023
|
return {
|
|
932
1024
|
signatureType: 0,
|
|
933
|
-
signature:
|
|
934
|
-
fieldIndex:
|
|
935
|
-
targetContract:
|
|
1025
|
+
signature: x,
|
|
1026
|
+
fieldIndex: S.TX_SENDER_CLAIMANT,
|
|
1027
|
+
targetContract: d0,
|
|
936
1028
|
chainid: t
|
|
937
1029
|
};
|
|
938
1030
|
}
|
|
1031
|
+
const B = 63;
|
|
1032
|
+
function W0(t) {
|
|
1033
|
+
if (t.length > 5)
|
|
1034
|
+
throw new F("Can only pack up to 5 indexes.");
|
|
1035
|
+
let f = 0;
|
|
1036
|
+
return t.forEach((e, n) => {
|
|
1037
|
+
if (e > B)
|
|
1038
|
+
throw new F(
|
|
1039
|
+
`Index ${e} exceeds the maximum allowed value (${B}).`
|
|
1040
|
+
);
|
|
1041
|
+
f |= (e & B) << n * 6;
|
|
1042
|
+
}), f;
|
|
1043
|
+
}
|
|
1044
|
+
function R0(t) {
|
|
1045
|
+
const f = [];
|
|
1046
|
+
for (let e = 0; e < 5; e++) {
|
|
1047
|
+
const n = t >> e * 6 & B;
|
|
1048
|
+
if (n === B) break;
|
|
1049
|
+
f.push(n);
|
|
1050
|
+
}
|
|
1051
|
+
return f;
|
|
1052
|
+
}
|
|
1053
|
+
function t0(t, f) {
|
|
1054
|
+
const e = H({
|
|
1055
|
+
abi: [t],
|
|
1056
|
+
data: f.data,
|
|
1057
|
+
topics: f.topics
|
|
1058
|
+
}), n = Array.isArray(e.args) ? e.args : Object.values(e.args);
|
|
1059
|
+
if (!t.inputs.some((s) => s.indexed))
|
|
1060
|
+
return e;
|
|
1061
|
+
const b = [], a = [];
|
|
1062
|
+
for (let s = 0; s < t.inputs.length; s++)
|
|
1063
|
+
t.inputs[s].indexed ? b.push(s) : a.push(s);
|
|
1064
|
+
const i = new Array(t.inputs.length);
|
|
1065
|
+
let r = 0;
|
|
1066
|
+
for (let s = 0; s < b.length; s++)
|
|
1067
|
+
i[b[s]] = n[r++];
|
|
1068
|
+
for (let s = 0; s < a.length; s++)
|
|
1069
|
+
i[a[s]] = n[r++];
|
|
1070
|
+
return {
|
|
1071
|
+
...f,
|
|
1072
|
+
eventName: e.eventName,
|
|
1073
|
+
args: i
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
939
1076
|
export {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1077
|
+
f0 as EventAction,
|
|
1078
|
+
N0 as FilterType,
|
|
1079
|
+
I0 as PrimitiveType,
|
|
1080
|
+
x0 as SignatureType,
|
|
1081
|
+
M0 as anyActionParameter,
|
|
1082
|
+
t0 as decodeAndReorderLogArgs,
|
|
1083
|
+
S0 as isEventActionPayloadSimple,
|
|
1084
|
+
W0 as packFieldIndexes,
|
|
1085
|
+
_0 as prepareEventActionPayload,
|
|
1086
|
+
G0 as transactionSenderClaimant,
|
|
1087
|
+
R0 as unpackFieldIndexes
|
|
948
1088
|
};
|
|
949
1089
|
//# sourceMappingURL=EventAction.js.map
|