@tuwaio/satellite-evm 1.0.0-fix-test-alpha.38.1ece594 → 1.0.0-fix-test-alpha.40.87c8147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export{P as ccipRequest,O as offchainLookup,N as offchainLookupAbiItem,M as offchainLookupSignature}from'./chunk-5KBZWYCA.mjs';import'./chunk-LHUJBWEN.mjs';import'./chunk-6R4Y2ZVK.mjs';//# sourceMappingURL=ccip-NFEWBVRI.mjs.map
2
+ //# sourceMappingURL=ccip-NFEWBVRI.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"ccip-MFP7TFQ2.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ccip-NFEWBVRI.mjs"}
@@ -1,6 +1,6 @@
1
1
  import {a,s,r,f,k as k$1,o,i,p,g as g$1,j as j$1,l,b as b$1,c,d,e}from'./chunk-LHUJBWEN.mjs';var cr="1.1.0";var x=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${cr}`].join(`
2
2
  `);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t;}};function I(e,t){return e.exec(t)?.groups}var _t=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Wt=/^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)?$/,Ue=/^\(.+?\).*?$/;var fr=/^tuple(?<array>(\[(\d*)\])*)$/;function He(e){let t=e.type;if(fr.test(e.type)&&"components"in e){t="(";let n=e.components.length;for(let o=0;o<n;o++){let i=e.components[o];t+=He(i),o<n-1&&(t+=", ");}let r=I(fr,e.type);return t+=`)${r?.array??""}`,He({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function oe(e){let t="",n=e.length;for(let r=0;r<n;r++){let o=e[r];t+=He(o),r!==n-1&&(t+=", ");}return t}function qt(e){return e.type==="function"?`function ${e.name}(${oe(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${oe(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${oe(e.inputs)})`:e.type==="error"?`error ${e.name}(${oe(e.inputs)})`:e.type==="constructor"?`constructor(${oe(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var pr=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function dr(e){return pr.test(e)}function lr(e){return I(pr,e)}var mr=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function br(e){return mr.test(e)}function yr(e){return I(mr,e)}var hr=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function xr(e){return hr.test(e)}function gr(e){return I(hr,e)}var wr=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Ne(e){return wr.test(e)}function vr(e){return I(wr,e)}var $r=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function Ar(e){return $r.test(e)}function Pr(e){return I($r,e)}var Ir=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function Mr(e){return Ir.test(e)}function Er(e){return I(Ir,e)}var Ko=/^receive\(\) external payable$/;function Tr(e){return Ko.test(e)}var Sr=new Set(["indexed"]),Le=new Set(["calldata","memory","storage"]);var De=class extends x{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},Ge=class extends x{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};var Ve=class extends x{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},_e=class extends x{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},We=class extends x{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},qe=class extends x{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Ze=class extends x{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};var j=class extends x{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Je=class extends x{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Ke=class extends x{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};var Xe=class extends x{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};var Ye=class extends x{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};function Br(e,t,n){let r="";if(n)for(let o of Object.entries(n)){if(!o)continue;let i="";for(let s of o[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;r+=`(${o[0]}{${i}})`;}return t?`${t}:${e}${r}`:e}var Qe=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:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);function Rr(e,t={}){if(xr(e))return Xo(e,t);if(br(e))return Yo(e,t);if(dr(e))return Qo(e,t);if(Ar(e))return es(e,t);if(Mr(e))return ts(e);if(Tr(e))return {type:"receive",stateMutability:"payable"};throw new Je({signature:e})}function Xo(e,t={}){let n=gr(e);if(!n)throw new j({signature:e,type:"function"});let r=T(n.parameters),o=[],i=r.length;for(let a=0;a<i;a++)o.push(V(r[a],{modifiers:Le,structs:t,type:"function"}));let s=[];if(n.returns){let a=T(n.returns),c=a.length;for(let f=0;f<c;f++)s.push(V(a[f],{modifiers:Le,structs:t,type:"function"}));}return {name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:s}}function Yo(e,t={}){let n=yr(e);if(!n)throw new j({signature:e,type:"event"});let r=T(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(V(r[s],{modifiers:Sr,structs:t,type:"event"}));return {name:n.name,type:"event",inputs:o}}function Qo(e,t={}){let n=lr(e);if(!n)throw new j({signature:e,type:"error"});let r=T(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(V(r[s],{structs:t,type:"error"}));return {name:n.name,type:"error",inputs:o}}function es(e,t={}){let n=Pr(e);if(!n)throw new j({signature:e,type:"constructor"});let r=T(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(V(r[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function ts(e){let t=Er(e);if(!t)throw new j({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}var ns=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,rs=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,os=/^u?int$/;function V(e,t){let n=Br(e,t?.type,t?.structs);if(Qe.has(n))return Qe.get(n);let r=Ue.test(e),o=I(r?rs:ns,e);if(!o)throw new Ve({param:e});if(o.name&&is(o.name))throw new _e({param:e,name:o.name});let i=o.name?{name:o.name}:{},s=o.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,f={};if(r){c="tuple";let m=T(o.type),l=[],d=m.length;for(let y=0;y<d;y++)l.push(V(m[y],{structs:a}));f={components:l};}else if(o.type in a)c="tuple",f={components:a[o.type]};else if(os.test(o.type))c=`${o.type}256`;else if(o.type==="address payable")c="address";else if(c=o.type,t?.type!=="struct"&&!Zt(c))throw new Ge({type:c});if(o.modifier){if(!t?.modifiers?.has?.(o.modifier))throw new We({param:e,type:t?.type,modifier:o.modifier});if(Le.has(o.modifier)&&!as(c,!!o.array))throw new qe({param:e,type:t?.type,modifier:o.modifier})}let p={type:`${c}${o.array??""}`,...i,...s,...f};return Qe.set(n,p),p}function T(e,t=[],n="",r=0){let o=e.trim().length;for(let i=0;i<o;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return r===0?T(a,[...t,n.trim()]):T(a,t,`${n}${s}`,r);case "(":return T(a,t,`${n}${s}`,r+1);case ")":return T(a,t,`${n}${s}`,r-1);default:return T(a,t,`${n}${s}`,r)}}if(n==="")return t;if(r!==0)throw new Ye({current:n,depth:r});return t.push(n.trim()),t}function Zt(e){return e==="address"||e==="bool"||e==="function"||e==="string"||_t.test(e)||Wt.test(e)}var ss=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function is(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||_t.test(e)||Wt.test(e)||ss.test(e)}function as(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function jr(e){let t={},n=e.length;for(let s=0;s<n;s++){let a=e[s];if(!Ne(a))continue;let c=vr(a);if(!c)throw new j({signature:a,type:"struct"});let f=c.properties.split(";"),p=[],m=f.length;for(let l=0;l<m;l++){let y=f[l].trim();if(!y)continue;let P=V(y,{type:"struct"});p.push(P);}if(!p.length)throw new Ke({signature:a});t[c.name]=p;}let r={},o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){let[a,c]=o[s];r[a]=Or(c,t);}return r}var us=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Or(e,t,n=new Set){let r=[],o=e.length;for(let i=0;i<o;i++){let s=e[i];if(Ue.test(s.type))r.push(s);else {let c=I(us,s.type);if(!c?.type)throw new Ze({abiParameter:s});let{array:f,type:p}=c;if(p in t){if(n.has(p))throw new Xe({type:p});r.push({...s,type:`tuple${f??""}`,components:Or(t[p]??[],t,new Set([...n,p]))});}else if(Zt(p))r.push(s);else throw new De({type:p})}}return r}function et(e){let t=jr(e),n=[],r=e.length;for(let o=0;o<r;o++){let i=e[o];Ne(i)||n.push(Rr(i,t));}return n}var zr="0.1.1";function Fr(){return zr}var Ie=class e extends Error{constructor(t,n={}){let r=(()=>{if(n.cause instanceof e){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:n.cause?.message?n.cause.message:n.details})(),o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,s=`https://oxlib.sh${o??""}`,a=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||o?["",r?`Details: ${r}`:void 0,o?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
3
- `);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${Fr()}`}),this.cause=n.cause,this.details=r,this.docs=s,this.docsPath=o,this.shortMessage=t;}walk(t){return kr(this,t)}};function kr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?kr(e.cause,t):t?null:e}function Cr(e,t={}){let{dir:n,size:r=32}=t;if(r===0)return e;let o=e.replace("0x","");if(o.length>r*2)throw new tt({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return `0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function S(e,t={}){let{signed:n,size:r}=t,o=BigInt(e),i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<s){let f=typeof e=="bigint"?"n":"";throw new Kt({max:i?`${i}${f}`:void 0,min:`${s}${f}`,signed:n,size:r,value:`${e}${f}`})}let c=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?ps(c,r):c}function ps(e,t){return Cr(e,{dir:"left",size:t})}var Kt=class extends Ie{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number \`${i}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}};var tt=class extends Ie{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};function Ur(e){return {address:e.address,amount:S(e.amount),index:S(e.index),validatorIndex:S(e.validatorIndex)}}function Hr(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:S(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:S(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:S(e.gasLimit)},...typeof e.number=="bigint"&&{number:S(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:S(e.prevRandao)},...typeof e.time=="bigint"&&{time:S(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Ur)}}}function se(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var Xt=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],nt=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];var Lr="0x82ad56cb";var Dr="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Gr="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";var Vr="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";var Yt="2.37.8";var Qt={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Yt}`};var u=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=Qt.getDocsUrl?.({...n,docsPath:o}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...Qt.version?[`Version: ${Qt.version}`]:[]].join(`
3
+ `);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${Fr()}`}),this.cause=n.cause,this.details=r,this.docs=s,this.docsPath=o,this.shortMessage=t;}walk(t){return kr(this,t)}};function kr(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?kr(e.cause,t):t?null:e}function Cr(e,t={}){let{dir:n,size:r=32}=t;if(r===0)return e;let o=e.replace("0x","");if(o.length>r*2)throw new tt({size:Math.ceil(o.length/2),targetSize:r,type:"Hex"});return `0x${o[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function S(e,t={}){let{signed:n,size:r}=t,o=BigInt(e),i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<s){let f=typeof e=="bigint"?"n":"";throw new Kt({max:i?`${i}${f}`:void 0,min:`${s}${f}`,signed:n,size:r,value:`${e}${f}`})}let c=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?ps(c,r):c}function ps(e,t){return Cr(e,{dir:"left",size:t})}var Kt=class extends Ie{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number \`${i}\` is not in safe${o?` ${o*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}};var tt=class extends Ie{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};function Ur(e){return {address:e.address,amount:S(e.amount),index:S(e.index),validatorIndex:S(e.validatorIndex)}}function Hr(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:S(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:S(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:S(e.gasLimit)},...typeof e.number=="bigint"&&{number:S(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:S(e.prevRandao)},...typeof e.time=="bigint"&&{time:S(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(Ur)}}}function se(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var Xt=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],nt=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];var Lr="0x82ad56cb";var Dr="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Gr="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";var Vr="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";var Yt="2.38.0";var Qt={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Yt}`};var u=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=Qt.getDocsUrl?.({...n,docsPath:o}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...Qt.version?[`Version: ${Qt.version}`]:[]].join(`
4
4
  `);super(s,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Yt;}walk(t){return _r(this,t)}};function _r(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?_r(e.cause,t):t?null:e}var Y=class extends u{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"});}};var Me=class extends u{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}};var rt={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Wr={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function B(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new st(e.type);return `${e.name}(${ot(e.inputs,{includeName:t})})`}function ot(e,{includeName:t=false}={}){return e?e.map(n=>ms(n,{includeName:t})).join(t?", ":","):""}function ms(e,{includeName:t}){return e.type.startsWith("tuple")?`(${ot(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function M(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function h(e){return M(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var it=class extends u{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
5
5
  `),{docsPath:t,name:"AbiConstructorNotFoundError"});}},Ee=class extends u{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
6
6
  `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}};var at=class extends u{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
@@ -32,5 +32,5 @@ ${vo(d)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
32
32
  `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(he,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});var xe=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(xe,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});var ge=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(ge,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});var we=class extends u{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(we,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});var J=class extends u{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${L(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${L(r)} gwei`:""}).`].join(`
33
33
  `),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(J,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var ve=class extends u{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};var ke=class extends u{constructor({body:t,cause:n,details:r,headers:o,status:i,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${te(s)}`,t&&`Request body: ${W(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=o,this.status=i,this.url=s;}};var zt=class extends u{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${te(r)}`,`Request body: ${W(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=n.code,this.data=n.data;}};var To=class extends u{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${te(n)}`,`Request body: ${W(t)}`],name:"TimeoutError"});}};var Ys=-1,w=class extends u{constructor(t,{code:n,docsPath:r,metaMessages:o,name:i,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:o||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof zt?t.code:n??Ys;}},$=class extends w{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=n.data;}},yn=class e extends w{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(yn,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var hn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(hn,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var xn=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`});}};Object.defineProperty(xn,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var gn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
34
34
  `)});}};Object.defineProperty(gn,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var wn=class e extends w{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(wn,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var vn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
35
- `)});}};Object.defineProperty(vn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var $n=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty($n,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var An=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(An,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var Pn=class e extends w{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Pn,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var In=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`});}};Object.defineProperty(In,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var Mn=class e extends w{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Mn,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var En=class e extends w{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(En,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var Tn=class e extends ${constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Tn,"code",{enumerable:true,configurable:true,writable:true,value:4001});var Sn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Sn,"code",{enumerable:true,configurable:true,writable:true,value:4100});var Bn=class e extends ${constructor(t,{method:n}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`});}};Object.defineProperty(Bn,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Rn=class e extends ${constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty(Rn,"code",{enumerable:true,configurable:true,writable:true,value:4900});var jn=class e extends ${constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:4901});var On=class e extends ${constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(On,"code",{enumerable:true,configurable:true,writable:true,value:4902});var zn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(zn,"code",{enumerable:true,configurable:true,writable:true,value:5700});var Fn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Fn,"code",{enumerable:true,configurable:true,writable:true,value:5710});var kn=class e extends ${constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(kn,"code",{enumerable:true,configurable:true,writable:true,value:5720});var Cn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(Cn,"code",{enumerable:true,configurable:true,writable:true,value:5730});var Un=class e extends ${constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Un,"code",{enumerable:true,configurable:true,writable:true,value:5740});var Hn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Hn,"code",{enumerable:true,configurable:true,writable:true,value:5750});var Nn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Nn,"code",{enumerable:true,configurable:true,writable:true,value:5760});var So=class extends w{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};function Bo(e,t){let n=(e.details||"").toLowerCase(),r=e instanceof u?e.walk(o=>o?.code===D.code):e;return r instanceof u?new D({cause:e,message:r.details}):D.nodeMessage.test(n)?new D({cause:e,message:e.details}):Z.nodeMessage.test(n)?new Z({cause:e,maxFeePerGas:t?.maxFeePerGas}):le.nodeMessage.test(n)?new le({cause:e,maxFeePerGas:t?.maxFeePerGas}):me.nodeMessage.test(n)?new me({cause:e,nonce:t?.nonce}):be.nodeMessage.test(n)?new be({cause:e,nonce:t?.nonce}):ye.nodeMessage.test(n)?new ye({cause:e,nonce:t?.nonce}):he.nodeMessage.test(n)?new he({cause:e}):xe.nodeMessage.test(n)?new xe({cause:e,gas:t?.gas}):ge.nodeMessage.test(n)?new ge({cause:e,gas:t?.gas}):we.nodeMessage.test(n)?new we({cause:e}):J.nodeMessage.test(n)?new J({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new ve({cause:e})}function Ro(e,{docsPath:t,...n}){let r=(()=>{let o=Bo(e,n);return o instanceof ve?e:o})();return new Rt(r,{docsPath:t,...n})}function jo(e,{format:t}){if(!t)return {};let n={};function r(i){let s=Object.keys(i);for(let a of s)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a]);}let o=t(e||{});return r(o),n}var Qs={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Oo(e){let t={};return typeof e.authorizationList<"u"&&(t.authorizationList=ei(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>E(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=b(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=b(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=b(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=b(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=b(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=b(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=Qs[e.type]),typeof e.value<"u"&&(t.value=b(e.value)),t}function ei(e){return e.map(t=>({address:t.address,r:t.r?b(BigInt(t.r)):t.r,s:t.s?b(BigInt(t.s)):t.s,chainId:b(t.chainId),nonce:b(t.nonce),...typeof t.yParity<"u"?{yParity:b(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:b(t.v)}:{}}))}function zo(){let e=()=>{},t=()=>{};return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}var Ln=new Map;function Fo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){let i=async()=>{let p=c();s();let m=p.map(({args:l})=>l);m.length!==0&&e(m).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let d=0;d<p.length;d++){let{resolve:y}=p[d];y?.([l[d],l]);}}).catch(l=>{for(let d=0;d<p.length;d++){let{reject:y}=p[d];y?.(l);}});},s=()=>Ln.delete(t),a=()=>c().map(({args:p})=>p),c=()=>Ln.get(t)||[],f=p=>Ln.set(t,[...c(),p]);return {flush:s,async schedule(p){let{promise:m,resolve:l,reject:d}=zo();return n?.([...a(),p])&&i(),c().length>0?(f({args:p,resolve:l,reject:d}),m):(f({args:p,resolve:l,reject:d}),setTimeout(i,r),m)}}}function ko(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Re({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Re({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function ti(e){let{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=b(t)),n!==void 0&&(s.nonce=b(n)),r!==void 0&&(s.state=ko(r)),o!==void 0){if(s.state)throw new St;s.stateDiff=ko(o);}return s}function Co(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!g(n,{strict:false}))throw new A({address:n});if(t[n])throw new Tt({address:n});t[n]=ti(r);}return t}var Uo=2n**256n-1n;function Ho(e){let{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:o,to:i}=e,s=t?se(t):void 0;if(s&&!g(s.address))throw new A({address:s.address});if(i&&!g(i))throw new A({address:i});if(typeof n<"u"&&(typeof r<"u"||typeof o<"u"))throw new Bt;if(r&&r>Uo)throw new Z({maxFeePerGas:r});if(o&&r&&o>r)throw new J({maxFeePerGas:r,maxPriorityFeePerGas:o})}async function No(e,t){let{account:n=e.account,authorizationList:r,batch:o=!!e.batch?.multicall,blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:f,code:p,data:m,factory:l,factoryData:d,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:re,value:_o,stateOverride:Wo,...qo}=t,qn=n?se(n):void 0;if(p&&(l||d))throw new u("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&re)throw new u("Cannot provide both `code` & `to` as parameters.");let Zn=p&&m,Jn=l&&d&&re&&m,Kn=Zn||Jn,Zo=Zn?Lo({code:p,data:m}):Jn?oi({data:m,factory:l,factoryData:d,to:re}):m;try{Ho(t);let Pe=(typeof i=="bigint"?b(i):void 0)||s,K=f?Hr(f):void 0,X=Co(Wo),Xn=e.chain?.formatters?.transactionRequest?.format,Ht=(Xn||Oo)({...jo(qo,{format:Xn}),from:qn?.address,accessList:a,authorizationList:r,blobs:c,data:Zo,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:Kn?void 0:re,value:_o});if(o&&ni({request:Ht})&&!X&&!K)try{return await ri(e,{...Ht,blockNumber:i,blockTag:s})}catch(G){if(!(G instanceof Me)&&!(G instanceof Y))throw G}let Jo=(()=>{let G=[Ht,Pe];return X&&K?[...G,X,K]:X?[...G,X]:K?[...G,{},K]:G})(),Yn=await e.request({method:"eth_call",params:Jo});return Yn==="0x"?{data:void 0}:{data:Yn}}catch(Ut){let Pe=si(Ut),{offchainLookup:K,offchainLookupSignature:X}=await import('./ccip-MFP7TFQ2.mjs');if(e.ccipRead!==false&&Pe?.slice(0,10)===X&&re)return {data:await K(e,{data:Pe,to:re})};throw Kn&&Pe?.slice(0,10)==="0x101bb98d"?new jt({factory:l}):Ro(Ut,{...t,account:qn,chain:e.chain})}}function ni({request:e}){let{data:t,to:n,...r}=e;return !(!t||t.startsWith(Lr)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function ri(e,t){let{batchSize:n=1024,deployless:r=false,wait:o=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",data:a,to:c}=t,f=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Eo({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Me})(),m=(typeof i=="bigint"?b(i):void 0)||s,{schedule:l}=Fo({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(P){return P.reduce((ne,{data:Ae})=>ne+(Ae.length-2),0)>n*2},fn:async P=>{let $e=P.map(Ce=>({allowFailure:true,callData:Ce.data,target:Ce.to})),ne=Mo({abi:Xt,args:[$e],functionName:"aggregate3"}),Ae=await e.request({method:"eth_call",params:[{...f===null?{data:Lo({code:Vr,data:ne})}:{to:f,data:ne}},m]});return Ao({abi:Xt,args:[$e],functionName:"aggregate3",data:Ae||"0x"})}}),[{returnData:d,success:y}]=await l({data:a,to:c});if(!y)throw new Ot({data:d});return d==="0x"?{data:void 0}:{data:d}}function Lo(e){let{code:t,data:n}=e;return bn({abi:et(["constructor(bytes, bytes)"]),bytecode:Dr,args:[t,n]})}function oi(e){let{data:t,factory:n,factoryData:r,to:o}=e;return bn({abi:et(["constructor(address, bytes, address, bytes)"]),bytecode:Gr,args:[o,t,n,r]})}function si(e){if(!(e instanceof u))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var Ft=class extends u{constructor({callbackSelector:t,cause:n,data:r,extraData:o,sender:i,urls:s}){super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],n.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${te(a)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"});}},kt=class extends u{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${te(n)}`,`Response: ${W(t)}`],name:"OffchainLookupResponseMalformedError"});}},Ct=class extends u{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};function Do(e,t){if(!g(e,{strict:false}))throw new A({address:e});if(!g(t,{strict:false}))throw new A({address:t});return e.toLowerCase()===t.toLowerCase()}function Go(e){let{abi:t,data:n}=e,r=O(n,0,4),o=t.find(i=>i.type==="function"&&r===F(B(i)));if(!o)throw new lt(r,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?de(o.inputs,O(n,4)):void 0}}var Dn="/docs/contract/encodeErrorResult";function Gn(e){let{abi:t,errorName:n,args:r}=e,o=t[0];if(n){let c=q({abi:t,args:r,name:n});if(!c)throw new Te(n,{docsPath:Dn});o=c;}if(o.type!=="error")throw new Te(void 0,{docsPath:Dn});let i=B(o),s=F(i),a="0x";if(r&&r.length>0){if(!o.inputs)throw new pt(o.name,{docsPath:Dn});a=C(o.inputs,r);}return ee([s,a])}var Vn="/docs/contract/encodeFunctionResult";function Vo(e){let{abi:t,functionName:n,result:r}=e,o=t[0];if(n){let s=q({abi:t,name:n});if(!s)throw new R(n,{docsPath:Vn});o=s;}if(o.type!=="function")throw new R(void 0,{docsPath:Vn});if(!o.outputs)throw new ae(o.name,{docsPath:Vn});let i=(()=>{if(o.outputs.length===0)return [];if(o.outputs.length===1)return [r];if(Array.isArray(r))return r;throw new ue(r)})();return C(o.outputs,i)}var _n="x-batch-gateway:true";async function Wn(e){let{data:t,ccipRequest:n}=e,{args:[r]}=Go({abi:nt,data:t}),o=[],i=[];return await Promise.all(r.map(async(s,a)=>{try{i[a]=s.urls.includes(_n)?await Wn({data:s.data,ccipRequest:n}):await n(s),o[a]=!1;}catch(c){o[a]=true,i[a]=ii(c);}})),Vo({abi:nt,functionName:"query",result:[o,i]})}function ii(e){return e.name==="HttpRequestError"&&e.status?Gn({abi:nt,errorName:"HttpError",args:[e.status,e.shortMessage]}):Gn({abi:[rt],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var nd="0x556f1830",ai={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function rd(e,{blockNumber:t,blockTag:n,data:r,to:o}){let{args:i}=mo({data:r,abi:[ai]}),[s,a,c,f,p]=i,{ccipRead:m}=e,l=m&&typeof m?.request=="function"?m.request:ui;try{if(!Do(o,s))throw new Ct({sender:s,to:o});let d=a.includes(_n)?await Wn({data:c,ccipRequest:l}):await l({data:c,sender:s,urls:a}),{data:y}=await No(e,{blockNumber:t,blockTag:n,data:N([f,C([{type:"bytes"},{type:"bytes"}],[d,p])]),to:o});return y}catch(d){throw new Ft({callbackSelector:f,cause:d,data:r,extraData:p,sender:s,urls:a})}}async function ui({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let o=0;o<n.length;o++){let i=n[o],s=i.includes("{data}")?"GET":"POST",a=s==="POST"?{data:e,sender:t}:void 0,c=s==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(i.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(a),headers:c,method:s}),p;if(f.headers.get("Content-Type")?.startsWith("application/json")?p=(await f.json()).data:p=await f.text(),!f.ok){r=new ke({body:a,details:p?.error?W(p.error):f.statusText,headers:f.headers,status:f.status,url:i});continue}if(!M(p)){r=new kt({result:p,url:i});continue}return p}catch(f){r=new ke({body:a,details:f.message,url:i});}}throw r}export{Rn as A,jn as B,On as C,zn as D,Fn as E,kn as F,Cn as G,Un as H,Hn as I,Nn as J,So as K,Fo as L,nd as M,ai as N,rd as O,ui as P,u as a,K0 as b,b as c,rn as d,fe as e,Da as f,W as g,Et as h,ke as i,zt as j,To as k,yn as l,hn as m,xn as n,gn as o,wn as p,vn as q,$n as r,An as s,Pn as t,In as u,Mn as v,En as w,Tn as x,Sn as y,Bn as z};//# sourceMappingURL=chunk-BLGEEG7L.mjs.map
36
- //# sourceMappingURL=chunk-BLGEEG7L.mjs.map
35
+ `)});}};Object.defineProperty(vn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var $n=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty($n,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var An=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(An,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var Pn=class e extends w{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Pn,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var In=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`});}};Object.defineProperty(In,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var Mn=class e extends w{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Mn,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var En=class e extends w{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(En,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var Tn=class e extends ${constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Tn,"code",{enumerable:true,configurable:true,writable:true,value:4001});var Sn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Sn,"code",{enumerable:true,configurable:true,writable:true,value:4100});var Bn=class e extends ${constructor(t,{method:n}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`});}};Object.defineProperty(Bn,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Rn=class e extends ${constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty(Rn,"code",{enumerable:true,configurable:true,writable:true,value:4900});var jn=class e extends ${constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:4901});var On=class e extends ${constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(On,"code",{enumerable:true,configurable:true,writable:true,value:4902});var zn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(zn,"code",{enumerable:true,configurable:true,writable:true,value:5700});var Fn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Fn,"code",{enumerable:true,configurable:true,writable:true,value:5710});var kn=class e extends ${constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(kn,"code",{enumerable:true,configurable:true,writable:true,value:5720});var Cn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(Cn,"code",{enumerable:true,configurable:true,writable:true,value:5730});var Un=class e extends ${constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Un,"code",{enumerable:true,configurable:true,writable:true,value:5740});var Hn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Hn,"code",{enumerable:true,configurable:true,writable:true,value:5750});var Nn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Nn,"code",{enumerable:true,configurable:true,writable:true,value:5760});var So=class extends w{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};function Bo(e,t){let n=(e.details||"").toLowerCase(),r=e instanceof u?e.walk(o=>o?.code===D.code):e;return r instanceof u?new D({cause:e,message:r.details}):D.nodeMessage.test(n)?new D({cause:e,message:e.details}):Z.nodeMessage.test(n)?new Z({cause:e,maxFeePerGas:t?.maxFeePerGas}):le.nodeMessage.test(n)?new le({cause:e,maxFeePerGas:t?.maxFeePerGas}):me.nodeMessage.test(n)?new me({cause:e,nonce:t?.nonce}):be.nodeMessage.test(n)?new be({cause:e,nonce:t?.nonce}):ye.nodeMessage.test(n)?new ye({cause:e,nonce:t?.nonce}):he.nodeMessage.test(n)?new he({cause:e}):xe.nodeMessage.test(n)?new xe({cause:e,gas:t?.gas}):ge.nodeMessage.test(n)?new ge({cause:e,gas:t?.gas}):we.nodeMessage.test(n)?new we({cause:e}):J.nodeMessage.test(n)?new J({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new ve({cause:e})}function Ro(e,{docsPath:t,...n}){let r=(()=>{let o=Bo(e,n);return o instanceof ve?e:o})();return new Rt(r,{docsPath:t,...n})}function jo(e,{format:t}){if(!t)return {};let n={};function r(i){let s=Object.keys(i);for(let a of s)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a]);}let o=t(e||{});return r(o),n}var Qs={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Oo(e,t){let n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ei(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>E(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=b(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=b(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=b(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=b(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=b(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=b(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Qs[e.type]),typeof e.value<"u"&&(n.value=b(e.value)),n}function ei(e){return e.map(t=>({address:t.address,r:t.r?b(BigInt(t.r)):t.r,s:t.s?b(BigInt(t.s)):t.s,chainId:b(t.chainId),nonce:b(t.nonce),...typeof t.yParity<"u"?{yParity:b(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:b(t.v)}:{}}))}function zo(){let e=()=>{},t=()=>{};return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}var Ln=new Map;function Fo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){let i=async()=>{let p=c();s();let m=p.map(({args:l})=>l);m.length!==0&&e(m).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let d=0;d<p.length;d++){let{resolve:y}=p[d];y?.([l[d],l]);}}).catch(l=>{for(let d=0;d<p.length;d++){let{reject:y}=p[d];y?.(l);}});},s=()=>Ln.delete(t),a=()=>c().map(({args:p})=>p),c=()=>Ln.get(t)||[],f=p=>Ln.set(t,[...c(),p]);return {flush:s,async schedule(p){let{promise:m,resolve:l,reject:d}=zo();return n?.([...a(),p])&&i(),c().length>0?(f({args:p,resolve:l,reject:d}),m):(f({args:p,resolve:l,reject:d}),setTimeout(i,r),m)}}}function ko(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Re({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Re({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function ti(e){let{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=b(t)),n!==void 0&&(s.nonce=b(n)),r!==void 0&&(s.state=ko(r)),o!==void 0){if(s.state)throw new St;s.stateDiff=ko(o);}return s}function Co(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!g(n,{strict:false}))throw new A({address:n});if(t[n])throw new Tt({address:n});t[n]=ti(r);}return t}var Uo=2n**256n-1n;function Ho(e){let{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:o,to:i}=e,s=t?se(t):void 0;if(s&&!g(s.address))throw new A({address:s.address});if(i&&!g(i))throw new A({address:i});if(typeof n<"u"&&(typeof r<"u"||typeof o<"u"))throw new Bt;if(r&&r>Uo)throw new Z({maxFeePerGas:r});if(o&&r&&o>r)throw new J({maxFeePerGas:r,maxPriorityFeePerGas:o})}async function No(e,t){let{account:n=e.account,authorizationList:r,batch:o=!!e.batch?.multicall,blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:f,code:p,data:m,factory:l,factoryData:d,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:re,value:_o,stateOverride:Wo,...qo}=t,qn=n?se(n):void 0;if(p&&(l||d))throw new u("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&re)throw new u("Cannot provide both `code` & `to` as parameters.");let Zn=p&&m,Jn=l&&d&&re&&m,Kn=Zn||Jn,Zo=Zn?Lo({code:p,data:m}):Jn?oi({data:m,factory:l,factoryData:d,to:re}):m;try{Ho(t);let Pe=(typeof i=="bigint"?b(i):void 0)||s,K=f?Hr(f):void 0,X=Co(Wo),Xn=e.chain?.formatters?.transactionRequest?.format,Ht=(Xn||Oo)({...jo(qo,{format:Xn}),from:qn?.address,accessList:a,authorizationList:r,blobs:c,data:Zo,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:Kn?void 0:re,value:_o},"call");if(o&&ni({request:Ht})&&!X&&!K)try{return await ri(e,{...Ht,blockNumber:i,blockTag:s})}catch(G){if(!(G instanceof Me)&&!(G instanceof Y))throw G}let Jo=(()=>{let G=[Ht,Pe];return X&&K?[...G,X,K]:X?[...G,X]:K?[...G,{},K]:G})(),Yn=await e.request({method:"eth_call",params:Jo});return Yn==="0x"?{data:void 0}:{data:Yn}}catch(Ut){let Pe=si(Ut),{offchainLookup:K,offchainLookupSignature:X}=await import('./ccip-NFEWBVRI.mjs');if(e.ccipRead!==false&&Pe?.slice(0,10)===X&&re)return {data:await K(e,{data:Pe,to:re})};throw Kn&&Pe?.slice(0,10)==="0x101bb98d"?new jt({factory:l}):Ro(Ut,{...t,account:qn,chain:e.chain})}}function ni({request:e}){let{data:t,to:n,...r}=e;return !(!t||t.startsWith(Lr)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function ri(e,t){let{batchSize:n=1024,deployless:r=false,wait:o=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",data:a,to:c}=t,f=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Eo({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Me})(),m=(typeof i=="bigint"?b(i):void 0)||s,{schedule:l}=Fo({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(P){return P.reduce((ne,{data:Ae})=>ne+(Ae.length-2),0)>n*2},fn:async P=>{let $e=P.map(Ce=>({allowFailure:true,callData:Ce.data,target:Ce.to})),ne=Mo({abi:Xt,args:[$e],functionName:"aggregate3"}),Ae=await e.request({method:"eth_call",params:[{...f===null?{data:Lo({code:Vr,data:ne})}:{to:f,data:ne}},m]});return Ao({abi:Xt,args:[$e],functionName:"aggregate3",data:Ae||"0x"})}}),[{returnData:d,success:y}]=await l({data:a,to:c});if(!y)throw new Ot({data:d});return d==="0x"?{data:void 0}:{data:d}}function Lo(e){let{code:t,data:n}=e;return bn({abi:et(["constructor(bytes, bytes)"]),bytecode:Dr,args:[t,n]})}function oi(e){let{data:t,factory:n,factoryData:r,to:o}=e;return bn({abi:et(["constructor(address, bytes, address, bytes)"]),bytecode:Gr,args:[o,t,n,r]})}function si(e){if(!(e instanceof u))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var Ft=class extends u{constructor({callbackSelector:t,cause:n,data:r,extraData:o,sender:i,urls:s}){super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],n.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${te(a)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"});}},kt=class extends u{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${te(n)}`,`Response: ${W(t)}`],name:"OffchainLookupResponseMalformedError"});}},Ct=class extends u{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};function Do(e,t){if(!g(e,{strict:false}))throw new A({address:e});if(!g(t,{strict:false}))throw new A({address:t});return e.toLowerCase()===t.toLowerCase()}function Go(e){let{abi:t,data:n}=e,r=O(n,0,4),o=t.find(i=>i.type==="function"&&r===F(B(i)));if(!o)throw new lt(r,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?de(o.inputs,O(n,4)):void 0}}var Dn="/docs/contract/encodeErrorResult";function Gn(e){let{abi:t,errorName:n,args:r}=e,o=t[0];if(n){let c=q({abi:t,args:r,name:n});if(!c)throw new Te(n,{docsPath:Dn});o=c;}if(o.type!=="error")throw new Te(void 0,{docsPath:Dn});let i=B(o),s=F(i),a="0x";if(r&&r.length>0){if(!o.inputs)throw new pt(o.name,{docsPath:Dn});a=C(o.inputs,r);}return ee([s,a])}var Vn="/docs/contract/encodeFunctionResult";function Vo(e){let{abi:t,functionName:n,result:r}=e,o=t[0];if(n){let s=q({abi:t,name:n});if(!s)throw new R(n,{docsPath:Vn});o=s;}if(o.type!=="function")throw new R(void 0,{docsPath:Vn});if(!o.outputs)throw new ae(o.name,{docsPath:Vn});let i=(()=>{if(o.outputs.length===0)return [];if(o.outputs.length===1)return [r];if(Array.isArray(r))return r;throw new ue(r)})();return C(o.outputs,i)}var _n="x-batch-gateway:true";async function Wn(e){let{data:t,ccipRequest:n}=e,{args:[r]}=Go({abi:nt,data:t}),o=[],i=[];return await Promise.all(r.map(async(s,a)=>{try{i[a]=s.urls.includes(_n)?await Wn({data:s.data,ccipRequest:n}):await n(s),o[a]=!1;}catch(c){o[a]=true,i[a]=ii(c);}})),Vo({abi:nt,functionName:"query",result:[o,i]})}function ii(e){return e.name==="HttpRequestError"&&e.status?Gn({abi:nt,errorName:"HttpError",args:[e.status,e.shortMessage]}):Gn({abi:[rt],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var nd="0x556f1830",ai={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function rd(e,{blockNumber:t,blockTag:n,data:r,to:o}){let{args:i}=mo({data:r,abi:[ai]}),[s,a,c,f,p]=i,{ccipRead:m}=e,l=m&&typeof m?.request=="function"?m.request:ui;try{if(!Do(o,s))throw new Ct({sender:s,to:o});let d=a.includes(_n)?await Wn({data:c,ccipRequest:l}):await l({data:c,sender:s,urls:a}),{data:y}=await No(e,{blockNumber:t,blockTag:n,data:N([f,C([{type:"bytes"},{type:"bytes"}],[d,p])]),to:o});return y}catch(d){throw new Ft({callbackSelector:f,cause:d,data:r,extraData:p,sender:s,urls:a})}}async function ui({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let o=0;o<n.length;o++){let i=n[o],s=i.includes("{data}")?"GET":"POST",a=s==="POST"?{data:e,sender:t}:void 0,c=s==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(i.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(a),headers:c,method:s}),p;if(f.headers.get("Content-Type")?.startsWith("application/json")?p=(await f.json()).data:p=await f.text(),!f.ok){r=new ke({body:a,details:p?.error?W(p.error):f.statusText,headers:f.headers,status:f.status,url:i});continue}if(!M(p)){r=new kt({result:p,url:i});continue}return p}catch(f){r=new ke({body:a,details:f.message,url:i});}}throw r}export{Rn as A,jn as B,On as C,zn as D,Fn as E,kn as F,Cn as G,Un as H,Hn as I,Nn as J,So as K,Fo as L,nd as M,ai as N,rd as O,ui as P,u as a,K0 as b,b as c,rn as d,fe as e,Da as f,W as g,Et as h,ke as i,zt as j,To as k,yn as l,hn as m,xn as n,gn as o,wn as p,vn as q,$n as r,An as s,Pn as t,In as u,Mn as v,En as w,Tn as x,Sn as y,Bn as z};//# sourceMappingURL=chunk-5KBZWYCA.mjs.map
36
+ //# sourceMappingURL=chunk-5KBZWYCA.mjs.map