@dcl/blog-site 0.2.3-24088316758.commit-34384cf → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{QueryClientProvider-DFnrqjxK.js → QueryClientProvider-DVt1z-lo.js} +1 -1
- package/assets/{SignInRedirect-YsS_y43O.js → SignInRedirect-DQ2EXIlf.js} +2 -2
- package/assets/{X-DQRyaTAP.js → X-_bf2yze4.js} +1 -1
- package/assets/{__federation_expose_App-BWDr6ljs.js → __federation_expose_App-DpSY-Y9d.js} +1 -1
- package/assets/{__federation_fn_import-DsoKw508.js → __federation_fn_import-D82-s3kA.js} +1 -1
- package/assets/__federation_shared_@dcl/{hooks-P78bsY9M.js → hooks-35itWugh.js} +3 -3
- package/assets/__federation_shared_@emotion/react-LISJiiTk.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-CtXq_gFe.js → styled-CER0OT-8.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-DRl5ehN-.js → __federation_shared_decentraland-ui2-qV0BHWTj.js} +6 -6
- package/assets/{__federation_shared_react-redux-DRaqgPHP.js → __federation_shared_react-redux-7pAtHZvO.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-ClUJIur8.js → __federation_shared_react-router-dom-DM3U0-DJ.js} +1 -1
- package/assets/{__federation_shared_viem-OkDZ_da3.js → __federation_shared_viem-B7de3aIh.js} +1 -1
- package/assets/{__federation_shared_wagmi-DxQyjTpB.js → __federation_shared_wagmi-B-FL62eC.js} +1 -1
- package/assets/{add-BJhrLyz2.js → add-D95ShjVd.js} +1 -1
- package/assets/{all-wallets-BKl1d9ay.js → all-wallets-BY6r5fcR.js} +1 -1
- package/assets/{app-store-Cz4wx5Ml.js → app-store-SmbPBgEb.js} +1 -1
- package/assets/{apple-ZB0nqM0P.js → apple-D8pqe3de.js} +1 -1
- package/assets/{arrow-bottom-DPabveW2.js → arrow-bottom-DQy0lFo0.js} +1 -1
- package/assets/{arrow-bottom-circle-qQ6xlCaO.js → arrow-bottom-circle-OyHlN-U-.js} +1 -1
- package/assets/{arrow-left-D_0jfro8.js → arrow-left-CXPqeZRE.js} +1 -1
- package/assets/{arrow-right-Bxr-_0TM.js → arrow-right-BI45gebZ.js} +1 -1
- package/assets/{arrow-top-CcZJfPaY.js → arrow-top-BxYGxPQg.js} +1 -1
- package/assets/{auto-track-CXTejErn.js → auto-track-IXpT7xap.js} +1 -1
- package/assets/{bank-qzSNVmpL.js → bank-DvWpLZQG.js} +1 -1
- package/assets/{basic-CriAqicR.js → basic-DENnvNSD.js} +1 -1
- package/assets/{biconomy-7PcFs3b0.js → biconomy-GzbQEJRq.js} +1 -1
- package/assets/{browser-B01ZPlHW.js → browser-COUlM8GK.js} +1 -1
- package/assets/{card-C8yazSyG.js → card-DCZ4hxW7.js} +1 -1
- package/assets/{ccip-D0tvzkwi.js → ccip-DGW5U0-8.js} +1 -1
- package/assets/{checkmark-DEpAI8yr.js → checkmark-C3MmlUGU.js} +1 -1
- package/assets/{checkmark-bold-CmJidmVJ.js → checkmark-bold-BZz12uQW.js} +1 -1
- package/assets/{chevron-bottom-DWsbL4vJ.js → chevron-bottom-BITHvcvn.js} +1 -1
- package/assets/{chevron-left-DLMg9i5k.js → chevron-left-DLcgw6J3.js} +1 -1
- package/assets/{chevron-right-BR2L5tDn.js → chevron-right-CgvlwKH_.js} +1 -1
- package/assets/{chevron-top-BWtZfQ2F.js → chevron-top-E2kQk6Yb.js} +1 -1
- package/assets/{chrome-store-BGE1p2Hx.js → chrome-store-IGBWJmfs.js} +1 -1
- package/assets/{clock-B12ZBUD7.js → clock-Dnnqv_UX.js} +1 -1
- package/assets/{close-B54jTe2O.js → close-h_pw4dRD.js} +1 -1
- package/assets/{coinPlaceholder-B5PhQfVg.js → coinPlaceholder-CpzdwguN.js} +1 -1
- package/assets/{compass-CEs6S01I.js → compass-CLIqD2Io.js} +1 -1
- package/assets/{controller-n5F8mc3X.js → controller-DOHoljGI.js} +2 -2
- package/assets/{copy-DwrKUUfz.js → copy-56eIYa9K.js} +1 -1
- package/assets/{core-DPOUi4Tl.js → core-iy2F1EJT.js} +3 -3
- package/assets/{createBundlerClient-YqcE2yqs.js → createBundlerClient-Cb3DWn31.js} +1 -1
- package/assets/{createClient-BxHhKlNq.js → createClient-BJ5w543s.js} +1 -1
- package/assets/{cursor-CGBFNPoh.js → cursor-DHAIalN2.js} +1 -1
- package/assets/{cursor-transparent-D3nfFufs.js → cursor-transparent-USINvuuv.js} +1 -1
- package/assets/{decimals-D0IunObY.js → decimals-CVjZGYo0.js} +1 -1
- package/assets/{decimals-BMO-32AD.js → decimals-DIZDmdnI.js} +1 -1
- package/assets/{desktop-Bjkc6WkG.js → desktop-Ck9zNNDL.js} +1 -1
- package/assets/{detectExtension-BEr9WLqO.js → detectExtension-DQNsMd7m.js} +1 -1
- package/assets/{disconnect-D9dYAsxs.js → disconnect-B6rD3ARw.js} +1 -1
- package/assets/{discord-DZuYBrqS.js → discord-QyDy6H2Z.js} +1 -1
- package/assets/{emotion-react.browser.esm-Ce2LppU1.js → emotion-react.browser.esm-BHtRLI5r.js} +1 -1
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-ByQDcQjl.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-DxyPSsfO.js} +1 -1
- package/assets/{encode-cHgp5mHv.js → encode-JOmK-dAM.js} +2 -2
- package/assets/{engine-BVbFCTQK.js → engine-Cr6ElJJw.js} +1 -1
- package/assets/{estimate-gas-DBgT8NWo.js → estimate-gas-CMPxVjuF.js} +3 -3
- package/assets/{estimate-l1-fee-C2ptcVct.js → estimate-l1-fee-B90S_dRF.js} +1 -1
- package/assets/{eth_getStorageAt-B9Y_JVAm.js → eth_getStorageAt-BzWA0XEw.js} +1 -1
- package/assets/{etherscan-oUtlOsmK.js → etherscan-BSyc5b_s.js} +1 -1
- package/assets/{exclamation-triangle-BdB5oh3a.js → exclamation-triangle-Cbq68j9M.js} +1 -1
- package/assets/{extension-CjK6xfgN.js → extension-Ef7aJ2Fj.js} +1 -1
- package/assets/{external-link-dD0-Gy7Y.js → external-link-bVFEWzQf.js} +1 -1
- package/assets/{extractIPFS-BN8-L65J.js → extractIPFS-kNuMOSPp.js} +1 -1
- package/assets/{facebook-CInWYo4e.js → facebook-KWDQXnqW.js} +1 -1
- package/assets/{farcaster-Dk7xCnWZ.js → farcaster-OZKU6ag9.js} +1 -1
- package/assets/{fee-data-DBS1-uI-.js → fee-data-BCMgs11D.js} +1 -1
- package/assets/{fetchTokenMetadata-sBUH3xE3.js → fetchTokenMetadata-BPHUGga-.js} +2 -2
- package/assets/{filters-CQJE56FO.js → filters-hVFxrfbM.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-DkhEjWQL.js → get-ecosystem-wallet-info-mPW-S8xG.js} +1 -1
- package/assets/{getBalance-NroDyfvQ.js → getBalance-B1iUU342.js} +1 -1
- package/assets/{getInstalledModules-DFAdG78-.js → getInstalledModules-BnNuIBJw.js} +1 -1
- package/assets/{getNFT-CM6jDDoS.js → getNFT-BPxN7Ctt.js} +1 -1
- package/assets/{getNFT-CZphITDU.js → getNFT-DF0DVjz_.js} +2 -2
- package/assets/{github-D7bNXBE_.js → github-BzQnkFuN.js} +1 -1
- package/assets/{google-C7wxpdtc.js → google-Gdkba30S.js} +1 -1
- package/assets/{help-circle-jHfnx5-M.js → help-circle-CzuLd4UT.js} +1 -1
- package/assets/{id-B0bg6br2.js → id--DiZoCMN.js} +1 -1
- package/assets/{image-CFkOYVVZ.js → image-S2doqbWs.js} +1 -1
- package/assets/{in-app-wallet-calls-CUJMAfNk.js → in-app-wallet-calls-C1SY2oWN.js} +1 -1
- package/assets/{index-DyFSxszr.js → index-1ERaFZsE.js} +1 -1
- package/assets/index-BjzJcZq6.js +1 -1
- package/assets/{index-B6POK61z.js → index-C52TjtZ8.js} +1 -1
- package/assets/{index-CgabfD28.js → index-CH2z5aZN.js} +2 -2
- package/assets/{index-C9ZtSkAF.js → index-CfDhCkmV.js} +1 -1
- package/assets/{index-p2T8GhRA.js → index-CgkAqmHX.js} +1 -1
- package/assets/{index-C2t4sTPE.js → index-CwwTvCG6.js} +1 -1
- package/assets/{index-BgKyyaW6.js → index-D7VWCQbE.js} +1 -1
- package/assets/index-DIxygMtO.js +1 -0
- package/assets/{index-CDUZj6Gh.js → index-Dg2V4ned.js} +1 -1
- package/assets/index-Dy0yjznp.js +1 -1
- package/assets/{index-DuUs6XE9.js → index-T692f3s9.js} +1 -1
- package/assets/{index-BqaO8h_q.js → index-b9i0Ibxp.js} +2 -2
- package/assets/{index-CK_y9rJC.js → index-f2LDpGwT.js} +3 -3
- package/assets/{index-HwVh-q7L.js → index-ww85HWCV.js} +1 -1
- package/assets/{index.es-DiIxomE4.js → index.es-CzqZMQ08.js} +3 -3
- package/assets/{index.es-C4uogg3R.js → index.es-D_Iyl52g.js} +1 -1
- package/assets/{info-a5qnZWSp.js → info-DEpm9K4l.js} +1 -1
- package/assets/{info-circle-CtpHiT1K.js → info-circle-BFBSJV6L.js} +1 -1
- package/assets/jsx-runtime-DncYoG30.js +1 -1
- package/assets/{lightbulb-Cedc0rYJ.js → lightbulb-GZWMuOVt.js} +1 -1
- package/assets/{localBatchGatewayRequest-xHNW-Ehl.js → localBatchGatewayRequest-Df9EBRM7.js} +1 -1
- package/assets/{mail-D96xVokz.js → mail-CUdb6dNj.js} +1 -1
- package/assets/{mobile-DsDxm8mI.js → mobile-BeQz2cn_.js} +1 -1
- package/assets/{more-BedDVxwf.js → more-TsN-CR-t.js} +1 -1
- package/assets/{network-placeholder-CpA4BghL.js → network-placeholder-DwFC6B_7.js} +1 -1
- package/assets/{nftPlaceholder-E0nNrT1f.js → nftPlaceholder-CiT4A3-l.js} +1 -1
- package/assets/{off-C8YtcDJA.js → off-CUv-83kc.js} +1 -1
- package/assets/{openzeppelin-CQer_fI1.js → openzeppelin-BBJIIsPB.js} +1 -1
- package/assets/{ownerOf-GjaKoeq1.js → ownerOf-DYtTCeNU.js} +1 -1
- package/assets/{parseNft-CxF6cVbB.js → parseNft-Buclbv5Y.js} +2 -2
- package/assets/{play-store-wzv988wO.js → play-store-RQqRTPUT.js} +1 -1
- package/assets/{plus-BOnP2W3B.js → plus-C7MITUNH.js} +1 -1
- package/assets/preload-helper-BokH5fd6.js +1 -0
- package/assets/{qr-code-5Zy3Jwmz.js → qr-code-CpEPSAYR.js} +1 -1
- package/assets/{qr-overlay-qPTQSVWY.js → qr-overlay-DryFOQCX.js} +1 -1
- package/assets/{recycle-horizontal-BiLXE1ph.js → recycle-horizontal-B1QKxNTd.js} +1 -1
- package/assets/{refresh-DrIaQxXR.js → refresh-DdqLkUQx.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-C50d_2u-.js → reown-logo-_t3NoThE.js} +1 -1
- package/assets/{resolveImplementation-Bp817C6y.js → resolveImplementation--gaCsV-s.js} +1 -1
- package/assets/{search-CtoMI8IW.js → search-B8WbQmvE.js} +1 -1
- package/assets/{secp256k1-lKd37s6b.js → secp256k1-DtCHzlC3.js} +1 -1
- package/assets/{send-DjyS4WAU.js → send-BFNT_o0R.js} +1 -1
- package/assets/{send-batch-transaction-DBV6UBBv.js → send-batch-transaction-ZanhTs8a.js} +1 -1
- package/assets/{send-eip712-transaction-CI65hvCl.js → send-eip712-transaction-CxRy-sD1.js} +2 -2
- package/assets/{send-gasless-transaction-C7lHksJD.js → send-gasless-transaction-Iz8ZLiHO.js} +2 -2
- package/assets/{serializeTransaction-6LlbmJwH.js → serializeTransaction-BufQeOel.js} +1 -1
- package/assets/{session-proposal-BJ6dUV4k.js → session-proposal-BD47nRI-.js} +1 -1
- package/assets/{session-request-Cen_JpY8.js → session-request-TkgpbjLp.js} +2 -2
- package/assets/{signing-BsPRCC1P.js → signing-TLGj9K79.js} +3 -3
- package/assets/{swapHorizontal-DUMDblJm.js → swapHorizontal-BiFAMUuS.js} +1 -1
- package/assets/{swapHorizontalBold-Du4gzczl.js → swapHorizontalBold-CP3dUSZb.js} +1 -1
- package/assets/{swapHorizontalMedium-BkSTzo9o.js → swapHorizontalMedium-BRNlkDrO.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-CQD5i-I5.js → swapHorizontalRoundedBold-CHqEVcBs.js} +1 -1
- package/assets/{swapVertical-CjSXuBHb.js → swapVertical-Du0QoNAI.js} +1 -1
- package/assets/{telegram-uAGG8XwG.js → telegram-DQef1ILU.js} +1 -1
- package/assets/{thirdweb-DOoFBA7F.js → thirdweb-E-fErz2x.js} +3 -3
- package/assets/{three-dots-BWtFKrpY.js → three-dots-ByXtSGCV.js} +1 -1
- package/assets/{totalSupply-CjCaaPZD.js → totalSupply-DNIfxfBv.js} +1 -1
- package/assets/{twitch-VH9Dk-Bx.js → twitch-DIxDFqku.js} +1 -1
- package/assets/{twitterIcon-Bfs32uTm.js → twitterIcon-B-SNXvpz.js} +1 -1
- package/assets/{uid-XfAtrElX.js → uid-Bq9ktEE-.js} +3 -3
- package/assets/{verify-4fUj-WRm.js → verify-BT-sFhiZ.js} +1 -1
- package/assets/{verify-filled-sllS8Nrv.js → verify-filled-DUDJcSxD.js} +1 -1
- package/assets/{w3m-modal-Blb5XI95.js → w3m-modal-Ck71GkBa.js} +1 -1
- package/assets/{wait-for-tx-receipt-BR33kfvc.js → wait-for-tx-receipt-C5afrCK7.js} +1 -1
- package/assets/{wallet-DuQpuU5E.js → wallet-DiXkPY80.js} +1 -1
- package/assets/{wallet-placeholder-CERukyIC.js → wallet-placeholder-DHuJakoz.js} +1 -1
- package/assets/{walletconnect-CsB9GzlO.js → walletconnect-LtvddLlL.js} +1 -1
- package/assets/{wallets-vcnqEomN.js → wallets-BmZ-KVbp.js} +5 -5
- package/assets/{warning-circle-C8yGFMlX.js → warning-circle-DEf5ta8Y.js} +1 -1
- package/assets/{web-connector-Jj-2yhMg.js → web-connector-6KYcG8gr.js} +3 -3
- package/assets/{webSocket-BfTFTYzP.js → webSocket-2Mm3WVrI.js} +1 -1
- package/assets/{x-BXVsZnMK.js → x-Cl1yAHbN.js} +1 -1
- package/index.html +17 -17
- package/package.json +2 -2
- package/assets/__federation_shared_@emotion/react-CtCvVI4H.js +0 -1
- package/assets/index-Dot3cU3_.js +0 -1
- package/assets/preload-helper-2M-6abck.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["assets/ccip-
|
|
2
|
-
import{_ as Hn}from"./preload-helper-
|
|
1
|
+
const __vite__fileDeps=["assets/ccip-DGW5U0-8.js","assets/localBatchGatewayRequest-Df9EBRM7.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{_ as Hn}from"./preload-helper-BokH5fd6.js";const _n="2.44.2";let ze={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${_n}`};function x0(e){ze=e}let l=class ft extends Error{constructor(t,n={}){const r=n.cause instanceof ft?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof ft&&n.cause.docsPath||n.docsPath,a=ze.getDocsUrl?.({...n,docsPath:s}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...ze.version?[`Version: ${ze.version}`]:[]].join(`
|
|
3
3
|
`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{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,"metaMessages",{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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=_n}walk(t){return Vn(this,t)}};function Vn(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Vn(e.cause,t):t?null:e}let Ft=class extends l{constructor({max:t,min:n,signed:r,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}};class ps extends l{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class bs extends l{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}let P0=class extends l{constructor(t){super(`Hex value "${t}" is an odd length (${t.length}). It must be an even length.`,{name:"InvalidHexValueError"})}},ys=class extends l{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function oe(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function T(e){return oe(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function ae(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}let qn=class extends l{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},Wn=class extends l{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class Pn extends l{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function we(e,{dir:t,size:n=32}={}){return typeof e=="string"?ie(e,{dir:t,size:n}):ms(e,{dir:t,size:n})}function ie(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Wn({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function ms(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Wn({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let s=0;s<n;s++){const a=t==="right";r[a?s:n-s-1]=e[a?s:e.length-s-1]}return r}const hs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function me(e,t={}){return typeof e=="number"||typeof e=="bigint"?P(e,t):typeof e=="string"?Zn(e,t):typeof e=="boolean"?Kn(e,t):S(e,t)}function Kn(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(G(n,{size:t.size}),we(n,{size:t.size})):n}function S(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=hs[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(G(r,{size:t.size}),we(r,{dir:"right",size:t.size})):r}function P(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let a;r?n?a=(1n<<BigInt(r)*8n-1n)-1n:a=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<i){const c=typeof e=="bigint"?"n":"";throw new Ft({max:a?`${a}${c}`:void 0,min:`${i}${c}`,signed:n,size:r,value:`${e}${c}`})}const o=`0x${(n&&s<0?(1n<<BigInt(r*8))+BigInt(s):s).toString(16)}`;return r?we(o,{size:r}):o}const gs=new TextEncoder;function Zn(e,t={}){const n=gs.encode(e);return S(n,t)}const ws=new TextEncoder;function Ot(e,t={}){return typeof e=="number"||typeof e=="bigint"?vs(e,t):typeof e=="boolean"?xs(e,t):oe(e)?_(e,t):Jn(e,t)}function xs(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(G(n,{size:t.size}),we(n,{size:t.size})):n}const J={zero:48,nine:57,A:65,F:70,a:97,f:102};function $n(e){if(e>=J.zero&&e<=J.nine)return e-J.zero;if(e>=J.A&&e<=J.F)return e-(J.A-10);if(e>=J.a&&e<=J.f)return e-(J.a-10)}function _(e,t={}){let n=e;t.size&&(G(n,{size:t.size}),n=we(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const s=r.length/2,a=new Uint8Array(s);for(let i=0,o=0;i<s;i++){const c=$n(r.charCodeAt(o++)),d=$n(r.charCodeAt(o++));if(c===void 0||d===void 0)throw new l(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);a[i]=c*16+d}return a}function vs(e,t){const n=P(e,t);return _(n)}function Jn(e,t={}){const n=ws.encode(e);return typeof t.size=="number"?(G(n,{size:t.size}),we(n,{dir:"right",size:t.size})):n}function G(e,{size:t}){if(T(e)>t)throw new ys({givenSize:T(e),maxSize:t})}function A0(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?K(e,n):r==="bigint"?Y(e,n):r==="string"?$s(e,n):r==="boolean"?Ps(e,n):_(e,n)}function Y(e,t={}){const{signed:n}=t;t.size&&G(e,{size:t.size});const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return r<=a?r:r-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function Ps(e,t={}){let n=e;if(t.size&&(G(n,{size:t.size}),n=ae(n)),ae(n)==="0x00")return!1;if(ae(n)==="0x01")return!0;throw new bs(n)}function K(e,t={}){const n=Y(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Ft({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function $s(e,t={}){let n=_(e);return t.size&&(G(n,{size:t.size}),n=ae(n,{dir:"right"})),new TextDecoder().decode(n)}function Le(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,a)=>{const i=t(s,a);if(n)for(const o of n)delete i[o];return{...i,...r(s,a)}},type:e})}const Xn={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ct(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?K(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?K(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Xn[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=Es(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 M0=Le("transaction",Ct);function Es(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 Yn(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:Ct(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 B0=Le("block",Yn);function Is(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 Qn={"0x0":"reverted","0x1":"success"};function Ts(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=>Is(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?K(e.transactionIndex):null,status:e.status?Qn[e.status]:null,type:e.type?Xn[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const S0=Le("transactionReceipt",Ts),As={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Te(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=Ms(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=>S(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=P(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=P(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=P(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=P(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=P(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=P(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=As[e.type]),typeof e.value<"u"&&(n.value=P(e.value)),n}const F0=Le("transactionRequest",Te);function Ms(e){return e.map(t=>({address:t.address,r:t.r?P(BigInt(t.r)):t.r,s:t.s?P(BigInt(t.s)):t.s,chainId:P(t.chainId),nonce:P(t.nonce),...typeof t.yParity<"u"?{yParity:P(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:P(t.v)}:{}}))}const O0=2n**(8n-1n)-1n,C0=2n**(16n-1n)-1n,z0=2n**(24n-1n)-1n,k0=2n**(32n-1n)-1n,R0=2n**(40n-1n)-1n,j0=2n**(48n-1n)-1n,U0=2n**(56n-1n)-1n,N0=2n**(64n-1n)-1n,G0=2n**(72n-1n)-1n,L0=2n**(80n-1n)-1n,D0=2n**(88n-1n)-1n,H0=2n**(96n-1n)-1n,_0=2n**(104n-1n)-1n,V0=2n**(112n-1n)-1n,q0=2n**(120n-1n)-1n,W0=2n**(128n-1n)-1n,K0=2n**(136n-1n)-1n,Z0=2n**(144n-1n)-1n,J0=2n**(152n-1n)-1n,X0=2n**(160n-1n)-1n,Y0=2n**(168n-1n)-1n,Q0=2n**(176n-1n)-1n,ec=2n**(184n-1n)-1n,tc=2n**(192n-1n)-1n,nc=2n**(200n-1n)-1n,rc=2n**(208n-1n)-1n,sc=2n**(216n-1n)-1n,ac=2n**(224n-1n)-1n,ic=2n**(232n-1n)-1n,oc=2n**(240n-1n)-1n,cc=2n**(248n-1n)-1n,uc=2n**(256n-1n)-1n,dc=-(2n**(8n-1n)),fc=-(2n**(16n-1n)),lc=-(2n**(24n-1n)),pc=-(2n**(32n-1n)),bc=-(2n**(40n-1n)),yc=-(2n**(48n-1n)),mc=-(2n**(56n-1n)),hc=-(2n**(64n-1n)),gc=-(2n**(72n-1n)),wc=-(2n**(80n-1n)),xc=-(2n**(88n-1n)),vc=-(2n**(96n-1n)),Pc=-(2n**(104n-1n)),$c=-(2n**(112n-1n)),Ec=-(2n**(120n-1n)),Ic=-(2n**(128n-1n)),Tc=-(2n**(136n-1n)),Ac=-(2n**(144n-1n)),Mc=-(2n**(152n-1n)),Bc=-(2n**(160n-1n)),Sc=-(2n**(168n-1n)),Fc=-(2n**(176n-1n)),Oc=-(2n**(184n-1n)),Cc=-(2n**(192n-1n)),zc=-(2n**(200n-1n)),kc=-(2n**(208n-1n)),Rc=-(2n**(216n-1n)),jc=-(2n**(224n-1n)),Uc=-(2n**(232n-1n)),Nc=-(2n**(240n-1n)),Gc=-(2n**(248n-1n)),Lc=-(2n**(256n-1n)),Dc=2n**8n-1n,Hc=2n**16n-1n,_c=2n**24n-1n,Vc=2n**32n-1n,qc=2n**40n-1n,Wc=2n**48n-1n,Kc=2n**56n-1n,Zc=2n**64n-1n,Jc=2n**72n-1n,Xc=2n**80n-1n,Yc=2n**88n-1n,Qc=2n**96n-1n,eu=2n**104n-1n,tu=2n**112n-1n,nu=2n**120n-1n,ru=2n**128n-1n,su=2n**136n-1n,au=2n**144n-1n,iu=2n**152n-1n,ou=2n**160n-1n,cu=2n**168n-1n,uu=2n**176n-1n,du=2n**184n-1n,fu=2n**192n-1n,lu=2n**200n-1n,pu=2n**208n-1n,bu=2n**216n-1n,yu=2n**224n-1n,mu=2n**232n-1n,hu=2n**240n-1n,gu=2n**248n-1n,Bs=2n**256n-1n;function Q(e){return typeof e[0]=="string"?De(e):Ss(e)}function Ss(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 De(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class En extends l{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Fs extends l{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class Os extends l{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Cs={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 Os({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Fs({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new En({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 En({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 zt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Cs);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function kt(e,t="hex"){const n=er(e),r=zt(new Uint8Array(n.length));return n.encode(r),t==="hex"?S(r.bytes):r.bytes}function wu(e,t="bytes"){return kt(e,t)}function xu(e,t="hex"){return kt(e,t)}function er(e){return Array.isArray(e)?zs(e.map(t=>er(t))):ks(e)}function zs(e){const t=e.reduce((s,a)=>s+a.length,0),n=tr(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:a}of e)a(s)}}}function ks(e){const t=typeof e=="string"?_(e):e,n=tr(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 tr(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 l("Length is too large.")}const Rs={gwei:9,wei:18},js={ether:-9,wei:9},vu={ether:-18,gwei:-9};function nr(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${s||"0"}${a?`.${a}`:""}`}function Rt(e,t="wei"){return nr(e,Rs[t])}function z(e,t="wei"){return nr(e,js[t])}function Ae(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(`
|
|
4
4
|
`)}class Pu extends l{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
|
|
5
5
|
`),{name:"FeeConflictError"})}}class $u extends l{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Us extends l{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Ae(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 Eu extends l{constructor({serializedType:t}){super(`Serialized transaction type "${t}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=t}}class Iu extends l{constructor({attributes:t,serializedTransaction:n,type:r}){const s=Object.entries(t).map(([a,i])=>typeof i>"u"?a:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${n}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=n,this.type=r}}class Tu extends l{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 Ns extends l{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:i,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:u,to:f,value:b}){const p=Ae({chain:s&&`${s?.name} (id: ${s?.id})`,from:n?.address,to:f,value:typeof b<"u"&&`${Rt(b)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:i,gasPrice:typeof o<"u"&&`${z(o)} gwei`,maxFeePerGas:typeof c<"u"&&`${z(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${z(d)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",p].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Au extends l{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:s,index:a}){let i="Transaction";r&&a!==void 0&&(i=`Transaction at block time "${r}" at index "${a}"`),t&&a!==void 0&&(i=`Transaction at block hash "${t}" at index "${a}"`),n&&a!==void 0&&(i=`Transaction at block number "${n}" at index "${a}"`),s&&(i=`Transaction with hash "${s}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class Mu extends l{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 Bu extends l{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 Su extends l{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function rr(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(a=>_(a)):e.blobs,s=[];for(const a of r)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return n==="bytes"?s:s.map(a=>S(a))}function sr(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=>_(i)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(i=>_(i)):e.commitments,a=[];for(let i=0;i<r.length;i++){const o=r[i],c=s[i];a.push(Uint8Array.from(t.computeBlobKzgProof(o,c)))}return n==="bytes"?a:a.map(i=>S(i))}const pe=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Gs(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ke(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function he(e,...t){if(!Gs(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 Fu(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ke(e.outputLen),ke(e.blockLen)}function Re(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 ar(e,t){he(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Ls(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function $e(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function Ou(e,t){return e<<t|e>>>32-t>>>0}const Ds=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Hs(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function _s(e){for(let t=0;t<e.length;t++)e[t]=Hs(e[t]);return e}const In=Ds?e=>e:_s;function Vs(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function jt(e){return typeof e=="string"&&(e=Vs(e)),he(e),e}function Cu(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];he(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const a=e[r];n.set(a,s),s+=a.length}return n}class ir{}function or(e){const t=r=>e().update(jt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function zu(e=32){if(pe&&typeof pe.getRandomValues=="function")return pe.getRandomValues(new Uint8Array(e));if(pe&&typeof pe.randomBytes=="function")return Uint8Array.from(pe.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function qs(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),a=BigInt(4294967295),i=Number(n>>s&a),o=Number(n&a),c=r?4:0,d=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+d,o,r)}function Ws(e,t,n){return e&t^~e&n}function Ks(e,t,n){return e&t^e&n^t&n}class Zs extends ir{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=et(this.buffer)}update(t){Re(this),t=jt(t),he(t);const{view:n,buffer:r,blockLen:s}=this,a=t.length;for(let i=0;i<a;){const o=Math.min(s-this.pos,a-i);if(o===s){const c=et(t);for(;s<=a-i;i+=s)this.process(c,i);continue}r.set(t.subarray(i,i+o),this.pos),this.pos+=o,i+=o,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Re(this),ar(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:a}=this;let{pos:i}=this;n[i++]=128,$e(this.buffer.subarray(i)),this.padOffset>s-i&&(this.process(r,0),i=0);for(let f=i;f<s;f++)n[f]=0;qs(r,s-8,BigInt(this.length*8),a),this.process(r,0);const o=et(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,u=this.get();if(d>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<d;f++)o.setUint32(4*f,u[f],a)}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:a,destroyed:i,pos:o}=this;return t.destroyed=i,t.finished=a,t.length=s,t.pos=o,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const re=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Fe=BigInt(2**32-1),Tn=BigInt(32);function Js(e,t=!1){return t?{h:Number(e&Fe),l:Number(e>>Tn&Fe)}:{h:Number(e>>Tn&Fe)|0,l:Number(e&Fe)|0}}function Xs(e,t=!1){const n=e.length;let r=new Uint32Array(n),s=new Uint32Array(n);for(let a=0;a<n;a++){const{h:i,l:o}=Js(e[a],t);[r[a],s[a]]=[i,o]}return[r,s]}const Ys=(e,t,n)=>e<<n|t>>>32-n,Qs=(e,t,n)=>t<<n|e>>>32-n,ea=(e,t,n)=>t<<n-32|e>>>64-n,ta=(e,t,n)=>e<<n-32|t>>>64-n,na=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 ra extends Zs{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:a,F:i,G:o,H:c}=this;return[t,n,r,s,a,i,o,c]}set(t,n,r,s,a,i,o,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=a|0,this.F=i|0,this.G=o|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)se[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const b=se[f-15],p=se[f-2],y=q(b,7)^q(b,18)^b>>>3,h=q(p,17)^q(p,19)^p>>>10;se[f]=h+se[f-7]+y+se[f-16]|0}let{A:r,B:s,C:a,D:i,E:o,F:c,G:d,H:u}=this;for(let f=0;f<64;f++){const b=q(o,6)^q(o,11)^q(o,25),p=u+b+Ws(o,c,d)+na[f]+se[f]|0,h=(q(r,2)^q(r,13)^q(r,22))+Ks(r,s,a)|0;u=d,d=c,c=o,o=i+p|0,i=a,a=s,s=r,r=p+h|0}r=r+this.A|0,s=s+this.B|0,a=a+this.C|0,i=i+this.D|0,o=o+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,s,a,i,o,c,d,u)}roundClean(){$e(se)}destroy(){this.set(0,0,0,0,0,0,0,0),$e(this.buffer)}}const sa=or(()=>new ra),aa=sa;function ia(e,t){const n=t||"hex",r=aa(oe(e,{strict:!1})?Ot(e):e);return n==="bytes"?r:me(r)}function oa(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=ia(t,"bytes");return s.set([n],0),r==="bytes"?s:S(s)}function ca(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(oa({commitment:a,to:r,version:n}));return s}const An=6,cr=32,Ut=4096,ur=cr*Ut,Mn=ur*An-1-1*Ut*An,ua=1;class da extends l{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class fa extends l{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class ku extends l{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Ru extends l{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${ua}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function la(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?_(e.data):e.data,r=T(n);if(!r)throw new fa;if(r>Mn)throw new da({maxSize:Mn,size:r});const s=[];let a=!0,i=0;for(;a;){const o=zt(new Uint8Array(ur));let c=0;for(;c<Ut;){const d=n.slice(i,i+(cr-1));if(o.pushByte(0),o.pushBytes(d),d.length<31){o.pushByte(128),a=!1;break}c++,i+=31}s.push(o)}return t==="bytes"?s.map(o=>o.bytes):s.map(o=>S(o.bytes))}function pa(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??la({data:t,to:r}),a=e.commitments??rr({blobs:s,kzg:n,to:r}),i=e.proofs??sr({blobs:s,commitments:a,kzg:n,to:r}),o=[];for(let c=0;c<s.length;c++)o.push({blob:s[c],commitment:a[c],proof:i[c]});return o}class ce extends l{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 lt extends l{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 ba extends l{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 ya extends l{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(`
|
|
@@ -41,4 +41,4 @@ ${ao(p)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
41
41
|
`):`The contract function "${r}" reverted.`,{cause:a,metaMessages:o,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=i,this.raw=n,this.reason=c,this.signature=d}}class fo extends l{constructor({functionName:t}){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"})}}class lo extends l{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 Gr extends l{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}}class td extends l{constructor({body:t,cause:n,details:r,headers:s,status:a,url:i}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[a&&`Status: ${a}`,`URL: ${Me(i)}`,t&&`Request body: ${ue(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=s,this.status=a,this.url=i}}class nd extends l{constructor({body:t,cause:n,details:r,url:s}){super("WebSocket request failed.",{cause:n,details:r,metaMessages:[`URL: ${Me(s)}`,t&&`Request body: ${ue(t)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=s}}class Lr extends l{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Me(r)}`,`Request body: ${ue(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data,this.url=r}}class rd extends l{constructor({url:t}={}){super("The socket has been closed.",{metaMessages:[t&&`URL: ${Me(t)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}class sd extends l{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Me(n)}`,`Request body: ${ue(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const po=-1;class k extends l{constructor(t,{code:n,docsPath:r,metaMessages:s,name:a,shortMessage:i}){super(i,{cause:t,docsPath:r,metaMessages:s||t?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||t.name,this.code=t instanceof Lr?t.code:n??po}}class U extends k{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class qt extends k{constructor(t){super(t,{code:qt.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(qt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Wt extends k{constructor(t){super(t,{code:Wt.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Kt extends k{constructor(t,{method:n}={}){super(t,{code:Kt.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(Kt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Zt extends k{constructor(t){super(t,{code:Zt.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
42
42
|
`)})}}Object.defineProperty(Zt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ke extends k{constructor(t){super(t,{code:Ke.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ke,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Ze extends k{constructor(t){super(t,{code:Ze.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
43
43
|
`)})}}Object.defineProperty(Ze,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Jt extends k{constructor(t){super(t,{code:Jt.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Jt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Xt extends k{constructor(t){super(t,{code:Xt.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Xt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Yt extends k{constructor(t){super(t,{code:Yt.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Yt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Qt extends k{constructor(t,{method:n}={}){super(t,{code:Qt.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Qt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class en extends k{constructor(t){super(t,{code:en.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(en,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class tn extends k{constructor(t){super(t,{code:tn.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(tn,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class nn extends U{constructor(t){super(t,{code:nn.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(nn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class rn extends U{constructor(t){super(t,{code:rn.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(rn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class sn extends U{constructor(t,{method:n}={}){super(t,{code:sn.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(sn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class an extends U{constructor(t){super(t,{code:an.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(an,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class on extends U{constructor(t){super(t,{code:on.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(on,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class cn extends U{constructor(t){super(t,{code:cn.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(cn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Je extends U{constructor(t){super(t,{code:Je.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Je,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class un extends U{constructor(t){super(t,{code:un.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(un,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class dn extends U{constructor(t){super(t,{code:dn.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(dn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class fn extends U{constructor(t){super(t,{code:fn.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(fn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class ln extends U{constructor(t){super(t,{code:ln.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(ln,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class pn extends U{constructor(t){super(t,{code:pn.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(pn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Xe extends U{constructor(t){super(t,{code:Xe.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Xe,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class ad extends k{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function bn(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof l?e.walk(s=>s?.code===be.code):e;return r instanceof l?new be({cause:e,message:r.details}):be.nodeMessage.test(n)?new be({cause:e,message:e.details}):je.nodeMessage.test(n)?new je({cause:e,maxFeePerGas:t?.maxFeePerGas}):pt.nodeMessage.test(n)?new pt({cause:e,maxFeePerGas:t?.maxFeePerGas}):bt.nodeMessage.test(n)?new bt({cause:e,nonce:t?.nonce}):yt.nodeMessage.test(n)?new yt({cause:e,nonce:t?.nonce}):mt.nodeMessage.test(n)?new mt({cause:e,nonce:t?.nonce}):ht.nodeMessage.test(n)?new ht({cause:e}):gt.nodeMessage.test(n)?new gt({cause:e,gas:t?.gas}):wt.nodeMessage.test(n)?new wt({cause:e,gas:t?.gas}):xt.nodeMessage.test(n)?new xt({cause:e}):Ue.nodeMessage.test(n)?new Ue({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new He({cause:e})}function bo(e,{docsPath:t,...n}){const r=(()=>{const s=bn(e,n);return s instanceof He?e:s})();return new oo(r,{docsPath:t,...n})}function Ye(e,{format:t}){if(!t)return{};const n={};function r(a){const i=Object.keys(a);for(const o of i)o in e&&(n[o]=e[o]),a[o]&&typeof a[o]=="object"&&!Array.isArray(a[o])&&r(a[o])}const s=t(e||{});return r(s),n}function Be(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:s}=e,a=t?ee(t):void 0;if(a&&!V(a.address))throw new ce({address:a.address});if(s&&!V(s))throw new ce({address:s});if(n&&n>Bs)throw new je({maxFeePerGas:n});if(r&&n&&r>n)throw new Ue({maxFeePerGas:n,maxPriorityFeePerGas:r})}const yo="0.1.1";function mo(){return yo}class A extends Error{static setStaticOptions(t){A.prototype.docsOrigin=t.docsOrigin,A.prototype.showVersion=t.showVersion,A.prototype.version=t.version}constructor(t,n={}){const r=(()=>{if(n.cause instanceof A){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:n.cause?.message?n.cause.message:n.details})(),s=n.cause instanceof A&&n.cause.docsPath||n.docsPath,a=n.docsOrigin??A.prototype.docsOrigin,i=`${a}${s??""}`,o=!!(n.version??A.prototype.showVersion),c=n.version??A.prototype.version,d=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||s||o?["",r?`Details: ${r}`:void 0,s?`See: ${i}`:void 0,o?`Version: ${c}`:void 0]:[]].filter(u=>typeof u=="string").join(`
|
|
44
|
-
`);super(d,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=i,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=o,this.version=c}walk(t){return Dr(this,t)}}Object.defineProperty(A,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${mo()}`}});A.setStaticOptions(A.defaultStaticOptions);function Dr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Dr(e.cause,t):t?null:e}function yn(e,t){if(ge(e)>t)throw new Mo({givenSize:ge(e),maxSize:t})}function ho(e,t){if(typeof t=="number"&&t>0&&t>ge(e)-1)throw new Vr({offset:t,position:"start",size:ge(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ge(e)!==n-t)throw new Vr({offset:n,position:"end",size:ge(e)})}function Hr(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 Bo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function wo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let a=0;a<r.length-1&&r[n==="left"?a:r.length-a-1].toString()==="0";a++)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 xo="#__bigint";function vo(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+xo:s,n)}const Po=new TextEncoder,$o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Eo(e,t={}){const{strict:n=!1}=t;if(!e)throw new kn(e);if(typeof e!="string")throw new kn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Rn(e);if(!e.startsWith("0x"))throw new Rn(e)}function id(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function od(e){return e instanceof Uint8Array?At(e):Array.isArray(e)?At(new Uint8Array(e)):e}function cd(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(yn(n,t.size),_r(n,t.size)):n}function At(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=$o[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(yn(r,t.size),Io(r,t.size)):r}function X(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let a;r?n?a=(1n<<BigInt(r)*8n-1n)-1n:a=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<i){const d=typeof e=="bigint"?"n":"";throw new Ao({max:a?`${a}${d}`:void 0,min:`${i}${d}`,signed:n,size:r,value:`${e}${d}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?_r(c,r):c}function ud(e,t={}){return At(Po.encode(e),t)}function _r(e,t){return Hr(e,{dir:"left",size:t})}function Io(e,t){return Hr(e,{dir:"right",size:t})}function dd(e,t,n,r={}){const{strict:s}=r;ho(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(a,t,n),a}function ge(e){return Math.ceil((e.length-2)/2)}function fd(e){return wo(e,{dir:"left"})}function To(e,t={}){const{signed:n}=t;t.size&&yn(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,i=a>>1n;return r<=i?r:r-a-1n}function ld(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:To(e,t))}function pd(e,t={}){const{strict:n=!1}=t;try{return Eo(e,{strict:n}),!0}catch{return!1}}class Ao extends A{constructor({max:t,min:n,signed:r,size:s,value:a}){super(`Number \`${a}\` 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 kn extends A{constructor(t){super(`Value \`${typeof t=="object"?vo(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 Rn extends A{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 Mo extends A{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 Vr extends A{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 Bo extends A{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"})}}async function bd(e,{address:t,blockNumber:n,blockTag:r="latest"}){const s=n!==void 0?P(n):void 0,a=await e.request({method:"eth_getCode",params:[t,s||r]},{dedupe:!!s});if(a!=="0x")return a}const jn=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],yd=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],qr=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],md=[...qr,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],hd=[...qr,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],gd=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],wd=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],xd=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],vd=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Pd=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],$d=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],Ed=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],Id=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Td=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],So="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Fo="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Ad="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Oo="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",at="/docs/contract/encodeDeployData";function Wr(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(i=>"type"in i&&i.type==="constructor");if(!s)throw new ka({docsPath:at});if(!("inputs"in s))throw new Fn({docsPath:at});if(!s.inputs||s.inputs.length===0)throw new Fn({docsPath:at});const a=We(s.inputs,n);return De([r,a])}const Un="/docs/contract/encodeFunctionData";function Co(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const a=Vt({abi:t,args:n,name:r});if(!a)throw new Ge(r,{docsPath:Un});s=a}if(s.type!=="function")throw new Ge(void 0,{docsPath:Un});return{abi:[s],functionName:Lt(fe(s))}}function mn(e){const{args:t}=e,{abi:n,functionName:r}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Co(e),s=n[0],a=r,i="inputs"in s&&s.inputs?We(s.inputs,t??[]):void 0;return De([a,i??"0x"])}function Md(e,t){if(!V(e,{strict:!1}))throw new ce({address:e});if(!V(t,{strict:!1}))throw new ce({address:t});return e.toLowerCase()===t.toLowerCase()}function zo(e){const t=H(`0x${e.substring(4)}`).substring(26);return Ve(`0x${t}`)}async function ko({hash:e,signature:t}){const n=oe(e)?e:me(e),{secp256k1:r}=await Hn(async()=>{const{secp256k1:i}=await import("./secp256k1-lKd37s6b.js");return{secp256k1:i}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:d,s:u,v:f,yParity:b}=t,p=Number(b??f),y=Nn(p);return new r.Signature(Y(d),Y(u)).addRecoveryBit(y)}const i=oe(t)?t:me(t);if(T(i)!==65)throw new Error("invalid signature length");const o=K(`0x${i.slice(130)}`),c=Nn(o);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Nn(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 Ro({hash:e,signature:t}){return zo(await ko({hash:e,signature:t}))}function jo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,a=H(De(["0x05",kt([t?P(t):"0x",s,n?P(n):"0x"])]));return r==="bytes"?_(a):a}async function Kr(e){const{authorization:t,signature:n}=e;return Ro({hash:jo(t),signature:n??t})}function B(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:a=>t(e,a)}function Uo(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function No(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:X(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:X(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:X(e.gasLimit)},...typeof e.number=="bigint"&&{number:X(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:X(e.prevRandao)},...typeof e.time=="bigint"&&{time:X(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Uo)}}}const Go="0x82ad56cb",it="/docs/contract/decodeFunctionResult";function Zr(e){const{abi:t,args:n,functionName:r,data:s}=e;let a=t[0];if(r){const o=Vt({abi:t,args:n,name:r});if(!o)throw new Ge(r,{docsPath:it});a=o}if(a.type!=="function")throw new Ge(void 0,{docsPath:it});if(!a.outputs)throw new Ga(a.name,{docsPath:it});const i=jr(a.outputs,s);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}function Jr(){let e=()=>{},t=()=>{};return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}const ot=new Map;function Lo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:s}){const a=async()=>{const u=c();i();const f=u.map(({args:b})=>b);f.length!==0&&e(f).then(b=>{s&&Array.isArray(b)&&b.sort(s);for(let p=0;p<u.length;p++){const{resolve:y}=u[p];y?.([b[p],b])}}).catch(b=>{for(let p=0;p<u.length;p++){const{reject:y}=u[p];y?.(b)}})},i=()=>ot.delete(t),o=()=>c().map(({args:u})=>u),c=()=>ot.get(t)||[],d=u=>ot.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:b,reject:p}=Jr();return n?.([...o(),u])&&a(),c().length>0?(d({args:u,resolve:b,reject:p}),f):(d({args:u,resolve:b,reject:p}),setTimeout(a,r),f)}}}function Gn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Pn({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Pn({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function Do(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:a}=e,i={};if(a!==void 0&&(i.code=a),t!==void 0&&(i.balance=P(t)),n!==void 0&&(i.nonce=P(n)),r!==void 0&&(i.state=Gn(r)),s!==void 0){if(i.state)throw new so;i.stateDiff=Gn(s)}return i}function Xr(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!V(n,{strict:!1}))throw new ce({address:n});if(t[n])throw new ro({address:n});t[n]=Do(r)}return t}async function Ho(e,t){const{account:n=e.account,authorizationList:r,batch:s=!!e.batch?.multicall,blockNumber:a,blockTag:i=e.experimental_blockTag??"latest",accessList:o,blobs:c,blockOverrides:d,code:u,data:f,factory:b,factoryData:p,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:x,value:$,stateOverride:M,...R}=t,I=n?ee(n):void 0;if(u&&(b||p))throw new l("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&x)throw new l("Cannot provide both `code` & `to` as parameters.");const O=u&&f,m=b&&p&&x&&f,C=O||m,j=O?Yr({code:u,data:f}):m?qo({data:f,factory:b,factoryData:p,to:x}):f;try{Be(t);const N=(typeof a=="bigint"?P(a):void 0)||i,L=d?No(d):void 0,de=Xr(M),Se=e.chain?.formatters?.transactionRequest?.format,Qe=(Se||Te)({...Ye(R,{format:Se}),accessList:o,account:I,authorizationList:r,blobs:c,data:j,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:C?void 0:x,value:$},"call");if(s&&_o({request:Qe})&&!de&&!L)try{return await Vo(e,{...Qe,blockNumber:a,blockTag:i})}catch(ne){if(!(ne instanceof dr)&&!(ne instanceof lt))throw ne}const ls=(()=>{const ne=[Qe,N];return de&&L?[...ne,de,L]:de?[...ne,de]:L?[...ne,{},L]:ne})(),vn=await e.request({method:"eth_call",params:ls});return vn==="0x"?{data:void 0}:{data:vn}}catch(Z){const N=Wo(Z),{offchainLookup:L,offchainLookupSignature:de}=await Hn(async()=>{const{offchainLookup:Se,offchainLookupSignature:xn}=await import("./ccip-D0tvzkwi.js");return{offchainLookup:Se,offchainLookupSignature:xn}},__vite__mapDeps([0,1]));if(e.ccipRead!==!1&&N?.slice(0,10)===de&&x)return{data:await L(e,{data:N,to:x})};throw C&&N?.slice(0,10)==="0x101bb98d"?new lo({factory:b}):bo(Z,{...t,account:I,chain:e.chain})}}function _o({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Go)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}async function Vo(e,t){const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:i=e.experimental_blockTag??"latest",data:o,to:c}=t,d=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Ba({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new dr})(),f=(typeof a=="bigint"?P(a):void 0)||i,{schedule:b}=Lo({id:`${e.uid}.${f}`,wait:s,shouldSplitBatch(h){return h.reduce((g,{data:v})=>g+(v.length-2),0)>n*2},fn:async h=>{const w=h.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),g=mn({abi:jn,args:[w],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...d===null?{data:Yr({code:Oo,data:g})}:{to:d,data:g}},f]});return Zr({abi:jn,args:[w],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:p,success:y}]=await b({data:o,to:c});if(!y)throw new Gr({data:p});return p==="0x"?{data:void 0}:{data:p}}function Yr(e){const{code:t,data:n}=e;return Wr({abi:Fr(["constructor(bytes, bytes)"]),bytecode:So,args:[t,n]})}function qo(e){const{data:t,factory:n,factoryData:r,to:s}=e;return Wr({abi:Fr(["constructor(address, bytes, address, bytes)"]),bytecode:Fo,args:[s,t,n,r]})}function Wo(e){if(!(e instanceof l))return;const t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}const Ko=3;function Zo(e,{abi:t,address:n,args:r,docsPath:s,functionName:a,sender:i}){const o=e instanceof Gr?e:e instanceof l?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:d,details:u,message:f,shortMessage:b}=o,p=e instanceof Gt?new fo({functionName:a}):[Ko,Ke.code].includes(c)&&(d||u||f||b)||c===Ze.code&&u==="execution reverted"&&d?new uo({abi:t,data:typeof d=="object"?d.data:d,functionName:a,message:o instanceof Lr?u:b??f}):e;return new co(p,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:a,sender:i})}async function Bd(e,t){const{abi:n,address:r,args:s,functionName:a,...i}=t,o=mn({abi:n,args:s,functionName:a});try{const{data:c}=await B(e,Ho,"call")({...i,data:o,to:r});return Zr({abi:n,args:s,functionName:a,data:c||"0x"})}catch(c){throw Zo(c,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}class Jo extends l{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:i,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:u,to:f,value:b}){const p=Ae({from:n?.address,to:f,value:typeof b<"u"&&`${Rt(b)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:i,gasPrice:typeof o<"u"&&`${z(o)} gwei`,maxFeePerGas:typeof c<"u"&&`${z(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${z(d)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",p].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function Xo(e,{docsPath:t,...n}){const r=(()=>{const s=bn(e,n);return s instanceof He?e:s})();return new Jo(r,{docsPath:t,...n})}class Qr extends l{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class hn extends l{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Yo extends l{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${z(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Qo extends l{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 Ie(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){const a=s??!1,i=n!==void 0?P(n):void 0;let o=null;if(t?o=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):o=await e.request({method:"eth_getBlockByNumber",params:[i||r,a]},{dedupe:!!i}),!o)throw new Qo({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||Yn)(o,"getBlock")}async function es(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Sd(e,t){return ts(e,t)}async function ts(e,t){const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=r?.fees?.maxPriorityFeePerGas??r?.fees?.defaultPriorityFee;if(typeof a=="function"){const o=n||await B(e,Ie,"getBlock")({}),c=await a({block:o,client:e,request:s});if(c===null)throw new Error;return c}if(typeof a<"u")return a;const i=await e.request({method:"eth_maxPriorityFeePerGas"});return Y(i)}catch{const[a,i]=await Promise.all([n?Promise.resolve(n):B(e,Ie,"getBlock")({}),B(e,es,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new hn;const o=i-a.baseFeePerGas;return o<0n?0n:o}}async function Fd(e,t){return Mt(e,t)}async function Mt(e,t){const{block:n,chain:r=e.chain,request:s,type:a="eip1559"}=t||{},i=await(async()=>typeof r?.fees?.baseFeeMultiplier=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):r?.fees?.baseFeeMultiplier??1.2)();if(i<1)throw new Qr;const c=10**(i.toString().split(".")[1]?.length??0),d=b=>b*BigInt(Math.ceil(i*c))/BigInt(c),u=n||await B(e,Ie,"getBlock")({});if(typeof r?.fees?.estimateFeesPerGas=="function"){const b=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:d,request:s,type:a});if(b!==null)return b}if(a==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new hn;const b=typeof s?.maxPriorityFeePerGas=="bigint"?s.maxPriorityFeePerGas:await ts(e,{block:u,chain:r,request:s}),p=d(u.baseFeePerGas);return{maxFeePerGas:s?.maxFeePerGas??p+b,maxPriorityFeePerGas:b}}return{gasPrice:s?.gasPrice??d(await B(e,es,"getGasPrice")({}))}}async function e0(e,{address:t,blockTag:n="latest",blockNumber:r}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?P(r):n]},{dedupe:!!r});return K(s)}function gn(e,{docsPath:t,...n}){const r=(()=>{const s=bn(e,n);return s instanceof He?e:s})();return new Ns(r,{docsPath:t,...n})}async function wn(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return K(t)}async function t0(e,t){const{account:n=e.account,accessList:r,authorizationList:s,chain:a=e.chain,blobVersionedHashes:i,blobs:o,data:c,gas:d,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:b,maxPriorityFeePerGas:p,nonce:y,nonceManager:h,to:w,type:g,value:v,...E}=t,x=await(async()=>{if(!n||!h||typeof y<"u")return y;const I=ee(n),O=a?a.id:await B(e,wn,"getChainId")({});return await h.consume({address:I.address,chainId:O,client:e})})();Be(t);const $=a?.formatters?.transactionRequest?.format,R=($||Te)({...Ye(E,{format:$}),account:n?ee(n):void 0,accessList:r,authorizationList:s,blobs:o,blobVersionedHashes:i,data:c,gas:d,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:b,maxPriorityFeePerGas:p,nonce:x,to:w,type:g,value:v},"fillTransaction");try{const I=await e.request({method:"eth_fillTransaction",params:[R]}),m=(a?.formatters?.transaction?.format||Ct)(I.tx);delete m.blockHash,delete m.blockNumber,delete m.r,delete m.s,delete m.transactionIndex,delete m.v,delete m.yParity,m.data=m.input,m.gas&&(m.gas=t.gas??m.gas),m.gasPrice&&(m.gasPrice=t.gasPrice??m.gasPrice),m.maxFeePerBlobGas&&(m.maxFeePerBlobGas=t.maxFeePerBlobGas??m.maxFeePerBlobGas),m.maxFeePerGas&&(m.maxFeePerGas=t.maxFeePerGas??m.maxFeePerGas),m.maxPriorityFeePerGas&&(m.maxPriorityFeePerGas=t.maxPriorityFeePerGas??m.maxPriorityFeePerGas),m.nonce&&(m.nonce=t.nonce??m.nonce);const C=await(async()=>{if(typeof a?.fees?.baseFeeMultiplier=="function"){const L=await B(e,Ie,"getBlock")({});return a.fees.baseFeeMultiplier({block:L,client:e,request:t})}return a?.fees?.baseFeeMultiplier??1.2})();if(C<1)throw new Qr;const Z=10**(C.toString().split(".")[1]?.length??0),N=L=>L*BigInt(Math.ceil(C*Z))/BigInt(Z);return m.maxFeePerGas&&!t.maxFeePerGas&&(m.maxFeePerGas=N(m.maxFeePerGas)),m.gasPrice&&!t.gasPrice&&(m.gasPrice=N(m.gasPrice)),{raw:I.raw,transaction:{from:R.from,...m}}}catch(I){throw gn(I,{...t,chain:e.chain})}}const ns=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Ln=new Map,ct=new _e(128);async function rs(e,t){let n=t;n.account??=e.account,n.parameters??=ns;const{account:r,chain:s=e.chain,nonceManager:a,parameters:i}=n,o=(()=>{if(typeof s?.prepareTransactionRequest=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s?.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function d(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await B(e,wn,"getChainId")({}),c))}const u=r&&ee(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&u&&a){const x=await d();f=await a.consume({address:u.address,chainId:x,client:e})}o?.fn&&o.runAt?.includes("beforeFillTransaction")&&(n=await o.fn({...n,chain:s},{phase:"beforeFillTransaction"}),f??=n.nonce);const p=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||ct.get(e.uid)===!1||!["fees","gas"].some($=>i.includes($))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await B(e,t0,"fillTransaction")({...n,nonce:f}).then(x=>{const{chainId:$,from:M,gas:R,gasPrice:I,nonce:O,maxFeePerBlobGas:m,maxFeePerGas:C,maxPriorityFeePerGas:j,type:Z,...N}=x.transaction;return ct.set(e.uid,!0),{...n,...M?{from:M}:{},...Z?{type:Z}:{},...typeof $<"u"?{chainId:$}:{},...typeof R<"u"?{gas:R}:{},...typeof I<"u"?{gasPrice:I}:{},...typeof O<"u"?{nonce:O}:{},...typeof m<"u"?{maxFeePerBlobGas:m}:{},...typeof C<"u"?{maxFeePerGas:C}:{},...typeof j<"u"?{maxPriorityFeePerGas:j}:{},..."nonceKey"in N&&typeof N.nonceKey<"u"?{nonceKey:N.nonceKey}:{}}}).catch(x=>{const $=x;return $.name!=="TransactionExecutionError"||$.walk?.(R=>{const I=R;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"})&&ct.set(e.uid,!1),n}):n;f??=p.nonce,n={...p,...u?{from:u?.address}:{},...f?{nonce:f}:{}};const{blobs:y,gas:h,kzg:w,type:g}=n;o?.fn&&o.runAt?.includes("beforeFillParameters")&&(n=await o.fn({...n,chain:s},{phase:"beforeFillParameters"}));let v;async function E(){return v||(v=await B(e,Ie,"getBlock")({blockTag:"latest"}),v)}if(i.includes("nonce")&&typeof f>"u"&&u&&!a&&(n.nonce=await B(e,e0,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&y&&w){const x=rr({blobs:y,kzg:w});if(i.includes("blobVersionedHashes")){const $=ca({commitments:x,to:"hex"});n.blobVersionedHashes=$}if(i.includes("sidecars")){const $=sr({blobs:y,commitments:x,kzg:w}),M=pa({blobs:y,commitments:x,proofs:$,to:"hex"});n.sidecars=M}}if(i.includes("chainId")&&(n.chainId=await d()),(i.includes("fees")||i.includes("type"))&&typeof g>"u")try{n.type=Aa(n)}catch{let x=Ln.get(e.uid);typeof x>"u"&&(x=typeof(await E())?.baseFeePerGas=="bigint",Ln.set(e.uid,x)),n.type=x?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const x=await E(),{maxFeePerGas:$,maxPriorityFeePerGas:M}=await Mt(e,{block:x,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<M)throw new Yo({maxPriorityFeePerGas:M});n.maxPriorityFeePerGas=M,n.maxFeePerGas=$}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new hn;if(typeof n.gasPrice>"u"){const x=await E(),{gasPrice:$}=await Mt(e,{block:x,chain:s,request:n,type:"legacy"});n.gasPrice=$}}return i.includes("gas")&&typeof h>"u"&&(n.gas=await B(e,n0,"estimateGas")({...n,account:u,prepare:u?.type==="local"?[]:["blobVersionedHashes"]})),o?.fn&&o.runAt?.includes("afterFillParameters")&&(n=await o.fn({...n,chain:s},{phase:"afterFillParameters"})),Be(n),delete n.parameters,n}async function n0(e,t){const{account:n=e.account,prepare:r=!0}=t,s=n?ee(n):void 0,a=(()=>{if(Array.isArray(r))return r;if(s?.type!=="local")return["blobVersionedHashes"]})();try{const i=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Kr({authorization:t.authorizationList[0]}).catch(()=>{throw new l("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:o,authorizationList:c,blobs:d,blobVersionedHashes:u,blockNumber:f,blockTag:b,data:p,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,value:x,stateOverride:$,...M}=r?await rs(e,{...t,parameters:a,to:i}):t;if(y&&t.gas!==y)return y;const I=(typeof f=="bigint"?P(f):void 0)||b,O=Xr($);Be(t);const m=e.chain?.formatters?.transactionRequest?.format,j=(m||Te)({...Ye(M,{format:m}),account:s,accessList:o,authorizationList:c,blobs:d,blobVersionedHashes:u,data:p,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:i,value:x},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:O?[j,I??e.experimental_blockTag??"latest",O]:I?[j,I]:[j]}))}catch(i){throw Xo(i,{...t,account:s,chain:e.chain})}}async function Bt(e){return new Promise(t=>setTimeout(t,e))}function r0(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((s,a)=>{const i=async({count:o=0}={})=>{const c=async({error:d})=>{const u=typeof t=="function"?t({count:o,error:d}):t;u&&await Bt(u),i({count:o+1})};try{const d=await e();s(d)}catch(d){if(o<n&&await r({count:o,error:d}))return c({error:d});a(d)}};i()})}class s0 extends l{constructor({domain:t}){super(`Invalid domain "${ue(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class a0 extends l{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class i0 extends l{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Od(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(c,d)=>{const u={...d};for(const f of c){const{name:b,type:p}=f;p==="address"&&(u[b]=u[b].toLowerCase())}return u},i=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},o=(()=>{if(r!=="EIP712Domain")return a(s[r],n)})();return ue({domain:i,message:o,primaryType:r,types:s})}function o0(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(i,o)=>{for(const c of i){const{name:d,type:u}=c,f=o[d],b=u.match(Rr);if(b&&(typeof f=="number"||typeof f=="bigint")){const[h,w,g]=b;P(f,{signed:w==="int",size:Number.parseInt(g,10)/8})}if(u==="address"&&typeof f=="string"&&!V(f))throw new ce({address:f});const p=u.match(Ni);if(p){const[h,w]=p;if(w&&T(f)!==Number.parseInt(w,10))throw new Da({expectedSize:Number.parseInt(w,10),givenSize:T(f)})}const y=s[u];y&&(c0(u),a(y,f))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new s0({domain:t});a(s.EIP712Domain,t)}if(r!=="EIP712Domain")if(s[r])a(s[r],n);else throw new a0({primaryType:r,types:s})}function ss({domain:e}){return[typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function Cd({domain:e}){return as({domain:e,types:{EIP712Domain:ss({domain:e})}})}function c0(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new i0({type:e})}function zd(e){const{domain:t={},message:n,primaryType:r}=e,s={EIP712Domain:ss({domain:t}),...e.types};o0({domain:t,message:n,primaryType:r,types:s});const a=["0x1901"];return t&&a.push(as({domain:t,types:s})),r!=="EIP712Domain"&&a.push(is({data:n,primaryType:r,types:s})),H(Q(a))}function as({domain:e,types:t}){return is({data:e,primaryType:"EIP712Domain",types:t})}function is({data:e,primaryType:t,types:n}){const r=os({data:e,primaryType:t,types:n});return H(r)}function os({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],s=[u0({primaryType:t,types:n})];for(const a of n[t]){const[i,o]=us({types:n,name:a.name,type:a.type,value:e[a.name]});r.push(i),s.push(o)}return We(r,s)}function u0({primaryType:e,types:t}){const n=me(d0({primaryType:e,types:t}));return H(n)}function d0({primaryType:e,types:t}){let n="";const r=cs({primaryType:e,types:t});r.delete(e);const s=[e,...Array.from(r).sort()];for(const a of s)n+=`${a}(${t[a].map(({name:i,type:o})=>`${o} ${i}`).join(",")})`;return n}function cs({primaryType:e,types:t},n=new Set){const s=e.match(/^\w*/u)?.[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const a of t[s])cs({primaryType:a.type,types:t},n);return n}function us({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},H(os({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},H(r)];if(n==="string")return[{type:"bytes32"},H(me(r))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),a=r.map(i=>us({name:t,type:s,types:e,value:i}));return[{type:"bytes32"},H(We(a.map(([i])=>i),a.map(([,i])=>i)))]}return[{type:n},r]}const ut=new Map,Dn=new Map;let f0=0;function l0(e,t,n){const r=++f0,s=()=>ut.get(e)||[],a=()=>{const u=s();ut.set(e,u.filter(f=>f.id!==r))},i=()=>{const u=s();if(!u.some(b=>b.id===r))return;const f=Dn.get(e);if(u.length===1&&f){const b=f();b instanceof Promise&&b.catch(()=>{})}a()},o=s();if(ut.set(e,[...o,{id:r,fns:t}]),o&&o.length>0)return i;const c={};for(const u in t)c[u]=(...f)=>{const b=s();if(b.length!==0)for(const p of b)p.fns[u]?.(...f)};const d=n(c);return typeof d=="function"&&Dn.set(e,d),i}function p0(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let s=!0;const a=()=>s=!1;return(async()=>{let o;t&&(o=await e({unpoll:a}));const c=await n?.(o)??r;await Bt(c);const d=async()=>{s&&(await e({unpoll:a}),await Bt(r),d())};d()})(),a}async function b0(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const dt=new _e(128);async function y0(e,t){const{account:n=e.account,chain:r=e.chain,accessList:s,authorizationList:a,blobs:i,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,type:y,value:h,...w}=t;if(typeof n>"u")throw new Sa({docsPath:"/docs/actions/wallet/sendTransaction"});const g=n?ee(n):null;try{Be(t);const v=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Kr({authorization:a[0]}).catch(()=>{throw new l("`to` is required. Could not infer from `authorizationList`.")})})();if(g?.type==="json-rpc"||g===null){let E;r!==null&&(E=await B(e,wn,"getChainId")({}),Ma({currentChainId:E,chain:r}));const x=e.chain?.formatters?.transactionRequest?.format,M=(x||Te)({...Ye(w,{format:x}),accessList:s,account:g,authorizationList:a,blobs:i,chainId:E,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,to:v,type:y,value:h},"sendTransaction"),R=dt.get(e.uid),I=R?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[M]},{retryCount:0})}catch(O){if(R===!1)throw O;const m=O;if(m.name==="InvalidInputRpcError"||m.name==="InvalidParamsRpcError"||m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[M]},{retryCount:0}).then(C=>(dt.set(e.uid,!0),C)).catch(C=>{const j=C;throw j.name==="MethodNotFoundRpcError"||j.name==="MethodNotSupportedRpcError"?(dt.set(e.uid,!1),m):j});throw m}}if(g?.type==="local"){const E=await B(e,rs,"prepareTransactionRequest")({account:g,accessList:s,authorizationList:a,blobs:i,chain:r,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,nonceManager:g.nonceManager,parameters:[...ns,"sidecars"],type:y,value:h,...w,to:v}),x=r?.serializers?.transaction,$=await g.signTransaction(E,{serializer:x});return await B(e,b0,"sendRawTransaction")({serializedTransaction:$})}throw g?.type==="smart"?new rt({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new rt({docsPath:"/docs/actions/wallet/sendTransaction",type:g?.type})}catch(v){throw v instanceof rt?v:gn(v,{...t,account:g,chain:t.chain||void 0})}}const ds="0x5792579257925792579257925792579257925792579257925792579257925792",fs=P(0,{size:32});async function kd(e,t){const{account:n=e.account,capabilities:r,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:i=32,forceAtomic:o=!1,id:c,version:d="2.0.0"}=t,u=n?ee(n):null,f=t.calls.map(b=>{const p=b,y=p.abi?mn({abi:p.abi,functionName:p.functionName,args:p.args}):p.data;return{data:p.dataSuffix&&y?Q([y,p.dataSuffix]):y,to:p.to,value:p.value?P(p.value):void 0}});try{const b=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:o,calls:f,capabilities:r,chainId:P(s.id),from:u?.address,id:c,version:d}]},{retryCount:0});return typeof b=="string"?{id:b}:b}catch(b){const p=b;if(a&&(p.name==="MethodNotFoundRpcError"||p.name==="MethodNotSupportedRpcError"||p.name==="UnknownRpcError"||p.details.toLowerCase().includes("does not exist / is not available")||p.details.toLowerCase().includes("missing or invalid. request()")||p.details.toLowerCase().includes("did not match any variant of untagged enum")||p.details.toLowerCase().includes("account upgraded to unsupported contract")||p.details.toLowerCase().includes("eip-7702 not supported")||p.details.toLowerCase().includes("unsupported wc_ method")||p.details.toLowerCase().includes("feature toggled misconfigured")||p.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(r&&Object.values(r).some(v=>!v.optional)){const v="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Je(new l(v,{details:v}))}if(o&&f.length>1){const g="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Xe(new l(g,{details:g}))}const y=[];for(const g of f){const v=y0(e,{account:u,chain:s,data:g.data,to:g.to,value:g.value?Y(g.value):void 0});y.push(v),i>0&&await new Promise(E=>setTimeout(E,i))}const h=await Promise.allSettled(y);if(h.every(g=>g.status==="rejected"))throw h[0].reason;const w=h.map(g=>g.status==="fulfilled"?g.value:fs);return{id:Q([...w,P(s.id,{size:32}),ds])}}throw gn(b,{...t,account:u,chain:t.chain})}}async function m0(e,t){async function n(u){if(u.endsWith(ds.slice(2))){const b=ae(vt(u,-64,-32)),p=vt(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(p.map(w=>fs.slice(2)!==w?e.request({method:"eth_getTransactionReceipt",params:[`0x${w}`]},{dedupe:!0}):void 0)),h=y.some(w=>w===null)?100:y.every(w=>w?.status==="0x1")?200:y.every(w=>w?.status==="0x0")?500:600;return{atomic:!1,chainId:K(b),receipts:y.filter(Boolean),status:h,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:r=!1,chainId:s,receipts:a,version:i="2.0.0",...o}=await n(t.id),[c,d]=(()=>{const u=o.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...o,atomic:r,chainId:s?K(s):void 0,receipts:a?.map(u=>({...u,blockNumber:Y(u.blockNumber),gasUsed:Y(u.gasUsed),status:Qn[u.status]}))??[],statusCode:d,status:c,version:i}}class h0 extends l{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function Rd(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:s=({statusCode:h})=>h===200||h>=300,retryCount:a=4,retryDelay:i=({count:h})=>~~(1<<h)*200,timeout:o=6e4,throwOnFailure:c=!1}=t,d=ue(["waitForCallsStatus",e.uid,n]),{promise:u,resolve:f,reject:b}=Jr();let p;const y=l0(d,{resolve:f,reject:b},h=>{const w=p0(async()=>{const g=v=>{clearTimeout(p),w(),v(),y()};try{const v=await r0(async()=>{const E=await B(e,m0,"getCallsStatus")({id:n});if(c&&E.status==="failure")throw new h0(E);return E},{retryCount:a,delay:i});if(!s(v))return;g(()=>h.resolve(v))}catch(v){g(()=>h.reject(v))}},{interval:r,emitOnBegin:!0});return w});return p=o?setTimeout(()=>{y(),clearTimeout(p),b(new g0({id:n}))},o):void 0,await u}class g0 extends l{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const St=256;let Oe=St,Ce;function jd(e=11){if(!Ce||Oe+e>St*2){Ce="",Oe=0;for(let t=0;t<St;t++)Ce+=(256+Math.random()*256|0).toString(16).substring(1)}return Ce.substring(Oe,Oe+++e)}export{B as $,Vu as A,l as B,K as C,ku as D,fa as E,je as F,ua as G,td as H,Va as I,Ru as J,Tu as K,Aa as L,P as M,kt as N,S as O,rr as P,ca as Q,sr as R,pa as S,Ue as T,$u as U,ae as V,_e as W,e0 as X,_ as Y,Sa as Z,ee as _,Q as a,vd as a$,wn as a0,jd as a1,ke as a2,ir as a3,Fu as a4,jt as a5,$e as a6,Re as a7,he as a8,zu as a9,Yu as aA,yn as aB,Io as aC,A as aD,At as aE,ld as aF,To as aG,vo as aH,Ia as aI,id as aJ,X as aK,pd as aL,dd as aM,ge as aN,od as aO,fd as aP,_r as aQ,cd as aR,Ao as aS,ud as aT,Pe as aU,Kr as aV,Uu as aW,Ro as aX,jn as aY,Oo as aZ,xd as a_,Cu as aa,sa as ab,we as ac,zd as ad,H as ae,bd as af,Bd as ag,Fr as ah,Ae as ai,z as aj,fo as ak,uo as al,co as am,Y as an,mn as ao,Fd as ap,Xr as aq,Is as ar,Ts as as,l0 as at,p0 as au,D as av,le as aw,Zu as ax,ki as ay,Tr as az,oe as b,kd as b$,Wr as b0,Ad as b1,oo as b2,Ps as b3,Ot as b4,Jn as b5,Ba as b6,wd as b7,md as b8,Zr as b9,rn as bA,tn as bB,en as bC,Yt as bD,Xt as bE,Jt as bF,Ze as bG,Ke as bH,Zt as bI,Kt as bJ,Wt as bK,qt as bL,sd as bM,Lo as bN,rd as bO,nd as bP,Au as bQ,Ct as bR,Mu as bS,Zo as bT,Gt as bU,Gr as bV,Jr as bW,Su as bX,Ie as bY,Qo as bZ,y0 as b_,gd as ba,hd as bb,_u as bc,no as bd,Du as be,Hu as bf,Wu as bg,Ra as bh,Fs as bi,qu as bj,Qt as bk,Zn as bl,r0 as bm,ad as bn,nn as bo,Xe as bp,pn as bq,ln as br,fn as bs,dn as bt,un as bu,Je as bv,cn as bw,on as bx,an as by,sn as bz,Ho as c,h0 as c$,Rd as c0,Bu as c1,Be as c2,Ma as c3,Te as c4,Ye as c5,rs as c6,ns as c7,rt as c8,gn as c9,ed as cA,Ku as cB,Rs as cC,js as cD,No as cE,Yn as cF,bn as cG,He as cH,Ja as cI,So as cJ,Ve as cK,b0 as cL,t0 as cM,Sd as cN,es as cO,m0 as cP,be as cQ,Bt as cR,ka as cS,Fn as cT,oa as cU,Nu as cV,ja as cW,Ua as cX,gr as cY,ro as cZ,Qr as c_,ss as ca,o0 as cb,Od as cc,Lr as cd,S0 as ce,M0 as cf,B0 as cg,$i as ch,Ju as ci,Xu as cj,or as ck,Zs as cl,Ou as cm,P0 as cn,zt as co,vt as cp,Eu as cq,Iu as cr,ie as cs,bo as ct,n0 as cu,Na as cv,Kn as cw,Rr as cx,Ni as cy,Da as cz,to as d,nr as d$,lt as d0,ba as d1,ya as d2,xi as d3,dr as d4,lo as d5,hn as d6,Jo as d7,pt as d8,Pu as d9,k as dA,Wn as dB,ys as dC,qn as dD,bi as dE,so as dF,Ns as dG,xt as dH,gi as dI,fi as dJ,g0 as dK,xs as dL,Cr as dM,zr as dN,W as dO,wu as dP,kr as dQ,Ss as dR,F0 as dS,Fo as dT,Cd as dU,Ed as dV,Pd as dW,$d as dX,Td as dY,Id as dZ,Rt as d_,ht as da,Ft as db,gt as dc,wt as dd,_a as de,Ha as df,hi as dg,ps as dh,qa as di,s0 as dj,mi as dk,bs as dl,yi as dm,pi as dn,vi as dp,a0 as dq,Us as dr,xe as ds,wi as dt,i0 as du,Yo as dv,mt as dw,bt as dx,yt as dy,U as dz,We as e,Kc as e$,Qu as e0,A0 as e1,Ui as e2,as as e3,is as e4,xu as e5,$s as e6,_0 as e7,V0 as e8,q0 as e9,L0 as eA,D0 as eB,H0 as eC,eu as eD,tu as eE,nu as eF,ru as eG,su as eH,au as eI,iu as eJ,Hc as eK,ou as eL,cu as eM,uu as eN,du as eO,fu as eP,lu as eQ,pu as eR,bu as eS,yu as eT,mu as eU,_c as eV,hu as eW,gu as eX,Vc as eY,qc as eZ,Wc as e_,W0 as ea,K0 as eb,Z0 as ec,J0 as ed,C0 as ee,X0 as ef,Y0 as eg,Q0 as eh,ec as ei,tc as ej,nc as ek,rc as el,sc as em,ac as en,ic as eo,z0 as ep,oc as eq,cc as er,uc as es,k0 as et,R0 as eu,j0 as ev,U0 as ew,N0 as ex,G0 as ey,O0 as ez,Ne as f,Zc as f0,Jc as f1,Dc as f2,Xc as f3,Yc as f4,Qc as f5,Pc as f6,$c as f7,Ec as f8,Ic as f9,xc as fA,vc as fB,vs as fC,ms as fD,Co as fE,ko as fF,As as fG,x0 as fH,ia as fI,hr as fJ,la as fK,Or as fL,Xn as fM,vu as fN,Tc as fa,Ac as fb,Mc as fc,fc as fd,Bc as fe,Sc as ff,Fc as fg,Oc as fh,Cc as fi,zc as fj,kc as fk,Rc as fl,jc as fm,Uc as fn,lc as fo,Nc as fp,Gc as fq,Lc as fr,pc as fs,bc as ft,yc as fu,mc as fv,hc as fw,gc as fx,dc as fy,wc as fz,Me as g,fe as h,Md as i,jr as j,Vt as k,Lu as l,Gu as m,De as n,Ge as o,Ga as p,yd as q,Oa as r,ue as s,Lt as t,me as u,ju as v,V as w,ce as x,Bs as y,T as z};
|
|
44
|
+
`);super(d,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=i,this.docsOrigin=a,this.docsPath=s,this.shortMessage=t,this.showVersion=o,this.version=c}walk(t){return Dr(this,t)}}Object.defineProperty(A,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${mo()}`}});A.setStaticOptions(A.defaultStaticOptions);function Dr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Dr(e.cause,t):t?null:e}function yn(e,t){if(ge(e)>t)throw new Mo({givenSize:ge(e),maxSize:t})}function ho(e,t){if(typeof t=="number"&&t>0&&t>ge(e)-1)throw new Vr({offset:t,position:"start",size:ge(e)})}function go(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ge(e)!==n-t)throw new Vr({offset:n,position:"end",size:ge(e)})}function Hr(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 Bo({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function wo(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let a=0;a<r.length-1&&r[n==="left"?a:r.length-a-1].toString()==="0";a++)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 xo="#__bigint";function vo(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+xo:s,n)}const Po=new TextEncoder,$o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Eo(e,t={}){const{strict:n=!1}=t;if(!e)throw new kn(e);if(typeof e!="string")throw new kn(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Rn(e);if(!e.startsWith("0x"))throw new Rn(e)}function id(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function od(e){return e instanceof Uint8Array?At(e):Array.isArray(e)?At(new Uint8Array(e)):e}function cd(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(yn(n,t.size),_r(n,t.size)):n}function At(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=$o[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(yn(r,t.size),Io(r,t.size)):r}function X(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let a;r?n?a=(1n<<BigInt(r)*8n-1n)-1n:a=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<i){const d=typeof e=="bigint"?"n":"";throw new Ao({max:a?`${a}${d}`:void 0,min:`${i}${d}`,signed:n,size:r,value:`${e}${d}`})}const c=`0x${(n&&s<0?BigInt.asUintN(r*8,BigInt(s)):s).toString(16)}`;return r?_r(c,r):c}function ud(e,t={}){return At(Po.encode(e),t)}function _r(e,t){return Hr(e,{dir:"left",size:t})}function Io(e,t){return Hr(e,{dir:"right",size:t})}function dd(e,t,n,r={}){const{strict:s}=r;ho(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&go(a,t,n),a}function ge(e){return Math.ceil((e.length-2)/2)}function fd(e){return wo(e,{dir:"left"})}function To(e,t={}){const{signed:n}=t;t.size&&yn(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n)-1n,i=a>>1n;return r<=i?r:r-a-1n}function ld(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:To(e,t))}function pd(e,t={}){const{strict:n=!1}=t;try{return Eo(e,{strict:n}),!0}catch{return!1}}class Ao extends A{constructor({max:t,min:n,signed:r,size:s,value:a}){super(`Number \`${a}\` 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 kn extends A{constructor(t){super(`Value \`${typeof t=="object"?vo(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 Rn extends A{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 Mo extends A{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 Vr extends A{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 Bo extends A{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"})}}async function bd(e,{address:t,blockNumber:n,blockTag:r="latest"}){const s=n!==void 0?P(n):void 0,a=await e.request({method:"eth_getCode",params:[t,s||r]},{dedupe:!!s});if(a!=="0x")return a}const jn=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],yd=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],qr=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],md=[...qr,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],hd=[...qr,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],gd=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],wd=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],xd=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],vd=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Pd=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],$d=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],Ed=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],Id=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Td=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],So="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Fo="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Ad="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Oo="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",at="/docs/contract/encodeDeployData";function Wr(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const s=t.find(i=>"type"in i&&i.type==="constructor");if(!s)throw new ka({docsPath:at});if(!("inputs"in s))throw new Fn({docsPath:at});if(!s.inputs||s.inputs.length===0)throw new Fn({docsPath:at});const a=We(s.inputs,n);return De([r,a])}const Un="/docs/contract/encodeFunctionData";function Co(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const a=Vt({abi:t,args:n,name:r});if(!a)throw new Ge(r,{docsPath:Un});s=a}if(s.type!=="function")throw new Ge(void 0,{docsPath:Un});return{abi:[s],functionName:Lt(fe(s))}}function mn(e){const{args:t}=e,{abi:n,functionName:r}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Co(e),s=n[0],a=r,i="inputs"in s&&s.inputs?We(s.inputs,t??[]):void 0;return De([a,i??"0x"])}function Md(e,t){if(!V(e,{strict:!1}))throw new ce({address:e});if(!V(t,{strict:!1}))throw new ce({address:t});return e.toLowerCase()===t.toLowerCase()}function zo(e){const t=H(`0x${e.substring(4)}`).substring(26);return Ve(`0x${t}`)}async function ko({hash:e,signature:t}){const n=oe(e)?e:me(e),{secp256k1:r}=await Hn(async()=>{const{secp256k1:i}=await import("./secp256k1-DtCHzlC3.js");return{secp256k1:i}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:d,s:u,v:f,yParity:b}=t,p=Number(b??f),y=Nn(p);return new r.Signature(Y(d),Y(u)).addRecoveryBit(y)}const i=oe(t)?t:me(t);if(T(i)!==65)throw new Error("invalid signature length");const o=K(`0x${i.slice(130)}`),c=Nn(o);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Nn(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 Ro({hash:e,signature:t}){return zo(await ko({hash:e,signature:t}))}function jo(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,a=H(De(["0x05",kt([t?P(t):"0x",s,n?P(n):"0x"])]));return r==="bytes"?_(a):a}async function Kr(e){const{authorization:t,signature:n}=e;return Ro({hash:jo(t),signature:n??t})}function B(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:a=>t(e,a)}function Uo(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function No(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:X(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:X(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:X(e.gasLimit)},...typeof e.number=="bigint"&&{number:X(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:X(e.prevRandao)},...typeof e.time=="bigint"&&{time:X(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Uo)}}}const Go="0x82ad56cb",it="/docs/contract/decodeFunctionResult";function Zr(e){const{abi:t,args:n,functionName:r,data:s}=e;let a=t[0];if(r){const o=Vt({abi:t,args:n,name:r});if(!o)throw new Ge(r,{docsPath:it});a=o}if(a.type!=="function")throw new Ge(void 0,{docsPath:it});if(!a.outputs)throw new Ga(a.name,{docsPath:it});const i=jr(a.outputs,s);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}function Jr(){let e=()=>{},t=()=>{};return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}const ot=new Map;function Lo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:s}){const a=async()=>{const u=c();i();const f=u.map(({args:b})=>b);f.length!==0&&e(f).then(b=>{s&&Array.isArray(b)&&b.sort(s);for(let p=0;p<u.length;p++){const{resolve:y}=u[p];y?.([b[p],b])}}).catch(b=>{for(let p=0;p<u.length;p++){const{reject:y}=u[p];y?.(b)}})},i=()=>ot.delete(t),o=()=>c().map(({args:u})=>u),c=()=>ot.get(t)||[],d=u=>ot.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:b,reject:p}=Jr();return n?.([...o(),u])&&a(),c().length>0?(d({args:u,resolve:b,reject:p}),f):(d({args:u,resolve:b,reject:p}),setTimeout(a,r),f)}}}function Gn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Pn({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Pn({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function Do(e){const{balance:t,nonce:n,state:r,stateDiff:s,code:a}=e,i={};if(a!==void 0&&(i.code=a),t!==void 0&&(i.balance=P(t)),n!==void 0&&(i.nonce=P(n)),r!==void 0&&(i.state=Gn(r)),s!==void 0){if(i.state)throw new so;i.stateDiff=Gn(s)}return i}function Xr(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!V(n,{strict:!1}))throw new ce({address:n});if(t[n])throw new ro({address:n});t[n]=Do(r)}return t}async function Ho(e,t){const{account:n=e.account,authorizationList:r,batch:s=!!e.batch?.multicall,blockNumber:a,blockTag:i=e.experimental_blockTag??"latest",accessList:o,blobs:c,blockOverrides:d,code:u,data:f,factory:b,factoryData:p,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:x,value:$,stateOverride:M,...R}=t,I=n?ee(n):void 0;if(u&&(b||p))throw new l("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&x)throw new l("Cannot provide both `code` & `to` as parameters.");const O=u&&f,m=b&&p&&x&&f,C=O||m,j=O?Yr({code:u,data:f}):m?qo({data:f,factory:b,factoryData:p,to:x}):f;try{Be(t);const N=(typeof a=="bigint"?P(a):void 0)||i,L=d?No(d):void 0,de=Xr(M),Se=e.chain?.formatters?.transactionRequest?.format,Qe=(Se||Te)({...Ye(R,{format:Se}),accessList:o,account:I,authorizationList:r,blobs:c,data:j,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:C?void 0:x,value:$},"call");if(s&&_o({request:Qe})&&!de&&!L)try{return await Vo(e,{...Qe,blockNumber:a,blockTag:i})}catch(ne){if(!(ne instanceof dr)&&!(ne instanceof lt))throw ne}const ls=(()=>{const ne=[Qe,N];return de&&L?[...ne,de,L]:de?[...ne,de]:L?[...ne,{},L]:ne})(),vn=await e.request({method:"eth_call",params:ls});return vn==="0x"?{data:void 0}:{data:vn}}catch(Z){const N=Wo(Z),{offchainLookup:L,offchainLookupSignature:de}=await Hn(async()=>{const{offchainLookup:Se,offchainLookupSignature:xn}=await import("./ccip-DGW5U0-8.js");return{offchainLookup:Se,offchainLookupSignature:xn}},__vite__mapDeps([0,1]));if(e.ccipRead!==!1&&N?.slice(0,10)===de&&x)return{data:await L(e,{data:N,to:x})};throw C&&N?.slice(0,10)==="0x101bb98d"?new lo({factory:b}):bo(Z,{...t,account:I,chain:e.chain})}}function _o({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(Go)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}async function Vo(e,t){const{batchSize:n=1024,deployless:r=!1,wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:a,blockTag:i=e.experimental_blockTag??"latest",data:o,to:c}=t,d=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Ba({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new dr})(),f=(typeof a=="bigint"?P(a):void 0)||i,{schedule:b}=Lo({id:`${e.uid}.${f}`,wait:s,shouldSplitBatch(h){return h.reduce((g,{data:v})=>g+(v.length-2),0)>n*2},fn:async h=>{const w=h.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),g=mn({abi:jn,args:[w],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...d===null?{data:Yr({code:Oo,data:g})}:{to:d,data:g}},f]});return Zr({abi:jn,args:[w],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:p,success:y}]=await b({data:o,to:c});if(!y)throw new Gr({data:p});return p==="0x"?{data:void 0}:{data:p}}function Yr(e){const{code:t,data:n}=e;return Wr({abi:Fr(["constructor(bytes, bytes)"]),bytecode:So,args:[t,n]})}function qo(e){const{data:t,factory:n,factoryData:r,to:s}=e;return Wr({abi:Fr(["constructor(address, bytes, address, bytes)"]),bytecode:Fo,args:[s,t,n,r]})}function Wo(e){if(!(e instanceof l))return;const t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}const Ko=3;function Zo(e,{abi:t,address:n,args:r,docsPath:s,functionName:a,sender:i}){const o=e instanceof Gr?e:e instanceof l?e.walk(y=>"data"in y)||e.walk():{},{code:c,data:d,details:u,message:f,shortMessage:b}=o,p=e instanceof Gt?new fo({functionName:a}):[Ko,Ke.code].includes(c)&&(d||u||f||b)||c===Ze.code&&u==="execution reverted"&&d?new uo({abi:t,data:typeof d=="object"?d.data:d,functionName:a,message:o instanceof Lr?u:b??f}):e;return new co(p,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:a,sender:i})}async function Bd(e,t){const{abi:n,address:r,args:s,functionName:a,...i}=t,o=mn({abi:n,args:s,functionName:a});try{const{data:c}=await B(e,Ho,"call")({...i,data:o,to:r});return Zr({abi:n,args:s,functionName:a,data:c||"0x"})}catch(c){throw Zo(c,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}class Jo extends l{constructor(t,{account:n,docsPath:r,chain:s,data:a,gas:i,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:d,nonce:u,to:f,value:b}){const p=Ae({from:n?.address,to:f,value:typeof b<"u"&&`${Rt(b)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:i,gasPrice:typeof o<"u"&&`${z(o)} gwei`,maxFeePerGas:typeof c<"u"&&`${z(c)} gwei`,maxPriorityFeePerGas:typeof d<"u"&&`${z(d)} gwei`,nonce:u});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",p].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function Xo(e,{docsPath:t,...n}){const r=(()=>{const s=bn(e,n);return s instanceof He?e:s})();return new Jo(r,{docsPath:t,...n})}class Qr extends l{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class hn extends l{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Yo extends l{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${z(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Qo extends l{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 Ie(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:s}={}){const a=s??!1,i=n!==void 0?P(n):void 0;let o=null;if(t?o=await e.request({method:"eth_getBlockByHash",params:[t,a]},{dedupe:!0}):o=await e.request({method:"eth_getBlockByNumber",params:[i||r,a]},{dedupe:!!i}),!o)throw new Qo({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||Yn)(o,"getBlock")}async function es(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Sd(e,t){return ts(e,t)}async function ts(e,t){const{block:n,chain:r=e.chain,request:s}=t||{};try{const a=r?.fees?.maxPriorityFeePerGas??r?.fees?.defaultPriorityFee;if(typeof a=="function"){const o=n||await B(e,Ie,"getBlock")({}),c=await a({block:o,client:e,request:s});if(c===null)throw new Error;return c}if(typeof a<"u")return a;const i=await e.request({method:"eth_maxPriorityFeePerGas"});return Y(i)}catch{const[a,i]=await Promise.all([n?Promise.resolve(n):B(e,Ie,"getBlock")({}),B(e,es,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new hn;const o=i-a.baseFeePerGas;return o<0n?0n:o}}async function Fd(e,t){return Mt(e,t)}async function Mt(e,t){const{block:n,chain:r=e.chain,request:s,type:a="eip1559"}=t||{},i=await(async()=>typeof r?.fees?.baseFeeMultiplier=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:s}):r?.fees?.baseFeeMultiplier??1.2)();if(i<1)throw new Qr;const c=10**(i.toString().split(".")[1]?.length??0),d=b=>b*BigInt(Math.ceil(i*c))/BigInt(c),u=n||await B(e,Ie,"getBlock")({});if(typeof r?.fees?.estimateFeesPerGas=="function"){const b=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:d,request:s,type:a});if(b!==null)return b}if(a==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new hn;const b=typeof s?.maxPriorityFeePerGas=="bigint"?s.maxPriorityFeePerGas:await ts(e,{block:u,chain:r,request:s}),p=d(u.baseFeePerGas);return{maxFeePerGas:s?.maxFeePerGas??p+b,maxPriorityFeePerGas:b}}return{gasPrice:s?.gasPrice??d(await B(e,es,"getGasPrice")({}))}}async function e0(e,{address:t,blockTag:n="latest",blockNumber:r}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?P(r):n]},{dedupe:!!r});return K(s)}function gn(e,{docsPath:t,...n}){const r=(()=>{const s=bn(e,n);return s instanceof He?e:s})();return new Ns(r,{docsPath:t,...n})}async function wn(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return K(t)}async function t0(e,t){const{account:n=e.account,accessList:r,authorizationList:s,chain:a=e.chain,blobVersionedHashes:i,blobs:o,data:c,gas:d,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:b,maxPriorityFeePerGas:p,nonce:y,nonceManager:h,to:w,type:g,value:v,...E}=t,x=await(async()=>{if(!n||!h||typeof y<"u")return y;const I=ee(n),O=a?a.id:await B(e,wn,"getChainId")({});return await h.consume({address:I.address,chainId:O,client:e})})();Be(t);const $=a?.formatters?.transactionRequest?.format,R=($||Te)({...Ye(E,{format:$}),account:n?ee(n):void 0,accessList:r,authorizationList:s,blobs:o,blobVersionedHashes:i,data:c,gas:d,gasPrice:u,maxFeePerBlobGas:f,maxFeePerGas:b,maxPriorityFeePerGas:p,nonce:x,to:w,type:g,value:v},"fillTransaction");try{const I=await e.request({method:"eth_fillTransaction",params:[R]}),m=(a?.formatters?.transaction?.format||Ct)(I.tx);delete m.blockHash,delete m.blockNumber,delete m.r,delete m.s,delete m.transactionIndex,delete m.v,delete m.yParity,m.data=m.input,m.gas&&(m.gas=t.gas??m.gas),m.gasPrice&&(m.gasPrice=t.gasPrice??m.gasPrice),m.maxFeePerBlobGas&&(m.maxFeePerBlobGas=t.maxFeePerBlobGas??m.maxFeePerBlobGas),m.maxFeePerGas&&(m.maxFeePerGas=t.maxFeePerGas??m.maxFeePerGas),m.maxPriorityFeePerGas&&(m.maxPriorityFeePerGas=t.maxPriorityFeePerGas??m.maxPriorityFeePerGas),m.nonce&&(m.nonce=t.nonce??m.nonce);const C=await(async()=>{if(typeof a?.fees?.baseFeeMultiplier=="function"){const L=await B(e,Ie,"getBlock")({});return a.fees.baseFeeMultiplier({block:L,client:e,request:t})}return a?.fees?.baseFeeMultiplier??1.2})();if(C<1)throw new Qr;const Z=10**(C.toString().split(".")[1]?.length??0),N=L=>L*BigInt(Math.ceil(C*Z))/BigInt(Z);return m.maxFeePerGas&&!t.maxFeePerGas&&(m.maxFeePerGas=N(m.maxFeePerGas)),m.gasPrice&&!t.gasPrice&&(m.gasPrice=N(m.gasPrice)),{raw:I.raw,transaction:{from:R.from,...m}}}catch(I){throw gn(I,{...t,chain:e.chain})}}const ns=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Ln=new Map,ct=new _e(128);async function rs(e,t){let n=t;n.account??=e.account,n.parameters??=ns;const{account:r,chain:s=e.chain,nonceManager:a,parameters:i}=n,o=(()=>{if(typeof s?.prepareTransactionRequest=="function")return{fn:s.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(s?.prepareTransactionRequest))return{fn:s.prepareTransactionRequest[0],runAt:s.prepareTransactionRequest[1].runAt}})();let c;async function d(){return c||(typeof n.chainId<"u"?n.chainId:s?s.id:(c=await B(e,wn,"getChainId")({}),c))}const u=r&&ee(r);let f=n.nonce;if(i.includes("nonce")&&typeof f>"u"&&u&&a){const x=await d();f=await a.consume({address:u.address,chainId:x,client:e})}o?.fn&&o.runAt?.includes("beforeFillTransaction")&&(n=await o.fn({...n,chain:s},{phase:"beforeFillTransaction"}),f??=n.nonce);const p=((i.includes("blobVersionedHashes")||i.includes("sidecars"))&&n.kzg&&n.blobs||ct.get(e.uid)===!1||!["fees","gas"].some($=>i.includes($))?!1:!!(i.includes("chainId")&&typeof n.chainId!="number"||i.includes("nonce")&&typeof f!="number"||i.includes("fees")&&typeof n.gasPrice!="bigint"&&(typeof n.maxFeePerGas!="bigint"||typeof n.maxPriorityFeePerGas!="bigint")||i.includes("gas")&&typeof n.gas!="bigint"))?await B(e,t0,"fillTransaction")({...n,nonce:f}).then(x=>{const{chainId:$,from:M,gas:R,gasPrice:I,nonce:O,maxFeePerBlobGas:m,maxFeePerGas:C,maxPriorityFeePerGas:j,type:Z,...N}=x.transaction;return ct.set(e.uid,!0),{...n,...M?{from:M}:{},...Z?{type:Z}:{},...typeof $<"u"?{chainId:$}:{},...typeof R<"u"?{gas:R}:{},...typeof I<"u"?{gasPrice:I}:{},...typeof O<"u"?{nonce:O}:{},...typeof m<"u"?{maxFeePerBlobGas:m}:{},...typeof C<"u"?{maxFeePerGas:C}:{},...typeof j<"u"?{maxPriorityFeePerGas:j}:{},..."nonceKey"in N&&typeof N.nonceKey<"u"?{nonceKey:N.nonceKey}:{}}}).catch(x=>{const $=x;return $.name!=="TransactionExecutionError"||$.walk?.(R=>{const I=R;return I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"})&&ct.set(e.uid,!1),n}):n;f??=p.nonce,n={...p,...u?{from:u?.address}:{},...f?{nonce:f}:{}};const{blobs:y,gas:h,kzg:w,type:g}=n;o?.fn&&o.runAt?.includes("beforeFillParameters")&&(n=await o.fn({...n,chain:s},{phase:"beforeFillParameters"}));let v;async function E(){return v||(v=await B(e,Ie,"getBlock")({blockTag:"latest"}),v)}if(i.includes("nonce")&&typeof f>"u"&&u&&!a&&(n.nonce=await B(e,e0,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&y&&w){const x=rr({blobs:y,kzg:w});if(i.includes("blobVersionedHashes")){const $=ca({commitments:x,to:"hex"});n.blobVersionedHashes=$}if(i.includes("sidecars")){const $=sr({blobs:y,commitments:x,kzg:w}),M=pa({blobs:y,commitments:x,proofs:$,to:"hex"});n.sidecars=M}}if(i.includes("chainId")&&(n.chainId=await d()),(i.includes("fees")||i.includes("type"))&&typeof g>"u")try{n.type=Aa(n)}catch{let x=Ln.get(e.uid);typeof x>"u"&&(x=typeof(await E())?.baseFeePerGas=="bigint",Ln.set(e.uid,x)),n.type=x?"eip1559":"legacy"}if(i.includes("fees"))if(n.type!=="legacy"&&n.type!=="eip2930"){if(typeof n.maxFeePerGas>"u"||typeof n.maxPriorityFeePerGas>"u"){const x=await E(),{maxFeePerGas:$,maxPriorityFeePerGas:M}=await Mt(e,{block:x,chain:s,request:n});if(typeof n.maxPriorityFeePerGas>"u"&&n.maxFeePerGas&&n.maxFeePerGas<M)throw new Yo({maxPriorityFeePerGas:M});n.maxPriorityFeePerGas=M,n.maxFeePerGas=$}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new hn;if(typeof n.gasPrice>"u"){const x=await E(),{gasPrice:$}=await Mt(e,{block:x,chain:s,request:n,type:"legacy"});n.gasPrice=$}}return i.includes("gas")&&typeof h>"u"&&(n.gas=await B(e,n0,"estimateGas")({...n,account:u,prepare:u?.type==="local"?[]:["blobVersionedHashes"]})),o?.fn&&o.runAt?.includes("afterFillParameters")&&(n=await o.fn({...n,chain:s},{phase:"afterFillParameters"})),Be(n),delete n.parameters,n}async function n0(e,t){const{account:n=e.account,prepare:r=!0}=t,s=n?ee(n):void 0,a=(()=>{if(Array.isArray(r))return r;if(s?.type!=="local")return["blobVersionedHashes"]})();try{const i=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Kr({authorization:t.authorizationList[0]}).catch(()=>{throw new l("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:o,authorizationList:c,blobs:d,blobVersionedHashes:u,blockNumber:f,blockTag:b,data:p,gas:y,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,value:x,stateOverride:$,...M}=r?await rs(e,{...t,parameters:a,to:i}):t;if(y&&t.gas!==y)return y;const I=(typeof f=="bigint"?P(f):void 0)||b,O=Xr($);Be(t);const m=e.chain?.formatters?.transactionRequest?.format,j=(m||Te)({...Ye(M,{format:m}),account:s,accessList:o,authorizationList:c,blobs:d,blobVersionedHashes:u,data:p,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:g,maxPriorityFeePerGas:v,nonce:E,to:i,value:x},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:O?[j,I??e.experimental_blockTag??"latest",O]:I?[j,I]:[j]}))}catch(i){throw Xo(i,{...t,account:s,chain:e.chain})}}async function Bt(e){return new Promise(t=>setTimeout(t,e))}function r0(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((s,a)=>{const i=async({count:o=0}={})=>{const c=async({error:d})=>{const u=typeof t=="function"?t({count:o,error:d}):t;u&&await Bt(u),i({count:o+1})};try{const d=await e();s(d)}catch(d){if(o<n&&await r({count:o,error:d}))return c({error:d});a(d)}};i()})}class s0 extends l{constructor({domain:t}){super(`Invalid domain "${ue(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class a0 extends l{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class i0 extends l{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function Od(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(c,d)=>{const u={...d};for(const f of c){const{name:b,type:p}=f;p==="address"&&(u[b]=u[b].toLowerCase())}return u},i=s.EIP712Domain?t?a(s.EIP712Domain,t):{}:{},o=(()=>{if(r!=="EIP712Domain")return a(s[r],n)})();return ue({domain:i,message:o,primaryType:r,types:s})}function o0(e){const{domain:t,message:n,primaryType:r,types:s}=e,a=(i,o)=>{for(const c of i){const{name:d,type:u}=c,f=o[d],b=u.match(Rr);if(b&&(typeof f=="number"||typeof f=="bigint")){const[h,w,g]=b;P(f,{signed:w==="int",size:Number.parseInt(g,10)/8})}if(u==="address"&&typeof f=="string"&&!V(f))throw new ce({address:f});const p=u.match(Ni);if(p){const[h,w]=p;if(w&&T(f)!==Number.parseInt(w,10))throw new Da({expectedSize:Number.parseInt(w,10),givenSize:T(f)})}const y=s[u];y&&(c0(u),a(y,f))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new s0({domain:t});a(s.EIP712Domain,t)}if(r!=="EIP712Domain")if(s[r])a(s[r],n);else throw new a0({primaryType:r,types:s})}function ss({domain:e}){return[typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function Cd({domain:e}){return as({domain:e,types:{EIP712Domain:ss({domain:e})}})}function c0(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new i0({type:e})}function zd(e){const{domain:t={},message:n,primaryType:r}=e,s={EIP712Domain:ss({domain:t}),...e.types};o0({domain:t,message:n,primaryType:r,types:s});const a=["0x1901"];return t&&a.push(as({domain:t,types:s})),r!=="EIP712Domain"&&a.push(is({data:n,primaryType:r,types:s})),H(Q(a))}function as({domain:e,types:t}){return is({data:e,primaryType:"EIP712Domain",types:t})}function is({data:e,primaryType:t,types:n}){const r=os({data:e,primaryType:t,types:n});return H(r)}function os({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],s=[u0({primaryType:t,types:n})];for(const a of n[t]){const[i,o]=us({types:n,name:a.name,type:a.type,value:e[a.name]});r.push(i),s.push(o)}return We(r,s)}function u0({primaryType:e,types:t}){const n=me(d0({primaryType:e,types:t}));return H(n)}function d0({primaryType:e,types:t}){let n="";const r=cs({primaryType:e,types:t});r.delete(e);const s=[e,...Array.from(r).sort()];for(const a of s)n+=`${a}(${t[a].map(({name:i,type:o})=>`${o} ${i}`).join(",")})`;return n}function cs({primaryType:e,types:t},n=new Set){const s=e.match(/^\w*/u)?.[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const a of t[s])cs({primaryType:a.type,types:t},n);return n}function us({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},H(os({data:r,primaryType:n,types:e}))];if(n==="bytes")return[{type:"bytes32"},H(r)];if(n==="string")return[{type:"bytes32"},H(me(r))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),a=r.map(i=>us({name:t,type:s,types:e,value:i}));return[{type:"bytes32"},H(We(a.map(([i])=>i),a.map(([,i])=>i)))]}return[{type:n},r]}const ut=new Map,Dn=new Map;let f0=0;function l0(e,t,n){const r=++f0,s=()=>ut.get(e)||[],a=()=>{const u=s();ut.set(e,u.filter(f=>f.id!==r))},i=()=>{const u=s();if(!u.some(b=>b.id===r))return;const f=Dn.get(e);if(u.length===1&&f){const b=f();b instanceof Promise&&b.catch(()=>{})}a()},o=s();if(ut.set(e,[...o,{id:r,fns:t}]),o&&o.length>0)return i;const c={};for(const u in t)c[u]=(...f)=>{const b=s();if(b.length!==0)for(const p of b)p.fns[u]?.(...f)};const d=n(c);return typeof d=="function"&&Dn.set(e,d),i}function p0(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let s=!0;const a=()=>s=!1;return(async()=>{let o;t&&(o=await e({unpoll:a}));const c=await n?.(o)??r;await Bt(c);const d=async()=>{s&&(await e({unpoll:a}),await Bt(r),d())};d()})(),a}async function b0(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const dt=new _e(128);async function y0(e,t){const{account:n=e.account,chain:r=e.chain,accessList:s,authorizationList:a,blobs:i,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,type:y,value:h,...w}=t;if(typeof n>"u")throw new Sa({docsPath:"/docs/actions/wallet/sendTransaction"});const g=n?ee(n):null;try{Be(t);const v=await(async()=>{if(t.to)return t.to;if(t.to!==null&&a&&a.length>0)return await Kr({authorization:a[0]}).catch(()=>{throw new l("`to` is required. Could not infer from `authorizationList`.")})})();if(g?.type==="json-rpc"||g===null){let E;r!==null&&(E=await B(e,wn,"getChainId")({}),Ma({currentChainId:E,chain:r}));const x=e.chain?.formatters?.transactionRequest?.format,M=(x||Te)({...Ye(w,{format:x}),accessList:s,account:g,authorizationList:a,blobs:i,chainId:E,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,to:v,type:y,value:h},"sendTransaction"),R=dt.get(e.uid),I=R?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:I,params:[M]},{retryCount:0})}catch(O){if(R===!1)throw O;const m=O;if(m.name==="InvalidInputRpcError"||m.name==="InvalidParamsRpcError"||m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[M]},{retryCount:0}).then(C=>(dt.set(e.uid,!0),C)).catch(C=>{const j=C;throw j.name==="MethodNotFoundRpcError"||j.name==="MethodNotSupportedRpcError"?(dt.set(e.uid,!1),m):j});throw m}}if(g?.type==="local"){const E=await B(e,rs,"prepareTransactionRequest")({account:g,accessList:s,authorizationList:a,blobs:i,chain:r,data:o,gas:c,gasPrice:d,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:b,nonce:p,nonceManager:g.nonceManager,parameters:[...ns,"sidecars"],type:y,value:h,...w,to:v}),x=r?.serializers?.transaction,$=await g.signTransaction(E,{serializer:x});return await B(e,b0,"sendRawTransaction")({serializedTransaction:$})}throw g?.type==="smart"?new rt({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new rt({docsPath:"/docs/actions/wallet/sendTransaction",type:g?.type})}catch(v){throw v instanceof rt?v:gn(v,{...t,account:g,chain:t.chain||void 0})}}const ds="0x5792579257925792579257925792579257925792579257925792579257925792",fs=P(0,{size:32});async function kd(e,t){const{account:n=e.account,capabilities:r,chain:s=e.chain,experimental_fallback:a,experimental_fallbackDelay:i=32,forceAtomic:o=!1,id:c,version:d="2.0.0"}=t,u=n?ee(n):null,f=t.calls.map(b=>{const p=b,y=p.abi?mn({abi:p.abi,functionName:p.functionName,args:p.args}):p.data;return{data:p.dataSuffix&&y?Q([y,p.dataSuffix]):y,to:p.to,value:p.value?P(p.value):void 0}});try{const b=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:o,calls:f,capabilities:r,chainId:P(s.id),from:u?.address,id:c,version:d}]},{retryCount:0});return typeof b=="string"?{id:b}:b}catch(b){const p=b;if(a&&(p.name==="MethodNotFoundRpcError"||p.name==="MethodNotSupportedRpcError"||p.name==="UnknownRpcError"||p.details.toLowerCase().includes("does not exist / is not available")||p.details.toLowerCase().includes("missing or invalid. request()")||p.details.toLowerCase().includes("did not match any variant of untagged enum")||p.details.toLowerCase().includes("account upgraded to unsupported contract")||p.details.toLowerCase().includes("eip-7702 not supported")||p.details.toLowerCase().includes("unsupported wc_ method")||p.details.toLowerCase().includes("feature toggled misconfigured")||p.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(r&&Object.values(r).some(v=>!v.optional)){const v="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Je(new l(v,{details:v}))}if(o&&f.length>1){const g="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Xe(new l(g,{details:g}))}const y=[];for(const g of f){const v=y0(e,{account:u,chain:s,data:g.data,to:g.to,value:g.value?Y(g.value):void 0});y.push(v),i>0&&await new Promise(E=>setTimeout(E,i))}const h=await Promise.allSettled(y);if(h.every(g=>g.status==="rejected"))throw h[0].reason;const w=h.map(g=>g.status==="fulfilled"?g.value:fs);return{id:Q([...w,P(s.id,{size:32}),ds])}}throw gn(b,{...t,account:u,chain:t.chain})}}async function m0(e,t){async function n(u){if(u.endsWith(ds.slice(2))){const b=ae(vt(u,-64,-32)),p=vt(u,0,-64).slice(2).match(/.{1,64}/g),y=await Promise.all(p.map(w=>fs.slice(2)!==w?e.request({method:"eth_getTransactionReceipt",params:[`0x${w}`]},{dedupe:!0}):void 0)),h=y.some(w=>w===null)?100:y.every(w=>w?.status==="0x1")?200:y.every(w=>w?.status==="0x0")?500:600;return{atomic:!1,chainId:K(b),receipts:y.filter(Boolean),status:h,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[u]})}const{atomic:r=!1,chainId:s,receipts:a,version:i="2.0.0",...o}=await n(t.id),[c,d]=(()=>{const u=o.status;return u>=100&&u<200?["pending",u]:u>=200&&u<300?["success",u]:u>=300&&u<700?["failure",u]:u==="CONFIRMED"?["success",200]:u==="PENDING"?["pending",100]:[void 0,u]})();return{...o,atomic:r,chainId:s?K(s):void 0,receipts:a?.map(u=>({...u,blockNumber:Y(u.blockNumber),gasUsed:Y(u.gasUsed),status:Qn[u.status]}))??[],statusCode:d,status:c,version:i}}class h0 extends l{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}async function Rd(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:s=({statusCode:h})=>h===200||h>=300,retryCount:a=4,retryDelay:i=({count:h})=>~~(1<<h)*200,timeout:o=6e4,throwOnFailure:c=!1}=t,d=ue(["waitForCallsStatus",e.uid,n]),{promise:u,resolve:f,reject:b}=Jr();let p;const y=l0(d,{resolve:f,reject:b},h=>{const w=p0(async()=>{const g=v=>{clearTimeout(p),w(),v(),y()};try{const v=await r0(async()=>{const E=await B(e,m0,"getCallsStatus")({id:n});if(c&&E.status==="failure")throw new h0(E);return E},{retryCount:a,delay:i});if(!s(v))return;g(()=>h.resolve(v))}catch(v){g(()=>h.reject(v))}},{interval:r,emitOnBegin:!0});return w});return p=o?setTimeout(()=>{y(),clearTimeout(p),b(new g0({id:n}))},o):void 0,await u}class g0 extends l{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const St=256;let Oe=St,Ce;function jd(e=11){if(!Ce||Oe+e>St*2){Ce="",Oe=0;for(let t=0;t<St;t++)Ce+=(256+Math.random()*256|0).toString(16).substring(1)}return Ce.substring(Oe,Oe+++e)}export{B as $,Vu as A,l as B,K as C,ku as D,fa as E,je as F,ua as G,td as H,Va as I,Ru as J,Tu as K,Aa as L,P as M,kt as N,S as O,rr as P,ca as Q,sr as R,pa as S,Ue as T,$u as U,ae as V,_e as W,e0 as X,_ as Y,Sa as Z,ee as _,Q as a,vd as a$,wn as a0,jd as a1,ke as a2,ir as a3,Fu as a4,jt as a5,$e as a6,Re as a7,he as a8,zu as a9,Yu as aA,yn as aB,Io as aC,A as aD,At as aE,ld as aF,To as aG,vo as aH,Ia as aI,id as aJ,X as aK,pd as aL,dd as aM,ge as aN,od as aO,fd as aP,_r as aQ,cd as aR,Ao as aS,ud as aT,Pe as aU,Kr as aV,Uu as aW,Ro as aX,jn as aY,Oo as aZ,xd as a_,Cu as aa,sa as ab,we as ac,zd as ad,H as ae,bd as af,Bd as ag,Fr as ah,Ae as ai,z as aj,fo as ak,uo as al,co as am,Y as an,mn as ao,Fd as ap,Xr as aq,Is as ar,Ts as as,l0 as at,p0 as au,D as av,le as aw,Zu as ax,ki as ay,Tr as az,oe as b,kd as b$,Wr as b0,Ad as b1,oo as b2,Ps as b3,Ot as b4,Jn as b5,Ba as b6,wd as b7,md as b8,Zr as b9,rn as bA,tn as bB,en as bC,Yt as bD,Xt as bE,Jt as bF,Ze as bG,Ke as bH,Zt as bI,Kt as bJ,Wt as bK,qt as bL,sd as bM,Lo as bN,rd as bO,nd as bP,Au as bQ,Ct as bR,Mu as bS,Zo as bT,Gt as bU,Gr as bV,Jr as bW,Su as bX,Ie as bY,Qo as bZ,y0 as b_,gd as ba,hd as bb,_u as bc,no as bd,Du as be,Hu as bf,Wu as bg,Ra as bh,Fs as bi,qu as bj,Qt as bk,Zn as bl,r0 as bm,ad as bn,nn as bo,Xe as bp,pn as bq,ln as br,fn as bs,dn as bt,un as bu,Je as bv,cn as bw,on as bx,an as by,sn as bz,Ho as c,h0 as c$,Rd as c0,Bu as c1,Be as c2,Ma as c3,Te as c4,Ye as c5,rs as c6,ns as c7,rt as c8,gn as c9,ed as cA,Ku as cB,Rs as cC,js as cD,No as cE,Yn as cF,bn as cG,He as cH,Ja as cI,So as cJ,Ve as cK,b0 as cL,t0 as cM,Sd as cN,es as cO,m0 as cP,be as cQ,Bt as cR,ka as cS,Fn as cT,oa as cU,Nu as cV,ja as cW,Ua as cX,gr as cY,ro as cZ,Qr as c_,ss as ca,o0 as cb,Od as cc,Lr as cd,S0 as ce,M0 as cf,B0 as cg,$i as ch,Ju as ci,Xu as cj,or as ck,Zs as cl,Ou as cm,P0 as cn,zt as co,vt as cp,Eu as cq,Iu as cr,ie as cs,bo as ct,n0 as cu,Na as cv,Kn as cw,Rr as cx,Ni as cy,Da as cz,to as d,nr as d$,lt as d0,ba as d1,ya as d2,xi as d3,dr as d4,lo as d5,hn as d6,Jo as d7,pt as d8,Pu as d9,k as dA,Wn as dB,ys as dC,qn as dD,bi as dE,so as dF,Ns as dG,xt as dH,gi as dI,fi as dJ,g0 as dK,xs as dL,Cr as dM,zr as dN,W as dO,wu as dP,kr as dQ,Ss as dR,F0 as dS,Fo as dT,Cd as dU,Ed as dV,Pd as dW,$d as dX,Td as dY,Id as dZ,Rt as d_,ht as da,Ft as db,gt as dc,wt as dd,_a as de,Ha as df,hi as dg,ps as dh,qa as di,s0 as dj,mi as dk,bs as dl,yi as dm,pi as dn,vi as dp,a0 as dq,Us as dr,xe as ds,wi as dt,i0 as du,Yo as dv,mt as dw,bt as dx,yt as dy,U as dz,We as e,Kc as e$,Qu as e0,A0 as e1,Ui as e2,as as e3,is as e4,xu as e5,$s as e6,_0 as e7,V0 as e8,q0 as e9,L0 as eA,D0 as eB,H0 as eC,eu as eD,tu as eE,nu as eF,ru as eG,su as eH,au as eI,iu as eJ,Hc as eK,ou as eL,cu as eM,uu as eN,du as eO,fu as eP,lu as eQ,pu as eR,bu as eS,yu as eT,mu as eU,_c as eV,hu as eW,gu as eX,Vc as eY,qc as eZ,Wc as e_,W0 as ea,K0 as eb,Z0 as ec,J0 as ed,C0 as ee,X0 as ef,Y0 as eg,Q0 as eh,ec as ei,tc as ej,nc as ek,rc as el,sc as em,ac as en,ic as eo,z0 as ep,oc as eq,cc as er,uc as es,k0 as et,R0 as eu,j0 as ev,U0 as ew,N0 as ex,G0 as ey,O0 as ez,Ne as f,Zc as f0,Jc as f1,Dc as f2,Xc as f3,Yc as f4,Qc as f5,Pc as f6,$c as f7,Ec as f8,Ic as f9,xc as fA,vc as fB,vs as fC,ms as fD,Co as fE,ko as fF,As as fG,x0 as fH,ia as fI,hr as fJ,la as fK,Or as fL,Xn as fM,vu as fN,Tc as fa,Ac as fb,Mc as fc,fc as fd,Bc as fe,Sc as ff,Fc as fg,Oc as fh,Cc as fi,zc as fj,kc as fk,Rc as fl,jc as fm,Uc as fn,lc as fo,Nc as fp,Gc as fq,Lc as fr,pc as fs,bc as ft,yc as fu,mc as fv,hc as fw,gc as fx,dc as fy,wc as fz,Me as g,fe as h,Md as i,jr as j,Vt as k,Lu as l,Gu as m,De as n,Ge as o,Ga as p,yd as q,Oa as r,ue as s,Lt as t,me as u,ju as v,V as w,ce as x,Bs as y,T as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as pe,s as me,b as he,p as ve,M as g,S as ee,R as l,i as v,r as E,c as f,d as a,A as j,e as te,f as ie,C as m,g as H,h as fe,j as k,E as G,O as T,k as M,l as F,m as $,n as D,T as ge,o as be,q as ye,t as xe}from"./core-
|
|
1
|
+
import{a as pe,s as me,b as he,p as ve,M as g,S as ee,R as l,i as v,r as E,c as f,d as a,A as j,e as te,f as ie,C as m,g as H,h as fe,j as k,E as G,O as T,k as M,l as F,m as $,n as D,T as ge,o as be,q as ye,t as xe}from"./core-iy2F1EJT.js";import{c as u,n as d,r as w,o as V,U as Ce}from"./index-f2LDpGwT.js";const p=ve({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),ke={state:p,subscribe(r){return he(p,()=>r(p))},subscribeKey(r,e){return me(p,r,e)},showTooltip({message:r,triggerRect:e,variant:t}){p.open=!0,p.message=r,p.triggerRect=e,p.variant=t},hide(){p.open=!1,p.message="",p.triggerRect={width:0,height:0,top:0,left:0}}},A=pe(ke),oe={isUnsupportedChainView(){return l.state.view==="UnsupportedChain"||l.state.view==="SwitchNetwork"&&l.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){g.shake();return}if(await ee.isSIWXCloseDisabled()){g.shake();return}g.close()}},Se=v`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as B}from"./__federation_fn_import-
|
|
1
|
+
import{importShared as B}from"./__federation_fn_import-D82-s3kA.js";import{getRpcClient as N}from"./rpc-ti0b0r_u.js";import{s as g}from"./sleep-mAKpSMLY.js";import{h as A}from"./hex-B0Rx0hII.js";async function I(t){const e=await t({method:"eth_blockNumber"});return A(e)}const{formatTransactionReceipt:E}=await B("viem");async function x(t,e){const n=await t({method:"eth_getTransactionReceipt",params:[e.hash]});if(!n)throw new Error("Transaction receipt not found.");return E(n)}const y=5e3,D=1e3,k=500,M=2,T=10;function R(t){for(;t.length<T;)t.unshift(D);return t.reduce((n,s)=>n+s,0)/t.length}function O(t,e,n,s){let l=[],c=[],a=!1,o,r;const b=N({chain:e,client:t});async function p(){if(!a)return;try{const i=await I(b);if(!o||i>o){let h=[];if(o)for(let f=o+1n;f<=i;f++)h.push(BigInt(f));else h=[i];o=i;const w=Date.now();if(r){const f=(w-r)/h.length;c.push(f),c=c.slice(-T)}r=w;for(const f of h)for(const L of l)L(f)}}catch(i){s?s(i):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${i}`)}const m=R(c),u=Math.max(k,Math.min(y,Math.max(k,m)));await g(u/(n??M)),p()}return function(u,i){return l.push(u),a||(o=i,a=!0,p()),function(){l=l.filter(w=>w!==u),l.length===0&&(o=void 0,r=void 0,a=!1)}}}const _=new Map;function P(t){const{client:e,chain:n,onNewBlockNumber:s,overPollRatio:l,latestBlockNumber:c,onError:a}=t,o=n.id;let r=_.get(o);return r||(r=O(e,n,l,a),_.set(o,r)),r(s,c)}const W=100,d=new Map;function C(t){const{transactionHash:e,chain:n,client:s}=t,c=`${n.id}:tx_${e}`,a=t.maxBlocksWaitTime??W;if(d.has(c))return d.get(c);const o=new Promise((r,b)=>{e||b(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const p=N({chain:n,client:s});let m=-1;const u=P({chain:n,client:s,onNewBlockNumber:async()=>{if(m++,m>=a){u(),b(new Error(`Transaction receipt for ${e} not found after ${a} blocks`));return}try{const i=await x(p,{hash:e});u(),r(i)}catch{}}})}).finally(()=>{d.delete(c)});return d.set(c,o),o}export{I as a,P as b,x as e,C as w};
|