1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1018],{86936:function(e,t,n){"use strict";/** 2 * @license React 3 * use-sync-external-store-shim.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var r=n(16913),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,o=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return o(function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})},[e,n,t]),s(function(){return c(i)&&l({inst:i}),e(function(){c(i)&&l({inst:i})})},[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},802:function(e,t,n){"use strict";/** 10 * @license React 11 * use-sync-external-store-shim/with-selector.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var r=n(16913),i=n(76385),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,o=r.useRef,u=r.useEffect,c=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var f=o(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;var h=s(e,(f=c(function(){function e(e){if(!u){if(u=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(s=e,o=n)}var s,o,u=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]))[0],f[1]);return u(function(){d.hasValue=!0,d.value=h},[h]),l(h),h}},76385:function(e,t,n){"use strict";e.exports=n(86936)},65478:function(e,t,n){"use strict";e.exports=n(802)},32608:function(e){var t,n,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u=[],c=!1,l=-1;function f(){c&&r&&(c=!1,r.length?u=r.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=o(f);c=!0;for(var t=u.length;t;){for(r=u,u=[];++l<t;)r&&r[l].run();l=-1,t=u.length}r=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function b(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||o(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},7531:function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Wrong positive integer: ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function a(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function s(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}n.d(t,{Gg:function(){return a},J8:function(){return s},Rx:function(){return r},aI:function(){return i}})},16515:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var r=n(7531),i=n(61299);class a extends i.kb{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,r.Gg)(this);let{view:t,buffer:n,blockLen:a}=this,s=(e=(0,i.O0)(e)).length;for(let r=0;r<s;){let o=Math.min(a-this.pos,s-r);if(o===a){let t=(0,i.GL)(e);for(;a<=s-r;r+=a)this.process(t,r);continue}n.set(e.subarray(r,r+o),this.pos),this.pos+=o,r+=o,this.pos===a&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.Gg)(this),(0,r.J8)(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:a,isLE:s}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>a-o&&(this.process(n,0),o=0);for(let e=o;e<a;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),u=r?4:0,c=r?0:4;e.setUint32(t+u,s,r),e.setUint32(t+c,o,r)}(n,a-8,BigInt(8*this.length),s),this.process(n,0);let u=(0,i.GL)(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,f=this.get();if(l>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}}},42152:function(e,t,n){"use strict";n.d(t,{J:function(){return f}});var r=n(16515),i=n(61299);let a=(e,t,n)=>e&t^~e&n,s=(e,t,n)=>e&t^e&n^t&n,o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
17734187,3204031479,3329325298]),u=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class l extends r.N{constructor(){super(64,32,8,!1),this.A=0|u[0],this.B=0|u[1],this.C=0|u[2],this.D=0|u[3],this.E=0|u[4],this.F=0|u[5],this.G=0|u[6],this.H=0|u[7]}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:s,H:o}=this;return[e,t,n,r,i,a,s,o]}set(e,t,n,r,i,a,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|a,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=c[e-15],n=c[e-2],r=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,a=(0,i.np)(n,17)^(0,i.np)(n,19)^n>>>10;c[e]=a+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:u,D:l,E:f,F:d,G:h,H:b}=this;for(let e=0;e<64;e++){let t=b+((0,i.np)(f,6)^(0,i.np)(f,11)^(0,i.np)(f,25))+a(f,d,h)+o[e]+c[e]|0,p=((0,i.np)(n,2)^(0,i.np)(n,13)^(0,i.np)(n,22))+s(n,r,u)|0;b=h,h=d,d=f,f=l+t|0,l=u,u=r,r=n,n=t+p|0}n=n+this.A|0,r=r+this.B|0,u=u+this.C|0,l=l+this.D|0,f=f+this.E|0,d=d+this.F|0,h=h+this.G|0,b=b+this.H|0,this.set(n,r,u,l,f,d,h,b)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let f=(0,i.hE)(()=>new l)},96325:function(e,t,n){"use strict";n.d(t,{fr:function(){return O}});var r=n(7531);let i=BigInt(4294967296-1),a=BigInt(32),s=(e,t,n)=>e<<n|t>>>32-n,o=(e,t,n)=>t<<n|e>>>32-n,u=(e,t,n)=>t<<n-32|e>>>64-n,c=(e,t,n)=>e<<n-32|t>>>64-n;var l=n(61299);let[f,d,h]=[[],[],[]],b=BigInt(0),p=BigInt(1),m=BigInt(2),g=BigInt(7),y=BigInt(256),v=BigInt(113);for(let e=0,t=p,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],f.push(2*(5*r+n)),d.push((e+1)*(e+2)/2%64);let i=b;for(let e=0;e<7;e++)(t=(t<<p^(t>>g)*v)%y)&m&&(i^=p<<(p<<BigInt(e))-p);h.push(i)}let[w,P]=function(e,t=!1){let n=new Uint32Array(e.length),r=new
17Uint32Array(e.length);for(let s=0;s<e.length;s++){let{h:o,l:u}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>a&i)}:{h:0|Number(e>>a&i),l:0|Number(e&i)}}(e[s],t);[n[s],r[s]]=[o,u]}return[n,r]}(h,!0),x=(e,t,n)=>n>32?u(e,t,n):s(e,t,n),$=(e,t,n)=>n>32?c(e,t,n):o(e,t,n);class E extends l.kb{constructor(e,t,n,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r.Rx)(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,l.Jq)(this.state)}keccak(){!function(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],s=n[i+1],o=x(a,s,1)^n[r],u=$(a,s,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=o,e[t+n+1]^=u}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=d[n],a=x(t,i,r),s=$(t,i,r),o=f[n];t=e[o],i=e[o+1],e[o]=a,e[o+1]=s}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=w[r],e[1]^=P[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,r.Gg)(this);let{blockLen:t,state:n}=this,i=(e=(0,l.O0)(e)).length;for(let r=0;r<i;){let a=Math.min(t-this.pos,i-r);for(let t=0;t<a;t++)n[this.pos++]^=e[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,(128&t)!=0&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,r.Gg)(this,!1),(0,r.aI)(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,r.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r.J8)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:a}=this;return e||(e=new E(t,n,r,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=a,e.destroyed=this.destroyed,e}}let O=(0,l.hE)(()=>new E(136,1,32))},61299:function(e,t,n){"use strict";n.d(t,{kb:function(){return c},GL:function(){return s},O6:function(){return f},np:function(){return o},O0:function(){return u},Jq:function(){return a},hE:function(){return l}});let r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=e=>e instanceof Uint8Array,a=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),o=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw Error("Non little-endian hardware is not supported");function u(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}(e)),!i(e))throw Error(`expected Uint8Array, got ${typeof e}`);return e}class c{clone(){return this._cloneInto()}}function l(e){let t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function f(e=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}},61365:function(e,t,n){"use strict";function r(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}n.d(t,{T:function(){return r}})},35649:function(e,t,n){"use strict";n.d(t,{O:function(){return b}});var r=n(91612),i=n(48242),a=n(88983),s=n(47566),o=n(34451),u=n(43002),c=n(3593),l=n(2436),f=n(96418),d=n(29986),h=n(7486);async function b(e,{blockNumber:t,blockTag:n,coinType:b,name:p,gatewayUrls:m,strict:g,universalResolverAddress:y}){let v=y;if(!v){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");v=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let s=(0,a.R)({abi:r.X$,functionName:"addr",...null!=b?{args:[(0,l.V)(p),BigInt(b)]}:{args:[(0,l.V)(p)]}}),c={address:v,abi:r.k3,functionName:"resolve",args:[(0,u.NC)((0,f.T)(p)),s],blockNumber:t,blockTag:n},g=(0,d.s)(e,h.L,"readContract"),y=m?await g({...c,args:[...c.args,m]}):await g(c);if("0x"===y[0])return null;let w=(0,i.k)({abi:r.X$,args:null!=b?[(0,l.V)(p),BigInt(b)]:void 0,functionName:"addr",data:y[0]});if("0x"===w||"0x00"===(0,o.f)(w))return null;return w}catch(e){if(g)throw e;if((0,c.c)(e,"resolve"))return null;throw e}}},12387:function(e,t,n){"use strict";n.d(t,{r:function(){return E}});var r=n(7486),i=n(43766);class a extends i.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class s extends i.G{constructor({reason:e}
vendor: 1,543 bytes, line 17
17){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class o extends i.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class u extends i.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}let c=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,l=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,f=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,d=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function h(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!globalThis.hasOwnProperty("Image"))return!1;return new Promise(t=>{let n=new Image;n.onload=()=>{t(!0)},n.onerror=()=>{t(!1)},n.src=e})}}function b(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function p({uri:e,gatewayUrls:t}){let n=f.test(e);
17if(n)return{uri:e,isOnChain:!0,isEncoded:n};let r=b(t?.ipfs,"https://ipfs.io"),i=b(t?.arweave,"https://arweave.net"),a=e.match(c),{protocol:s,subpath:u,target:h,subtarget:p=""}=a?.groups||{},m="ipns:/"===s||"ipns/"===u,g="ipfs:/"===s||"ipfs/"===u||l.test(e);if(e.startsWith("http")&&!m&&!g){let n=e;return t?.arweave&&(n=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:n,isOnChain:!1,isEncoded:!1}}if((m||g)&&h)return{uri:`${r}/${m?"ipns":"ipfs"}/${h}${p}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&h)return{uri:`${i}/${h}${p||""}`,isOnChain:!1,isEncoded:!1};let y=e.replace(d,"");if(y.startsWith("<svg")&&(y=`data:image/svg+xml;base64,${btoa(y)}`),y.startsWith("data:")||y.startsWith("{"))return{uri:y,isOnChain:!0,isEncoded:!1};throw new o({uri:e})}function m(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new a({data:e});return e.image||e.image_url||e.image_data}async function g({gatewayUrls:e,uri:t}){try{let n=await fetch(t).then(e=>e.json());return await y({gatewayUrls:e,uri:m(n)})}catch{throw new o({uri:t})}}async function y({gatewayUrls:e,uri:t}){let{uri:n,isOnChain:r}=p({uri:t,gatewayUrls:e});if(r||await h(n))return n;throw new o({uri:t})}async function v(e,{nft:t}){if("erc721"===t.namespace)return(0,r.L)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,r.L)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new u({namespace:t.namespace})}async function w(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?P(e,{gatewayUrls:t,record:n}):y({uri:n,gatewayUrls:t})}async function P(e,{gatewayUrls:t,record:n}){let r=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[n,r,i]=t.split("/"),[a,o]=n.split(":"),[u,c]=r.split(":");if(!a||"eip155"!==a.toLowerCase())throw new s({reason:"Only EIP-155 supported"});if(!o)throw new s({reason:"Chain ID not found"});if(!c)throw new s({reason:"Contract address not found"});if(!i)throw new s({reason:"Token ID not found"});if(!u)throw new s({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}}(n),{uri:i,isOnChain:a,isEncoded:o}=p({uri:await v(e,{nft:r}),gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return y({uri:m(JSON.parse(o?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let u=r.tokenID;return"erc1155"===r.namespace&&(u=u.replace("0x","").padStart(64,"0")),g({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,u)})}var x=n(29986),$=n(58371);async function E(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:a,strict:s,universalResolverAddress:o}){let u=await (0,x.s)(e,$.g,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:a,strict:s});if(!u)return null;try{return await w(e,{record:u,gatewayUrls:r})}catch{return null}}},51728:function(e,t,n){"use strict";n.d(t,{w:function(){return l}});var r=n(91612),i=n(47566),a=n(43002),s=n(3593),o=n(96418),u=n(29986),c=n(7486);async function l(e,{address:t,blockNumber:n,blockTag:l,gatewayUrls:f,strict:d,universalResolverAddress:h}){let b=h;if(!b){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");b=(0,i.L)({blockNumber:n,chain:e.chain,contract:"ensUniversalResolver"})}let p=`${t.toLowerCase().substring(2)}.addr.reverse`;try{let i={address:b,abi:r.du,functionName:"reverse",args:[(0,a.NC)((0,o.T)(p))],blockNumber:n,blockTag:l},s=(0,u.s)(e,c.L,"readContract"),[d,h]=f?await s({...i,args:[...i.args,f]}):await s(i);if(t.toLowerCase()!==h.toLowerCase())return null;return d}catch(e){if(d)throw e;if((0,s.c)(e,"reverse"))return null;throw e}}},64662:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var r=n(47566),i=n(43002),a=n(96418),s=n(29986),o=n(7486);async function u(e,{blockNumber:t,blockTag:n,name:u,universalResolverAddress:c}){let l=c;if(!l){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");l=(0,r.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}let[f]=await (0,s.s)(e,o.L,"readContract")({address:l,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,i.NC)((0,a.T)(u))],blockNumber:t,blockTag:n});return f}},58371:function(e,t,n){"use strict";n.d(t,{g:function(){return h}});var r=n(91612),i=n(48242),a=n(88983),s=n(47566),o=n(43002),u=n(3593),c=n(2436),l=n(96418),f=n(29986),d=n(7486);
17async function h(e,{blockNumber:t,blockTag:n,name:h,key:b,gatewayUrls:p,strict:m,universalResolverAddress:g}){let y=g;if(!y){if(!e.chain)throw Error("client chain not configured. universalResolverAddress is required.");y=(0,s.L)({blockNumber:t,chain:e.chain,contract:"ensUniversalResolver"})}try{let s={address:y,abi:r.k3,functionName:"resolve",args:[(0,o.NC)((0,l.T)(h)),(0,a.R)({abi:r.nZ,functionName:"text",args:[(0,c.V)(h),b]})],blockNumber:t,blockTag:n},u=(0,f.s)(e,d.L,"readContract"),m=p?await u({...s,args:[...s.args,p]}):await u(s);if("0x"===m[0])return null;let g=(0,i.k)({abi:r.nZ,functionName:"text",data:m[0]});return""===g?null:g}catch(e){if(m)throw e;if((0,u.c)(e,"resolve"))return null;throw e}}},40439:function(e,t,n){"use strict";n.d(t,{RE:function(){return x}});var r=n(61365),i=n(91612),a=n(89995),s=n(43766),o=n(84939),u=n(16852),c=n(76182),l=n(42566),f=n(48242),d=n(88983),h=n(39573),b=n(47566),p=n(43002),m=n(81651),g=n(43535),y=n(81755),v=n(79792),w=n(40946),P=n(169);async function x(e,t){let{account:i=e.account,batch:c=!!e.batch?.multicall,blockNumber:f,blockTag:d="latest",accessList:b,blobs:w,data:x,gas:O,gasPrice:B,maxFeePerBlobGas:G,maxFeePerGas:k,maxPriorityFeePerGas:I,nonce:j,to:C,value:T,stateOverride:F,...A}=t,N=i?(0,r.T)(i):void 0;try{(0,P.F)(t);let n=(f?(0,p.eC)(f):void 0)||d,r=function(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!(0,h.U)(n,{strict:!1}))throw new a.b({address:n});if(t[n])throw new l.Nc({address:n});t[n]=function(e){let{balance:t,nonce:n,state:r,stateDiff:i,code:a}=e,s={};if(void 0!==a&&(s.code=a),void 0!==t&&(s.balance=(0,p.eC)(t)),void 0!==n&&(s.nonce=(0,p.eC)(n)),void 0!==r&&(s.state=E(r)),void 0!==i){if(s.state)throw new l.Z8;s.stateDiff=E(i)}return s}(r)}return t}(F),i=e.chain?.formatters?.transactionRequest?.format,s=(i||v.tG)({...(0,y.K)(A,{format:i}),from:N?.address,accessList:b,blobs:w,data:x,gas:O,gasPrice:B,maxFeePerBlobGas:G,maxFeePerGas:k,maxPriorityFeePerGas:I,nonce:j,to:C,value:T});if(c&&function({request:e}){let{data:t,to:n,...r}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!n&&!(Object.values(r).filter(e=>void 0!==e).length>0)}({request:s})&&!r)try{return await $(e,{...s,blockNumber:f,blockTag:d})}catch(e){if(!(e instanceof o.pZ)&&!(e instanceof o.mm))throw e}let u=await e.request({method:"eth_call",params:r?[s,n,r]:[s,n]});if("0x"===u)return{data:void 0};return{data:u}}catch(o){let r=function(e){if(!(e instanceof s.G))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(o),{offchainLookup:i,offchainLookupSignature:a}=await n.e(9258).then(n.bind(n,29258));if(!1!==e.ccipRead&&r?.slice(0,10)===a&&C)return{data:await i(e,{data:r,to:C})};throw function(e,{docsPath:t,...n}){let r=(()=>{let t=(0,g.k)(e,n);return t instanceof m.cj?e:t})();return new u.cg(r,{docsPath:t,...n})}(o,{...t,account:N,chain:e.chain})}}async function $(e,t){let{batchSize:n=1024,wait:r=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:a,blockTag:s="latest",data:c,multicallAddress:l,to:h}=t,m=l;if(!m){if(!e.chain)throw new o.pZ;m=(0,b.L)({blockNumber:a,chain:e.chain,contract:"multicall3"})}let g=(a?(0,p.eC)(a):void 0)||s,{schedule:y}=(0,w.S)({id:`${e.uid}.${g}`,wait:r,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*n,fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,d.R)({abi:i.F8,args:[n],functionName:"aggregate3"}),a=await e.request({method:"eth_call",params:[{data:r,to:m},g]});return(0,f.k)({abi:i.F8,args:[n],functionName:"aggregate3",data:a||"0x"})}}),[{returnData:v,success:P}]=await y({data:c,to:h});if(!P)throw new u.VQ({data:v});return"0x"===v?{data:void 0}:{data:v}}function E(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:n})=>{if(66!==t.length)throw new c.W_({size:t.length,targetSize:66,type:"hex"});if(66!==n.length)throw new c.W_({size:n.length,targetSize:66,type:"hex"});return e[t]=n,e},{})}},67662:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(15389),i=n(43002),a=n(65911);async function s(e,t){let{address:n,abi:s,args:o,eventName:u,fromBlock:c,strict:l,toBlock:f}=t,d=(0,a.g)(e,{method:"eth_newFilter"}),h=u?(0,r.O)({abi:s,args:o,eventName:u}):void 0,b=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:"bigint"==typeof c?(0,i.eC)(c):c,toBlock:"bigint"==typeof f?(0,i.eC)(f):f,topics:h}]});return{abi:s,args:o,eventName:u,id:b,request:d(b),strict:!!l,type:"event"}}},93172:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(65911);async function i(e){let t=(0,r.g)(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}},54130:function(e,t,n){"use strict";n.d(t,{C:function(){return c},X:function(){return u}});var r=n(71006),i=n(29986),a=n(10972),s=n(42085),o=n(20610);async function u(e,t){return c(e,t)}async function c(e,t){let{block:n,chain:u=e.chain,request:c,type:l="eip1559"}=t||{},f=await (async()=>"function"==typeof u?.fees?.baseFeeMultiplier?u.fees.baseFeeMultiplier({block:n,client:e,request:c}):u?.fees?.baseFeeMultiplier??1.2)();if(f<1)throw new r.Fz;let d=10**(f.toString().split(".")[1]?.length??0),h=e=>e*BigInt(Math.ceil(f*d))/BigInt(d),b=n||await (0,i.s)(e,s.Q,"getBlock")({});if("function"==typeof u?.fees?.estimateFeesPerGas){let t=await u.fees.estimateFeesPerGas({block:n,client:e,multiply:h,request:c,type:l});if(null!==t)return t}if("eip1559"===l){if("bigint"!=typeof b.baseFeePerGas)throw new r.e5;let t="bigint"==typeof c?.maxPriorityFeePerGas?c.maxPriorityFeePerGas:await (0,a.h)(e,{block:b,chain:u,request:c}),n=h(b.baseFeePerGas);return{maxFeePerGas:c?.maxFeePerGas??n+t,maxPriorityFeePerGas:t}}return{gasPrice:c?.gasPrice??h(await (0,i.s)(e,o.o,"getGasPrice")({}))}}},93401:function(e,t,n){"use strict";n.d(t,{Q:function(){return m}});var r=n(61365),i=n(43002),a=n(83901),s=n(86622),o=n(43766),u=n(29620);class c extends o.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:o,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:d,to:h,value:b}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,u.xr)({from:t?.address,to:h,value:void 0!==b&&`${(0,a.d)(b)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==c&&`${(0,s.o)(c)}
17 gwei`,maxFeePerGas:void 0!==l&&`${(0,s.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==f&&`${(0,s.o)(f)} gwei`,nonce:d})].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}var l=n(81651),f=n(43535),d=n(81755),h=n(79792),b=n(169),p=n(12439);async function m(e,t){let n=t.account??e.account,a=n?(0,r.T)(n):void 0;try{let{accessList:n,blobs:r,blobVersionedHashes:s,blockNumber:o,blockTag:u,data:c,gas:l,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:P,...x}=await (0,p.Z)(e,{...t,parameters:a?.type==="local"?void 0:["blobVersionedHashes"]}),$=(o?(0,i.eC)(o):void 0)||u;(0,b.F)(t);let E=e.chain?.formatters?.transactionRequest?.format,O=(E||h.tG)({...(0,d.K)(x,{format:E}),from:a?.address,accessList:n,blobs:r,blobVersionedHashes:s,data:c,gas:l,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:g,maxPriorityFeePerGas:y,nonce:v,to:w,value:P}),B=await e.request({method:"eth_estimateGas",params:$?[O,$]:[O]});return BigInt(B)}catch(n){throw function(e,{docsPath:t,...n}){return new c((()=>{let t=(0,f.k)(e,n);return t instanceof l.cj?e:t})(),{docsPath:t,...n})}(n,{...t,account:a,chain:e.chain})}}},10972:function(e,t,n){"use strict";n.d(t,{_:function(){return u},h:function(){return c}});var r=n(71006),i=n(79291),a=n(29986),s=n(42085),o=n(20610);async function u(e,t){return c(e,t)}async function c(e,t){let{block:n,chain:u=e.chain,request:c}=t||{};if("function"==typeof u?.fees?.defaultPriorityFee){let t=n||await (0,a.s)(e,s.Q,"getBlock")({});return u.fees.defaultPriorityFee({block:t,client:e,request:c})}if(void 0!==u?.fees?.defaultPriorityFee)return u?.fees?.defaultPriorityFee;try{let t=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.y_)(t)}catch{let[t,i]=await Promise.all([n?Promise.resolve(n):(0,a.s)(e,s.Q,"getBlock")({}),(0,a.s)(e,o.o,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new r.e5;let u=i-t.baseFeePerGas;if(u<0n)return 0n;return u}}},16847:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(43002);async function i(e,{address:t,blockNumber:n,blockTag:i="latest"}){let a=n?(0,r.eC)(n):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,a||i]}))}},42085:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var r=n(28002),i=n(43002),a=n(71630);async function s(e,{blockHash:t,blockNumber:n,blockTag:s,includeTransactions:o}={}){let u=o??!1,c=void 0!==n?(0,i.eC)(n):void 0,l=null;if(!(l=t?await e.request({method:"eth_getBlockByHash",params:[t,u]}):await e.request({method:"eth_getBlockByNumber",params:[c||(s??"latest"),u]})))throw new r.f({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||a.Z)(l)}},65148:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});let r=new Map,i=new Map;async function a(e,{cacheKey:t,cacheTime:n=1/0}){let a=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,r),a=t(e,i);return{clear:()=>{n.clear(),a.clear()},promise:n,response:a}}(t),s=a.response.get();if(s&&n>0&&new Date().getTime()-s.created.getTime()<n)return s.data;let o=a.promise.get();o||(o=e(),a.promise.set(o));try{let e=await o;return a.response.set({created:new Date,data:e}),e}finally{a.promise.clear()}}let s=e=>`blockNumber.${e}`;async function o(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await a(()=>e.request({method:"eth_blockNumber"}),{cacheKey:s(e.uid),cacheTime:t}))}},5924:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});var r=n(79291),i=n(43002);async function a(e,{blockHash:t,blockNumber:n,blockTag:a="latest"}={}){let s;let o=void 0!==n?(0,i.eC)(n):void 0;return s=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||a]}),(0,r.ly)(s)}},47866:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(43002);async function i(e,{address:t,blockNumber:n,blockTag:i="latest"}){let a=void 0!==n?(0,r.eC)(n):void 0,s=await e.request({method:"eth_getCode",params:[t,a||i]});if("0x"!==s)return s}},75432:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(79291);async function i(e){let t=await e.request({method:"eth_chainId"});return(0,r.ly)(t)}},49051:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var r=n(14791),i=n(29986),a=n(52134);async function s(e,t){let{abi:n,address:s,args:o,blockHash:u,eventName:c,fromBlock:l,toBlock:f,strict:d}=t,h=c?(0,r.mE)({abi:n,name:c}):void 0,b=h?void 0:n.filter(e=>"event"===e.type);return(0,i.s)(e,a.y,"getLogs")({address:s,args:o,blockHash:u,event:h,events:b,fromBlock:l,toBlock:f,strict:d})}},88390:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(43002);async function i(e,{blockCount:t,blockNumber:n,blockTag:i="latest",rewardPercentiles:a}){var s;let o=n?(0,r.eC)(n):void 0;return{baseFeePerGas:(s=await e.request({method:"eth_feeHistory",params:[(0,r.eC)(t),o||i,a]})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:s.gasUsedRatio,oldestBlock:BigInt(s.oldestBlock),reward:s.reward?.map(e=>e.map(e=>BigInt(e)))}}},50752:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(88765),i=n(34584);async function a(e,{filter:t}){let n="strict"in t&&t.strict,a=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof a[0])return a;let s=a.map(e=>(0,i.U)(e));return"abi"in t&&t.abi?(0,r.h)({abi:t.abi,logs:s,strict:n}):s}},20610:function(e,t,n){"use strict";async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}n.d(t,{o:function(){return r}})},52134:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var r=n(15389),i=n(88765),a=n(43002),s=n(34584);async function o(e,{address:t,blockHash:n,fromBlock:o,toBlock:u,event:c,events:l,args:f,strict:d}={}){let h=l??(c?[c]:void 0),b=[];h&&(b=[h.flatMap(e=>(0,r.O)({abi:[e],eventName:e.name,args:f}))],c&&(b=b[0]));let p=(n?await e.request({method:"eth_getLogs",params:[{address:t,topics:b,blockHash:n}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:b,fromBlock:"bigint"==typeof o?(0,a.eC)(o):o,toBlock:"bigint"==typeof u?(0,a.eC)(u):u}]})).map(e=>(0,s.U)(e));return h?(0,i.h)({abi:h,logs:p,strict:d??!1}):p}},12929:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(43002),i=n(79291);async function a(e,{address:t,blockNumber:n,blockTag:a,storageKeys:s}){var o;let u=void 0!==n?(0,r.eC)(n):void 0;return{...o=await e.request({method:"eth_getProof",params:[t,s,u||(a??"latest")]}),balance:o.balance?BigInt(o.balance):void 0,nonce:o.nonce?(0,i.ly)(o.nonce):void 0,storageProof:o.storageProof?o.storageProof.map(e=>
17({...e,value:BigInt(e.value)})):void 0}}},29657:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var r=n(43002);async function i(e,{address:t,blockNumber:n,blockTag:i="latest",slot:a}){let s=void 0!==n?(0,r.eC)(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,a,s||i]})}},21977:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var r=n(29620),i=n(43002),a=n(80896);async function s(e,{blockHash:t,blockNumber:n,blockTag:s,hash:o,index:u}){let c=s||"latest",l=void 0!==n?(0,i.eC)(n):void 0,f=null;if(o?f=await e.request({method:"eth_getTransactionByHash",params:[o]}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.eC)(u)]}):(l||c)&&(f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,(0,i.eC)(u)]})),!f)throw new r.Bh({blockHash:t,blockNumber:n,blockTag:c,hash:o,index:u});return(e.chain?.formatters?.transaction?.format||a.Tr)(f)}},555:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var r=n(29986),i=n(65148),a=n(21977);async function s(e,{hash:t,transactionReceipt:n}){let[s,o]=await Promise.all([(0,r.s)(e,i.z,"getBlockNumber")({}),t?(0,r.s)(e,a.f,"getBlockNumber")({hash:t}):void 0]),u=n?.blockNumber||o?.blockNumber;return u?s-u+1n:0n}},1544:function(e,t,n){"use strict";n.d(t,{K:function(){return a}});var r=n(79291),i=n(43002);async function a(e,{address:t,blockTag:n="latest",blockNumber:a}){let s=await e.request({method:"eth_getTransactionCount",params:[t,a?(0,i.eC)(a):n]});return(0,r.ly)(s)}},5288:function(e,t,n){"use strict";n.d(t,{a:function(){return u}});var r=n(29620),i=n(79291),a=n(34584),s=n(80896);let o={"0x0":"reverted","0x1":"success"};async function u(e,{hash:t}){let n=await e.request({method:"eth_getTransactionReceipt",params:[t]});if(!n)throw new r.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||function(e){let t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,a.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,i.ly)(e.transactionIndex):null,status:e.status?o[e.status]:null,type:e.type?s.c8[e.type]||e.type:null};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),t})(n)}},50921:function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r=n(91612),i=n(39302),a=n(43766),s=n(16852),o=n(48242),u=n(88983),c=n(47566),l=n(32285),f=n(29986),d=n(7486);async function h(e,t){let{allowFailure:n=!0,batchSize:h,blockNumber:b,blockTag:p,multicallAddress:m,stateOverride:g}=t,y=t.contracts,v=h??("object"==typeof e.batch?.multicall&&e.batch.multicall.batchSize||1024),w=m;if(!w){if(!e.chain)throw Error("client chain not configured. multicallAddress is required.");w=(0,c.L)({blockNumber:b,chain:e.chain,contract:"multicall3"})}let P=[[]],x=0,$=0;for(let e=0;e<y.length;e++){let{abi:t,address:r,args:i,functionName:a}=y[e];try{let e=(0,u.R)({abi:t,args:i,functionName:a});$+=(e.length-2)/2,v>0&&$>v&&P[x].length>0&&(x++,$=(e.length-2)/2,P[x]=[]),P[x]=[...P[x],{allowFailure:!0,callData:e,target:r}]}catch(s){let e=(0,l.S)(s,{abi:t,address:r,args:i,docsPath:"/docs/contract/multicall",functionName:a});if(!n)throw e;P[x]=[...P[x],{allowFailure:!0,callData:"0x",target:r}]}}let E=await Promise.allSettled(P.map(t=>(0,f.s)(e,d.L,"readContract")({abi:r.F8,address:w,args:[t],blockNumber:b,blockTag:p,functionName:"aggregate3",stateOverride:g}))),O=[];for(let e=0;e<E.length;e++){let t=E[e];if("rejected"===t.status){if(!n)throw t.reason;for(let n=0;n<P[e].length;n++)O.push({status:"failure",error:t.reason,result:void 0});continue}let r=t.value;for(let t=0;t<r.length;t++){let{returnData:a,success:u}=r[t],{callData:c}=P[e][t],{abi:f,address:d,functionName:h,args:b}=y[O.length];try{if("0x"===c)throw new i.wb;if(!u)throw new s.VQ({data:a});let e=(0,o.k)({abi:f,args:b,data:a,functionName:h});O.push(n?{result:e,status:"success"}:e)}catch(t){let e=(0,l.S)(t,{abi:f,address:d,args:b,docsPath:"/docs/contract/multicall",functionName:h});if(!n)throw e;O.push({error:e,result:void 0,status:"failure"})}}}if(O.length!==y.length)throw new a.G("multicall results mismatch");return O}},7486:function(e,t,n){"use strict";n.d(t,{L:function(){return u}});var r=n(48242),i=n(88983),a=n(32285),s=n(29986),o=n(40439);async function u(e,t){let{abi:n,address:u,args:c,functionName:l,...f}=t,d=(0,i.R)({abi:n,args:c,functionName:l});try{let{data:t}=await (0,s.s)(e,o.RE,"call")({...f,data:d,to:u});return(0,r.k)({abi:n,args:c,functionName:l,data:t||"0x"})}catch(e){throw(0,a.S)(e,{abi:n,address:u,args:c,docsPath:"/docs/contract/readContract",functionName:l})}}},41071:function(e,t,n){"use strict";n.d(t,{a:function(){return c}});var r=n(61365),i=n(48242),a=n(88983),s=n(32285),o=n(29986),u=n(40439);async function c(e,t){let{abi:n,address:c,args:l,dataSuffix:f,functionName:d,...h}=t,b=h.account?(0,r.T)(h.account):e.account,p=(0,a.R)({abi:n,args:l,functionName:d});try{let{data:r}=await (0,o.s)(e,u.RE,"call")({batch:!1,data:`${p}${f?f.replace("0x",""):""}`,to:c,...h,account:b}),a=(0,i.k)({abi:n,args:l,functionName:d,data:r||"0x"}),s=n.filter(e=>"name"in e&&e.name===t.functionName);return{result:a,request:{abi:s,address:c,args:l,dataSuffix:f,functionName:d,...h,account:b}}}catch(e){throw(0,s.S)(e,{abi:n,address:c,args:l,docsPath:"/docs/contract/simulateContract",functionName:d,sender:b?.address})}}},49422:function(e,t,n){"use strict";async function r(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}n.d(t,{W:function(){return r}})},36403:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(91612),i=n(16852);BigInt(0),BigInt(1),BigInt(2);var a=n(93454),s=n(88265),o=n(29986),u=n(43002),c=n(47080),l=n(40439);async function f(e,{address:t,hash:n,signature:f,...d}){let h=(0,s.v)(f)?f:(0,u.NC)(f);try{let{data:i}=await (0,o.s)(e,l.RE,"call")({data:(0,c.w)({abi:r.$o,args:[t,n,h],bytecode:
vendor: 3,588 bytes, line 17
17"0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572"
17}),...d});return function(e,t){let n=(0,s.v)(e)?(0,a.O0)(e):e;return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,(0,s.v)("0x1")?(0,a.O0)("0x1"):"0x1")}(i??"0x0","0x1")}catch(e){if(e instanceof i.cg)return!1;throw e}}},63841:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(6213),i=n(93454),a=n(8441),s=n(36403);async function o(e,{address:t,message:n,signature:o,...u}){let c=function(e,t){let n="string"==typeof e?(0,i.qX)(e):e.raw instanceof Uint8Array?e.raw:(0,i.O0)(e.raw),s=(0,i.qX)(`\x19Ethereum Signed Message: 18${n.length}`);return(0,a.w)((0,r.zo)([s,n]),void 0)}(n);return(0,s.Z)(e,{address:t,hash:c,signature:o,...u})}},92186:function(e,t,n){"use strict";n.d(t,{B:function(){return l}});var r=n(43325),i=n(6213),a=n(43002),s=n(8441),o=n(61534);function u({data:e,primaryType:t,types:n}){let i=function e({data:t,primaryType:n,types:i}){let o=[{type:"bytes32"}],u=[function({primaryType:e,types:t}){let n=(0,a.NC)(function({primaryType:e,types:t}){let n="",r=function e({primaryType:t,types:n},r=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(r.has(a)||void 0===n[a])return r;for(let t of(r.add(a),n[a]))e({primaryType:t.type,types:n},r);return r}({primaryType:e,types:t});for(let i of(r.delete(e),[e,...Array.from(r).sort()]))n+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return n}({primaryType:e,types:t}));return(0,s.w)(n)}({primaryType:n,types:i})];for(let c of i[n]){let[n,l]=function t({types:n,name:i,type:o,value:u}){if(void 0!==n[o])return[{type:"bytes32"},(0,s.w)(e({data:u,primaryType:o,types:n}))];if("bytes"===o){let e=u.length%2?"0":"";return u=`0x${e+u.slice(2)}`,[{type:"bytes32"},(0,s.w)(u)]}if("string"===o)return[{type:"bytes32"},(0,s.w)((0,a.NC)(u))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),a=u.map(r=>t({name:i,type:e,types:n,value:r}));return[{type:"bytes32"},(0,s.w)((0,r.E)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:o},u]}({types:i,name:c.name,type:c.type,value:t[c.name]});o.push(n),u.push(l)}return(0,r.E)(o,u)}({data:e,primaryType:t,types:n});return(0,s.w)(i)}var c=n(36403);async function l(e,t){let{address:n,signature:r,message:a,primaryType:l,types:f,domain:d,...h}=t,b=function(e){let{domain:t={},message:n,primaryType:r}=e,a={EIP712Domain:(0,o.cj)({domain:t}),...e.types};(0,o.iC)({domain:t,message:n,primaryType:r,types:a});let c=["0x1901"];return t&&c.push(function({domain:e,types:t}){return u({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:a})),"EIP712Domain"!==r&&c.push(u({data:n,primaryType:r,types:a})),(0,s.w)((0,i.zo)(c))}({message:a,primaryType:l,types:f,domain:d});return(0,c.Z)(e,{address:n,hash:b,signature:r,...h})}},7419:function(e,t,n){"use strict";n.d(t,{e:function(){return h}});var r=n(28002),i=n(29620),a=n(29986),s=n(69509),o=n(30751),u=n(44879),c=n(42085),l=n(21977),f=n(5288),d=n(59511);async function h(e,{confirmations:t=1,hash:n,onReplaced:h,pollingInterval:b=e.pollingInterval,retryCount:p=6,retryDelay:m=({count:e})=>200*~~(1<<e),timeout:g}){let y,v,w;let P=(0,u.P)(["waitForTransactionReceipt",e.uid,n]),x=!1;return new Promise((u,$)=>{g&&setTimeout(()=>$(new i.mc({hash:n})),g);let E=(0,s.N7)(P,{onReplaced:h,resolve:u,reject:$},s=>{let u=(0,a.s)(e,d.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:b,async onBlockNumber(d){if(x)return;let h=d,b=e=>{u(),e(),E()};try{if(w){if(t>1&&(!w.blockNumber||h-w.blockNumber+1n<t))return;b(()=>s.resolve(w));return}if(y||(x=!0,await (0,o.J)(async()=>{(y=await (0,a.s)(e,l.f,"getTransaction")({hash:n})).blockNumber&&(h=y.blockNumber)},{delay:m,retryCount:p}),x=!1),w=await (0,a.s)(e,f.a,"getTransactionReceipt")({hash:n}),t>1&&(!w.blockNumber||h-w.blockNumber+1n<t))return;b(()=>s.resolve(w))}catch(n){if(n instanceof i.Bh||n instanceof i.Yb){if(!y){x=!1;return}try{v=y,x=!0;let n=await (0,o.J)(()=>(0,a.s)(e,c.Q,"getBlock")({blockNumber:h,includeTransactions:!0}),{delay:m,retryCount:p,shouldRetry:({error:e})=>e instanceof r.f});x=!1;let i=n.transactions.find(({from:e,nonce:t})=>e===v.from&&t===v.nonce);if(!i||(w=await (0,a.s)(e,f.a,"getTransactionReceipt")({hash:i.hash}),t>1&&(!w.blockNumber||h-w.blockNumber+1n<t)))return;let u="replaced";i.to===v.to&&i.value===v.value?u="repriced":i.from===i.to&&0n===i.value&&(u="cancelled"),b(()=>{s.onReplaced?.({reason:u,replacedTransaction:v,transaction:i,transactionReceipt:w}),s.resolve(w)})}catch(e){b(()=>s.reject(e))}}else b(()=>s.reject(n))}}})})})}},59511:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var r=n(79291),i=n(29986),a=n(69509),s=n(54580),o=n(44879),u=n(65148);function c(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:c,onError:l,poll:f,pollingInterval:d=e.pollingInterval}){let h;return(void 0!==f?f:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
18onfig.type))?(()=>{let r=(0,o.P)(["watchBlockNumber",e.uid,t,n,d]);return(0,a.N7)(r,{onBlockNumber:c,onError:l},r=>(0,s.$)(async()=>{try{let t=await (0,i.s)(e,u.z,"getBlockNumber")({cacheTime:0});if(h){if(t===h)return;if(t-h>1&&n)for(let e=h+1n;e<t;e++)r.onBlockNumber(e,h),h=e}(!h||t>h)&&(r.onBlockNumber(t,h),h=t)}catch(e){r.onError?.(e)}},{emitOnBegin:t,interval:d}))})():(()=>{let i=(0,o.P)(["watchBlockNumber",e.uid,t,n]);return(0,a.N7)(i,{onBlockNumber:c,onError:l},t=>{let n=!0,i=()=>n=!1;return(async()=>{try{let a=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await a.subscribe({params:["newHeads"],onData(e){if(!n)return;let i=(0,r.y_)(e.result?.number);t.onBlockNumber(i,h),h=i},onError(e){t.onError?.(e)}});i=s,n||i()}catch(e){l?.(e)}})(),()=>i()})})()}},35339:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(71630),i=n(29986),a=n(69509),s=n(54580),o=n(44879),u=n(42085);function c(e,{blockTag:t="latest",emitMissed:n=!1,emitOnBegin:c=!1,onBlock:l,onError:f,includeTransactions:d,poll:h,pollingInterval:b=e.pollingInterval}){let p,m,g;let y=void 0!==h?h:"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
18onfig.type),v=d??!1;return y?(()=>{let r=(0,o.P)(["watchBlocks",e.uid,t,n,c,v,b]);return(0,a.N7)(r,{onBlock:l,onError:f},r=>(0,s.$)(async()=>{try{let a=await (0,i.s)(e,u.Q,"getBlock")({blockTag:t,includeTransactions:v});if(a.number&&p?.number){if(a.number===p.number)return;if(a.number-p.number>1&&n)for(let t=p?.number+1n;t<a.number;t++){let n=await (0,i.s)(e,u.Q,"getBlock")({blockNumber:t,includeTransactions:v});r.onBlock(n,p),p=n}}(!p?.number||"pending"===t&&!a?.number||a.number&&a.number>p.number)&&(r.onBlock(a,p),p=a)}catch(e){r.onError?.(e)}},{emitOnBegin:c,interval:b}))})():(m=!0,g=()=>m=!1,(async()=>{try{let t=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:n}=await t.subscribe({params:["newHeads"],onData(t){if(!m)return;let n=(e.chain?.formatters?.block?.format||r.Z)(t.result);l(n,p),p=n},onError(e){f?.(e)}});g=n,m||g()}catch(e){f?.(e)}})(),()=>g())}},51688:function(e,t,n){"use strict";n.d(t,{Y:function(){return g}});var r=n(39302),i=n(47074),a=n(80664),s=n(15389),o=n(34584),u=n(29986),c=n(69509),l=n(54580),f=n(44879),d=n(67662),h=n(65148),b=n(49051),p=n(50752),m=n(49422);function g(e,t){let{abi:n,address:g,args:y,batch:v=!0,eventName:w,fromBlock:P,onError:x,onLogs:$,poll:E,pollingInterval:O=e.pollingInterval,strict:B}=t;return(void 0!==E?E:"bigint"==typeof P||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
18onfig.type))?(()=>{let t=B??!1,r=(0,f.P)(["watchContractEvent",g,y,v,e.uid,w,O,t,P]);return(0,c.N7)(r,{onLogs:$,onError:x},r=>{let a,s;void 0!==P&&(a=P-1n);let o=!1,c=(0,l.$)(async()=>{if(!o){try{s=await (0,u.s)(e,d.A,"createContractEventFilter")({abi:n,address:g,args:y,eventName:w,strict:t,fromBlock:P})}catch{}o=!0;return}try{let i;if(s)i=await (0,u.s)(e,p.K,"getFilterChanges")({filter:s});else{let r=await (0,u.s)(e,h.z,"getBlockNumber")({});i=a&&a!==r?await (0,u.s)(e,b.m,"getContractEvents")({abi:n,address:g,args:y,eventName:w,fromBlock:a+1n,toBlock:r,strict:t}):[],a=r}if(0===i.length)return;if(v)r.onLogs(i);else for(let e of i)r.onLogs([e])}catch(e){s&&e instanceof i.yR&&(o=!1),r.onError?.(e)}},{emitOnBegin:!0,interval:O});return async()=>{s&&await (0,u.s)(e,m.W,"uninstallFilter")({filter:s}),c()}})})():(()=>{let t=(0,f.P)(["watchContractEvent",g,y,v,e.uid,w,O,B??!1]),i=!0,u=()=>i=!1;return(0,c.N7)(t,{onLogs:$,onError:x},t=>((async()=>{try{let c=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=w?(0,s.O)({abi:n,eventName:w,args:y}):[],{unsubscribe:f}=await c.subscribe({params:["logs",{address:g,topics:l}],onData(e){if(!i)return;let s=e.result;try{let{eventName:e,args:r}=(0,a.F)({abi:n,data:s.data,topics:s.topics,strict:B}),i=(0,o.U)(s,{args:r,eventName:e});t.onLogs([i])}catch(a){let e,n;if(a instanceof r.SM||a instanceof r.Gy){if(B)return;e=a.abiItem.name,n=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,o.U)(s,{args:n?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});u=f,i||u()}catch(e){x?.(e)}})(),()=>u()))})()}},17892:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var r=n(29986),i=n(69509),a=n(54580),s=n(44879),o=n(93172),u=n(50752),c=n(49422);function l(e,{batch:t=!0,onError:n,onTransactions:l,poll:f,pollingInterval:d=e.pollingInterval}){let h,b;return(void 0!==f?f:"webSocket"!==e.transport.type)?(()=>{let f=(0,s.P)(["watchPendingTransactions",e.uid,t,d]);return(0,i.N7)(f,{onTransactions:l,onError:n},n=>{let i;let s=(0,a.$)(async()=>{try{if(!i)try{i=await (0,r.s)(e,o.W,"createPendingTransactionFilter")({});return}catch(e){throw s(),e}let a=await (0,r.s)(e,u.K,"getFilterChanges")({filter:i});if(0===a.length)return;if(t)n.onTransactions(a);else for(let e of a)n.onTransactions([e])}catch(e){n.onError?.(e)}},{emitOnBegin:!0,interval:d});return async()=>{i&&await (0,r.s)(e,c.W,"uninstallFilter")({filter:i}),s()}})})():(h=!0,b=()=>h=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!h)return;let t=e.result;l([t])},onError(e){n?.(e)}});b=t,h||b()}catch(e){n?.(e)}})(),()=>b())}},12439:function(e,t,n){"use strict";n.d(t,{Q:function(){return E},Z:function(){return O}});var r=n(61365),i=n(54130),a=n(93401),s=n(42085),o=n(1544),u=n(71006),c=n(93454),l=n(43002);function f(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,c.nr)(e)):e.blobs,i=[];for(let e of r)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===n?i:i.map(e=>(0,l.ci)(e))}function d(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,c.nr)(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,c.nr)(e)):e.commitments,a=[];for(let e=0;e<r.length;e++){let n=r[e],s=i[e];a.push(Uint8Array.from(t.computeBlobKzgProof(n,s)))}return"bytes"===n?a:a.map(e=>(0,l.ci)(e))}var h=n(42152),b=n(88265),p=n(43766);class m extends p.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlobSizeTooLargeError"})}}class g extends p.G{constructor(){super("Blob data must not be empty."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EmptyBlobError"})}}var y=n(19804),v=n(16425),w=n(29986),P=n(169),x=n(29620),$=n(75432);let E=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function O(e,t){let n;let{account:p=e.account,blobs:O,chain:B,chainId:G,gas:k,kzg:I,nonce:j,parameters:C=E,type:T}=t,F=p?(0,r.T)(p):void 0,A={...t,...F?{from:F?.address}:{}};async function N(){return n||(n=await (0,w.s)(e,s.Q,"getBlock")({blockTag:"latest"}))}if((C.includes("blobVersionedHashes")||C.includes("sidecars"))&&O&&I){let e=f({blobs:O,kzg:I});
18if(C.includes("blobVersionedHashes")){let t=function(e){let{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(let e of t)i.push(function(e){let{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),i=function(e,t){let n=(0,h.J)((0,b.v)(e,{strict:!1})?(0,c.O0)(e):e);return"bytes"===(t||"hex")?n:(0,l.NC)(n)}(t,"bytes");return i.set([n],0),"bytes"===r?i:(0,l.ci)(i)}({commitment:e,to:r,version:n}));return i}({commitments:e,to:"hex"});A.blobVersionedHashes=t}if(C.includes("sidecars")){let t=d({blobs:O,commitments:e,kzg:I}),n=function(e){let{data:t,kzg:n,to:r}=e,i=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?(0,c.nr)(e.data):e.data,r=(0,v.d)(n);if(!r)throw new g;if(r>761855)throw new m({maxSize:761855,size:r});let i=[],a=!0,s=0;for(;a;){let e=(0,y.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let r=n.slice(s,s+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),a=!1;break}t++,s+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,l.ci)(e.bytes))}({data:t,to:r}),a=e.commitments??f({blobs:i,kzg:n,to:r}),s=e.proofs??d({blobs:i,commitments:a,kzg:n,to:r}),o=[];for(let e=0;e<i.length;e++)o.push({blob:i[e],commitment:a[e],proof:s[e]});return o}({blobs:O,commitments:e,proofs:t,to:"hex"});A.sidecars=n}}if(C.includes("chainId")&&(B?A.chainId=B.id:void 0!==G?A.chainId=G:A.chainId=await (0,w.s)(e,$.L,"getChainId")({})),C.includes("nonce")&&void 0===j&&F&&(A.nonce=await (0,w.s)(e,o.K,"getTransactionCount")({address:F.address,blockTag:"pending"})),(C.includes("fees")||C.includes("type"))&&void 0===T)try{A.type=function(e){if(e.type)return e.type;if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new x.j3({transaction:e})}(A)}catch{let e=await N();A.type="bigint"==typeof e?.baseFeePerGas?"eip1559":"legacy"}if(C.includes("fees")){if("eip1559"===A.type||"eip4844"===A.type){if(void 0===A.maxFeePerGas||void 0===A.maxPriorityFeePerGas){let n=await N(),{maxFeePerGas:r,maxPriorityFeePerGas:a}=await (0,i.C)(e,{block:n,chain:B,request:A});if(void 0===t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<a)throw new u.ld({maxPriorityFeePerGas:a});A.maxPriorityFeePerGas=a,A.maxFeePerGas=r}}else{if(void 0!==t.maxFeePerGas||void 0!==t.maxPriorityFeePerGas)throw new u.e5;let n=await N(),{gasPrice:r}=await (0,i.C)(e,{block:n,chain:B,request:A,type:"legacy"});A.gasPrice=r}}return C.includes("gas")&&void 0===k&&(A.gas=await (0,w.s)(e,a.Q,"estimateGas")({...A,account:F?{address:F.address,type:"json-rpc"}:void 0})),(0,P.F)(A),delete A.parameters,A}},36677:function(e,t,n){"use strict";async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}n.d(t,{p:function(){return r}})},46004:function(e,t,n){"use strict";let r;n.d(t,{e:function(){return s}});var i=n(61365);let a=256;function s(e){let{batch:t,cacheTime:n=e.pollingInterval??4e3,ccipRead:s,key:o="base",name:u="Base Client",pollingInterval:c=4e3,type:l="base"}=e,f=e.chain,d=e.account?(0,i.T)(e.account):void 0,{config:h,request:b,value:p}=e.transport({chain:f,pollingInterval:c}),m={account:d,batch:t,cacheTime:n,ccipRead:s,chain:f,key:o,name:u,pollingInterval:c,request:b,transport:{...h,...p},type:l,uid:function(e=11){if(!r||a+e>512){r="",a=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(a,a+++e)}()};return Object.assign(m,{extend:function e(t){return n=>{let r=n(t);for(let e in m)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(m)})}},91565:function(e,t,n){"use strict";n.d(t,{I:function(){return el}});var r=n(35649),i=n(12387),a=n(51728),s=n(64662),o=n(58371),u=n(40439),c=n(65911);async function l(e){let t=(0,c.g)(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}var f=n(67662),d=n(15389),h=n(43002);async function b(e,{address:t,args:n,event:r,events:i,fromBlock:a,strict:s,toBlock:o}={}){let u=i??(r?[r]:void 0),l=(0,c.g)(e,{method:"eth_newFilter"}),f=[];u&&(f=[u.flatMap(e=>(0,d.O)({abi:[e],eventName:e.name,args:n}))],r&&(f=f[0]));let b=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,h.eC)(a):a,toBlock:"bigint"==typeof o?(0,h.eC)(o):o,...f.length?{topics:f}:{}}]});return{abi:u,args:n,eventName:r?r.name:void 0,fromBlock:a,id:b,request:l(b),strict:!!s,toBlock:o,type:"event"}}var p=n(93172),m=n(61365),g=n(88983),y=n(32285),v=n(29986),w=n(93401);async function P(e,t){let{abi:n,address:r,args:i,functionName:a,...s}=t,o=(0,g.R)({abi:n,args:i,functionName:a});try{return await (0,v.s)(e,w.Q,"estimateGas")({data:o,to:r,...s})}catch(t){let e=s.account?(0,m.T)(s.account):void 0;throw(0,y.S)(t,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:a,sender:e?.address})}}var x=n(54130),$=n(10972),E=n(16847);async function O(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var B=n(42085),G=n(65148),k=n(5924),I=n(47866),j=n(75432),C=n(49051),T=n(88390),F=n(50752),A=n(88765),N=n(34584);async function M(e,{filter:t}){let n=t.strict??!1,r=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,N.U)(e));return t.abi?(0,A.h)({abi:t.abi,logs:r,strict:n}):r}var R=n(20610),z=n(52134),S=n(12929),U=n(29657),L=n(21977),q=n(555),_=n(1544),D=n(5288),H=n(50921),V=n(7486),W=n(41071),Z=n(49422),X=n(63841),Y=n(92186),J=n(7419),K=n(59511),Q=n(35339),ee=n(51688),et=n(69509),en=n(54580),er=n(44879),ei=n(39302),ea=n(47074),es=n(80664),eo=n(17892),eu=n(12439),ec=n(36677);function el(e){return{call:t=>(0,u.RE)(e,t),createBlockFilter:()=>l(e),createContractEventFilter:t=>(0,f.A)(e,t),createEventFilter:t=>b(e,t),createPendingTransactionFilter:()=>(0,p.W)(e),estimateContractGas:t=>P(e,t),estimateGas:t=>(0,w.Q)(e,t),getBalance:t=>(0,E.s)(e,t),getBlobBaseFee:()=>O(e),getBlock:t=>(0,B.Q)(e,t),getBlockNumber:t=>(0,G.z)(e,t),getBlockTransactionCount:t=>(0,k.c)(e,t),getBytecode:t=>(0,I.c)(e,t),getChainId:()=>(0,j.L)(e),getContractEvents:t=>(0,C.m)(e,t),getEnsAddress:t=>(0,r.O)(e,t),getEnsAvatar:t=>(0,i.r)(e,t),getEnsName:t=>(0,a.w)(e,t),getEnsResolver:t=>(0,s.S)(e,t),getEnsText:t=>(0,o.g)(e,t),getFeeHistory:t=>(0,T.Z)(e,t),estimateFeesPerGas:t=>(0,x.X)(e,t),getFilterChanges:t=>(0,F.K)(e,t),getFilterLogs:t=>M(e,t),getGasPrice:()=>(0,R.o)(e),getLogs:t=>(0,z.y)(e,t),getProof:t=>(0,S.S)(e,t),estimateMaxPriorityFeePerGas:t=>(0,$._)(e,t),getStorageAt:t=>(0,U.Y)(e,t),getTransaction:t=>(0,L.f)(e,t),getTransactionConfirmations:t=>(0,q.a)(e,t),getTransactionCount:t=>(0,_.K)(e,t),getTransactionReceipt:t=>(0,D.a)(e,t),multicall:t=>(0,H.A)(e,t),prepareTransactionRequest:t=>(0,eu.Z)(e,t),readContract:t=>(0,V.L)(e,t),sendRawTransaction:t=>(0,ec.p)(e,t),simulateContract:t=>(0,W.a)(e,t),verifyMessage:t=>(0,X.n)(e,t),verifyTypedData:t=>(0,Y.B)(e,t),uninstallFilter:t=>(0,Z.W)(e,t),waitForTransactionReceipt:t=>(0,J.e)(e,t),watchBlocks:t=>(0,Q.p)(e,t),watchBlockNumber:t=>(0,K.q)(e,t),watchContractEvent:t=>(0,ee.Y)(e,t),watchEvent:t=>(function(e,{address:t,args:n,batch:r=!0,event:i,events:a,fromBlock:s,onError:o,onLogs:u,poll:c,pollingInterval:l=e.pollingInterval,strict:f}){let h,p;let m=void 0!==c?c:"bigint"==typeof s||"webSocket"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
18onfig.type),g=f??!1;return m?(()=>{let c=(0,er.P)(["watchEvent",t,n,r,e.uid,i,l,s]);return(0,et.N7)(c,{onLogs:u,onError:o},o=>{let u,c;void 0!==s&&(u=s-1n);let f=!1,d=(0,en.$)(async()=>{if(!f){try{c=await (0,v.s)(e,b,"createEventFilter")({address:t,args:n,event:i,events:a,strict:g,fromBlock:s})}catch{}f=!0;return}try{let s;if(c)s=await (0,v.s)(e,F.K,"getFilterChanges")({filter:c});else{let r=await (0,v.s)(e,G.z,"getBlockNumber")({});s=u&&u!==r?await (0,v.s)(e,z.y,"getLogs")({address:t,args:n,event:i,events:a,fromBlock:u+1n,toBlock:r}):[],u=r}if(0===s.length)return;if(r)o.onLogs(s);else for(let e of s)o.onLogs([e])}catch(e){c&&e instanceof ea.yR&&(f=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:l});return async()=>{c&&await (0,v.s)(e,Z.W,"uninstallFilter")({filter:c}),d()}})})():(h=!0,p=()=>h=!1,(async()=>{try{let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type);return t?t.value:e.transport}return e.transport})(),s=a??(i?[i]:void 0),c=[];s&&(c=[s.flatMap(e=>(0,d.O)({abi:[e],eventName:e.name,args:n}))],i&&(c=c[0]));let{unsubscribe:l}=await r.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!h)return;let t=e.result;try{let{eventName:e,args:n}=(0,es.F)({abi:s??[],data:t.data,topics:t.topics,strict:g}),r=(0,N.U)(t,{args:n,eventName:e});u([r])}catch(i){let e,n;if(i instanceof ei.SM||i instanceof ei.Gy){if(f)return;e=i.abiItem.name,n=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let r=(0,N.U)(t,{args:n?[]:{},eventName:e});u([r])}},onError(e){o?.(e)}});p=l,h||p()}catch(e){o?.(e)}})(),()=>p())})(e,t),watchPendingTransactions:t=>(0,eo.O)(e,t)}}},40789:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(43766),i=n(15154),a=n(47074),s=n(30751);function o({key:e,name:t,request:n,retryCount:o=3,retryDelay:u=150,timeout:c,type:l},f){return{config:{key:e,name:t,request:n,retryCount:o,retryDelay:u,timeout:c,type:l},request:function(e,t={}){return async(n,o={})=>{let{retryDelay:u=150,retryCount:c=3}={...t,...o};return(0,s.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case a.s7.code:throw new a.s7(e);case a.B.code:throw new a.B(e);case a.LX.code:throw new a.LX(e);case a.nY.code:throw new a.nY(e);case a.XS.code:throw new a.XS(e);case a.yR.code:throw new a.yR(e);case a.Og.code:throw new a.Og(e);case a.pT.code:throw new a.pT(e);case a.KB.code:throw new a.KB(e);case a.gS.code:throw new a.gS(e);case a.Pv.code:throw new a.Pv(e);case a.GD.code:throw new a.GD(e);case a.ab.code:throw new a.ab(e);case a.PE.code:throw new a.PE(e);case a.Ts.code:throw new a.Ts(e);case a.u5.code:throw new a.u5(e);case a.I0.code:throw new a.I0(e);case a.x3.code:throw new a.x3(e);case 5e3:throw new a.ab(e);default:if(e instanceof r.G)throw e;throw new a.ir(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Gg){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*parseInt(e)}return~~(1<<e)*u},retryCount:c,shouldRetry:({error:e})=>"code"in e&&"number"==typeof e.code?-1===e.code||e.code===a.Pv.code||e.code===a.XS.code:!(e instanceof i.Gg)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status})}}(n,{retryCount:o,retryDelay:u}),value:f}}},21222:function(e,t,n){"use strict";n.d(t,{P:function(){return i}});var r=n(40789);function i(e,t={}){let{key:n="custom",name:i="Custom Provider",retryDelay:a}=t;return({retryCount:s})=>(0,r.q)({key:n,name:i,request:e.request.bind(e),retryCount:t.retryCount??s,retryDelay:a,type:"custom"})}},91612:function(e,t,n){"use strict";n.d(t,{$o:function(){return c},F8:function(){return r},X$:function(){return u},du:function(){return s},k3:function(){return a},nZ:function(){return o}});let r=[{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"}],i=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],a=[...i,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],s=[...i,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],o=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],u=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],c=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}]},96569:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return a}});
18let r={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},a={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},23895:function(e,t,n){"use strict";n.d(t,{Bd:function(){return a},Zn:function(){return i},ez:function(){return r}});let r={gwei:9,wei:18},i={ether:-9,wei:9},a={ether:-18,gwei:-9}},39302:function(e,t,n){"use strict";n.d(t,{CI:function(){return E},FM:function(){return b},Gy:function(){return x},KY:function(){return w},M4:function(){return f},MX:function(){return y},S4:function(){return v},SM:function(){return P},cO:function(){return o},dh:function(){return $},fM:function(){return s},fs:function(){return d},gr:function(){return l},hn:function(){return O},lC:function(){return p},mv:function(){return m},wM:function(){return B},wb:function(){return c},xB:function(){return u},xL:function(){return g},yP:function(){return h}});var r=n(719),i=n(16425),a=n(43766);class s extends a.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class o extends a.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class u extends a.G{constructor({data:e,params:t,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class c extends a.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class l extends a.G{constructor({expectedLength:e,givenLength:t,type:n}){super(`ABI encoding array length mismatch for type ${n}. 19Expected length: ${e} 20Given length: ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class f extends a.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class d extends a.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. 21Expected length (params): ${e} 22Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class h extends a.G{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. 23Make sure you are using the correct ABI and that the error exists on it. 24You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class b extends a.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class p extends a.G{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. 25Make sure you are using the correct ABI and that the event exists on it. 26You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class m extends a.G{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. 27Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class g extends a.G{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. 28Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class y extends a.G{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. 29Cannot decode function result without knowing what the parameter types are. 30Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class v extends a.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class w extends a.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class P extends a.G{constructor({abiItem:e,data:t,params:n,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=i}}class x extends a.G{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class $ extends a.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. 31Please provide a valid ABI type.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class E extends a.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. 32Please provide a valid ABI type.`,{docsPath:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class O extends a.G{constructor(e){super(`Value "${e}" is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class B extends a.G{constructor(e){super(`"${e}" is not a valid definition type. 33Valid types: "function", "event", "error"`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}},89995:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(43766);class i extends r.G{constructor({address:e}){super(`Address "${e}
33" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}},43766:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(97997);class i extends Error{constructor(e,t={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:(0,r.bo)()});let n=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof i&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: https://viem.sh${a}${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t?e(t.cause,n):n?null:t}(this,e)}}},28002:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(43766);class i extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}},84939:function(e,t,n){"use strict";n.d(t,{Bk:function(){return s},Yl:function(){return a},mm:function(){return i},pZ:function(){return o}});var r=n(43766);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class a extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class s extends r.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class o extends r.G{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}},16852:function(e,t,n){"use strict";n.d(t,{cg:function(){return g},uq:function(){return y},Lu:function(){return v},Dk:function(){return w},VQ:function(){return P}});var r=n(61365),i=n(96569),a=n(25112),s=n(719),o=n(44879);function u({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"==typeof t[n]?(0,o.P)(t[n]):t[n]}`).join(", ")})`}var c=n(14791),l=n(83901),f=n(86622),d=n(39302),h=n(43766),b=n(42566),p=n(29620),m=n(97997);class g extends h.G{constructor(e,{account:t,docsPath:n,chain:i,data:a,gas:s,gasPrice:o,maxFeePerGas:u,maxPriorityFeePerGas:c,nonce:d,to:h,value:m,stateOverride:g}){let y=t?(0,r.T)(t):void 0,v=(0,p.xr)({from:y?.address,to:h,value:void 0!==m&&`${(0,l.d)(m)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:s,gasPrice:void 0!==o&&`${(0,f.o)(o)} gwei`,maxFeePerGas:void 0!==u&&`${(0,f.o)(u)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,f.o)(c)}
33 gwei`,nonce:d});g&&(v+=` 34${(0,b.Bj)(g)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class y extends h.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:a,sender:o}){let l=(0,c.mE)({abi:t,args:n,name:a}),f=l?u({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0;super(e.shortMessage||`An unknown error occurred while executing the contract function "${a}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",(0,p.xr)({address:r&&(0,m.CR)(r),function:l?(0,s.t)(l,{includeName:!0}):void 0,args:f&&"()"!==f&&`${[...Array(a?.length??0).keys()].map(()=>" ").join("")}${f}`,sender:o})].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=a,this.sender=o}}class v extends h.G{constructor({abi:e,data:t,functionName:n,message:r}){let o,c,l,f,h;if(t&&"0x"!==t)try{let{abiItem:n,errorName:r,args:o}=h=(0,a.p)({abi:e,data:t});if("Error"===r)l=o[0];else if("Panic"===r){let[e]=o;l=i.$[e]}else{let e=n?(0,s.t)(n,{includeName:!0}):void 0,t=n&&o?u({abiItem:n,args:o,includeFunctionName:!1,includeName:!1}):void 0;c=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else r&&(l=r);o instanceof d.yP&&(f=o.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${f}.`]),super(l&&"execution reverted"!==l||f?[`The contract function "${n}" reverted with the following ${f?"signature":"reason"}:`,l||f].join("\n"):`The contract function "${n}" reverted.`,{cause:o,metaMessages:c}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=h,this.reason=l,this.signature=f}}class w extends h.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class P extends h.G{constructor({data:e,message:t}){super(t||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},18679:function(e,t,n){"use strict";n.d(t,{KD:function(){return s},T_:function(){return i},lQ:function(){return a}});var r=n(43766);class i extends r.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class a extends r.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class s extends r.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}},76182:function(e,t,n){"use strict";n.d(t,{$s:function(){return a},W_:function(){return s},mV:function(){return i}});var r=n(43766);class i extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class a extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class s extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${t} ${n} long, but is ${e} ${n} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}},10832:function(e,t,n){"use strict";n.d(t,{J5:function(){return i},M6:function(){return s},yr:function(){return a}});var r=n(43766);class i extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}
vendor: 5,302 bytes, lines 34-35
34){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class a extends r.G{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}class s extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}},71006:function(e,t,n){"use strict";n.d(t,{Fz:function(){return a},e5:function(){return s},ld:function(){return o}});var r=n(86622),i=n(43766);class a extends i.G{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class s extends i.G{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class o extends i.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.o)(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}},81651:function(e,t,n){"use strict";n.d(t,{C_:function(){return f},G$:function(){return o},Hh:function(){return s},M_:function(){return a},WF:function(){return d},ZI:function(){return u},cj:function(){return m},cs:function(){return p},dR:function(){return h},pZ:function(){return b},se:function(){return l},vU:function(){return c}});var r=n(86622),i=n(43766);class a extends i.G{constructor({cause:e,message:t}={}){let n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. 35Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class f extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}
35Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class h extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class b extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class p extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class m extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}},15154:function(e,t,n){"use strict";n.d(t,{Gg:function(){return s},W5:function(){return u},bs:function(){return o}});var r=n(44879),i=n(43766),a=n(97997);class s extends i.G{constructor({body:e,details:t,headers:n,status:i,url:s}){super("HTTP request failed.",{details:t,metaMessages:[i&&`Status: ${i}`,`URL: ${(0,a.Gr)(s)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=s}}class o extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,a.Gr)(n)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code}}class u extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,a.Gr)(t)}`,`Request body: ${(0,r.P)(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}},47074:function(e,t,n){"use strict";n.d(t,{B:function(){return u},GD:function(){return y},I0:function(){return $},KB:function(){return p},LX:function(){return c},Og:function(){return h},PE:function(){return w},Pv:function(){return g},Ts:function(){return P},XS:function(){return f},ab:function(){return v},gS:function(){return m},ir:function(){return O},nY:function(){return l},pT:function(){return b},s7:function(){return o},u5:function(){return x},x3:function(){return E},yR:function(){return d}});var r=n(43766),i=n(15154);class a extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}
35),this.name=e.name,this.code=e instanceof i.bs?e.code:t??-1}}class s extends a{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends a{constructor(e){super(e,{code:o.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class u extends a{constructor(e){super(e,{code:u.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends a{constructor(e){super(e,{code:c.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends a{constructor(e){super(e,{code:l.code,shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class f extends a{constructor(e){super(e,{code:f.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends a{constructor(e){super(e,{code:d.code,shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class h extends a{constructor(e){super(e,{code:h.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class b extends a{constructor(e){super(e,{code:b.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class p extends a{constructor(e){super(e,{code:p.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class m extends a{constructor(e){super(e,{code:m.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class g extends a{constructor(e){super(e,{code:g.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class y extends a{constructor(e){super(e,{code:y.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class P extends s{constructor(e){super(e,{code:P.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class x extends s{constructor(e){super(e,{code:x.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class $ extends s{constructor(e){super(e,{code:$.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty($,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends s{constructor(e){super(e,{code:E.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class O extends a{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}},42566:function(e,t,n){"use strict";n.d(t,{Bj:function(){return o},Nc:function(){return i},Z8:function(){return a}});var r=n(43766);class i extends r.G{constructor({address:e}){super(`State for account "${e}" is set multiple times.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountStateConflictError"})}}class a extends r.G{constructor(){super("state and stateDiff are set on the same account."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"StateAssignmentC
35onflictError"})}}function s(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n} 36`,"")}function o(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}: 37`;return n.nonce&&(r+=` nonce: ${n.nonce} 38`),n.balance&&(r+=` balance: ${n.balance} 39`),n.code&&(r+=` code: ${n.code} 40`),n.state&&(r+=" state:\n"+s(n.state)),n.stateDiff&&(r+=" stateDiff:\n"+s(n.stateDiff)),r}," State Override:\n").slice(0,-1)}},29620:function(e,t,n){"use strict";n.d(t,{Bh:function(){return l},Yb:function(){return f},j3:function(){return u},mc:function(){return d},mk:function(){return c},xY:function(){return o},xr:function(){return s}});var r=n(83901),i=n(86622),a=n(43766);function s(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class o extends a.G{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class u extends a.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class c extends a.G{constructor(e,{account:t,docsPath:n,chain:a,data:o,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:f,nonce:d,to:h,value:b}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",s({chain:a&&`${a?.name} (id: ${a?.id})`,from:t?.address,to:h,value:void 0!==b&&`${(0,r.d)(b)} ${a?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:u,gasPrice:void 0!==c&&`${(0,i.o)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,i.o)(l)} gwei`,maxPriorityFeePerGas:void 0!==f&&`${(0,i.o)(f)} gwei`,nonce:d})].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class l extends a.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let a="Transaction";n&&void 0!==i&&(a=`Transaction at block time "${n}" at index "${i}"`),e&&void 0!==i&&(a=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(a=`Transaction at block number "${t}" at index "${i}"`),r&&(a=`Transaction with hash "${r}"`),super(`${a} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class f extends a.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class d extends a.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}},97997:function(e,t,n){"use strict";n.d(t,{CR:function(){return r},Gr:function(){return i},bo:function(){return a}});let r=e=>e,i=e=>e,a=()=>"[email protected]"},13543:function(e,t,n){"use strict";n.d(t,{r:function(){return p}});var r=n(39302),i=n(1123),a=n(19804),s=n(16425),o=n(12927),u=n(34451),c=n(10832),l=n(79291),f=n(43002);function d(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,f.ci)(e,t);return(0,l.ly)(n,t)}var h=n(93454),b=n(43325);function p(e,t){let n="string"==typeof t?(0,h.nr)(t):t,p=(0,a.q)(n);if(0===(0,s.d)(n)&&e.length>0)throw new r.wb;if((0,s.d)(t)&&32>(0,s.d)(t))throw new r.xB({data:"string"==typeof t?t:(0,f.ci)(t),params:e,size:(0,s.d)(t)});let g=0,y=[];for(let t=0;t<e.length;++t){let n=e[t];p.setPosition(g);let[a,s]=function e(t,n,{staticPosition:a}
vendor: 4,111 bytes, line 40
40){let s=(0,b.S)(n.type);if(s){let[r,i]=s;return function(t,n,{length:r,staticPosition:i}){if(!r){let r=i+d(t.readBytes(32)),a=r+32;t.setPosition(r);let s=d(t.readBytes(32)),o=m(n),u=0,c=[];for(let r=0;r<s;++r){t.setPosition(a+(o?32*r:u));let[i,s]=e(t,n,{staticPosition:a});u+=s,c.push(i)}return t.setPosition(i+32),[c,32]}if(m(n)){let a=i+d(t.readBytes(32)),s=[];for(let i=0;i<r;++i){t.setPosition(a+32*i);let[r]=e(t,n,{staticPosition:a});s.push(r)}return t.setPosition(i+32),[s,32]}let a=0,s=[];for(let o=0;o<r;++o){let[r,o]=e(t,n,{staticPosition:i+a});a+=o,s.push(r)}return[s,a]}(t,{...n,type:i},{length:r,staticPosition:a})}if("tuple"===n.type)return function(t,n,{staticPosition:r}){let i=0===n.components.length||n.components.some(({name:e})=>!e),a=i?[]:{},s=0;if(m(n)){let o=r+d(t.readBytes(32));for(let r=0;r<n.components.length;++r){let u=n.components[r];t.setPosition(o+s);let[c,l]=e(t,u,{staticPosition:o});s+=l,a[i?r:u?.name]=c}return t.setPosition(r+32),[a,32]}for(let o=0;o<n.components.length;++o){let u=n.components[o],[c,l]=e(t,u,{staticPosition:r});a[i?o:u?.name]=c,s+=l}return[a,s]}(t,n,{staticPosition:a});if("address"===n.type)return function(e){let t=e.readBytes(32);return[(0,i.x)((0,f.ci)((0,o.T4)(t,-20))),32]}(t);if("bool"===n.type)return[function(e,t={}){let n=e;if(void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,u.f)(n)),n.length>1||n[0]>1)throw new c.yr(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(n.type.startsWith("bytes"))return function(e,t,{staticPosition:n}){let[r,i]=t.type.split("bytes");if(!i){let t=d(e.readBytes(32));e.setPosition(n+t);let r=d(e.readBytes(32));if(0===r)return e.setPosition(n+32),["0x",32];let i=e.readBytes(r);return e.setPosition(n+32),[(0,f.ci)(i),32]}return[(0,f.ci)(e.readBytes(parseInt(i),32)),32]}(t,n,{staticPosition:a});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=parseInt(t.type.split("int")[1]||"256"),i=e.readBytes(32);return[r>48?function(e,t={}){void 0!==t.size&&(0,l.Yf)(e,{size:t.size});let n=(0,f.ci)(e,t);return(0,l.y_)(n,t)}(i,{signed:n}):d(i,{signed:n}),32]}(t,n);if("string"===n.type)return function(e,{staticPosition:t}){let n=d(e.readBytes(32));e.setPosition(t+n);let r=d(e.readBytes(32));if(0===r)return e.setPosition(t+32),["",32];let i=e.readBytes(r,32),a=function(e,t={}){let n=e;return void 0!==t.size&&((0,l.Yf)(n,{size:t.size}),n=(0,u.f)(n,{dir:"right"})),new TextDecoder().decode(n)}((0,u.f)(i));return e.setPosition(t+32),[a,32]}(t,{staticPosition:a});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(p,n,{staticPosition:0});g+=s,y.push(a)}return y}function m(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(m);let n=(0,b.S)(e.type);return!!(n&&m({...e,type:n[1]}))}},25112:function(e,t,n){"use strict";n.d(t,{p:function(){return c}});var r=n(96569),i=n(39302),a=n(12927),s=n(56656),o=n(13543),u=n(719);function c(e){let{abi:t,data:n}=e,c=(0,a.tP)(n,0,4);if("0x"===c)throw new i.wb;let l=[...t||[],r.Up,r.hZ].find(e=>"error"===e.type&&c===(0,s.C)((0,u.t)(e)));if(!l)throw new i.yP(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,o.r)(l.inputs,(0,a.tP)(n,4)):void 0,errorName:l.name}}},80664:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var r=n(39302),i=n(16425),a=n(89016),s=n(18679),o=n(13543),u=n(719);let c="/docs/contract/decodeEventLog";function l(e){let{abi:t,data:n,strict:l,topics:f}=e,d=l??!0,[h,...b]=f;if(!h)throw new r.FM({docsPath:c});let p=t.find(e=>"event"===e.type&&h===(0,a.n)((0,u.t)(e)));if(!(p&&"name"in p)||"event"!==p.type)throw new r.lC(h,{docsPath:c});let{name:m,inputs:g}=p,y=g?.some(e=>!("name"in e&&e.name)),v=y?[]:{},w=g.filter(e=>"indexed"in e&&e.indexed);for(let e=0;e<w.length;e++){let t=w[e],n=b[e];if(!n)throw new r.Gy({abiItem:p,param:t});v[y?e:t.name||e]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,o.r)([e],t)||[])[0]}({param:t,value:n})}let P=g.filter(e=>
40!("indexed"in e&&e.indexed));if(P.length>0){if(n&&"0x"!==n)try{let e=(0,o.r)(P,n);if(e){if(y)v=[...v,...e];else for(let t=0;t<P.length;t++)v[P[t].name]=e[t]}}catch(e){if(d){if(e instanceof r.xB||e instanceof s.lQ)throw new r.SM({abiItem:p,data:n,params:P,size:(0,i.d)(n)});throw e}}else if(d)throw new r.SM({abiItem:p,data:"0x",params:P,size:0})}return{eventName:m,args:Object.values(v).length>0?v:void 0}}},48242:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(39302),i=n(13543),a=n(14791);let s="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:n,functionName:o,data:u}=e,c=t[0];if(o){let e=(0,a.mE)({abi:t,args:n,name:o});if(!e)throw new r.xL(o,{docsPath:s});c=e}if("function"!==c.type)throw new r.xL(void 0,{docsPath:s});if(!c.outputs)throw new r.MX(c.name,{docsPath:s});let l=(0,i.r)(c.outputs,u);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},43325:function(e,t,n){"use strict";n.d(t,{E:function(){return d},S:function(){return b}});var r=n(39302),i=n(89995),a=n(43766),s=n(39573),o=n(6213),u=n(57095),c=n(16425),l=n(12927),f=n(43002);function d(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=h(function({params:e,values:t}){let n=[];for(let d=0;d<e.length;d++)n.push(function e({param:t,value:n}){let d=b(t.type);if(d){let[i,a]=d;return function(t,{length:n,param:i}){let a=null===n;if(!Array.isArray(t))throw new r.hn(t);if(!a&&t.length!==n)throw new r.gr({expectedLength:n,givenLength:t.length,type:`${i.type}[${n}]`});let s=!1,u=[];for(let n=0;n<t.length;n++){let r=e({param:i,value:t[n]});r.dynamic&&(s=!0),u.push(r)}if(a||s){let e=h(u);if(a){let t=(0,f.eC)(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?(0,o.zo)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,o.zo)(u.map(({encoded:e})=>e))}}(n,{length:i,param:{...t,type:a}})}if("tuple"===t.type)return function(t,{param:n}){let r=!1,i=[];for(let a=0;a<n.components.length;a++){let s=n.components[a],o=Array.isArray(t)?a:s.name,u=e({param:s,value:t[o]});i.push(u),u.dynamic&&(r=!0)}return{dynamic:r,encoded:r?h(i):(0,o.zo)(i.map(({encoded:e})=>e))}}(n,{param:t});if("address"===t.type)return function(e){if(!(0,s.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,u.gc)(e.toLowerCase())}}(n);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new a.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.gc)((0,f.C4)(e))}}(n);if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,{signed:t}){return{dynamic:!1,encoded:(0,f.eC)(e,{size:32,signed:t})}}(n,{signed:t.type.startsWith("int")});if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,n]=t.type.split("bytes"),i=(0,c.d)(e);if(!n){let t=e;return i%32!=0&&(t=(0,u.gc)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,o.zo)([(0,u.gc)((0,f.eC)(i,{size:32})),t])}}if(i!==parseInt(n))throw new r.M4({expectedSize:parseInt(n),value:e});return{dynamic:!1,encoded:(0,u.gc)(e,{dir:"right"})}}(n,{param:t});if("string"===t.type)return function(e){let t=(0,f.$G)(e),n=Math.ceil((0,c.d)(t)/32),r=[];for(let e=0;e<n;e++)r.push((0,u.gc)((0,l.tP)(t,32*e,(e+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,o.zo)([(0,u.gc)((0,f.eC)((0,c.d)(t),{size:32})),...r])}}(n);throw new r.dh(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[d],value:t[d]}));return n}({params:e,values:t}));return 0===n.length?"0x":n}function h(e){let t=0;for(let n=0;n<e.length;n++){let{dynamic:r,encoded:i}=e[n];r?t+=32:t+=(0,c.d)(i)}let n=[],r=[],i=0;for(let a=0;a<e.length;a++){let{dynamic:s,encoded:o}=e[a];s?(n.push((0,f.eC)(t+i,{size:32})),r.push(o),i+=(0,c.d)(o)):n.push(o)}return(0,o.zo)([...n,...r])}function b(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},47080:function(e,t,n){"use strict";n.d(t,{w:function(){return o}});var r=n(39302),i=n(6213),a=n(43325);let s="/docs/contract/encodeDeployData";function o(e){let{abi:t,args:n,bytecode:o}=e;if(!n||0===n.length)return o;let u=t.find(e=>"type"in e&&"constructor"===e.type);if(!u)throw new r.fM({docsPath:s});
vendor: 1,767 bytes, line 40
40if(!("inputs"in u)||!u.inputs||0===u.inputs.length)throw new r.cO({docsPath:s});let c=(0,a.E)(u.inputs,n);return(0,i.SM)([o,c])}},15389:function(e,t,n){"use strict";n.d(t,{O:function(){return h}});var r=n(39302),i=n(43766);class a extends i.G{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}var s=n(93454),o=n(8441),u=n(89016),c=n(43325),l=n(719),f=n(14791);let d="/docs/contract/encodeEventTopics";function h(e){let{abi:t,eventName:n,args:i}=e,a=t[0];if(n){let e=(0,f.mE)({abi:t,name:n});if(!e)throw new r.mv(n,{docsPath:d});a=e}if("event"!==a.type)throw new r.mv(void 0,{docsPath:d});let s=(0,l.t)(a),o=(0,u.n)(s),c=[];if(i&&"inputs"in a){let e=a.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(i)?i:Object.values(i).length>0?e?.map(e=>i[e.name])??[]:[];t.length>0&&(c=e?.map((e,n)=>Array.isArray(t[n])?t[n].map((r,i)=>b({param:e,value:t[n][i]})):t[n]?b({param:e,value:t[n]}):null)??[])}return[o,...c]}function b({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,o.w)((0,s.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new a(e.type);return(0,c.E)([e],[t])}},88983:function(e,t,n){"use strict";n.d(t,{R:function(){return l}});var r=n(6213),i=n(43325),a=n(39302),s=n(56656),o=n(719),u=n(14791);let c="/docs/contract/encodeFunctionData";function l(e){let{args:t}=e,{abi:n,functionName:l}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:n,functionName:r}=e,i=t[0];if(r){let e=(0,u.mE)({abi:t,args:n,name:r});if(!e)throw new a.xL(r,{docsPath:c});i=e}if("function"!==i.type)throw new a.xL(void 0,{docsPath:c});return{abi:[i],functionName:(0,s.C)((0,o.t)(i))}}
40(e),f=n[0],d="inputs"in f&&f.inputs?(0,i.E)(f.inputs,t??[]):void 0;return(0,r.SM)([l,d??"0x"])}},719:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return i}});var r=n(39302);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${a(e.inputs,{includeName:t})})`}function a(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${a(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},14791:function(e,t,n){"use strict";n.d(t,{mE:function(){return u}});var r=n(39302),i=n(88265),a=n(39573),s=n(89016),o=n(56656);function u(e){let t;let{abi:n,args:u=[],name:c}=e,l=(0,i.v)(c,{strict:!1}),f=n.filter(e=>l?"function"===e.type?(0,o.C)(e)===c:"event"===e.type&&(0,s.n)(e)===c:"name"in e&&e.name===c);if(0!==f.length){if(1===f.length)return f[0];for(let e of f)if("inputs"in e){if(!u||0===u.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===u.length&&u.every((t,n)=>{let r="inputs"in e&&e.inputs[n];return!!r&&function e(t,n){let r=typeof t,i=n.type;switch(i){case"address":return(0,a.U)(t,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===i&&"components"in n)return Object.values(n.components).every((n,r)=>e(Object.values(t)[r],n));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===r||t instanceof Uint8Array;
vendor: 6,032 bytes, line 40
40if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...n,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,r)})){if(t&&"inputs"in t&&t.inputs){let n=function e(t,n,r){for(let i in t){let s=t[i],o=n[i];if("tuple"===s.type&&"tuple"===o.type&&"components"in s&&"components"in o)return e(s.components,o.components,r[i]);let u=[s.type,o.type];if(u.includes("address")&&u.includes("bytes20")||(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&(0,a.U)(r[i],{strict:!1}))return u}}(e.inputs,t.inputs,u);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:t,type:n[1]})}t=e}}return t||f[0]}}},88765:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var r=n(39302),i=n(80664);function a({abi:e,eventName:t,logs:n,strict:a=!0}){return n.map(n=>{try{let r=(0,i.F)({...n,abi:e,strict:a});if(t&&!t.includes(r.eventName))return null;return{...r,...n}}catch(i){let e,t;if(i instanceof r.lC)return null;if(i instanceof r.SM||i instanceof r.Gy){if(a)return null;e=i.abiItem.name,t=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}return{...n,args:t?[]:{},eventName:e}}}).filter(Boolean)}},1123:function(e,t,n){"use strict";n.d(t,{K:function(){return u},x:function(){return o}});var r=n(89995),i=n(93454),a=n(8441),s=n(39573);function o(e,t){let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=(0,a.w)((0,i.qX)(n),"bytes"),s=(t?n.substring(`${t}0x`.length):n).split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&r[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());return`0x${s.join("")}`}function u(e,t){if(!(0,s.U)(e,{strict:!1}))throw new r.b({address:e});return o(e,t)}},39573:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}set(e,t){return super.set(e,t),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}var i=n(1123);let a=/^0x[a-fA-F0-9]{40}$/,s=new r(8192);function o(e,t){let{strict:n=!0}=t??{};if(s.has(e))return s.get(e);let r=!!a.test(e)&&(e.toLowerCase()===e||!n||(0,i.x)(e)===e);return s.set(e,r),r}},47566:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(84939);function i({blockNumber:e,chain:t,contract:n}){let i=t?.contracts?.[n];if(!i)throw new r.mm({chain:t,contract:{name:n}});if(e&&i.blockCreated&&i.blockCreated>e)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:i.blockCreated}});return i.address}},19804:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});var r=n(18679);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new r.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new r.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function a(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(i);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},6213:function(e,t,n){"use strict";function r(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(e)}function i(e){return`0x${e.reduce((e,t)=>
40e+t.replace("0x",""),"")}`}n.d(t,{SM:function(){return i},zo:function(){return r}})},88265:function(e,t,n){"use strict";function r(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}n.d(t,{v:function(){return r}})},57095:function(e,t,n){"use strict";n.d(t,{gc:function(){return a},vk:function(){return i}});var r=n(76182);function i(e,{dir:t,size:n=32}={}){return"string"==typeof e?a(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new r.$s({size:e.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r<n;r++){let a="right"===t;i[a?r:n-r-1]=e[a?r:e.length-r-1]}return i}(e,{dir:t,size:n})}function a(e,{dir:t,size:n=32}={}){if(null===n)return e;let i=e.replace("0x","");if(i.length>2*n)throw new r.$s({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*n,"0")}`}},16425:function(e,t,n){"use strict";n.d(t,{d:function(){return i}});var r=n(88265);function i(e){return(0,r.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},12927:function(e,t,n){"use strict";n.d(t,{T4:function(){return c},tP:function(){return s}});var r=n(76182),i=n(88265),a=n(16425);function s(e,t,n,{strict:r}={}){return(0,i.v)(e,{strict:!1})?function(e,t,n,{strict:r}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&u(i,t,n),i}(e,t,n,{strict:r}):c(e,t,n,{strict:r})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,a.d)(e)-1)throw new r.mV({offset:t,position:"start",size:(0,a.d)(e)})}function u(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,a.d)(e)!==n-t)throw new r.mV({offset:n,position:"end",size:(0,a.d)(e)})}function c(e,t,n,{strict:r}={}){o(e,t);let i=e.slice(t,n);return r&&u(i,t,n),i}},34451:function(e,t,n){"use strict";function r(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let e=0;e<n.length-1&&"0"===n["left"===t?e:n.length-e-1].toString();e++)r++;return(n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e)?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}n.d(t,{f:function(){return r}})},79291:function(e,t,n){"use strict";n.d(t,{Yf:function(){return o},ly:function(){return c},rR:function(){return l},y_:function(){return u}});var r=n(10832),i=n(16425),a=n(34451),s=n(93454);function o(e,{size:t}){if((0,i.d)(e)>t)throw new r.M6({givenSize:(0,i.d)(e),maxSize:t})}function u(e,t={}){let{signed:n}=t;t.size&&o(e,{size:t.size});let r=BigInt(e);if(!n)return r;let i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){return Number(u(e,t))}function l(e,t={}){let n=(0,s.nr)(e);return t.size&&(o(n,{size:t.size}),n=(0,a.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},93454:function(e,t,n){"use strict";n.d(t,{O0:function(){return c},nr:function(){return d},qX:function(){return h}});var r=n(43766),i=n(88265),a=n(57095),s=n(79291),o=n(43002);let u=new TextEncoder;function c(e,t={}){return"number"==typeof e||"bigint"==typeof e?d((0,o.eC)(e,t)):"boolean"==typeof e?function(e,t={}){let n=new Uint8Array(1);return(n[0]=Number(e),"number"==typeof t.size)?((0,s.Yf)(n,{size:t.size}),(0,a.vk)(n,{size:t.size})):n}(e,t):(0,i.v)(e)?d(e,t):h(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function f(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function d(e,t={}){let n=e;t.size&&((0,s.Yf)(n,{size:t.size}),n=(0,a.vk)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,u=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let n=f(i.charCodeAt(t++)),a=f(i.charCodeAt(t++));if(void 0===n||void 0===a)throw new r.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);u[e]=16*n+a}return u}function h(e,t={}){let n=u.encode(e);return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,a.vk)(n,{dir:"right",size:t.size})):n}},43002:function(e,t,n){"use strict";n.d(t,{$G:function(){return d},C4:function(){return u},NC:function(){return o},ci:function(){return c},eC:function(){return l}});var r=n(10832),i=n(57095),a=n(79291);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function o(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?d(e,t):"boolean"==typeof e?u(e,t):c(e,t)}function u(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?((0,a.Yf)(n,{size:t.size}),(0,i.vk)(n,{size:t.size})):n}function c(e,t={}){let n="";for(let t=0;t<e.length;t++)n+=s[e[t]];let r=`0x${n}`;return"number"==typeof t.size?((0,a.Yf)(r,{size:t.size}),(0,i.vk)(r,{dir:"right",size:t.size})):r}function l(e,t={}){let n;let{signed:a,size:s}=t,o=BigInt(e);s?n=a?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(n=BigInt(Number.MAX_SAFE_INTEGER));let u="bigint"==typeof n&&a?-n-1n:0;if(n&&o>n||o<u){let t="bigint"==typeof e?"n":"";throw new r.J5({max:n?`${n}${t}`:void 0,min:`${u}${t}`,signed:a,size:s,value:`${e}${t}`})}let c=`0x${(a&&o<0?(1n<<BigInt(8*s))+BigInt(o):o).toString(16)}`;return s?(0,i.vk)(c,{size:s}):c}let f=new TextEncoder;function d(e,t={}){return c(f.encode(e),t)}},60061:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(88265);function i(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,r.v)(t)?t:null}},3593:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var r=n(96569),i=n(43766),a=n(16852);function s(e,t){if(!(e instanceof i.G))return!1;let n=e.walk(e=>e instanceof a.Lu);return n instanceof a.Lu&&(!!(n.data?.errorName==="ResolverNotFound"||n.data?.errorName==="ResolverWildcardNotSupported"||n.data?.errorName==="ResolverNotContract"||n.data?.errorName==="ResolverError"||n.data?.errorName==="HttpError"||n.reason?.includes("Wildcard on non-extended resolvers is not supported"))||"reverse"===t&&n.reason===r.$[50])}},2436:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var r=n(6213),i=n(93454),a=n(43002),s=n(8441),o=n(60061);function u(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,a.ci)(t);let n=e.split(".");for(let e=n.length-1;e>=0;e-=1){let a=(0,o.i)(n[e]),u=a?(0,i.O0)(a):(0,s.w)((0,i.qX)(n[e]),"bytes");t=(0,s.w)((0,r.zo)([t,u]),"bytes")}return(0,a.ci)(t)}},96418:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var r=n(93454),i=n(43002),a=n(8441),s=n(60061);function o(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let n=new Uint8Array((0,r.qX)(t).byteLength+2),o=0,u=t.split(".");for(let e=0;e<u.length;e++){let t=(0,r.qX)(u[e]);if(t.byteLength>255){var c;t=(0,r.qX)((c=function(e){let t=new Uint8Array(32).fill(0);return e?(0,s.i)(e)||(0,a.w)((0,r.qX)(e)):(0,i.ci)(t)}(u[e]),`[${c.slice(2)}]`))}n[o]=t.length,n.set(t,o+1),o+=t.length+1}return n.byteLength!==o+1?n.slice(0,o+1):n}},32285:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(39302),i=n(43766),a=n(16852),s=n(47074);function o(e,{abi:t,address:n,args:o,docsPath:u,functionName:c,sender:l}){let{code:f,data:d,message:h,shortMessage:b}=e instanceof a.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},p=e instanceof r.wb?new a.Dk({functionName:c}):[3,s.XS.code].includes(f)&&(d||h||b)?new a.Lu({abi:t,data:"object"==typeof d?d.data:d,functionName:c,message:b??h}):e;return new a.uq(p,{abi:t,args:o,contractAddress:n,docsPath:u,functionName:c,sender:l})}},43535:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(43766),i=n(81651);function a(e,t){let n=(e.details||"").toLowerCase(),a=e instanceof r.G?e.walk(e=>e.code===i.M_.code):e;return a instanceof r.G?new i.M_({cause:e,message:a.details}):i.M_.nodeMessage.test(n)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(n)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},65911:function(e,t,n){"use strict";function r(e,{method:t}){let n={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:r,status:i,transport:a})=>{"success"===i&&t===e&&(n[r]=a.request)}),t=>n[t]||e.request}n.d(t,{g:function(){return r}})},71630:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(80896);function i(e){let t=e.transactions?.map(e=>"string"==typeof e?e:r.Tr(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLim
40it?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}},81755:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};let n={};return!function t(r){for(let i of Object.keys(r))i in e&&(n[i]=e[i]),r[i]&&"object"==typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}n.d(t,{K:function(){return r}})},34584:function(e,t,n){"use strict";function r(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}n.d(t,{U:function(){return r}})},80896:function(e,t,n){"use strict";n.d(t,{Tr:function(){return a},c8:function(){return i}});var r=n(79291);let i={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function a(e){let t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?i[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),"eip1559"===t.type&&delete t.maxFeePerBlobGas,t}},79792:function(e,t,n){"use strict";n.d(t,{tG:function(){return a}});var r=n(43002);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};function a(e){let t={};return void 0!==e.accessList&&(t.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?t.blobs=e.blobs.map(e=>(0,r.ci)(e)):t.blobs=e.blobs),void 0!==e.data&&(t.data=e.data),void 0!==e.from&&(t.from=e.from),void 0!==e.gas&&(t.gas=(0,r.eC)(e.gas)),void 0!==e.gasPrice&&(t.gasPrice=(0,r.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=(0,r.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(t.maxFeePerGas=(0,r.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,r.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(t.nonce=(0,r.eC)(e.nonce)),void 0!==e.to&&(t.to=e.to),void 0!==e.type&&(t.type=i[e.type]),void 0!==e.value&&(t.value=(0,r.eC)(e.value)),t}},29986:function(e,t,n){"use strict";function r(e,t,n){return r=>e[t.name]?.(r)??e[n]?.(r)??t(e,r)}n.d(t,{s:function(){return r}})},8441:function(e,t,n){"use strict";n.d(t,{w:function(){return o}});var r=n(96325),i=n(88265),a=n(93454),s=n(43002);function o(e,t){let n=(0,r.fr)((0,i.v)(e,{strict:!1})?(0,a.O0)(e):e);return"bytes"===(t||"hex")?n:(0,s.NC)(n)}},89016:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});let r=n(94798).r},56656:function(e,t,n){"use strict";n.d(t,{C:function(){return a}});var r=n(12927),i=n(94798);let a=e=>(0,r.tP)((0,i.r)(e),0,4)},94798:function(e,t,n){"use strict";n.d(t,{r:function(){return l}});var r=n(93454),i=n(8441);let a=e=>(0,i.w)((0,r.O0)(e)),s=/^tuple(?<array>(\[(\d*)\])*)$/;function o(e){let t="",n=e.length;for(let r=0;r<n;r++)t+=function e(t){let n=t.type;if(s.test(t.type)&&"components"in t){n="(";let r=t.components.length;for(let i=0;i<r;i++)n+=e(t.components[i]),i<r-1&&(n+=", ");let i=function(e,t){let n=e.exec(t);return n?.groups}(s,t.type);return n+=`)${i?.array??""}`,e({...t,type:n})}return("indexed"in t&&t.indexed&&(n=`${n}
40 indexed`),t.name)?`${n} ${t.name}`:n}(e[r]),r!==n-1&&(t+=", ");return t}var u=n(43766);let c=e=>{var t;return function(e){let t=!0,n="",r=0,i="",a=!1;for(let s=0;s<e.length;s++){let o=e[s];if(["(",")",","].includes(o)&&(t=!0),"("===o&&r++,")"===o&&r--,t){if(0===r){if(" "===o&&["event","function",""].includes(i))i="";else if(i+=o,")"===o){a=!0;break}continue}if(" "===o){","!==e[s-1]&&","!==n&&",("!==n&&(n="",t=!1);continue}i+=o,n+=o}}if(!a)throw new u.G("Unable to normalize signature.");return i}("string"==typeof e?e:"function"===(t=e).type?`function ${t.name}(${o(t.inputs)})${t.stateMutability&&"nonpayable"!==t.stateMutability?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${o(t.outputs)})`:""}`:"event"===t.type?`event ${t.name}(${o(t.inputs)})`:"error"===t.type?`error ${t.name}(${o(t.inputs)})`:"constructor"===t.type?`constructor(${o(t.inputs)})${"payable"===t.stateMutability?" payable":""}`:"fallback"===t.type?"fallback()":"receive() external payable")};function l(e){return a(c(e))}},69509:function(e,t,n){"use strict";n.d(t,{N7:function(){return s}});let r=new Map,i=new Map,a=0;function s(e,t,n){let s=++a,o=()=>r.get(e)||[],u=()=>{let t=o();r.set(e,t.filter(e=>e.id!==s))},c=()=>{let t=i.get(e);1===o().length&&t&&t(),u()},l=o();if(r.set(e,[...l,{id:s,fns:t}]),l&&l.length>0)return c;let f={};for(let e in t)f[e]=(...t)=>{let n=o();if(0!==n.length)for(let r of n)r.fns[e]?.(...t)};let d=n(f);return"function"==typeof d&&i.set(e,d),c}},54580:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(8256);function i(e,{emitOnBegin:t,initialWaitTime:n,interval:i}){let a=!0,s=()=>a=!1;return(async()=>{let o;t&&(o=await e({unpoll:s}));let u=await n?.(o)??i;await (0,r.D)(u);let c=async()=>{a&&(await e({unpoll:s}),await (0,r.D)(i),c())};c()})(),s}},40946:function(e,t,n){"use strict";n.d(t,{S:function(){return i}});let r=new Map;
40function i({fn:e,id:t,shouldSplitBatch:n,wait:i=0,sort:a}){let s=async()=>{let t=c();o();let n=t.map(({args:e})=>e);0!==n.length&&e(n).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let n=0;n<t.length;n++){let{pendingPromise:r}=t[n];r.resolve?.([e[n],e])}}).catch(e=>{for(let n=0;n<t.length;n++){let{pendingPromise:r}=t[n];r.reject?.(e)}})},o=()=>r.delete(t),u=()=>c().map(({args:e})=>e),c=()=>r.get(t)||[],l=e=>r.set(t,[...c(),e]);return{flush:o,async schedule(e){let t={},r=new Promise((e,n)=>{t.resolve=e,t.reject=n});return(n?.([...u(),e])&&s(),c().length>0)?l({args:e,pendingPromise:t}):(l({args:e,pendingPromise:t}),setTimeout(s,i)),r}}}},30751:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(8256);function i(e,{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}={}){return new Promise((a,s)=>{let o=async({count:u=0}={})=>{let c=async({error:e})=>{let n="function"==typeof t?t({count:u,error:e}):t;n&&await (0,r.D)(n),o({count:u+1})};try{let t=await e();a(t)}catch(e){if(u<n&&await i({count:u,error:e}))return c({error:e});s(e)}};o()})}},44879:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=(e,t,n)=>JSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},169:function(e,t,n){"use strict";n.d(t,{F:function(){return u}});var r=n(61365),i=n(89995),a=n(81651),s=n(29620),o=n(39573);function u(e){let{account:t,gasPrice:n,maxFeePerGas:u,maxPriorityFeePerGas:c,to:l}=e,f=t?(0,r.T)(t):void 0;if(f&&!(0,o.U)(f.address))throw new i.b({address:f.address});if(l&&!(0,o.U)(l))throw new i.b({address:l});if(void 0!==n&&(void 0!==u||void 0!==c))throw new s.xY;if(u&&u>2n**256n-1n)throw new a.Hh({maxFeePerGas:u});if(c&&u&&c>u)throw new a.cs({maxFeePerGas:u,maxPriorityFeePerGas:c})}},61534:function(e,t,n){"use strict";n.d(t,{cj:function(){return f},iC:function(){return l}});var r=n(39302),i=n(89995),a=n(39573),s=n(16425),o=n(43002);let u=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,c=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function l(e){let{domain:t,message:n,primaryType:l,types:f}=e,d=(e,t)=>{for(let n of e){let{name:e,type:l}=n,h=t[e],b=l.match(c);if(b&&("number"==typeof h||"bigint"==typeof h)){let[e,t,n]=b;(0,o.eC)(h,{signed:"int"===t,size:parseInt(n)/8})}if("address"===l&&"string"==typeof h&&!(0,a.U)(h))throw new i.b({address:h});let p=l.match(u);if(p){let[e,t]=p;if(t&&(0,s.d)(h)!==parseInt(t))throw new r.KY({expectedSize:parseInt(t),givenSize:(0,s.d)(h)})}let m=f[l];m&&d(m,h)}};f.EIP712Domain&&t&&d(f.EIP712Domain,t),"EIP712Domain"!==l&&d(f[l],n)}function f({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},"number"==typeof e?.chainId&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},83901:function(e,t,n){"use strict";n.d(t,{d:function(){return a}});var r=n(23895),i=n(40595);function a(e,t="wei"){return(0,i.b)(e,r.ez[t])}},86622:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(23895),i=n(40595);function a(e,t="wei"){return(0,i.b)(e,r.Zn[t])}},40595:function(e,t,n){"use strict";function r(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,a]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${a?`.${a}`:""}`}n.d(t,{b:function(){return r}})},8256:function(e,t,n){"use strict";async function r(e){return new Promise(t=>setTimeout(t,e))}n.d(t,{D:function(){return r}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.