1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,855723,e=>{"use strict";e.s(["etherUnits",0,{gwei:9,wei:18},"gweiUnits",0,{ether:-9,wei:9},"weiUnits",0,{ether:-18,gwei:-9}])},853532,976486,e=>{"use strict";var r=e.i(855723),t=e.i(644616);function o(e,a="wei"){return(0,t.formatUnits)(e,r.gweiUnits[a])}e.s(["formatGwei",0,o],976486);var a=e.i(569934);class n extends a.BaseError{constructor({cause:e,message:r}={}){const t=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${t?`with reason: ${t}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class s extends a.BaseError{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${o(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(s,"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 i extends a.BaseError{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${o(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(i,"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 c extends a.BaseError{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends a.BaseError{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account. 2Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class d extends a.BaseError{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class l extends a.BaseError{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,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(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class p extends a.BaseError{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends a.BaseError{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends a.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}
2Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends a.BaseError{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:t}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${o(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${t?` = ${o(t)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"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 b extends a.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}e.s(["ExecutionRevertedError",0,n,"FeeCapTooHighError",0,s,"FeeCapTooLowError",0,i,"InsufficientFundsError",0,l,"IntrinsicGasTooHighError",0,p,"IntrinsicGasTooLowError",0,h,"NonceMaxValueError",0,d,"NonceTooHighError",0,c,"NonceTooLowError",0,u,"TipAboveFeeCapError",0,m,"TransactionTypeNotSupportedError",0,f,"UnknownNodeError",0,b],853532)},34888,e=>{"use strict";e.s(["stringify",0,(e,r,t)=>JSON.stringify(e,(e,t)=>{let o="bigint"==typeof t?t.toString():t;return"function"==typeof r?r(e,o):o},t)])},363710,e=>{"use strict";e.s(["getContractAddress",0,e=>e,"getUrl",0,e=>e])},95767,e=>{"use strict";var r=e.i(34888),t=e.i(569934),o=e.i(363710);class a extends t.BaseError{constructor({body:e,cause:t,details:a,headers:n,status:s,url:i}){super("HTTP request failed.",{cause:t,details:a,metaMessages:[s&&`Status: ${s}`,`URL: ${(0,o.getUrl)(i)}`,e&&`Request body: ${(0,r.stringify)(e)}`].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=e,this.headers=n,this.status=s,this.url=i}}class n extends t.BaseError{constructor({body:e,cause:t,details:a,url:n}){super("WebSocket request failed.",{cause:t,details:a,metaMessages:[`URL: ${(0,o.getUrl)(n)}`,e&&`Request body: ${(0,r.stringify)(e)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=n}}class s extends t.BaseError{constructor({body:e,error:t,url:a}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.getUrl)(a)}`,`Request body: ${(0,r.stringify)(e)}`],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=t.code,this.data=t.data,this.url=a}}class i extends t.BaseError{constructor({url:e}={}){super("The socket has been closed.",{metaMessages:[e&&`URL: ${(0,o.getUrl)(e)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=e}}class c extends t.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.getUrl)(t)}`,`Request body: ${(0,r.stringify)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}e.s(["HttpRequestError",0,a,"RpcRequestError",0,s,"SocketClosedError",0,i,"TimeoutError",0,c,"WebSocketRequestError",0,n])},871706,509486,e=>{"use strict";function r(){let e=()=>void 0,r=()=>void 0;return{promise:new Promise((t,o)=>{e=t,r=o}),resolve:e,reject:r}}e.s(["withResolvers",0,r],509486);let t=new Map;e.s(["createBatchScheduler",0,function({fn:e,id:o,shouldSplitBatch:a,wait:n=0,sort:s}){let i=async()=>{let r=u();c();let t=r.map(({args:e})=>e);0!==t.length&&e(t).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let t=0;t<r.length;t++){let{resolve:o}=r[t];o?.([e[t],e])}}).catch(e=>{for(let t=0;t<r.length;t++){let{reject:o}=r[t];o?.(e)}})},c=()=>t.delete(o),u=()=>t.get(o)||[],d=e=>t.set(o,[...u(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:o,reject:s}=r();return(a?.([...u().map(({args:e})=>e),e])&&i(),u().length>0)?d({args:e,resolve:o,reject:s}):(d({args:e,resolve:o,reject:s}),setTimeout(i,n)),t}}}],871706)},383856,e=>{"use strict";var r=e.i(569934),t=e.i(95767);class o extends r.BaseError{constructor(e,{code:r,docsPath:o,metaMessages:a,name:n,shortMessage:s}){super(s,{cause:e,docsPath:o,metaMessages:a||e?.metaMessages,name:n||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
vendor: 6,312 bytes, line 2
2),this.name=n||e.name,this.code=e instanceof t.RpcRequestError?e.code:r??-1}}class a extends o{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class n extends o{constructor(e){super(e,{code:n.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class s extends o{constructor(e){super(e,{code:s.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class i extends o{constructor(e,{method:r}={}){super(e,{code:i.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends o{constructor(e){super(e,{code:c.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class u extends o{constructor(e){super(e,{code:u.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends o{constructor(e){super(e,{code:d.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class l extends o{constructor(e){super(e,{code:l.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends o{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class h extends o{constructor(e){super(e,{code:h.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class f extends o{constructor(e,{method:r}={}){super(e,{code:f.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class m extends o{constructor(e){super(e,{code:m.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends o{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class g extends a{constructor(e){super(e,{code:g.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends a{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class y extends a{constructor(e,{method:r}={}){super(e,{code:y.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class E extends a{constructor(e){super(e,{code:E.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class v extends a{constructor(e){super(e,{code:v.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class P extends a{constructor(e){super(e,{code:P.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class R extends a{constructor(e){super(e,{code:R.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class x extends a{constructor(e){super(e,{code:x.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class T extends a{constructor(e){super(e,{code:T.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class F extends a{constructor(e){super(e,{code:F.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(F,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class M extends a{constructor(e){super(e,{code:M.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class q extends a{constructor(e){super(e,{code:q.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(q,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
2);class B extends a{constructor(e){super(e,{code:B.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760}),e.s(["AtomicReadyWalletRejectedUpgradeError",0,q,"AtomicityNotSupportedError",0,B,"BundleTooLargeError",0,M,"ChainDisconnectedError",0,v,"DuplicateIdError",0,T,"InternalRpcError",0,u,"InvalidInputRpcError",0,d,"InvalidParamsRpcError",0,c,"InvalidRequestRpcError",0,s,"JsonRpcVersionUnsupportedError",0,b,"LimitExceededRpcError",0,m,"MethodNotFoundRpcError",0,i,"MethodNotSupportedRpcError",0,f,"ParseRpcError",0,n,"ProviderDisconnectedError",0,E,"ProviderRpcError",0,a,"ResourceNotFoundRpcError",0,l,"ResourceUnavailableRpcError",0,p,"RpcError",0,o,"SwitchChainError",0,P,"TransactionRejectedRpcError",0,h,"UnauthorizedProviderError",0,w,"UnknownBundleIdError",0,F,"UnknownRpcError",0,class extends o{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}},"UnsupportedChainIdError",0,x,"UnsupportedNonOptionalCapabilityError",0,R,"UnsupportedProviderMethodError",0,y,"UserRejectedRequestError",0,g])},606624,e=>{"use strict";let r,t=256;e.s(["uid",0,function(e=11){if(!r||t+e>512){r="",t=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(t,t+++e)}])},588233,e=>{"use strict";async function r(e){return new Promise(r=>setTimeout(r,e))}e.s(["wait",0,r])},88577,e=>{"use strict";var r=e.i(588233);e.s(["withRetry",0,function(e,{delay:t=100,retryCount:o=2,shouldRetry:a=()=>!0}={}){return new Promise((n,s)=>{let i=async({count:c=0}={})=>{let u=async({error:e})=>{let o="function"==typeof t?t({count:c,error:e}):t;o&&await (0,r.wait)(o),i({count:c+1})};try{let r=await e();n(r)}catch(e){if(c<o&&await a({count:c,error:e}))return u({error:e});s(e)}};i()})}])},984534,e=>{"use strict";e.s(["withTimeout",0,function(e,{errorInstance:r=Error("timed out"),timeout:t,signal:o}){return new Promise((a,n)=>{(async()=>{let s;try{let i=new AbortController;t>0&&(s=setTimeout(()=>{o?i.abort():n(r)},t)),a(await e({signal:i?.signal||null}))}catch(e){e?.name==="AbortError"&&n(r),n(e)}finally{clearTimeout(s)}})()})}])},468368,522662,e=>{"use strict";var r=e.i(95767),t=e.i(984534),o=e.i(34888);let a={current:0,take(){return this.current++},reset(){this.current=0}};e.s(["idCache",0,a],522662),e.s(["getHttpRpcClient",0,function(e,n={}){let{url:s,headers:i}=function(e){try{let r=new URL(e),t=(()=>{if(r.username){let e=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;return r.username="",r.password="",{url:r.toString(),headers:{Authorization:`Basic ${btoa(e)}`}}}})();return{url:r.toString(),...t}}catch{return{url:e}}}(e);return{async request(e){let{body:c,fetchFn:u=n.fetchFn??fetch,onRequest:d=n.onRequest,onResponse:l=n.onResponse,timeout:p=n.timeout??1e4}=e,h={...n.fetchOptions??{},...e.fetchOptions??{}},{headers:f,method:m,signal:b}=h;try{let e,n=await (0,t.withTimeout)(async({signal:e})=>{let r={...h,body:Array.isArray(c)?(0,o.stringify)(c.map(e=>({jsonrpc:"2.0",id:e.id??a.take(),...e}))):(0,o.stringify)({jsonrpc:"2.0",id:c.id??a.take(),...c}),headers:{...i,"Content-Type":"application/json",...f},method:m||"POST",signal:b||(p>0?e:null)},t=new Request(s,r),n=await d?.(t,r)??{...r,url:s};return await u(n.url??s,n)},{errorInstance:new r.TimeoutError({body:c,url:s}),timeout:p,signal:!0});if(l&&await l(n),n.headers.get("Content-Type")?.startsWith("application/json"))e=await n.json();else{e=await n.text();try{e=JSON.parse(e||"{}")}catch(r){if(n.ok)throw r;e={error:e}}}if(!n.ok)throw new r.HttpRequestError({body:c,details:(0,o.stringify)(e.error)||n.statusText,headers:n.headers,status:n.status,url:s});return e}catch(e){if(e instanceof r.HttpRequestError||e instanceof r.TimeoutError)throw e;throw new r.HttpRequestError({body:c,cause:e,url:s})}}}}],468368)},533580,e=>{"use strict";let r=new(e.i(976677)).LruMap(8192);e.s(["withDedupe",0,function(e,{enabled:t=!0,id:o}){if(!t||!o)return e();if(r.get(o))return r.get(o);let a=e().finally(()=>r.delete(o));return r.set(o,a),a}])},557265,e=>{"use strict";var r=e.i(569934),t=e.i(95767),o=e.i(383856),a=e.i(675107),n=e.i(533580),s=e.i(88577),i=e.i(34888);
2e.s(["buildRequest",0,function(e,c={}){return async(u,d={})=>{let{dedupe:l=!1,methods:p,retryDelay:h=150,retryCount:f=3,uid:m}={...c,...d},{method:b}=u;if(p?.exclude?.includes(b)||p?.include&&!p.include.includes(b))throw new o.MethodNotSupportedRpcError(Error("method not supported"),{method:b});let g=l?(0,a.stringToHex)(`${m}.${(0,i.stringify)(u)}`):void 0;return(0,n.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await e(u)}catch(e){switch(e.code){case o.ParseRpcError.code:throw new o.ParseRpcError(e);case o.InvalidRequestRpcError.code:throw new o.InvalidRequestRpcError(e);case o.MethodNotFoundRpcError.code:throw new o.MethodNotFoundRpcError(e,{method:u.method});case o.InvalidParamsRpcError.code:throw new o.InvalidParamsRpcError(e);case o.InternalRpcError.code:throw new o.InternalRpcError(e);case o.InvalidInputRpcError.code:throw new o.InvalidInputRpcError(e);case o.ResourceNotFoundRpcError.code:throw new o.ResourceNotFoundRpcError(e);case o.ResourceUnavailableRpcError.code:throw new o.ResourceUnavailableRpcError(e);case o.TransactionRejectedRpcError.code:throw new o.TransactionRejectedRpcError(e);case o.MethodNotSupportedRpcError.code:throw new o.MethodNotSupportedRpcError(e,{method:u.method});case o.LimitExceededRpcError.code:throw new o.LimitExceededRpcError(e);case o.JsonRpcVersionUnsupportedError.code:throw new o.JsonRpcVersionUnsupportedError(e);case o.UserRejectedRequestError.code:throw new o.UserRejectedRequestError(e);case o.UnauthorizedProviderError.code:throw new o.UnauthorizedProviderError(e);case o.UnsupportedProviderMethodError.code:throw new o.UnsupportedProviderMethodError(e);case o.ProviderDisconnectedError.code:throw new o.ProviderDisconnectedError(e);case o.ChainDisconnectedError.code:throw new o.ChainDisconnectedError(e);case o.SwitchChainError.code:throw new o.SwitchChainError(e);case o.UnsupportedNonOptionalCapabilityError.code:throw new o.UnsupportedNonOptionalCapabilityError(e);case o.UnsupportedChainIdError.code:throw new o.UnsupportedChainIdError(e);case o.DuplicateIdError.code:throw new o.DuplicateIdError(e);case o.UnknownBundleIdError.code:throw new o.UnknownBundleIdError(e);case o.BundleTooLargeError.code:throw new o.BundleTooLargeError(e);case o.AtomicReadyWalletRejectedUpgradeError.code:throw new o.AtomicReadyWalletRejectedUpgradeError(e);case o.AtomicityNotSupportedError.code:throw new o.AtomicityNotSupportedError(e);case 5e3:throw new o.UserRejectedRequestError(e);default:if(e instanceof r.BaseError)throw e;throw new o.UnknownRpcError(e)}}},{delay:({count:e,error:r})=>{if(r&&r instanceof t.HttpRequestError){let e=r?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<<e)*h},retryCount:f,shouldRetry:({error:e})=>{var r;return"code"in(r=e)&&"number"==typeof r.code?-1===r.code||r.code===o.LimitExceededRpcError.code||r.code===o.InternalRpcError.code:!(r instanceof t.HttpRequestError)||!r.status||403===r.status||408===r.status||413===r.status||429===r.status||500===r.status||502===r.status||503===r.status||504===r.status||!1}}),{enabled:l,id:g})}}])},695331,e=>{"use strict";var r=e.i(557265),t=e.i(606624);e.s(["createTransport",0,function({key:e,methods:o,name:a,request:n,retryCount:s=3,retryDelay:i=150,timeout:c,type:u},d){let l=(0,t.uid)();return{config:{key:e,methods:o,name:a,request:n,retryCount:s,retryDelay:i,timeout:c,type:u},request:(0,r.buildRequest)(n,{methods:o,retryCount:s,retryDelay:i,uid:l}),value:d}}])},110163,588134,e=>{"use strict";var r=e.i(95767),t=e.i(569934);class o extends t.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}e.s(["UrlRequiredError",0,o],588134);var a=e.i(871706),n=e.i(468368),s=e.i(695331);e.s(["http",0,function(e,t={}){let{batch:i,fetchFn:c,fetchOptions:u,key:d="http",methods:l,name:p="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:f,retryDelay:m,raw:b}=t;return({chain:g,retryCount:w,timeout:y})=>{let{batchSize:E=1e3,wait:v=0}="object"==typeof i?i:{},P=t.retryCount??w,R=y??t.timeout??1e4,x=e||g?.rpcUrls.default.http[0];if(!x)throw new o;let T=(0,n.getHttpRpcClient)(x,{fetchFn:c,fetchOptions:u,onRequest:h,onResponse:f,timeout:R});return(0,s.createTransport)({key:d,methods:l,name:p,async request({method:e,params:t}){let o={method:e,params:t},{schedule:n}=(0,a.createBatchScheduler)({id:x,wait:v,shouldSplitBatch:e=>e.length>E,fn:e=>T.request({body:e}),sort:(e,r)=>e.id-r.id}),s=async e=>i?n(e):[await T.request({body:e})],[{error:c,result:u}]=await s(o);if(b)return{error:c,result:u};if(c)throw new r.RpcRequestError({body:o,error:c,url:x});return u},retryCount:P,retryDelay:m,timeout:R,type:"http"},{fetchOptions:u,url:x})}}],110163)},363625,e=>{"use strict";var r=e.i(189991),t=e.i(606624);e.s(["createClient",0,function(e){let{batch:o,chain:a,ccipRead:n,dataSuffix:s,key:i="base",n
2ame:c="Base Client",type:u="base"}=e,d=e.experimental_blockTag??("number"==typeof a?.experimental_preconfirmationTime?"pending":void 0),l=Math.min(Math.max(Math.floor((a?.blockTime??12e3)/2),500),4e3),p=e.pollingInterval??l,h=e.cacheTime??p,f=e.account?(0,r.parseAccount)(e.account):void 0,{config:m,request:b,value:g}=e.transport({account:f,chain:a,pollingInterval:p}),w={account:f,batch:o,cacheTime:h,ccipRead:n,chain:a,dataSuffix:s,key:i,name:c,pollingInterval:p,request:b,transport:{...m,...g},type:u,uid:(0,t.uid)(),...d?{experimental_blockTag:d}:{}};return Object.assign(w,{extend:function e(r){return t=>{let o=t(r);for(let e in w)delete o[e];let a={...r,...o};return Object.assign(a,{extend:e(a)})}}(w)})},"rpcSchema",0,function(){return null}])},467125,e=>{"use strict";e.s(["getAction",0,function(e,r,t){let o=e[r.name];if("function"==typeof o)return o;let a=e[t];return"function"==typeof a?a:t=>r(e,t)}])},807749,e=>{"use strict";var r=e.i(70204),t=e.i(569934),o=e.i(878023),a=e.i(95767),n=e.i(383856);e.s(["getContractError",0,function(e,{abi:s,address:i,args:c,docsPath:u,functionName:d,sender:l}){let p=e instanceof o.RawContractError?e:e instanceof t.BaseError?e.walk(e=>"data"in e)||e.walk():{},{code:h,data:f,details:m,message:b,shortMessage:g}=p,w=e instanceof r.AbiDecodingZeroDataError?new o.ContractFunctionZeroDataError({functionName:d}):[3,n.InternalRpcError.code].includes(h)&&(f||m||b||g)||h===n.InvalidInputRpcError.code&&"execution reverted"===m&&f?new o.ContractFunctionRevertedError({abi:s,data:"object"==typeof f?f.data:f,functionName:d,message:p instanceof a.RpcRequestError?m:g??b}):e;return new o.ContractFunctionExecutionError(w,{abi:s,args:c,contractAddress:i,docsPath:u,functionName:d,sender:l})}])},388750,e=>{"use strict";var r=e.i(600547),t=e.i(656679),o=e.i(807749),a=e.i(467125),n=e.i(989509);async function s(e,s){let{abi:i,address:c,args:u,functionName:d,...l}=s,p=(0,t.encodeFunctionData)({abi:i,args:u,functionName:d});try{let{data:t}=await (0,a.getAction)(e,n.call,"call")({...l,data:p,to:c});return(0,r.decodeFunctionResult)({abi:i,args:u,functionName:d,data:t||"0x"})}catch(e){throw(0,o.getContractError)(e,{abi:i,address:c,args:u,docsPath:"/docs/contract/readContract",functionName:d})}}e.s(["readContract",0,s])},290392,781974,418217,e=>{"use strict";var r=e.i(823838),t=e.i(831095),o=e.i(880841),a=e.i(401319),n=e.i(450323),s=e.i(675107);async function i({hash:r,signature:t}){let u=(0,o.isHex)(r)?r:(0,s.toHex)(r),{secp256k1:d}=await e.A(625932),l=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:o,yParity:a}=t,s=c(Number(a??o));return new d.Signature((0,n.hexToBigInt)(e),(0,n.hexToBigInt)(r)).addRecoveryBit(s)}let e=(0,o.isHex)(t)?t:(0,s.toHex)(t);if(65!==(0,a.size)(e))throw Error("invalid signature length");let r=c((0,n.hexToNumber)(`0x${e.slice(130)}`));return d.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(u.substring(2)).toHex(!1);return`0x${l}`}function c(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function u({hash:e,signature:o}){var a;let n;return a=await i({hash:e,signature:o}),n=(0,t.keccak256)(`0x${a.substring(4)}`).substring(26),(0,r.checksumAddress)(`0x${n}`)}e.s(["recoverPublicKey",0,i],781974),e.s(["recoverAddress",0,u],418217);var d=e.i(147526),l=e.i(769936),p=e.i(70326);async function h(e){let{authorization:r,signature:o}=e;return u({hash:function(e){let{chainId:r,nonce:o,to:a}=e,n=e.contractAddress??e.address,i=(0,t.keccak256)((0,d.concatHex)(["0x05",(0,p.toRlp)([r?(0,s.numberToHex)(r):"0x",n,o?(0,s.numberToHex)(o):"0x"])]));return"bytes"===a?(0,l.hexToBytes)(i):i}(r),signature:o??r})}e.s(["recoverAuthorizationAddress",0,h],290392)},205789,368698,e=>{"use strict";var r=e.i(285973),t=e.i(976486),o=e.i(569934),a=e.i(393702);class n extends o.BaseError{constructor(e,{account:o,docsPath:n,chain:s,data:i,gas:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:l,nonce:p,to:h,value:f}){const m=(0,a.prettyPrint)({from:o?.address,to:h,value:void 0!==f&&`${(0,r.formatEther)(f)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:c,gasPrice:void 0!==u&&`${(0,t.formatGwei)(u)} gwei`,maxFeePerGas:void 0!==d&&`${(0,t.formatGwei)(d)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,t.formatGwei)(l)} gwei`,nonce:p});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(
2Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}e.s(["EstimateGasExecutionError",0,n],368698);var s=e.i(853532),i=e.i(467078);e.s(["getEstimateGasError",0,function(e,{docsPath:r,...t}){let o;return new n((o=(0,i.getNodeError)(e,t))instanceof s.UnknownNodeError?e:o,{docsPath:r,...t})}],205789)},972960,170222,57351,915588,111047,194720,e=>{"use strict";var r=e.i(976486),t=e.i(569934);class o extends t.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class a extends t.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class n extends t.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.formatGwei)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}e.s(["BaseFeeScalarError",0,o,"Eip1559FeesNotSupportedError",0,a,"MaxFeePerGasTooLowError",0,n],170222);var s=e.i(467125),i=e.i(450323),c=t;class u extends c.BaseError{constructor({blockHash:e,blockNumber:r}){let t="Block";e&&(t=`Block at hash "${e}"`),r&&(t=`Block at number "${r}"`),super(`${t} could not be found.`,{name:"BlockNotFoundError"})}}e.s(["BlockNotFoundError",0,u],57351);var d=e.i(675107),l=e.i(557874);async function p(e,{blockHash:r,blockNumber:t,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:a}={}){let n=a??!1,s=void 0!==t?(0,d.numberToHex)(t):void 0,i=null;if(!(i=r?await e.request({method:"eth_getBlockByHash",params:[r,n]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[s||o,n]},{dedupe:!!s})))throw new u({blockHash:r,blockNumber:t});return(e.chain?.formatters?.block?.format||l.formatBlock)(i,"getBlock")}async function h(e){return BigInt(await e.request({method:"eth_gasPrice"}))}async function f(e,r){return m(e,r)}async function m(e,r){let{block:t,chain:o=e.chain,request:n}=r||{};try{let r=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if("function"==typeof r){let o=t||await (0,s.getAction)(e,p,"getBlock")({}),a=await r({block:o,client:e,request:n});if(null===a)throw Error();return a}if(void 0!==r)return r;let a=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.hexToBigInt)(a)}catch{let[r,o]=await Promise.all([t?Promise.resolve(t):(0,s.getAction)(e,p,"getBlock")({}),(0,s.getAction)(e,h,"getGasPrice")({})]);if("bigint"!=typeof r.baseFeePerGas)throw new a;let n=o-r.baseFeePerGas;if(n<0n)return 0n;return n}}async function b(e,r){return g(e,r)}async function g(e,r){let{block:t,chain:n=e.chain,request:i,type:c="eip1559"}=r||{},u=await (async()=>"function"==typeof n?.fees?.baseFeeMultiplier?n.fees.baseFeeMultiplier({block:t,client:e,request:i}):n?.fees?.baseFeeMultiplier??1.2)();if(u<1)throw new o;let d=u.toString().split(".")[1]?.length??0,l=10**d,f=e=>e*BigInt(Math.ceil(u*l))/BigInt(l),b=t||await (0,s.getAction)(e,p,"getBlock")({});if("function"==typeof n?.fees?.estimateFeesPerGas){let r=await n.fees.estimateFeesPerGas({block:t,client:e,multiply:f,request:i,type:c});if(null!==r)return r}if("eip1559"===c){if("bigint"!=typeof b.baseFeePerGas)throw new a;let r="bigint"==typeof i?.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await m(e,{block:b,chain:n,request:i}),t=f(b.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??t+r,maxPriorityFeePerGas:r}}return{gasPrice:i?.gasPrice??f(await (0,s.getAction)(e,h,"getGasPrice")({}))}}e.s(["getBlock",0,p],915588),e.s(["getGasPrice",0,h],111047),e.s(["estimateMaxPriorityFeePerGas",0,f,"internal_estimateMaxPriorityFeePerGas",0,m],194720),e.s(["estimateFeesPerGas",0,b,"internal_estimateFeesPerGas",0,g],972960)},937445,e=>{"use strict";var r=e.i(450323),t=e.i(675107);async function o(e,{address:a,blockTag:n="latest",blockNumber:s}){let i=await e.request({method:"eth_getTransactionCount",params:[a,"bigint"==typeof s?(0,t.numberToHex)(s):n]},{dedupe:!!s});return(0,r.hexToNumber)(i)}e.s(["getTransactionCount",0,o])},10725,e=>{"use strict";var r=e.i(853532),t=e.i(393702),o=e.i(467078);e.s(["getTransactionError",0,function(e,{docsPath:a,...n}){let s,i=(s=(0,o.getNodeError)(e,n))instanceof r.UnknownNodeError?e:s;return new t.TransactionExecutionError(i,{docsPath:a,...n})}])},975948,e=>{"use strict";var r=e.i(450323);async function t(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,r.hexToNumber)(t)}e.s(["getChainId",0,t])},368941,818249,e=>{"use strict";e.s(["defaultParameters",()=>v,"prepareTransactionRequest",()=>x],368941);var r=e.i(189991),t=e.i(972960),o=e.i(484734),a=e.i(915588),n=e.i(937445),s=e.i(170222),i=e.i(94371),c=e.i(49810),u=e.i(883031),d=e.i(310538),l=e.i(467125),p=e.i(976677),h=e.i(353464),f=e.i(576213),m=e.i(10725),b=e.i(264404),g=e.i(982191),w=e.i(190521),y=e.i(975948);async function E(e,t){let{account:o=e.account,accessList:n,authorizationList:i,chain:c=e.chain,blobVersionedHashes:u,blobs:d,data:p,gas:f,gasPrice:E,maxFeePerBlobGas:v,maxFeePerGas:P,maxPriorityFeePerGas:R,nonce:x,nonceManager:T,to:F,type:M,value:q,...B}=t,A=await (async()=>
2{if(!o||!T||void 0!==x)return x;let t=(0,r.parseAccount)(o),a=c?c.id:await (0,l.getAction)(e,y.getChainId,"getChainId")({});return await T.consume({address:t.address,chainId:a,client:e})})();(0,h.assertRequest)(t);let C=c?.formatters?.transactionRequest?.format,I=(C||w.formatTransactionRequest)({...(0,b.extract)(B,{format:C}),account:o?(0,r.parseAccount)(o):void 0,accessList:n,authorizationList:i,blobs:d,blobVersionedHashes:u,data:p,gas:f,gasPrice:E,maxFeePerBlobGas:v,maxFeePerGas:P,maxPriorityFeePerGas:R,nonce:A,to:F,type:M,value:q},"fillTransaction");try{let r=await e.request({method:"eth_fillTransaction",params:[I]}),o=(c?.formatters?.transaction?.format||g.formatTransaction)(r.tx);delete o.blockHash,delete o.blockNumber,delete o.r,delete o.s,delete o.transactionIndex,delete o.v,delete o.yParity,o.data=o.input,o.gas&&(o.gas=t.gas??o.gas),o.gasPrice&&(o.gasPrice=t.gasPrice??o.gasPrice),o.maxFeePerBlobGas&&(o.maxFeePerBlobGas=t.maxFeePerBlobGas??o.maxFeePerBlobGas),o.maxFeePerGas&&(o.maxFeePerGas=t.maxFeePerGas??o.maxFeePerGas),o.maxPriorityFeePerGas&&(o.maxPriorityFeePerGas=t.maxPriorityFeePerGas??o.maxPriorityFeePerGas),o.nonce&&(o.nonce=t.nonce??o.nonce);let n=await (async()=>{if("function"==typeof c?.fees?.baseFeeMultiplier){let r=await (0,l.getAction)(e,a.getBlock,"getBlock")({});return c.fees.baseFeeMultiplier({block:r,client:e,request:t})}return c?.fees?.baseFeeMultiplier??1.2})();if(n<1)throw new s.BaseFeeScalarError;let i=n.toString().split(".")[1]?.length??0,u=10**i,d=e=>e*BigInt(Math.ceil(n*u))/BigInt(u);return o.maxFeePerGas&&!t.maxFeePerGas&&(o.maxFeePerGas=d(o.maxFeePerGas)),o.gasPrice&&!t.gasPrice&&(o.gasPrice=d(o.gasPrice)),{raw:r.raw,transaction:{from:I.from,...o}}}catch(r){throw(0,m.getTransactionError)(r,{...t,chain:e.chain})}}e.s(["fillTransaction",0,E],818249);let v=["blobVersionedHashes","chainId","fees","gas","nonce","type"],P=new Map,R=new p.LruMap(128);async function x(e,p){let m,b,g=p;g.account??=e.account,g.parameters??=v;let{account:w,chain:x=e.chain,nonceManager:T,parameters:F}=g,M="function"==typeof x?.prepareTransactionRequest?{fn:x.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(x?.prepareTransactionRequest)?{fn:x.prepareTransactionRequest[0],runAt:x.prepareTransactionRequest[1].runAt}:void 0;async function q(){return m?m:void 0!==g.chainId?g.chainId:x?x.id:m=await (0,l.getAction)(e,y.getChainId,"getChainId")({})}let B=w?(0,r.parseAccount)(w):w,A=g.nonce;if(F.includes("nonce")&&void 0===A&&B&&T){let r=await q();A=await T.consume({address:B.address,chainId:r,client:e})}M?.fn&&M.runAt?.includes("beforeFillTransaction")&&(g=await M.fn({...g,chain:x},{phase:"beforeFillTransaction"}),A??=g.nonce);let C=(!(F.includes("blobVersionedHashes")||F.includes("sidecars"))||!g.kzg||!g.blobs)&&!1!==R.get(e.uid)&&["fees","gas"].some(e=>F.includes(e))&&(F.includes("chainId")&&"number"!=typeof g.chainId||F.includes("nonce")&&"number"!=typeof A||F.includes("fees")&&"bigint"!=typeof g.gasPrice&&("bigint"!=typeof g.maxFeePerGas||"bigint"!=typeof g.maxPriorityFeePerGas)||F.includes("gas")&&"bigint"!=typeof g.gas)?await (0,l.getAction)(e,E,"fillTransaction")({...g,nonce:A}).then(r=>{let{chainId:t,from:o,gas:a,gasPrice:n,nonce:s,maxFeePerBlobGas:i,maxFeePerGas:c,maxPriorityFeePerGas:u,type:d,...l}=r.transaction;return R.set(e.uid,!0),{...g,...o?{from:o}:{},...d?{type:d}:{},...void 0!==t?{chainId:t}:{},...void 0!==a?{gas:a}:{},...void 0!==n?{gasPrice:n}:{},...void 0!==s?{nonce:s}:{},...void 0!==i?{maxFeePerBlobGas:i}:{},...void 0!==c?{maxFeePerGas:c}:{},...void 0!==u?{maxPriorityFeePerGas:u}:{},..."nonceKey"in l&&void 0!==l.nonceKey?{nonceKey:l.nonceKey}:{}}}).catch(r=>("TransactionExecutionError"!==r.name||r.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)&&R.set(e.uid,!1),g)):g;A??=C.nonce;let{blobs:I,gas:j,kzg:G,type:k}=g={...C,...B?{from:B?.address}:{},...A?{nonce:A}:{}};async function N(){return b||(b=await (0,l.getAction)(e,a.getBlock,"getBlock")({blockTag:"latest"}))}if(M?.fn&&M.runAt?.includes("beforeFillParameters")&&(g=await M.fn({...g,chain:x},{phase:"beforeFillParameters"})),F.includes("nonce")&&void 0===A&&B&&!T&&(g.nonce=await (0,l.getAction)(e,n.getTransactionCount,"getTransactionCount")({address:B.address,blockTag:"pending"})),(F.includes("blobVersionedHashes")||F.includes("sidecars"))&&I&&G){let e=(0,i.blobsToCommitments)({blobs:I,kzg:G});if(F.includes("blobVersionedHashes")){let r=(0,u.commitmentsToVersionedHashes)({commitments:e,to:"hex"});g.blobVersionedHashes=r}if(F.includes("sidecars")){let r=(0,c.blobsToProofs)({blobs:I,commitments:e,kzg:G}),t=(0,d.toBlobSidecars)({blobs:I,commitments:e,proofs:r,to:"hex"});g.sidecars=t}}if(F.includes("chainId")&&(g.chainId=await q()),(F.includes("fees")||F.includes("type"))&&void 0===k)try{g.type=(0,f.getTransactionType)(g)}catch{let r=P.get(e.uid);if(void 0===r){let t=await N();r="bigint"==typeof t?.baseFeePerGas,P.set(e.uid,r)}g.type=r?"eip1559":"legacy"}if(F.includes("fees"))if("legacy"!==g.type&&"eip2930"!==g.type){if(void 0===g.maxFeePerGas||void 0===g.maxPriorityFeePerGas){let r=await N(),{maxFeePerGas:o,maxPriorityFeePerGas:a}=await (0,t.internal_estimateFeesPerGas)(e,{block:r,chain:x,request:g});if(void 0===g.maxPriorityFeePerGas&&g.maxFeePerGas&&g.maxFeePerGas<a)throw new s.MaxFeePerGasTooLowError({maxPriorityFeePerGas:a});g.maxPriorityFeePerGas=a,g.maxFeePerGas=o}}else{if(void 0!==g.maxFeePerGas||void 0!==g.maxPriorityFeePerGas)throw new s.Eip1559FeesNotSupportedError;if(void 0===g.gasPrice){let r=await N(),{gasPrice:o}=await (0,t.internal_estimateFeesPerGas)(e,{block:r,chain:x,request:g,type:"legacy"});g.gasPrice=o}}return F.includes("gas")&&void 0===j&&(g.gas=await (0,l.getAction)(e,o.estimateGas,"estimateGas")({...g,account:B,prepare:B?.type==="local"?[]:["blobVersionedHashes"]})),M?.fn&&M.runAt?.includes("afterFillParameters")&&(g=await M.fn({...g,chain:x},{phase:"afterFillParameters"})),(0,h.assertRequest)(g),delete g.parameters,g}},484734,e=>{"use strict";e.s(["estimateGas",()=>l]);var r=e.i(189991),t=e.i(569934),o=e.i(290392),a=e.i(675107),n=e.i(205789),s=e.i(264404),i=e.i(190521),c=e.i(826051),u=e.i(353464),d=e.i(368941);async function l(e,l){let{account:p=e.account,prepare:h=!0}=l,f=p?(0,r.parseAccount)(p):void 0,m=Array.isArray(h)?h:f?.type!=="local"?["blobVersionedHashes"]:void 0;try{let r=await (async()=>l.to?l.to:l.authorizationList&&l.authorizationList.length>0?await (0,o.recoverAuthorizationAddress)({authorization:l.authorizationList[0]}).catch(()=>{throw new t.BaseError("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:n,authorizationList:p,blobs:b,blobVersionedHashes:g,blockNumber:w,blockTag:y,data:E,gas:v,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:F,value:M,stateOverride:q,...B}=h?await (0,d.prepareTransactionRequest)(e,{...l,parameters:m,to:r}):l;if(v&&l.gas!==v)return v;let A=("bigint"==typeof w?(0,a.numberToHex)(w):void 0)||y,C=(0,c.serializeStateOverride)(q);(0,u.assertRequest)(l);let I=e.chain?.formatters?.transactionRequest?.format,j=(I||i.formatTransactionRequest)({...(0,s.extract)(B,{format:I}),account:f,accessList:n,authorizationList:p,blobs:b,blobVersionedHashes:g,data:E,gasPrice:P,maxFeePerBlobGas:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:F,to:r,value:M},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:C?[j,A??e.experimental_blockTag??"latest",C]:A?[j,A]:[j]}))}catch(r){throw(0,n.getEstimateGasError)(r,{...l,account:f,chain:e.chain})}}},472083,e=>{"use strict";let r=new Map,t=new Map;async function o(e,{cacheKey:a,cacheTime:n=1/0}){let s,i,c,u=(i=(s=(e,r)=>({clear:()=>r.delete(e),get:()=>r.get(e),set:t=>r.set(e,t)}))(a,r),{clear:()=>{i.clear(),c.clear()},promise:i,response:c=s(a,t)}),d=u.response.get();if(d&&n>0&&Date.now()-d.created.getTime()<n)return d.data;let l=u.promise.get();l||(l=e(),u.promise.set(l));try{let e=await l;return u.response.set({created:new Date,data:e}),e}finally{u.promise.clear()}}e.s(["withCache",0,o])},20101,976215,e=>{"use strict";let r=new Map,t=new Map,o=0;e.s(["observe",0,function(e,a,n){let s=++o,i=()=>r.get(e)||[],c=()=>{let o,a=i();if(!a.some(e=>e.id===s))return;let n=t.get(e);if(1===a.length&&n){let e=n();e instanceof Promise&&e.catch(()=>{})}o=i(),r.set(e,o.filter(e=>e.id!==s))},u=i();if(r.set(e,[...u,{id:s,fns:a}]),u&&u.length>0)return c;let d={};for(let e in a)d[e]=(...r)=>{let t=i();if(0!==t.length)for(let o of t)o.fns[e]?.(...r)};let l=n(d);return"function"==typeof l&&t.set(e,l),c}],20101);var a=e.i(588233);
2e.s(["poll",0,function(e,{emitOnBegin:r,initialWaitTime:t,interval:o}){let n=!0,s=()=>n=!1;return(async()=>{let i;r&&(i=await e({unpoll:s}));let c=await t?.(i)??o;await (0,a.wait)(c);let u=async()=>{n&&(await e({unpoll:s}),await (0,a.wait)(o),u())};u()})(),s}],976215)},638291,e=>{"use strict";async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}e.s(["sendRawTransaction",0,r])},611573,942305,e=>{"use strict";var r=e.i(569934);class t extends r.BaseError{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class o extends r.BaseError{constructor({docsPath:e,metaMessages:r,type:t}){super(`Account type "${t}" is not supported.`,{docsPath:e,metaMessages:r,name:"AccountTypeNotSupportedError"})}}e.s(["AccountNotFoundError",0,t,"AccountTypeNotSupportedError",0,o],611573);var a=e.i(505880);e.s(["assertCurrentChain",0,function({chain:e,currentChainId:r}){if(!e)throw new a.ChainNotFoundError;if(r!==e.id)throw new a.ChainMismatchError({chain:e,currentChainId:r})}],942305)},888794,e=>{"use strict";var r=e.i(189991),t=e.i(611573),o=e.i(569934),a=e.i(290392),n=e.i(942305),s=e.i(147526),i=e.i(10725),c=e.i(264404),u=e.i(190521),d=e.i(467125),l=e.i(976677),p=e.i(353464),h=e.i(975948),f=e.i(368941),m=e.i(638291);let b=new l.LruMap(128);async function g(e,l){let{account:g=e.account,assertChainId:w=!0,chain:y=e.chain,accessList:E,authorizationList:v,blobs:P,data:R,dataSuffix:x="string"==typeof e.dataSuffix?e.dataSuffix:e.dataSuffix?.value,gas:T,gasPrice:F,maxFeePerBlobGas:M,maxFeePerGas:q,maxPriorityFeePerGas:B,nonce:A,type:C,value:I,...j}=l;if(void 0===g)throw new t.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let G=g?(0,r.parseAccount)(g):null;try{(0,p.assertRequest)(l);let r=await (async()=>l.to?l.to:null!==l.to&&v&&v.length>0?await (0,a.recoverAuthorizationAddress)({authorization:v[0]}).catch(()=>{throw new o.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(G?.type==="json-rpc"||null===G){let t;null!==y&&(t=await (0,d.getAction)(e,h.getChainId,"getChainId")({}),w&&(0,n.assertCurrentChain)({currentChainId:t,chain:y}));let o=e.chain?.formatters?.transactionRequest?.format,a=(o||u.formatTransactionRequest)({...(0,c.extract)(j,{format:o}),accessList:E,account:G,authorizationList:v,blobs:P,chainId:t,data:R?(0,s.concat)([R,x??"0x"]):R,gas:T,gasPrice:F,maxFeePerBlobGas:M,maxFeePerGas:q,maxPriorityFeePerGas:B,nonce:A,to:r,type:C,value:I},"sendTransaction"),i=b.get(e.uid);try{return await e.request({method:i?"wallet_sendTransaction":"eth_sendTransaction",params:[a]},{retryCount:0})}catch(r){if(!1===i)throw r;if("InvalidInputRpcError"===r.name||"InvalidParamsRpcError"===r.name||"MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)return await e.request({method:"wallet_sendTransaction",params:[a]},{retryCount:0}).then(r=>(b.set(e.uid,!0),r)).catch(t=>{if("MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)throw b.set(e.uid,!1),r;throw t});throw r}}if(G?.type==="local"){let t=await (0,d.getAction)(e,f.prepareTransactionRequest,"prepareTransactionRequest")({account:G,accessList:E,authorizationList:v,blobs:P,chain:y,data:R?(0,s.concat)([R,x??"0x"]):R,gas:T,gasPrice:F,maxFeePerBlobGas:M,maxFeePerGas:q,maxPriorityFeePerGas:B,nonce:A,nonceManager:G.nonceManager,parameters:[...f.defaultParameters,"sidecars"],type:C,value:I,...j,to:r}),o=y?.serializers?.transaction,a=await G.signTransaction(t,{serializer:o});return await (0,d.getAction)(e,m.sendRawTransaction,"sendRawTransaction")({serializedTransaction:a})}if(G?.type==="smart")throw new t.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new t.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:G?.type})}catch(e){if(e instanceof t.AccountTypeNotSupportedError)throw e;throw(0,i.getTransactionError)(e,{...l,account:G,chain:l.chain||void 0})}}e.s(["sendTransaction",0,g])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.