@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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../generated-C_JEoLDO.cjs"),S=require("@wagmi/core"),c=require("viem"),J=require("../deployments-Dk-Z1L2X.cjs"),f0=require("../Deployable/DeployableTarget.cjs"),o=require("../errors.cjs"),x=require("../utils.cjs"),e0="0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033",t0={"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"Minted(uint8,address,uint256,uint256)":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x49c4606c4f7f601127761fb65a512e6bca424f62b165476cf1cfdfa51772a6ab":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x0693c83d190a3d36d2ed6c3ac51b1335d2a3588d96f3f3601c8b1e780d0f952a":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xf349fe0373a901f0506d5343f4a872f385a7f0c26371d7b9e6bf5584b69d75fc":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x3be2a577c218a9e2fca79115ab0381630afc182ee832bcad4011c37d323b4843":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xd19736ba1cd2ffc8c99f90d6c6163e59274d333c89e471cd6668d93849835ac5":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},m=Symbol.for("@ts-pattern/matcher"),n0=Symbol.for("@ts-pattern/isVariadic"),D="@ts-pattern/anonymous-select-key",L=t=>!!(t&&typeof t=="object"),R=t=>t&&!!t[m],h=(t,f,e)=>{if(R(t)){const n=t[m](),{matched:d,selections:i}=n.match(f);return d&&i&&Object.keys(i).forEach(a=>e(a,i[a])),d}if(L(t)){if(!L(f))return!1;if(Array.isArray(t)){if(!Array.isArray(f))return!1;let n=[],d=[],i=[];for(const a of t.keys()){const r=t[a];R(r)&&r[n0]?i.push(r):i.length?d.push(r):n.push(r)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<n.length+d.length)return!1;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);return n.every((y,C)=>h(y,a[C],e))&&d.every((y,C)=>h(y,r[C],e))&&(i.length===0||h(i[0],s,e))}return t.length===f.length&&t.every((a,r)=>h(a,f[r],e))}return Reflect.ownKeys(t).every(n=>{const d=t[n];return(n in f||R(i=d)&&i[m]().matcherType==="optional")&&h(d,f[n],e);var i})}return Object.is(f,t)},E=t=>{var f,e,n;return L(t)?R(t)?(f=(e=(n=t[m]()).getSelectionKeys)==null?void 0:e.call(n))!=null?f:[]:Array.isArray(t)?B(t,E):B(Object.values(t),E):[]},B=(t,f)=>t.reduce((e,n)=>e.concat(f(n)),[]);function b(t){return Object.assign(t,{optional:()=>d0(t),and:f=>p(t,f),or:f=>i0(t,f),select:f=>f===void 0?F(t):F(f,t)})}function d0(t){return b({[m]:()=>({match:f=>{let e={};const n=(d,i)=>{e[d]=i};return f===void 0?(E(t).forEach(d=>n(d,void 0)),{matched:!0,selections:e}):{matched:h(t,f,n),selections:e}},getSelectionKeys:()=>E(t),matcherType:"optional"})})}function p(...t){return b({[m]:()=>({match:f=>{let e={};const n=(d,i)=>{e[d]=i};return{matched:t.every(d=>h(d,f,n)),selections:e}},getSelectionKeys:()=>B(t,E),matcherType:"and"})})}function i0(...t){return b({[m]:()=>({match:f=>{let e={};const n=(d,i)=>{e[d]=i};return B(t,E).forEach(d=>n(d,void 0)),{matched:t.some(d=>h(d,f,n)),selections:e}},getSelectionKeys:()=>B(t,E),matcherType:"or"})})}function u(t){return{[m]:()=>({match:f=>({matched:!!t(f)})})}}function F(...t){const f=typeof t[0]=="string"?t[0]:void 0,e=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return b({[m]:()=>({match:n=>{let d={[f??D]:n};return{matched:e===void 0||h(e,n,(i,a)=>{d[i]=a}),selections:d}},getSelectionKeys:()=>[f??D].concat(e===void 0?[]:E(e))})})}function l(t){return typeof t=="number"}function A(t){return typeof t=="string"}function w(t){return typeof t=="bigint"}b(u(function(t){return!0}));const T=t=>Object.assign(b(t),{startsWith:f=>{return T(p(t,(e=f,u(n=>A(n)&&n.startsWith(e)))));var e},endsWith:f=>{return T(p(t,(e=f,u(n=>A(n)&&n.endsWith(e)))));var e},minLength:f=>T(p(t,(e=>u(n=>A(n)&&n.length>=e))(f))),length:f=>T(p(t,(e=>u(n=>A(n)&&n.length===e))(f))),maxLength:f=>T(p(t,(e=>u(n=>A(n)&&n.length<=e))(f))),includes:f=>{return T(p(t,(e=f,u(n=>A(n)&&n.includes(e)))));var e},regex:f=>{return T(p(t,(e=f,u(n=>A(n)&&!!n.match(e)))));var e}});T(u(A));const g=t=>Object.assign(b(t),{between:(f,e)=>g(p(t,((n,d)=>u(i=>l(i)&&n<=i&&d>=i))(f,e))),lt:f=>g(p(t,(e=>u(n=>l(n)&&n<e))(f))),gt:f=>g(p(t,(e=>u(n=>l(n)&&n>e))(f))),lte:f=>g(p(t,(e=>u(n=>l(n)&&n<=e))(f))),gte:f=>g(p(t,(e=>u(n=>l(n)&&n>=e))(f))),int:()=>g(p(t,u(f=>l(f)&&Number.isInteger(f)))),finite:()=>g(p(t,u(f=>l(f)&&Number.isFinite(f)))),positive:()=>g(p(t,u(f=>l(f)&&f>0))),negative:()=>g(p(t,u(f=>l(f)&&f<0)))});g(u(l));const v=t=>Object.assign(b(t),{between:(f,e)=>v(p(t,((n,d)=>u(i=>w(i)&&n<=i&&d>=i))(f,e))),lt:f=>v(p(t,(e=>u(n=>w(n)&&n<e))(f))),gt:f=>v(p(t,(e=>u(n=>w(n)&&n>e))(f))),lte:f=>v(p(t,(e=>u(n=>w(n)&&n<=e))(f))),gte:f=>v(p(t,(e=>u(n=>w(n)&&n>=e))(f))),positive:()=>v(p(t,u(f=>w(f)&&f>0))),negative:()=>v(p(t,u(f=>w(f)&&f<0)))});v(u(w));b(u(function(t){return typeof t=="boolean"}));b(u(function(t){return typeof t=="symbol"}));b(u(function(t){return t==null}));b(u(function(t){return t!=null}));class a0 extends Error{constructor(f){let e;try{e=JSON.stringify(f)}catch{e=f}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=f}}const U={matched:!1,value:void 0};function O(t){return new P(t,U)}class P{constructor(f,e){this.input=void 0,this.state=void 0,this.input=f,this.state=e}with(...f){if(this.state.matched)return this;const e=f[f.length-1],n=[f[0]];let d;f.length===3&&typeof f[1]=="function"?d=f[1]:f.length>2&&n.push(...f.slice(1,f.length-1));let i=!1,a={};const r=(y,C)=>{i=!0,a[y]=C},s=!n.some(y=>h(y,this.input,r))||d&&!d(this.input)?U:{matched:!0,value:e(i?D in a?a[D]:a:this.input,this.input)};return new P(this.input,s)}when(f,e){if(this.state.matched)return this;const n=!!f(this.input);return new P(this.input,n?{matched:!0,value:e(this.input,this.input)}:U)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new a0(this.input)}run(){return this.exhaustive()}returnType(){return this}}var G=(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))(G||{}),V=(t=>(t[t.UINT=0]="UINT",t[t.ADDRESS=1]="ADDRESS",t[t.BYTES=2]="BYTES",t[t.STRING=3]="STRING",t[t.TUPLE=4]="TUPLE",t[t.INT=5]="INT",t))(V||{}),z=(t=>(t[t.EVENT=0]="EVENT",t[t.FUNC=1]="FUNC",t))(z||{}),j=(t=>(t[t.RAW=0]="RAW",t[t.WAD=1]="WAD",t))(j||{});function Q(t){return Array.isArray(t.actionSteps)}const _=class _ extends f0.DeployableTarget{constructor(){super(...arguments),this.abi=I.de}async getActionStep(f,e){return(await this.getActionSteps(e)).at(f)}async getActionSteps(f){const e=await I.qH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return s0(e.map(q))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const e=await I.LH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return q(e)}async execute(f,e){return await this.awaitResult(this.executeRaw(f,e))}async executeRaw(f,e){const{request:n,result:d}=await I.KH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[f]});return{hash:await I.$H(this._config,n),result:d}}async deriveActionClaimantFromTransaction(f,e){if(f.fieldIndex===x.CheatCodes.TX_SENDER_CLAIMANT){if("hash"in e){const d=await S.getTransaction(this._config,{...e,chainId:f.chainid});return e.notBeforeBlockNumber&&d.blockNumber<e.notBeforeBlockNumber?void 0:d.from}if("logs"in e){for(let d of e.logs)if(d.transactionHash){const i=await S.getTransaction(this._config,{...e,hash:d.transactionHash,chainId:f.chainid});return e.notBeforeBlockNumber&&i.blockNumber<e.notBeforeBlockNumber?void 0:i.from}}return}const n=f.signature;if(f.signatureType===0){let d;if(e.abiItem?d=e.abiItem:d=e.knownSignatures[n],!d)throw new o.ValidationAbiMissingError(n);let i;if("logs"in e){for(let s of e.logs){if(!c.isAddressEqual(s.address,f.targetContract))continue;let y=this.validateClaimantAgainstArgs(f,s);y&&(i=y)}return i}const a=await S.getTransactionReceipt(this._config,{...e,chainId:f.chainid});if(e.notBeforeBlockNumber&&a.blockNumber<e.notBeforeBlockNumber)return;let r;n===x.TRANSFER_SIGNATURE?{decodedLogs:r}=await this.decodeTransferLogs(a):r=a.logs.filter(s=>s.topics[0]===c.toEventSelector(d)).map(s=>H(d,s));for(let s of r){if(!c.isAddressEqual(s.address,f.targetContract))continue;let y=this.validateClaimantAgainstArgs(f,s);y&&(i=y)}return i}if(f.signatureType===1&&"hash"in e){const d=await S.getTransaction(this._config,{...e,chainId:f.chainid});if(e.notBeforeBlockNumber&&d.blockNumber<e.notBeforeBlockNumber||!c.isAddressEqual(d.to,f.targetContract))return;let i;if(e.abiItem?i=e.abiItem:i=e.knownSignatures[n],!i)throw new o.ValidationAbiMissingError(f.signature);let a;try{a=c.decodeFunctionData({abi:[i],data:d.input})}catch(r){throw new o.FunctionDataDecodeError([i],r)}return this.validateClaimantAgainstArgs(f,a)}}validateClaimantAgainstArgs(f,e){if(!e||!Array.isArray(e==null?void 0:e.args)||(e==null?void 0:e.args.length)<=f.fieldIndex)return;const n=e.args.at(f.fieldIndex);if(c.isAddress(n))return n}async validateActionSteps(f){const e=await this.getActionSteps();for(const n of e)if(!await this.isActionStepValid(n,f))return!1;return!0}async isActionStepValid(f,e){if(f.signatureType===0){const n=f.signature;let d;if(e.abiItem?d=e.abiItem:d=e.knownSignatures[n],!d)throw new o.ValidationAbiMissingError(n);if(this.isArraylikeIndexed(f,d))throw new o.UnparseableAbiParamError(f.actionParameter.fieldIndex,d);if("logs"in e)return this.isActionEventValid(f,e.logs,d);const i=await S.getTransactionReceipt(this._config,{...e,chainId:f.chainid});if(e.notBeforeBlockNumber&&i.blockNumber<e.notBeforeBlockNumber)return!1;if(f.signature===x.TRANSFER_SIGNATURE){const{decodedLogs:r,event:s}=await this.decodeTransferLogs(i);return this.isActionEventValid(f,r,s)}const a=i.logs.filter(r=>r.topics[0]===c.toEventSelector(d)).map(r=>H(d,r));return this.isActionEventValid(f,a,d)}if(f.signatureType===1&&"hash"in e){const n=await S.getTransaction(this._config,{...e,chainId:f.chainid});return e.notBeforeBlockNumber&&n.blockNumber<e.notBeforeBlockNumber?!1:this.isActionFunctionValid(f,n,e)}return!1}isActionEventValid(f,e,n){const d=f.actionParameter;if(!e.length)return!1;for(let i of e)try{if(!Array.isArray(i.args))throw new o.DecodedArgsMalformedError({log:i,criteria:d,fieldValue:void 0});const{value:a,type:r}=this.parseFieldFromAbi(i.args,d.fieldIndex,n.inputs||[],d.fieldType);if(d.fieldType=r,this.validateFieldAgainstCriteria(d,a,{log:i}))return!0}catch{}return!1}async decodeTransferLogs(f){const e=f.logs.filter(d=>d.topics[0]===x.TRANSFER_SIGNATURE),n=structuredClone(t0["Transfer(address indexed,address indexed,uint256 indexed)"]);try{return{decodedLogs:e.map(i=>{const{eventName:a,args:r}=c.decodeEventLog({abi:[n],data:i.data,topics:i.topics});return{...i,eventName:a,args:r}}),event:n}}catch{try{return n.inputs[2].indexed=!1,{decodedLogs:e.map(i=>{const{eventName:a,args:r}=c.decodeEventLog({abi:[n],data:i.data,topics:i.topics});return{...i,eventName:a,args:r}}),event:n}}catch{throw new o.DecodedArgsError("Failed to decode transfer logs")}}}parseFieldFromAbi(f,e,n,d){if(e===x.CheatCodes.ANY_ACTION_PARAM)return{value:c.zeroHash,type:2};if(d!==4){if(!Array.isArray(f)||e>=f.length)throw new o.FieldValueUndefinedError({fieldValue:f,criteria:{filterType:0,fieldType:d,fieldIndex:e,filterData:c.zeroHash}});const a=n[e];if(!a||!a.type)throw new o.UnparseableAbiParamError(e,a);const r=f[e],s=X(a.type);if(s===1&&(typeof r!="string"||!c.isAddress(r)))throw new o.FieldValueUndefinedError({fieldValue:r,criteria:{fieldIndex:e,filterType:0,fieldType:s,filterData:c.zeroHash}});return{value:r,type:s}}const i=Z(e);return K(f,i,n)}isActionFunctionValid(f,e,n){const d=f.actionParameter,i=f.signature;let a;if(n.abiItem?a=n.abiItem:a=n.knownSignatures[i],!a)throw new o.ValidationAbiMissingError(i);let r;try{r=c.decodeFunctionData({abi:[a],data:e.input})}catch(s){throw new o.FunctionDataDecodeError([a],s)}if(!(r!=null&&r.args))return!1;try{const{value:s,type:y}=this.parseFieldFromAbi(r.args,d.fieldIndex,a.inputs||[],d.fieldType);return d.fieldType=y,this.validateFieldAgainstCriteria(d,s,{decodedArgs:r.args})}catch{return!1}}validateFieldAgainstCriteria(f,e,n){if(f.filterType===0&&f.fieldType===2&&f.fieldIndex===x.CheatCodes.ANY_ACTION_PARAM)return!0;if(f.fieldType===4)throw new o.InvalidTupleDecodingError("Tuples should not be passed into validateFieldAgainstCriteria");const d=f.fieldType;switch(f.filterType){case 0:return O(d).with(1,()=>c.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)===BigInt(f.filterData)).with(3,()=>e===c.fromHex(f.filterData,"string")).otherwise(()=>e===f.filterData);case 1:return O(d).with(1,()=>!c.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)!==BigInt(f.filterData)).with(5,()=>BigInt(e)!==BigInt(f.filterData)).with(3,()=>e!==c.fromHex(f.filterData,"string")).otherwise(()=>e!==f.filterData);case 2:if(d===0||d===5)return BigInt(e)>BigInt(f.filterData);throw new o.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 6:if(d===0||d===5)return BigInt(e)>=BigInt(f.filterData);throw new o.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 3:if(d===0||d===5)return BigInt(e)<BigInt(f.filterData);throw new o.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 7:if(d===0||d===5)return BigInt(e)<=BigInt(f.filterData);throw new o.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 4:if(d===2||d===3){let i;return d===3?i=c.fromHex(f.filterData,"string"):i=f.filterData.slice(2),e.includes(i)}throw new o.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});case 5:if(typeof e!="string")throw new o.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});if(d===3){const i=c.fromHex(f.filterData,"string");return new RegExp(i).test(e)}default:throw new o.UnrecognizedFilterTypeError({...n,criteria:f,fieldValue:e})}}buildParameters(f,e){const[n,d]=this.validateDeploymentConfig(f,e);let i;if(Q(n)){let a=n.actionSteps.filter(s=>!!s);if(a.length===0)throw new o.NoEventActionStepsProvidedError;if(a.length>4)throw new o.TooManyEventActionStepsProvidedError;let r=Array.from({length:4},(s,y)=>a.at(y)||a.at(-1));i={actionClaimant:n.actionClaimant,actionStepOne:r[0],actionStepTwo:r[1],actionStepThree:r[2],actionStepFour:r[3]}}else i=n;return{abi:I.de,bytecode:e0,args:[Y(i)],...this.optionallyAttachAccount(d.account)}}isArraylikeIndexed(f,e){var n;return!!((f.actionParameter.fieldType===3||f.actionParameter.fieldType===2)&&((n=e.inputs[f.actionParameter.fieldIndex])!=null&&n.indexed))}};_.bases={31337:void 0,...J.EventAction},_.registryType=x.RegistryType.ACTION;let W=_;function r0(t){return t.type==="tuple"||t.type.startsWith("tuple[")}function K(t,f,e){if(!f.length)throw new o.InvalidTupleDecodingError("No indexes found; cannot parse TUPLE field");const n=f[0]??e.length+1;if(n>=e.length)throw new o.InvalidTupleDecodingError(void 0,n);const d=e[n],i=t[n];if(!r0(d)){const s=X(d.type);return{value:i,type:s}}if(!Array.isArray(i))throw new o.InvalidTupleDecodingError("rawValue is not an array, but param.type is tuple");const a=f.slice(1);if(!a.length)throw new o.InvalidTupleDecodingError(void 0,-1);const r=a[0]??d.components.length+1;if(r>=d.components.length)throw new o.InvalidTupleDecodingError(void 0,r);return K(i,a,d.components)}function X(t){const f=t.toLowerCase();if(f.startsWith("uint"))return 0;if(f.startsWith("int"))return 5;if(f==="address")return 1;if(f==="bytes"||f.startsWith("bytes"))return 2;if(f==="string")return 3;throw new o.DecodedArgsError(`Unrecognized ABI type: ${t}`)}function s0(t){const f=[],e={};for(let n of t){const d=JSON.stringify(n);e[d]||(f.push(n),e[d]=!0)}return f}function $(t){return{...t,chainid:BigInt(t.chainid)}}function q(t){if(t.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...t,chainid:Number(t.chainid)}}function M(t){const f=t.slice(2);if(f.length===8)return 1;if(f.length===64)return f.slice(0,56)==="0".repeat(56)?1:0;throw new Error("Invalid signature format")}function u0(t){return c.trim(c.pad(t))}function k(t){return{...$(t),signatureType:t.signatureType??M(t.signature),signature:c.pad(t.signature),actionType:t.actionType||0,actionParameter:t.actionParameter.fieldType===0?{...t.actionParameter,filterData:u0(t.actionParameter.filterData)}:t.actionParameter}}function Y({actionClaimant:t,actionStepOne:f,actionStepTwo:e,actionStepThree:n,actionStepFour:d}){return c.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:{...$(t),signatureType:t.signatureType??M(t.signature),signature:c.pad(t.signature)},actionStepOne:k(f),actionStepTwo:k(e),actionStepThree:k(n),actionStepFour:k(d)}])}function o0(){return{filterType:0,fieldType:2,fieldIndex:x.CheatCodes.ANY_ACTION_PARAM,filterData:c.zeroHash}}function c0(t){return{signatureType:0,signature:c.zeroHash,fieldIndex:x.CheatCodes.TX_SENDER_CLAIMANT,targetContract:c.zeroAddress,chainid:t}}const N=63;function p0(t){if(t.length>5)throw new o.InvalidTupleEncodingError("Can only pack up to 5 indexes.");let f=0;return t.forEach((e,n)=>{if(e>N)throw new o.InvalidTupleEncodingError(`Index ${e} exceeds the maximum allowed value (${N}).`);f|=(e&N)<<n*6}),t.length<5&&(f|=N<<t.length*6),f}function Z(t){const f=[];for(let e=0;e<5;e++){const n=t>>e*6&N;if(n===N)break;f.push(n)}return f}function H(t,f){const e=c.decodeEventLog({abi:[t],data:f.data,topics:f.topics}),n=Array.isArray(e.args)?e.args:Object.values(e.args);if(!t.inputs.some(s=>s.indexed))return{...f,...e};const d=[],i=[];for(let s=0;s<t.inputs.length;s++)t.inputs[s].indexed?d.push(s):i.push(s);const a=Array.from({length:t.inputs.length});let r=0;for(let s=0;s<d.length;s++)a[d[s]]=n[r++];for(let s=0;s<i.length;s++)a[i[s]]=n[r++];return{...f,eventName:e.eventName,args:a}}exports.EventAction=W;exports.FilterType=G;exports.PrimitiveType=V;exports.SignatureType=z;exports.ValueType=j;exports.anyActionParameter=o0;exports.decodeAndReorderLogArgs=H;exports.detectSignatureType=M;exports.isEventActionPayloadSimple=Q;exports.packFieldIndexes=p0;exports.prepareEventActionPayload=Y;exports.transactionSenderClaimant=c0;exports.unpackFieldIndexes=Z;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../generated-C_JEoLDO.cjs"),S=require("@wagmi/core"),c=require("viem"),e0=require("../deployments-Dk-Z1L2X.cjs"),t0=require("../Deployable/DeployableTarget.cjs"),u=require("../errors.cjs"),x=require("../utils.cjs"),n0="0x60a0604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b608051611c276100945f395f6101510152611c275ff3fe6080604052600436106100ad575f3560e01c80639bc1cf8111610066578063d7768c471161004c578063d7768c4714610206578063dbdf211014610232578063ddd6ab0814610253575f80fd5b80639bc1cf81146101b9578063c26624e8146101da575f80fd5b806328d6183b1161009657806328d6183b14610106578063393df8cb14610140578063439fab9114610198575f80fd5b806301ffc9a7146100b157806309c5eabe146100e5575b5f80fd5b3480156100bc575f80fd5b506100d06100cb366004611281565b610270565b60405190151581526020015b60405180910390f35b6100f86100f33660046112c7565b6102cb565b6040516100dc929190611381565b348015610111575f80fd5b506040517f7687b0ed0000000000000000000000000000000000000000000000000000000081526020016100dc565b34801561014b575f80fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100dc565b3480156101a3575f80fd5b506101b76101b23660046112c7565b610300565b005b3480156101c4575f80fd5b506101cd6103a0565b6040516100dc919061149b565b3480156101e5575f80fd5b506101f96101f436600461151c565b61059f565b6040516100dc9190611533565b348015610211575f80fd5b506102256102203660046112c7565b61077a565b6040516100dc9190611545565b34801561023d575f80fd5b506102466107ae565b6040516100dc91906115a7565b34801561025e575f80fd5b506004546040519081526020016100dc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7687b0ed0000000000000000000000000000000000000000000000000000000014806102c557506102c582610858565b92915050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156103515760018160011c14303b106103485763f92ee8a95f526004601cfd5b818160ff1b1b91505b50610366610361838501856118a8565b6108ad565b801561039b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b82821015610596578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff166001811115610410576104106113a3565b6001811115610421576104216113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610494576104946113a3565b60078111156104a5576104a56113a3565b81528154602090910190610100900460ff1660058111156104c8576104c86113a3565b60058111156104d9576104d96113a3565b8152815462010000900463ffffffff166020820152600182018054604090920191610503906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461052f906119a9565b801561057a5780601f106105515761010080835404028352916020019161057a565b820191905f5260205f20905b81548152906001019060200180831161055d57829003601f168201915b50505050508152505081525050815260200190600101906103c3565b50505050905090565b6105a7611226565b600482815481106105ba576105ba6119fa565b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156105fd576105fd6113a3565b600181111561060e5761060e6113a3565b81526001820154610100810460ff90811660208401526201000090910473ffffffffffffffffffffffffffffffffffffffff1660408084019190915260028401546060840152805160808082019092526003850180549290940193909290918391166007811115610681576106816113a3565b6007811115610692576106926113a3565b81528154602090910190610100900460ff1660058111156106b5576106b56113a3565b60058111156106c6576106c66113a3565b8152815462010000900463ffffffff1660208201526001820180546040909201916106f0906119a9565b80601f016020809104026020016040519081016040528092919081815260200182805461071c906119a9565b80156107675780601f1061073e57610100808354040283529160200191610767565b820191905f5260205f20905b81548152906001019060200180831161074a57829003601f168201915b5050509190925250505090525092915050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a081019091525f8054829060ff1660018111156107fc576107fc6113a3565b600181111561080d5761080d6113a3565b815260018201546020820152600282015460ff81166040830152610100900473ffffffffffffffffffffffffffffffffffffffff166060820152600390910154608090910152919050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe67157950000000000000000000000000000000000000000000000000000000014806102c557506102c582611156565b6108b56111ec565b805180515f8054909190829060ff1916600183818111156108d8576108d86113a3565b02179055506020828101516001808401919091556040840151600284018054606087015173ffffffffffffffffffffffffffffffffffffffff16610100027fffffffffffffffffffffff00000000000000000000000000000000000000000090911660ff90931692909217919091179055608090930151600390920191909155828101516004805480850182555f91909152815160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8101918255928201517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c90930180549294919392909160ff19919091169083818111156109e1576109e16113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610aa257610aa26113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ae757610ae76113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610b3b9082611a72565b505050604083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610bcc57610bcc6113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610c8d57610c8d6113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610cd257610cd26113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610d269082611a72565b505050606083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610db757610db76113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115610e7857610e786113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100836005811115610ebd57610ebd6113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff90911617815560608201516001820190610f119082611a72565b505050608083015160048054600181810183555f92909252825160059091027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b810191825560208401517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805494965091945092909160ff19909116908381811115610fa257610fa26113a3565b0217905550604082015160018083018054606086015173ffffffffffffffffffffffffffffffffffffffff1662010000027fffffffffffffffffffff0000000000000000000000000000000000000000ffff60ff90951661010002949094167fffffffffffffffffffff000000000000000000000000000000000000000000ff90911617929092179091556080830151600283015560a0830151805160038401805492939092839160ff1990911690836007811115611063576110636113a3565b02179055506020820151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101008360058111156110a8576110a86113a3565b02179055506040820151815463ffffffff90911662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ffff909116178155606082015160018201906110fc9082611a72565b50505050507fdc8145a6c863ebd27b18aa903b7f82f1015527a05a81f227ef06ab79616082b4815f0151826020015183604001518460600151856080015160405161114b959493929190611b89565b60405180910390a150565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806102c557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146102c5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546001166112235763d7e6bcf85f526004601cfd5b50565b6040805160c081019091525f808252602082019081525f6020820181905260408201819052606082015260800161127c6040805160808101909152805f81526020015f81525f6020820152606060409091015290565b905290565b5f60208284031215611291575f80fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146112c0575f80fd5b9392505050565b5f80602083850312156112d8575f80fd5b823567ffffffffffffffff8111156112ee575f80fd5b8301601f810185136112fe575f80fd5b803567ffffffffffffffff811115611314575f80fd5b856020828401011115611325575f80fd5b6020919091019590945092505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8215158152604060208201525f61139b6040830184611335565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600281106113e0576113e06113a3565b9052565b805182525f60208201516113fb60208501826113d0565b5060ff604083015116604084015273ffffffffffffffffffffffffffffffffffffffff60608301511660608401526080820151608084015260a082015160c060a0850152805160088110611451576114516113a3565b60c085015260208101516006811061146b5761146b6113a3565b60e0850152604081015163ffffffff1661010085015260600151608061012085015261139b610140850182611335565b5f602082016020835280845180835260408501915060408160051b8601019250602086015f5b82811015611510577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184526114fb8583516113e4565b945060209384019391909101906001016114c1565b50929695505050505050565b5f6020828403121561152c575f80fd5b5035919050565b602081525f6112c060208301846113e4565b602081525f6112c06020830184611335565b6115628282516113d0565b6020810151602083015260ff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff6060820151166060830152608081015160808301525050565b60a081016102c58284611557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff81118282101715611605576116056115b5565b60405290565b60405160c0810167ffffffffffffffff81118282101715611605576116056115b5565b6040516080810167ffffffffffffffff81118282101715611605576116056115b5565b80356002811061165f575f80fd5b919050565b803560ff8116811461165f575f80fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461165f575f80fd5b5f60a082840312156116a7575f80fd5b6116af6115e2565b90506116ba82611651565b8152602082810135908201526116d260408301611664565b60408201526116e360608301611674565b606082015260809182013591810191909152919050565b5f82601f830112611709575f80fd5b813567ffffffffffffffff811115611723576117236115b5565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611770576117706115b5565b604052818152838201602001851015611787575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60c082840312156117b3575f80fd5b6117bb61160b565b8235815290506117cd60208301611651565b60208201526117de60408301611664565b60408201526117ef60608301611674565b60608201526080828101359082015260a082013567ffffffffffffffff811115611817575f80fd5b820160808185031215611828575f80fd5b61183061162e565b81356008811061183e575f80fd5b8152602082013560068110611851575f80fd5b6020820152604082013563ffffffff8116811461186c575f80fd5b6040820152606082013567ffffffffffffffff81111561188a575f80fd5b611896868285016116fa565b60608301525060a08301525092915050565b5f602082840312156118b8575f80fd5b813567ffffffffffffffff8111156118ce575f80fd5b820161012081850312156118e0575f80fd5b6118e86115e2565b6118f28583611697565b815260a082013567ffffffffffffffff81111561190d575f80fd5b611919868285016117a3565b60208301525060c082013567ffffffffffffffff811115611938575f80fd5b611944868285016117a3565b60408301525060e082013567ffffffffffffffff811115611963575f80fd5b61196f868285016117a3565b60608301525061010082013567ffffffffffffffff81111561198f575f80fd5b61199b868285016117a3565b608083015250949350505050565b600181811c908216806119bd57607f821691505b6020821081036119f4577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b601f82111561039b57805f5260205f20601f840160051c81016020851015611a4c5750805b601f840160051c820191505b81811015611a6b575f8155600101611a58565b5050505050565b815167ffffffffffffffff811115611a8c57611a8c6115b5565b611aa081611a9a84546119a9565b84611a27565b6020601f821160018114611af1575f8315611abb5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611a6b565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611b3e5787850151825560209485019460019092019101611b1e565b5084821015611b7a57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b611b938187611557565b61012060a08201525f611baa6101208301876113e4565b82810360c0840152611bbc81876113e4565b905082810360e0840152611bd081866113e4565b9050828103610100840152611be581856113e4565b9897505050505050505056fea2646970667358221220a8f9468bd81df646b95b9d19599966d6a1b1f344117e00f66aa985f1fdfee66b64736f6c634300081a0033",d0={"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"NameRegistered(string,bytes32 indexed,address indexed,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32",indexed:!0},{type:"address",indexed:!0},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x7ac572687bf4e66a8514fc2ec464fc2644c78bcb1d80a225fc51a33e0ee38bfa":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"Minted(uint8,address,uint256,uint256)":{name:"Minted",type:"event",inputs:[{type:"uint8"},{type:"address"},{type:"uint256"},{type:"uint256"}]},"0x2a29f7402bd32f0e4bbe17d44be064f7f64d96ee174ed7cb27936d869bf9a888":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"Minted(address indexed,uint8,uint8,address indexed,(uint32,uint256,address,uint32,uint32,uint32,address,bool,uint256,uint256,uint256,uint256,uint256),uint256 indexed)":{name:"Minted",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint8"},{type:"uint8"},{type:"address",indexed:!0},{type:"tuple",components:[{type:"uint32"},{type:"uint256"},{type:"address"},{type:"uint32"},{type:"uint32"},{type:"uint32"},{type:"address"},{type:"bool"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},{type:"uint256",indexed:!0}]},"0xc773e203af3f3079b18c21f98bb8d8ccd2fea097d631d448df89de4edbe7a2a8":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"ZoraTimedSaleStrategyRewards(address indexed,uint256 indexed,address,uint256,address,uint256,address,uint256,address,uint256,address,uint256)":{name:"ZoraTimedSaleStrategyRewards",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"},{type:"address"},{type:"uint256"}]},"0x0f29bbf4ce25d2346bbeb8a898e24e5d6d7d1d19bb895e71faecac833b259547":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"BoostClaimed(uint256 indexed,uint256 indexed,address indexed,address,bytes)":{name:"BoostClaimed",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"bytes"}]},"0x116812d3ad4507d72f2c428b63246d594ca055a1dc119394285504c23d1f34cd":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"BoostCreated(uint256 indexed,address indexed,address indexed,uint256,address,address,address)":{name:"BoostCreated",type:"event",inputs:[{type:"uint256",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"address"},{type:"address"},{type:"address"}]},"0x72d6b4b5ad0fb12b8a7bb3bcb60edd774c096403d611437859c156ecb3c03a36":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"SecondaryBuy(address indexed,address indexed,address indexed,uint256,uint256)":{name:"SecondaryBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x6779abc30cb1bfb05c1170de8e2ef5828c19a2590043d2fd9579d945929fd8a4":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x49c4606c4f7f601127761fb65a512e6bca424f62b165476cf1cfdfa51772a6ab":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenBuy(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenBuy",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xeb3adfe7d8294092cd6b0e7ce95ed01c11d3c5d5d3dc1fecdeb87de43c5e40b2":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"CoopTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"CoopTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0x0693c83d190a3d36d2ed6c3ac51b1335d2a3588d96f3f3601c8b1e780d0f952a":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"WowTokenSell(address indexed,address indexed,address indexed,uint256,uint256,uint256,uint256,uint256,string,uint256,uint8)":{name:"WowTokenSell",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"string"},{type:"uint256"},{type:"uint8"}]},"0xd5468362e31bdcdc9884e72dcf3b00f9d46086067621224b7cb759308d597c6c":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"CoopTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xf349fe0373a901f0506d5343f4a872f385a7f0c26371d7b9e6bf5584b69d75fc":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenFees(address indexed,address indexed,address indexed,address,uint256,uint256,uint256,uint256)":{name:"WowTokenFees",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x3be2a577c218a9e2fca79115ab0381630afc182ee832bcad4011c37d323b4843":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"CoopTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"CoopTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xd19736ba1cd2ffc8c99f90d6c6163e59274d333c89e471cd6668d93849835ac5":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"WowTokenTransfer(address indexed,address indexed,uint256,uint256,uint256,uint256)":{name:"WowTokenTransfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},m=Symbol.for("@ts-pattern/matcher"),i0=Symbol.for("@ts-pattern/isVariadic"),D="@ts-pattern/anonymous-select-key",L=e=>!!(e&&typeof e=="object"),R=e=>e&&!!e[m],h=(e,f,t)=>{if(R(e)){const n=e[m](),{matched:d,selections:i}=n.match(f);return d&&i&&Object.keys(i).forEach(r=>t(r,i[r])),d}if(L(e)){if(!L(f))return!1;if(Array.isArray(e)){if(!Array.isArray(f))return!1;let n=[],d=[],i=[];for(const r of e.keys()){const a=e[r];R(a)&&a[i0]?i.push(a):i.length?d.push(a):n.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<n.length+d.length)return!1;const r=f.slice(0,n.length),a=d.length===0?[]:f.slice(-d.length),s=f.slice(n.length,d.length===0?1/0:-d.length);return n.every((y,N)=>h(y,r[N],t))&&d.every((y,N)=>h(y,a[N],t))&&(i.length===0||h(i[0],s,t))}return e.length===f.length&&e.every((r,a)=>h(r,f[a],t))}return Reflect.ownKeys(e).every(n=>{const d=e[n];return(n in f||R(i=d)&&i[m]().matcherType==="optional")&&h(d,f[n],t);var i})}return Object.is(f,e)},E=e=>{var f,t,n;return L(e)?R(e)?(f=(t=(n=e[m]()).getSelectionKeys)==null?void 0:t.call(n))!=null?f:[]:Array.isArray(e)?B(e,E):B(Object.values(e),E):[]},B=(e,f)=>e.reduce((t,n)=>t.concat(f(n)),[]);function b(e){return Object.assign(e,{optional:()=>r0(e),and:f=>p(e,f),or:f=>a0(e,f),select:f=>f===void 0?M(e):M(f,e)})}function r0(e){return b({[m]:()=>({match:f=>{let t={};const n=(d,i)=>{t[d]=i};return f===void 0?(E(e).forEach(d=>n(d,void 0)),{matched:!0,selections:t}):{matched:h(e,f,n),selections:t}},getSelectionKeys:()=>E(e),matcherType:"optional"})})}function p(...e){return b({[m]:()=>({match:f=>{let t={};const n=(d,i)=>{t[d]=i};return{matched:e.every(d=>h(d,f,n)),selections:t}},getSelectionKeys:()=>B(e,E),matcherType:"and"})})}function a0(...e){return b({[m]:()=>({match:f=>{let t={};const n=(d,i)=>{t[d]=i};return B(e,E).forEach(d=>n(d,void 0)),{matched:e.some(d=>h(d,f,n)),selections:t}},getSelectionKeys:()=>B(e,E),matcherType:"or"})})}function o(e){return{[m]:()=>({match:f=>({matched:!!e(f)})})}}function M(...e){const f=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return b({[m]:()=>({match:n=>{let d={[f??D]:n};return{matched:t===void 0||h(t,n,(i,r)=>{d[i]=r}),selections:d}},getSelectionKeys:()=>[f??D].concat(t===void 0?[]:E(t))})})}function l(e){return typeof e=="number"}function A(e){return typeof e=="string"}function w(e){return typeof e=="bigint"}b(o(function(e){return!0}));const T=e=>Object.assign(b(e),{startsWith:f=>{return T(p(e,(t=f,o(n=>A(n)&&n.startsWith(t)))));var t},endsWith:f=>{return T(p(e,(t=f,o(n=>A(n)&&n.endsWith(t)))));var t},minLength:f=>T(p(e,(t=>o(n=>A(n)&&n.length>=t))(f))),length:f=>T(p(e,(t=>o(n=>A(n)&&n.length===t))(f))),maxLength:f=>T(p(e,(t=>o(n=>A(n)&&n.length<=t))(f))),includes:f=>{return T(p(e,(t=f,o(n=>A(n)&&n.includes(t)))));var t},regex:f=>{return T(p(e,(t=f,o(n=>A(n)&&!!n.match(t)))));var t}});T(o(A));const g=e=>Object.assign(b(e),{between:(f,t)=>g(p(e,((n,d)=>o(i=>l(i)&&n<=i&&d>=i))(f,t))),lt:f=>g(p(e,(t=>o(n=>l(n)&&n<t))(f))),gt:f=>g(p(e,(t=>o(n=>l(n)&&n>t))(f))),lte:f=>g(p(e,(t=>o(n=>l(n)&&n<=t))(f))),gte:f=>g(p(e,(t=>o(n=>l(n)&&n>=t))(f))),int:()=>g(p(e,o(f=>l(f)&&Number.isInteger(f)))),finite:()=>g(p(e,o(f=>l(f)&&Number.isFinite(f)))),positive:()=>g(p(e,o(f=>l(f)&&f>0))),negative:()=>g(p(e,o(f=>l(f)&&f<0)))});g(o(l));const v=e=>Object.assign(b(e),{between:(f,t)=>v(p(e,((n,d)=>o(i=>w(i)&&n<=i&&d>=i))(f,t))),lt:f=>v(p(e,(t=>o(n=>w(n)&&n<t))(f))),gt:f=>v(p(e,(t=>o(n=>w(n)&&n>t))(f))),lte:f=>v(p(e,(t=>o(n=>w(n)&&n<=t))(f))),gte:f=>v(p(e,(t=>o(n=>w(n)&&n>=t))(f))),positive:()=>v(p(e,o(f=>w(f)&&f>0))),negative:()=>v(p(e,o(f=>w(f)&&f<0)))});v(o(w));b(o(function(e){return typeof e=="boolean"}));b(o(function(e){return typeof e=="symbol"}));b(o(function(e){return e==null}));b(o(function(e){return e!=null}));class s0 extends Error{constructor(f){let t;try{t=JSON.stringify(f)}catch{t=f}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=f}}const F={matched:!1,value:void 0};function $(e){return new P(e,F)}class P{constructor(f,t){this.input=void 0,this.state=void 0,this.input=f,this.state=t}with(...f){if(this.state.matched)return this;const t=f[f.length-1],n=[f[0]];let d;f.length===3&&typeof f[1]=="function"?d=f[1]:f.length>2&&n.push(...f.slice(1,f.length-1));let i=!1,r={};const a=(y,N)=>{i=!0,r[y]=N},s=!n.some(y=>h(y,this.input,a))||d&&!d(this.input)?F:{matched:!0,value:t(i?D in r?r[D]:r:this.input,this.input)};return new P(this.input,s)}when(f,t){if(this.state.matched)return this;const n=!!f(this.input);return new P(this.input,n?{matched:!0,value:t(this.input,this.input)}:F)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new s0(this.input)}run(){return this.exhaustive()}returnType(){return this}}var O=(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))(O||{}),q=(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))(q||{}),G=(e=>(e[e.EVENT=0]="EVENT",e[e.FUNC=1]="FUNC",e))(G||{}),z=(e=>(e[e.RAW=0]="RAW",e[e.WAD=1]="WAD",e))(z||{});function j(e){return Array.isArray(e.actionSteps)}const _=class _ extends t0.DeployableTarget{constructor(){super(...arguments),this.abi=I.de}async getActionStep(f,t){return(await this.getActionSteps(t)).at(f)}async getActionSteps(f){const t=await I.qH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return o0(t.map(V))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const t=await I.LH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return V(t)}async execute(f,t){return await this.awaitResult(this.executeRaw(f,t))}async executeRaw(f,t){const{request:n,result:d}=await I.KH(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...t,args:[f]});return{hash:await I.$H(this._config,n),result:d}}async deriveActionClaimantFromTransaction(f,t){if(f.fieldIndex===x.CheatCodes.TX_SENDER_CLAIMANT){if("hash"in t){const d=await S.getTransaction(this._config,{...t,chainId:f.chainid});return t.notBeforeBlockNumber&&d.blockNumber<t.notBeforeBlockNumber?void 0:d.from}if("logs"in t){for(let d of t.logs)if(d.transactionHash){const i=await S.getTransaction(this._config,{...t,hash:d.transactionHash,chainId:f.chainid});return t.notBeforeBlockNumber&&i.blockNumber<t.notBeforeBlockNumber?void 0:i.from}}return}const n=f.signature;if(f.signatureType===0){let d;if(t.abiItem?d=t.abiItem:d=t.knownSignatures[n],!d)throw new u.ValidationAbiMissingError(n);let i;if("logs"in t){for(let s of t.logs){if(!c.isAddressEqual(s.address,f.targetContract))continue;let y=this.validateClaimantAgainstArgs(f,s);if(y)return y}return i}const r=await S.getTransactionReceipt(this._config,{...t,chainId:f.chainid});if(t.notBeforeBlockNumber&&r.blockNumber<t.notBeforeBlockNumber)return;let a;n===x.TRANSFER_SIGNATURE?{decodedLogs:a}=await this.decodeTransferLogs(r):a=r.logs.filter(s=>s.topics[0]===c.toEventSelector(d)).map(s=>W(d,s));for(let s of a){if(!c.isAddressEqual(s.address,f.targetContract))continue;let y=this.validateClaimantAgainstArgs(f,s);if(y)return y}return i}if(f.signatureType===1&&"hash"in t){const d=await S.getTransaction(this._config,{...t,chainId:f.chainid});if(t.notBeforeBlockNumber&&d.blockNumber<t.notBeforeBlockNumber||!c.isAddressEqual(d.to,f.targetContract))return;let i;if(t.abiItem?i=t.abiItem:i=t.knownSignatures[n],!i)throw new u.ValidationAbiMissingError(f.signature);let r;try{r=c.decodeFunctionData({abi:[i],data:d.input})}catch(a){throw new u.FunctionDataDecodeError([i],a)}return this.validateClaimantAgainstArgs(f,r)}}validateClaimantAgainstArgs(f,t){if(!t||!Array.isArray(t==null?void 0:t.args)||(t==null?void 0:t.args.length)<=f.fieldIndex)return;const n=t.args.at(f.fieldIndex);if(c.isAddress(n))return n}async validateActionSteps(f){const t=await this.getActionSteps();for(const n of t)if(!await this.isActionStepValid(n,f))return!1;return!0}async isActionStepValid(f,t){if(f.signatureType===0){const n=f.signature;let d;if(t.abiItem?d=t.abiItem:d=t.knownSignatures[n],!d)throw new u.ValidationAbiMissingError(n);if(this.isArraylikeIndexed(f,d))throw new u.UnparseableAbiParamError(f.actionParameter.fieldIndex,d);if("logs"in t)return this.isActionEventValid(f,t.logs,d);const i=await S.getTransactionReceipt(this._config,{...t,chainId:f.chainid});if(t.notBeforeBlockNumber&&i.blockNumber<t.notBeforeBlockNumber)return!1;if(f.signature===x.TRANSFER_SIGNATURE){const{decodedLogs:a,event:s}=await this.decodeTransferLogs(i);return this.isActionEventValid(f,a,s)}const r=i.logs.filter(a=>a.topics[0]===c.toEventSelector(d)).map(a=>W(d,a));return this.isActionEventValid(f,r,d)}if(f.signatureType===1&&"hash"in t){const n=await S.getTransaction(this._config,{...t,chainId:f.chainid});return t.notBeforeBlockNumber&&n.blockNumber<t.notBeforeBlockNumber?!1:this.isActionFunctionValid(f,n,t)}return!1}isActionEventValid(f,t,n){const d=f.actionParameter;if(!t.length)return!1;for(let i of t)try{if(!Array.isArray(i.args))throw new u.DecodedArgsMalformedError({log:i,criteria:d,fieldValue:void 0});const{value:r,type:a}=this.parseFieldFromAbi(i.args,d.fieldIndex,n.inputs||[],d.fieldType);if(d.fieldType=a,this.validateFieldAgainstCriteria(d,r,{log:i}))return!0}catch{}return!1}async decodeTransferLogs(f){const t=f.logs.filter(d=>d.topics[0]===x.TRANSFER_SIGNATURE),n=structuredClone(d0["Transfer(address indexed,address indexed,uint256 indexed)"]);try{return{decodedLogs:t.map(i=>{const{eventName:r,args:a}=c.decodeEventLog({abi:[n],data:i.data,topics:i.topics});return{...i,eventName:r,args:a}}),event:n}}catch{try{return n.inputs[2].indexed=!1,{decodedLogs:t.map(i=>{const{eventName:r,args:a}=c.decodeEventLog({abi:[n],data:i.data,topics:i.topics});return{...i,eventName:r,args:a}}),event:n}}catch{throw new u.DecodedArgsError("Failed to decode transfer logs")}}}parseFieldFromAbi(f,t,n,d){if(t===x.CheatCodes.ANY_ACTION_PARAM)return{value:c.zeroHash,type:2};if(d!==4){if(!Array.isArray(f)||t>=f.length)throw new u.FieldValueUndefinedError({fieldValue:f,criteria:{filterType:0,fieldType:d,fieldIndex:t,filterData:c.zeroHash}});const r=n[t];if(!r||!r.type)throw new u.UnparseableAbiParamError(t,r);const a=f[t],s=K(r.type);if(s===1&&(typeof a!="string"||!c.isAddress(a)))throw new u.FieldValueUndefinedError({fieldValue:a,criteria:{fieldIndex:t,filterType:0,fieldType:s,filterData:c.zeroHash}});return{value:a,type:s}}const i=Z(t);return Q(f,i,n)}isActionFunctionValid(f,t,n){const d=f.actionParameter,i=f.signature;let r;if(n.abiItem?r=n.abiItem:r=n.knownSignatures[i],!r)throw new u.ValidationAbiMissingError(i);let a;try{a=c.decodeFunctionData({abi:[r],data:t.input})}catch(s){throw new u.FunctionDataDecodeError([r],s)}if(!(a!=null&&a.args))return!1;try{const{value:s,type:y}=this.parseFieldFromAbi(a.args,d.fieldIndex,r.inputs||[],d.fieldType);return d.fieldType=y,this.validateFieldAgainstCriteria(d,s,{decodedArgs:a.args})}catch{return!1}}validateFieldAgainstCriteria(f,t,n){if(f.filterType===0&&f.fieldType===2&&f.fieldIndex===x.CheatCodes.ANY_ACTION_PARAM)return!0;if(f.fieldType===4)throw new u.InvalidTupleDecodingError("Tuples should not be passed into validateFieldAgainstCriteria");const d=f.fieldType;switch(f.filterType){case 0:return $(d).with(1,()=>c.isAddressEqual(f.filterData,t)).with(0,()=>BigInt(t)===BigInt(f.filterData)).with(3,()=>t===c.fromHex(f.filterData,"string")).otherwise(()=>t===f.filterData);case 1:return $(d).with(1,()=>!c.isAddressEqual(f.filterData,t)).with(0,()=>BigInt(t)!==BigInt(f.filterData)).with(5,()=>BigInt(t)!==BigInt(f.filterData)).with(3,()=>t!==c.fromHex(f.filterData,"string")).otherwise(()=>t!==f.filterData);case 2:if(d===0||d===5)return BigInt(t)>BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:t});case 6:if(d===0||d===5)return BigInt(t)>=BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:t});case 3:if(d===0||d===5)return BigInt(t)<BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:t});case 7:if(d===0||d===5)return BigInt(t)<=BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:t});case 4:if(d===2||d===3){let i;return d===3?i=c.fromHex(f.filterData,"string"):i=f.filterData.slice(2),t.includes(i)}throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:t});case 5:if(typeof t!="string")throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:t});if(d===3){const i=c.fromHex(f.filterData,"string");return new RegExp(i).test(t)}default:throw new u.UnrecognizedFilterTypeError({...n,criteria:f,fieldValue:t})}}buildParameters(f,t){const[n,d]=this.validateDeploymentConfig(f,t);let i;if(j(n)){let r=n.actionSteps.filter(s=>!!s);if(r.length===0)throw new u.NoEventActionStepsProvidedError;if(r.length>4)throw new u.TooManyEventActionStepsProvidedError;let a=Array.from({length:4},(s,y)=>r.at(y)||r.at(-1));i={actionClaimant:n.actionClaimant,actionStepOne:a[0],actionStepTwo:a[1],actionStepThree:a[2],actionStepFour:a[3]}}else i=n;return{abi:I.de,bytecode:n0,args:[Y(i)],...this.optionallyAttachAccount(d.account)}}isArraylikeIndexed(f,t){var n;return!!((f.actionParameter.fieldType===3||f.actionParameter.fieldType===2)&&((n=t.inputs[f.actionParameter.fieldIndex])!=null&&n.indexed))}};_.bases={31337:void 0,...e0.EventAction},_.registryType=x.RegistryType.ACTION;let U=_;function u0(e){return e.type==="tuple"||e.type.startsWith("tuple[")}function Q(e,f,t){if(!f.length)throw new u.InvalidTupleDecodingError("No indexes found; cannot parse TUPLE field");const n=f[0]??t.length+1;if(n>=t.length)throw new u.InvalidTupleDecodingError(void 0,n);const d=t[n],i=e[n];if(!u0(d)){const s=K(d.type);return{value:i,type:s}}if(!Array.isArray(i))throw new u.InvalidTupleDecodingError("rawValue is not an array, but param.type is tuple");const r=f.slice(1);if(!r.length)throw new u.InvalidTupleDecodingError(void 0,-1);const a=r[0]??d.components.length+1;if(a>=d.components.length)throw new u.InvalidTupleDecodingError(void 0,a);return Q(i,r,d.components)}function K(e){const f=e.toLowerCase();if(f.startsWith("uint"))return 0;if(f.startsWith("int"))return 5;if(f==="address")return 1;if(f==="bytes"||f.startsWith("bytes"))return 2;if(f==="string")return 3;throw new u.DecodedArgsError(`Unrecognized ABI type: ${e}`)}function o0(e){const f=[],t={};for(let n of e){const d=JSON.stringify(n);t[d]||(f.push(n),t[d]=!0)}return f}function X(e){return{...e,chainid:BigInt(e.chainid)}}function V(e){if(e.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...e,chainid:Number(e.chainid)}}function H(e){const f=e.slice(2);if(f.length===8)return 1;if(f.length===64)return f.slice(0,56)==="0".repeat(56)?1:0;throw new Error("Invalid signature format")}function c0(e){return c.trim(c.pad(e))}function k(e){return{...X(e),signatureType:e.signatureType??H(e.signature),signature:c.pad(e.signature),actionType:e.actionType||0,actionParameter:e.actionParameter.fieldType===0?{...e.actionParameter,filterData:c0(e.actionParameter.filterData)}:e.actionParameter}}function Y({actionClaimant:e,actionStepOne:f,actionStepTwo:t,actionStepThree:n,actionStepFour:d}){return c.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint32",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:{...X(e),signatureType:e.signatureType??H(e.signature),signature:c.pad(e.signature)},actionStepOne:k(f),actionStepTwo:k(t),actionStepThree:k(n),actionStepFour:k(d)}])}function p0(){return{filterType:0,fieldType:2,fieldIndex:x.CheatCodes.ANY_ACTION_PARAM,filterData:c.zeroHash}}function y0(e){return{signatureType:0,signature:c.zeroHash,fieldIndex:x.CheatCodes.TX_SENDER_CLAIMANT,targetContract:c.zeroAddress,chainid:e}}const C=63;function b0(e){if(e.length>5)throw new u.InvalidTupleEncodingError("Can only pack up to 5 indexes.");let f=0;return e.forEach((t,n)=>{if(t>C)throw new u.InvalidTupleEncodingError(`Index ${t} exceeds the maximum allowed value (${C}).`);f|=(t&C)<<n*6}),e.length<5&&(f|=C<<e.length*6),f}function Z(e){const f=[];for(let t=0;t<5;t++){const n=e>>t*6&C;if(n===C)break;f.push(n)}return f}function W(e,f){const t=c.decodeEventLog({abi:[e],data:f.data,topics:f.topics}),n=Array.isArray(t.args)?t.args:Object.values(t.args);if(!e.inputs.some(s=>s.indexed))return{...f,...t};const d=[],i=[];for(let s=0;s<e.inputs.length;s++)e.inputs[s].indexed?d.push(s):i.push(s);const r=Array.from({length:e.inputs.length});let a=0;for(let s=0;s<d.length;s++)r[d[s]]=n[a++];for(let s=0;s<i.length;s++)r[i[s]]=n[a++];return{...f,eventName:t.eventName,args:r}}function l0([e,f]){if(e<0||e>13||f<0||f>13)throw new u.InvalidTupleEncodingError(`Tuple indices must be between 0-13, got: [${e}, ${f}]`);return 32+(e<<4)+f}function J(e){if(e<32||e>253)throw new u.InvalidTupleEncodingError(`Field index must be between 32-253, got: ${e}`);const f=e-32,t=f>>4&15,n=f&15;return[t,n]}function f0(e){return e>=32}function g0(e,f){if(!f0(f))throw new u.DecodedArgsError(`Field index ${f} is invalid. Expected index >= 32`);const[t,n]=J(f);if(t===void 0||n===void 0)throw new u.DecodedArgsError(`Failed to unpack field indexes from ${f}`);if(!e||e.length<=t)throw new u.DecodedArgsError(`Decoded args missing item at index ${t}`);const d=e[t];if(!d||!Array.isArray(d))throw new u.DecodedArgsError(`Expected array at index ${t}, but got ${typeof d}`);if(d.length<=n)throw new u.DecodedArgsError(`index ${n} is out of bounds. tuple length is ${d.length}`);const i=d[n];if(typeof i!="bigint")throw new u.DecodedArgsError(`Expected bigint at tuple index ${n}, but got ${typeof i}`);return i}exports.EventAction=U;exports.FilterType=O;exports.PrimitiveType=q;exports.SignatureType=G;exports.ValueType=z;exports.anyActionParameter=p0;exports.decodeAndReorderLogArgs=W;exports.detectSignatureType=H;exports.getScalarValueFromTuple=g0;exports.isCriteriaFieldIndexTuple=f0;exports.isEventActionPayloadSimple=j;exports.packCriteriaFieldIndexes=l0;exports.packFieldIndexes=b0;exports.prepareEventActionPayload=Y;exports.transactionSenderClaimant=y0;exports.unpackCriteriaFieldIndexes=J;exports.unpackFieldIndexes=Z;
|
|
2
2
|
//# sourceMappingURL=EventAction.cjs.map
|