@dcl/shop 0.1.0-29495843989.commit-0baa544 → 0.1.0-29571500722.commit-8ea45d8
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/assets/{AnimatedBackground-D3Gy9n8c.js → AnimatedBackground-Y-secaKv.js} +3 -3
- package/assets/Assets-sWyggSzY.js +1 -0
- package/assets/Cart-DVt0m7-J.js +1 -0
- package/assets/{CircularProgress-DWai3Bv9.js → CircularProgress-DF1tx4Pz.js} +4 -4
- package/assets/Collection-CxRRuAdy.css +1 -0
- package/assets/Collection-D-dr6oYY.js +1 -0
- package/assets/{ConstantsUtil-rB_9qX5U.js → ConstantsUtil-BTo1-KgH.js} +1 -1
- package/assets/ContentClient-DahG0FsN.js +1 -0
- package/assets/Creator-DJqbQ8AX.css +1 -0
- package/assets/Creator-DpZ1qFEV.js +1 -0
- package/assets/DeploymentBuilder-DCLyMp7S.js +3 -0
- package/assets/{ExchangeController-C9NMWHfu.js → ExchangeController-5UZnaMYm.js} +1 -1
- package/assets/GetCredits-B-2Nu_Cx.js +1 -0
- package/assets/{HelpersUtil-BWtRwz2S.js → HelpersUtil-DsOycveq.js} +1 -1
- package/assets/ImportListings-Ry47KtP_.js +1 -0
- package/assets/ItemDetail-CblzRtB5.js +2 -0
- package/assets/{LoadMore-8Dx5lULo.js → LoadMore-DsKzH4Rv.js} +1 -1
- package/assets/MyAssets-26oYZL-x.js +1 -0
- package/assets/{MyFavorites-CgBszoEh.js → MyFavorites-BfWQjhlL.js} +1 -1
- package/assets/{MyPurchases-DlYgUcz5.js → MyPurchases-DbU97xcR.js} +1 -1
- package/assets/{NetworkUtil-Cm_KFCNa.js → NetworkUtil-DInevqnn.js} +1 -1
- package/assets/{NotFound-Beomq6OS.js → NotFound-CWys1EXA.js} +1 -1
- package/assets/StoreSettings-BsV7iEJX.css +1 -0
- package/assets/StoreSettings-C-yDm4Ah.js +1 -0
- package/assets/Success-CW65bxXN.js +1 -0
- package/assets/{SwapController-D_MhWpcG.js → SwapController-Bau8y3ss.js} +1 -1
- package/assets/TradeService-sWmitO7N.js +1 -0
- package/assets/{W3MFrameProviderSingleton-DzlOG4gc.js → W3MFrameProviderSingleton-BrDTQqcr.js} +3 -3
- package/assets/{WebCryptoP256-Bx70NcxT.js → WebCryptoP256-Clorun9S.js} +1 -1
- package/assets/{basic-XnyRjywq.js → basic-Co2ks3tP.js} +1 -1
- package/assets/{biconomy-C4h3r-aU.js → biconomy-DAm_-Hm_.js} +1 -1
- package/assets/{browser-BMhVVB-A.js → browser-9oFjBwrz.js} +1 -1
- package/assets/browser-ponyfill-DMgE6PM5.js +2 -0
- package/assets/browser-ponyfill-Djb5Py6a.js +1 -0
- package/assets/{buy-gasless-CxJZG2RA.js → buy-gasless-B4g8GiJr.js} +1 -1
- package/assets/buy-y9zg-9gr.js +1 -0
- package/assets/categories-DbX2Gw4H.js +1 -0
- package/assets/categories-FoGfjyVm.css +1 -0
- package/assets/{ccip-CdY2l1_z.js → ccip-B8JdVFq5.js} +1 -1
- package/assets/{ccip-Bnoxu2Lf.js → ccip-i7tJF0Hj.js} +1 -1
- package/assets/{chains-ahXbxt0q.js → chains-BQ5Swd2q.js} +1 -1
- package/assets/collection-CS59m6GL.js +1 -0
- package/assets/{collection-Ds5shVfK.css → collection-CrgnzsVL.css} +1 -1
- package/assets/{common-B5mo5Owz.js → common-CBPtpBt7.js} +1 -1
- package/assets/controller-BVAEs_Ol.js +2 -0
- package/assets/{core-BIaaqL8C.js → core-DXAXZQxt.js} +4 -4
- package/assets/{custom-BrViAam0.js → custom-C00ZS-dv.js} +1 -1
- package/assets/{data-capture-PE-40fOT.js → data-capture-BfGns_F9.js} +1 -1
- package/assets/{decimals-ChbOFqgz.js → decimals-7LZbjdh-.js} +1 -1
- package/assets/decimals-CeoXdXWM.js +1 -0
- package/assets/default-cover-7vUE644d.jpeg +0 -0
- package/assets/{detectExtension-DkJJuvPf.js → detectExtension-C_qqqhXd.js} +1 -1
- package/assets/{email-B8G0iBV_.js → email-10XDB7Ed.js} +1 -1
- package/assets/{embedded-wallet-CBQOWksv.js → embedded-wallet-Coq3FP2j.js} +1 -1
- package/assets/emotion-styled.browser.esm-Col8rSBp.js +1 -0
- package/assets/{engine-D-u2ITDe.js → engine-DNO34GZS.js} +1 -1
- package/assets/{estimate-l1-fee-Ce2XyKSe.js → estimate-l1-fee-ttG5TVsi.js} +1 -1
- package/assets/eth_estimateGas-BiFrKNU-.js +1 -0
- package/assets/{eth_getStorageAt-C6FiR47S.js → eth_getStorageAt-ZjeD4sfh.js} +1 -1
- package/assets/eth_getTransactionCount-BjHbR3QT.js +1 -0
- package/assets/{ethereum-CfGZ1o2B.js → ethereum-CD3dxaW_.js} +1 -1
- package/assets/{ethers-D-4WUfRB.js → ethers-DwWf2RqE.js} +1 -1
- package/assets/events-DQ172AOg.js +1 -0
- package/assets/{extractIPFS-CwQSuIDH.js → extractIPFS-CFw95IDm.js} +1 -1
- package/assets/{features-DHRXuzkb.js → features-BBwkLwo8.js} +2 -2
- package/assets/{fetchTokenMetadata-BnhlOm1g.js → fetchTokenMetadata-BbJeox1b.js} +2 -2
- package/assets/{fortmatic-Be6frCcv.js → fortmatic-DhmlcDbL.js} +1 -1
- package/assets/get-ecosystem-wallet-info-BotVMG7h.js +1 -0
- package/assets/{getBalance-6XZEzEZw.js → getBalance-BVXxyvdU.js} +2 -2
- package/assets/{getInstalledModules-CXEInKkm.js → getInstalledModules-92CJz4J0.js} +1 -1
- package/assets/{getNFT-BdpIOeCP.js → getNFT-6Z-JCPcj.js} +2 -2
- package/assets/{getNFT-NqI0oC5o.js → getNFT-By7tEt1z.js} +1 -1
- package/assets/{hashTypedData-DLdYR8R7.js → hashTypedData-78L5umOY.js} +1 -1
- package/assets/{hashTypedData-eF3tdeXu.js → hashTypedData-UUOD4hvk.js} +1 -1
- package/assets/{import-DxE4fKhA.js → import-BCIlZ3yx.js} +1 -1
- package/assets/in-app-wallet-calls-Dx8qnM7-.js +1 -0
- package/assets/{index-CzpN2YW5.js → index-6jN-_TNa.js} +1 -1
- package/assets/{index-BP31ftNV.js → index-94XD4C5w.js} +1 -1
- package/assets/{index-DaItAVBT.js → index-B0PF-s9M.js} +1 -1
- package/assets/index-B4tMFfvy.js +74 -0
- package/assets/index-B7PXWLXB.js +8 -0
- package/assets/index-BAoHOXze.js +2 -0
- package/assets/{index-Crtrv-sd.js → index-BBZ21lbu.js} +1 -1
- package/assets/{index-Di-Jg-J4.js → index-BVRx9Ot1.js} +1 -1
- package/assets/{index-BNzQ7Yn2.js → index-BYRbnzmu.js} +1 -1
- package/assets/index-BcX-FSIU.css +1 -0
- package/assets/{index-CCNUo_gT.js → index-BlFZSvWx.js} +1 -1
- package/assets/{index-DuNKJP0b.js → index-BlNwDD1i.js} +1 -1
- package/assets/{index-Fy50YzQ3.js → index-BsFR4koq.js} +1 -1
- package/assets/{index-Dn-Bfk0b.js → index-BsVbqXUp.js} +1 -1
- package/assets/{index-pOEGQPZP.js → index-Bsx6GubH.js} +1 -1
- package/assets/index-Bvx0NOxN.js +1 -0
- package/assets/{index-BaSxcMLe.js → index-By6STTNb.js} +1 -1
- package/assets/{index-B4KBZ-30.js → index-C1u3RQ96.js} +40 -40
- package/assets/{index-CpBHoJxI.js → index-C1wVfhuw.js} +1 -1
- package/assets/{index-23lSOtZN.js → index-C3xlbPh_.js} +2 -2
- package/assets/{index-C3kGSCQV.js → index-C4JAp-Oa.js} +3 -3
- package/assets/index-CAMCLJ-3.js +5 -0
- package/assets/{index-CkJXcS4y.js → index-CApcD-t8.js} +1 -1
- package/assets/index-CBWS4Ml_.js +14 -0
- package/assets/{index-D_58xTrv.js → index-CC32N6uw.js} +2 -2
- package/assets/index-CGbJjZCV.js +1 -0
- package/assets/index-CIx1sZmW.js +1 -0
- package/assets/{index-DTePQG0p.js → index-CJD-gYKv.js} +2 -2
- package/assets/{index-BKivAZuY.js → index-CPYtbWCQ.js} +1 -1
- package/assets/{index-BkhvY9_I.js → index-C_x2eFau.js} +3 -3
- package/assets/{index-DbJ9Stq6.js → index-CeR8VFbd.js} +1 -1
- package/assets/{index-BQkCy5n9.js → index-CjpJ162L.js} +1 -1
- package/assets/{index-DHm29hjg.js → index-ClxTTupQ.js} +1 -1
- package/assets/{index-Cn-neAze.js → index-Ct0w7Ogt.js} +1 -1
- package/assets/{index-CKNdoVdY.js → index-D-BMnyQb.js} +1 -1
- package/assets/{index-CJJsswRN.js → index-D7Fx-Qac.js} +1 -1
- package/assets/{index-D2INhRK8.js → index-D8XPW5rW.js} +2 -2
- package/assets/{index-DqJqhCvH.js → index-DFGIa8d3.js} +1 -1
- package/assets/index-DH3Yzbz3.js +1 -0
- package/assets/{index-BINxsZdy.js → index-DHM1o-4K.js} +1 -1
- package/assets/{index-ChYPr03d.js → index-DIYL1_Ov.js} +1 -1
- package/assets/{index-Bxld0u_6.js → index-DKP6gkl4.js} +1 -1
- package/assets/{index-DA3E9stj.js → index-DLXELZQv.js} +1 -1
- package/assets/{index-BeZo1vmU.js → index-DN8pYCNl.js} +1 -1
- package/assets/{index-Ba1nPvJW.js → index-DNGhO1UM.js} +1 -1
- package/assets/{index-CqqCPemC.js → index-DNT62M3w.js} +1 -1
- package/assets/{index-5OA3QXPs.js → index-DPyb1X7J.js} +1 -1
- package/assets/{index-DeXqvind.js → index-DUc6Q2Iz.js} +1 -1
- package/assets/index-DaDHmqAS.js +2 -0
- package/assets/{index-CJzTqBXf.js → index-DcmcHRml.js} +1 -1
- package/assets/{index-BDL22mLG.js → index-Dfn1y1uF.js} +1 -1
- package/assets/{index-CLWAajM1.js → index-DhQcB2cI.js} +1 -1
- package/assets/{index-EkDY0XDC.js → index-DhedohT0.js} +1 -1
- package/assets/{index-BqBn12GD.js → index-DjVz63Zr.js} +1 -1
- package/assets/index-DkjQWYoB.js +2 -0
- package/assets/{index-BYMSEXnr.js → index-Dp3Py-Ws.js} +1 -1
- package/assets/{index-BkZ3OMC_.js → index-Ds-AFLHc.js} +1 -1
- package/assets/{index-DvpyoeV3.js → index-DsVVBfxP.js} +1 -1
- package/assets/{index-C3f3w75X.js → index-KYyY5J5u.js} +1 -1
- package/assets/{index-B86g_TxX.js → index-P4QO1O0D.js} +1 -1
- package/assets/index-QnApYtWL.js +1 -0
- package/assets/{index-9rd0DkIw.js → index-ZvQFinLo.js} +1 -1
- package/assets/{index-DKZ1F35w.js → index-lt7oq_YM.js} +1 -1
- package/assets/{index.es-CKI_PFVB.js → index.es-CNLSXMT-.js} +1 -1
- package/assets/index.es-DGT1W3bC.js +1 -0
- package/assets/{index.es-4xyRJ0dX.js → index.es-EcAKXlCW.js} +4 -4
- package/assets/{localBatchGatewayRequest-KKa4XmPl.js → localBatchGatewayRequest-CUupTU5s.js} +1 -1
- package/assets/{mana-rate-jYuh3Bpg.js → mana-rate-TrkgOUFu.js} +1 -1
- package/assets/{native-8V193B3S.js → native-B49T_qnV.js} +1 -1
- package/assets/network-44dqSlR2.js +1 -0
- package/assets/{networks-HgsFj36f.js → networks-BEAzlz87.js} +1 -1
- package/assets/{onramp-CFBC_-uy.js → onramp-BHjPyFrf.js} +1 -1
- package/assets/{openzeppelin-Dv2ZaH5E.js → openzeppelin-BqEz23oI.js} +1 -1
- package/assets/{ownerOf-C17uE7_W.js → ownerOf-D2Ruvcgr.js} +1 -1
- package/assets/{parseNft-CjOZB3FJ.js → parseNft-C4rXbAm3.js} +2 -2
- package/assets/{parseSignature-B1ph5Hff.js → parseSignature-1_3SuD3y.js} +3 -3
- package/assets/{parseSignature-DPyec4ef.js → parseSignature-B6_wXS1t.js} +1 -1
- package/assets/{pay-with-exchange-ByeSYsXl.js → pay-with-exchange-AvS-iWv3.js} +1 -1
- package/assets/{qr-overlay-Dhx6Fe0G.js → qr-overlay-Di1sYsV2.js} +3 -3
- package/assets/{react-iAgwec9M.js → react-C51i12iP.js} +1 -1
- package/assets/{receive-1DBj48Hd.js → receive-CGzdSteR.js} +1 -1
- package/assets/{resolveImplementation-CwN0iqcw.js → resolveImplementation-CaXsKbDx.js} +1 -1
- package/assets/{rpc-ttcVNFRF.js → rpc-DG-6qjB5.js} +1 -1
- package/assets/secp256k1-B9CXpvLY.js +1 -0
- package/assets/{secp256k1-Bn9D14Kp.js → secp256k1-ChfveZcd.js} +1 -1
- package/assets/secp256k1-DWucSlB-.js +1 -0
- package/assets/{send-CXpW5sHD.js → send-D5cFILBF.js} +1 -1
- package/assets/{send-batch-transaction-DOrDXIAs.js → send-batch-transaction-B3lTEUOF.js} +1 -1
- package/assets/{send-eip712-transaction-Co7_YbJn.js → send-eip712-transaction-ByX_--Vb.js} +2 -2
- package/assets/{send-gasless-transaction-DAbe8qj-.js → send-gasless-transaction-sFztvg-i.js} +2 -2
- package/assets/{sendRawTransaction-ZRWfAJA8.js → sendRawTransaction-CR5Mmi6b.js} +3 -3
- package/assets/{serializeTransaction-eqvsiWFa.js → serializeTransaction-D79jfd3_.js} +1 -1
- package/assets/session-proposal-Cwo9ltsm.js +1 -0
- package/assets/session-request-l_FrHUZo.js +2 -0
- package/assets/{sha256-CDrDGww-.js → sha256-B1PPmRn9.js} +1 -1
- package/assets/{signing-DDwE02O8.js → signing-Sn5rFCHS.js} +5 -5
- package/assets/{socials-BQRxZ0du.js → socials-CqUkp7RR.js} +1 -1
- package/assets/{swaps-_wvKv0dm.js → swaps-hvkTELkc.js} +1 -1
- package/assets/template-cover-1-BETekfHg.jpeg +0 -0
- package/assets/template-cover-2-Dni9s0i_.jpeg +0 -0
- package/assets/{thirdweb-Bf_vE0ea.js → thirdweb-Bfq5h25u.js} +3 -3
- package/assets/{totalSupply-D9Uv0g4N.js → totalSupply-yip6OCLy.js} +1 -1
- package/assets/trade-encoding-42N07h92.js +1 -0
- package/assets/{transactionReceipt-ZV7fu-qH.js → transactionReceipt-DADNrKU6.js} +1 -1
- package/assets/transactions-DQBiQzWz.js +16 -0
- package/assets/{useInfiniteGrid-DldqpHDP.js → useInfiniteGrid-CjcJxtXA.js} +1 -1
- package/assets/useStore-zhFVY9fU.js +2 -0
- package/assets/{utils-DmMVfaK5.js → utils-rl7KiNyp.js} +1 -1
- package/assets/{verifyHash-cttLXwBU.js → verifyHash-CNDR4v8f.js} +1 -1
- package/assets/{w3m-modal-a9MqER_Q.js → w3m-modal-Clo6bKVE.js} +1 -1
- package/assets/{w3m-modal-tF9Sv1xA.js → w3m-modal-GMd0MTV7.js} +1 -1
- package/assets/{wait-for-tx-receipt-C-Gv9HCq.js → wait-for-tx-receipt-uU57b-HM.js} +1 -1
- package/assets/{wallet-kind-DHmwqCrn.js → wallet-kind-PnN45EW0.js} +1 -1
- package/assets/{wallets-DjUCXU7M.js → wallets-CgInyYuE.js} +6 -6
- package/assets/web-connector-DitPEy2c.js +9 -0
- package/assets/{writeContract-CFe8dzYy.js → writeContract-CzZHvjcP.js} +1 -1
- package/assets/{zora-sepolia-6WiqQMBk.js → zora-sepolia-Cmu9LYjr.js} +1 -1
- package/assets/{zoraTestnet-DLxM002k.js → zoraTestnet-l_-faq0L.js} +1 -1
- package/index.html +8 -8
- package/package.json +2 -2
- package/assets/Assets-DM_Z2lkK.js +0 -1
- package/assets/Cart-BX0thVlr.js +0 -1
- package/assets/Collection-rweWV0Uz.js +0 -1
- package/assets/Creator-CP4fBHy7.js +0 -1
- package/assets/GetCredits-B4UFplQh.js +0 -1
- package/assets/ImportListings-D16mAgR-.js +0 -1
- package/assets/ItemDetail-CgUb4pzW.js +0 -2
- package/assets/MyAssets-D8fDqZbL.js +0 -1
- package/assets/SkeletonCards-BhzQlTiQ.js +0 -1
- package/assets/Success-D7IYJbUz.js +0 -1
- package/assets/TradeService-vWJIo6w8.js +0 -1
- package/assets/browser-ponyfill-B39o65AB.js +0 -2
- package/assets/buy-6ch17rLn.js +0 -1
- package/assets/collection-Bfwcw1Pv.js +0 -1
- package/assets/controller-BtgcJEiB.js +0 -2
- package/assets/decimals-bIY5Oj70.js +0 -1
- package/assets/emotion-styled.browser.esm-DKYYKjNd.js +0 -1
- package/assets/eth_estimateGas-Gs01iEix.js +0 -1
- package/assets/eth_getTransactionCount-DWBAGX_2.js +0 -1
- package/assets/get-ecosystem-wallet-info-D2AqnnCA.js +0 -1
- package/assets/in-app-wallet-calls-C93lu0n9.js +0 -1
- package/assets/index-9O17hGpO.js +0 -74
- package/assets/index-B1r6lfiW.js +0 -1
- package/assets/index-Bv7abT8U.js +0 -1
- package/assets/index-BvNQjv1T.js +0 -2
- package/assets/index-CSPamf9F.js +0 -1
- package/assets/index-CpzpQgRm.js +0 -21
- package/assets/index-Ctf6wteV.css +0 -1
- package/assets/index-DTTxIIQh.js +0 -2
- package/assets/index-Dt8dzVyE.js +0 -1
- package/assets/index-EdNSEiRj.js +0 -2
- package/assets/index.es-tHG2pIgS.js +0 -1
- package/assets/network-CEIK-Msp.js +0 -1
- package/assets/secp256k1-BtL81a_K.js +0 -1
- package/assets/secp256k1-CL7k4ogY.js +0 -1
- package/assets/session-proposal-DSrkGWxp.js +0 -1
- package/assets/session-request-Bq16piG3.js +0 -2
- package/assets/trade-encoding-DmF15n2Y.js +0 -1
- package/assets/transactions-xNkbA_iy.js +0 -16
- package/assets/web-connector-DTM8ISyy.js +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as Xt,c as At,a as Et,t as Qt,b as de,w as he,r as P,d as ge,e as we,f as pe,g as be}from"./index.es-EcAKXlCW.js";import"./index-C1u3RQ96.js";import"./react-C51i12iP.js";import"./ethers-DwWf2RqE.js";import"./index-BAoHOXze.js";import"./events-DQ172AOg.js";import"./index-DPyb1X7J.js";import"./index-CjpJ162L.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-CNLSXMT-.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";function me(n,e,t,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(e,t,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(t>>o&s),f=Number(t&s),i=r?4:0,u=r?0:4;n.setUint32(e+i,c,r),n.setUint32(e+u,f,r)}function ye(n,e,t){return n&e^~n&t}function xe(n,e,t){return n&e^n&t^e&t}class Ee extends Xt{constructor(e,t,r,o){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=At(this.buffer)}update(e){Et(this);const{view:t,buffer:r,blockLen:o}=this;e=Qt(e);const s=e.length;for(let c=0;c<s;){const f=Math.min(o-this.pos,s-c);if(f===o){const i=At(e);for(;o<=s-c;c+=o)this.process(i,c);continue}r.set(e.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Et(this),de(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:c}=this;t[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(r,0),c=0);for(let h=c;h<o;h++)t[h]=0;me(r,o-8,BigInt(this.length*8),s),this.process(r,0);const f=At(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=i/4,m=this.get();if(u>m.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<u;h++)f.setUint32(4*h,m[h],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:o,finished:s,destroyed:c,pos:f}=this;return e.length=o,e.pos=f,e.finished=s,e.destroyed=c,o%t&&e.buffer.set(r),e}}const Be=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Q=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),J=new Uint32Array(64);class ve extends Ee{constructor(){super(64,32,8,!1),this.A=Q[0]|0,this.B=Q[1]|0,this.C=Q[2]|0,this.D=Q[3]|0,this.E=Q[4]|0,this.F=Q[5]|0,this.G=Q[6]|0,this.H=Q[7]|0}get(){const{A:e,B:t,C:r,D:o,E:s,F:c,G:f,H:i}=this;return[e,t,r,o,s,c,f,i]}set(e,t,r,o,s,c,f,i){this.A=e|0,this.B=t|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=f|0,this.H=i|0}process(e,t){for(let h=0;h<16;h++,t+=4)J[h]=e.getUint32(t,!1);for(let h=16;h<64;h++){const l=J[h-15],y=J[h-2],N=P(l,7)^P(l,18)^l>>>3,b=P(y,17)^P(y,19)^y>>>10;J[h]=b+J[h-7]+N+J[h-16]|0}let{A:r,B:o,C:s,D:c,E:f,F:i,G:u,H:m}=this;for(let h=0;h<64;h++){const l=P(f,6)^P(f,11)^P(f,25),y=m+l+ye(f,i,u)+Be[h]+J[h]|0,b=(P(r,2)^P(r,13)^P(r,22))+xe(r,o,s)|0;m=u,u=i,i=f,f=c+y|0,c=s,s=o,o=r,r=y+b|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,f=f+this.E|0,i=i+this.F|0,u=u+this.G|0,m=m+this.H|0,this.set(r,o,s,c,f,i,u,m)}roundClean(){J.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Se=he(()=>new ve);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ct=BigInt(0),Jt=BigInt(1),Ae=BigInt(2);function it(n){return n instanceof Uint8Array||ArrayBuffer.isView(n)&&n.constructor.name==="Uint8Array"}function mt(n){if(!it(n))throw new Error("Uint8Array expected")}function at(n,e){if(typeof e!="boolean")throw new Error(n+" boolean expected, got "+e)}const Ie=Array.from({length:256},(n,e)=>e.toString(16).padStart(2,"0"));function ut(n){mt(n);let e="";for(let t=0;t<n.length;t++)e+=Ie[n[t]];return e}function wt(n){const e=n.toString(16);return e.length&1?"0"+e:e}function Zt(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return n===""?Ct:BigInt("0x"+n)}const D={_0:48,_9:57,A:65,F:70,a:97,f:102};function jt(n){if(n>=D._0&&n<=D._9)return n-D._0;if(n>=D.A&&n<=D.F)return n-(D.A-10);if(n>=D.a&&n<=D.f)return n-(D.a-10)}function pt(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);const e=n.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let o=0,s=0;o<t;o++,s+=2){const c=jt(n.charCodeAt(s)),f=jt(n.charCodeAt(s+1));if(c===void 0||f===void 0){const i=n[s]+n[s+1];throw new Error('hex string expected, got non-hex character "'+i+'" at index '+s)}r[o]=c*16+f}return r}function rt(n){return Zt(ut(n))}function Rt(n){return mt(n),Zt(ut(Uint8Array.from(n).reverse()))}function lt(n,e){return pt(n.toString(16).padStart(e*2,"0"))}function Mt(n,e){return lt(n,e).reverse()}function K(n,e,t){let r;if(typeof e=="string")try{r=pt(e)}catch(s){throw new Error(n+" must be hex string or Uint8Array, cause: "+s)}else if(it(e))r=Uint8Array.from(e);else throw new Error(n+" must be hex string or Uint8Array");const o=r.length;if(typeof t=="number"&&o!==t)throw new Error(n+" of length "+t+" expected, got "+o);return r}function bt(...n){let e=0;for(let r=0;r<n.length;r++){const o=n[r];mt(o),e+=o.length}const t=new Uint8Array(e);for(let r=0,o=0;r<n.length;r++){const s=n[r];t.set(s,o),o+=s.length}return t}const It=n=>typeof n=="bigint"&&Ct<=n;function Bt(n,e,t){return It(n)&&It(e)&&It(t)&&e<=n&&n<t}function ot(n,e,t,r){if(!Bt(e,t,r))throw new Error("expected valid "+n+": "+t+" <= n < "+r+", got "+e)}function te(n){let e;for(e=0;n>Ct;n>>=Jt,e+=1);return e}const Vt=n=>(Ae<<BigInt(n-1))-Jt,Nt=n=>new Uint8Array(n),Yt=n=>Uint8Array.from(n);function ee(n,e,t){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let r=Nt(n),o=Nt(n),s=0;const c=()=>{r.fill(1),o.fill(0),s=0},f=(...h)=>t(o,r,...h),i=(h=Nt())=>{o=f(Yt([0]),h),r=f(),h.length!==0&&(o=f(Yt([1]),h),r=f())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let h=0;const l=[];for(;h<e;){r=f();const y=r.slice();l.push(y),h+=r.length}return bt(...l)};return(h,l)=>{c(),i(h);let y;for(;!(y=l(u()));)i();return c(),y}}const Ne={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||it(n),isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,e)=>e.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function yt(n,e,t={}){const r=(o,s,c)=>{const f=Ne[s];if(typeof f!="function")throw new Error("invalid validator function");const i=n[o];if(!(c&&i===void 0)&&!f(i,n))throw new Error("param "+String(o)+" is invalid. Expected "+s+", got "+i)};for(const[o,s]of Object.entries(e))r(o,s,!1);for(const[o,s]of Object.entries(t))r(o,s,!0);return n}function Ut(n){const e=new WeakMap;return(t,...r)=>{const o=e.get(t);if(o!==void 0)return o;const s=n(t,...r);return e.set(t,s),s}}const qe=Object.freeze(Object.defineProperty({__proto__:null,aInRange:ot,abool:at,abytes:mt,bitLen:te,bitMask:Vt,bytesToHex:ut,bytesToNumberBE:rt,bytesToNumberLE:Rt,concatBytes:bt,createHmacDrbg:ee,ensureBytes:K,hexToBytes:pt,hexToNumber:Zt,inRange:Bt,isBytes:it,memoized:Ut,numberToBytesBE:lt,numberToBytesLE:Mt,numberToHexUnpadded:wt,validateObject:yt},Symbol.toStringTag,{value:"Module"}));class ne extends Xt{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,ge(e);const r=Qt(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=e.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),s.fill(0)}update(e){return Et(this),this.iHash.update(e),this}digestInto(e){Et(this),we(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:o,destroyed:s,blockLen:c,outputLen:f}=this;return e=e,e.finished=o,e.destroyed=s,e.blockLen=c,e.outputLen=f,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const re=(n,e,t)=>new ne(n,e).update(t).digest();re.create=(n,e)=>new ne(n,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const z=BigInt(0),_=BigInt(1),nt=BigInt(2),Oe=BigInt(3),_t=BigInt(4),Ft=BigInt(5),Kt=BigInt(8);function V(n,e){const t=n%e;return t>=z?t:e+t}function Le(n,e,t){if(e<z)throw new Error("invalid exponent, negatives unsupported");if(t<=z)throw new Error("invalid modulus");if(t===_)return z;let r=_;for(;e>z;)e&_&&(r=r*n%t),n=n*n%t,e>>=_;return r}function Y(n,e,t){let r=n;for(;e-- >z;)r*=r,r%=t;return r}function Tt(n,e){if(n===z)throw new Error("invert: expected non-zero number");if(e<=z)throw new Error("invert: expected positive modulus, got "+e);let t=V(n,e),r=e,o=z,s=_;for(;t!==z;){const f=r/t,i=r%t,u=o-s*f;r=t,t=i,o=s,s=u}if(r!==_)throw new Error("invert: does not exist");return V(o,e)}function He(n){const e=(n-_)/nt;let t,r,o;for(t=n-_,r=0;t%nt===z;t/=nt,r++);for(o=nt;o<n&&Le(o,e,n)!==n-_;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(r===1){const c=(n+_)/_t;return function(i,u){const m=i.pow(u,c);if(!i.eql(i.sqr(m),u))throw new Error("Cannot find square root");return m}}const s=(t+_)/nt;return function(f,i){if(f.pow(i,e)===f.neg(f.ONE))throw new Error("Cannot find square root");let u=r,m=f.pow(f.mul(f.ONE,o),t),h=f.pow(i,s),l=f.pow(i,t);for(;!f.eql(l,f.ONE);){if(f.eql(l,f.ZERO))return f.ZERO;let y=1;for(let b=f.sqr(l);y<u&&!f.eql(b,f.ONE);y++)b=f.sqr(b);const N=f.pow(m,_<<BigInt(u-y-1));m=f.sqr(N),h=f.mul(h,N),l=f.mul(l,m),u=y}return h}}function Ue(n){if(n%_t===Oe){const e=(n+_)/_t;return function(r,o){const s=r.pow(o,e);if(!r.eql(r.sqr(s),o))throw new Error("Cannot find square root");return s}}if(n%Kt===Ft){const e=(n-Ft)/Kt;return function(r,o){const s=r.mul(o,nt),c=r.pow(s,e),f=r.mul(o,c),i=r.mul(r.mul(f,nt),c),u=r.mul(f,r.sub(i,r.ONE));if(!r.eql(r.sqr(u),o))throw new Error("Cannot find square root");return u}}return He(n)}const _e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Te(n){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=_e.reduce((r,o)=>(r[o]="function",r),e);return yt(n,t)}function ke(n,e,t){if(t<z)throw new Error("invalid exponent, negatives unsupported");if(t===z)return n.ONE;if(t===_)return e;let r=n.ONE,o=e;for(;t>z;)t&_&&(r=n.mul(r,o)),o=n.sqr(o),t>>=_;return r}function ze(n,e){const t=new Array(e.length),r=e.reduce((s,c,f)=>n.is0(c)?s:(t[f]=s,n.mul(s,c)),n.ONE),o=n.inv(r);return e.reduceRight((s,c,f)=>n.is0(c)?s:(t[f]=n.mul(s,t[f]),n.mul(s,c)),o),t}function oe(n,e){const t=e!==void 0?e:n.toString(2).length,r=Math.ceil(t/8);return{nBitLength:t,nByteLength:r}}function ie(n,e,t=!1,r={}){if(n<=z)throw new Error("invalid field: expected ORDER > 0, got "+n);const{nBitLength:o,nByteLength:s}=oe(n,e);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const f=Object.freeze({ORDER:n,isLE:t,BITS:o,BYTES:s,MASK:Vt(o),ZERO:z,ONE:_,create:i=>V(i,n),isValid:i=>{if(typeof i!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof i);return z<=i&&i<n},is0:i=>i===z,isOdd:i=>(i&_)===_,neg:i=>V(-i,n),eql:(i,u)=>i===u,sqr:i=>V(i*i,n),add:(i,u)=>V(i+u,n),sub:(i,u)=>V(i-u,n),mul:(i,u)=>V(i*u,n),pow:(i,u)=>ke(f,i,u),div:(i,u)=>V(i*Tt(u,n),n),sqrN:i=>i*i,addN:(i,u)=>i+u,subN:(i,u)=>i-u,mulN:(i,u)=>i*u,inv:i=>Tt(i,n),sqrt:r.sqrt||(i=>(c||(c=Ue(n)),c(f,i))),invertBatch:i=>ze(f,i),cmov:(i,u,m)=>m?u:i,toBytes:i=>t?Mt(i,s):lt(i,s),fromBytes:i=>{if(i.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+i.length);return t?Rt(i):rt(i)}});return Object.freeze(f)}function se(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const e=n.toString(2).length;return Math.ceil(e/8)}function ce(n){const e=se(n);return e+Math.ceil(e/2)}function Ce(n,e,t=!1){const r=n.length,o=se(e),s=ce(e);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const c=t?Rt(n):rt(n),f=V(c,e-_)+_;return t?Mt(f,o):lt(f,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pt=BigInt(0),xt=BigInt(1);function qt(n,e){const t=e.negate();return n?t:e}function fe(n,e){if(!Number.isSafeInteger(n)||n<=0||n>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+n)}function Ot(n,e){fe(n,e);const t=Math.ceil(e/n)+1,r=2**(n-1);return{windows:t,windowSize:r}}function Ze(n,e){if(!Array.isArray(n))throw new Error("array expected");n.forEach((t,r)=>{if(!(t instanceof e))throw new Error("invalid point at index "+r)})}function Re(n,e){if(!Array.isArray(n))throw new Error("array of scalars expected");n.forEach((t,r)=>{if(!e.isValid(t))throw new Error("invalid scalar at index "+r)})}const Lt=new WeakMap,ae=new WeakMap;function Ht(n){return ae.get(n)||1}function Me(n,e){return{constTimeNegate:qt,hasPrecomputes(t){return Ht(t)!==1},unsafeLadder(t,r,o=n.ZERO){let s=t;for(;r>Pt;)r&xt&&(o=o.add(s)),s=s.double(),r>>=xt;return o},precomputeWindow(t,r){const{windows:o,windowSize:s}=Ot(r,e),c=[];let f=t,i=f;for(let u=0;u<o;u++){i=f,c.push(i);for(let m=1;m<s;m++)i=i.add(f),c.push(i);f=i.double()}return c},wNAF(t,r,o){const{windows:s,windowSize:c}=Ot(t,e);let f=n.ZERO,i=n.BASE;const u=BigInt(2**t-1),m=2**t,h=BigInt(t);for(let l=0;l<s;l++){const y=l*c;let N=Number(o&u);o>>=h,N>c&&(N-=m,o+=xt);const b=y,a=y+Math.abs(N)-1,g=l%2!==0,x=N<0;N===0?i=i.add(qt(g,r[b])):f=f.add(qt(x,r[a]))}return{p:f,f:i}},wNAFUnsafe(t,r,o,s=n.ZERO){const{windows:c,windowSize:f}=Ot(t,e),i=BigInt(2**t-1),u=2**t,m=BigInt(t);for(let h=0;h<c;h++){const l=h*f;if(o===Pt)break;let y=Number(o&i);if(o>>=m,y>f&&(y-=u,o+=xt),y===0)continue;let N=r[l+Math.abs(y)-1];y<0&&(N=N.negate()),s=s.add(N)}return s},getPrecomputes(t,r,o){let s=Lt.get(r);return s||(s=this.precomputeWindow(r,t),t!==1&&Lt.set(r,o(s))),s},wNAFCached(t,r,o){const s=Ht(t);return this.wNAF(s,this.getPrecomputes(s,t,o),r)},wNAFCachedUnsafe(t,r,o,s){const c=Ht(t);return c===1?this.unsafeLadder(t,r,s):this.wNAFUnsafe(c,this.getPrecomputes(c,t,o),r,s)},setWindowSize(t,r){fe(r,e),ae.set(t,r),Lt.delete(t)}}}function Ve(n,e,t,r){if(Ze(t,n),Re(r,e),t.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const o=n.ZERO,s=te(BigInt(t.length)),c=s>12?s-3:s>4?s-2:s?2:1,f=(1<<c)-1,i=new Array(f+1).fill(o),u=Math.floor((e.BITS-1)/c)*c;let m=o;for(let h=u;h>=0;h-=c){i.fill(o);for(let y=0;y<r.length;y++){const N=r[y],b=Number(N>>BigInt(h)&BigInt(f));i[b]=i[b].add(t[y])}let l=o;for(let y=i.length-1,N=o;y>0;y--)N=N.add(i[y]),l=l.add(N);if(m=m.add(l),h!==0)for(let y=0;y<c;y++)m=m.double()}return m}function ue(n){return Te(n.Fp),yt(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...oe(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gt(n){n.lowS!==void 0&&at("lowS",n.lowS),n.prehash!==void 0&&at("prehash",n.prehash)}function je(n){const e=ue(n);yt(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:t,Fp:r,a:o}=e;if(t){if(!r.eql(o,r.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Ye,hexToBytes:Fe}=qe;class Ke extends Error{constructor(e=""){super(e)}}const $={Err:Ke,_tlv:{encode:(n,e)=>{const{Err:t}=$;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length&1)throw new t("tlv.encode: unpadded data");const r=e.length/2,o=wt(r);if(o.length/2&128)throw new t("tlv.encode: long form length too big");const s=r>127?wt(o.length/2|128):"";return wt(n)+s+o+e},decode(n,e){const{Err:t}=$;let r=0;if(n<0||n>256)throw new t("tlv.encode: wrong tag");if(e.length<2||e[r++]!==n)throw new t("tlv.decode: wrong tlv");const o=e[r++],s=!!(o&128);let c=0;if(!s)c=o;else{const i=o&127;if(!i)throw new t("tlv.decode(long): indefinite length not supported");if(i>4)throw new t("tlv.decode(long): byte length is too big");const u=e.subarray(r,r+i);if(u.length!==i)throw new t("tlv.decode: length bytes not complete");if(u[0]===0)throw new t("tlv.decode(long): zero leftmost byte");for(const m of u)c=c<<8|m;if(r+=i,c<128)throw new t("tlv.decode(long): not minimal encoding")}const f=e.subarray(r,r+c);if(f.length!==c)throw new t("tlv.decode: wrong value length");return{v:f,l:e.subarray(r+c)}}},_int:{encode(n){const{Err:e}=$;if(n<W)throw new e("integer: negative integers are not allowed");let t=wt(n);if(Number.parseInt(t[0],16)&8&&(t="00"+t),t.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return t},decode(n){const{Err:e}=$;if(n[0]&128)throw new e("invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return Ye(n)}},toSig(n){const{Err:e,_int:t,_tlv:r}=$,o=typeof n=="string"?Fe(n):n;mt(o);const{v:s,l:c}=r.decode(48,o);if(c.length)throw new e("invalid signature: left bytes after parsing");const{v:f,l:i}=r.decode(2,s),{v:u,l:m}=r.decode(2,i);if(m.length)throw new e("invalid signature: left bytes after parsing");return{r:t.decode(f),s:t.decode(u)}},hexFromSig(n){const{_tlv:e,_int:t}=$,r=e.encode(2,t.encode(n.r)),o=e.encode(2,t.encode(n.s)),s=r+o;return e.encode(48,s)}},W=BigInt(0),k=BigInt(1);BigInt(2);const Dt=BigInt(3);BigInt(4);function Pe(n){const e=je(n),{Fp:t}=e,r=ie(e.n,e.nBitLength),o=e.toBytes||((b,a,g)=>{const x=a.toAffine();return bt(Uint8Array.from([4]),t.toBytes(x.x),t.toBytes(x.y))}),s=e.fromBytes||(b=>{const a=b.subarray(1),g=t.fromBytes(a.subarray(0,t.BYTES)),x=t.fromBytes(a.subarray(t.BYTES,2*t.BYTES));return{x:g,y:x}});function c(b){const{a,b:g}=e,x=t.sqr(b),E=t.mul(x,b);return t.add(t.add(E,t.mul(b,a)),g)}if(!t.eql(t.sqr(e.Gy),c(e.Gx)))throw new Error("bad generator point: equation left != right");function f(b){return Bt(b,k,e.n)}function i(b){const{allowedPrivateKeyLengths:a,nByteLength:g,wrapPrivateKey:x,n:E}=e;if(a&&typeof b!="bigint"){if(it(b)&&(b=ut(b)),typeof b!="string"||!a.includes(b.length))throw new Error("invalid private key");b=b.padStart(g*2,"0")}let q;try{q=typeof b=="bigint"?b:rt(K("private key",b,g))}catch{throw new Error("invalid private key, expected hex or "+g+" bytes, got "+typeof b)}return x&&(q=V(q,E)),ot("private key",q,k,E),q}function u(b){if(!(b instanceof l))throw new Error("ProjectivePoint expected")}const m=Ut((b,a)=>{const{px:g,py:x,pz:E}=b;if(t.eql(E,t.ONE))return{x:g,y:x};const q=b.is0();a==null&&(a=q?t.ONE:t.inv(E));const L=t.mul(g,a),I=t.mul(x,a),B=t.mul(E,a);if(q)return{x:t.ZERO,y:t.ZERO};if(!t.eql(B,t.ONE))throw new Error("invZ was invalid");return{x:L,y:I}}),h=Ut(b=>{if(b.is0()){if(e.allowInfinityPoint&&!t.is0(b.py))return;throw new Error("bad point: ZERO")}const{x:a,y:g}=b.toAffine();if(!t.isValid(a)||!t.isValid(g))throw new Error("bad point: x or y not FE");const x=t.sqr(g),E=c(a);if(!t.eql(x,E))throw new Error("bad point: equation left != right");if(!b.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class l{constructor(a,g,x){if(this.px=a,this.py=g,this.pz=x,a==null||!t.isValid(a))throw new Error("x required");if(g==null||!t.isValid(g))throw new Error("y required");if(x==null||!t.isValid(x))throw new Error("z required");Object.freeze(this)}static fromAffine(a){const{x:g,y:x}=a||{};if(!a||!t.isValid(g)||!t.isValid(x))throw new Error("invalid affine point");if(a instanceof l)throw new Error("projective point not allowed");const E=q=>t.eql(q,t.ZERO);return E(g)&&E(x)?l.ZERO:new l(g,x,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const g=t.invertBatch(a.map(x=>x.pz));return a.map((x,E)=>x.toAffine(g[E])).map(l.fromAffine)}static fromHex(a){const g=l.fromAffine(s(K("pointHex",a)));return g.assertValidity(),g}static fromPrivateKey(a){return l.BASE.multiply(i(a))}static msm(a,g){return Ve(l,r,a,g)}_setWindowSize(a){N.setWindowSize(this,a)}assertValidity(){h(this)}hasEvenY(){const{y:a}=this.toAffine();if(t.isOdd)return!t.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){u(a);const{px:g,py:x,pz:E}=this,{px:q,py:L,pz:I}=a,B=t.eql(t.mul(g,I),t.mul(q,E)),A=t.eql(t.mul(x,I),t.mul(L,E));return B&&A}negate(){return new l(this.px,t.neg(this.py),this.pz)}double(){const{a,b:g}=e,x=t.mul(g,Dt),{px:E,py:q,pz:L}=this;let I=t.ZERO,B=t.ZERO,A=t.ZERO,v=t.mul(E,E),C=t.mul(q,q),U=t.mul(L,L),H=t.mul(E,q);return H=t.add(H,H),A=t.mul(E,L),A=t.add(A,A),I=t.mul(a,A),B=t.mul(x,U),B=t.add(I,B),I=t.sub(C,B),B=t.add(C,B),B=t.mul(I,B),I=t.mul(H,I),A=t.mul(x,A),U=t.mul(a,U),H=t.sub(v,U),H=t.mul(a,H),H=t.add(H,A),A=t.add(v,v),v=t.add(A,v),v=t.add(v,U),v=t.mul(v,H),B=t.add(B,v),U=t.mul(q,L),U=t.add(U,U),v=t.mul(U,H),I=t.sub(I,v),A=t.mul(U,C),A=t.add(A,A),A=t.add(A,A),new l(I,B,A)}add(a){u(a);const{px:g,py:x,pz:E}=this,{px:q,py:L,pz:I}=a;let B=t.ZERO,A=t.ZERO,v=t.ZERO;const C=e.a,U=t.mul(e.b,Dt);let H=t.mul(g,q),j=t.mul(x,L),d=t.mul(E,I),w=t.add(g,x),p=t.add(q,L);w=t.mul(w,p),p=t.add(H,j),w=t.sub(w,p),p=t.add(g,E);let S=t.add(q,I);return p=t.mul(p,S),S=t.add(H,d),p=t.sub(p,S),S=t.add(x,E),B=t.add(L,I),S=t.mul(S,B),B=t.add(j,d),S=t.sub(S,B),v=t.mul(C,p),B=t.mul(U,d),v=t.add(B,v),B=t.sub(j,v),v=t.add(j,v),A=t.mul(B,v),j=t.add(H,H),j=t.add(j,H),d=t.mul(C,d),p=t.mul(U,p),j=t.add(j,d),d=t.sub(H,d),d=t.mul(C,d),p=t.add(p,d),H=t.mul(j,p),A=t.add(A,H),H=t.mul(S,p),B=t.mul(w,B),B=t.sub(B,H),H=t.mul(w,j),v=t.mul(S,v),v=t.add(v,H),new l(B,A,v)}subtract(a){return this.add(a.negate())}is0(){return this.equals(l.ZERO)}wNAF(a){return N.wNAFCached(this,a,l.normalizeZ)}multiplyUnsafe(a){const{endo:g,n:x}=e;ot("scalar",a,W,x);const E=l.ZERO;if(a===W)return E;if(this.is0()||a===k)return this;if(!g||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,a,l.normalizeZ);let{k1neg:q,k1:L,k2neg:I,k2:B}=g.splitScalar(a),A=E,v=E,C=this;for(;L>W||B>W;)L&k&&(A=A.add(C)),B&k&&(v=v.add(C)),C=C.double(),L>>=k,B>>=k;return q&&(A=A.negate()),I&&(v=v.negate()),v=new l(t.mul(v.px,g.beta),v.py,v.pz),A.add(v)}multiply(a){const{endo:g,n:x}=e;ot("scalar",a,k,x);let E,q;if(g){const{k1neg:L,k1:I,k2neg:B,k2:A}=g.splitScalar(a);let{p:v,f:C}=this.wNAF(I),{p:U,f:H}=this.wNAF(A);v=N.constTimeNegate(L,v),U=N.constTimeNegate(B,U),U=new l(t.mul(U.px,g.beta),U.py,U.pz),E=v.add(U),q=C.add(H)}else{const{p:L,f:I}=this.wNAF(a);E=L,q=I}return l.normalizeZ([E,q])[0]}multiplyAndAddUnsafe(a,g,x){const E=l.BASE,q=(I,B)=>B===W||B===k||!I.equals(E)?I.multiplyUnsafe(B):I.multiply(B),L=q(this,g).add(q(a,x));return L.is0()?void 0:L}toAffine(a){return m(this,a)}isTorsionFree(){const{h:a,isTorsionFree:g}=e;if(a===k)return!0;if(g)return g(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:g}=e;return a===k?this:g?g(l,this):this.multiplyUnsafe(e.h)}toRawBytes(a=!0){return at("isCompressed",a),this.assertValidity(),o(l,this,a)}toHex(a=!0){return at("isCompressed",a),ut(this.toRawBytes(a))}}l.BASE=new l(e.Gx,e.Gy,t.ONE),l.ZERO=new l(t.ZERO,t.ONE,t.ZERO);const y=e.nBitLength,N=Me(l,e.endo?Math.ceil(y/2):y);return{CURVE:e,ProjectivePoint:l,normPrivateKeyToScalar:i,weierstrassEquation:c,isWithinCurveOrder:f}}function Ge(n){const e=ue(n);return yt(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function De(n){const e=Ge(n),{Fp:t,n:r}=e,o=t.BYTES+1,s=2*t.BYTES+1;function c(d){return V(d,r)}function f(d){return Tt(d,r)}const{ProjectivePoint:i,normPrivateKeyToScalar:u,weierstrassEquation:m,isWithinCurveOrder:h}=Pe({...e,toBytes(d,w,p){const S=w.toAffine(),O=t.toBytes(S.x),T=bt;return at("isCompressed",p),p?T(Uint8Array.from([w.hasEvenY()?2:3]),O):T(Uint8Array.from([4]),O,t.toBytes(S.y))},fromBytes(d){const w=d.length,p=d[0],S=d.subarray(1);if(w===o&&(p===2||p===3)){const O=rt(S);if(!Bt(O,k,t.ORDER))throw new Error("Point is not on curve");const T=m(O);let R;try{R=t.sqrt(T)}catch(F){const M=F instanceof Error?": "+F.message:"";throw new Error("Point is not on curve"+M)}const Z=(R&k)===k;return(p&1)===1!==Z&&(R=t.neg(R)),{x:O,y:R}}else if(w===s&&p===4){const O=t.fromBytes(S.subarray(0,t.BYTES)),T=t.fromBytes(S.subarray(t.BYTES,2*t.BYTES));return{x:O,y:T}}else{const O=o,T=s;throw new Error("invalid Point, expected length of "+O+", or uncompressed "+T+", got "+w)}}}),l=d=>ut(lt(d,e.nByteLength));function y(d){const w=r>>k;return d>w}function N(d){return y(d)?c(-d):d}const b=(d,w,p)=>rt(d.slice(w,p));class a{constructor(w,p,S){this.r=w,this.s=p,this.recovery=S,this.assertValidity()}static fromCompact(w){const p=e.nByteLength;return w=K("compactSignature",w,p*2),new a(b(w,0,p),b(w,p,2*p))}static fromDER(w){const{r:p,s:S}=$.toSig(K("DER",w));return new a(p,S)}assertValidity(){ot("r",this.r,k,r),ot("s",this.s,k,r)}addRecoveryBit(w){return new a(this.r,this.s,w)}recoverPublicKey(w){const{r:p,s:S,recovery:O}=this,T=I(K("msgHash",w));if(O==null||![0,1,2,3].includes(O))throw new Error("recovery id invalid");const R=O===2||O===3?p+e.n:p;if(R>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");const Z=(O&1)===0?"02":"03",G=i.fromHex(Z+l(R)),F=f(R),M=c(-T*F),st=c(S*F),X=i.BASE.multiplyAndAddUnsafe(G,M,st);if(!X)throw new Error("point at infinify");return X.assertValidity(),X}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new a(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return pt(this.toDERHex())}toDERHex(){return $.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return pt(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}const g={isValidPrivateKey(d){try{return u(d),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const d=ce(e.n);return Ce(e.randomBytes(d),e.n)},precompute(d=8,w=i.BASE){return w._setWindowSize(d),w.multiply(BigInt(3)),w}};function x(d,w=!0){return i.fromPrivateKey(d).toRawBytes(w)}function E(d){const w=it(d),p=typeof d=="string",S=(w||p)&&d.length;return w?S===o||S===s:p?S===2*o||S===2*s:d instanceof i}function q(d,w,p=!0){if(E(d))throw new Error("first arg must be private key");if(!E(w))throw new Error("second arg must be public key");return i.fromHex(w).multiply(u(d)).toRawBytes(p)}const L=e.bits2int||function(d){if(d.length>8192)throw new Error("input is too large");const w=rt(d),p=d.length*8-e.nBitLength;return p>0?w>>BigInt(p):w},I=e.bits2int_modN||function(d){return c(L(d))},B=Vt(e.nBitLength);function A(d){return ot("num < 2^"+e.nBitLength,d,W,B),lt(d,e.nByteLength)}function v(d,w,p=C){if(["recovered","canonical"].some(tt=>tt in p))throw new Error("sign() legacy options not supported");const{hash:S,randomBytes:O}=e;let{lowS:T,prehash:R,extraEntropy:Z}=p;T==null&&(T=!0),d=K("msgHash",d),Gt(p),R&&(d=K("prehashed msgHash",S(d)));const G=I(d),F=u(w),M=[A(F),A(G)];if(Z!=null&&Z!==!1){const tt=Z===!0?O(t.BYTES):Z;M.push(K("extraEntropy",tt))}const st=bt(...M),X=G;function vt(tt){const ct=L(tt);if(!h(ct))return;const St=f(ct),dt=i.BASE.multiply(ct).toAffine(),et=c(dt.x);if(et===W)return;const ht=c(St*c(X+et*F));if(ht===W)return;let gt=(dt.x===et?0:2)|Number(dt.y&k),ft=ht;return T&&y(ht)&&(ft=N(ht),gt^=1),new a(et,ft,gt)}return{seed:st,k2sig:vt}}const C={lowS:e.lowS,prehash:!1},U={lowS:e.lowS,prehash:!1};function H(d,w,p=C){const{seed:S,k2sig:O}=v(d,w,p),T=e;return ee(T.hash.outputLen,T.nByteLength,T.hmac)(S,O)}i.BASE._setWindowSize(8);function j(d,w,p,S=U){var gt;const O=d;w=K("msgHash",w),p=K("publicKey",p);const{lowS:T,prehash:R,format:Z}=S;if(Gt(S),"strict"in S)throw new Error("options.strict was renamed to lowS");if(Z!==void 0&&Z!=="compact"&&Z!=="der")throw new Error("format must be compact or der");const G=typeof O=="string"||it(O),F=!G&&!Z&&typeof O=="object"&&O!==null&&typeof O.r=="bigint"&&typeof O.s=="bigint";if(!G&&!F)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let M,st;try{if(F&&(M=new a(O.r,O.s)),G){try{Z!=="compact"&&(M=a.fromDER(O))}catch(ft){if(!(ft instanceof $.Err))throw ft}!M&&Z!=="der"&&(M=a.fromCompact(O))}st=i.fromHex(p)}catch{return!1}if(!M||T&&M.hasHighS())return!1;R&&(w=e.hash(w));const{r:X,s:vt}=M,tt=I(w),ct=f(vt),St=c(tt*ct),dt=c(X*ct),et=(gt=i.BASE.multiplyAndAddUnsafe(st,St,dt))==null?void 0:gt.toAffine();return et?c(et.x)===X:!1}return{CURVE:e,getPublicKey:x,getSharedSecret:q,sign:H,verify:j,ProjectivePoint:i,Signature:a,utils:g}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $e(n){return{hash:n,hmac:(e,...t)=>re(n,e,be(...t)),randomBytes:pe}}function We(n,e){const t=r=>De({...n,...$e(r)});return{...t(e),create:t}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const le=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),$t=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Xe=BigInt(1),kt=BigInt(2),Wt=(n,e)=>(n+e/kt)/e;function Qe(n){const e=le,t=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),c=BigInt(23),f=BigInt(44),i=BigInt(88),u=n*n*n%e,m=u*u*n%e,h=Y(m,t,e)*m%e,l=Y(h,t,e)*m%e,y=Y(l,kt,e)*u%e,N=Y(y,o,e)*y%e,b=Y(N,s,e)*N%e,a=Y(b,f,e)*b%e,g=Y(a,i,e)*a%e,x=Y(g,f,e)*b%e,E=Y(x,t,e)*m%e,q=Y(E,c,e)*N%e,L=Y(q,r,e)*u%e,I=Y(L,kt,e);if(!zt.eql(zt.sqr(I),n))throw new Error("Cannot find square root");return I}const zt=ie(le,void 0,void 0,{sqrt:Qe}),Je=We({a:BigInt(0),b:BigInt(7),Fp:zt,n:$t,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const e=$t,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Xe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,c=BigInt("0x100000000000000000000000000000000"),f=Wt(s*n,e),i=Wt(-r*n,e);let u=V(n-f*t-i*o,e),m=V(-f*r-i*s,e);const h=u>c,l=m>c;if(h&&(u=e-u),l&&(m=e-m),u>c||m>c)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:h,k1:u,k2neg:l,k2:m}}}},Se);BigInt(0);Je.ProjectivePoint;export{Je as secp256k1};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n as d,r as u,o as Q}from"./class-map-CxwNmq0D.js";import{d as x,r as K,e as G}from"./index-
|
|
1
|
+
import{i as b,b as c}from"./lit-element-B3y9oplH.js";import{n as d,r as u,o as Q}from"./class-map-CxwNmq0D.js";import{d as x,r as K,e as G}from"./index-C4JAp-Oa.js";import{c as v,U as I}from"./index-D7Fx-Qac.js";import"./index-Ds-AFLHc.js";import"./index-C1wVfhuw.js";import"./index-KYyY5J5u.js";import{e as H,n as L}from"./ref-BsAZ42-h.js";import{b as O,C as g,k as V,J as a,R as h,N as E,M as Y,S as y,d as X,n as Z,q as J,V as M,X as q,E as ee}from"./W3MFrameProviderSingleton-BrDTQqcr.js";import"./index-DKP6gkl4.js";import"./index-P4QO1O0D.js";import"./index-Dfn1y1uF.js";import{S as P}from"./SwapController-Bau8y3ss.js";import"./index-DcmcHRml.js";import"./index-ClxTTupQ.js";import"./index-DhedohT0.js";import"./index-DLXELZQv.js";import"./index-C1u3RQ96.js";import"./react-C51i12iP.js";import"./ethers-DwWf2RqE.js";import"./index-BAoHOXze.js";import"./events-DQ172AOg.js";import"./index-DPyb1X7J.js";import"./index-CjpJ162L.js";import"./index-nibyPLVP.js";import"./index-CApcD-t8.js";import"./index.es-CNLSXMT-.js";import"./browser-ponyfill-Djb5Py6a.js";import"./browser-ponyfill-DMgE6PM5.js";import"./NetworkUtil-DInevqnn.js";import"./index-BYRbnzmu.js";import"./async-directive-BRxn_Py3.js";import"./index-ZvQFinLo.js";const te=x`
|
|
2
2
|
:host {
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as w,w as h,x as r}from"./signing-
|
|
1
|
+
import{v as w,w as h,x as r}from"./signing-Sn5rFCHS.js";import{w as u}from"./wait-for-tx-receipt-uU57b-HM.js";async function v(t){const n=await w(t);return u(n)}async function B(t){const{account:n,transactions:s}=t;if(!n)throw new Error("not connected");if(s.length===0)throw new Error("No transactions to send");const o=s[0];if(!o)throw new Error("No transactions to send");if(n.sendBatchTransaction){const e=await Promise.all(s.map(async a=>{const[i,c,d,l]=await Promise.all([h(a),r(a.to),r(a.accessList),r(a.value)]);return{accessList:d,chainId:a.chain.id,data:i,to:c,value:l}}));return{...await n.sendBatchTransaction(e),chain:o.chain,client:o.client}}throw new Error("Account doesn't implement sendBatchTransaction")}export{v as a,B as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signing-
|
|
2
|
-
import{_ as B}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signing-Sn5rFCHS.js","assets/utils-rl7KiNyp.js","assets/ethers-DwWf2RqE.js","assets/react-C51i12iP.js","assets/index-C1u3RQ96.js","assets/index-BcX-FSIU.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as B}from"./index-C1u3RQ96.js";import{B as b,T as h,U as v,u as L,V as m,m as G,W as D,x as P,g as z,t as O,w as S,X as A,Y as M}from"./signing-Sn5rFCHS.js";import{m as $,s as V,t as H}from"./sha256-B1PPmRn9.js";const _=$*32n;class R extends b{constructor({givenLength:e,maxBytecodeSize:a}){super(`Bytecode cannot be longer than ${a} bytes. Given length: ${e}`,{name:"BytecodeLengthExceedsMaxSizeError"})}}class W extends b{constructor({givenLengthInWords:e}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${e}`,{name:"BytecodeLengthInWordsMustBeOddError"})}}class U extends b{constructor({givenLength:e}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${e}`,{name:"BytecodeLengthMustBeDivisibleBy32Error"})}}function k(t){const e=h(t);if(e.length%32!==0)throw new U({givenLength:e.length});if(e.length>_)throw new R({givenLength:e.length,maxBytecodeSize:_});const a=V(e),n=h(a),r=e.length/32;if(r%2===0)throw new W({givenLengthInWords:r});const i=h(r),s=v(i,{size:2}),o=new Uint8Array([1,0]);return n.set(o,0),n.set(s,2),n}function f(t){if(["string","number"].includes(typeof t)&&!Number.isInteger(Number(t)))throw new Error(`Expected value to be an integer to convert to a bigint, got ${t} of type ${typeof t}`);return t instanceof Uint8Array?BigInt(L(t)):BigInt(t)}const x=(t,e)=>typeof t=="bigint"?e(t):Array.isArray(t)?t.map(a=>x(a,e)):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([a,n])=>[a,x(n,e)])):t,T=50000n,N=t=>{const e=X(t);return{domain:{chainId:t.chainId,name:"zkSync",version:"2"},message:e,primaryType:"Transaction",types:{Transaction:[{name:"txType",type:"uint256"},{name:"from",type:"uint256"},{name:"to",type:"uint256"},{name:"gasLimit",type:"uint256"},{name:"gasPerPubdataByteLimit",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymaster",type:"uint256"},{name:"nonce",type:"uint256"},{name:"value",type:"uint256"},{name:"data",type:"bytes"},{name:"factoryDeps",type:"bytes32[]"},{name:"paymasterInput",type:"bytes"}]}}};function X(t){const{gas:e,nonce:a,to:n,from:r,value:i,maxFeePerGas:s,maxPriorityFeePerGas:o,paymaster:d,paymasterInput:u,gasPerPubdata:y,data:g,factoryDeps:p}=t;return{data:g||"0x0",factoryDeps:(p==null?void 0:p.map(c=>m(k(c))))??[],from:BigInt(r),gasLimit:e??0n,gasPerPubdataByteLimit:y??T,maxFeePerGas:s??0n,maxPriorityFeePerGas:o??0n,nonce:a?BigInt(a):0n,paymaster:d?BigInt(d):0n,paymasterInput:u||"0x",to:n?BigInt(n):0n,txType:113n,value:i??0n}}async function C(t){const{account:e,transaction:a}=t,n=await I(t),r=await w({account:e,chainId:a.chain.id,eip712Transaction:n}),i=G(a),s=await D(i,r);return{chain:a.chain,client:a.client,transactionHash:s}}async function w(t){const{account:e,eip712Transaction:a,chainId:n}=t,r=N(a),i=await e.signTypedData({...r});return Y({...a,chainId:n,customSignature:i})}async function I(t){const{account:e,transaction:a}=t,{gas:n,maxFeePerGas:r,maxPriorityFeePerGas:i,gasPerPubdata:s}=await F({from:z(e.address),transaction:a});return{...await O({from:e.address,transaction:{...a,gas:n,maxFeePerGas:r,maxPriorityFeePerGas:i}}),...a.eip712,from:e.address,gasPerPubdata:s}}function Y(t){const{chainId:e,gas:a,nonce:n,to:r,from:i,value:s,maxFeePerGas:o,maxPriorityFeePerGas:d,customSignature:u,factoryDeps:y,paymaster:g,paymasterInput:p,gasPerPubdata:c,data:l}=t,E=[n?m(n):"0x",d?m(d):"0x",o?m(o):"0x",a?m(a):"0x",r??"0x",s?m(s):"0x",l??"0x0",m(e),m(""),m(""),m(e),i??"0x",c?m(c):m(T),y??[],u??"0x",g&&p?[g,p]:[]];return M(["0x71",H(E)])}async function F(t){const{transaction:e,from:a}=t;let[n,r,i,s]=await Promise.all([P(e.gas),P(e.maxFeePerGas),P(e.maxPriorityFeePerGas),P(e.eip712)]),o=s==null?void 0:s.gasPerPubdata;if(n===void 0||r===void 0||i===void 0){const d=G(e),u=await Z({from:a,transaction:e});try{const y=await d({method:"zks_estimateFee",params:[x(u,m)]});n=f(y.gas_limit)*2n,r=f(y.max_fee_per_gas)*2n,i=f(y.max_priority_fee_per_gas)||1n,o=f(y.gas_per_pubdata_limit)*2n,o<50000n&&(o=50000n)}catch{const[{estimateGas:y},{getDefaultGasOverrides:g}]=await Promise.all([B(()=>import("./signing-Sn5rFCHS.js").then(l=>l.cX),__vite__mapDeps([0,1,2,3,4,5])),B(()=>import("./signing-Sn5rFCHS.js").then(l=>l.cV),__vite__mapDeps([0,1,2,3,4,5]))]),[p,c]=await Promise.all([n===void 0?y({transaction:e,from:a}):Promise.resolve(n),g(e.client,e.chain)]);n=p*2n,"maxFeePerGas"in c&&c.maxFeePerGas?r=c.maxFeePerGas*2n:"gasPrice"in c&&c.gasPrice&&(r=c.gasPrice*2n),"maxPriorityFeePerGas"in c&&c.maxPriorityFeePerGas?i=c.maxPriorityFeePerGas:i=1n,o=100000n}}return{gas:n,gasPerPubdata:o,maxFeePerGas:r,maxPriorityFeePerGas:i}}async function Z(t){var d;const{transaction:e,from:a}=t,[n,r,i,s]=await Promise.all([S(e),P(e.to),P(e.value),P(e.eip712)]),o=s==null?void 0:s.gasPerPubdata;return{data:n,eip712Meta:{...s,factoryDeps:(d=s==null?void 0:s.factoryDeps)==null?void 0:d.map(u=>Array.from(A(u))),gasPerPubdata:o||50000n},from:a,gasPerPubdata:o,to:r,type:"0x71",value:i}}const Q=Object.freeze(Object.defineProperty({__proto__:null,getZkGasFees:F,populateEip712Transaction:I,sendEip712Transaction:C,signEip712Transaction:w},Symbol.toStringTag,{value:"Module"}));export{Q as a,I as p,w as s,f as t};
|
package/assets/{send-gasless-transaction-DAbe8qj-.js → send-gasless-transaction-sFztvg-i.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/biconomy-
|
|
2
|
-
import{_ as p}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/biconomy-DAm_-Hm_.js","assets/signing-Sn5rFCHS.js","assets/utils-rl7KiNyp.js","assets/ethers-DwWf2RqE.js","assets/react-C51i12iP.js","assets/index-C1u3RQ96.js","assets/index-BcX-FSIU.css","assets/openzeppelin-BqEz23oI.js","assets/engine-DNO34GZS.js","assets/wait-for-tx-receipt-uU57b-HM.js","assets/transactionReceipt-DADNrKU6.js","assets/sleep-mAKpSMLY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as p}from"./index-C1u3RQ96.js";import{c as d}from"./signing-Sn5rFCHS.js";import"./react-C51i12iP.js";import"./ethers-DwWf2RqE.js";import"./utils-rl7KiNyp.js";async function y({account:i,transaction:e,serializableTransaction:o,gasless:r}){if(o.value&&o.value>0n)throw new Error("Gasless transactions cannot have a value");let n;if(r.provider==="biconomy"){const{relayBiconomyTransaction:t}=await p(async()=>{const{relayBiconomyTransaction:a}=await import("./biconomy-DAm_-Hm_.js");return{relayBiconomyTransaction:a}},__vite__mapDeps([0,1,2,3,4,5,6]));n=await t({account:i,gasless:r,serializableTransaction:o,transaction:e})}if(r.provider==="openzeppelin"){const{relayOpenZeppelinTransaction:t}=await p(async()=>{const{relayOpenZeppelinTransaction:a}=await import("./openzeppelin-BqEz23oI.js");return{relayOpenZeppelinTransaction:a}},__vite__mapDeps([7,1,2,3,4,5,6]));n=await t({account:i,gasless:r,serializableTransaction:o,transaction:e})}if(r.provider==="engine"){const{relayEngineTransaction:t}=await p(async()=>{const{relayEngineTransaction:a}=await import("./engine-DNO34GZS.js");return{relayEngineTransaction:a}},__vite__mapDeps([8,1,2,3,4,5,6,9,10,11]));n=await t({account:i,gasless:r,serializableTransaction:o,transaction:e})}if(!n)throw new Error("Unsupported gasless provider");return d({address:i.address,chainId:e.chain.id,transactionHash:n.transactionHash}),n}export{y as sendGaslessTransaction};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-
|
|
2
|
-
import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as we,an as Je,ao as Re,aj as G,aq as It,ak as Q0,w as Mn,aG as Ye,ap as Ft,h as er,a7 as De,ai as fe,_ as tr,d as nr,al as rr,am as sr,aH as ir,E as Ue,F as mt,c as Xt,n as qt,o as Qt,N as en,I as tn,f as nn,g as rn,G as sn,y as gt,O as Xe,aI as on,as as or,at as ar,aF as cr,ad as an,e as fr,j as ur,u as dr}from"./NetworkUtil-Cm_KFCNa.js";import{_ as On}from"./index-B4KBZ-30.js";function qe(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,i)=>{const o=t(s,i);if(n)for(const a of n)delete o[a];return{...o,...r(s,i)}},type:e})}const Ln={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function St(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?ue(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?ue(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ln[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=lr(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Pa=qe("transaction",St);function lr(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Un(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:St(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Aa=qe("block",Un);function _n(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const br={"0x0":"reverted","0x1":"success"};function hr(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>_n(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ue(e.transactionIndex):null,status:e.status?br[e.status]:null,type:e.type?Ln[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const $a=qe("transactionReceipt",hr),pr={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qe(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=yr(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>j(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=I(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=I(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=I(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=I(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=I(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=I(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=pr[e.type]),typeof e.value<"u"&&(n.value=I(e.value)),n}const Ea=qe("transactionRequest",Qe);function yr(e){return e.map(t=>({address:t.address,r:t.r?I(BigInt(t.r)):t.r,s:t.s?I(BigInt(t.s)):t.s,chainId:I(t.chainId),nonce:I(t.nonce),...typeof t.yParity<"u"?{yParity:I(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:I(t.v)}:{}}))}const va=2n**16n-1n,mr=2n**256n-1n;function Pe(e){return typeof e[0]=="string"?et(e):gr(e)}function gr(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function et(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class cn extends p{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Hn extends p{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class xr extends p{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const wr={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new xr({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Hn({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Tt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(wr);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Pr(e,t="hex"){const n=Nn(e),r=Tt(new Uint8Array(n.length));return n.encode(r),t==="hex"?j(r.bytes):r.bytes}function Nn(e){return Array.isArray(e)?Ar(e.map(t=>Nn(t))):$r(e)}function Ar(e){const t=e.reduce((s,i)=>s+i.length,0),n=jn(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function $r(e){const t=typeof e=="string"?de(e):e,n=jn(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function jn(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new p("Length is too large.")}function kt(e,t="wei"){return X0(e,q0[t])}function Me(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-B8JdVFq5.js","assets/NetworkUtil-DInevqnn.js","assets/ethers-DwWf2RqE.js","assets/react-C51i12iP.js","assets/localBatchGatewayRequest-CUupTU5s.js","assets/index-C1u3RQ96.js","assets/index-BcX-FSIU.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as we,an as Je,ao as Re,aj as G,aq as It,ak as Q0,w as Mn,aG as Ye,ap as Ft,h as er,a7 as De,ai as fe,_ as tr,d as nr,al as rr,am as sr,aH as ir,E as Ue,F as mt,c as Xt,n as qt,o as Qt,N as en,I as tn,f as nn,g as rn,G as sn,y as gt,O as Xe,aI as on,as as or,at as ar,aF as cr,ad as an,e as fr,j as ur,u as dr}from"./NetworkUtil-DInevqnn.js";import{_ as On}from"./index-C1u3RQ96.js";function qe(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,i)=>{const o=t(s,i);if(n)for(const a of n)delete o[a];return{...o,...r(s,i)}},type:e})}const Ln={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function St(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?ue(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?ue(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ln[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=lr(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Pa=qe("transaction",St);function lr(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Un(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:St(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Aa=qe("block",Un);function _n(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const br={"0x0":"reverted","0x1":"success"};function hr(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>_n(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ue(e.transactionIndex):null,status:e.status?br[e.status]:null,type:e.type?Ln[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const $a=qe("transactionReceipt",hr),pr={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Qe(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=yr(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>j(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=I(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=I(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=I(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=I(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=I(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=I(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=pr[e.type]),typeof e.value<"u"&&(n.value=I(e.value)),n}const Ea=qe("transactionRequest",Qe);function yr(e){return e.map(t=>({address:t.address,r:t.r?I(BigInt(t.r)):t.r,s:t.s?I(BigInt(t.s)):t.s,chainId:I(t.chainId),nonce:I(t.nonce),...typeof t.yParity<"u"?{yParity:I(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:I(t.v)}:{}}))}const va=2n**16n-1n,mr=2n**256n-1n;function Pe(e){return typeof e[0]=="string"?et(e):gr(e)}function gr(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function et(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class cn extends p{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Hn extends p{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class xr extends p{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const wr={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new xr({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Hn({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new cn({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Tt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(wr);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Pr(e,t="hex"){const n=Nn(e),r=Tt(new Uint8Array(n.length));return n.encode(r),t==="hex"?j(r.bytes):r.bytes}function Nn(e){return Array.isArray(e)?Ar(e.map(t=>Nn(t))):$r(e)}function Ar(e){const t=e.reduce((s,i)=>s+i.length,0),n=jn(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:i}of e)i(s)}}}function $r(e){const t=typeof e=="string"?de(e):e,n=jn(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function jn(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new p("Length is too large.")}function kt(e,t="wei"){return X0(e,q0[t])}function Me(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
|
|
3
3
|
`)}class Ba extends p{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Er extends p{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Me(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class Ia extends p{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class vr extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Fa extends p{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:s,index:i}){let o="Transaction";r&&i!==void 0&&(o=`Transaction at block time "${r}" at index "${i}"`),t&&i!==void 0&&(o=`Transaction at block hash "${t}" at index "${i}"`),n&&i!==void 0&&(o=`Transaction at block number "${n}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class Sa extends p{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class Ta extends p{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class ka extends p{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function Rn(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>de(i)):e.blobs,s=[];for(const i of r)s.push(Uint8Array.from(t.blobToKzgCommitment(i)));return n==="bytes"?s:s.map(i=>j(i))}function Dn(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>de(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>de(o)):e.commitments,i=[];for(let o=0;o<r.length;o++){const a=r[o],c=s[o];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)))}return n==="bytes"?i:i.map(o=>j(o))}const ye=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Br(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ve(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ae(e,...t){if(!Br(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function za(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Ve(e.outputLen),Ve(e.blockLen)}function We(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Vn(e,t){Ae(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Ir(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function le(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ct(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function V(e,t){return e<<32-t|e>>>t}const Fr=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Sr(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Tr(e){for(let t=0;t<e.length;t++)e[t]=Sr(e[t]);return e}const fn=Fr?e=>e:Tr;function kr(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function zt(e){return typeof e=="string"&&(e=kr(e)),Ae(e),e}function Ca(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];Ae(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}class Wn{}function tt(e){const t=r=>e().update(zt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ga(e=32){if(ye&&typeof ye.getRandomValues=="function")return ye.getRandomValues(new Uint8Array(e));if(ye&&typeof ye.randomBytes=="function")return Uint8Array.from(ye.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function zr(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),i=BigInt(4294967295),o=Number(n>>s&i),a=Number(n&i),c=r?4:0,f=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+f,a,r)}function Cr(e,t,n){return e&t^~e&n}function Gr(e,t,n){return e&t^e&n^t&n}class Kn extends Wn{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=ct(this.buffer)}update(t){We(this),t=zt(t),Ae(t);const{view:n,buffer:r,blockLen:s}=this,i=t.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=ct(t);for(;s<=i-o;o+=s)this.process(c,o);continue}r.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){We(this),Vn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:i}=this;let{pos:o}=this;n[o++]=128,le(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(r,0),o=0);for(let u=o;u<s;u++)n[u]=0;zr(r,s-8,BigInt(this.length*8),i),this.process(r,0);const a=ct(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=c/4,d=this.get();if(f>d.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<f;u++)a.setUint32(4*u,d[u],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:i,destroyed:o,pos:a}=this;return t.destroyed=o,t.finished=i,t.length=s,t.pos=a,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const re=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),L=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),U=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),_e=BigInt(2**32-1),un=BigInt(32);function Mr(e,t=!1){return t?{h:Number(e&_e),l:Number(e>>un&_e)}:{h:Number(e>>un&_e)|0,l:Number(e&_e)|0}}function Zn(e,t=!1){const n=e.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let i=0;i<n;i++){const{h:o,l:a}=Mr(e[i],t);[r[i],s[i]]=[o,a]}return[r,s]}const dn=(e,t,n)=>e>>>n,ln=(e,t,n)=>e<<32-n|t>>>n,me=(e,t,n)=>e>>>n|t<<32-n,ge=(e,t,n)=>e<<32-n|t>>>n,He=(e,t,n)=>e<<64-n|t>>>n-32,Ne=(e,t,n)=>e>>>n-32|t<<64-n,Or=(e,t,n)=>e<<n|t>>>32-n,Lr=(e,t,n)=>t<<n|e>>>32-n,Ur=(e,t,n)=>t<<n-32|e>>>64-n,_r=(e,t,n)=>e<<n-32|t>>>64-n;function J(e,t,n,r){const s=(t>>>0)+(r>>>0);return{h:e+n+(s/2**32|0)|0,l:s|0}}const Hr=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Nr=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,jr=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Rr=(e,t,n,r,s)=>t+n+r+s+(e/2**32|0)|0,Dr=(e,t,n,r,s)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(s>>>0),Vr=(e,t,n,r,s,i)=>t+n+r+s+i+(e/2**32|0)|0,Wr=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),se=new Uint32Array(64);class Kr extends Kn{constructor(t=32){super(64,t,8,!1),this.A=re[0]|0,this.B=re[1]|0,this.C=re[2]|0,this.D=re[3]|0,this.E=re[4]|0,this.F=re[5]|0,this.G=re[6]|0,this.H=re[7]|0}get(){const{A:t,B:n,C:r,D:s,E:i,F:o,G:a,H:c}=this;return[t,n,r,s,i,o,a,c]}set(t,n,r,s,i,o,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,n){for(let u=0;u<16;u++,n+=4)se[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const l=se[u-15],b=se[u-2],h=V(l,7)^V(l,18)^l>>>3,y=V(b,17)^V(b,19)^b>>>10;se[u]=y+se[u-7]+h+se[u-16]|0}let{A:r,B:s,C:i,D:o,E:a,F:c,G:f,H:d}=this;for(let u=0;u<64;u++){const l=V(a,6)^V(a,11)^V(a,25),b=d+l+Cr(a,c,f)+Wr[u]+se[u]|0,y=(V(r,2)^V(r,13)^V(r,22))+Gr(r,s,i)|0;d=f,f=c,c=a,a=o+b|0,o=i,i=s,s=r,r=b+y|0}r=r+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,f=f+this.G|0,d=d+this.H|0,this.set(r,s,i,o,a,c,f,d)}roundClean(){le(se)}destroy(){this.set(0,0,0,0,0,0,0,0),le(this.buffer)}}const Jn=Zn(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Zr=Jn[0],Jr=Jn[1],ie=new Uint32Array(80),oe=new Uint32Array(80);class Yn extends Kn{constructor(t=64){super(128,t,16,!1),this.Ah=U[0]|0,this.Al=U[1]|0,this.Bh=U[2]|0,this.Bl=U[3]|0,this.Ch=U[4]|0,this.Cl=U[5]|0,this.Dh=U[6]|0,this.Dl=U[7]|0,this.Eh=U[8]|0,this.El=U[9]|0,this.Fh=U[10]|0,this.Fl=U[11]|0,this.Gh=U[12]|0,this.Gl=U[13]|0,this.Hh=U[14]|0,this.Hl=U[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:f,El:d,Fh:u,Fl:l,Gh:b,Gl:h,Hh:y,Hl:A}=this;return[t,n,r,s,i,o,a,c,f,d,u,l,b,h,y,A]}set(t,n,r,s,i,o,a,c,f,d,u,l,b,h,y,A){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=f|0,this.El=d|0,this.Fh=u|0,this.Fl=l|0,this.Gh=b|0,this.Gl=h|0,this.Hh=y|0,this.Hl=A|0}process(t,n){for(let m=0;m<16;m++,n+=4)ie[m]=t.getUint32(n),oe[m]=t.getUint32(n+=4);for(let m=16;m<80;m++){const v=ie[m-15]|0,T=oe[m-15]|0,k=me(v,T,1)^me(v,T,8)^dn(v,T,7),P=ge(v,T,1)^ge(v,T,8)^ln(v,T,7),w=ie[m-2]|0,$=oe[m-2]|0,M=me(w,$,19)^He(w,$,61)^dn(w,$,6),S=ge(w,$,19)^Ne(w,$,61)^ln(w,$,6),z=jr(P,S,oe[m-7],oe[m-16]),B=Rr(z,k,M,ie[m-7],ie[m-16]);ie[m]=B|0,oe[m]=z|0}let{Ah:r,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:f,Dl:d,Eh:u,El:l,Fh:b,Fl:h,Gh:y,Gl:A,Hh:x,Hl:E}=this;for(let m=0;m<80;m++){const v=me(u,l,14)^me(u,l,18)^He(u,l,41),T=ge(u,l,14)^ge(u,l,18)^Ne(u,l,41),k=u&b^~u&y,P=l&h^~l&A,w=Dr(E,T,P,Jr[m],oe[m]),$=Vr(w,x,v,k,Zr[m],ie[m]),M=w|0,S=me(r,s,28)^He(r,s,34)^He(r,s,39),z=ge(r,s,28)^Ne(r,s,34)^Ne(r,s,39),B=r&i^r&a^i&a,O=s&o^s&c^o&c;x=y|0,E=A|0,y=b|0,A=h|0,b=u|0,h=l|0,{h:u,l}=J(f|0,d|0,$|0,M|0),f=a|0,d=c|0,a=i|0,c=o|0,i=r|0,o=s|0;const g=Hr(M,z,O);r=Nr(g,$,S,B),s=g|0}({h:r,l:s}=J(this.Ah|0,this.Al|0,r|0,s|0)),{h:i,l:o}=J(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=J(this.Ch|0,this.Cl|0,a|0,c|0),{h:f,l:d}=J(this.Dh|0,this.Dl|0,f|0,d|0),{h:u,l}=J(this.Eh|0,this.El|0,u|0,l|0),{h:b,l:h}=J(this.Fh|0,this.Fl|0,b|0,h|0),{h:y,l:A}=J(this.Gh|0,this.Gl|0,y|0,A|0),{h:x,l:E}=J(this.Hh|0,this.Hl|0,x|0,E|0),this.set(r,s,i,o,a,c,f,d,u,l,b,h,y,A,x,E)}roundClean(){le(ie,oe)}destroy(){le(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Yr extends Yn{constructor(){super(48),this.Ah=L[0]|0,this.Al=L[1]|0,this.Bh=L[2]|0,this.Bl=L[3]|0,this.Ch=L[4]|0,this.Cl=L[5]|0,this.Dh=L[6]|0,this.Dl=L[7]|0,this.Eh=L[8]|0,this.El=L[9]|0,this.Fh=L[10]|0,this.Fl=L[11]|0,this.Gh=L[12]|0,this.Gl=L[13]|0,this.Hh=L[14]|0,this.Hl=L[15]|0}}const Xr=tt(()=>new Kr),Ma=tt(()=>new Yn),Oa=tt(()=>new Yr),qr=Xr;function Qr(e,t){const n=t||"hex",r=qr(we(e,{strict:!1})?Je(e):e);return n==="bytes"?r:Re(r)}function es(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Qr(t,"bytes");return s.set([n],0),r==="bytes"?s:j(s)}function ts(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const i of t)s.push(es({commitment:i,to:r,version:n}));return s}const bn=6,Xn=32,Ct=4096,qn=Xn*Ct,hn=qn*bn-1-1*Ct*bn,ns=1;class rs extends p{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class ss extends p{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class La extends p{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Ua extends p{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${ns}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function is(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?de(e.data):e.data,r=G(n);if(!r)throw new ss;if(r>hn)throw new rs({maxSize:hn,size:r});const s=[];let i=!0,o=0;for(;i;){const a=Tt(new Uint8Array(qn));let c=0;for(;c<Ct;){const f=n.slice(o,o+(Xn-1));if(a.pushByte(0),a.pushBytes(f),f.length<31){a.pushByte(128),i=!1;break}c++,o+=31}s.push(a)}return t==="bytes"?s.map(a=>a.bytes):s.map(a=>j(a.bytes))}function os(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??is({data:t,to:r}),i=e.commitments??Rn({blobs:s,kzg:n,to:r}),o=e.proofs??Dn({blobs:s,commitments:i,kzg:n,to:r}),a=[];for(let c=0;c<s.length;c++)a.push({blob:s[c],commitment:i[c],proof:o[c]});return a}class be extends p{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class xt extends p{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class as extends p{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class cs extends p{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
4
4
|
`),{name:"ChainNotFoundError"})}}class Qn extends p{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class _a extends p{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}const fs=BigInt(0),ke=BigInt(1),us=BigInt(2),ds=BigInt(7),ls=BigInt(256),bs=BigInt(113),e0=[],t0=[],n0=[];for(let e=0,t=ke,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],e0.push(2*(5*r+n)),t0.push((e+1)*(e+2)/2%64);let s=fs;for(let i=0;i<7;i++)t=(t<<ke^(t>>ds)*bs)%ls,t&us&&(s^=ke<<(ke<<BigInt(i))-ke);n0.push(s)}const r0=Zn(n0,!0),hs=r0[0],ps=r0[1],pn=(e,t,n)=>n>32?Ur(e,t,n):Or(e,t,n),yn=(e,t,n)=>n>32?_r(e,t,n):Lr(e,t,n);function ys(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,f=n[c],d=n[c+1],u=pn(f,d,1)^n[a],l=yn(f,d,1)^n[a+1];for(let b=0;b<50;b+=10)e[o+b]^=u,e[o+b+1]^=l}let s=e[2],i=e[3];for(let o=0;o<24;o++){const a=t0[o],c=pn(s,i,a),f=yn(s,i,a),d=e0[o];s=e[d],i=e[d+1],e[d]=c,e[d+1]=f}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=e[o+a];for(let a=0;a<10;a++)e[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=hs[r],e[1]^=ps[r]}le(n)}class Gt extends Wn{constructor(t,n,r,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=i,Ve(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ir(this.state)}clone(){return this._cloneInto()}keccak(){fn(this.state32),ys(this.state32,this.rounds),fn(this.state32),this.posOut=0,this.pos=0}update(t){We(this),t=zt(t),Ae(t);const{blockLen:n,state:r}=this,s=t.length;for(let i=0;i<s;){const o=Math.min(n-this.pos,s-i);for(let a=0;a<o;a++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,(n&128)!==0&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){We(this,!1),Ae(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,i=t.length;s<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-s);t.set(n.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Ve(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Vn(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,le(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:i,enableXOF:o}=this;return t||(t=new Gt(n,r,s,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const ms=(e,t,n)=>tt(()=>new Gt(t,e,n)),gs=ms(1,136,256/8);function Oe(e,t){const n=t||"hex",r=gs(we(e,{strict:!1})?Je(e):e);return n==="bytes"?r:Re(r)}const ft=new It(8192);function nt(e,t){if(ft.has(`${e}.${t}`))return ft.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=Oe(Q0(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(r[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const i=`0x${s.join("")}`;return ft.set(`${e}.${t}`,i),i}function Ha(e,t){if(!K(e,{strict:!1}))throw new be({address:e});return nt(e,t)}const xs=/^0x[a-fA-F0-9]{40}$/,ut=new It(8192);function K(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(ut.has(r))return ut.get(r);const s=xs.test(e)?e.toLowerCase()===e?!0:n?nt(e)===e:!0:!1;return ut.set(r,s),s}function Ke(e,t,n,{strict:r}={}){return we(e,{strict:!1})?ws(e,t,n,{strict:r}):o0(e,t,n,{strict:r})}function s0(e,t){if(typeof t=="number"&&t>0&&t>G(e)-1)throw new Mn({offset:t,position:"start",size:G(e)})}function i0(e,t,n){if(typeof t=="number"&&typeof n=="number"&&G(e)!==n-t)throw new Mn({offset:n,position:"end",size:G(e)})}function o0(e,t,n,{strict:r}={}){s0(e,t);const s=e.slice(t,n);return r&&i0(s,t,n),s}function ws(e,t,n,{strict:r}={}){s0(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&i0(s,t,n),s}function Ps(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Er({transaction:e})}function Na({chain:e,currentChainId:t}){if(!e)throw new cs;if(t!==e.id)throw new as({chain:e,currentChainId:t})}function As({blockNumber:e,chain:t,contract:n}){var s;const r=(s=t==null?void 0:t.contracts)==null?void 0:s[n];if(!r)throw new xt({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new xt({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function he(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class ja extends p{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
5
5
|
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Ra extends p{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}const $s={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Es={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},vs={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function ae(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new _s(e.type);return`${e.name}(${rt(e.inputs,{includeName:t})})`}function rt(e,{includeName:t=!1}={}){return e?e.map(n=>Bs(n,{includeName:t})).join(t?", ":","):""}function Bs(e,{includeName:t}){return e.type.startsWith("tuple")?`(${rt(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Is extends p{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
@@ -33,4 +33,4 @@ import{aa as ue,$ as j,af as I,B as p,a9 as de,a4 as X0,a2 as q0,a3 as W,ac as w
|
|
|
33
33
|
`).slice(0,-1)}class to extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l,stateOverride:b}){var A;const h=n?he(n):void 0;let y=Me({from:h==null?void 0:h.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((A=s==null?void 0:s.nativeCurrency)==null?void 0:A.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});b&&(y+=`
|
|
34
34
|
${eo(b)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class no extends p{constructor(t,{abi:n,args:r,contractAddress:s,docsPath:i,functionName:o,sender:a}){const c=Nt({abi:n,args:r,name:o}),f=c?E0({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,d=c?ae(c,{includeName:!0}):void 0,u=Me({address:s&&ir(s),function:d,args:f&&f!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${f}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],u&&"Contract Call:",u].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=s,this.functionName=o,this.sender=a}}class ro extends p{constructor({abi:t,data:n,functionName:r,message:s,cause:i}){let o,a,c,f;if(n&&n!=="0x")try{a=Xi({abi:t,data:n,cause:i});const{abiItem:u,errorName:l,args:b}=a;if(l==="Error")f=b[0];else if(l==="Panic"){const[h]=b;f=$s[h]}else{const h=u?ae(u,{includeName:!0}):void 0,y=u&&b?E0({abiItem:u,args:b,includeFunctionName:!1,includeName:!1}):void 0;c=[h?`Error: ${h}`:"",y&&y!=="()"?` ${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(u){o=u}else s&&(f=s);let d;o instanceof c0&&(d=o.signature,c=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${d}.`]),super(f&&f!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,f||d].join(`
|
|
35
35
|
`):`The contract function "${r}" reverted.`,{cause:o??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.raw=n,this.reason=f,this.signature=d}}class so extends p{constructor({functionName:t,cause:n}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:n})}}class io extends p{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class B0 extends p{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}function jt(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof p?e.walk(s=>(s==null?void 0:s.code)===Ue.code):e;return r instanceof p?new Ue({cause:e,message:r.details}):Ue.nodeMessage.test(n)?new Ue({cause:e,message:e.details}):mt.nodeMessage.test(n)?new mt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Xt.nodeMessage.test(n)?new Xt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):qt.nodeMessage.test(n)?new qt({cause:e,nonce:t==null?void 0:t.nonce}):Qt.nodeMessage.test(n)?new Qt({cause:e,nonce:t==null?void 0:t.nonce}):en.nodeMessage.test(n)?new en({cause:e,nonce:t==null?void 0:t.nonce}):tn.nodeMessage.test(n)?new tn({cause:e}):nn.nodeMessage.test(n)?new nn({cause:e,gas:t==null?void 0:t.gas}):rn.nodeMessage.test(n)?new rn({cause:e,gas:t==null?void 0:t.gas}):sn.nodeMessage.test(n)?new sn({cause:e}):gt.nodeMessage.test(n)?new gt({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Xe({cause:e})}function oo(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new to(r,{docsPath:t,...n})}function Rt(e,{format:t}){if(!t)return{};const n={};function r(i){const o=Object.keys(i);for(const a of o)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a])}const s=t(e||{});return r(s),n}function it(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:s}=e,i=t?he(t):void 0;if(i&&!K(i.address))throw new be({address:i.address});if(s&&!K(s))throw new be({address:s});if(n&&n>mr)throw new mt({maxFeePerGas:n});if(r&&n&&r>n)throw new gt({maxFeePerGas:n,maxPriorityFeePerGas:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dt=BigInt(0),vt=BigInt(1);function Vt(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Wt(e){if(!Vt(e))throw new Error("Uint8Array expected")}function tc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function nc(e){const t=e.toString(16);return t.length&1?"0"+t:t}function I0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Dt:BigInt("0x"+e)}const F0=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ao=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function S0(e){if(Wt(e),F0)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=ao[e[n]];return t}const Y={_0:48,_9:57,A:65,F:70,a:97,f:102};function An(e){if(e>=Y._0&&e<=Y._9)return e-Y._0;if(e>=Y.A&&e<=Y.F)return e-(Y.A-10);if(e>=Y.a&&e<=Y.f)return e-(Y.a-10)}function T0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(F0)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,i=0;s<n;s++,i+=2){const o=An(e.charCodeAt(i)),a=An(e.charCodeAt(i+1));if(o===void 0||a===void 0){const c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[s]=o*16+a}return r}function rc(e){return I0(S0(e))}function sc(e){return Wt(e),I0(S0(Uint8Array.from(e).reverse()))}function co(e,t){return T0(e.toString(16).padStart(t*2,"0"))}function ic(e,t){return co(e,t).reverse()}function oc(e,t,n){let r;if(typeof t=="string")try{r=T0(t)}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Vt(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}function fo(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];Wt(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function uo(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const lt=e=>typeof e=="bigint"&&Dt<=e;function lo(e,t,n){return lt(e)&<(t)&<(n)&&t<=e&&e<n}function ac(e,t,n,r){if(!lo(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function cc(e){let t;for(t=0;e>Dt;e>>=vt,t+=1);return t}const fc=e=>(vt<<BigInt(e))-vt,bt=e=>new Uint8Array(e),$n=e=>Uint8Array.from(e);function uc(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=bt(e),s=bt(e),i=0;const o=()=>{r.fill(1),s.fill(0),i=0},a=(...u)=>n(s,r,...u),c=(u=bt(0))=>{s=a($n([0]),u),r=a(),u.length!==0&&(s=a($n([1]),u),r=a())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const l=[];for(;u<t;){r=a();const b=r.slice();l.push(b),u+=r.length}return fo(...l)};return(u,l)=>{o(),c(u);let b;for(;!(b=l(f()));)c();return o(),b}}const bo={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Vt(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function dc(e,t,n={}){const r=(s,i,o)=>{const a=bo[i];if(typeof a!="function")throw new Error("invalid validator function");const c=e[s];if(!(o&&c===void 0)&&!a(c,e))throw new Error("param "+String(s)+" is invalid. Expected "+i+", got "+c)};for(const[s,i]of Object.entries(t))r(s,i,!1);for(const[s,i]of Object.entries(n))r(s,i,!0);return e}function lc(e){const t=new WeakMap;return(n,...r)=>{const s=t.get(n);if(s!==void 0)return s;const i=e(n,...r);return t.set(n,i),i}}const ho="0.1.1";function po(){return ho}class F extends Error{static setStaticOptions(t){F.prototype.docsOrigin=t.docsOrigin,F.prototype.showVersion=t.showVersion,F.prototype.version=t.version}constructor(t,n={}){const r=(()=>{var d;if(n.cause instanceof F){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(d=n.cause)!=null&&d.message?n.cause.message:n.details})(),s=n.cause instanceof F&&n.cause.docsPath||n.docsPath,i=n.docsOrigin??F.prototype.docsOrigin,o=`${i}${s??""}`,a=!!(n.version??F.prototype.showVersion),c=n.version??F.prototype.version,f=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||s||a?["",r?`Details: ${r}`:void 0,s?`See: ${o}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(d=>typeof d=="string").join(`
|
|
36
|
-
`);super(f,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=o,this.docsOrigin=i,this.docsPath=s,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return k0(this,t)}}Object.defineProperty(F,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${po()}`}});F.setStaticOptions(F.defaultStaticOptions);function k0(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?k0(e.cause,t):t?null:e}function Be(e,t){if(vn(e)>t)throw new So({givenSize:vn(e),maxSize:t})}const X={zero:48,nine:57,A:65,F:70,a:97,f:102};function En(e){if(e>=X.zero&&e<=X.nine)return e-X.zero;if(e>=X.A&&e<=X.F)return e-(X.A-10);if(e>=X.a&&e<=X.f)return e-(X.a-10)}function yo(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new To({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const o=n==="right";s[o?i:r-i-1]=e[o?i:e.length-i-1]}return s}function z0(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function ot(e,t){if(Ee(e)>t)throw new Oo({givenSize:Ee(e),maxSize:t})}function mo(e,t){if(typeof t=="number"&&t>0&&t>Ee(e)-1)throw new H0({offset:t,position:"start",size:Ee(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ee(e)!==n-t)throw new H0({offset:n,position:"end",size:Ee(e)})}function C0(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new Lo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function xo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const wo="#__bigint";function G0(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+wo:s,n)}const Po=new TextDecoder,Ao=new TextEncoder;function $o(e){if(!(e instanceof Uint8Array)){if(!e)throw new je(e);if(typeof e!="object")throw new je(e);if(!("BYTES_PER_ELEMENT"in e))throw new je(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new je(e)}}function bc(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function hc(e){return e instanceof Uint8Array?e:typeof e=="string"?M0(e):Eo(e)}function Eo(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function M0(e,t={}){const{size:n}=t;let r=e;n&&(ot(e,n),r=U0(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,o=new Uint8Array(i);for(let a=0,c=0;a<i;a++){const f=En(s.charCodeAt(c++)),d=En(s.charCodeAt(c++));if(f===void 0||d===void 0)throw new F(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[a]=f<<4|d}return o}function pc(e,t={}){const{size:n}=t,r=Ao.encode(e);return typeof n=="number"?(Be(r,n),vo(r,n)):r}function yc(e,t){return uo(e,t)}function vo(e,t){return yo(e,{dir:"right",size:t})}function Bo(e){return crypto.getRandomValues(new Uint8Array(e))}function vn(e){return e.length}function mc(e,t,n,r={}){const{strict:s}=r;return e.slice(t,n)}function gc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return _0(r,t)}function xc(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Be(r,n),r=Io(r)),r.length>1||r[0]>1)throw new Fo(r);return!!r[0]}function wc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return Go(r,t)}function Pc(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Be(r,n),r=O0(r)),Po.decode(r)}function Io(e){return z0(e,{dir:"left"})}function O0(e){return z0(e,{dir:"right"})}function Ac(e){try{return $o(e),!0}catch{return!1}}class Fo extends F{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class je extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let So=class extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},To=class extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const ko=new TextEncoder,zo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Co(e,t={}){const{strict:n=!1}=t;if(!e)throw new Bn(e);if(typeof e!="string")throw new Bn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new In(e);if(!e.startsWith("0x"))throw new In(e)}function vc(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Bc(e){return e instanceof Uint8Array?$e(e):Array.isArray(e)?$e(new Uint8Array(e)):e}function Ic(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ot(n,t.size),L0(n,t.size)):n}function $e(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=zo[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ot(r,t.size),U0(r,t.size)):r}function q(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&s>i||s<o){const f=typeof e=="bigint"?"n":"";throw new Mo({max:i?`${i}${f}`:void 0,min:`${o}${f}`,signed:n,size:r,value:`${e}${f}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?L0(c,r):c}function Fc(e,t={}){return $e(ko.encode(e),t)}function L0(e,t){return C0(e,{dir:"left",size:t})}function U0(e,t){return C0(e,{dir:"right",size:t})}function Sc(e){return $e(Bo(e))}function Tc(e,t,n,r={}){const{strict:s}=r;mo(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(i,t,n),i}function Ee(e){return Math.ceil((e.length-2)/2)}function kc(e){return xo(e,{dir:"left"})}function _0(e,t={}){const{signed:n}=t;t.size&&ot(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,i=(1n<<BigInt(s)*8n)-1n,o=i>>1n;return r<=o?r:r-i-1n}function Go(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:_0(e,t))}function zc(e,t={}){const{size:n}=t;let r=M0(e);return n&&(Be(r,n),r=O0(r)),new TextDecoder().decode(r)}function Cc(e,t={}){const{strict:n=!1}=t;try{return Co(e,{strict:n}),!0}catch{return!1}}class Mo extends F{constructor({max:t,min:n,signed:r,size:s,value:i}){super(`Number \`${i}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class Bn extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class In extends F{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class Gc extends F{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Oo extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class H0 extends F{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class Lo extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Kt(e){const{blockHash:t,blockNumber:n,blockTag:r,requireCanonical:s}=e;if(s!==void 0&&!t)throw new p("`requireCanonical` can only be provided when `blockHash` is set.");return t?s?{blockHash:t,requireCanonical:s}:{blockHash:t}:typeof n=="bigint"?I(n):r??"latest"}const Uo="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_o="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Mc="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ho="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ht="/docs/contract/encodeDeployData";function N0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Is({docsPath:ht});if(!("inputs"in s))throw new mn({docsPath:ht});if(!s.inputs||s.inputs.length===0)throw new mn({docsPath:ht});const i=$0(s.inputs,n);return et([r,i])}const Fn="/docs/contract/encodeFunctionData";function No(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const i=Nt({abi:t,args:n,name:r});if(!i)throw new Ze(r,{docsPath:Fn});s=i}if(s.type!=="function")throw new Ze(void 0,{docsPath:Fn});return{abi:[s],functionName:Ot(ae(s))}}function jo(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:No(e)})(),s=n[0],i=r,o="inputs"in s&&s.inputs?$0(s.inputs,t??[]):void 0;return et([i,o??"0x"])}function j0(e,t){if(!K(e,{strict:!1}))throw new be({address:e});if(!K(t,{strict:!1}))throw new be({address:t});return e.toLowerCase()===t.toLowerCase()}function Ro(e){const t=Oe(`0x${e.substring(4)}`).substring(26);return nt(`0x${t}`)}async function Do({hash:e,signature:t}){const n=we(e)?e:Re(e),{secp256k1:r}=await On(async()=>{const{secp256k1:o}=await import("./secp256k1-Bn9D14Kp.js").then(a=>a.a);return{secp256k1:o}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:d,v:u,yParity:l}=t,b=Number(l??u),h=Sn(b);return new r.Signature(De(f),De(d)).addRecoveryBit(h)}const o=we(t)?t:Re(t);if(G(o)!==65)throw new Error("invalid signature length");const a=ue(`0x${o.slice(130)}`),c=Sn(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Sn(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vo({hash:e,signature:t}){return Ro(await Do({hash:e,signature:t}))}function Wo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,i=Oe(et(["0x05",Pr([t?I(t):"0x",s,n?I(n):"0x"])]));return r==="bytes"?de(i):i}async function Ko(e){const{authorization:t,signature:n}=e;return Vo({hash:Wo(t),signature:n??t})}function N(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:i=>t(e,i)}function Zo(e){return{address:e.address,amount:q(e.amount),index:q(e.index),validatorIndex:q(e.validatorIndex)}}function Jo(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:q(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:q(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:q(e.gasLimit)},...typeof e.number=="bigint"&&{number:q(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:q(e.prevRandao)},...typeof e.time=="bigint"&&{time:q(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Zo)}}}const Yo="0x82ad56cb",pt="/docs/contract/decodeFunctionResult";function Xo(e){const{abi:t,args:n,functionName:r,data:s}=e;let i=t[0];if(r){const a=Nt({abi:t,args:n,name:r});if(!a)throw new Ze(r,{docsPath:pt});i=a}if(i.type!=="function")throw new Ze(void 0,{docsPath:pt});if(!i.outputs)throw new Cs(i.name,{docsPath:pt});const o=st(i.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function Tn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new on({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new on({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function qo(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:i}=e,o={};if(i!==void 0&&(o.code=i),t!==void 0&&(o.balance=I(t)),n!==void 0&&(o.nonce=I(n)),r!==void 0&&(o.state=Tn(r)),s!==void 0){if(o.state)throw new Qi;o.stateDiff=Tn(s)}return o}function R0(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!K(n,{strict:!1}))throw new be({address:n});if(t[n])throw new qi({address:n});t[n]=qo(r)}return t}async function Oc(e,t){var Z,C,Ie,Fe,ce,Se;const{account:n=e.account,authorizationList:r,batch:s=!!((Z=e.batch)!=null&&Z.multicall),blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:f,blobs:d,blockOverrides:u,code:l,data:b,factory:h,factoryData:y,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,requestOptions:k,to:P,value:w,stateOverride:$,...M}=t,S=n?he(n):void 0;if(l&&(h||y))throw new p("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&P)throw new p("Cannot provide both `code` & `to` as parameters.");const z=l&&b,B=h&&y&&P&&b,O=z||B,g=z?V0({code:l,data:b}):B?sa({data:b,factory:h,factoryData:y,to:P}):b;try{it(t);const te=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),H=u?Jo(u):void 0,ne=R0($),Le=(Fe=(Ie=(C=e.chain)==null?void 0:C.formatters)==null?void 0:Ie.transactionRequest)==null?void 0:Fe.format,Te=(Le||Qe)({...Rt(M,{format:Le}),accessList:f,account:S,authorizationList:r,blobs:d,data:g,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,to:O?void 0:P,value:w},"call");if(s&&Qo({request:Te})&&!H&&i===void 0)try{const{deployless:D=!1}=typeof((ce=e.batch)==null?void 0:ce.multicall)=="object"?e.batch.multicall:{},at=D0(e,{blockNumber:o,deployless:D});if(!at||!ra(ne,at))return await na(e,{...Te,blockHash:i,blockNumber:o,blockTag:a,multicallAddress:at,requestOptions:k,requireCanonical:c,rpcStateOverride:ne})}catch(D){if(!(D instanceof Qn)&&!(D instanceof xt))throw D}const Y0=(()=>{const D=[Te,te];return ne&&H?[...D,ne,H]:ne?[...D,ne]:H?[...D,{},H]:D})(),Yt=await e.request({method:"eth_call",params:Y0},k);return Yt==="0x"?{data:void 0}:{data:Yt}}catch(te){if((Se=k==null?void 0:k.signal)!=null&&Se.aborted)throw or(k.signal);if(ar(te))throw te;const H=ia(te),{offchainLookup:ne,offchainLookupSignature:Le}=await On(async()=>{const{offchainLookup:Jt,offchainLookupSignature:Te}=await import("./ccip-CdY2l1_z.js");return{offchainLookup:Jt,offchainLookupSignature:Te}},__vite__mapDeps([0,1,2,3,4,5,6]));if(e.ccipRead!==!1&&(H==null?void 0:H.slice(0,10))===Le&&P)return{data:await ne(e,{data:H,requestOptions:k,to:P})};throw O&&(H==null?void 0:H.slice(0,10))==="0x101bb98d"?new io({factory:h}):oo(te,{...t,account:S,chain:e.chain})}}function Qo({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Yo)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}let ea=0;const kn=new WeakMap;function ta(e){if(!e)return"default";const t=kn.get(e);if(t!==void 0)return t;const n=ea++;return kn.set(e,n),n}async function na(e,t){var T;const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof((T=e.batch)==null?void 0:T.multicall)=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:f,multicallAddress:d,requestOptions:u,rpcStateOverride:l,to:b}=t,h=d!==void 0?d:D0(e,{blockNumber:o,deployless:r}),y=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),A=typeof y=="string"?y:JSON.stringify(y),x=l?`.${JSON.stringify(l)}`:"",{schedule:E}=cr({id:`${e.uid}.${A}.${ta(u)}${x}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:$})=>w+($.length-2),0)>n*2},fn:async k=>{const P=k.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),w=jo({abi:an,args:[P],functionName:"aggregate3"}),$={...h===null?{data:V0({code:Ho,data:w})}:{to:h,data:w}},M=await e.request({method:"eth_call",params:l?[$,y,l]:[$,y]},u);return Xo({abi:an,args:[P],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:m,success:v}]=await E({data:f,to:b});if(!v)throw new B0({data:m});return m==="0x"?{data:void 0}:{data:m}}function D0(e,t){const{blockNumber:n,deployless:r}=t;if(r)return null;if(e.chain)return As({blockNumber:n,chain:e.chain,contract:"multicall3"});throw new Qn}function ra(e,t){return e?Object.keys(e).some(n=>j0(n,t)):!1}function V0(e){const{code:t,data:n}=e;return N0({abi:P0(["constructor(bytes, bytes)"]),bytecode:Uo,args:[t,n]})}function sa(e){const{data:t,factory:n,factoryData:r,to:s}=e;return N0({abi:P0(["constructor(address, bytes, address, bytes)"]),bytecode:_o,args:[s,t,n,r]})}function ia(e){var n;if(!(e instanceof p))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}const oa=3;function Lc(e,{abi:t,address:n,args:r,docsPath:s,functionName:i,sender:o}){const a=e instanceof B0?e:e instanceof p?e.walk(h=>"data"in h)||e.walk():{},{code:c,data:f,details:d,message:u,shortMessage:l}=a,b=e instanceof Mt?new so({functionName:i,cause:e}):[oa,fr.code].includes(c)&&(f||d||u||l)||c===ur.code&&d==="execution reverted"&&f?new ro({abi:t,data:typeof f=="object"?f.data:f,functionName:i,message:a instanceof dr?d:l??u,cause:e}):e;return new no(b,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:i,sender:o})}const zn="/docs/contract/decodeEventLog";function Cn(e){const{abi:t,data:n,strict:r,topics:s}=e,i=r??!0,[o,...a]=s;if(!o)throw new ks({docsPath:zn});const c=t.find(x=>x.type==="event"&&o===Ht(ae(x)));if(!(c&&"name"in c)||c.type!=="event")throw new zs(o,{docsPath:zn});const{name:f,inputs:d}=c,u=d==null?void 0:d.some(x=>!("name"in x&&x.name)),l=u?[]:{},b=d.map((x,E)=>[x,E]).filter(([x])=>"indexed"in x&&x.indexed),h=[];for(let x=0;x<b.length;x++){const[E,m]=b[x],v=a[x];if(!v){if(i)throw new Ms({abiItem:c,param:E});h.push([E,m]);continue}l[u?m:E.name||m]=aa({param:E,value:v})}const y=d.filter(x=>!("indexed"in x&&x.indexed)),A=i?y:[...h.map(([x])=>x),...y];if(A.length>0){if(n&&n!=="0x")try{const x=st(A,n);if(x){let E=0;if(!i)for(const[m,v]of h)l[u?v:m.name||v]=x[E++];if(u)for(let m=0;m<d.length;m++)l[m]===void 0&&E<x.length&&(l[m]=x[E++]);else for(let m=0;m<y.length;m++)l[y[m].name]=x[E++]}}catch(x){if(i)throw x instanceof a0||x instanceof Hn?new gn({abiItem:c,data:n,params:A,size:G(n)}):x}else if(i)throw new gn({abiItem:c,data:"0x",params:A,size:0})}return{eventName:f,args:Object.values(l).length>0?l:void 0}}function aa({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(st([e],t)||[])[0]}function Uc(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),o=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:Ht(a)}));return r.map(a=>{var l;const c=typeof a.blockNumber=="string"?_n(a):a,f=o.filter(b=>c.topics[0]===b.selector);if(f.length===0)return null;let d,u;for(const b of f)try{d=Cn({...c,abi:[b.abi],strict:!0}),u=b;break}catch{}if(!d&&!s){u=f[0];try{d=Cn({data:c.data,topics:c.topics,abi:[u.abi],strict:!1})}catch{const b=(l=u.abi.inputs)==null?void 0:l.some(h=>!("name"in h&&h.name));return{...c,args:b?[]:{},eventName:u.abi.name}}}return!d||!u||i&&!i.includes(d.eventName)||!ca({args:d.args,inputs:u.abi.inputs,matchArgs:n})?null:{...d,...c}}).filter(Boolean)}function ca(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(i,o,a){try{return i.type==="address"?j0(o,a):i.type==="string"||i.type==="bytes"?Oe(Je(o))===a:o===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,o)=>{if(i==null)return!0;const a=n[o];return a?(Array.isArray(i)?i:[i]).some(f=>s(a,f,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,o])=>{if(o==null)return!0;const a=n.find(f=>f.name===i);return a?(Array.isArray(o)?o:[o]).some(f=>s(a,f,t[i])):!1}):!1}function fa(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new vr(r,{docsPath:t,...n})}async function W0(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ue(t)}class K0 extends p{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Zt extends p{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ua extends p{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${W(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class da extends p{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function Ge(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,d,u;const i=s??!1,o=n!==void 0?I(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[o||r,i]},{dedupe:!!o}),!a)throw new da({blockHash:t,blockNumber:n});return(((u=(d=(f=e.chain)==null?void 0:f.formatters)==null?void 0:d.block)==null?void 0:u.format)||Un)(a,"getBlock")}async function Z0(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function _c(e,t){return J0(e,t)}async function J0(e,t){var i,o;const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee);if(typeof a=="function"){const f=n||await N(e,Ge,"getBlock")({}),d=await a({block:f,client:e,request:s});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return De(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):N(e,Ge,"getBlock")({}),N(e,Z0,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Zt;const f=c-a.baseFeePerGas;return f<0n?0n:f}}async function Hc(e,t){return Bt(e,t)}async function Bt(e,t){var l,b;const{block:n,chain:r=e.chain,request:s,type:i="eip1559"}=t||{},o=await(async()=>{var h,y;return typeof((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(o<1)throw new K0;const c=10**(((l=o.toString().split(".")[1])==null?void 0:l.length)??0),f=h=>h*BigInt(Math.ceil(o*c))/BigInt(c),d=n||await N(e,Ge,"getBlock")({});if(typeof((b=r==null?void 0:r.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const h=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:i});if(h!==null)return h}if(i==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Zt;const h=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await J0(e,{block:d,chain:r,request:s}),y=f(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??y+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await N(e,Z0,"getGasPrice")({}))}}class la extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ba(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new la(r,{docsPath:t,...n})}async function ha(e,t){var o,a,c;const{account:n=e.account,prepare:r=!0}=t,s=n?he(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const f=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Ko({authorization:t.authorizationList[0]}).catch(()=>{throw new p("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,blockNumber:h,blockTag:y,data:A,gas:x,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,value:P,stateOverride:w,...$}=r?await ga(e,{...t,parameters:i,to:f}):t;if(x&&t.gas!==x)return x;const S=(typeof h=="bigint"?I(h):void 0)||y,z=R0(w);it(t);const B=(c=(a=(o=e.chain)==null?void 0:o.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,g=(B||Qe)({...Rt($,{format:B}),account:s,accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,data:A,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,to:f,value:P},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:z?[g,S??e.experimental_blockTag??"latest",z]:S?[g,S]:[g]}))}catch(f){throw ba(f,{...t,account:s,chain:e.chain})}}async function pa(e,{address:t,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=Kt({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,o]},{dedupe:typeof r=="bigint"||n!==void 0});return ue(a)}async function ya(e,t){var w,$,M,S,z;const{account:n=e.account,accessList:r,authorizationList:s,chain:i=e.chain,blobVersionedHashes:o,blobs:a,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:h,nonceManager:y,to:A,type:x,value:E,...m}=t,v=await(async()=>{if(!n||!y||typeof h<"u")return h;const B=he(n),O=i?i.id:await N(e,W0,"getChainId")({});return await y.consume({address:B.address,chainId:O,client:e})})();it(t);const T=($=(w=i==null?void 0:i.formatters)==null?void 0:w.transactionRequest)==null?void 0:$.format,P=(T||Qe)({...Rt(m,{format:T}),account:n?he(n):void 0,accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:v,to:A,type:x,value:E},"fillTransaction");try{const B=await e.request({method:"eth_fillTransaction",params:[P]}),g=(((S=(M=i==null?void 0:i.formatters)==null?void 0:M.transaction)==null?void 0:S.format)||St)(B.tx);delete g.blockHash,delete g.blockNumber,delete g.r,delete g.s,delete g.transactionIndex,delete g.v,delete g.yParity,g.data=g.input,g.gas&&(g.gas=t.gas??g.gas),g.gasPrice&&(g.gasPrice=t.gasPrice??g.gasPrice),g.maxFeePerBlobGas&&(g.maxFeePerBlobGas=t.maxFeePerBlobGas??g.maxFeePerBlobGas),g.maxFeePerGas&&(g.maxFeePerGas=t.maxFeePerGas??g.maxFeePerGas),g.maxPriorityFeePerGas&&(g.maxPriorityFeePerGas=t.maxPriorityFeePerGas??g.maxPriorityFeePerGas),typeof g.nonce<"u"&&(g.nonce=t.nonce??g.nonce);const Z=await(async()=>{var ce,Se;if(typeof((ce=i==null?void 0:i.fees)==null?void 0:ce.baseFeeMultiplier)=="function"){const te=await N(e,Ge,"getBlock")({});return i.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((Se=i==null?void 0:i.fees)==null?void 0:Se.baseFeeMultiplier)??1.2})();if(Z<1)throw new K0;const Ie=10**(((z=Z.toString().split(".")[1])==null?void 0:z.length)??0),Fe=ce=>ce*BigInt(Math.ceil(Z*Ie))/BigInt(Ie);return g.feePayerSignature||(g.maxFeePerGas&&!t.maxFeePerGas&&(g.maxFeePerGas=Fe(g.maxFeePerGas)),g.gasPrice&&!t.gasPrice&&(g.gasPrice=Fe(g.gasPrice))),{raw:B.raw,transaction:{from:P.from,...g},...B.capabilities?{capabilities:B.capabilities}:{}}}catch(B){throw fa(B,{...t,chain:e.chain})}}const ma=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Gn=new Map,yt=new It(128);async function ga(e,t){var v,T,k;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=ma);const{account:r,chain:s=e.chain,nonceManager:i,parameters:o}=n,a=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function f(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await N(e,W0,"getChainId")({}),c))}const d=r&&he(r);let u=n.nonce;if(o.includes("nonce")&&typeof u>"u"&&d&&i){const P=await f();u=await i.consume({address:d.address,chainId:P,client:e})}a!=null&&a.fn&&((v=a.runAt)!=null&&v.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillTransaction"}),u??(u=n.nonce));const b=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&n.kzg&&n.blobs||yt.get(e.uid)===!1||!["fees","gas"].some(w=>o.includes(w))?!1:!!(o.includes("chainId")&&typeof n.chainId!="number"||o.includes("nonce")&&typeof u!="number"||o.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof n.gas!="bigint"))?await N(e,ya,"fillTransaction")({...n,nonce:u}).then(P=>{const{chainId:w,from:$,gas:M,gasPrice:S,nonce:z,maxFeePerBlobGas:B,maxFeePerGas:O,maxPriorityFeePerGas:g,type:Z,...C}=P.transaction;return yt.set(e.uid,!0),{...n,...$?{from:$}:{},...Z&&!n.type?{type:Z}:{},...typeof w<"u"?{chainId:w}:{},...typeof M<"u"?{gas:M}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof z<"u"?{nonce:z}:{},...typeof B<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:B}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:O}:{},...typeof g<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:g}:{},..."nonceKey"in C&&typeof C.nonceKey<"u"?{nonceKey:C.nonceKey}:{},..."keyAuthorization"in C&&typeof C.keyAuthorization<"u"&&C.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:C.keyAuthorization}:{},..."feePayerSignature"in C&&typeof C.feePayerSignature<"u"&&C.feePayerSignature!==null?{feePayerSignature:C.feePayerSignature}:{},..."feeToken"in C&&typeof C.feeToken<"u"&&C.feeToken!==null&&!("feeToken"in n)?{feeToken:C.feeToken}:{},...P.capabilities?{_capabilities:P.capabilities}:{}}}).catch(P=>{var S,z;const w=P;if(w.name!=="TransactionExecutionError")return n;if((S=w.walk)==null?void 0:S.call(w,B=>B.name==="ExecutionRevertedError"))throw P;return((z=w.walk)==null?void 0:z.call(w,B=>{var g;const O=B;return O.name==="MethodNotFoundRpcError"||O.name==="MethodNotSupportedRpcError"||((g=O.message)==null?void 0:g.includes("eth_fillTransaction is not available"))}))&&yt.set(e.uid,!1),n}):n;u??(u=b.nonce),n={...b,...d?{from:d==null?void 0:d.address}:{},...typeof u<"u"?{nonce:u}:{}};const{blobs:h,gas:y,kzg:A,type:x}=n;a!=null&&a.fn&&((T=a.runAt)!=null&&T.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillParameters"}));let E;async function m(){return E||(E=await N(e,Ge,"getBlock")({blockTag:"latest"}),E)}if(o.includes("nonce")&&typeof u>"u"&&d&&!i&&(n.nonce=await N(e,pa,"getTransactionCount")({address:d.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&h&&A){const P=Rn({blobs:h,kzg:A});if(o.includes("blobVersionedHashes")){const w=ts({commitments:P,to:"hex"});n.blobVersionedHashes=w}if(o.includes("sidecars")){const w=Dn({blobs:h,commitments:P,kzg:A}),$=os({blobs:h,commitments:P,proofs:w,to:"hex"});n.sidecars=$}}if(o.includes("chainId")&&(n.chainId=await f()),(o.includes("fees")||o.includes("type"))&&typeof x>"u")try{n.type=Ps(n)}catch{let P=Gn.get(e.uid);if(typeof P>"u"){const w=await m();P=typeof(w==null?void 0:w.baseFeePerGas)=="bigint",Gn.set(e.uid,P)}n.type=P?"eip1559":"legacy"}if(o.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const P=await m(),{maxFeePerGas:w,maxPriorityFeePerGas:$}=await Bt(e,{block:P,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<$)throw new ua({maxPriorityFeePerGas:$});n.maxPriorityFeePerGas=$,n.maxFeePerGas=w}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Zt;if(typeof n.gasPrice>"u"){const P=await m(),{gasPrice:w}=await Bt(e,{block:P,chain:s,request:n,type:"legacy"});n.gasPrice=w}}return o.includes("gas")&&typeof y>"u"&&(n.gas=await N(e,ha,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((k=a.runAt)!=null&&k.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"afterFillParameters"})),it(n),delete n.parameters,n}async function Nc(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}export{B0 as $,Is as A,K0 as B,to as C,io as D,gn as E,Ms as F,Zt as G,la as H,Ls as I,Os as J,Xa as K,qa as L,ui as M,be as N,Us as O,_a as P,_s as Q,fi as R,Ba as S,ci as T,oi as U,hi as V,Er as W,ve as X,Ia as Y,li as Z,ua as _,mn as a,Ke as a$,ai as a0,Qi as a1,vr as a2,Fa as a3,Sa as a4,di as a5,si as a6,Ja as a7,ka as a8,Na as a9,Mc as aA,Un as aB,kt as aC,_n as aD,St as aE,hr as aF,Qe as aG,Nt as aH,Ha as aI,As as aJ,Lc as aK,Ht as aL,ki as aM,Ot as aN,Ps as aO,K as aP,j0 as aQ,Oe as aR,va as aS,mr as aT,P0 as aU,Uc as aV,No as aW,Vo as aX,Do as aY,pr as aZ,Qr as a_,it as aa,Rn as ab,Dn as ac,zi as ad,Ci as ae,Q as af,Gi as ag,nt as ah,es as ai,ts as aj,Pe as ak,gr as al,et as am,st as an,Xi as ao,Cn as ap,Xo as aq,Aa as ar,Pa as as,$a as at,Ea as au,Uo as av,_o as aw,$0 as ax,N0 as ay,jo as az,a0 as b,gs as b$,o0 as b0,ws as b1,os as b2,is as b3,A0 as b4,Pr as b5,Ln as b6,ja as b7,Ko as b8,N as b9,dc as bA,Ve as bB,cc as bC,fo as bD,ac as bE,oc as bF,T0 as bG,Vt as bH,uc as bI,tc as bJ,S0 as bK,lo as bL,nc as bM,lc as bN,Ga as bO,Ca as bP,Xr as bQ,Mi as bR,ec as bS,Ge as bT,Kt as bU,yi as bV,Fi as bW,y0 as bX,R as bY,pe as bZ,Ya as b_,W0 as ba,Rt as bb,ga as bc,ma as bd,Nc as be,Ra as bf,fa as bg,he as bh,Oc as bi,ss as bj,La as bk,ns as bl,Ua as bm,ae as bn,Es as bo,Wn as bp,za as bq,zt as br,le as bs,We as bt,Ae as bu,sc as bv,rc as bw,ic as bx,co as by,fc as bz,Mt as c,hc as c0,$e as c1,qr as c2,Cc as c3,Ee as c4,F as c5,vc as c6,q as c7,M0 as c8,Ac as c9,Ta as cA,Qa as cB,br as cC,oo as cD,Jo as cE,jt as cF,ya as cG,_c as cH,Z0 as cI,Gc as cJ,Oa as cK,Ma as cL,yc as cM,bc as cN,_0 as cO,zc as cP,Co as cQ,Sc as cR,G0 as ca,Tc as cb,Bc as cc,pc as cd,kc as ce,wc as cf,mc as cg,xc as ch,gc as ci,Pc as cj,Io as ck,L0 as cl,Ic as cm,Mo as cn,U0 as co,Fc as cp,vn as cq,ze as cr,Rs as cs,Go as ct,Ho as cu,ha as cv,pa as cw,Me as cx,Hc as cy,R0 as cz,Fs as d,Ss as e,Ts as f,Da as g,Va as h,c0 as i,Wa as j,ks as k,zs as l,Ze as m,Cs as n,Ka as o,qi as p,da as q,Za as r,xt as s,as as t,cs as u,bi as v,Qn as w,no as x,ro as y,so as z};
|
|
36
|
+
`);super(f,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=n.cause,this.details=r,this.docs=o,this.docsOrigin=i,this.docsPath=s,this.shortMessage=t,this.showVersion=a,this.version=c}walk(t){return k0(this,t)}}Object.defineProperty(F,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${po()}`}});F.setStaticOptions(F.defaultStaticOptions);function k0(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?k0(e.cause,t):t?null:e}function Be(e,t){if(vn(e)>t)throw new So({givenSize:vn(e),maxSize:t})}const X={zero:48,nine:57,A:65,F:70,a:97,f:102};function En(e){if(e>=X.zero&&e<=X.nine)return e-X.zero;if(e>=X.A&&e<=X.F)return e-(X.A-10);if(e>=X.a&&e<=X.f)return e-(X.a-10)}function yo(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new To({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let i=0;i<r;i++){const o=n==="right";s[o?i:r-i-1]=e[o?i:e.length-i-1]}return s}function z0(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function ot(e,t){if(Ee(e)>t)throw new Oo({givenSize:Ee(e),maxSize:t})}function mo(e,t){if(typeof t=="number"&&t>0&&t>Ee(e)-1)throw new H0({offset:t,position:"start",size:Ee(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ee(e)!==n-t)throw new H0({offset:n,position:"end",size:Ee(e)})}function C0(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new Lo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function xo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let i=0;i<r.length-1&&r[n==="left"?i:r.length-i-1].toString()==="0";i++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const wo="#__bigint";function G0(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+wo:s,n)}const Po=new TextDecoder,Ao=new TextEncoder;function $o(e){if(!(e instanceof Uint8Array)){if(!e)throw new je(e);if(typeof e!="object")throw new je(e);if(!("BYTES_PER_ELEMENT"in e))throw new je(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new je(e)}}function bc(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const i=e[r];n.set(i,s),s+=i.length}return n}function hc(e){return e instanceof Uint8Array?e:typeof e=="string"?M0(e):Eo(e)}function Eo(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function M0(e,t={}){const{size:n}=t;let r=e;n&&(ot(e,n),r=U0(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,o=new Uint8Array(i);for(let a=0,c=0;a<i;a++){const f=En(s.charCodeAt(c++)),d=En(s.charCodeAt(c++));if(f===void 0||d===void 0)throw new F(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);o[a]=f<<4|d}return o}function pc(e,t={}){const{size:n}=t,r=Ao.encode(e);return typeof n=="number"?(Be(r,n),vo(r,n)):r}function yc(e,t){return uo(e,t)}function vo(e,t){return yo(e,{dir:"right",size:t})}function Bo(e){return crypto.getRandomValues(new Uint8Array(e))}function vn(e){return e.length}function mc(e,t,n,r={}){const{strict:s}=r;return e.slice(t,n)}function gc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return _0(r,t)}function xc(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(Be(r,n),r=Io(r)),r.length>1||r[0]>1)throw new Fo(r);return!!r[0]}function wc(e,t={}){const{size:n}=t;typeof n<"u"&&Be(e,n);const r=$e(e,t);return Go(r,t)}function Pc(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(Be(r,n),r=O0(r)),Po.decode(r)}function Io(e){return z0(e,{dir:"left"})}function O0(e){return z0(e,{dir:"right"})}function Ac(e){try{return $o(e),!0}catch{return!1}}class Fo extends F{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}class je extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let So=class extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},To=class extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};const ko=new TextEncoder,zo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Co(e,t={}){const{strict:n=!1}=t;if(!e)throw new Bn(e);if(typeof e!="string")throw new Bn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new In(e);if(!e.startsWith("0x"))throw new In(e)}function vc(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Bc(e){return e instanceof Uint8Array?$e(e):Array.isArray(e)?$e(new Uint8Array(e)):e}function Ic(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ot(n,t.size),L0(n,t.size)):n}function $e(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=zo[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ot(r,t.size),U0(r,t.size)):r}function q(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof i=="bigint"&&n?-i-1n:0;if(i&&s>i||s<o){const f=typeof e=="bigint"?"n":"";throw new Mo({max:i?`${i}${f}`:void 0,min:`${o}${f}`,signed:n,size:r,value:`${e}${f}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?L0(c,r):c}function Fc(e,t={}){return $e(ko.encode(e),t)}function L0(e,t){return C0(e,{dir:"left",size:t})}function U0(e,t){return C0(e,{dir:"right",size:t})}function Sc(e){return $e(Bo(e))}function Tc(e,t,n,r={}){const{strict:s}=r;mo(e,t);const i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(i,t,n),i}function Ee(e){return Math.ceil((e.length-2)/2)}function kc(e){return xo(e,{dir:"left"})}function _0(e,t={}){const{signed:n}=t;t.size&&ot(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,i=(1n<<BigInt(s)*8n)-1n,o=i>>1n;return r<=o?r:r-i-1n}function Go(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:_0(e,t))}function zc(e,t={}){const{size:n}=t;let r=M0(e);return n&&(Be(r,n),r=O0(r)),new TextDecoder().decode(r)}function Cc(e,t={}){const{strict:n=!1}=t;try{return Co(e,{strict:n}),!0}catch{return!1}}class Mo extends F{constructor({max:t,min:n,signed:r,size:s,value:i}){super(`Number \`${i}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class Bn extends F{constructor(t){super(`Value \`${typeof t=="object"?G0(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class In extends F{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class Gc extends F{constructor(t){super(`Hex value \`"${t}"\` is an odd length (${t.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}class Oo extends F{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class H0 extends F{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class Lo extends F{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Kt(e){const{blockHash:t,blockNumber:n,blockTag:r,requireCanonical:s}=e;if(s!==void 0&&!t)throw new p("`requireCanonical` can only be provided when `blockHash` is set.");return t?s?{blockHash:t,requireCanonical:s}:{blockHash:t}:typeof n=="bigint"?I(n):r??"latest"}const Uo="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",_o="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Mc="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Ho="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",ht="/docs/contract/encodeDeployData";function N0(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Is({docsPath:ht});if(!("inputs"in s))throw new mn({docsPath:ht});if(!s.inputs||s.inputs.length===0)throw new mn({docsPath:ht});const i=$0(s.inputs,n);return et([r,i])}const Fn="/docs/contract/encodeFunctionData";function No(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const i=Nt({abi:t,args:n,name:r});if(!i)throw new Ze(r,{docsPath:Fn});s=i}if(s.type!=="function")throw new Ze(void 0,{docsPath:Fn});return{abi:[s],functionName:Ot(ae(s))}}function jo(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var a;return e.abi.length===1&&((a=e.functionName)!=null&&a.startsWith("0x"))?e:No(e)})(),s=n[0],i=r,o="inputs"in s&&s.inputs?$0(s.inputs,t??[]):void 0;return et([i,o??"0x"])}function j0(e,t){if(!K(e,{strict:!1}))throw new be({address:e});if(!K(t,{strict:!1}))throw new be({address:t});return e.toLowerCase()===t.toLowerCase()}function Ro(e){const t=Oe(`0x${e.substring(4)}`).substring(26);return nt(`0x${t}`)}async function Do({hash:e,signature:t}){const n=we(e)?e:Re(e),{secp256k1:r}=await On(async()=>{const{secp256k1:o}=await import("./secp256k1-ChfveZcd.js").then(a=>a.a);return{secp256k1:o}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:d,v:u,yParity:l}=t,b=Number(l??u),h=Sn(b);return new r.Signature(De(f),De(d)).addRecoveryBit(h)}const o=we(t)?t:Re(t);if(G(o)!==65)throw new Error("invalid signature length");const a=ue(`0x${o.slice(130)}`),c=Sn(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Sn(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Vo({hash:e,signature:t}){return Ro(await Do({hash:e,signature:t}))}function Wo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,i=Oe(et(["0x05",Pr([t?I(t):"0x",s,n?I(n):"0x"])]));return r==="bytes"?de(i):i}async function Ko(e){const{authorization:t,signature:n}=e;return Vo({hash:Wo(t),signature:n??t})}function N(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:i=>t(e,i)}function Zo(e){return{address:e.address,amount:q(e.amount),index:q(e.index),validatorIndex:q(e.validatorIndex)}}function Jo(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:q(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:q(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:q(e.gasLimit)},...typeof e.number=="bigint"&&{number:q(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:q(e.prevRandao)},...typeof e.time=="bigint"&&{time:q(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Zo)}}}const Yo="0x82ad56cb",pt="/docs/contract/decodeFunctionResult";function Xo(e){const{abi:t,args:n,functionName:r,data:s}=e;let i=t[0];if(r){const a=Nt({abi:t,args:n,name:r});if(!a)throw new Ze(r,{docsPath:pt});i=a}if(i.type!=="function")throw new Ze(void 0,{docsPath:pt});if(!i.outputs)throw new Cs(i.name,{docsPath:pt});const o=st(i.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}function Tn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new on({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new on({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function qo(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:i}=e,o={};if(i!==void 0&&(o.code=i),t!==void 0&&(o.balance=I(t)),n!==void 0&&(o.nonce=I(n)),r!==void 0&&(o.state=Tn(r)),s!==void 0){if(o.state)throw new Qi;o.stateDiff=Tn(s)}return o}function R0(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!K(n,{strict:!1}))throw new be({address:n});if(t[n])throw new qi({address:n});t[n]=qo(r)}return t}async function Oc(e,t){var Z,C,Ie,Fe,ce,Se;const{account:n=e.account,authorizationList:r,batch:s=!!((Z=e.batch)!=null&&Z.multicall),blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:f,blobs:d,blockOverrides:u,code:l,data:b,factory:h,factoryData:y,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,requestOptions:k,to:P,value:w,stateOverride:$,...M}=t,S=n?he(n):void 0;if(l&&(h||y))throw new p("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&P)throw new p("Cannot provide both `code` & `to` as parameters.");const z=l&&b,B=h&&y&&P&&b,O=z||B,g=z?V0({code:l,data:b}):B?sa({data:b,factory:h,factoryData:y,to:P}):b;try{it(t);const te=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),H=u?Jo(u):void 0,ne=R0($),Le=(Fe=(Ie=(C=e.chain)==null?void 0:C.formatters)==null?void 0:Ie.transactionRequest)==null?void 0:Fe.format,Te=(Le||Qe)({...Rt(M,{format:Le}),accessList:f,account:S,authorizationList:r,blobs:d,data:g,gas:A,gasPrice:x,maxFeePerBlobGas:E,maxFeePerGas:m,maxPriorityFeePerGas:v,nonce:T,to:O?void 0:P,value:w},"call");if(s&&Qo({request:Te})&&!H&&i===void 0)try{const{deployless:D=!1}=typeof((ce=e.batch)==null?void 0:ce.multicall)=="object"?e.batch.multicall:{},at=D0(e,{blockNumber:o,deployless:D});if(!at||!ra(ne,at))return await na(e,{...Te,blockHash:i,blockNumber:o,blockTag:a,multicallAddress:at,requestOptions:k,requireCanonical:c,rpcStateOverride:ne})}catch(D){if(!(D instanceof Qn)&&!(D instanceof xt))throw D}const Y0=(()=>{const D=[Te,te];return ne&&H?[...D,ne,H]:ne?[...D,ne]:H?[...D,{},H]:D})(),Yt=await e.request({method:"eth_call",params:Y0},k);return Yt==="0x"?{data:void 0}:{data:Yt}}catch(te){if((Se=k==null?void 0:k.signal)!=null&&Se.aborted)throw or(k.signal);if(ar(te))throw te;const H=ia(te),{offchainLookup:ne,offchainLookupSignature:Le}=await On(async()=>{const{offchainLookup:Jt,offchainLookupSignature:Te}=await import("./ccip-B8JdVFq5.js");return{offchainLookup:Jt,offchainLookupSignature:Te}},__vite__mapDeps([0,1,2,3,4,5,6]));if(e.ccipRead!==!1&&(H==null?void 0:H.slice(0,10))===Le&&P)return{data:await ne(e,{data:H,requestOptions:k,to:P})};throw O&&(H==null?void 0:H.slice(0,10))==="0x101bb98d"?new io({factory:h}):oo(te,{...t,account:S,chain:e.chain})}}function Qo({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Yo)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}let ea=0;const kn=new WeakMap;function ta(e){if(!e)return"default";const t=kn.get(e);if(t!==void 0)return t;const n=ea++;return kn.set(e,n),n}async function na(e,t){var T;const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof((T=e.batch)==null?void 0:T.multicall)=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:o,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:f,multicallAddress:d,requestOptions:u,rpcStateOverride:l,to:b}=t,h=d!==void 0?d:D0(e,{blockNumber:o,deployless:r}),y=Kt({blockHash:i,blockNumber:o,blockTag:a,requireCanonical:c}),A=typeof y=="string"?y:JSON.stringify(y),x=l?`.${JSON.stringify(l)}`:"",{schedule:E}=cr({id:`${e.uid}.${A}.${ta(u)}${x}`,wait:s,shouldSplitBatch(k){return k.reduce((w,{data:$})=>w+($.length-2),0)>n*2},fn:async k=>{const P=k.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),w=jo({abi:an,args:[P],functionName:"aggregate3"}),$={...h===null?{data:V0({code:Ho,data:w})}:{to:h,data:w}},M=await e.request({method:"eth_call",params:l?[$,y,l]:[$,y]},u);return Xo({abi:an,args:[P],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:m,success:v}]=await E({data:f,to:b});if(!v)throw new B0({data:m});return m==="0x"?{data:void 0}:{data:m}}function D0(e,t){const{blockNumber:n,deployless:r}=t;if(r)return null;if(e.chain)return As({blockNumber:n,chain:e.chain,contract:"multicall3"});throw new Qn}function ra(e,t){return e?Object.keys(e).some(n=>j0(n,t)):!1}function V0(e){const{code:t,data:n}=e;return N0({abi:P0(["constructor(bytes, bytes)"]),bytecode:Uo,args:[t,n]})}function sa(e){const{data:t,factory:n,factoryData:r,to:s}=e;return N0({abi:P0(["constructor(address, bytes, address, bytes)"]),bytecode:_o,args:[s,t,n,r]})}function ia(e){var n;if(!(e instanceof p))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}const oa=3;function Lc(e,{abi:t,address:n,args:r,docsPath:s,functionName:i,sender:o}){const a=e instanceof B0?e:e instanceof p?e.walk(h=>"data"in h)||e.walk():{},{code:c,data:f,details:d,message:u,shortMessage:l}=a,b=e instanceof Mt?new so({functionName:i,cause:e}):[oa,fr.code].includes(c)&&(f||d||u||l)||c===ur.code&&d==="execution reverted"&&f?new ro({abi:t,data:typeof f=="object"?f.data:f,functionName:i,message:a instanceof dr?d:l??u,cause:e}):e;return new no(b,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:i,sender:o})}const zn="/docs/contract/decodeEventLog";function Cn(e){const{abi:t,data:n,strict:r,topics:s}=e,i=r??!0,[o,...a]=s;if(!o)throw new ks({docsPath:zn});const c=t.find(x=>x.type==="event"&&o===Ht(ae(x)));if(!(c&&"name"in c)||c.type!=="event")throw new zs(o,{docsPath:zn});const{name:f,inputs:d}=c,u=d==null?void 0:d.some(x=>!("name"in x&&x.name)),l=u?[]:{},b=d.map((x,E)=>[x,E]).filter(([x])=>"indexed"in x&&x.indexed),h=[];for(let x=0;x<b.length;x++){const[E,m]=b[x],v=a[x];if(!v){if(i)throw new Ms({abiItem:c,param:E});h.push([E,m]);continue}l[u?m:E.name||m]=aa({param:E,value:v})}const y=d.filter(x=>!("indexed"in x&&x.indexed)),A=i?y:[...h.map(([x])=>x),...y];if(A.length>0){if(n&&n!=="0x")try{const x=st(A,n);if(x){let E=0;if(!i)for(const[m,v]of h)l[u?v:m.name||v]=x[E++];if(u)for(let m=0;m<d.length;m++)l[m]===void 0&&E<x.length&&(l[m]=x[E++]);else for(let m=0;m<y.length;m++)l[y[m].name]=x[E++]}}catch(x){if(i)throw x instanceof a0||x instanceof Hn?new gn({abiItem:c,data:n,params:A,size:G(n)}):x}else if(i)throw new gn({abiItem:c,data:"0x",params:A,size:0})}return{eventName:f,args:Object.values(l).length>0?l:void 0}}function aa({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(st([e],t)||[])[0]}function Uc(e){const{abi:t,args:n,logs:r,strict:s=!0}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),o=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:Ht(a)}));return r.map(a=>{var l;const c=typeof a.blockNumber=="string"?_n(a):a,f=o.filter(b=>c.topics[0]===b.selector);if(f.length===0)return null;let d,u;for(const b of f)try{d=Cn({...c,abi:[b.abi],strict:!0}),u=b;break}catch{}if(!d&&!s){u=f[0];try{d=Cn({data:c.data,topics:c.topics,abi:[u.abi],strict:!1})}catch{const b=(l=u.abi.inputs)==null?void 0:l.some(h=>!("name"in h&&h.name));return{...c,args:b?[]:{},eventName:u.abi.name}}}return!d||!u||i&&!i.includes(d.eventName)||!ca({args:d.args,inputs:u.abi.inputs,matchArgs:n})?null:{...d,...c}}).filter(Boolean)}function ca(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function s(i,o,a){try{return i.type==="address"?j0(o,a):i.type==="string"||i.type==="bytes"?Oe(Je(o))===a:o===a}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((i,o)=>{if(i==null)return!0;const a=n[o];return a?(Array.isArray(i)?i:[i]).some(f=>s(a,f,t[o])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([i,o])=>{if(o==null)return!0;const a=n.find(f=>f.name===i);return a?(Array.isArray(o)?o:[o]).some(f=>s(a,f,t[i])):!1}):!1}function fa(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new vr(r,{docsPath:t,...n})}async function W0(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return ue(t)}class K0 extends p{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Zt extends p{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class ua extends p{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${W(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class da extends p{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}async function Ge(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,d,u;const i=s??!1,o=n!==void 0?I(n):void 0;let a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:!0}):a=await e.request({method:"eth_getBlockByNumber",params:[o||r,i]},{dedupe:!!o}),!a)throw new da({blockHash:t,blockNumber:n});return(((u=(d=(f=e.chain)==null?void 0:f.formatters)==null?void 0:d.block)==null?void 0:u.format)||Un)(a,"getBlock")}async function Z0(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function _c(e,t){return J0(e,t)}async function J0(e,t){var i,o;const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=((i=r==null?void 0:r.fees)==null?void 0:i.maxPriorityFeePerGas)??((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee);if(typeof a=="function"){const f=n||await N(e,Ge,"getBlock")({}),d=await a({block:f,client:e,request:s});if(d===null)throw new Error;return d}if(typeof a<"u")return a;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return De(c)}catch{const[a,c]=await Promise.all([n?Promise.resolve(n):N(e,Ge,"getBlock")({}),N(e,Z0,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new Zt;const f=c-a.baseFeePerGas;return f<0n?0n:f}}async function Hc(e,t){return Bt(e,t)}async function Bt(e,t){var l,b;const{block:n,chain:r=e.chain,request:s,type:i="eip1559"}=t||{},o=await(async()=>{var h,y;return typeof((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):((y=r==null?void 0:r.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(o<1)throw new K0;const c=10**(((l=o.toString().split(".")[1])==null?void 0:l.length)??0),f=h=>h*BigInt(Math.ceil(o*c))/BigInt(c),d=n||await N(e,Ge,"getBlock")({});if(typeof((b=r==null?void 0:r.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const h=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:i});if(h!==null)return h}if(i==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new Zt;const h=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await J0(e,{block:d,chain:r,request:s}),y=f(d.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??y+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await N(e,Z0,"getGasPrice")({}))}}class la extends p{constructor(t,{account:n,docsPath:r,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:f,nonce:d,to:u,value:l}){var h;const b=Me({from:n==null?void 0:n.address,to:u,value:typeof l<"u"&&`${kt(l)} ${((h=s==null?void 0:s.nativeCurrency)==null?void 0:h.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${W(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${W(c)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${W(f)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ba(e,{docsPath:t,...n}){const r=(()=>{const s=jt(e,n);return s instanceof Xe?e:s})();return new la(r,{docsPath:t,...n})}async function ha(e,t){var o,a,c;const{account:n=e.account,prepare:r=!0}=t,s=n?he(n):void 0,i=(()=>{if(Array.isArray(r))return r;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const f=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Ko({authorization:t.authorizationList[0]}).catch(()=>{throw new p("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,blockNumber:h,blockTag:y,data:A,gas:x,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,value:P,stateOverride:w,...$}=r?await ga(e,{...t,parameters:i,to:f}):t;if(x&&t.gas!==x)return x;const S=(typeof h=="bigint"?I(h):void 0)||y,z=R0(w);it(t);const B=(c=(a=(o=e.chain)==null?void 0:o.formatters)==null?void 0:a.transactionRequest)==null?void 0:c.format,g=(B||Qe)({...Rt($,{format:B}),account:s,accessList:d,authorizationList:u,blobs:l,blobVersionedHashes:b,data:A,gasPrice:E,maxFeePerBlobGas:m,maxFeePerGas:v,maxPriorityFeePerGas:T,nonce:k,to:f,value:P},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:z?[g,S??e.experimental_blockTag??"latest",z]:S?[g,S]:[g]}))}catch(f){throw ba(f,{...t,account:s,chain:e.chain})}}async function pa(e,{address:t,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=Kt({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,o]},{dedupe:typeof r=="bigint"||n!==void 0});return ue(a)}async function ya(e,t){var w,$,M,S,z;const{account:n=e.account,accessList:r,authorizationList:s,chain:i=e.chain,blobVersionedHashes:o,blobs:a,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:h,nonceManager:y,to:A,type:x,value:E,...m}=t,v=await(async()=>{if(!n||!y||typeof h<"u")return h;const B=he(n),O=i?i.id:await N(e,W0,"getChainId")({});return await y.consume({address:B.address,chainId:O,client:e})})();it(t);const T=($=(w=i==null?void 0:i.formatters)==null?void 0:w.transactionRequest)==null?void 0:$.format,P=(T||Qe)({...Rt(m,{format:T}),account:n?he(n):void 0,accessList:r,authorizationList:s,blobs:a,blobVersionedHashes:o,data:c,gas:f,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:b,nonce:v,to:A,type:x,value:E},"fillTransaction");try{const B=await e.request({method:"eth_fillTransaction",params:[P]}),g=(((S=(M=i==null?void 0:i.formatters)==null?void 0:M.transaction)==null?void 0:S.format)||St)(B.tx);delete g.blockHash,delete g.blockNumber,delete g.r,delete g.s,delete g.transactionIndex,delete g.v,delete g.yParity,g.data=g.input,g.gas&&(g.gas=t.gas??g.gas),g.gasPrice&&(g.gasPrice=t.gasPrice??g.gasPrice),g.maxFeePerBlobGas&&(g.maxFeePerBlobGas=t.maxFeePerBlobGas??g.maxFeePerBlobGas),g.maxFeePerGas&&(g.maxFeePerGas=t.maxFeePerGas??g.maxFeePerGas),g.maxPriorityFeePerGas&&(g.maxPriorityFeePerGas=t.maxPriorityFeePerGas??g.maxPriorityFeePerGas),typeof g.nonce<"u"&&(g.nonce=t.nonce??g.nonce);const Z=await(async()=>{var ce,Se;if(typeof((ce=i==null?void 0:i.fees)==null?void 0:ce.baseFeeMultiplier)=="function"){const te=await N(e,Ge,"getBlock")({});return i.fees.baseFeeMultiplier({block:te,client:e,request:t})}return((Se=i==null?void 0:i.fees)==null?void 0:Se.baseFeeMultiplier)??1.2})();if(Z<1)throw new K0;const Ie=10**(((z=Z.toString().split(".")[1])==null?void 0:z.length)??0),Fe=ce=>ce*BigInt(Math.ceil(Z*Ie))/BigInt(Ie);return g.feePayerSignature||(g.maxFeePerGas&&!t.maxFeePerGas&&(g.maxFeePerGas=Fe(g.maxFeePerGas)),g.gasPrice&&!t.gasPrice&&(g.gasPrice=Fe(g.gasPrice))),{raw:B.raw,transaction:{from:P.from,...g},...B.capabilities?{capabilities:B.capabilities}:{}}}catch(B){throw fa(B,{...t,chain:e.chain})}}const ma=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Gn=new Map,yt=new It(128);async function ga(e,t){var v,T,k;let n=t;n.account??(n.account=e.account),n.parameters??(n.parameters=ma);const{account:r,chain:s=e.chain,nonceManager:i,parameters:o}=n,a=(()=>{if(typeof(s==null?void 0:s.prepareTransactionRequest)=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s==null?void 0:s.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function f(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await N(e,W0,"getChainId")({}),c))}const d=r&&he(r);let u=n.nonce;if(o.includes("nonce")&&typeof u>"u"&&d&&i){const P=await f();u=await i.consume({address:d.address,chainId:P,client:e})}a!=null&&a.fn&&((v=a.runAt)!=null&&v.includes("beforeFillTransaction"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillTransaction"}),u??(u=n.nonce));const b=((o.includes("blobVersionedHashes")||o.includes("sidecars"))&&n.kzg&&n.blobs||yt.get(e.uid)===!1||!["fees","gas"].some(w=>o.includes(w))?!1:!!(o.includes("chainId")&&typeof n.chainId!="number"||o.includes("nonce")&&typeof u!="number"||o.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||o.includes("gas")&&typeof n.gas!="bigint"))?await N(e,ya,"fillTransaction")({...n,nonce:u}).then(P=>{const{chainId:w,from:$,gas:M,gasPrice:S,nonce:z,maxFeePerBlobGas:B,maxFeePerGas:O,maxPriorityFeePerGas:g,type:Z,...C}=P.transaction;return yt.set(e.uid,!0),{...n,...$?{from:$}:{},...Z&&!n.type?{type:Z}:{},...typeof w<"u"?{chainId:w}:{},...typeof M<"u"?{gas:M}:{},...typeof S<"u"?{gasPrice:S}:{},...typeof z<"u"?{nonce:z}:{},...typeof B<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerBlobGas:B}:{},...typeof O<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxFeePerGas:O}:{},...typeof g<"u"&&n.type!=="legacy"&&n.type!=="eip2930"?{maxPriorityFeePerGas:g}:{},..."nonceKey"in C&&typeof C.nonceKey<"u"?{nonceKey:C.nonceKey}:{},..."keyAuthorization"in C&&typeof C.keyAuthorization<"u"&&C.keyAuthorization!==null&&!("keyAuthorization"in n)?{keyAuthorization:C.keyAuthorization}:{},..."feePayerSignature"in C&&typeof C.feePayerSignature<"u"&&C.feePayerSignature!==null?{feePayerSignature:C.feePayerSignature}:{},..."feeToken"in C&&typeof C.feeToken<"u"&&C.feeToken!==null&&!("feeToken"in n)?{feeToken:C.feeToken}:{},...P.capabilities?{_capabilities:P.capabilities}:{}}}).catch(P=>{var S,z;const w=P;if(w.name!=="TransactionExecutionError")return n;if((S=w.walk)==null?void 0:S.call(w,B=>B.name==="ExecutionRevertedError"))throw P;return((z=w.walk)==null?void 0:z.call(w,B=>{var g;const O=B;return O.name==="MethodNotFoundRpcError"||O.name==="MethodNotSupportedRpcError"||((g=O.message)==null?void 0:g.includes("eth_fillTransaction is not available"))}))&&yt.set(e.uid,!1),n}):n;u??(u=b.nonce),n={...b,...d?{from:d==null?void 0:d.address}:{},...typeof u<"u"?{nonce:u}:{}};const{blobs:h,gas:y,kzg:A,type:x}=n;a!=null&&a.fn&&((T=a.runAt)!=null&&T.includes("beforeFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"beforeFillParameters"}));let E;async function m(){return E||(E=await N(e,Ge,"getBlock")({blockTag:"latest"}),E)}if(o.includes("nonce")&&typeof u>"u"&&d&&!i&&(n.nonce=await N(e,pa,"getTransactionCount")({address:d.address,blockTag:"pending"})),(o.includes("blobVersionedHashes")||o.includes("sidecars"))&&h&&A){const P=Rn({blobs:h,kzg:A});if(o.includes("blobVersionedHashes")){const w=ts({commitments:P,to:"hex"});n.blobVersionedHashes=w}if(o.includes("sidecars")){const w=Dn({blobs:h,commitments:P,kzg:A}),$=os({blobs:h,commitments:P,proofs:w,to:"hex"});n.sidecars=$}}if(o.includes("chainId")&&(n.chainId=await f()),(o.includes("fees")||o.includes("type"))&&typeof x>"u")try{n.type=Ps(n)}catch{let P=Gn.get(e.uid);if(typeof P>"u"){const w=await m();P=typeof(w==null?void 0:w.baseFeePerGas)=="bigint",Gn.set(e.uid,P)}n.type=P?"eip1559":"legacy"}if(o.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const P=await m(),{maxFeePerGas:w,maxPriorityFeePerGas:$}=await Bt(e,{block:P,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<$)throw new ua({maxPriorityFeePerGas:$});n.maxPriorityFeePerGas=$,n.maxFeePerGas=w}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new Zt;if(typeof n.gasPrice>"u"){const P=await m(),{gasPrice:w}=await Bt(e,{block:P,chain:s,request:n,type:"legacy"});n.gasPrice=w}}return o.includes("gas")&&typeof y>"u"&&(n.gas=await N(e,ha,"estimateGas")({...n,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),a!=null&&a.fn&&((k=a.runAt)!=null&&k.includes("afterFillParameters"))&&(n=await a.fn({...n,chain:s},{client:e,phase:"afterFillParameters"})),it(n),delete n.parameters,n}async function Nc(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}export{B0 as $,Is as A,K0 as B,to as C,io as D,gn as E,Ms as F,Zt as G,la as H,Ls as I,Os as J,Xa as K,qa as L,ui as M,be as N,Us as O,_a as P,_s as Q,fi as R,Ba as S,ci as T,oi as U,hi as V,Er as W,ve as X,Ia as Y,li as Z,ua as _,mn as a,Ke as a$,ai as a0,Qi as a1,vr as a2,Fa as a3,Sa as a4,di as a5,si as a6,Ja as a7,ka as a8,Na as a9,Mc as aA,Un as aB,kt as aC,_n as aD,St as aE,hr as aF,Qe as aG,Nt as aH,Ha as aI,As as aJ,Lc as aK,Ht as aL,ki as aM,Ot as aN,Ps as aO,K as aP,j0 as aQ,Oe as aR,va as aS,mr as aT,P0 as aU,Uc as aV,No as aW,Vo as aX,Do as aY,pr as aZ,Qr as a_,it as aa,Rn as ab,Dn as ac,zi as ad,Ci as ae,Q as af,Gi as ag,nt as ah,es as ai,ts as aj,Pe as ak,gr as al,et as am,st as an,Xi as ao,Cn as ap,Xo as aq,Aa as ar,Pa as as,$a as at,Ea as au,Uo as av,_o as aw,$0 as ax,N0 as ay,jo as az,a0 as b,gs as b$,o0 as b0,ws as b1,os as b2,is as b3,A0 as b4,Pr as b5,Ln as b6,ja as b7,Ko as b8,N as b9,dc as bA,Ve as bB,cc as bC,fo as bD,ac as bE,oc as bF,T0 as bG,Vt as bH,uc as bI,tc as bJ,S0 as bK,lo as bL,nc as bM,lc as bN,Ga as bO,Ca as bP,Xr as bQ,Mi as bR,ec as bS,Ge as bT,Kt as bU,yi as bV,Fi as bW,y0 as bX,R as bY,pe as bZ,Ya as b_,W0 as ba,Rt as bb,ga as bc,ma as bd,Nc as be,Ra as bf,fa as bg,he as bh,Oc as bi,ss as bj,La as bk,ns as bl,Ua as bm,ae as bn,Es as bo,Wn as bp,za as bq,zt as br,le as bs,We as bt,Ae as bu,sc as bv,rc as bw,ic as bx,co as by,fc as bz,Mt as c,hc as c0,$e as c1,qr as c2,Cc as c3,Ee as c4,F as c5,vc as c6,q as c7,M0 as c8,Ac as c9,Ta as cA,Qa as cB,br as cC,oo as cD,Jo as cE,jt as cF,ya as cG,_c as cH,Z0 as cI,Gc as cJ,Oa as cK,Ma as cL,yc as cM,bc as cN,_0 as cO,zc as cP,Co as cQ,Sc as cR,G0 as ca,Tc as cb,Bc as cc,pc as cd,kc as ce,wc as cf,mc as cg,xc as ch,gc as ci,Pc as cj,Io as ck,L0 as cl,Ic as cm,Mo as cn,U0 as co,Fc as cp,vn as cq,ze as cr,Rs as cs,Go as ct,Ho as cu,ha as cv,pa as cw,Me as cx,Hc as cy,R0 as cz,Fs as d,Ss as e,Ts as f,Da as g,Va as h,c0 as i,Wa as j,ks as k,zs as l,Ze as m,Cs as n,Ka as o,qi as p,da as q,Za as r,xt as s,as as t,cs as u,bi as v,Qn as w,no as x,ro as y,so as z};
|