hunt-mint-swap
Version:
A React component library for swapping MINT / HUNT buildings
11 lines • 1.56 MB
JavaScript
"use strict";const ke=require("react"),Wt=require("wagmi"),Rv=require("tailwind-merge"),uo=require("react-modal-sheet"),pe=require("viem"),Ov=require("react-dom");var Hn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tm(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var s=!1;try{s=this instanceof n}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var nc={exports:{}},po={};var iy;function Nv(){if(iy)return po;iy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:n,key:o,ref:s!==void 0?s:null,props:a}}return po.Fragment=t,po.jsx=r,po.jsxs=r,po}var fo={};var oy;function Uv(){return oy||(oy=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===H?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case g:return"Fragment";case k:return"Profiler";case F:return"StrictMode";case W:return"Suspense";case z:return"SuspenseList";case P:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case A:return"Portal";case N:return T.displayName||"Context";case D:return(T._context.displayName||"Context")+".Consumer";case L:var b=T.render;return T=T.displayName,T||(T=b.displayName||b.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case Z:return b=T.displayName||null,b!==null?b:e(T.type)||"Memo";case G:b=T._payload,T=T._init;try{return e(T(b))}catch{}}return null}function t(T){return""+T}function r(T){try{t(T);var b=!1}catch{b=!0}if(b){b=console;var E=b.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return E.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),t(T)}}function n(T){if(T===g)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===G)return"<...>";try{var b=e(T);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function s(){var T=q.A;return T===null?null:T.getOwner()}function a(){return Error("react-stack-top-frame")}function o(T){if(I.call(T,"key")){var b=Object.getOwnPropertyDescriptor(T,"key").get;if(b&&b.isReactWarning)return!1}return T.key!==void 0}function l(T,b){function E(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}E.isReactWarning=!0,Object.defineProperty(T,"key",{get:E,configurable:!0})}function u(){var T=e(this.type);return M[T]||(M[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function d(T,b,E,O,K,ee){var ae=E.ref;return T={$$typeof:w,type:T,key:b,props:E,_owner:O},(ae!==void 0?ae:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:u}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function p(T,b,E,O,K,ee){var ae=b.children;if(ae!==void 0)if(O)if(h(ae)){for(O=0;O<ae.length;O++)x(ae[O]);Object.freeze&&Object.freeze(ae)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(ae);if(I.call(b,"key")){ae=e(T);var fe=Object.keys(b).filter(function(Be){return Be!=="key"});O=0<fe.length?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}",Y[ae+O]||(fe=0<fe.length?"{"+fe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,O,ae,fe,ae),Y[ae+O]=!0)}if(ae=null,E!==void 0&&(r(E),ae=""+E),o(b)&&(r(b.key),ae=""+b.key),"key"in b){E={};for(var xe in b)xe!=="key"&&(E[xe]=b[xe])}else E=b;return ae&&l(E,typeof T=="function"?T.displayName||T.name||"Unknown":T),d(T,ae,E,s(),K,ee)}function x(T){m(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===G&&(T._payload.status==="fulfilled"?m(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function m(T){return typeof T=="object"&&T!==null&&T.$$typeof===w}var C=ke,w=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),q=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,h=Array.isArray,y=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(T){return T()}};var B,M={},U=C.react_stack_bottom_frame.bind(C,a)(),$=y(n(a)),Y={};fo.Fragment=g,fo.jsx=function(T,b,E){var O=1e4>q.recentlyCreatedOwnerStacks++;return p(T,b,E,!1,O?Error("react-stack-top-frame"):U,O?y(n(T)):$)},fo.jsxs=function(T,b,E){var O=1e4>q.recentlyCreatedOwnerStacks++;return p(T,b,E,!0,O?Error("react-stack-top-frame"):U,O?y(n(T)):$)}})()),fo}var ly;function Pv(){return ly||(ly=1,process.env.NODE_ENV==="production"?nc.exports=Nv():nc.exports=Uv()),nc.exports}var te=Pv();function v(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}const Mv=v({id:16600,name:"0G Newton Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-newton.0g.ai"}},testnet:!0}),Lv=v({id:16601,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),Gv=v({id:16661,name:"0G Mainnet",nativeCurrency:{name:"0G",symbol:"0G",decimals:18},rpcUrls:{default:{http:["https://evmrpc.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan.0g.ai"}},testnet:!1}),zv=v({id:16602,name:"0G Galileo Testnet",nativeCurrency:{name:"A0GI",symbol:"A0GI",decimals:18},rpcUrls:{default:{http:["https://evmrpc-testnet.0g.ai"]}},blockExplorers:{default:{name:"0G BlockChain Explorer",url:"https://chainscan-galileo.0g.ai"}},testnet:!0}),Hv=v({id:995,name:"5ireChain",nativeCurrency:{name:"5ire Token",symbol:"5IRE",decimals:18},rpcUrls:{default:{http:["https://rpc.5ire.network"]}},blockExplorers:{default:{name:"5ireChain Mainnet Explorer",url:"https://5irescan.io/"}},testnet:!1}),Vv=v({id:179,name:"ABEY Mainnet",nativeCurrency:{name:"ABEY",symbol:"ABEY",decimals:18},rpcUrls:{default:{http:["https://rpc.abeychain.com"]}},blockExplorers:{default:{name:"Abey Scan",url:"https://abeyscan.com"}},testnet:!1}),M6="2.41.2";let ef={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${M6}`},Ze=class zh extends Error{constructor(t,r={}){const n=r.cause instanceof zh?r.cause.details:r.cause?.message?r.cause.message:r.details,s=r.cause instanceof zh&&r.cause.docsPath||r.docsPath,a=ef.getDocsUrl?.({...r,docsPath:s}),o=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...n?[`Details: ${n}`]:[],...ef.version?[`Version: ${ef.version}`]:[]].join(`
`);super(o,r.cause?{cause:r.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=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=M6}walk(t){return L6(this,t)}};function L6(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?L6(e.cause,t):t?null:e}class G6 extends Ze{constructor({max:t,min:r,signed:n,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}}class Wv extends Ze{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function _0(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function rn(e){return _0(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function y0(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,n=0;for(let s=0;s<r.length-1&&r[t==="left"?s:r.length-s-1].toString()==="0";s++)n++;return r=t==="left"?r.slice(n):r.slice(0,r.length-n),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}class z6 extends Ze{constructor({offset:t,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class H6 extends Ze{constructor({size:t,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ai(e,{dir:t,size:r=32}={}){return typeof e=="string"?Os(e,{dir:t,size:r}):$v(e,{dir:t,size:r})}function Os(e,{dir:t,size:r=32}={}){if(r===null)return e;const n=e.replace("0x","");if(n.length>r*2)throw new H6({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function $v(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new H6({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;s<r;s++){const a=t==="right";n[a?s:r-s-1]=e[a?s:e.length-s-1]}return n}const jv=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ht(e,t={}){return typeof e=="number"||typeof e=="bigint"?je(e,t):typeof e=="string"?Gu(e,t):typeof e=="boolean"?V6(e,t):Ra(e,t)}function V6(e,t={}){const r=`0x${Number(e)}`;return typeof t.size=="number"?(T0(r,{size:t.size}),Ai(r,{size:t.size})):r}function Ra(e,t={}){let r="";for(let s=0;s<e.length;s++)r+=jv[e[s]];const n=`0x${r}`;return typeof t.size=="number"?(T0(n,{size:t.size}),Ai(n,{dir:"right",size:t.size})):n}function je(e,t={}){const{signed:r,size:n}=t,s=BigInt(e);let a;n?r?a=(1n<<BigInt(n)*8n-1n)-1n:a=2n**(BigInt(n)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof a=="bigint"&&r?-a-1n:0;if(a&&s>a||s<o){const u=typeof e=="bigint"?"n":"";throw new G6({max:a?`${a}${u}`:void 0,min:`${o}${u}`,signed:r,size:n,value:`${e}${u}`})}const l=`0x${(r&&s<0?(1n<<BigInt(n*8))+BigInt(s):s).toString(16)}`;return n?Ai(l,{size:n}):l}const qv=new TextEncoder;function Gu(e,t={}){const r=qv.encode(e);return Ra(r,t)}const Kv=new TextEncoder;function Io(e,t={}){return typeof e=="number"||typeof e=="bigint"?Yv(e,t):typeof e=="boolean"?Zv(e,t):_0(e)?Vn(e,t):W6(e,t)}function Zv(e,t={}){const r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(T0(r,{size:t.size}),Ai(r,{size:t.size})):r}const $a={zero:48,nine:57,A:65,F:70,a:97,f:102};function cy(e){if(e>=$a.zero&&e<=$a.nine)return e-$a.zero;if(e>=$a.A&&e<=$a.F)return e-($a.A-10);if(e>=$a.a&&e<=$a.f)return e-($a.a-10)}function Vn(e,t={}){let r=e;t.size&&(T0(r,{size:t.size}),r=Ai(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,a=new Uint8Array(s);for(let o=0,l=0;o<s;o++){const u=cy(n.charCodeAt(l++)),d=cy(n.charCodeAt(l++));if(u===void 0||d===void 0)throw new Ze(`Invalid byte sequence ("${n[l-2]}${n[l-1]}" in "${n}").`);a[o]=u*16+d}return a}function Yv(e,t){const r=je(e,t);return Vn(r)}function W6(e,t={}){const r=Kv.encode(e);return typeof t.size=="number"?(T0(r,{size:t.size}),Ai(r,{dir:"right",size:t.size})):r}function T0(e,{size:t}){if(rn(e)>t)throw new Wv({givenSize:rn(e),maxSize:t})}function cr(e,t={}){const{signed:r}=t;t.size&&T0(e,{size:t.size});const n=BigInt(e);if(!r)return n;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return n<=a?n:n-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function Oo(e,t={}){return Number(cr(e,t))}function Ad(e,t){return({exclude:r,format:n})=>({exclude:r,format:(s,a)=>{const o=t(s,a);if(r)for(const l of r)delete o[l];return{...o,...n(s,a)}},type:e})}const $6={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function wd(e,t){const r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Oo(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?Oo(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?$6[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&&(r.authorizationList=Xv(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}const Sm=Ad("transaction",wd);function Xv(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 Qv(e,t){const r=(e.transactions??[]).map(n=>typeof n=="string"?n:wd(n));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:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Fm=Ad("block",Qv);function j6(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}const Jv={"0x0":"reverted","0x1":"success"};function eB(e,t){const r={...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(n=>j6(n)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Oo(e.transactionIndex):null,status:e.status?Jv[e.status]:null,type:e.type?$6[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}const q6=Ad("transactionReceipt",eB),tB={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function K6(e,t){const r={};return typeof e.authorizationList<"u"&&(r.authorizationList=rB(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(n=>Ra(n)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=je(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=je(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=je(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=je(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=je(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=je(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=tB[e.type]),typeof e.value<"u"&&(r.value=je(e.value)),r}const Z6=Ad("transactionRequest",K6);function rB(e){return e.map(t=>({address:t.address,r:t.r?je(BigInt(t.r)):t.r,s:t.s?je(BigInt(t.s)):t.s,chainId:je(t.chainId),nonce:je(t.nonce),...typeof t.yParity<"u"?{yParity:je(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:je(t.v)}:{}}))}const nB=2n**16n-1n,nl=2n**256n-1n,Im=50000n,uy=nB*32n,Y6={block:Fm({format(e){const t=e.transactions?.map(r=>{if(typeof r=="string")return r;const n=Y6.transaction?.format(r);return n.typeHex==="0x71"?n.type="eip712":n.typeHex==="0xff"&&(n.type="priority"),n});return{l1BatchNumber:e.l1BatchNumber?cr(e.l1BatchNumber):null,l1BatchTimestamp:e.l1BatchTimestamp?cr(e.l1BatchTimestamp):null,transactions:t}}}),transaction:Sm({format(e){const t={};return e.type==="0x71"?t.type="eip712":e.type==="0xff"&&(t.type="priority"),{...t,l1BatchNumber:e.l1BatchNumber?cr(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?cr(e.l1BatchTxIndex):null}}}),transactionReceipt:q6({format(e){return{l1BatchNumber:e.l1BatchNumber?cr(e.l1BatchNumber):null,l1BatchTxIndex:e.l1BatchTxIndex?cr(e.l1BatchTxIndex):null,logs:e.logs.map(t=>({...j6(t),l1BatchNumber:t.l1BatchNumber?cr(t.l1BatchNumber):null,transactionLogIndex:Oo(t.transactionLogIndex),logType:t.logType})),l2ToL1Logs:e.l2ToL1Logs.map(t=>({blockNumber:cr(t.blockHash),blockHash:t.blockHash,l1BatchNumber:t.l1BatchNumber?cr(t.l1BatchNumber):null,transactionIndex:cr(t.transactionIndex),shardId:cr(t.shardId),isService:t.isService,sender:t.sender,key:t.key,value:t.value,transactionHash:t.transactionHash,logIndex:cr(t.logIndex)}))}}}),transactionRequest:Z6({exclude:["customSignature","factoryDeps","gasPerPubdata","paymaster","paymasterInput"],format(e){return e.gasPerPubdata||e.paymaster&&e.paymasterInput||e.factoryDeps||e.customSignature?{eip712Meta:{...e.gasPerPubdata?{gasPerPubdata:Ht(e.gasPerPubdata)}:{gasPerPubdata:Ht(Im)},...e.paymaster&&e.paymasterInput?{paymasterParams:{paymaster:e.paymaster,paymasterInput:Array.from(Vn(e.paymasterInput))}}:{},...e.factoryDeps?{factoryDeps:e.factoryDeps.map(t=>Array.from(Vn(t)))}:{},...e.customSignature?{customSignature:Array.from(Vn(e.customSignature))}:{}},type:"0x71"}:{}}})};function Ms(e){return typeof e[0]=="string"?os(e):aB(e)}function aB(e){let t=0;for(const s of e)t+=s.length;const r=new Uint8Array(t);let n=0;for(const s of e)r.set(s,n),n+=s.length;return r}function os(e){return`0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}class dy extends Ze{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class sB extends Ze{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class iB extends Ze{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const oB={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 iB({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new sB({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new dy({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 dy({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 r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+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 r=this.inspectBytes(e);return this.position+=t??e,r},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 X6(e,{recursiveReadLimit:t=8192}={}){const r=Object.create(oB);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}function Fa(e,t="hex"){const r=Q6(e),n=X6(new Uint8Array(r.length));return r.encode(n),t==="hex"?Ra(n.bytes):n.bytes}function Q6(e){return Array.isArray(e)?lB(e.map(t=>Q6(t))):cB(e)}function lB(e){const t=e.reduce((s,a)=>s+a.length,0),r=J6(t);return{length:t<=55?1+t:1+r+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+r),r===1?s.pushUint8(t):r===2?s.pushUint16(t):r===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function cB(e){const t=typeof e=="string"?Vn(e):e,r=J6(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+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+r),r===1?s.pushUint8(t.length):r===2?s.pushUint16(t.length):r===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function J6(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 Ze("Length is too large.")}const uB={gwei:9,wei:18},dB={ether:-9,wei:9};function e8(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[s,a]=[r.slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}function pB(e,t="wei"){return e8(e,uB[t])}function di(e,t="wei"){return e8(e,dB[t])}function t8(e){const t=Object.entries(e).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=t.reduce((n,[s])=>Math.max(n,s.length),0);return t.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(`
`)}class fB extends Ze{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class hB extends Ze{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",t8(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 mB extends Ze{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function bB(e){if(!e||e.length===0)return[];const t=[];for(const r of e){const{chainId:n,nonce:s,...a}=r,o=r.address;t.push([n?Ht(n):"0x",o,s?Ht(s):"0x",...F0({},a)])}return t}function r8(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(a=>Vn(a)):e.blobs,s=[];for(const a of n)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return r==="bytes"?s:s.map(a=>Ra(a))}function n8(e){const{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),n=typeof e.blobs[0]=="string"?e.blobs.map(o=>Vn(o)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(o=>Vn(o)):e.commitments,a=[];for(let o=0;o<n.length;o++){const l=n[o],u=s[o];a.push(Uint8Array.from(t.computeBlobKzgProof(l,u)))}return r==="bytes"?a:a.map(o=>Ra(o))}const Zi=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function al(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function x0(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ss(e,...t){if(!al(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 a8(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");x0(e.outputLen),x0(e.blockLen)}function g0(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 s8(e,t){ss(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function yB(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ls(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function tf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ka(e,t){return e<<32-t|e>>>t}const xB=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function gB(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function EB(e){for(let t=0;t<e.length;t++)e[t]=gB(e[t]);return e}const py=xB?e=>e:EB,i8=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",CB=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ns(e){if(ss(e),i8)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=CB[e[r]];return t}const ja={_0:48,_9:57,A:65,F:70,a:97,f:102};function fy(e){if(e>=ja._0&&e<=ja._9)return e-ja._0;if(e>=ja.A&&e<=ja.F)return e-(ja.A-10);if(e>=ja.a&&e<=ja.f)return e-(ja.a-10)}function zu(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(i8)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let s=0,a=0;s<r;s++,a+=2){const o=fy(e.charCodeAt(a)),l=fy(e.charCodeAt(a+1));if(o===void 0||l===void 0){const u=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+u+'" at index '+a)}n[s]=o*16+l}return n}function AB(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function vd(e){return typeof e=="string"&&(e=AB(e)),ss(e),e}function ma(...e){let t=0;for(let n=0;n<e.length;n++){const s=e[n];ss(s),t+=s.length}const r=new Uint8Array(t);for(let n=0,s=0;n<e.length;n++){const a=e[n];r.set(a,s),s+=a.length}return r}class Rm{}function Om(e){const t=n=>e().update(vd(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Bd(e=32){if(Zi&&typeof Zi.getRandomValues=="function")return Zi.getRandomValues(new Uint8Array(e));if(Zi&&typeof Zi.randomBytes=="function")return Uint8Array.from(Zi.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function wB(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);const s=BigInt(32),a=BigInt(4294967295),o=Number(r>>s&a),l=Number(r&a),u=n?4:0,d=n?0:4;e.setUint32(t+u,o,n),e.setUint32(t+d,l,n)}function vB(e,t,r){return e&t^~e&r}function BB(e,t,r){return e&t^e&r^t&r}class o8 extends Rm{constructor(t,r,n,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(t),this.view=tf(this.buffer)}update(t){g0(this),t=vd(t),ss(t);const{view:r,buffer:n,blockLen:s}=this,a=t.length;for(let o=0;o<a;){const l=Math.min(s-this.pos,a-o);if(l===s){const u=tf(t);for(;s<=a-o;o+=s)this.process(u,o);continue}n.set(t.subarray(o,o+l),this.pos),this.pos+=l,o+=l,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){g0(this),s8(t,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:a}=this;let{pos:o}=this;r[o++]=128,Ls(this.buffer.subarray(o)),this.padOffset>s-o&&(this.process(n,0),o=0);for(let x=o;x<s;x++)r[x]=0;wB(n,s-8,BigInt(this.length*8),a),this.process(n,0);const l=tf(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=u/4,p=this.get();if(d>p.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x<d;x++)l.setUint32(4*x,p[x],a)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const n=t.slice(0,r);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:a,destroyed:o,pos:l}=this;return t.destroyed=o,t.finished=a,t.length=s,t.pos=l,s%r&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const Cs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),on=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),ac=BigInt(2**32-1),hy=BigInt(32);function kB(e,t=!1){return t?{h:Number(e&ac),l:Number(e>>hy&ac)}:{h:Number(e>>hy&ac)|0,l:Number(e&ac)|0}}function l8(e,t=!1){const r=e.length;let n=new Uint32Array(r),s=new Uint32Array(r);for(let a=0;a<r;a++){const{h:o,l}=kB(e[a],t);[n[a],s[a]]=[o,l]}return[n,s]}const my=(e,t,r)=>e>>>r,by=(e,t,r)=>e<<32-r|t>>>r,Yi=(e,t,r)=>e>>>r|t<<32-r,Xi=(e,t,r)=>e<<32-r|t>>>r,sc=(e,t,r)=>e<<64-r|t>>>r-32,ic=(e,t,r)=>e>>>r-32|t<<64-r,DB=(e,t,r)=>e<<r|t>>>32-r,_B=(e,t,r)=>t<<r|e>>>32-r,TB=(e,t,r)=>t<<r-32|e>>>64-r,SB=(e,t,r)=>e<<r-32|t>>>64-r;function qa(e,t,r,n){const s=(t>>>0)+(n>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}const FB=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),IB=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,RB=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),OB=(e,t,r,n,s)=>t+r+n+s+(e/2**32|0)|0,NB=(e,t,r,n,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(s>>>0),UB=(e,t,r,n,s,a)=>t+r+n+s+a+(e/2**32|0)|0,PB=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]),As=new Uint32Array(64);class MB extends o8{constructor(t=32){super(64,t,8,!1),this.A=Cs[0]|0,this.B=Cs[1]|0,this.C=Cs[2]|0,this.D=Cs[3]|0,this.E=Cs[4]|0,this.F=Cs[5]|0,this.G=Cs[6]|0,this.H=Cs[7]|0}get(){const{A:t,B:r,C:n,D:s,E:a,F:o,G:l,H:u}=this;return[t,r,n,s,a,o,l,u]}set(t,r,n,s,a,o,l,u){this.A=t|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=a|0,this.F=o|0,this.G=l|0,this.H=u|0}process(t,r){for(let x=0;x<16;x++,r+=4)As[x]=t.getUint32(r,!1);for(let x=16;x<64;x++){const m=As[x-15],C=As[x-2],w=ka(m,7)^ka(m,18)^m>>>3,A=ka(C,17)^ka(C,19)^C>>>10;As[x]=A+As[x-7]+w+As[x-16]|0}let{A:n,B:s,C:a,D:o,E:l,F:u,G:d,H:p}=this;for(let x=0;x<64;x++){const m=ka(l,6)^ka(l,11)^ka(l,25),C=p+m+vB(l,u,d)+PB[x]+As[x]|0,A=(ka(n,2)^ka(n,13)^ka(n,22))+BB(n,s,a)|0;p=d,d=u,u=l,l=o+C|0,o=a,a=s,s=n,n=C+A|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,o=o+this.D|0,l=l+this.E|0,u=u+this.F|0,d=d+this.G|0,p=p+this.H|0,this.set(n,s,a,o,l,u,d,p)}roundClean(){Ls(As)}destroy(){this.set(0,0,0,0,0,0,0,0),Ls(this.buffer)}}const c8=l8(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),LB=c8[0],GB=c8[1],ws=new Uint32Array(80),vs=new Uint32Array(80);class zB extends o8{constructor(t=64){super(128,t,16,!1),this.Ah=on[0]|0,this.Al=on[1]|0,this.Bh=on[2]|0,this.Bl=on[3]|0,this.Ch=on[4]|0,this.Cl=on[5]|0,this.Dh=on[6]|0,this.Dl=on[7]|0,this.Eh=on[8]|0,this.El=on[9]|0,this.Fh=on[10]|0,this.Fl=on[11]|0,this.Gh=on[12]|0,this.Gl=on[13]|0,this.Hh=on[14]|0,this.Hl=on[15]|0}get(){const{Ah:t,Al:r,Bh:n,Bl:s,Ch:a,Cl:o,Dh:l,Dl:u,Eh:d,El:p,Fh:x,Fl:m,Gh:C,Gl:w,Hh:A,Hl:g}=this;return[t,r,n,s,a,o,l,u,d,p,x,m,C,w,A,g]}set(t,r,n,s,a,o,l,u,d,p,x,m,C,w,A,g){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=a|0,this.Cl=o|0,this.Dh=l|0,this.Dl=u|0,this.Eh=d|0,this.El=p|0,this.Fh=x|0,this.Fl=m|0,this.Gh=C|0,this.Gl=w|0,this.Hh=A|0,this.Hl=g|0}process(t,r){for(let D=0;D<16;D++,r+=4)ws[D]=t.getUint32(r),vs[D]=t.getUint32(r+=4);for(let D=16;D<80;D++){const N=ws[D-15]|0,L=vs[D-15]|0,W=Yi(N,L,1)^Yi(N,L,8)^my(N,L,7),z=Xi(N,L,1)^Xi(N,L,8)^by(N,L,7),Z=ws[D-2]|0,G=vs[D-2]|0,P=Yi(Z,G,19)^sc(Z,G,61)^my(Z,G,6),H=Xi(Z,G,19)^ic(Z,G,61)^by(Z,G,6),q=RB(z,H,vs[D-7],vs[D-16]),I=OB(q,W,P,ws[D-7],ws[D-16]);ws[D]=I|0,vs[D]=q|0}let{Ah:n,Al:s,Bh:a,Bl:o,Ch:l,Cl:u,Dh:d,Dl:p,Eh:x,El:m,Fh:C,Fl:w,Gh:A,Gl:g,Hh:F,Hl:k}=this;for(let D=0;D<80;D++){const N=Yi(x,m,14)^Yi(x,m,18)^sc(x,m,41),L=Xi(x,m,14)^Xi(x,m,18)^ic(x,m,41),W=x&C^~x&A,z=m&w^~m&g,Z=NB(k,L,z,GB[D],vs[D]),G=UB(Z,F,N,W,LB[D],ws[D]),P=Z|0,H=Yi(n,s,28)^sc(n,s,34)^sc(n,s,39),q=Xi(n,s,28)^ic(n,s,34)^ic(n,s,39),I=n&a^n&l^a&l,h=s&o^s&u^o&u;F=A|0,k=g|0,A=C|0,g=w|0,C=x|0,w=m|0,{h:x,l:m}=qa(d|0,p|0,G|0,P|0),d=l|0,p=u|0,l=a|0,u=o|0,a=n|0,o=s|0;const y=FB(P,q,h);n=IB(y,G,H,I),s=y|0}({h:n,l:s}=qa(this.Ah|0,this.Al|0,n|0,s|0)),{h:a,l:o}=qa(this.Bh|0,this.Bl|0,a|0,o|0),{h:l,l:u}=qa(this.Ch|0,this.Cl|0,l|0,u|0),{h:d,l:p}=qa(this.Dh|0,this.Dl|0,d|0,p|0),{h:x,l:m}=qa(this.Eh|0,this.El|0,x|0,m|0),{h:C,l:w}=qa(this.Fh|0,this.Fl|0,C|0,w|0),{h:A,l:g}=qa(this.Gh|0,this.Gl|0,A|0,g|0),{h:F,l:k}=qa(this.Hh|0,this.Hl|0,F|0,k|0),this.set(n,s,a,o,l,u,d,p,x,m,C,w,A,g,F,k)}roundClean(){Ls(ws,vs)}destroy(){Ls(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Nm=Om(()=>new MB),HB=Om(()=>new zB),Hu=Nm;function u8(e,t){const r=t||"hex",n=Hu(_0(e,{strict:!1})?Io(e):e);return r==="bytes"?n:Ht(n)}function VB(e){const{commitment:t,version:r=1}=e,n=e.to??(typeof t=="string"?"hex":"bytes"),s=u8(t,"bytes");return s.set([r],0),n==="bytes"?s:Ra(s)}function WB(e){const{commitments:t,version:r}=e,n=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(VB({commitment:a,to:n,version:r}));return s}const yy=6,d8=32,Um=4096,p8=d8*Um,xy=p8*yy-1-1*Um*yy,f8=1;class $B extends Ze{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}}class h8 extends Ze{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class jB extends Ze{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}}class qB extends Ze{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${f8}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}function KB(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?Vn(e.data):e.data,n=rn(r);if(!n)throw new h8;if(n>xy)throw new $B({maxSize:xy,size:n});const s=[];let a=!0,o=0;for(;a;){const l=X6(new Uint8Array(p8));let u=0;for(;u<Um;){const d=r.slice(o,o+(d8-1));if(l.pushByte(0),l.pushBytes(d),d.length<31){l.pushByte(128),a=!1;break}u++,o+=31}s.push(l)}return t==="bytes"?s.map(l=>l.bytes):s.map(l=>Ra(l.bytes))}function ZB(e){const{data:t,kzg:r,to:n}=e,s=e.blobs??KB({data:t,to:n}),a=e.commitments??r8({blobs:s,kzg:r,to:n}),o=e.proofs??n8({blobs:s,commitments:a,kzg:r,to:n}),l=[];for(let u=0;u<s.length;u++)l.push({blob:s[u],commitment:a[u],proof:o[u]});return l}class Zr extends Ze{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class S0 extends Ze{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class c0 extends Ze{constructor({cause:t,message:r}={}){const n=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(c0,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(c0,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Gs extends Ze{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${di(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Gs,"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 Hh extends Ze{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${di(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Hh,"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 Vh extends Ze{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Vh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Wh extends Ze{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Wh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class $h extends Ze{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty($h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class jh extends Ze{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
`),{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(jh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class qh extends Ze{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(qh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Kh extends Ze{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Kh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Zh extends Ze{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Zh,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class E0 extends Ze{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${di(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${di(n)} gwei`:""}).`].join(`
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(E0,"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 m8 extends Ze{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}class b8 extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const YB=BigInt(0),ho=BigInt(1),XB=BigInt(2),QB=BigInt(7),JB=BigInt(256),ek=BigInt(113),y8=[],x8=[],g8=[];for(let e=0,t=ho,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],y8.push(2*(5*n+r)),x8.push((e+1)*(e+2)/2%64);let s=YB;for(let a=0;a<7;a++)t=(t<<ho^(t>>QB)*ek)%JB,t&XB&&(s^=ho<<(ho<<BigInt(a))-ho);g8.push(s)}const E8=l8(g8,!0),tk=E8[0],rk=E8[1],gy=(e,t,r)=>r>32?TB(e,t,r):DB(e,t,r),Ey=(e,t,r)=>r>32?SB(e,t,r):_B(e,t,r);function nk(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let o=0;o<10;o++)r[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const l=(o+8)%10,u=(o+2)%10,d=r[u],p=r[u+1],x=gy(d,p,1)^r[l],m=Ey(d,p,1)^r[l+1];for(let C=0;C<50;C+=10)e[o+C]^=x,e[o+C+1]^=m}let s=e[2],a=e[3];for(let o=0;o<24;o++){const l=x8[o],u=gy(s,a,l),d=Ey(s,a,l),p=y8[o];s=e[p],a=e[p+1],e[p]=u,e[p+1]=d}for(let o=0;o<50;o+=10){for(let l=0;l<10;l++)r[l]=e[o+l];for(let l=0;l<10;l++)e[o+l]^=~r[(l+2)%10]&r[(l+4)%10]}e[0]^=tk[n],e[1]^=rk[n]}Ls(r)}class Pm extends Rm{constructor(t,r,n,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=r,this.outputLen=n,this.enableXOF=s,this.rounds=a,x0(n),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=yB(this.state)}clone(){return this._cloneInto()}keccak(){py(this.state32),nk(this.state32,this.rounds),py(this.state32),this.posOut=0,this.pos=0}update(t){g0(this),t=vd(t),ss(t);const{blockLen:r,state:n}=this,s=t.length;for(let a=0;a<s;){const o=Math.min(r-this.pos,s-a);for(let l=0;l<o;l++)n[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:n,blockLen:s}=this;t[n]^=r,(r&128)!==0&&n===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){g0(this,!1),ss(t),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,a=t.length;s<a;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,a-s);t.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return x0(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(s8(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,Ls(this.state)}_cloneInto(t){const{blockLen:r,suffix:n,outputLen:s,rounds:a,enableXOF:o}=this;return t||(t=new Pm(r,n,s,o,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=n,t.outputLen=s,t.enableXOF=o,t.destroyed=this.destroyed,t}}const ak=(e,t,r)=>Om(()=>new Pm(t,e,r)),sk=ak(1,136,256/8);function ia(e,t){const r=t||"hex",n=sk(_0(e,{strict:!1})?Io(e):e);return r==="bytes"?n:Ht(n)}const rf=new b8(8192);function Mm(e,t){if(rf.has(`${e}.${t}`))return rf.get(`${e}.${t}`);const r=e.substring(2).toLowerCase(),n=ia(W6(r),"bytes"),s=r.split("");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&s[o]&&(s[o]=s[o].toUpperCase()),(n[o>>1]&15)>=8&&s[o+1]&&(s[o+1]=s[o+1].toUpperCase());const a=`0x${s.join("")}`;return rf.set(`${e}.${t}`,a),a}function ik(e,t){if(!Lr(e,{strict:!1}))throw new Zr({address:e});return Mm(e,t)}const ok=/^0x[a-fA-F0-9]{40}$/,nf=new b8(8192);function Lr(e,t){const{strict:r=!0}=t??{},n=`${e}.${r}`;if(nf.has(n))return nf.get(n);const s=ok.test(e)?e.toLowerCase()===e?!0:r?Mm(e)===e:!0:!1;return nf