@dcl/explore-site 0.0.1-24506067692.commit-7cbe267 → 0.0.1-24533810684.commit-08f2d1e

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.
Files changed (171) hide show
  1. package/assets/HomePage-DPGatVCF.js +3 -0
  2. package/assets/{QueryClientProvider-S2cSmCUs.js → QueryClientProvider-diWVe5Kl.js} +1 -1
  3. package/assets/{SensorsRounded-TwgeIrvl.js → SensorsRounded-B5CYaxPg.js} +1 -1
  4. package/assets/Web3Inner-z-tSs8sf.js +1 -0
  5. package/assets/Web3SyncProvider-CypbX7iI.js +3 -0
  6. package/assets/__federation_expose_App-Bndnzp1U.js +1 -0
  7. package/assets/__federation_fn_import-BPa8h49G.js +1 -0
  8. package/assets/__federation_shared_@dcl/core-web3/lazy-BxXRMbjM.js +1 -0
  9. package/assets/__federation_shared_@dcl/core-web3-Bg69b_qh.js +2 -0
  10. package/assets/__federation_shared_@dcl/{hooks-DWUL36eR.js → hooks-mIJ2xjF0.js} +3 -3
  11. package/assets/__federation_shared_@emotion/react-CyrdJVjV.js +1 -0
  12. package/assets/__federation_shared_@emotion/{styled-CutIM4hd.js → styled--75jFTzr.js} +1 -1
  13. package/assets/{__federation_shared_decentraland-ui2-OcYWz3BJ.js → __federation_shared_decentraland-ui2-dJS9Vwj5.js} +6 -6
  14. package/assets/{__federation_shared_react-redux-BsRWKqZd.js → __federation_shared_react-redux-PotGTJzf.js} +1 -1
  15. package/assets/{__federation_shared_react-router-dom-D6fN_MPs.js → __federation_shared_react-router-dom-BOdQQ4Uh.js} +1 -1
  16. package/assets/__federation_shared_viem-DDBJYZTJ.js +2 -0
  17. package/assets/{__federation_shared_wagmi-V68qkOak.js → __federation_shared_wagmi-CgLPXn48.js} +1 -1
  18. package/assets/{add-DYSzlqDi.js → add-B6OUNwc7.js} +1 -1
  19. package/assets/{all-wallets-Cz1_BP21.js → all-wallets-BwSwHRpq.js} +1 -1
  20. package/assets/{app-store-DJD6if64.js → app-store-CF95uJ5u.js} +1 -1
  21. package/assets/{apple-ONzgQNZb.js → apple-D-T8pMcm.js} +1 -1
  22. package/assets/{arrow-bottom-CS4hUU5K.js → arrow-bottom-DdhQXQwO.js} +1 -1
  23. package/assets/{arrow-bottom-circle-tskAwsAe.js → arrow-bottom-circle-CFQGU7p7.js} +1 -1
  24. package/assets/{arrow-left-lVGPT4Ol.js → arrow-left-BD_NkLWm.js} +1 -1
  25. package/assets/{arrow-right-DCzkLJ85.js → arrow-right-DkGqRZiP.js} +1 -1
  26. package/assets/{arrow-top-BfoirqVJ.js → arrow-top-moQ8S34l.js} +1 -1
  27. package/assets/{auto-track-ylAeu8GC.js → auto-track-DWK83jm7.js} +1 -1
  28. package/assets/{bank-C3Dt70oH.js → bank-wlox9c4u.js} +1 -1
  29. package/assets/{basic-t1j5X-od.js → basic-FS2Z04Mz.js} +1 -1
  30. package/assets/{biconomy-BA_1W9dm.js → biconomy-BrXNiP4h.js} +1 -1
  31. package/assets/{browser-CJ0usHLI.js → browser-CUQ2zQTB.js} +1 -1
  32. package/assets/{card-Cz1gdgq-.js → card-NrYjwqUv.js} +1 -1
  33. package/assets/{ccip-D79frVW8.js → ccip-B5vuDNHH.js} +1 -1
  34. package/assets/{checkmark-C5jp9GGl.js → checkmark-566o88C-.js} +1 -1
  35. package/assets/{checkmark-bold-BTecpTuR.js → checkmark-bold-3uwTX7px.js} +1 -1
  36. package/assets/{chevron-bottom-BkF7oESa.js → chevron-bottom-CfzwLSb9.js} +1 -1
  37. package/assets/{chevron-left-D1L-jaav.js → chevron-left-ClLgeGWx.js} +1 -1
  38. package/assets/{chevron-right-D5rt8sAi.js → chevron-right-aRPuH5to.js} +1 -1
  39. package/assets/{chevron-top-hc8gcFpH.js → chevron-top-YRpl4M0m.js} +1 -1
  40. package/assets/{chrome-store-ChFX3FT3.js → chrome-store-DsmdHqVO.js} +1 -1
  41. package/assets/{clock-CzLodk_r.js → clock-CZ7NDF6g.js} +1 -1
  42. package/assets/{close-BuQlpuUL.js → close-B5lXMNNb.js} +1 -1
  43. package/assets/{coinPlaceholder-B2Z6-yue.js → coinPlaceholder-BjCnyfne.js} +1 -1
  44. package/assets/{compass-CZUlvUVM.js → compass-CS_Os52w.js} +1 -1
  45. package/assets/{controller-BtDVd_aq.js → controller-DvdeaE6y.js} +2 -2
  46. package/assets/{copy-DJv2Nr5v.js → copy-fG_5Fn5Z.js} +1 -1
  47. package/assets/{core-C4Q-G7Te.js → core-D1JqYuOS.js} +15 -15
  48. package/assets/{createBundlerClient-Br8fYUWc.js → createBundlerClient-CubtDgsV.js} +1 -1
  49. package/assets/{createClient-C3MOjVgY.js → createClient-CR8DDHzD.js} +1 -1
  50. package/assets/{cursor-K6zf8P8P.js → cursor-CxCHAFeZ.js} +1 -1
  51. package/assets/{cursor-transparent-BEmzJfXZ.js → cursor-transparent-Cv37G82O.js} +1 -1
  52. package/assets/{decimals-CfK2GdYT.js → decimals-CM2j75PQ.js} +1 -1
  53. package/assets/{decimals-BZqhR7BL.js → decimals-oozSYzUv.js} +1 -1
  54. package/assets/{desktop-CR4ncbsC.js → desktop-CQ5gYxno.js} +1 -1
  55. package/assets/{detectExtension-DQJnzr-F.js → detectExtension-Cd7CtJnn.js} +1 -1
  56. package/assets/{disconnect-Cxy_6Sd8.js → disconnect-BWSZMzR2.js} +1 -1
  57. package/assets/{discord-CJNZyUSm.js → discord-CUDtk8iW.js} +1 -1
  58. package/assets/{emotion-react.browser.esm-IRopa27p.js → emotion-react.browser.esm-C8ovg3zA.js} +1 -1
  59. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-Dek7Kpe6.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-ZrBNnPxm.js} +1 -1
  60. package/assets/{engine-mOtmwA6L.js → engine-BKFHNloO.js} +1 -1
  61. package/assets/{estimate-l1-fee-k8yGsKsO.js → estimate-l1-fee-CiVfMTJb.js} +1 -1
  62. package/assets/{eth_estimateGas-CmhCqkRZ.js → eth_estimateGas-DXVJK7bi.js} +1 -1
  63. package/assets/{eth_getStorageAt-CGBucoOx.js → eth_getStorageAt-BiqM4f8H.js} +1 -1
  64. package/assets/{eth_getTransactionCount-y2QsTvLw.js → eth_getTransactionCount-CWjm-hBg.js} +1 -1
  65. package/assets/{etherscan-b5mqHDR2.js → etherscan-C0HSXHEU.js} +1 -1
  66. package/assets/{exclamation-triangle-Bg5fRZpy.js → exclamation-triangle-cVJGZMmD.js} +1 -1
  67. package/assets/{extension-D1_3D1KE.js → extension-D5mTVlMf.js} +1 -1
  68. package/assets/{external-link-DUCz1m1z.js → external-link-nqqrcr3l.js} +1 -1
  69. package/assets/{extractIPFS-BeKSWGjo.js → extractIPFS-Q-wepBuj.js} +1 -1
  70. package/assets/{facebook-CvV-xdYv.js → facebook-BD0Z6bjG.js} +1 -1
  71. package/assets/{farcaster-DMlzK8Ar.js → farcaster-D5t_BpGY.js} +1 -1
  72. package/assets/{fetchTokenMetadata-C4NefnOo.js → fetchTokenMetadata-D7lU3SIa.js} +2 -2
  73. package/assets/{filters-DHyStwez.js → filters-DgOMNkF7.js} +1 -1
  74. package/assets/{get-ecosystem-wallet-info-CbWTwKG3.js → get-ecosystem-wallet-info-C7wEYhAI.js} +1 -1
  75. package/assets/{getBalance-D8M0DbBu.js → getBalance-D2STxyF1.js} +1 -1
  76. package/assets/{getInstalledModules-BurEvMNK.js → getInstalledModules-DCfjvoma.js} +1 -1
  77. package/assets/{getNFT-DQZppzzw.js → getNFT-9G3EvIo6.js} +2 -2
  78. package/assets/{getNFT-CH18R735.js → getNFT-C-zNHqto.js} +1 -1
  79. package/assets/{github-IilSsxgO.js → github-EgnJPOkx.js} +1 -1
  80. package/assets/{google-CCs_wu3I.js → google-ChAeFwWG.js} +1 -1
  81. package/assets/{help-circle-D_kmea0Q.js → help-circle-HHwusGfv.js} +1 -1
  82. package/assets/{id-CEDDxPyO.js → id-C3aQusJ1.js} +1 -1
  83. package/assets/{image-CacISnw5.js → image-DCBEX8iI.js} +1 -1
  84. package/assets/{in-app-wallet-calls-ZBHxiKkB.js → in-app-wallet-calls-BeM3jls_.js} +1 -1
  85. package/assets/{index-D0B01M8T.js → index-BNo5TVn1.js} +1 -1
  86. package/assets/{index-CeMOFIJl.js → index-BTcCF8pz.js} +1 -1
  87. package/assets/{index-C_nL-yLJ.js → index-C8369Kt3.js} +1 -1
  88. package/assets/{index-DSbNI5uF.js → index-CJxT02Ns.js} +1 -1
  89. package/assets/{index-BXOfMki0.js → index-CZsU5YW3.js} +1 -1
  90. package/assets/{index-BH6zTRml.js → index-CvY3anJm.js} +1 -1
  91. package/assets/index-Cxm_S31E.js +1 -0
  92. package/assets/{index-Bm1VTLe0.js → index-D1OpWHUo.js} +1 -1
  93. package/assets/index-DIcECrTc.js +2 -0
  94. package/assets/{index-BSdPSW5L.js → index-DRyfynLp.js} +2 -2
  95. package/assets/{index-DP4gqdTC.js → index-Dd7Rwv7H.js} +2 -2
  96. package/assets/index-Dy0yjznp.js +1 -1
  97. package/assets/index-VfkM29PH.js +1 -1
  98. package/assets/{index-DCzaGJ0h.js → index-nPgQlNn6.js} +3 -3
  99. package/assets/{index.es-f9VeuVCb.js → index.es-DNUnpMVo.js} +3 -3
  100. package/assets/{index.es-CvfHWDxQ.js → index.es-qiXhv63q.js} +1 -1
  101. package/assets/{info-DZvM_7Tg.js → info-Cg-tEK6c.js} +1 -1
  102. package/assets/{info-circle-CbTMexJv.js → info-circle-A5OoaMHb.js} +1 -1
  103. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  104. package/assets/{lightbulb-yx2Mb3EV.js → lightbulb-DklKm46X.js} +1 -1
  105. package/assets/{mail-Dr3LWsa7.js → mail-BSh1g2Jd.js} +1 -1
  106. package/assets/{mobile-cqKuurbN.js → mobile-DY0gT7mE.js} +1 -1
  107. package/assets/{more-B2cKG2Cj.js → more-BMDmshJx.js} +1 -1
  108. package/assets/{network-placeholder-3q6GFkiF.js → network-placeholder-DU1RU4mB.js} +1 -1
  109. package/assets/{nftPlaceholder-PhYi3Gz0.js → nftPlaceholder-ZQBNuzRA.js} +1 -1
  110. package/assets/{off-DUI09dYV.js → off-DworvT8U.js} +1 -1
  111. package/assets/{openzeppelin-BX7BOYoL.js → openzeppelin-Cwt7PzKv.js} +1 -1
  112. package/assets/{ownerOf-BC019JN1.js → ownerOf-C-ehsDvS.js} +1 -1
  113. package/assets/{parseNft-B8R4kPQV.js → parseNft-CW2Wd1uX.js} +2 -2
  114. package/assets/{play-store-JeT38BY2.js → play-store-BUEXP4Ts.js} +1 -1
  115. package/assets/{plus--DWdZlCp.js → plus-BSLABLbR.js} +1 -1
  116. package/assets/preload-helper-rvnS1VMA.js +1 -0
  117. package/assets/{qr-code-BJDvJfO3.js → qr-code-Bhv4LYqU.js} +1 -1
  118. package/assets/{qr-overlay-ClttGQRf.js → qr-overlay-CEcTSSu9.js} +1 -1
  119. package/assets/{recycle-horizontal-Lkcjnn5n.js → recycle-horizontal-DKMdpTCz.js} +1 -1
  120. package/assets/{refresh-BT1jR4Dn.js → refresh-87LbOihu.js} +1 -1
  121. package/assets/remoteEntry.js +1 -1
  122. package/assets/{reown-logo-BS-2dm8x.js → reown-logo-BtZP1pGS.js} +1 -1
  123. package/assets/{resolveImplementation-DhbopK-R.js → resolveImplementation-Bq8n-Bjt.js} +1 -1
  124. package/assets/{search-BSl5mmgI.js → search-D5S6Hyhz.js} +1 -1
  125. package/assets/{send-CHeQ9oTi.js → send-DpgbB-mt.js} +1 -1
  126. package/assets/{send-batch-transaction-D1oj-0uI.js → send-batch-transaction-BALEJgO_.js} +1 -1
  127. package/assets/{send-eip712-transaction-RoGj1xEp.js → send-eip712-transaction-Dhph80lu.js} +2 -2
  128. package/assets/{send-gasless-transaction-BA1ne_Zw.js → send-gasless-transaction-BKHuNzKw.js} +2 -2
  129. package/assets/serializeAuthorizationList-thWU7FBF.js +1 -0
  130. package/assets/{session-proposal-D3Df17qP.js → session-proposal-HTjdwE7s.js} +1 -1
  131. package/assets/{session-request-FSnknvu5.js → session-request-BfWU2VwD.js} +2 -2
  132. package/assets/{signing-CJBbgcWH.js → signing-CPQmF9YX.js} +5 -5
  133. package/assets/slice-Dr1G42o6.js +1 -0
  134. package/assets/{swapHorizontal-cske8D4e.js → swapHorizontal-CQZjmlYk.js} +1 -1
  135. package/assets/{swapHorizontalBold-b6nHPenD.js → swapHorizontalBold-DYoOkH_7.js} +1 -1
  136. package/assets/{swapHorizontalMedium-DV93kJ8d.js → swapHorizontalMedium-GdF4wR0W.js} +1 -1
  137. package/assets/{swapHorizontalRoundedBold-B-tUcUDQ.js → swapHorizontalRoundedBold-CLPmazpV.js} +1 -1
  138. package/assets/{swapVertical-b60outJ9.js → swapVertical-Cz87s-yZ.js} +1 -1
  139. package/assets/{telegram-DYtfIm5p.js → telegram-DZICyDKX.js} +1 -1
  140. package/assets/{thirdweb-CSjGe06A.js → thirdweb-84h-CMUL.js} +3 -3
  141. package/assets/{three-dots-BEq0F5FJ.js → three-dots-BNuEs7h-.js} +1 -1
  142. package/assets/{totalSupply-CqPmrflK.js → totalSupply-Cf3-EivY.js} +1 -1
  143. package/assets/{twitch-VNmCX4fc.js → twitch-EZfFCvsb.js} +1 -1
  144. package/assets/{twitterIcon-DQdyBmm7.js → twitterIcon-D-EPzD6z.js} +1 -1
  145. package/assets/uid-Cg2-wLF5.js +44 -0
  146. package/assets/{verify-Ch-jj4sL.js → verify-C66JnFn0.js} +1 -1
  147. package/assets/{verify-filled-DAsUJrHR.js → verify-filled-CTRYZAWt.js} +1 -1
  148. package/assets/{w3m-modal-CwL-F657.js → w3m-modal-C_eW6nP7.js} +1 -1
  149. package/assets/{wait-for-tx-receipt-8QHIPUR1.js → wait-for-tx-receipt-D0woCUzS.js} +1 -1
  150. package/assets/{wallet-VPqOEzNs.js → wallet-CfN0W2cy.js} +1 -1
  151. package/assets/{wallet-placeholder-x8qRsSsI.js → wallet-placeholder-3kYYEaa5.js} +1 -1
  152. package/assets/{walletconnect-CQuMWn29.js → walletconnect-bmCQ7zYa.js} +1 -1
  153. package/assets/{wallets-DA1wJowE.js → wallets-DPgFGNNu.js} +5 -5
  154. package/assets/{warning-circle-BJ1YmKtQ.js → warning-circle-DTFLsDBk.js} +1 -1
  155. package/assets/{web-connector-C73Vanyj.js → web-connector-B-b80tlH.js} +3 -3
  156. package/assets/webSocket-CO2AWAe6.js +3 -0
  157. package/assets/{x-C855X9Jf.js → x-Btssr2Ai.js} +1 -1
  158. package/index.html +14 -16
  159. package/package.json +3 -3
  160. package/assets/HomePage-DuWKLuFD.js +0 -3
  161. package/assets/__federation_expose_App-B4QxDAu7.js +0 -1
  162. package/assets/__federation_fn_import-chtkoWq_.js +0 -1
  163. package/assets/__federation_shared_@dcl/core-web3-CqeOHBSV.js +0 -2
  164. package/assets/__federation_shared_@emotion/react-ClHMF0dJ.js +0 -1
  165. package/assets/__federation_shared_viem-CX1dsuPM.js +0 -2
  166. package/assets/index-Dr-PyceS.js +0 -2
  167. package/assets/index-qLRO6nWB.js +0 -1
  168. package/assets/preload-helper-B1n3wPb0.js +0 -1
  169. package/assets/serializeTransaction-gwTERWWq.js +0 -1
  170. package/assets/uid-BU7APsHa.js +0 -44
  171. package/assets/webSocket-G5Mbc2fm.js +0 -3
