"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[474],{70312:(e,t,r)=>{function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function s(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function i(e,t){s(e);let r=t.outputLen;if(e.lengtha,DO:()=>s,Fe:()=>n,Ht:()=>i})},6942:(e,t,r)=>{r.d(t,{lY:()=>E});var n=r(70312);let s=BigInt(0x100000000-1),a=BigInt(32),i=(e,t,r)=>e<>>32-r,o=(e,t,r)=>t<>>32-r,c=(e,t,r)=>t<>>64-r,u=(e,t,r)=>e<>>64-r;var l=r(94554);let d=[],p=[],f=[],h=BigInt(0),b=BigInt(1),m=BigInt(2),y=BigInt(7),g=BigInt(256),v=BigInt(113);for(let e=0,t=b,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],d.push(2*(5*n+r)),p.push((e+1)*(e+2)/2%64);let s=h;for(let e=0;e<7;e++)(t=(t<>y)*v)%g)&m&&(s^=b<<(b<>a&s)}:{h:0|Number(e>>a&s),l:0|Number(e&s)}}(e[i],t);[r[i],n[i]]=[o,c]}return[r,n]}(f,!0),x=(e,t,r)=>r>32?c(e,t,r):i(e,t,r),P=(e,t,r)=>r>32?u(e,t,r):o(e,t,r);class M extends l.Vw{constructor(e,t,r,s=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=s,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.Fe)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,l.DH)(this.state)}keccak(){l.qv||(0,l.Fc)(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,s=(t+2)%10,a=r[s],i=r[s+1],o=x(a,i,1)^r[n],c=P(a,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=o,e[t+r+1]^=c}let t=e[2],s=e[3];for(let r=0;r<24;r++){let n=p[r],a=x(t,s,n),i=P(t,s,n),o=d[r];t=e[o],s=e[o+1],e[o]=a,e[o+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=w[n],e[1]^=$[n]}r.fill(0)}(this.state32,this.rounds),l.qv||(0,l.Fc)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.CC)(this);let{blockLen:t,state:r}=this,s=(e=(0,l.ZJ)(e)).length;for(let n=0;n=r&&this.keccak();let a=Math.min(r-this.posOut,s-n);e.set(t.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.Fe)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.Ht)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:s,enableXOF:a}=this;return e||(e=new M(t,r,n,a,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=n,e.enableXOF=a,e.destroyed=this.destroyed,e}}let E=(0,l.ld)(()=>new M(136,1,32))},94554:(e,t,r)=>{r.d(t,{DH:()=>s,Fc:()=>l,My:()=>p,O8:()=>a,Ow:()=>i,Vw:()=>h,ZJ:()=>f,aZ:()=>o,ld:()=>b,qv:()=>c});var n=r(70312);let s=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),a=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),i=(e,t)=>e<<32-t|e>>>t,o=(e,t)=>e<>>32-t>>>0,c=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],u=e=>e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255;function l(e){for(let t=0;tt.toString(16).padStart(2,"0"));function p(e){(0,n.DO)(e);let t="";for(let r=0;re().update(f(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}},13412:(e,t,r)=>{r.d(t,{r:()=>P});var n=r(67900),s=r(28464),a=r(42328),i=r(62813),o=r(66604),c=r(51101);function u(e){return"number"==typeof e?e:"wei"===e?0:Math.abs(c.pj[e])}var l=r(73186),d=r(41136),p=r(43047),f=r(33671),h=r(6319),b=r(90154),m=r(26418),y=r(18105),g=r(45735),v=r(97903);async function w(e,t){let{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:a,multicallAddress:i,stateOverride:o}=t,c=t.contracts,u=n??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),w=i;if(!w){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");w=(0,m.M)({blockNumber:s,chain:e.chain,contract:"multicall3"})}let $=[[]],x=0,P=0;for(let e=0;e0&&P>u&&$[x].length>0&&(x++,P=(e.length-2)/2,$[x]=[]),$[x]=[...$[x],{allowFailure:!0,callData:e,target:n}]}catch(i){let e=(0,y.j)(i,{abi:t,address:n,args:s,docsPath:"/docs/contract/multicall",functionName:a});if(!r)throw e;$[x]=[...$[x],{allowFailure:!0,callData:"0x",target:n}]}}let M=await Promise.allSettled($.map(t=>(0,g.T)(e,v.J,"readContract")({abi:d.v2,address:w,args:[t],blockNumber:s,blockTag:a,functionName:"aggregate3",stateOverride:o}))),E=[];for(let e=0;e$(e,{...a,allowFailure:r,blockNumber:n,blockTag:s,chainId:Number.parseInt(t),contracts:i.map(({contract:e})=>e)})))).flat(),c=Object.values(t).flatMap(e=>e.map(({index:e})=>e));return o.reduce((e,t,r)=>(e&&(e[c[r]]=t),e),[])}catch(a){if(a instanceof l.bG)throw a;let t=()=>i.map(t=>(function(e,t){let{chainId:r,...n}=t,s=e.getClient({chainId:r});return(0,o.T)(s,v.J,"readContract")(n)})(e,{...t,blockNumber:n,blockTag:s}));if(r)return(await Promise.allSettled(t())).map(e=>"fulfilled"===e.status?{result:e.value,status:"success"}:{error:e.reason,result:void 0,status:"failure"});return await Promise.all(t())}}async function P(e,t){let{address:r,blockNumber:c,blockTag:l,chainId:d,token:p,unit:f="ether"}=t;if(p)try{return await M(e,{balanceAddress:r,chainId:d,symbolType:"string",tokenAddress:p})}catch(t){if("ContractFunctionExecutionError"===t.name){let t=await M(e,{balanceAddress:r,chainId:d,symbolType:"bytes32",tokenAddress:p}),a=(0,n.IQ)((0,s.B)(t.symbol,{dir:"right"}));return{...t,symbol:a}}throw t}let h=e.getClient({chainId:d}),b=(0,o.T)(h,i.r,"getBalance"),m=await b(c?{address:r,blockNumber:c}:{address:r,blockTag:l}),y=e.chains.find(e=>e.id===d)??h.chain;return{decimals:y.nativeCurrency.decimals,formatted:(0,a.J)(m,u(f)),symbol:y.nativeCurrency.symbol,value:m}}async function M(e,t){let{balanceAddress:r,chainId:n,symbolType:s,tokenAddress:i,unit:o}=t,c={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:s}]}],address:i},[l,d,p]=await x(e,{allowFailure:!1,contracts:[{...c,functionName:"balanceOf",args:[r],chainId:n},{...c,functionName:"decimals",chainId:n},{...c,functionName:"symbol",chainId:n}]}),f=(0,a.J)(l??"0",u(o??d));return{decimals:d,formatted:f,symbol:p,value:l}}},66604:(e,t,r)=>{r.d(t,{T:()=>n});function n(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let s=e[r];return"function"==typeof s?s:r=>t(e,r)}},29081:(e,t,r)=>{function n(e,t){let r=e.exec(t);return r?.groups}r.d(t,{BD:()=>s,Ge:()=>a,Yv:()=>n,wj:()=>i});let s=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,a=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,i=/^\(.+?\).*?$/},17162:(e,t,r)=>{r.d(t,{J:()=>n});function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},74736:(e,t,r)=>{r.d(t,{T:()=>en});var n=r(29081);let s=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,a=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,i=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/,o=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/,c=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/,u=/^fallback\(\) external(?:\s(?payable{1}))?$/,l=/^receive\(\) external payable$/,d=new Set(["indexed"]),p=new Set(["calldata","memory","storage"]);class f extends Error{constructor(e,t={}){let r=t.cause instanceof f?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof f&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...r?[`Details: ${r}`]:[],"Version: abitype@1.0.7"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}}class h extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class b extends f{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class m extends f{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class y extends f{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class g extends f{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class v extends f{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class w extends f{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class $ extends f{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class x extends f{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class P extends f{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class M extends f{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class E extends f{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let C=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),A=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,I=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,O=/^u?int$/;function j(e,t){var r,s;let a;let i=function(e,t,r){let n="";if(r)for(let e of Object.entries(r)){if(!e)continue;let t="";for(let r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:e}(e,t?.type,t?.structs);if(C.has(i))return C.get(i);let o=n.wj.test(e),c=(0,n.Yv)(o?I:A,e);if(!c)throw new m({param:e});if(c.name&&("address"===(r=c.name)||"bool"===r||"function"===r||"string"===r||"tuple"===r||n.BD.test(r)||n.Ge.test(r)||B.test(r)))throw new y({param:e,name:c.name});let u=c.name?{name:c.name}:{},l="indexed"===c.modifier?{indexed:!0}:{},d=t?.structs??{},f={};if(o){a="tuple";let e=z(c.type),t=[],r=e.length;for(let n=0;n[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function R(e){let t=function(e){let t={},r=e.length;for(let s=0;s"type"in e&&"constructor"===e.type);if(!s)throw new G.YW({docsPath:_});if(!("inputs"in s)||!s.inputs||0===s.inputs.length)throw new G.YF({docsPath:_});let a=(0,q.h)(s.inputs,r);return(0,V.aP)([n,a])}var Y=r(90154),K=r(26418),J=r(81867),H=r(63115),Z=r(73611),Q=r(96610),X=r(30352),ee=r(9704),et=r(45736),er=r(498);async function en(e,t){let{account:n=e.account,batch:s=!!e.batch?.multicall,blockNumber:a,blockTag:i="latest",accessList:o,blobs:c,code:u,data:l,factory:d,factoryData:p,gas:f,gasPrice:h,maxFeePerBlobGas:b,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:v,value:w,stateOverride:$,...x}=t,P=n?(0,F.J)(n):void 0;if(u&&(d||p))throw new N.C("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(u&&v)throw new N.C("Cannot provide both `code` & `to` as parameters.");let M=u&&l,E=d&&p&&v&&l,C=M||E,A=M?function(e){let{code:t,data:r}=e;return W({abi:R(["constructor(bytes, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",args:[t,r]})}({code:u,data:l}):E?function(e){let{data:t,factory:r,factoryData:n,to:s}=e;return W({abi:R(["constructor(address, bytes, address, bytes)"]),bytecode:"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",args:[s,t,r,n]})}({data:l,factory:d,factoryData:p,to:v}):l;try{(0,er.c)(t);let r=(a?(0,J.cK)(a):void 0)||i,n=(0,et.yH)($),u=e.chain?.formatters?.transactionRequest?.format,l=(u||X.Bv)({...(0,Q.o)(x,{format:u}),from:P?.address,accessList:o,blobs:c,data:A,gas:f,gasPrice:h,maxFeePerBlobGas:b,maxFeePerGas:m,maxPriorityFeePerGas:y,nonce:g,to:C?void 0:v,value:w});if(s&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:l})&&!n)try{return await es(e,{...l,blockNumber:a,blockTag:i})}catch(e){if(!(e instanceof U.YE)&&!(e instanceof U.rj))throw e}let d=await e.request({method:"eth_call",params:n?[l,r,n]:[l,r]});if("0x"===d)return{data:void 0};return{data:d}}catch(i){let n=function(e){if(!(e instanceof N.C))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(i),{offchainLookup:s,offchainLookupSignature:a}=await r.e(436).then(r.bind(r,20436));if(!1!==e.ccipRead&&n?.slice(0,10)===a&&v)return{data:await s(e,{data:n,to:v})};if(C&&n?.slice(0,10)==="0x101bb98d")throw new D.Po({factory:d});throw function(e,{docsPath:t,...r}){let n=(()=>{let t=(0,Z.l)(e,r);return t instanceof H.RM?e:t})();return new D.zX(n,{docsPath:t,...r})}(i,{...t,account:P,chain:e.chain})}}async function es(e,t){let{batchSize:r=1024,wait:n=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:s,blockTag:a="latest",data:i,multicallAddress:o,to:c}=t,u=o;if(!u){if(!e.chain)throw new U.YE;u=(0,K.M)({blockNumber:s,chain:e.chain,contract:"multicall3"})}let l=(s?(0,J.cK)(s):void 0)||a,{schedule:d}=(0,ee.u)({id:`${e.uid}.${l}`,wait:n,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,Y.p)({abi:S.v2,args:[r],functionName:"aggregate3"}),s=await e.request({method:"eth_call",params:[{data:n,to:u},l]});return(0,L.e)({abi:S.v2,args:[r],functionName:"aggregate3",data:s||"0x"})}}),[{returnData:p,success:f}]=await d({data:i,to:c});if(!f)throw new D.$S({data:p});return"0x"===p?{data:void 0}:{data:p}}},62813:(e,t,r)=>{r.d(t,{r:()=>s});var n=r(81867);async function s(e,{address:t,blockNumber:r,blockTag:s="latest"}){let a=r?(0,n.cK)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,a||s]}))}},97903:(e,t,r)=>{r.d(t,{J:()=>c});var n=r(6319),s=r(90154),a=r(18105),i=r(45735),o=r(74736);async function c(e,t){let{abi:r,address:c,args:u,functionName:l,...d}=t,p=(0,s.p)({abi:r,args:u,functionName:l});try{let{data:t}=await (0,i.T)(e,o.T,"call")({...d,data:p,to:c});return(0,n.e)({abi:r,args:u,functionName:l,data:t||"0x"})}catch(e){throw(0,a.j)(e,{abi:r,address:c,args:u,docsPath:"/docs/contract/readContract",functionName:l})}}},46753:(e,t,r)=>{r.d(t,{D:()=>n});let n=(0,r(51835).x)({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}})},41136:(e,t,r)=>{r.d(t,{Ag:()=>a,Rm:()=>c,SJ:()=>o,oX:()=>i,v2:()=>n});let n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],s=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],a=[...s,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],i=[...s,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],c=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}]},43782:(e,t,r)=>{r.d(t,{J9:()=>a,Mc:()=>s,fD:()=>n});let n={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},s={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},51101:(e,t,r)=>{r.d(t,{eL:()=>n,pj:()=>a,sz:()=>s});let n={gwei:9,wei:18},s={ether:-9,wei:9},a={ether:-18,gwei:-9}},43047:(e,t,r)=>{r.d(t,{Iy:()=>c,Iz:()=>h,MR:()=>b,Nc:()=>l,O:()=>u,Wq:()=>f,YE:()=>p,YF:()=>o,YW:()=>i,d_:()=>w,dm:()=>v,gH:()=>d,j:()=>g,nK:()=>y,nM:()=>m});var n=r(48480),s=r(13269),a=r(33671);class i extends a.C{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class o extends a.C{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class c extends a.C{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.A)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class u extends a.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class l extends a.C{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}. Expected length: ${e} Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends a.C{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,s.E)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class p extends a.C{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. Expected length (params): ${e} Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class f extends a.C{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. Make sure you are using the correct ABI and that the error exists on it. You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class h extends a.C{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class b extends a.C{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. Cannot decode function result without knowing what the parameter types are. Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class m extends a.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.B)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.B)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class y extends a.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class g extends a.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class v extends a.C{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class w extends a.C{constructor(e){super(`"${e}" is not a valid definition type. Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}},95989:(e,t,r)=>{r.d(t,{M:()=>s});var n=r(33671);class s extends n.C{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},33671:(e,t,r)=>{r.d(t,{C:()=>a});let n="2.21.54",s={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};class a extends Error{constructor(e,t={}){let r=t.cause instanceof a?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof a&&t.cause.docsPath||t.docsPath,o=s.getDocsUrl?.({...t,docsPath:i});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...s.version?[`Version: ${s.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},83740:(e,t,r)=>{r.d(t,{EH:()=>a,YE:()=>o,jF:()=>i,rj:()=>s});var n=r(33671);class s extends n.C{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class a extends n.C{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class i extends n.C{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends n.C{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}},73186:(e,t,r)=>{r.d(t,{zX:()=>y,bG:()=>g,M:()=>v,rR:()=>w,Po:()=>$,$S:()=>x});var n=r(17162),s=r(43782),a=r(95737),i=r(48480),o=r(6044);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,o.A)(t[r]):t[r]}`).join(", ")})`}var u=r(58390),l=r(33731),d=r(74349),p=r(43047),f=r(33671),h=r(25124),b=r(14005),m=r(81796);class y extends f.C{constructor(e,{account:t,docsPath:r,chain:s,data:a,gas:i,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:p,to:f,value:m,stateOverride:y}){let g=t?(0,n.J)(t):void 0,v=(0,b.aO)({from:g?.address,to:f,value:void 0!==m&&`${(0,l.c)(m)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:i,gasPrice:void 0!==o&&`${(0,d.Q)(o)} gwei`,maxFeePerGas:void 0!==c&&`${(0,d.Q)(c)} gwei`,maxPriorityFeePerGas:void 0!==u&&`${(0,d.Q)(u)} gwei`,nonce:p});y&&(v+=` ${(0,h.uj)(y)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class g extends f.C{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:s,functionName:a,sender:o}){let l=(0,u.iY)({abi:t,args:r,name:a}),d=l?c({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,p=l?(0,i.B)(l,{includeName:!0}):void 0,f=(0,b.aO)({address:n&&(0,m.R)(n),function:p,args:d&&"()"!==d&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],f&&"Contract Call:",f].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=a,this.sender=o}}class v extends f.C{constructor({abi:e,data:t,functionName:r,message:n}){let o,u,l,d,f;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:o}=f=(0,a.W)({abi:e,data:t});if("Error"===n)l=o[0];else if("Panic"===n){let[e]=o;l=s.fD[e]}else{let e=r?(0,i.B)(r,{includeName:!0}):void 0,t=r&&o?c({abiItem:r,args:o,includeFunctionName:!1,includeName:!1}):void 0;u=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else n&&(l=n);o instanceof p.Wq&&(d=o.signature,u=[`Unable to decode signature "${d}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${d}.`]),super(l&&"execution reverted"!==l||d?[`The contract function "${r}" reverted with the following ${d?"signature":"reason"}:`,l||d].join("\n"):`The contract function "${r}" reverted.`,{cause:o,metaMessages:u,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=f,this.reason=l,this.signature=d}}class w extends f.C{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class $ extends f.C{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class x extends f.C{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},50387:(e,t,r)=>{r.d(t,{Fl:()=>a,NV:()=>i,ii:()=>s});var n=r(33671);class s extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class a extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class i extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}},41690:(e,t,r)=>{r.d(t,{Ty:()=>s,u:()=>i,xO:()=>a});var n=r(33671);class s extends n.C{constructor({max:e,min:t,signed:r,size:n,value:s}){super(`Number "${s}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class a extends n.C{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class i extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},63115:(e,t,r)=>{r.d(t,{A7:()=>a,BG:()=>i,Fo:()=>f,K0:()=>c,Oh:()=>u,RM:()=>m,jj:()=>o,k5:()=>d,lN:()=>b,lY:()=>p,uC:()=>h,vW:()=>l});var n=r(74349),s=r(33671);class a extends s.C{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class i extends s.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(i,"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 o extends s.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(o,"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 s.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}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 s.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. Try 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 l extends s.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends s.C{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(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class p extends s.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}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 f extends s.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class h extends s.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class b extends s.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(b,"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 m extends s.C{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},36280:(e,t,r)=>{r.d(t,{Ci:()=>i,J8:()=>o,MU:()=>c});var n=r(6044),s=r(33671),a=r(81796);class i extends s.C{constructor({body:e,cause:t,details:r,headers:s,status:i,url:o}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,a.I)(o)}`,e&&`Request body: ${(0,n.A)(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=s,this.status=i,this.url=o}}class o extends s.C{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.I)(r)}`,`Request body: ${(0,n.A)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class c extends s.C{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.I)(t)}`,`Request body: ${(0,n.A)(e)}`],name:"TimeoutError"})}}},61678:(e,t,r)=>{r.d(t,{CL:()=>c,D5:()=>l,Di:()=>p,Gi:()=>u,MI:()=>E,RV:()=>x,Sf:()=>$,XU:()=>o,YW:()=>b,ab:()=>m,bq:()=>d,ch:()=>M,hA:()=>f,qZ:()=>h,s0:()=>y,sV:()=>w,vx:()=>v,xQ:()=>g,xq:()=>P});var n=r(33671),s=r(36280);class a extends n.C{constructor(e,{code:t,docsPath:r,metaMessages:n,name:a,shortMessage:i}){super(i,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:a||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=a||e.name,this.code=e instanceof s.J8?e.code:t??-1}}class i extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends a{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends a{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends a{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends a{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class p extends a{constructor(e){super(e,{code:p.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends a{constructor(e){super(e,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class h extends a{constructor(e){super(e,{code:h.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class b extends a{constructor(e){super(e,{code:b.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class m extends a{constructor(e,{method:t}={}){super(e,{code:m.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not implemented.`})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends a{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g extends a{constructor(e){super(e,{code:g.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends i{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends i{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 $ extends i{constructor(e,{method:t}={}){super(e,{code:$.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty($,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class x extends i{constructor(e){super(e,{code:x.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class P extends i{constructor(e){super(e,{code:P.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class M extends i{constructor(e){super(e,{code:M.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class E extends a{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},25124:(e,t,r)=>{r.d(t,{Hi:()=>s,ft:()=>a,uj:()=>o});var n=r(33671);class s extends n.C{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class a extends n.C{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function i(e){return e.reduce((e,{slot:t,value:r})=>`${e} ${t}: ${r} `,"")}function o(e){return e.reduce((e,{address:t,...r})=>{let n=`${e} ${t}: `;return r.nonce&&(n+=` nonce: ${r.nonce} `),r.balance&&(n+=` balance: ${r.balance} `),r.code&&(n+=` code: ${r.code} `),r.state&&(n+=" state:\n",n+=i(r.state)),r.stateDiff&&(n+=" stateDiff:\n",n+=i(r.stateDiff)),n}," State Override:\n").slice(0,-1)}},14005:(e,t,r)=>{r.d(t,{$s:()=>u,Kc:()=>d,Kz:()=>l,Vg:()=>c,WA:()=>p,aO:()=>i,n3:()=>o});var n=r(33731),s=r(74349),a=r(33671);function i(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")}class o extends a.C{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}class c extends a.C{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",i(e),"}","","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 u extends a.C{constructor(e,{account:t,docsPath:r,chain:a,data:o,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:p,to:f,value:h}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",i({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:f,value:void 0!==h&&`${(0,n.c)(h)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:c,gasPrice:void 0!==u&&`${(0,s.Q)(u)} gwei`,maxFeePerGas:void 0!==l&&`${(0,s.Q)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,s.Q)(d)} gwei`,nonce:p})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class l extends a.C{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:s}){let a="Transaction";r&&void 0!==s&&(a=`Transaction at block time "${r}" at index "${s}"`),e&&void 0!==s&&(a=`Transaction at block hash "${e}" at index "${s}"`),t&&void 0!==s&&(a=`Transaction at block number "${t}" at index "${s}"`),n&&(a=`Transaction with hash "${n}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}class d extends a.C{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class p extends a.C{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},81796:(e,t,r)=>{r.d(t,{I:()=>s,R:()=>n});let n=e=>e,s=e=>e},28956:(e,t,r)=>{r.d(t,{n:()=>b});var n=r(43047),s=r(7270),a=r(52857),i=r(13269),o=r(11050),c=r(28464),u=r(41690),l=r(67900),d=r(81867);function p(e,t={}){void 0!==t.size&&(0,l.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,l.ME)(r,t)}var f=r(24453),h=r(44009);function b(e,t){let r="string"==typeof t?(0,f.aT)(t):t,b=(0,a.l)(r);if(0===(0,i.E)(r)&&e.length>0)throw new n.O;if((0,i.E)(t)&&32>(0,i.E)(t))throw new n.Iy({data:"string"==typeof t?t:(0,d.My)(t),params:e,size:(0,i.E)(t)});let y=0,g=[];for(let t=0;t!e),a=s?[]:{},i=0;if(m(r)){let o=n+p(t.readBytes(32));for(let n=0;n1||r[0]>1)throw new u.xO(r);return!!r[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,s]=t.type.split("bytes");if(!s){let t=p(e.readBytes(32));e.setPosition(r+t);let n=p(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let s=e.readBytes(n);return e.setPosition(r+32),[(0,d.My)(s),32]}return[(0,d.My)(e.readBytes(Number.parseInt(s),32)),32]}(t,r,{staticPosition:a});if(r.type.startsWith("uint")||r.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256"),s=e.readBytes(32);return[n>48?function(e,t={}){void 0!==t.size&&(0,l.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,l.uU)(r,t)}(s,{signed:r}):p(s,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=p(e.readBytes(32));e.setPosition(t+r);let n=p(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let s=e.readBytes(n,32),a=function(e,t={}){let r=e;return void 0!==t.size&&((0,l.Sl)(r,{size:t.size}),r=(0,c.B)(r,{dir:"right"})),new TextDecoder().decode(r)}((0,c.B)(s));return e.setPosition(t+32),[a,32]}(t,{staticPosition:a});throw new n.j(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(b,r,{staticPosition:0});y+=i,g.push(a)}return g}function m(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(m);let r=(0,h.k)(e.type);return!!(r&&m({...e,type:r[1]}))}},95737:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(43782),s=r(43047),a=r(11050),i=r(35528),o=r(28956),c=r(48480);function u(e){let{abi:t,data:r}=e,u=(0,a.di)(r,0,4);if("0x"===u)throw new s.O;let l=[...t||[],n.Mc,n.J9].find(e=>"error"===e.type&&u===(0,i.V)((0,c.B)(e)));if(!l)throw new s.Wq(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,o.n)(l.inputs,(0,a.di)(r,4)):void 0,errorName:l.name}}},6319:(e,t,r)=>{r.d(t,{e:()=>o});var n=r(43047),s=r(28956),a=r(58390);let i="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:r,functionName:o,data:c}=e,u=t[0];if(o){let e=(0,a.iY)({abi:t,args:r,name:o});if(!e)throw new n.Iz(o,{docsPath:i});u=e}if("function"!==u.type)throw new n.Iz(void 0,{docsPath:i});if(!u.outputs)throw new n.MR(u.name,{docsPath:i});let l=(0,s.n)(u.outputs,c);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},44009:(e,t,r)=>{r.d(t,{h:()=>h,k:()=>m});var n=r(43047),s=r(95989),a=r(33671),i=r(41690),o=r(88234),c=r(65224),u=r(64213),l=r(13269),d=r(11050),p=r(81867);let f=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function h(e,t){if(e.length!==t.length)throw new n.YE({expectedLength:e.length,givenLength:t.length});let r=b(function({params:e,values:t}){let r=[];for(let h=0;h0?(0,c.xW)([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,c.xW)(o.map(({encoded:e})=>e))}}(r,{length:s,param:{...t,type:a}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,s=[];for(let a=0;ae))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,o.P)(e))throw new s.M({address:e});return{dynamic:!1,encoded:(0,u.db)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new a.C(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.db)((0,p.$P)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=f.exec(t.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,s=t?-n-1n:0n;if(e>n||e{r.d(t,{p:()=>l});var n=r(65224),s=r(44009),a=r(43047),i=r(35528),o=r(48480),c=r(58390);let u="/docs/contract/encodeFunctionData";function l(e){let{args:t}=e,{abi:r,functionName:l}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:r,functionName:n}=e,s=t[0];if(n){let e=(0,c.iY)({abi:t,args:r,name:n});if(!e)throw new a.Iz(n,{docsPath:u});s=e}if("function"!==s.type)throw new a.Iz(void 0,{docsPath:u});return{abi:[s],functionName:(0,i.V)((0,o.B)(s))}}(e),d=r[0],p="inputs"in d&&d.inputs?(0,s.h)(d.inputs,t??[]):void 0;return(0,n.aP)([l,p??"0x"])}},48480:(e,t,r)=>{r.d(t,{A:()=>a,B:()=>s});var n=r(43047);function s(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.d_(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${a(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},58390:(e,t,r)=>{r.d(t,{iY:()=>c});var n=r(43047),s=r(14329),a=r(88234);let i=r(22421).k;var o=r(35528);function c(e){let t;let{abi:r,args:c=[],name:u}=e,l=(0,s.q)(u,{strict:!1}),d=r.filter(e=>l?"function"===e.type?(0,o.V)(e)===u:"event"===e.type&&i(e)===u:"name"in e&&e.name===u);if(0!==d.length){if(1===d.length)return d[0];for(let e of d)if("inputs"in e){if(!c||0===c.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===c.length&&c.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,s=r.type;switch(s){case"address":return(0,a.P)(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===s&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(s))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(s))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(s))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:s.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=function e(t,r,n){for(let s in t){let i=t[s],o=r[s];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return e(i.components,o.components,n[s]);let c=[i.type,o.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,a.P)(n[s],{strict:!1}))return c}}(e.inputs,t.inputs,c);if(r)throw new n.nM({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}return t||d[0]}}},7270:(e,t,r)=>{r.d(t,{b:()=>l,o:()=>u});var n=r(95989),s=r(24453),a=r(99039),i=r(53124),o=r(88234);let c=new i.A(8192);function u(e,t){if(c.has(`${e}.${t}`))return c.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,a.S)((0,s.Af)(r),"bytes"),i=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&n[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let o=`0x${i.join("")}`;return c.set(`${e}.${t}`,o),o}function l(e,t){if(!(0,o.P)(e,{strict:!1}))throw new n.M({address:e});return u(e,t)}},88234:(e,t,r)=>{r.d(t,{P:()=>o});var n=r(53124),s=r(7270);let a=/^0x[a-fA-F0-9]{40}$/,i=new n.A(8192);function o(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(i.has(n))return i.get(n);let o=!!a.test(e)&&(e.toLowerCase()===e||!r||(0,s.o)(e)===e);return i.set(n,o),o}},51835:(e,t,r)=>{r.d(t,{x:()=>n});function n(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}},26418:(e,t,r)=>{r.d(t,{M:()=>s});var n=r(83740);function s({blockNumber:e,chain:t,contract:r}){let s=t?.contracts?.[r];if(!s)throw new n.rj({chain:t,contract:{name:r}});if(e&&s.blockCreated&&s.blockCreated>e)throw new n.rj({blockNumber:e,chain:t,contract:{name:r,blockCreated:s.blockCreated}});return s.address}},52857:(e,t,r)=>{r.d(t,{l:()=>c});var n=r(33671);class s extends n.C{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class a extends n.C{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class i extends n.C{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}let o={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 i({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new a({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new s({offset:e});let 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 s({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let 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,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function c(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(o);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}},65224:(e,t,r)=>{function n(e){return"string"==typeof e[0]?s(e):function(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(e)}function s(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}r.d(t,{aP:()=>s,xW:()=>n})},14329:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},64213:(e,t,r)=>{r.d(t,{db:()=>a,eV:()=>s});var n=r(50387);function s(e,{dir:t,size:r=32}={}){return"string"==typeof e?a(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.Fl({size:e.length,targetSize:r,type:"bytes"});let s=new Uint8Array(r);for(let n=0;n2*r)throw new n.Fl({size:Math.ceil(s.length/2),targetSize:r,type:"hex"});return`0x${s["right"===t?"padEnd":"padStart"](2*r,"0")}`}},13269:(e,t,r)=>{r.d(t,{E:()=>s});var n=r(14329);function s(e){return(0,n.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},11050:(e,t,r)=>{r.d(t,{A1:()=>u,di:()=>i});var n=r(50387),s=r(14329),a=r(13269);function i(e,t,r,{strict:n}={}){return(0,s.q)(e,{strict:!1})?function(e,t,r,{strict:n}={}){o(e,t);let s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&c(s,t,r),s}(e,t,r,{strict:n}):u(e,t,r,{strict:n})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,a.E)(e)-1)throw new n.ii({offset:t,position:"start",size:(0,a.E)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,a.E)(e)!==r-t)throw new n.ii({offset:r,position:"end",size:(0,a.E)(e)})}function u(e,t,r,{strict:n}={}){o(e,t);let s=e.slice(t,r);return n&&c(s,t,r),s}},28464:(e,t,r)=>{r.d(t,{B:()=>n});function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,s=0;for(let e=0;e{r.d(t,{IQ:()=>l,ME:()=>u,Sl:()=>o,uU:()=>c});var n=r(41690),s=r(13269),a=r(28464),i=r(24453);function o(e,{size:t}){if((0,s.E)(e)>t)throw new n.u({givenSize:(0,s.E)(e),maxSize:t})}function c(e,t={}){let{signed:r}=t;t.size&&o(e,{size:t.size});let n=BigInt(e);if(!r)return n;let s=(e.length-2)/2;return n<=(1n<<8n*BigInt(s)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*s,"f")}`)-1n}function u(e,t={}){return Number(c(e,t))}function l(e,t={}){let r=(0,i.aT)(e);return t.size&&(o(r,{size:t.size}),r=(0,a.B)(r,{dir:"right"})),new TextDecoder().decode(r)}},24453:(e,t,r)=>{r.d(t,{Af:()=>f,ZJ:()=>u,aT:()=>p});var n=r(33671),s=r(14329),a=r(64213),i=r(67900),o=r(81867);let c=new TextEncoder;function u(e,t={}){return"number"==typeof e||"bigint"==typeof e?p((0,o.cK)(e,t)):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,i.Sl)(r,{size:t.size}),(0,a.eV)(r,{size:t.size})):r}(e,t):(0,s.q)(e)?p(e,t):f(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function p(e,t={}){let r=e;t.size&&((0,i.Sl)(r,{size:t.size}),r=(0,a.eV)(r,{dir:"right",size:t.size}));let s=r.slice(2);s.length%2&&(s=`0${s}`);let o=s.length/2,c=new Uint8Array(o);for(let e=0,t=0;e{r.d(t,{$P:()=>c,My:()=>u,cK:()=>l,i3:()=>p,nj:()=>o});var n=r(41690),s=r(64213),a=r(67900);let i=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?p(e,t):"boolean"==typeof e?c(e,t):u(e,t)}function c(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.Sl)(r,{size:t.size}),(0,s.eV)(r,{size:t.size})):r}function u(e,t={}){let r="";for(let t=0;tr||o{r.d(t,{j:()=>o});var n=r(43047),s=r(33671),a=r(73186),i=r(61678);function o(e,{abi:t,address:r,args:o,docsPath:c,functionName:u,sender:l}){let{code:d,data:p,message:f,shortMessage:h}=e instanceof a.$S?e:e instanceof s.C?e.walk(e=>"data"in e)||e.walk():{},b=e instanceof n.O?new a.rR({functionName:u}):[3,i.bq.code].includes(d)&&(p||f||h)?new a.M({abi:t,data:"object"==typeof p?p.data:p,functionName:u,message:h??f}):e;return new a.bG(b,{abi:t,args:o,contractAddress:r,docsPath:c,functionName:u,sender:l})}},73611:(e,t,r)=>{r.d(t,{l:()=>a});var n=r(33671),s=r(63115);function a(e,t){let r=(e.details||"").toLowerCase(),a=e instanceof n.C?e.walk(e=>e?.code===s.A7.code):e;return a instanceof n.C?new s.A7({cause:e,message:a.details}):s.A7.nodeMessage.test(r)?new s.A7({cause:e,message:e.details}):s.BG.nodeMessage.test(r)?new s.BG({cause:e,maxFeePerGas:t?.maxFeePerGas}):s.jj.nodeMessage.test(r)?new s.jj({cause:e,maxFeePerGas:t?.maxFeePerGas}):s.K0.nodeMessage.test(r)?new s.K0({cause:e,nonce:t?.nonce}):s.Oh.nodeMessage.test(r)?new s.Oh({cause:e,nonce:t?.nonce}):s.vW.nodeMessage.test(r)?new s.vW({cause:e,nonce:t?.nonce}):s.k5.nodeMessage.test(r)?new s.k5({cause:e}):s.lY.nodeMessage.test(r)?new s.lY({cause:e,gas:t?.gas}):s.Fo.nodeMessage.test(r)?new s.Fo({cause:e,gas:t?.gas}):s.uC.nodeMessage.test(r)?new s.uC({cause:e}):s.lN.nodeMessage.test(r)?new s.lN({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new s.RM({cause:e})}},96610:(e,t,r)=>{r.d(t,{o:()=>n});function n(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let s of Object.keys(n))s in e&&(r[s]=e[s]),n[s]&&"object"==typeof n[s]&&!Array.isArray(n[s])&&t(n[s])}(t(e||{})),r}},30352:(e,t,r)=>{r.d(t,{Bv:()=>a});var n=r(81867);let s={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e){let t={};return void 0!==e.authorizationList&&(t.authorizationList=e.authorizationList.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:(0,n.cK)(e.chainId),nonce:(0,n.cK)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.cK)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.cK)(e.v)}:{}}))),void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,n.My)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,n.cK)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,n.cK)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,n.cK)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,n.cK)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,n.cK)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,n.cK)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=s[e.type]),void 0!==e.value&&(t.value=(0,n.cK)(e.value)),t}},45735:(e,t,r)=>{r.d(t,{T:()=>n});function n(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let s=e[r];return"function"==typeof s?s:r=>t(e,r)}},99039:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(6942),s=r(14329),a=r(24453),i=r(81867);function o(e,t){let r=(0,n.lY)((0,s.q)(e,{strict:!1})?(0,a.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,i.nj)(r)}},35528:(e,t,r)=>{r.d(t,{V:()=>a});var n=r(11050),s=r(22421);let a=e=>(0,n.di)((0,s.k)(e),0,4)},22421:(e,t,r)=>{r.d(t,{k:()=>d});var n=r(24453),s=r(99039);let a=e=>(0,s.S)((0,n.ZJ)(e));var i=r(29081);let o=/^tuple(?(\[(\d*)\])*)$/;function c(e){let t="",r=e.length;for(let n=0;n(function(e){let t=!0,r="",n=0,s="",a=!1;for(let i=0;i{r.d(t,{A:()=>n});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}},9704:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(54584);let s=new Map;function a({fn:e,id:t,shouldSplitBatch:r,wait:a=0,sort:i}){let o=async()=>{let t=l();c();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{i&&Array.isArray(e)&&e.sort(i);for(let r=0;r{for(let r=0;rs.delete(t),u=()=>l().map(({args:e})=>e),l=()=>s.get(t)||[],d=e=>s.set(t,[...l(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:s,reject:i}=(0,n.Y)();return(r?.([...u(),e])&&o(),l().length>0)?d({args:e,resolve:s,reject:i}):(d({args:e,resolve:s,reject:i}),setTimeout(o,a)),t}}}},54584:(e,t,r)=>{r.d(t,{Y:()=>n});function n(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}},45736:(e,t,r)=>{r.d(t,{yH:()=>u});var n=r(95989),s=r(50387),a=r(25124),i=r(88234),o=r(81867);function c(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new s.NV({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new s.NV({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function u(e){if(!e)return;let t={};for(let{address:r,...s}of e){if(!(0,i.P)(r,{strict:!1}))throw new n.M({address:r});if(t[r])throw new a.Hi({address:r});t[r]=function(e){let{balance:t,nonce:r,state:n,stateDiff:s,code:i}=e,u={};if(void 0!==i&&(u.code=i),void 0!==t&&(u.balance=(0,o.cK)(t)),void 0!==r&&(u.nonce=(0,o.cK)(r)),void 0!==n&&(u.state=c(n)),void 0!==s){if(u.state)throw new a.ft;u.stateDiff=c(s)}return u}(s)}return t}},6044:(e,t,r)=>{r.d(t,{A:()=>n});let n=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},498:(e,t,r)=>{r.d(t,{c:()=>u});var n=r(17162);let s=2n**256n-1n;var a=r(95989),i=r(63115),o=r(14005),c=r(88234);function u(e){let{account:t,gasPrice:r,maxFeePerGas:u,maxPriorityFeePerGas:l,to:d}=e,p=t?(0,n.J)(t):void 0;if(p&&!(0,c.P)(p.address))throw new a.M({address:p.address});if(d&&!(0,c.P)(d))throw new a.M({address:d});if(void 0!==r&&(void 0!==u||void 0!==l))throw new o.n3;if(u&&u>s)throw new i.BG({maxFeePerGas:u});if(l&&u&&l>u)throw new i.lN({maxFeePerGas:u,maxPriorityFeePerGas:l})}},33731:(e,t,r)=>{r.d(t,{c:()=>a});var n=r(51101),s=r(42328);function a(e,t="wei"){return(0,s.J)(e,n.eL[t])}},74349:(e,t,r)=>{r.d(t,{Q:()=>a});var n=r(51101),s=r(42328);function a(e,t="wei"){return(0,s.J)(e,n.sz[t])}},42328:(e,t,r)=>{r.d(t,{J:()=>n});function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[s,a]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return a=a.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${a?`.${a}`:""}`}}}]);