@@ -0,0 +1,44 @@
1
+ const __vite__fileDeps=["assets/ccip-B5vuDNHH.js","assets/webSocket-CO2AWAe6.js","assets/preload-helper-rvnS1VMA.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{_ as Hn}from"./preload-helper-rvnS1VMA.js";const Pn=[{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"}],x0=[{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"}]}],_n=[{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"}],v0=[..._n,{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"}]}],P0=[..._n,{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"}]}],$0=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],E0=[{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"}]}],I0=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],T0=[{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"}],A0=[{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"}]}],M0=[{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"}]}],B0=[{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"}],S0=[{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:[]}],F0=[{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"}];function fe(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Is(e.type);return`${e.name}(${Le(e.inputs,{includeName:t})})`}function Le(e,{includeName:t=!1}={}){return e?e.map(n=>ps(n,{includeName:t})).join(t?", ":","):""}function ps(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Le(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}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}const Vn="2.44.2";let ze={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Vn}`};function O0(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
+ `);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=Vn}walk(t){return qn(this,t)}};function qn(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?qn(e.cause,t):t?null:e}class bs extends l{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
4
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class $n extends l{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
5
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class C0 extends l{constructor({data:t,size:n}){super([`Data size of ${n} bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(`
6
+ `),{metaMessages:[`Data: ${t} (${n} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}class ys extends l{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
7
+ `),{metaMessages:[`Params: (${Le(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Ft extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class ms extends l{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
8
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class hs extends l{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${T(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class gs extends l{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
9
+ `),{name:"AbiEncodingLengthMismatchError"})}}class z0 extends l{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
10
+ `),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class k0 extends l{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
11
+ `),{docsPath:n,name:"AbiErrorNotFoundError"})}}class Wn extends l{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
12
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class R0 extends l{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class j0 extends l{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
13
+ `),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class U0 extends l{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
14
+ `),{docsPath:n,name:"AbiEventNotFoundError"})}}class ke extends l{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
15
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class ws extends l{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
16
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class N0 extends l{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
17
+ `),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class xs extends l{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${fe(t.abiItem)}\`, and`,`\`${n.type}\` in \`${fe(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class vs extends l{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class G0 extends l{constructor({abiItem:t,data:n,params:r,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(`
18
+ `),{metaMessages:[`Params: (${Le(r,{includeName:!0})})`,`Data: ${n} (${s} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{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,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t,this.data=n,this.params=r,this.size=s}}class L0 extends l{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${fe(t,{includeName:!0})}".`].join(`
19
+ `),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class Ps extends l{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
20
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class $s extends l{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}}class Es extends l{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
22
+ `),{name:"InvalidArrayError"})}}class Is extends l{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
+ `),{name:"InvalidDefinitionTypeError"})}}class D0 extends l{constructor(t){super(`Type "${t}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}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"})}}let Kn=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"})}},Zn=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 En 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"?ae(e,{dir:t,size:n}):Ts(e,{dir:t,size:n})}function ae(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new Zn({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Ts(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Zn({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}let Ot=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 As 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 Ms 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 q0=class extends l{constructor(t){super(`Hex value "${t}" is an odd length (${t.length}). It must be an even length.`,{name:"InvalidHexValueError"})}},Bs=class extends l{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function ie(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}function G(e,{size:t}){if(T(e)>t)throw new Bs({givenSize:T(e),maxSize:t})}function Z0(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"?Fs(e,n):r==="boolean"?Ss(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 Ss(e,t={}){let n=e;if(t.size&&(G(n,{size:t.size}),n=ie(n)),ie(n)==="0x00")return!1;if(ie(n)==="0x01")return!0;throw new Ms(n)}function K(e,t={}){const n=Y(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Ot({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}function Fs(e,t={}){let n=_(e);return t.size&&(G(n,{size:t.size}),n=ie(n,{dir:"right"})),new TextDecoder().decode(n)}const Os=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"?Xn(e,t):typeof e=="boolean"?Jn(e,t):S(e,t)}function Jn(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+=Os[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 Ot({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 Cs=new TextEncoder;function Xn(e,t={}){const n=Cs.encode(e);return S(n,t)}const zs=new TextEncoder;function Ct(e,t={}){return typeof e=="number"||typeof e=="bigint"?Rs(e,t):typeof e=="boolean"?ks(e,t):oe(e)?_(e,t):Yn(e,t)}function ks(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 In(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=In(r.charCodeAt(o++)),d=In(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 Rs(e,t){const n=P(e,t);return _(n)}function Yn(e,t={}){const n=zs.encode(e);return typeof t.size=="number"?(G(n,{size:t.size}),we(n,{dir:"right",size:t.size})):n}const 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 Us(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 Ns=(e,t,n)=>e<<n|t>>>32-n,Gs=(e,t,n)=>t<<n|e>>>32-n,Ls=(e,t,n)=>t<<n-32|e>>>64-n,Ds=(e,t,n)=>e<<n-32|t>>>64-n,pe=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Hs(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Re(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function he(e,...t){if(!Hs(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 J0(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Re(e.outputLen),Re(e.blockLen)}function je(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 Qn(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 _s(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 X0(e,t){return e<<t|e>>>32-t>>>0}const Vs=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function qs(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Ws(e){for(let t=0;t<e.length;t++)e[t]=qs(e[t]);return e}const An=Vs?e=>e:Ws;function Ks(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function zt(e){return typeof e=="string"&&(e=Ks(e)),he(e),e}function Y0(...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 er{}function tr(e){const t=r=>e().update(zt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Q0(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")}const Zs=BigInt(0),ve=BigInt(1),Js=BigInt(2),Xs=BigInt(7),Ys=BigInt(256),Qs=BigInt(113),nr=[],rr=[],sr=[];for(let e=0,t=ve,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],nr.push(2*(5*r+n)),rr.push((e+1)*(e+2)/2%64);let s=Zs;for(let a=0;a<7;a++)t=(t<<ve^(t>>Xs)*Qs)%Ys,t&Js&&(s^=ve<<(ve<<BigInt(a))-ve);sr.push(s)}const ar=Us(sr,!0),ea=ar[0],ta=ar[1],Mn=(e,t,n)=>n>32?Ls(e,t,n):Ns(e,t,n),Bn=(e,t,n)=>n>32?Ds(e,t,n):Gs(e,t,n);function na(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const o=(i+8)%10,c=(i+2)%10,d=n[c],u=n[c+1],f=Mn(d,u,1)^n[o],b=Bn(d,u,1)^n[o+1];for(let p=0;p<50;p+=10)e[i+p]^=f,e[i+p+1]^=b}let s=e[2],a=e[3];for(let i=0;i<24;i++){const o=rr[i],c=Mn(s,a,o),d=Bn(s,a,o),u=nr[i];s=e[u],a=e[u+1],e[u]=c,e[u+1]=d}for(let i=0;i<50;i+=10){for(let o=0;o<10;o++)n[o]=e[i+o];for(let o=0;o<10;o++)e[i+o]^=~n[(o+2)%10]&n[(o+4)%10]}e[0]^=ea[r],e[1]^=ta[r]}$e(n)}class kt extends er{constructor(t,n,r,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=a,Re(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=_s(this.state)}clone(){return this._cloneInto()}keccak(){An(this.state32),na(this.state32,this.rounds),An(this.state32),this.posOut=0,this.pos=0}update(t){je(this),t=zt(t),he(t);const{blockLen:n,state:r}=this,s=t.length;for(let a=0;a<s;){const i=Math.min(n-this.pos,s-a);for(let o=0;o<i;o++)r[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,n&128&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){je(this,!1),he(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,a=t.length;s<a;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,a-s);t.set(n.subarray(this.posOut,this.posOut+i),s),this.posOut+=i,s+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Re(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Qn(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,$e(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:a,enableXOF:i}=this;return t||(t=new kt(n,r,s,i,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=s,t.enableXOF=i,t.destroyed=this.destroyed,t}}const ra=(e,t,n)=>tr(()=>new kt(t,e,n)),sa=ra(1,136,256/8);function H(e,t){const n=t||"hex",r=sa(oe(e,{strict:!1})?Ct(e):e);return n==="bytes"?r:me(r)}class De extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const aa=/^0x[a-fA-F0-9]{40}$/,tt=new De(8192);function V(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(tt.has(r))return tt.get(r);const s=aa.test(e)?e.toLowerCase()===e?!0:n?He(e)===e:!0:!1;return tt.set(r,s),s}const nt=new De(8192);function He(e,t){if(nt.has(`${e}.${t}`))return nt.get(`${e}.${t}`);const n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=H(Yn(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(r[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());const a=`0x${s.join("")}`;return nt.set(`${e}.${t}`,a),a}function ec(e,t){if(!V(e,{strict:!1}))throw new ce({address:e});return He(e,t)}class Sn extends l{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class ia extends l{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class oa extends l{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const ca={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 oa({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ia({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Sn({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 Sn({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 Rt(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(ca);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Ue(e,t,n,{strict:r}={}){return oe(e,{strict:!1})?lt(e,t,n,{strict:r}):cr(e,t,n,{strict:r})}function ir(e,t){if(typeof t=="number"&&t>0&&t>T(e)-1)throw new Kn({offset:t,position:"start",size:T(e)})}function or(e,t,n){if(typeof t=="number"&&typeof n=="number"&&T(e)!==n-t)throw new Kn({offset:n,position:"end",size:T(e)})}function cr(e,t,n,{strict:r}={}){ir(e,t);const s=e.slice(t,n);return r&&or(s,t,n),s}function lt(e,t,n,{strict:r}={}){ir(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&or(s,t,n),s}function tc(e,t){const n=typeof t=="string"?{to:t}:t,r=n.to;return r==="number"?W(e,n):r==="bigint"?ur(e,n):r==="boolean"?dr(e,n):r==="string"?fr(e,n):S(e,n)}function ur(e,t={}){typeof t.size<"u"&&G(e,{size:t.size});const n=S(e,t);return Y(n,t)}function dr(e,t={}){let n=e;if(typeof t.size<"u"&&(G(n,{size:t.size}),n=ie(n)),n.length>1||n[0]>1)throw new As(n);return!!n[0]}function W(e,t={}){typeof t.size<"u"&&G(e,{size:t.size});const n=S(e,t);return K(n,t)}function fr(e,t={}){let n=e;return typeof t.size<"u"&&(G(n,{size:t.size}),n=ie(n,{dir:"right"})),new TextDecoder().decode(n)}function Q(e){return typeof e[0]=="string"?_e(e):ua(e)}function ua(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 _e(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}const nc=/^(.*)\[([0-9]*)\]$/,da=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,lr=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Ve(e,t){if(e.length!==t.length)throw new gs({expectedLength:e.length,givenLength:t.length});const n=fa({params:e,values:t}),r=Ut(n);return r.length===0?"0x":r}function fa({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(jt({param:e[r],value:t[r]}));return n}function jt({param:e,value:t}){const n=Nt(e.type);if(n){const[r,s]=n;return pa(t,{length:r,param:{...e,type:s}})}if(e.type==="tuple")return ga(t,{param:e});if(e.type==="address")return la(t);if(e.type==="bool")return ya(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,s="256"]=lr.exec(e.type)??[];return ma(t,{signed:r,size:Number(s)})}if(e.type.startsWith("bytes"))return ba(t,{param:e});if(e.type==="string")return ha(t);throw new Ps(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Ut(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:i,encoded:o}=e[a];i?t+=32:t+=T(o)}const n=[],r=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:i,encoded:o}=e[a];i?(n.push(P(t+s,{size:32})),r.push(o),s+=T(o)):n.push(o)}return Q([...n,...r])}function la(e){if(!V(e))throw new ce({address:e});return{dynamic:!1,encoded:ae(e.toLowerCase())}}function pa(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new Es(e);if(!r&&e.length!==t)throw new ms({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const a=[];for(let i=0;i<e.length;i++){const o=jt({param:n,value:e[i]});o.dynamic&&(s=!0),a.push(o)}if(r||s){const i=Ut(a);if(r){const o=P(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Q([o,i]):o}}if(s)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:Q(a.map(({encoded:i})=>i))}}function ba(e,{param:t}){const[,n]=t.type.split("bytes"),r=T(e);if(!n){let s=e;return r%32!==0&&(s=ae(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Q([ae(P(r,{size:32})),s])}}if(r!==Number.parseInt(n,10))throw new hs({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:ae(e,{dir:"right"})}}function ya(e){if(typeof e!="boolean")throw new l(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:ae(Jn(e))}}function ma(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-r-1n:0n;if(e>r||e<s)throw new Ot({max:r.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:P(e,{size:32,signed:t})}}function ha(e){const t=Xn(e),n=Math.ceil(T(t)/32),r=[];for(let s=0;s<n;s++)r.push(ae(Ue(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Q([ae(P(T(t),{size:32})),...r])}}function ga(e,{param:t}){let n=!1;const r=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],i=Array.isArray(e)?s:a.name,o=jt({param:a,value:e[i]});r.push(o),o.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Ut(r):Q(r.map(({encoded:s})=>s))}}function Nt(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function pr(e,t){const n=typeof t=="string"?_(t):t,r=Rt(n);if(T(n)===0&&e.length>0)throw new Ft;if(T(t)&&T(t)<32)throw new ys({data:typeof t=="string"?t:S(t),params:e,size:T(t)});let s=0;const a=[];for(let i=0;i<e.length;++i){const o=e[i];r.setPosition(s);const[c,d]=ye(r,o,{staticPosition:0});s+=d,a.push(c)}return a}function ye(e,t,{staticPosition:n}){const r=Nt(t.type);if(r){const[s,a]=r;return xa(e,{...t,type:a},{length:s,staticPosition:n})}if(t.type==="tuple")return Ea(e,t,{staticPosition:n});if(t.type==="address")return wa(e);if(t.type==="bool")return va(e);if(t.type.startsWith("bytes"))return Pa(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return $a(e,t);if(t.type==="string")return Ia(e,{staticPosition:n});throw new $s(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const Fn=32,pt=32;function wa(e){const t=e.readBytes(32);return[He(S(cr(t,-20))),32]}function xa(e,t,{length:n,staticPosition:r}){if(!n){const i=W(e.readBytes(pt)),o=r+i,c=o+Fn;e.setPosition(o);const d=W(e.readBytes(Fn)),u=Ee(t);let f=0;const b=[];for(let p=0;p<d;++p){e.setPosition(c+(u?p*32:f));const[y,h]=ye(e,t,{staticPosition:c});f+=h,b.push(y)}return e.setPosition(r+32),[b,32]}if(Ee(t)){const i=W(e.readBytes(pt)),o=r+i,c=[];for(let d=0;d<n;++d){e.setPosition(o+d*32);const[u]=ye(e,t,{staticPosition:o});c.push(u)}return e.setPosition(r+32),[c,32]}let s=0;const a=[];for(let i=0;i<n;++i){const[o,c]=ye(e,t,{staticPosition:r+s});s+=c,a.push(o)}return[a,s]}function va(e){return[dr(e.readBytes(32),{size:32}),32]}function Pa(e,t,{staticPosition:n}){const[r,s]=t.type.split("bytes");if(!s){const i=W(e.readBytes(32));e.setPosition(n+i);const o=W(e.readBytes(32));if(o===0)return e.setPosition(n+32),["0x",32];const c=e.readBytes(o);return e.setPosition(n+32),[S(c),32]}return[S(e.readBytes(Number.parseInt(s,10),32)),32]}function $a(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[r>48?ur(s,{signed:n}):W(s,{signed:n}),32]}function Ea(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),s=r?[]:{};let a=0;if(Ee(t)){const i=W(e.readBytes(pt)),o=n+i;for(let c=0;c<t.components.length;++c){const d=t.components[c];e.setPosition(o+a);const[u,f]=ye(e,d,{staticPosition:o});a+=f,s[r?c:d?.name]=u}return e.setPosition(n+32),[s,32]}for(let i=0;i<t.components.length;++i){const o=t.components[i],[c,d]=ye(e,o,{staticPosition:n});s[r?i:o?.name]=c,a+=d}return[s,a]}function Ia(e,{staticPosition:t}){const n=W(e.readBytes(32)),r=t+n;e.setPosition(r);const s=W(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const a=e.readBytes(s,32),i=fr(ie(a));return e.setPosition(t+32),[i,32]}function Ee(e){const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return e.components?.some(Ee);const n=Nt(e.type);return!!(n&&Ee({...e,type:n[1]}))}const Ta=e=>H(Ct(e));function Aa(e){return Ta(e)}const Ma="1.2.3";let F=class bt extends Error{constructor(t,n={}){const r=n.cause instanceof bt?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof bt&&n.cause.docsPath||n.docsPath,a=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Ma}`].join(`
24
+ `);super(a),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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=s,this.metaMessages=n.metaMessages,this.shortMessage=t}};function te(e,t){return e.exec(t)?.groups}const br=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,yr=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,mr=/^\(.+?\).*?$/,On=/^tuple(?<array>(\[(\d*)\])*)$/;function yt(e){let t=e.type;if(On.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const a=e.components[s];t+=yt(a),s<n-1&&(t+=", ")}const r=te(On,e.type);return t+=`)${r?.array||""}`,yt({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Pe(e){let t="";const n=e.length;for(let r=0;r<n;r++){const s=e[r];t+=yt(s),r!==n-1&&(t+=", ")}return t}function Ba(e){return e.type==="function"?`function ${e.name}(${Pe(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Pe(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Pe(e.inputs)})`:e.type==="error"?`error ${e.name}(${Pe(e.inputs)})`:e.type==="constructor"?`constructor(${Pe(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const hr=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Sa(e){return hr.test(e)}function Fa(e){return te(hr,e)}const gr=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Oa(e){return gr.test(e)}function Ca(e){return te(gr,e)}const wr=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function za(e){return wr.test(e)}function ka(e){return te(wr,e)}const xr=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function vr(e){return xr.test(e)}function Ra(e){return te(xr,e)}const Pr=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function ja(e){return Pr.test(e)}function Ua(e){return te(Pr,e)}const $r=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function Na(e){return $r.test(e)}function Ga(e){return te($r,e)}const La=/^receive\(\) external payable$/;function Da(e){return La.test(e)}const rc=new Set(["memory","indexed","storage","calldata"]),Ha=new Set(["indexed"]),mt=new Set(["calldata","memory","storage"]);class sc extends F{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class _a extends F{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class Va extends F{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class ac extends F{constructor({param:t}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}class ic extends F{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class qa extends F{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class Wa extends F{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class Ka extends F{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class Za extends F{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class Ja extends F{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class xe extends F{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class Xa extends F{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class Ya extends F{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class Qa extends F{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class ei extends F{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function ti(e,t,n){let r="";if(n)for(const s of Object.entries(n)){if(!s)continue;let a="";for(const i of s[1])a+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${s[0]}{${a}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const rt=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function ni(e,t={}){if(za(e))return ri(e,t);if(Oa(e))return si(e,t);if(Sa(e))return ai(e,t);if(ja(e))return ii(e,t);if(Na(e))return oi(e);if(Da(e))return{type:"receive",stateMutability:"payable"};throw new Xa({signature:e})}function ri(e,t={}){const n=ka(e);if(!n)throw new xe({signature:e,type:"function"});const r=D(n.parameters),s=[],a=r.length;for(let o=0;o<a;o++)s.push(le(r[o],{modifiers:mt,structs:t,type:"function"}));const i=[];if(n.returns){const o=D(n.returns),c=o.length;for(let d=0;d<c;d++)i.push(le(o[d],{modifiers:mt,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:s,outputs:i}}function si(e,t={}){const n=Ca(e);if(!n)throw new xe({signature:e,type:"event"});const r=D(n.parameters),s=[],a=r.length;for(let i=0;i<a;i++)s.push(le(r[i],{modifiers:Ha,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:s}}function ai(e,t={}){const n=Fa(e);if(!n)throw new xe({signature:e,type:"error"});const r=D(n.parameters),s=[],a=r.length;for(let i=0;i<a;i++)s.push(le(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:s}}function ii(e,t={}){const n=Ua(e);if(!n)throw new xe({signature:e,type:"constructor"});const r=D(n.parameters),s=[],a=r.length;for(let i=0;i<a;i++)s.push(le(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:s}}function oi(e){const t=Ga(e);if(!t)throw new xe({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const ci=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,ui=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,di=/^u?int$/;function le(e,t){const n=ti(e,t?.type,t?.structs);if(rt.has(n))return rt.get(n);const r=mr.test(e),s=te(r?ui:ci,e);if(!s)throw new qa({param:e});if(s.name&&li(s.name))throw new Wa({param:e,name:s.name});const a=s.name?{name:s.name}:{},i=s.modifier==="indexed"?{indexed:!0}:{},o=t?.structs??{};let c,d={};if(r){c="tuple";const f=D(s.type),b=[],p=f.length;for(let y=0;y<p;y++)b.push(le(f[y],{structs:o}));d={components:b}}else if(s.type in o)c="tuple",d={components:o[s.type]};else if(di.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,t?.type!=="struct"&&!Er(c))throw new Va({type:c});if(s.modifier){if(!t?.modifiers?.has?.(s.modifier))throw new Ka({param:e,type:t?.type,modifier:s.modifier});if(mt.has(s.modifier)&&!pi(c,!!s.array))throw new Za({param:e,type:t?.type,modifier:s.modifier})}const u={type:`${c}${s.array??""}`,...a,...i,...d};return rt.set(n,u),u}function D(e,t=[],n="",r=0){const s=e.trim().length;for(let a=0;a<s;a++){const i=e[a],o=e.slice(a+1);switch(i){case",":return r===0?D(o,[...t,n.trim()]):D(o,t,`${n}${i}`,r);case"(":return D(o,t,`${n}${i}`,r+1);case")":return D(o,t,`${n}${i}`,r-1);default:return D(o,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new ei({current:n,depth:r});return t.push(n.trim()),t}function Er(e){return e==="address"||e==="bool"||e==="function"||e==="string"||br.test(e)||yr.test(e)}const fi=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function li(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||br.test(e)||yr.test(e)||fi.test(e)}function pi(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function bi(e){const t={},n=e.length;for(let i=0;i<n;i++){const o=e[i];if(!vr(o))continue;const c=Ra(o);if(!c)throw new xe({signature:o,type:"struct"});const d=c.properties.split(";"),u=[],f=d.length;for(let b=0;b<f;b++){const y=d[b].trim();if(!y)continue;const h=le(y,{type:"struct"});u.push(h)}if(!u.length)throw new Ya({signature:o});t[c.name]=u}const r={},s=Object.entries(t),a=s.length;for(let i=0;i<a;i++){const[o,c]=s[i];r[o]=Ir(c,t)}return r}const yi=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Ir(e=[],t={},n=new Set){const r=[],s=e.length;for(let a=0;a<s;a++){const i=e[a];if(mr.test(i.type))r.push(i);else{const c=te(yi,i.type);if(!c?.type)throw new Ja({abiParameter:i});const{array:d,type:u}=c;if(u in t){if(n.has(u))throw new Qa({type:u});r.push({...i,type:`tuple${d??""}`,components:Ir(t[u],t,new Set([...n,u]))})}else if(Er(u))r.push(i);else throw new _a({type:u})}}return r}function Tr(e){const t=bi(e),n=[],r=e.length;for(let s=0;s<r;s++){const a=e[s];vr(a)||n.push(ni(a,t))}return n}function mi(e){let t=!0,n="",r=0,s="",a=!1;for(let i=0;i<e.length;i++){const o=e[i];if(["(",")",","].includes(o)&&(t=!0),o==="("&&r++,o===")"&&r--,!!t){if(r===0){if(o===" "&&["event","function",""].includes(s))s="";else if(s+=o,o===")"){a=!0;break}continue}if(o===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=o,n+=o}}if(!a)throw new l("Unable to normalize signature.");return s}const hi=e=>{const t=typeof e=="string"?e:Ba(e);return mi(t)};function Ar(e){return Aa(hi(e))}const gi=Ar,Gt=e=>Ue(Ar(e),0,4);function Lt(e){const{abi:t,args:n=[],name:r}=e,s=oe(r,{strict:!1}),a=t.filter(o=>s?o.type==="function"?Gt(o)===r:o.type==="event"?gi(o)===r:!1:"name"in o&&o.name===r);if(a.length===0)return;if(a.length===1)return a[0];let i;for(const o of a){if(!("inputs"in o))continue;if(!n||n.length===0){if(!o.inputs||o.inputs.length===0)return o;continue}if(!o.inputs||o.inputs.length===0||o.inputs.length!==n.length)continue;if(n.every((d,u)=>{const f="inputs"in o&&o.inputs[u];return f?ht(d,f):!1})){if(i&&"inputs"in i&&i.inputs){const d=Mr(o.inputs,i.inputs,n);if(d)throw new xs({abiItem:o,type:d[0]},{abiItem:i,type:d[1]})}i=o}}return i||a[0]}function ht(e,t){const n=typeof e,r=t.type;switch(r){case"address":return V(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>n==="object"&&ht(Object.values(e)[a],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(s=>ht(s,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Mr(e,t,n){for(const r in e){const s=e[r],a=t[r];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return Mr(s.components,a.components,n[r]);const i=[s.type,a.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?V(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?V(n[r],{strict:!1}):!1)return i}}const st="/docs/contract/decodeFunctionResult";function Br(e){const{abi:t,args:n,functionName:r,data:s}=e;let a=t[0];if(r){const o=Lt({abi:t,args:n,name:r});if(!o)throw new ke(r,{docsPath:st});a=o}if(a.type!=="function")throw new ke(void 0,{docsPath:st});if(!a.outputs)throw new ws(a.name,{docsPath:st});const i=pr(a.outputs,s);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const Cn="/docs/contract/encodeFunctionData";function wi(e){const{abi:t,args:n,functionName:r}=e;let s=t[0];if(r){const a=Lt({abi:t,args:n,name:r});if(!a)throw new ke(r,{docsPath:Cn});s=a}if(s.type!=="function")throw new ke(void 0,{docsPath:Cn});return{abi:[s],functionName:Gt(fe(s))}}function Dt(e){const{args:t}=e,{abi:n,functionName:r}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:wi(e),s=n[0],a=r,i="inputs"in s&&s.inputs?Ve(s.inputs,t??[]):void 0;return _e([a,i??"0x"])}class gt 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 xi 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 vi 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(`
25
+ `),{name:"ChainNotFoundError"})}}class Sr extends l{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class oc extends l{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function Pi({blockNumber:e,chain:t,contract:n}){const r=t?.contracts?.[n];if(!r)throw new gt({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new gt({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function ee(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const $i={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Ei={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Ii={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Ti(e){const{abi:t,data:n}=e,r=Ue(n,0,4);if(r==="0x")throw new Ft;const a=[...t||[],Ei,Ii].find(i=>i.type==="error"&&r===Gt(fe(i)));if(!a)throw new Wn(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:a,args:"inputs"in a&&a.inputs&&a.inputs.length>0?pr(a.inputs,Ue(n,4)):void 0,errorName:a.name}}const ue=(e,t,n)=>JSON.stringify(e,(r,s)=>{const a=typeof s=="bigint"?s.toString():s;return typeof t=="function"?t(r,a):a},n);function Fr({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((s,a)=>`${r&&s.name?`${s.name}: `:""}${typeof t[a]=="object"?ue(t[a]):t[a]}`).join(", ")})`}const Ai={gwei:9,wei:18},Mi={ether:-9,wei:9},cc={ether:-18,gwei:-9};function Or(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 Ht(e,t="wei"){return Or(e,Ai[t])}function z(e,t="wei"){return Or(e,Mi[t])}class Bi extends l{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class Si extends l{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function zn(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
26
+ `,"")}function Fi(e){return e.reduce((t,{address:n,...r})=>{let s=`${t} ${n}:
27
+ `;return r.nonce&&(s+=` nonce: ${r.nonce}
28
+ `),r.balance&&(s+=` balance: ${r.balance}
29
+ `),r.code&&(s+=` code: ${r.code}
30
+ `),r.state&&(s+=` state:
31
+ `,s+=zn(r.state)),r.stateDiff&&(s+=` stateDiff:
32
+ `,s+=zn(r.stateDiff)),s},` State Override:
33
+ `).slice(0,-1)}function Te(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(`
34
+ `)}class uc 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(`
35
+ `),{name:"FeeConflictError"})}}class dc extends l{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class Oi extends l{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Te(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 fc 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 lc 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 pc 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 Ci 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=Te({chain:s&&`${s?.name} (id: ${s?.id})`,from:n?.address,to:f,value:typeof b<"u"&&`${Ht(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 bc 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 yc 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 mc 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 hc extends l{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const zi=e=>e,Ae=e=>e;class ki 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,stateOverride:p}){const y=n?ee(n):void 0;let h=Te({from:y?.address,to:f,value:typeof b<"u"&&`${Ht(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});p&&(h+=`
36
+ ${Fi(p)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",h].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Ri extends l{constructor(t,{abi:n,args:r,contractAddress:s,docsPath:a,functionName:i,sender:o}){const c=Lt({abi:n,args:r,name:i}),d=c?Fr({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,u=c?fe(c,{includeName:!0}):void 0,f=Te({address:s&&zi(s),function:u,args:d&&d!=="()"&&`${[...Array(i?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:a,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=s,this.functionName=i,this.sender=o}}class ji extends l{constructor({abi:t,data:n,functionName:r,message:s}){let a,i,o,c;if(n&&n!=="0x")try{i=Ti({abi:t,data:n});const{abiItem:u,errorName:f,args:b}=i;if(f==="Error")c=b[0];else if(f==="Panic"){const[p]=b;c=$i[p]}else{const p=u?fe(u,{includeName:!0}):void 0,y=u&&b?Fr({abiItem:u,args:b,includeFunctionName:!1,includeName:!1}):void 0;o=[p?`Error: ${p}`:"",y&&y!=="()"?` ${[...Array(f?.length??0).keys()].map(()=>" ").join("")}${y}`:""]}}catch(u){a=u}else s&&(c=s);let d;a instanceof Wn&&(d=a.signature,o=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(c&&c!=="execution reverted"||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,c||d].join(`
37
+ `):`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 Ui 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 Ni 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 Cr 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}}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)}class gc 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: ${Ae(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 wc extends l{constructor({body:t,cause:n,details:r,url:s}){super("WebSocket request failed.",{cause:n,details:r,metaMessages:[`URL: ${Ae(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 zr extends l{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Ae(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 xc extends l{constructor({url:t}={}){super("The socket has been closed.",{metaMessages:[t&&`URL: ${Ae(t)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}class vc extends l{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Ae(n)}`,`Request body: ${ue(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}const Gi=-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 zr?t.code:n??Gi}}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 _t extends k{constructor(t){super(t,{code:_t.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(_t,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Vt extends k{constructor(t){super(t,{code:Vt.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Vt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class qt extends k{constructor(t,{method:n}={}){super(t,{code:qt.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(qt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Wt extends k{constructor(t){super(t,{code:Wt.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
38
+ `)})}}Object.defineProperty(Wt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class qe extends k{constructor(t){super(t,{code:qe.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(qe,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class We extends k{constructor(t){super(t,{code:We.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
39
+ `)})}}Object.defineProperty(We,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Kt extends k{constructor(t){super(t,{code:Kt.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Kt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Zt extends k{constructor(t){super(t,{code:Zt.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Zt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Jt extends k{constructor(t){super(t,{code:Jt.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Jt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Xt extends k{constructor(t,{method:n}={}){super(t,{code:Xt.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(Xt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Yt extends k{constructor(t){super(t,{code:Yt.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Yt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Qt extends k{constructor(t){super(t,{code:Qt.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Qt,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class en extends U{constructor(t){super(t,{code:en.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(en,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class tn extends U{constructor(t){super(t,{code:tn.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(tn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class nn extends U{constructor(t,{method:n}={}){super(t,{code:nn.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(nn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class rn extends U{constructor(t){super(t,{code:rn.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(rn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class sn extends U{constructor(t){super(t,{code:sn.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(sn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class an extends U{constructor(t){super(t,{code:an.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(an,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Ke extends U{constructor(t){super(t,{code:Ke.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Ke,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class on extends U{constructor(t){super(t,{code:on.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(on,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class cn extends U{constructor(t){super(t,{code:cn.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(cn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class un extends U{constructor(t){super(t,{code:un.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(un,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class dn extends U{constructor(t){super(t,{code:dn.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(dn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class fn extends U{constructor(t){super(t,{code:fn.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(fn,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Ze extends U{constructor(t){super(t,{code:Ze.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Ze,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Pc extends k{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const Li=3;function Di(e,{abi:t,address:n,args:r,docsPath:s,functionName:a,sender:i}){const o=e instanceof Cr?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 Ft?new Ui({functionName:a}):[Li,qe.code].includes(c)&&(d||u||f||b)||c===We.code&&u==="execution reverted"&&d?new ji({abi:t,data:typeof d=="object"?d.data:d,functionName:a,message:o instanceof zr?u:b??f}):e;return new Ri(p,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:a,sender:i})}const Hi="0.1.1";function _i(){return Hi}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(`
40
+ `);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 kr(this,t)}}Object.defineProperty(A,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:`ox@${_i()}`}});A.setStaticOptions(A.defaultStaticOptions);function kr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?kr(e.cause,t):t?null:e}function ln(e,t){if(ge(e)>t)throw new no({givenSize:ge(e),maxSize:t})}function Vi(e,t){if(typeof t=="number"&&t>0&&t>ge(e)-1)throw new Ur({offset:t,position:"start",size:ge(e)})}function qi(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ge(e)!==n-t)throw new Ur({offset:n,position:"end",size:ge(e)})}function Rr(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 ro({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function Wi(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 Ki="#__bigint";function Zi(e,t,n){return JSON.stringify(e,(r,s)=>typeof s=="bigint"?s.toString()+Ki:s,n)}const Ji=new TextEncoder,Xi=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Yi(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 $c(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Ec(e){return e instanceof Uint8Array?wt(e):Array.isArray(e)?wt(new Uint8Array(e)):e}function Ic(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ln(n,t.size),jr(n,t.size)):n}function wt(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=Xi[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ln(r,t.size),Qi(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 to({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?jr(c,r):c}function Tc(e,t={}){return wt(Ji.encode(e),t)}function jr(e,t){return Rr(e,{dir:"left",size:t})}function Qi(e,t){return Rr(e,{dir:"right",size:t})}function Ac(e,t,n,r={}){const{strict:s}=r;Vi(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&qi(a,t,n),a}function ge(e){return Math.ceil((e.length-2)/2)}function Mc(e){return Wi(e,{dir:"left"})}function eo(e,t={}){const{signed:n}=t;t.size&&ln(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 Bc(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:eo(e,t))}function Sc(e,t={}){const{strict:n=!1}=t;try{return Yi(e,{strict:n}),!0}catch{return!1}}class to 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"?Zi(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 no 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 Ur 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 ro 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"})}}function so(e){return{address:e.address,amount:X(e.amount),index:X(e.index),validatorIndex:X(e.validatorIndex)}}function ao(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(so)}}}const io="0x82ad56cb",oo="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",co="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",Fc="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",uo="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033",at="/docs/contract/encodeDeployData";function Nr(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 bs({docsPath:at});if(!("inputs"in s))throw new $n({docsPath:at});if(!s.inputs||s.inputs.length===0)throw new $n({docsPath:at});const a=Ve(s.inputs,n);return _e([r,a])}class be extends l{constructor({cause:t,message:n}={}){const r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(be,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(be,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Ne extends l{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${z(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Ne,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class xt extends l{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${z(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(xt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class vt extends l{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(vt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Pt extends l{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
41
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Pt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class $t extends l{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty($t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Et extends l{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
42
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(Et,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class It extends l{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(It,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Tt extends l{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Tt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class At extends l{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(At,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ge extends l{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${z(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${z(r)} gwei`:""}).`].join(`
43
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ge,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Je extends l{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function pn(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}):Ne.nodeMessage.test(n)?new Ne({cause:e,maxFeePerGas:t?.maxFeePerGas}):xt.nodeMessage.test(n)?new xt({cause:e,maxFeePerGas:t?.maxFeePerGas}):vt.nodeMessage.test(n)?new vt({cause:e,nonce:t?.nonce}):Pt.nodeMessage.test(n)?new Pt({cause:e,nonce:t?.nonce}):$t.nodeMessage.test(n)?new $t({cause:e,nonce:t?.nonce}):Et.nodeMessage.test(n)?new Et({cause:e}):It.nodeMessage.test(n)?new It({cause:e,gas:t?.gas}):Tt.nodeMessage.test(n)?new Tt({cause:e,gas:t?.gas}):At.nodeMessage.test(n)?new At({cause:e}):Ge.nodeMessage.test(n)?new Ge({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Je({cause:e})}function fo(e,{docsPath:t,...n}){const r=(()=>{const s=pn(e,n);return s instanceof Je?e:s})();return new ki(r,{docsPath:t,...n})}function Xe(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 Ye(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 lo={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Me(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=po(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=lo[e.type]),typeof e.value<"u"&&(n.value=P(e.value)),n}const Oc=Ye("transactionRequest",Me);function po(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)}:{}}))}function Gr(){let e=()=>{},t=()=>{};return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}const it=new Map;function bo({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=()=>it.delete(t),o=()=>c().map(({args:u})=>u),c=()=>it.get(t)||[],d=u=>it.set(t,[...c(),u]);return{flush:i,async schedule(u){const{promise:f,resolve:b,reject:p}=Gr();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 jn(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new En({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new En({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function yo(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=jn(r)),s!==void 0){if(i.state)throw new Si;i.stateDiff=jn(s)}return i}function Lr(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 Bi({address:n});t[n]=yo(r)}return t}const Cc=2n**(8n-1n)-1n,zc=2n**(16n-1n)-1n,kc=2n**(24n-1n)-1n,Rc=2n**(32n-1n)-1n,jc=2n**(40n-1n)-1n,Uc=2n**(48n-1n)-1n,Nc=2n**(56n-1n)-1n,Gc=2n**(64n-1n)-1n,Lc=2n**(72n-1n)-1n,Dc=2n**(80n-1n)-1n,Hc=2n**(88n-1n)-1n,_c=2n**(96n-1n)-1n,Vc=2n**(104n-1n)-1n,qc=2n**(112n-1n)-1n,Wc=2n**(120n-1n)-1n,Kc=2n**(128n-1n)-1n,Zc=2n**(136n-1n)-1n,Jc=2n**(144n-1n)-1n,Xc=2n**(152n-1n)-1n,Yc=2n**(160n-1n)-1n,Qc=2n**(168n-1n)-1n,eu=2n**(176n-1n)-1n,tu=2n**(184n-1n)-1n,nu=2n**(192n-1n)-1n,ru=2n**(200n-1n)-1n,su=2n**(208n-1n)-1n,au=2n**(216n-1n)-1n,iu=2n**(224n-1n)-1n,ou=2n**(232n-1n)-1n,cu=2n**(240n-1n)-1n,uu=2n**(248n-1n)-1n,du=2n**(256n-1n)-1n,fu=-(2n**(8n-1n)),lu=-(2n**(16n-1n)),pu=-(2n**(24n-1n)),bu=-(2n**(32n-1n)),yu=-(2n**(40n-1n)),mu=-(2n**(48n-1n)),hu=-(2n**(56n-1n)),gu=-(2n**(64n-1n)),wu=-(2n**(72n-1n)),xu=-(2n**(80n-1n)),vu=-(2n**(88n-1n)),Pu=-(2n**(96n-1n)),$u=-(2n**(104n-1n)),Eu=-(2n**(112n-1n)),Iu=-(2n**(120n-1n)),Tu=-(2n**(128n-1n)),Au=-(2n**(136n-1n)),Mu=-(2n**(144n-1n)),Bu=-(2n**(152n-1n)),Su=-(2n**(160n-1n)),Fu=-(2n**(168n-1n)),Ou=-(2n**(176n-1n)),Cu=-(2n**(184n-1n)),zu=-(2n**(192n-1n)),ku=-(2n**(200n-1n)),Ru=-(2n**(208n-1n)),ju=-(2n**(216n-1n)),Uu=-(2n**(224n-1n)),Nu=-(2n**(232n-1n)),Gu=-(2n**(240n-1n)),Lu=-(2n**(248n-1n)),Du=-(2n**(256n-1n)),Hu=2n**8n-1n,_u=2n**16n-1n,Vu=2n**24n-1n,qu=2n**32n-1n,Wu=2n**40n-1n,Ku=2n**48n-1n,Zu=2n**56n-1n,Ju=2n**64n-1n,Xu=2n**72n-1n,Yu=2n**80n-1n,Qu=2n**88n-1n,ed=2n**96n-1n,td=2n**104n-1n,nd=2n**112n-1n,rd=2n**120n-1n,sd=2n**128n-1n,ad=2n**136n-1n,id=2n**144n-1n,od=2n**152n-1n,cd=2n**160n-1n,ud=2n**168n-1n,dd=2n**176n-1n,fd=2n**184n-1n,ld=2n**192n-1n,pd=2n**200n-1n,bd=2n**208n-1n,yd=2n**216n-1n,md=2n**224n-1n,hd=2n**232n-1n,gd=2n**240n-1n,wd=2n**248n-1n,mo=2n**256n-1n;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>mo)throw new Ne({maxFeePerGas:n});if(r&&n&&r>n)throw new Ge({maxFeePerGas:n,maxPriorityFeePerGas:r})}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?Dr({code:u,data:f}):m?xo({data:f,factory:b,factoryData:p,to:x}):f;try{Be(t);const N=(typeof a=="bigint"?P(a):void 0)||i,L=d?ao(d):void 0,de=Lr(M),Se=e.chain?.formatters?.transactionRequest?.format,Qe=(Se||Me)({...Xe(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&&go({request:Qe})&&!de&&!L)try{return await wo(e,{...Qe,blockNumber:a,blockTag:i})}catch(ne){if(!(ne instanceof Sr)&&!(ne instanceof gt))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=vo(Z),{offchainLookup:L,offchainLookupSignature:de}=await Hn(async()=>{const{offchainLookup:Se,offchainLookupSignature:xn}=await import("./ccip-B5vuDNHH.js");return{offchainLookup:Se,offchainLookupSignature:xn}},__vite__mapDeps([0,1,2]));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 Ni({factory:b}):fo(Z,{...t,account:I,chain:e.chain})}}function go({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(io)||!n||Object.values(r).filter(s=>typeof s<"u").length>0)}async function wo(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 Pi({blockNumber:a,chain:e.chain,contract:"multicall3"});throw new Sr})(),f=(typeof a=="bigint"?P(a):void 0)||i,{schedule:b}=bo({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=Dt({abi:Pn,args:[w],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...d===null?{data:Dr({code:uo,data:g})}:{to:d,data:g}},f]});return Br({abi:Pn,args:[w],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:p,success:y}]=await b({data:o,to:c});if(!y)throw new Cr({data:p});return p==="0x"?{data:void 0}:{data:p}}function Dr(e){const{code:t,data:n}=e;return Nr({abi:Tr(["constructor(bytes, bytes)"]),bytecode:oo,args:[t,n]})}function xo(e){const{data:t,factory:n,factoryData:r,to:s}=e;return Nr({abi:Tr(["constructor(address, bytes, address, bytes)"]),bytecode:co,args:[s,t,n,r]})}function vo(e){if(!(e instanceof l))return;const t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}async function xd(e,t){const{abi:n,address:r,args:s,functionName:a,...i}=t,o=Dt({abi:n,args:s,functionName:a});try{const{data:c}=await B(e,ho,"call")({...i,data:o,to:r});return Br({abi:n,args:s,functionName:a,data:c||"0x"})}catch(c){throw Di(c,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}function Po(e){const t=H(`0x${e.substring(4)}`).substring(26);return He(`0x${t}`)}async function $o({hash:e,signature:t}){const n=oe(e)?e:me(e),{secp256k1:r}=await Hn(async()=>{const{secp256k1:i}=await import("./webSocket-CO2AWAe6.js").then(o=>o.am);return{secp256k1:i}},__vite__mapDeps([1,2]));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=Un(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=Un(o);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Un(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 Eo({hash:e,signature:t}){return Po(await $o({hash:e,signature:t}))}function bn(e,t="hex"){const n=Hr(e),r=Rt(new Uint8Array(n.length));return n.encode(r),t==="hex"?S(r.bytes):r.bytes}function vd(e,t="bytes"){return bn(e,t)}function Pd(e,t="hex"){return bn(e,t)}function Hr(e){return Array.isArray(e)?Io(e.map(t=>Hr(t))):To(e)}function Io(e){const t=e.reduce((s,a)=>s+a.length,0),n=_r(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 To(e){const t=typeof e=="string"?_(e):e,n=_r(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 _r(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.")}function Ao(e){const{chainId:t,nonce:n,to:r}=e,s=e.contractAddress??e.address,a=H(_e(["0x05",bn([t?P(t):"0x",s,n?P(n):"0x"])]));return r==="bytes"?_(a):a}async function Vr(e){const{authorization:t,signature:n}=e;return Eo({hash:Ao(t),signature:n??t})}class Mo 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=Te({from:n?.address,to:f,value:typeof b<"u"&&`${Ht(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 Bo(e,{docsPath:t,...n}){const r=(()=>{const s=pn(e,n);return s instanceof Je?e:s})();return new Mo(r,{docsPath:t,...n})}class qr extends l{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class yn extends l{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class So extends l{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${z(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Fo 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"})}}const Wr={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function mn(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?Wr[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=Oo(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 $d=Ye("transaction",mn);function Oo(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 Kr(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:mn(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 Ed=Ye("block",Kr);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 Fo({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||Kr)(o,"getBlock")}async function Zr(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Id(e,t){return Jr(e,t)}async function Jr(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,Zr,"getGasPrice")({})]);if(typeof a.baseFeePerGas!="bigint")throw new yn;const o=i-a.baseFeePerGas;return o<0n?0n:o}}async function Td(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 yn;const b=typeof s?.maxPriorityFeePerGas=="bigint"?s.maxPriorityFeePerGas:await Jr(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,Zr,"getGasPrice")({}))}}async function Co(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 Xr(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 Yr(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))}function zo(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 ko(e,t,n){return e&t^~e&n}function Ro(e,t,n){return e&t^e&n^t&n}class jo extends er{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){je(this),t=zt(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){je(this),Qn(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;zo(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]),Uo=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 No extends jo{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+ko(o,c,d)+Uo[f]+se[f]|0,h=(q(r,2)^q(r,13)^q(r,22))+Ro(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 Go=tr(()=>new No),Lo=Go;function Do(e,t){const n=t||"hex",r=Lo(oe(e,{strict:!1})?Ct(e):e);return n==="bytes"?r:me(r)}function Ho(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Do(t,"bytes");return s.set([n],0),r==="bytes"?s:S(s)}function _o(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(Ho({commitment:a,to:r,version:n}));return s}const Nn=6,Qr=32,hn=4096,es=Qr*hn,Gn=es*Nn-1-1*hn*Nn,Vo=1;class qo extends l{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Wo extends l{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Ad extends l{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Md extends l{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Vo}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function Ko(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 Wo;if(r>Gn)throw new qo({maxSize:Gn,size:r});const s=[];let a=!0,i=0;for(;a;){const o=Rt(new Uint8Array(es));let c=0;for(;c<hn;){const d=n.slice(i,i+(Qr-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 Zo(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??Ko({data:t,to:r}),a=e.commitments??Xr({blobs:s,kzg:n,to:r}),i=e.proofs??Yr({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}function Jo(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new Oi({transaction:e})}function gn(e,{docsPath:t,...n}){const r=(()=>{const s=pn(e,n);return s instanceof Je?e:s})();return new Ci(r,{docsPath:t,...n})}async function wn(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return K(t)}async function Xo(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=($||Me)({...Xe(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||mn)(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 ts=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Ln=new Map,ot=new De(128);async function ns(e,t){let n=t;n.account??=e.account,n.parameters??=ts;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||ot.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,Xo,"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 ot.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"})&&ot.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,Co,"getTransactionCount")({address:u.address,blockTag:"pending"})),(i.includes("blobVersionedHashes")||i.includes("sidecars"))&&y&&w){const x=Xr({blobs:y,kzg:w});if(i.includes("blobVersionedHashes")){const $=_o({commitments:x,to:"hex"});n.blobVersionedHashes=$}if(i.includes("sidecars")){const $=Yr({blobs:y,commitments:x,kzg:w}),M=Zo({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=Jo(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 So({maxPriorityFeePerGas:M});n.maxPriorityFeePerGas=M,n.maxFeePerGas=$}}else{if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")throw new yn;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,Yo,"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 Yo(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 Vr({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 ns(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=Lr($);Be(t);const m=e.chain?.formatters?.transactionRequest?.format,j=(m||Me)({...Xe(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 Bo(i,{...t,account:s,chain:e.chain})}}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}function Sd(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 Qo(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}:{}}}async function Bt(e){return new Promise(t=>setTimeout(t,e))}function e0(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()})}function t0({chain:e,currentChainId:t}){if(!e)throw new vi;if(t!==e.id)throw new xi({chain:e,currentChainId:t})}const rs={"0x0":"reverted","0x1":"success"};function n0(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=>Qo(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?K(e.transactionIndex):null,status:e.status?rs[e.status]:null,type:e.type?Wr[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Fd=Ye("transactionReceipt",n0);class r0 extends l{constructor({domain:t}){super(`Invalid domain "${ue(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class s0 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 a0 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 i0(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(lr);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(da);if(p){const[h,w]=p;if(w&&T(f)!==Number.parseInt(w,10))throw new vs({expectedSize:Number.parseInt(w,10),givenSize:T(f)})}const y=s[u];y&&(o0(u),a(y,f))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new r0({domain:t});a(s.EIP712Domain,t)}if(r!=="EIP712Domain")if(s[r])a(s[r],n);else throw new s0({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 o0(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new a0({type:e})}function zd(e){const{domain:t={},message:n,primaryType:r}=e,s={EIP712Domain:ss({domain:t}),...e.types};i0({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=[c0({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 Ve(r,s)}function c0({primaryType:e,types:t}){const n=me(u0({primaryType:e,types:t}));return H(n)}function u0({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(Ve(a.map(([i])=>i),a.map(([,i])=>i)))]}return[{type:n},r]}const ct=new Map,Dn=new Map;let d0=0;function f0(e,t,n){const r=++d0,s=()=>ct.get(e)||[],a=()=>{const u=s();ct.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(ct.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 l0(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}class p0 extends l{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
44
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class ut extends l{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function b0(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const dt=new De(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 p0({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 Vr({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")({}),t0({currentChainId:E,chain:r}));const x=e.chain?.formatters?.transactionRequest?.format,M=(x||Me)({...Xe(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,ns,"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:[...ts,"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 ut({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ut({docsPath:"/docs/actions/wallet/sendTransaction",type:g?.type})}catch(v){throw v instanceof ut?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?Dt({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 Ke(new l(v,{details:v}))}if(o&&f.length>1){const g="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Ze(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=ie(lt(u,-64,-32)),p=lt(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:rs[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}=Gr();let p;const y=f0(d,{resolve:f,reject:b},h=>{const w=l0(async()=>{const g=v=>{clearTimeout(p),w(),v(),y()};try{const v=await e0(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{ji as $,Zo as A,l as B,dc as C,ie as D,Wo as E,Ne as F,me as G,gc as H,oc as I,Co as J,_ as K,De as L,p0 as M,ee as N,B as O,wn as P,jd as Q,we as R,zd as S,Ge as T,H as U,xd as V,Tr as W,Bd as X,Te as Y,z as Z,Ui as _,Q as a,fn as a$,Ri as a0,Y as a1,Dt as a2,Td as a3,Lr as a4,Qo as a5,n0 as a6,f0 as a7,l0 as a8,Ed as a9,A as aA,wt as aB,eo as aC,Bc as aD,Zi as aE,Pi as aF,E0 as aG,v0 as aH,Br as aI,$0 as aJ,P0 as aK,U0 as aL,gi as aM,R0 as aN,j0 as aO,L0 as aP,ys as aQ,ia as aR,G0 as aS,Vr as aT,ec as aU,Xt as aV,Xn as aW,e0 as aX,Pc as aY,en as aZ,Ze as a_,mn as aa,$d as ab,Fd as ac,Rd as ad,D as ae,le as af,bi as ag,vr as ah,ic as ai,rc as aj,Gt as ak,fe as al,N0 as am,pr as an,Lt as ao,k0 as ap,z0 as aq,ke as ar,ws as as,Es as at,x0 as au,Ei as av,Ct as aw,Yn as ax,ln as ay,Qi as az,oe as b,hc as b$,dn as b0,un as b1,cn as b2,on as b3,Ke as b4,an as b5,sn as b6,rn as b7,nn as b8,tn as b9,Pe as bA,er as bB,J0 as bC,zt as bD,$e as bE,je as bF,he as bG,Re as bH,Y0 as bI,Q0 as bJ,Go as bK,Mc as bL,bc as bM,yc as bN,Di as bO,uo as bP,Pn as bQ,Ft as bR,Cr as bS,Eo as bT,I0 as bU,T0 as bV,Nr as bW,Fc as bX,ki as bY,Ss as bZ,Gr as b_,Qt as ba,Yt as bb,Jt as bc,Zt as bd,Kt as be,We as bf,qe as bg,Wt as bh,qt as bi,Vt as bj,_t as bk,vc as bl,bo as bm,xc as bn,wc as bo,sa as bp,Sc as bq,Ac as br,ge as bs,Ec as bt,$c as bu,X as bv,jr as bw,Ic as bx,to as by,Tc as bz,ho as c,xe as c$,Ie as c0,Fo as c1,y0 as c2,kd as c3,mc as c4,Be as c5,t0 as c6,Me as c7,Xe as c8,ns as c9,lc as cA,ae as cB,Ai as cC,Mi as cD,ao as cE,Kr as cF,pn as cG,Je as cH,Ba as cI,oo as cJ,He as cK,Zr as cL,Id as cM,Xo as cN,b0 as cO,m0 as cP,be as cQ,Bt as cR,bs as cS,$n as cT,Ho as cU,Qa as cV,Ja as cW,Za as cX,Ka as cY,qa as cZ,ei as c_,ts as ca,ut as cb,gn as cc,ss as cd,i0 as ce,Od as cf,zr as cg,ni as ch,sc as ci,ac as cj,fo as ck,Yo as cl,gs as cm,Jn as cn,lr as co,da as cp,vs as cq,nc as cr,D0 as cs,q0 as ct,Rt as cu,tr as cv,jo as cw,X0 as cx,lt as cy,fc as cz,Ti as d,cd as d$,Ya as d0,Wa as d1,Xa as d2,_a as d3,g0 as d4,A0 as d5,M0 as d6,S0 as d7,B0 as d8,F0 as d9,ru as dA,su as dB,au as dC,iu as dD,ou as dE,cu as dF,uu as dG,du as dH,Hu as dI,_u as dJ,Vu as dK,qu as dL,Wu as dM,Ku as dN,Zu as dO,Ju as dP,Xu as dQ,Yu as dR,Qu as dS,ed as dT,td as dU,nd as dV,rd as dW,sd as dX,ad as dY,id as dZ,od as d_,co as da,Cc as db,zc as dc,kc as dd,Rc as de,jc as df,Uc as dg,Nc as dh,Gc as di,Lc as dj,Dc as dk,Hc as dl,_c as dm,Vc as dn,qc as dp,Wc as dq,Kc as dr,Zc as ds,Jc as dt,Xc as du,Yc as dv,Qc as dw,eu as dx,tu as dy,nu as dz,Ve as e,Bs as e$,ud as e0,dd as e1,fd as e2,ld as e3,pd as e4,bd as e5,yd as e6,md as e7,hd as e8,gd as e9,Ru as eA,ju as eB,Uu as eC,Nu as eD,Gu as eE,Lu as eF,Du as eG,cc as eH,C0 as eI,ms as eJ,hs as eK,Wn as eL,$s as eM,Ps as eN,Is as eO,O0 as eP,h0 as eQ,gt as eR,xi as eS,vi as eT,Sr as eU,Ni as eV,Zn as eW,Kn as eX,Ot as eY,As as eZ,Ms as e_,wd as ea,fu as eb,lu as ec,pu as ed,bu as ee,yu as ef,mu as eg,hu as eh,gu as ei,wu as ej,xu as ek,vu as el,Pu as em,$u as en,Eu as eo,Iu as ep,Tu as eq,Au as er,Mu as es,Bu as et,Su as eu,Fu as ev,Ou as ew,Cu as ex,zu as ey,ku as ez,V as f,Mo as f0,qr as f1,yn as f2,So as f3,xt as f4,Et as f5,It as f6,Tt as f7,$t as f8,vt as f9,vd as fA,Pd as fB,Wr as fC,Oc as fD,lo as fE,Do as fF,Ar as fG,hi as fH,as as fI,is as fJ,$o as fK,Cd as fL,Ht as fM,Or as fN,Pt as fa,At as fb,U as fc,k as fd,Bi as fe,Si as ff,uc as fg,Oi as fh,Ci as fi,r0 as fj,s0 as fk,a0 as fl,wi as fm,Ko as fn,ua as fo,Ts as fp,cr as fq,ur as fr,dr as fs,W as ft,fr as fu,tc as fv,Z0 as fw,Fs as fx,ks as fy,Rs as fz,Ae as g,ce as h,Sd as i,T as j,K as k,Ue as l,mo as m,Ad as n,Md as o,pc as p,Jo as q,_e as r,ue as s,bn as t,P as u,Vo as v,S as w,Xr as x,_o as y,Yr as z};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const c=l`<svg fill="none" viewBox="0 0 28 28">
1
+ import{w as l}from"./core-D1JqYuOS.js";const c=l`<svg fill="none" viewBox="0 0 28 28">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const o=l`<svg fill="none" viewBox="0 0 14 14">
1
+ import{w as l}from"./core-D1JqYuOS.js";const o=l`<svg fill="none" viewBox="0 0 14 14">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{p as pe,a as me,s as he,b as ve,R as l,M as g,S as ee,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-C4Q-G7Te.js";import{c as u,n as d,r as w,o as V,U as Ce}from"./index-DCzaGJ0h.js";const p=pe({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 ve(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=me(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`
1
+ import{p as pe,a as me,s as he,b as ve,R as l,M as g,S as ee,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-D1JqYuOS.js";import{c as u,n as d,r as w,o as V,U as Ce}from"./index-nPgQlNn6.js";const p=pe({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 ve(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=me(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-chtkoWq_.js";import{h as g,k as N}from"./signing-CJBbgcWH.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(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 m=[];if(o)for(let f=o+1n;f<=i;f++)m.push(BigInt(f));else m=[i];o=i;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(i){s?s(i):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${i}`)}const h=R(c),u=Math.max(k,Math.min(y,Math.max(k,h)));await A(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 v(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 h=-1;const u=P({chain:n,client:s,onNewBlockNumber:async()=>{if(h++,h>=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,v as w};
1
+ import{importShared as B}from"./__federation_fn_import-BPa8h49G.js";import{h as g,k as N}from"./signing-CPQmF9YX.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(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 m=[];if(o)for(let f=o+1n;f<=i;f++)m.push(BigInt(f));else m=[i];o=i;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(i){s?s(i):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${i}`)}const h=R(c),u=Math.max(k,Math.min(y,Math.max(k,h)));await A(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 v(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 h=-1;const u=P({chain:n,client:s,onNewBlockNumber:async()=>{if(h++,h>=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,v as w};
@@ -1,4 +1,4 @@
1
- import{w as c}from"./core-C4Q-G7Te.js";const v=c`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as c}from"./core-D1JqYuOS.js";const v=c`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{w as a}from"./core-C4Q-G7Te.js";const v=a`
1
+ import{w as a}from"./core-D1JqYuOS.js";const v=a`
2
2
  <svg fill="none" viewBox="0 0 48 44">
3
3
  <path
4
4
  style="fill: var(--wui-color-bg-300);"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-C4Q-G7Te.js";const C=l`<svg fill="none" viewBox="0 0 96 67">
1
+ import{w as l}from"./core-D1JqYuOS.js";const C=l`<svg fill="none" viewBox="0 0 96 67">
2
2
  <path
3
3
  fill="currentColor"
4
4
  d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"