1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[363],{493:(e,t,r)=>{r.d(t,{A:()=>o,B:()=>i});var n=r(67132);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new n.d_(e.type);return`${e.name}(${o(e.inputs,{includeName:t})})`}function o(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},760:(e,t,r)=>{r.d(t,{b:()=>i});var n=r(53645);function i(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>!0}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{let u=async({error:e})=>{let r="function"==typeof t?t({count:c,error:e}):t;r&&await (0,n.u)(r),a({count:c+1})};try{let t=await e();i(t)}catch(e){if(c<r&&await o({count:c,error:e}))return u({error:e});s(e)}};a()})}},956:(e,t,r)=>{r.d(t,{Lj:()=>a,WB:()=>u,uL:()=>c});var n=r(10635),i=r(74606),o=r(39282),s=r(94900);let a={"0x0":"reverted","0x1":"success"};function c(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,o.e)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.ME)(e.transactionIndex):null,status:e.status?a[e.status]:null,type:e.type?s.b4[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}let u=(0,i.q)("transactionReceipt",c)},2538:(e,t,r)=>{t.I0=t.DH=t.NX=t.u8=t.cY=void 0,t.av=t.O6=t.w3=t.Wg=void 0;let n=r(65714);function i(e){if(!(e instanceof Uint8Array))throw TypeError("b must be a Uint8Array")}function o(e){return i(e),n.Buffer.from(e.buffer,e.byteOffset,e.length)}class s{constructor(e,t){if(!Number.isInteger(e))throw TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function a(e,t){return t.property?e+"["+t.property+"]":e}class c extends s{isCount(){throw Error("ExternalLayout is abstract")}}class u extends c{constructor(e,t=0,r){if(!(e instanceof s))throw TypeError("layout must be a Layout");if(!Number.isInteger(t))throw TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof l||this.layout instanceof d}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}}class l extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntLE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntLE(e,r,this.span),this.span}}class d extends s{constructor(e,t){if(super(e,t),6<this.span)throw RangeError("span must not exceed 6 bytes")}decode(e,t=0){return o(e).readUIntBE(t,this.span)}encode(e,t,r=0){return o(t).writeUIntBE(e,r,this.span),this.span}}function f(e){let t=Math.floor(e/0x100000000);return{hi32:t,lo32:e-0x100000000*t}}function m(e,t){return 0x100000000*e+t}class p extends s{constructor(e){super(8,e)}decode(e,t=0){let r=o(e),n=r.readUInt32LE(t);return m(r.readUInt32LE(t+4),n)}encode(e,t,r=0){let n=f(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeUInt32LE(n.hi32,r+4),8}}class h extends s{constructor(e){super(8,e)}decode(e,t=0){let r=o(e),n=r.readUInt32LE(t);return m(r.readInt32LE(t+4),n)}encode(e,t,r=0){let n=f(e),i=o(t);return i.writeUInt32LE(n.lo32,r),i.writeInt32LE(n.hi32,r+4),8}}class g extends s{constructor(e,t,r){if(!(e instanceof s))throw TypeError("elementLayout must be a Layout");if(!(t instanceof c&&t.isCount()||Number.isInteger(t)&&0<=t))throw TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;t instanceof c||!(0<e.span)||(n=t*e.span),super(n,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,n=this.count;if(n instanceof c&&(n=n.decode(e,t)),0<this.elementLayout.span)r=n*this.elementLayout.span;else{let i=0;for(;i<n;)r+=this.elementLayout.getSpan(e,t+r),++i}return r}decode(e,t=0){let r=[],n=0,i=this.count;for(i instanceof c&&(i=i.decode(e,t));n<i;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),n+=1;return r}encode(e,t,r=0){let n=this.elementLayout,i=e.reduce((e,i)=>e+n.encode(i,t,r+e),0);return this.count instanceof c&&this.count.encode(e.length,t,r),i}}class y extends s{constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((e,t)=>
vendor: 4,357 bytes, line 1
1e&&t instanceof s,!0)))throw TypeError("fields must be array of Layout instances");for(let n of("boolean"==typeof t&&void 0===r&&(r=t,t=void 0),e))if(0>n.span&&void 0===n.property)throw Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=e.reduce((e,t)=>e+t.getSpan(),0)}catch(e){}super(n,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((r,n)=>{let i=n.getSpan(e,t);return t+=i,r+i},0)}catch(e){throw RangeError("indeterminate span")}return r}decode(e,t=0){i(e);let r=this.makeDestinationObject();for(let n of this.fields)if(void 0!==n.property&&(r[n.property]=n.decode(e,t)),t+=n.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let n=r,i=0,o=0;for(let n of this.fields){let s=n.span;if(o=0<s?s:0,void 0!==n.property){let i=e[n.property];void 0!==i&&(o=n.encode(i,t,r),0>s&&(s=n.getSpan(t,r)))}i=r,r+=s}return i+o-n}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)void 0!==r.property&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}}function b(e){return 0>e&&(e+=0x100000000),e}class v extends s{constructor(e,t,r){if(!(e instanceof l||e instanceof d))throw TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===r&&(r=t,t=!1),4<e.span)throw RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let n=0;this._packedSetValue=function(e){return n=b(e),this},this._packedGetValue=function(){return n}}decode(e,t=0){let r=this.makeDestinationObject(),n=this.word.decode(e,t);for(let t of(this._packedSetValue(n),this.fields))void 0!==t.property&&(r[t.property]=t.decode(e));return r}encode(e,t,r=0){let n=this.word.decode(t,r);for(let t of(this._packedSetValue(n),this.fields))if(void 0!==t.property){let r=e[t.property];void 0!==r&&t.encode(r)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new w(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new A(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}}class w{constructor(e,t,r){if(!(e instanceof v))throw TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw TypeError("bits must be positive integer");let n=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>n)throw Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=0xffffffff),this.start=i,this.container.msb&&(this.start=n-i-t),this.wordMask=b(this.valueMask<<this.start),this.property=r}decode(e,t){return b(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==b(e&this.valueMask))throw TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=b(e<<this.start);this.container._packedSetValue(b(t&~this.wordMask)|r)}}class A extends w{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e*=1),super.encode(e)}}class x extends s{constructor(e,t){if(!(e instanceof c&&e.isCount()||Number.isInteger(e)&&0<=e))throw TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof c||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),o(e).slice(t,t+r)}encode(e,t,r){let n=this.length;if(this.length instanceof c&&(n=e.length),!(e instanceof Uint8Array&&n===e.length))throw TypeError(a("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(r+n>t.length)throw RangeError("encoding overruns Uint8Array");let i=o(e);return o(t).write(i.toString("hex"),r,n,"hex"),this.length instanceof c&&this.length.encode(n,t,r),n}}t.cY=(e,t,r)=>new u(e,t,r),t.u8=e=>new l(1,e),t.NX=e=>new l(2,e),t.DH=e=>
1new l(4,e),t.I0=e=>new p(e),t.Wg=e=>new h(e),t.w3=(e,t,r)=>new y(e,t,r),t.O6=(e,t,r)=>new g(e,t,r),t.av=(e,t)=>new x(e,t)},2622:(e,t,r)=>{let n=r(42742).v4;e.exports=function(e,t,r,i){if("string"!=typeof e)throw TypeError(e+" must be a string");let o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw TypeError(o+" must be 1 or 2");let s={method:e};if(2===o&&(s.jsonrpc="2.0"),t){if("object"!=typeof t&&!Array.isArray(t))throw TypeError(t+" must be an object, array or omitted");s.params=t}return void 0===r?s.id=("function"==typeof i.generator?i.generator:function(){return n()})(s,i):2===o&&null===r?i.notificationIdNull&&(s.id=null):s.id=r,s}},3995:(e,t,r)=>{r.d(t,{A:()=>n});function n(e,t,r){return JSON.stringify(e,(e,r)=>"function"==typeof t?t(e,r):"bigint"==typeof r?r.toString()+"#__bigint":r,r)}},4007:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exponentDecStringToDecString=t.isExponentDecString=t.isValidDecimalString=t.isValidIntegerString=void 0;let r=/^-?\d+$/,n=/^-?\d+.?\d*$/,i=/^(-?)([\d.]+)e([-+])([\d]+)$/;function o(e){let t="";for(let r=0;r<e;r++)t+="0";return t}t.isValidIntegerString=function(e){return r.test(e)},t.isValidDecimalString=function(e){return n.test(e)},t.isExponentDecString=function(e){return i.test(e)},t.exponentDecStringToDecString=function(e){let t=e.split(i);if(6!==t.length)return e;let r="-"===t[1],n=t[2],s=n.indexOf("."),a=parseInt(t[4])*("-"===t[3]?-1:1);s>=0&&(a-=n.length-s-1,n=function(e){for(;e.length>0&&"0"===e[0];)e=e.slice(1);return 0===e.length||"."===e[0]?"0"+e:e}(n.replace(".","")));let c=r?"-":"";if(!(a<0))return c+n+o(a);if(n.length>-a){let e=n.length+a;return c+(n.slice(0,e)+".")+n.slice(e)}return c+"0."+o(-(n.length+a))+n}},4171:(e,t,r)=>{r.d(t,{Dv:()=>M,FO:()=>h,If:()=>A,Ji:()=>d,Rv:()=>c,WL:()=>p,Yo:()=>b,ej:()=>f,fC:()=>T,iB:()=>u,kz:()=>s,l9:()=>y,pc:()=>o,sP:()=>P,v7:()=>E,v8:()=>w});var n=r(78771);let i=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function o(e){return i.test(e)}function s(e){return(0,n.Yv)(i,e)}let a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function c(e){return a.test(e)}function u(e){return(0,n.Yv)(a,e)}let l=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function d(e){return l.test(e)}function f(e){return(0,n.Yv)(l,e)}let m=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function p(e){return m.test(e)}function h(e){return(0,n.Yv)(m,e)}let g=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function y(e){return g.test(e)}function b(e){return(0,n.Yv)(g,e)}let v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function w(e){return v.test(e)}function A(e){return(0,n.Yv)(v,e)}let x=/^receive\(\) external payable$/;function P(e){return x.test(e)}let M=new Set(["memory","indexed","storage","calldata"]),T=new Set(["indexed"]),E=new Set(["calldata","memory","storage"])},4657:(e,t,r)=>{e.exports=i;var n=r(11238);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(!a.rpcImpl)return void setTimeout(function(){s(Error("already ended"))},0);try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return a.emit("error",e,t),s(e);if(null===r)return void a.end(!0);if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)})}catch(e){a.emit("error",e,t),setTimeout(function(){s(e)},0);return}},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},4770:(e,t,r)=>{r.d(t,{T:()=>n});function n(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let i=e[r];return"function"==typeof i?i:r=>t(e,r)}},5852:(e,t,r)=>{r.d(t,{$P:()=>c,My:()=>u,cK:()=>l,i3:()=>f,nj:()=>a});var n=r(69819),i=r(53678),o=r(10635);let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?f(e,t):"boolean"==typeof e?c(e,t):u(e,t)}function c(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,o.Sl)(r,{size:t.size}),(0,i.eV)(r,{size:t.size})):r}function u(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=s[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,o.Sl)(n,{size:t.size}),(0,i.eV)(n,{dir:"right",size:t.size})):n}function l(e,t={}){let r,{signed:o,size:s}=t,a=BigInt(e);s?r=o?(1n<<8n*BigInt(s)-1n)-1n:2n**(8n*BigInt(s))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let c="bigint"==typeof r&&o?-r-1n:0;if(r&&a>r||a<c){let t="bigint"==typeof e?"n":"";throw new n.Ty({max:r?`${r}${t}`:void 0,min:`${c}${t}`,signed:o,size:s,value:`${e}${t}`})}let u=`0x${(o&&a<0?(1n<<BigInt(8*s))+BigInt(a):a).toString(16)}`;return s?(0,i.eV)(u,{size:s}):u}let d=new TextEncoder;function f(e,t={}){return u(d.encode(e),t)}},6153:(e,t,r)=>{r.d(t,{DH:()=>i,Fc:()=>u,O8:()=>o,Ow:()=>s,Vw:()=>d,ZJ:()=>l,ld:()=>f,qv:()=>a});var n=r(34255);let i=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),o=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),s=(e,t)=>e<<32-t|e>>>t,a=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0],c=e=>e<<24&0xff000000|e<<8&0xff0000|e>>>8&65280|e>>>24&255;function u(e){for(let t=0;t<e.length;t++)e[t]=c(e[t])}function l(e){return"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)),(0,n.ee)(e),e}class d{clone(){return this._cloneInto()}}function f(e){let t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}},6330:(e,t,r)=>{r.d(t,{RR:()=>a,pw:()=>s,sM:()=>o});var n=r(60320),i=r(97461);class o extends i.C{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class s extends i.C{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class a extends i.C{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.Q)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}},6625:(e,t,r)=>{r.d(t,{FH:()=>a,HF:()=>s,uk:()=>n,wu:()=>i,ye:()=>c,yy:()=>u});var n=e=>new Promise(t=>setTimeout(t,e));function i(e){return o(e,e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()))}function o(e,t){return Array.isArray(e)?e.map(e=>o(e,t)):null!==e&&"object"==typeof e?Object.keys(e).reduce((r,n)=>(r[t(n)]=o(e[n],t),r),{}):e}var s=({apiUrl:e,apiKey:t,apiHeaders:r})=>{e?.endsWith("/")||(e+="/");let n=new Headers({"content-type":"application/json"});t&&n.set("authorization",t),r&&new Headers(r).forEach((e,t)=>{n.set(t,e)});let i=async e=>{let t=e.headers.get("content-type"),r=t?.includes("application/json")?await e.json():await e.text();if(!e.ok){let t=Error("object"==typeof r&&r?.message?r.message:e.statusText);throw r?.code&&(t.code=r.code),r?.details&&(t.details=r.details),t}return r};return{get:async(t,r,o)=>{t?.startsWith("/")&&console.warn("paths that start with / are treated as absolute paths, please remove the leading / if this path is intended to be a relative path");let s=new URL(t??"",e);return r&&"object"==typeof r&&Object.entries(r).forEach(([e,t])=>{null!=t&&(Array.isArray(t)?t.forEach(t=>{s.searchParams.append(e,String(t))}):s.searchParams.append(e,String(t)))}),i(await fetch(s.toString(),{method:"GET",headers:n,signal:o}))},post:async(t,r={},o)=>(t?.startsWith("/")&&console.warn("paths that start with / are treated as absolute paths, please remove the leading / if this path is intended to be a relative path"),i(await fetch(new URL(t,e).toString(),{method:"POST",headers:n,body:JSON.stringify(r),signal:o})))}};function a({methodName:e,path:t,onSuccess:r,method:n="get",transformResponse:a}){return function({path:e,method:t="get",onSuccess:r,transformResponse:n}){let a=null;return async c=>{let{apiKey:l,apiUrl:d,apiHeaders:f,abortDuplicateRequests:m,...p}=c??{},h=u.client;(l||d||f||void 0===h)&&(h=s({apiUrl:d||"https://api.skip.build",apiKey:l,apiHeaders:f})),u.apiCalled=!0,m&&a&&!a?.signal?.aborted&&a?.abort(),a=new AbortController;try{let s=await h[t](e,p?o(p,e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()):void 0,a.signal),c=i(s??{}),u=n?n(c):c;return r?.(u,p),u}catch(e){if("AbortError"===e.name)console.log("Request was cancelled");else throw console.error("Error:",e),e}}}({path:t,method:n,onSuccess:r,transformResponse:a})}function c({methodName:e,path:t,method:r="get",onSuccess:i,onError:o,isSuccess:s=()=>!0,maxRetries:c=10,retryInterval:u=1e3,backoffMultiplier:l=2,throwOnError:d=!1}){let f=async f=>{let m,p=0;for(;p<c;){try{let n=await a({methodName:e,path:t,method:r})(f);if(n&&s(n))return i?.(n,p),n}catch(e){if(m=e,o?.(e,p),d)throw e}let c=u*Math.pow(l,p);await n(c),p++}throw m??Error("pollingApi: max retries exceeded")};return e=>f(e)}var u=class{static client;static chainIdsToAffiliates;static cumulativeAffiliateFeeBPS="0";static initialized=!1;static apiCalled=!1}},7137:(e,t,r)=>{r.d(t,{h:()=>p,k:()=>g});
vendor: 7,016 bytes, line 1
1var n=r(67132),i=r(83210),o=r(97461),s=r(69819),a=r(45667),c=r(16189),u=r(53678),l=r(34960),d=r(7565),f=r(5852),m=r(54743);function p(e,t){if(e.length!==t.length)throw new n.YE({expectedLength:e.length,givenLength:t.length});let r=h(function({params:e,values:t}){let r=[];for(let p=0;p<e.length;p++)r.push(function e({param:t,value:r}){let p=g(t.type);if(p){let[i,o]=p;return function(t,{length:r,param:i}){let o=null===r;if(!Array.isArray(t))throw new n.dm(t);if(!o&&t.length!==r)throw new n.Nc({expectedLength:r,givenLength:t.length,type:`${i.type}[${r}]`});let s=!1,a=[];for(let r=0;r<t.length;r++){let n=e({param:i,value:t[r]});n.dynamic&&(s=!0),a.push(n)}if(o||s){let e=h(a);if(o){let t=(0,f.cK)(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?(0,c.xW)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,c.xW)(a.map(({encoded:e})=>e))}}(r,{length:i,param:{...t,type:o}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,i=[];for(let o=0;o<r.components.length;o++){let s=r.components[o],a=Array.isArray(t)?o:s.name,c=e({param:s,value:t[a]});i.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?h(i):(0,c.xW)(i.map(({encoded:e})=>e))}}(r,{param:t});if("address"===t.type){var y=r;if(!(0,a.P)(y))throw new i.M({address:y});return{dynamic:!1,encoded:(0,u.db)(y.toLowerCase())}}if("bool"===t.type){var b=r;if("boolean"!=typeof b)throw new o.C(`Invalid boolean value: "${b}" (type: ${typeof b}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.db)((0,f.$P)(b))}}if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=m.Ge.exec(t.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new s.Ty({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,f.cK)(e,{size:32,signed:t})}}(r,{signed:e,size:Number(n)})}if(t.type.startsWith("bytes"))return function(e,{param:t}){let[,r]=t.type.split("bytes"),i=(0,l.E)(e);if(!r){let t=e;return i%32!=0&&(t=(0,u.db)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,c.xW)([(0,u.db)((0,f.cK)(i,{size:32})),t])}}if(i!==Number.parseInt(r,10))throw new n.gH({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:(0,u.db)(e,{dir:"right"})}}(r,{param:t});if("string"===t.type){var v=r;let e=(0,f.i3)(v),t=Math.ceil((0,l.E)(e)/32),n=[];for(let r=0;r<t;r++)n.push((0,u.db)((0,d.di)(e,32*r,(r+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,c.xW)([(0,u.db)((0,f.cK)((0,l.E)(e),{size:32})),...n])}}throw new n.nK(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}({param:e[p],value:t[p]}));return r}({params:e,values:t}));return 0===r.length?"0x":r}function h(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=(0,l.E)(i)}let r=[],n=[],i=0;for(let o=0;o<e.length;o++){let{dynamic:s,encoded:a}=e[o];s?(r.push((0,f.cK)(t+i,{size:32})),n.push(a),i+=(0,l.E)(a)):r.push(a)}return(0,c.xW)([...r,...n])}function g(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},7499:(e,t,r)=>{r.d(t,{lY:()=>A});var n=r(34255);let i=BigInt(0x100000000-1),o=BigInt(32);var s=r(6153);let a=[],c=[],u=[],l=BigInt(0),d=BigInt(1),f=BigInt(2),m=BigInt(7),p=BigInt(256),h=BigInt(113);for(let e=0,t=d,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),c.push((e+1)*(e+2)/2%64);let i=l;for(let e=0;e<7;e++)(t=(t<<d^(t>>m)*h)%p)&f&&(i^=d<<(d<<BigInt(e))-d);u.push(i)}let[g,y]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let s=0;s<e.length;s++){let{h:a,l:c}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>o&i)}:{h:0|Number(e>>o&i),l:0|Number(e&i)}}(e[s],t);[r[s],n[s]]=[a,c]}return[r,n]}(u,!0),b=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),v=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);class w extends s.Vw{constructor(e,t,r,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.ai)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.DH)(this.state)}keccak(){s.qv||(0,s.Fc)(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=b(o,s,1)^r[n],c=v(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=c[r],o=b(t,i,n),s=v(t,i,n),u=a[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}(this.state32,this.rounds),s.qv||(0,s.Fc)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.t2)(this);let{blockLen:t,state:r}=this,i=(e=(0,s.ZJ)(e)).length;for(let n=0;n<i;){let o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.t2)(this,!1),(0,n.ee)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.ai)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.CG)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}let A=(0,s.ld)(()=>new w(136,1,32))},7565:(e,t,r)=>{r.d(t,{A1:()=>u,di:()=>s,iN:()=>l});var n=r(57842),i=r(73906),o=r(34960);function s(e,t,r,{strict:n}={}){return(0,i.q)(e,{strict:!1})?l(e,t,r,{strict:n}):u(e,t,r,{strict:n})}function a(e,t){if("number"==typeof t&&t>0&&t>(0,o.E)(e)-1)throw new n.ii({offset:t,position:"start",size:(0,o.E)(e)})}function c(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,o.E)(e)!==r-t)throw new n.ii({offset:r,position:"end",size:(0,o.E)(e)})}function u(e,t,r,{strict:n}={}){a(e,t);let i=e.slice(t,r);return n&&c(i,t,r),i}function l(e,t,r,{strict:n}={}){a(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&c(i,t,r),i}},7949:(e,t,r)=>{r.d(t,{yH:()=>u});
1var n=r(83210),i=r(57842),o=r(47091),s=r(45667),a=r(5852);function c(e){if(e&&0!==e.length)return e.reduce((e,{slot:t,value:r})=>{if(66!==t.length)throw new i.NV({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new i.NV({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function u(e){if(!e)return;let t={};for(let{address:r,...i}of e){if(!(0,s.P)(r,{strict:!1}))throw new n.M({address:r});if(t[r])throw new o.Hi({address:r});t[r]=function(e){let{balance:t,nonce:r,state:n,stateDiff:i,code:s}=e,u={};if(void 0!==s&&(u.code=s),void 0!==t&&(u.balance=(0,a.cK)(t)),void 0!==r&&(u.nonce=(0,a.cK)(r)),void 0!==n&&(u.state=c(n)),void 0!==i){if(u.state)throw new o.ft;u.stateDiff=c(i)}return u}(i)}return t}},8537:(e,t,r)=>{r.d(t,{A:()=>n});let n=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},8641:(e,t,r)=>{r.d(t,{L:()=>i});var n=r(98770);function i(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";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 n.Vg({transaction:e})}},8819:(e,t,r)=>{r.d(t,{a:()=>m});var n=r(72979),i=r(6330),o=r(59222),s=r(76385),a=r(94900),c=r(24061),u=r(4770),l=r(95084),d=r(27465),f=r(76152);async function m(e,t){let{account:r=e.account,accessList:m,authorizationList:p,chain:h=e.chain,blobVersionedHashes:g,blobs:y,data:b,gas:v,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:x,maxPriorityFeePerGas:P,nonce:M,nonceManager:T,to:E,type:k,value:S,..._}=t,I=await (async()=>{if(!r||!T||void 0!==M)return M;let t=(0,n.J)(r),i=h?h.id:await (0,u.T)(e,f.T,"getChainId")({});return await T.consume({address:t.address,chainId:i,client:e})})();(0,l.c)(t);let B=h?.formatters?.transactionRequest?.format,C=(B||c.Bv)({...(0,s.o)(_,{format:B}),account:r?(0,n.J)(r):void 0,accessList:m,authorizationList:p,blobs:y,blobVersionedHashes:g,data:b,gas:v,gasPrice:w,maxFeePerBlobGas:A,maxFeePerGas:x,maxPriorityFeePerGas:P,nonce:I,to:E,type:k,value:S},"fillTransaction");try{let r=await e.request({method:"eth_fillTransaction",params:[C]}),n=(h?.formatters?.transaction?.format||a.uP)(r.tx);delete n.blockHash,delete n.blockNumber,delete n.r,delete n.s,delete n.transactionIndex,delete n.v,delete n.yParity,n.data=n.input,n.gas&&(n.gas=t.gas??n.gas),n.gasPrice&&(n.gasPrice=t.gasPrice??n.gasPrice),n.maxFeePerBlobGas&&(n.maxFeePerBlobGas=t.maxFeePerBlobGas??n.maxFeePerBlobGas),n.maxFeePerGas&&(n.maxFeePerGas=t.maxFeePerGas??n.maxFeePerGas),n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas??n.maxPriorityFeePerGas),n.nonce&&(n.nonce=t.nonce??n.nonce);let o=await (async()=>{if("function"==typeof h?.fees?.baseFeeMultiplier){let r=await (0,u.T)(e,d.g,"getBlock")({});return h.fees.baseFeeMultiplier({block:r,client:e,request:t})}return h?.fees?.baseFeeMultiplier??1.2})();if(o<1)throw new i.sM;let s=o.toString().split(".")[1]?.length??0,c=10**s,l=e=>e*BigInt(Math.ceil(o*c))/BigInt(c);return n.maxFeePerGas&&!t.maxFeePerGas&&(n.maxFeePerGas=l(n.maxFeePerGas)),n.gasPrice&&!t.gasPrice&&(n.gasPrice=l(n.gasPrice)),{raw:r.raw,transaction:{from:C.from,...n}}}catch(r){throw(0,o.p)(r,{...t,chain:e.chain})}}},9424:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromHex=t.toHex=void 0,t.toHex=function(e){let t="";for(let r of e)t+=("0"+r.toString(16)).slice(-2);return t},t.fromHex=function(e){if(e.length%2!=0)throw Error("hex string length must be a multiple of 2");let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r,i=e.slice(n,n+2);if(!i.match(/[0-9a-f]{2}/i))throw Error("hex string contains invalid characters");t[r]=parseInt(i,16)}return t}},9580:(e,t,r)=>{r.d(t,{H4:()=>g,v8:()=>p,$$:()=>h});var n=r(67132),i=r(83210),o=r(8537),s=r(97461);class a extends s.C{constructor({domain:e}){super(`Invalid domain "${(0,o.A)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class c extends s.C{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class u extends s.C{constructor({type:e}){super(`Struct type "${e}
1" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}var l=r(45667),d=r(34960),f=r(5852),m=r(54743);function p(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},a=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},c=(()=>{if("EIP712Domain"!==n)return s(i[n],r)})();return(0,o.A)({domain:a,message:c,primaryType:n,types:i})}function h(e){let{domain:t,message:r,primaryType:o,types:s}=e,p=(e,t)=>{for(let r of e){let{name:e,type:o}=r,a=t[e],c=o.match(m.Ge);if(c&&("number"==typeof a||"bigint"==typeof a)){let[e,t,r]=c;(0,f.cK)(a,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===o&&"string"==typeof a&&!(0,l.P)(a))throw new i.M({address:a});let h=o.match(m.BD);if(h){let[e,t]=h;if(t&&(0,d.E)(a)!==Number.parseInt(t,10))throw new n.BI({expectedSize:Number.parseInt(t,10),givenSize:(0,d.E)(a)})}let g=s[o];g&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new u({type:e})}(o),p(g,a))}};if(s.EIP712Domain&&t){if("object"!=typeof t)throw new a({domain:t});p(s.EIP712Domain,t)}if("EIP712Domain"!==o)if(s[o])p(s[o],r);else throw new c({primaryType:o,types:s})}function g({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},10313:(e,t,r)=>{r.d(t,{T:()=>T});var n=r(4171),i=r(27908),o=r(70490);function s(e){let t=(0,i.e)(e),r=[],s=e.length;for(let i=0;i<s;i++){let s=e[i];(0,n.WL)(s)||r.push((0,o.uT)(s,t))}return r}var a=r(26143),c=r(72979),u=r(56555),l=r(31859),d=r(97461),f=r(84383),m=r(89304),p=r(94744),h=r(81746),g=r(45250),y=r(81731),b=r(5852),v=r(90206),w=r(76385),A=r(24061),x=r(19711),P=r(7949),M=r(95084);async function T(e,t){let{account:n=e.account,authorizationList:i,batch:o=!!e.batch?.multicall,blockNumber:u,blockTag:p=e.experimental_blockTag??"latest",accessList:g,blobs:y,blockOverrides:x,code:T,data:S,factory:_,factoryData:I,gas:B,gasPrice:C,maxFeePerBlobGas:R,maxFeePerGas:O,maxPriorityFeePerGas:U,nonce:D,to:N,value:$,stateOverride:F,...j}=t,z=n?(0,c.J)(n):void 0;if(T&&(_||I))throw new d.C("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(T&&N)throw new d.C("Cannot provide both `code` & `to` as parameters.");let L=T&&S,q=_&&I&&N&&S,V=L||q,H=L?k({code:T,data:S}):q?function(e){let{data:t,factory:r,factoryData:n,to:i}=e;return(0,h.m)({abi:s(["constructor(address, bytes, address, bytes)"]),bytecode:l.WN,args:[i,t,r,n]})}({data:S,factory:_,factoryData:I,to:N}):S;try{(0,M.c)(t);let r=("bigint"==typeof u?(0,b.cK)(u):void 0)||p,n=x?a.J(x):void 0,s=(0,P.yH)(F),c=e.chain?.formatters?.transactionRequest?.format,l=(c||A.Bv)({...(0,w.o)(j,{format:c}),accessList:g,account:z,authorizationList:i,blobs:y,data:H,gas:B,gasPrice:C,maxFeePerBlobGas:R,maxFeePerGas:O,maxPriorityFeePerGas:U,nonce:D,to:V?void 0:N,value:$},"call");if(o&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:l})&&!s&&!n)try{return await E(e,{...l,blockNumber:u,blockTag:p})}catch(e){if(!(e instanceof f.YE)&&!(e instanceof f.rj))throw e}let d=(()=>{let e=[l,r];return s&&n?[...e,s,n]:s?[...e,s]:n?[...e,{},n]:e})(),m=await e.request({method:"eth_call",params:d});if("0x"===m)return{data:void 0};return{data:m}}catch(s){let n=function(e){if(!(e instanceof d.C))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(s),{offchainLookup:i,offchainLookupSignature:o}=await r.e(4290).then(r.bind(r,24290));if(!1!==e.ccipRead&&n?.slice(0,10)===o&&N)return{data:await i(e,{data:n,to:N})};if(V&&n?.slice(0,10)==="0x101bb98d")throw new m.Po({factory:_});throw(0,v.d)(s,{...t,account:z,chain:e.chain})}}async function E(e,t){let{batchSize:r=1024,deployless:n=!1,wait:i=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:o,blockTag:s=e.experimental_blockTag??"latest",data:a,to:c}=t,d=(()=>
vendor: 3,433 bytes, line 1
1{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return(0,y.M)({blockNumber:o,chain:e.chain,contract:"multicall3"});throw new f.YE})(),h=("bigint"==typeof o?(0,b.cK)(o):void 0)||s,{schedule:v}=(0,x.u)({id:`${e.uid}.${h}`,wait:i,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,g.p)({abi:u.v2,args:[r],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{...null===d?{data:k({code:l.Ez,data:n})}:{to:d,data:n}},h]});return(0,p.e)({abi:u.v2,args:[r],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:w,success:A}]=await v({data:a,to:c});if(!A)throw new m.$S({data:w});return"0x"===w?{data:void 0}:{data:w}}function k(e){let{code:t,data:r}=e;return(0,h.m)({abi:s(["constructor(bytes, bytes)"]),bytecode:l.LX,args:[t,r]})}},10635:(e,t,r)=>{r.d(t,{ME:()=>u,Nx:()=>c,Sl:()=>s,uU:()=>a});var n=r(69819),i=r(34960),o=r(84437);function s(e,{size:t}){if((0,i.E)(e)>t)throw new n.u({givenSize:(0,i.E)(e),maxSize:t})}function a(e,t={}){let{signed:r}=t;t.size&&s(e,{size:t.size});let n=BigInt(e);if(!r)return n;let i=(e.length-2)/2;return n<=(1n<<8n*BigInt(i)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(e,t={}){let r=e;if(t.size&&(s(r,{size:t.size}),r=(0,o.B)(r)),"0x00"===(0,o.B)(r))return!1;if("0x01"===(0,o.B)(r))return!0;throw new n.H2(r)}function u(e,t={}){return Number(a(e,t))}},10727:(e,t,r)=>{r.d(t,{DS:()=>x,OG:()=>w,Ph:()=>l,SJ:()=>P,aK:()=>b,d6:()=>s,dJ:()=>v,eV:()=>a,ex:()=>h,fg:()=>A,lX:()=>d,lq:()=>f,nC:()=>g,qj:()=>p,x:()=>M,z:()=>m,zW:()=>c});var n=r(28599);let i=BigInt(0),o=BigInt(1);function s(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function a(e,t,r=""){let i=(0,n.aY)(e),o=e?.length,s=void 0!==t;if(!i||s&&o!==t)throw Error((r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(i?`length=${o}`:`type=${typeof e}`));return e}function c(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function u(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?i:BigInt("0x"+e)}function l(e){return u((0,n.My)(e))}function d(e){return(0,n.DO)(e),u((0,n.My)(Uint8Array.from(e).reverse()))}function f(e,t){return(0,n.aT)(e.toString(16).padStart(2*t,"0"))}function m(e,t){return f(e,t).reverse()}function p(e,t,r){let i;if("string"==typeof t)try{i=(0,n.aT)(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if((0,n.aY)(t))i=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let o=i.length;if("number"==typeof r&&o!==r)throw Error(e+" of length "+r+" expected, got "+o);return i}function h(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r}function g(e){return Uint8Array.from(e)}let y=e=>"bigint"==typeof e&&i<=e;function b(e,t,r,n){if(!(y(t)&&y(r)&&y(n))||!(r<=t)||!(t<n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function v(e){let t;for(t=0;e>i;e>>=o,t+=1);return t}let w=e=>(o<<BigInt(e))-o;function A(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e),s=i(e),a=i(e),c=0,u=()=>{s.fill(1),a.fill(0),c=0},l=(...e)=>
1r(a,s,...e),d=(e=i(0))=>{a=l(o(0),e),s=l(),0!==e.length&&(a=l(o(1),e),s=l())},f=()=>{if(c++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(s=l()).slice();r.push(t),e+=s.length}return(0,n.Id)(...r)};return(e,t)=>{let r;for(u(),d(e);!(r=t(f()));)d();return u(),r}}function x(e,t,r={}){if(!e||"object"!=typeof e)throw Error("expected valid options object");function n(t,r,n){let i=e[t];if(n&&void 0===i)return;let o=typeof i;if(o!==r||null===i)throw Error(`param "${t}" is invalid: expected ${r}, got ${o}`)}Object.entries(t).forEach(([e,t])=>n(e,t,!1)),Object.entries(r).forEach(([e,t])=>n(e,t,!0))}let P=()=>{throw Error("not implemented")};function M(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let o=e(r,...n);return t.set(r,o),o}}},11238:function(e,t,r){function n(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&n(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}t.asPromise=r(81463),t.base64=r(11735),t.EventEmitter=r(87081),t.float=r(57424),t.inquire=r(52777),t.utf8=r(17641),t.pool=r(3145),t.LongBits=r(12941),t.isNode=!!(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),t.global=t.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.isSet=function(e,t){var r=e[t];return!!(null!=r&&e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},t.merge=n,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=i,t.ProtocolError=i("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;if(!e){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}}},11609:(e,t,r)=>{r.d(t,{T:()=>l});var n=r(19113),i=r(92782),o=r(63109),s=r(50342),a=r(34960),c=r(87082),u=r(5852);function l(e){let{data:t,kzg:r,to:l}=e,d=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),r="string"==typeof e.data?(0,c.aT)(e.data):e.data,n=(0,a.E)(r);if(!n)throw new o.zF;if(n>761855)throw new o.iq({maxSize:761855,size:n});let i=[],l=!0,d=0;for(;l;){let e=(0,s.l)(new Uint8Array(131072)),t=0;for(;t<4096;){let n=r.slice(d,d+31);if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),l=!1;break}t++,d+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,u.My)(e.bytes))}({data:t,to:l}),f=e.commitments??(0,n.S)({blobs:d,kzg:r,to:l}),m=e.proofs??(0,i.t)({blobs:d,commitments:f,kzg:r,to:l}),p=[];for(let e=0;e<d.length;e++)p.push({blob:d[e],commitment:f[e],proof:m[e]}
1);return p}},12880:(e,t,r)=>{r.d(t,{L:()=>n});async function n(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}},12941:(e,t,r)=>{e.exports=i;var n=r(11238);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/0x100000000>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>0xffffffff&&(r=0,++n>0xffffffff&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e))if(!n.Long)return i.fromNumber(parseInt(e,10));else e=n.Long.fromString(e);return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+0x100000000*r)}return this.lo+0x100000000*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},13387:(e,t,r)=>{r.d(t,{I:()=>i,R:()=>n});let n=e=>e,i=e=>e},13949:(e,t,r)=>{r.d(t,{b:()=>l,o:()=>u});var n=r(83210),i=r(87082),o=r(64092),s=r(99053),a=r(45667);let c=new s.A(8192);function u(e,t){if(c.has(`${e}.${t}`))return c.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,o.S)((0,i.Af)(r),"bytes"),s=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&s[e]&&(s[e]=s[e].toUpperCase()),(15&n[e>>1])>=8&&s[e+1]&&(s[e+1]=s[e+1].toUpperCase());let a=`0x${s.join("")}`;return c.set(`${e}.${t}`,a),a}function l(e,t){if(!(0,a.P)(e,{strict:!1}))throw new n.M({address:e});return u(e,t)}},13957:(e,t,r)=>{t.Pq=t.nk=t.Ey=void 0,r(33082);var n=r(60456);Object.defineProperty(t,"Ey",{enumerable:!0,get:function(){return n.fromBase64}}),Object.defineProperty(t,"nk",{enumerable:!0,get:function(){return n.toBase64}}),r(85628),r(9424),r(26854);var i=r(32704);Object.defineProperty(t,"Pq",{enumerable:!0,get:function(){return i.toUtf8}})},14351:(e,t,r)=>{r.d(t,{Ci:()=>s,J8:()=>a,MU:()=>c});var n=r(8537),i=r(97461),o=r(13387);class s extends i.C{constructor({body:e,cause:t,details:r,headers:i,status:s,url:a}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${(0,o.I)(a)}`,e&&`Request body: ${(0,n.A)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=a}}i.C;class a extends i.C{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,o.I)(r)}`,`Request body: ${(0,n.A)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}i.C;class c extends i.C{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,o.I)(t)}`,`Request body: ${(0,n.A)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}},14352:(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.integerStringToUSLocaleString=void 0,t.integerStringToUSLocaleString=function(e){if(e.indexOf(".")>=0)throw Error(`${e} is not integer`);if("undefined"!=typeof BigInt)return BigInt(e).toLocaleString("en-US");let t=[];for(let r=e.length;r>0;r-=3)t.push(e.slice(Math.max(0,r-3),r));return t.reverse().join(",")}},14697:(e,t,r)=>{r.d(t,{D0:()=>S,LH:()=>k,Tp:()=>I,dQ:()=>x,jr:()=>M,pS:()=>T,qy:()=>B,zH:()=>g,zi:()=>h});var n=r(10727),i=r(28599);let o=BigInt(0),s=BigInt(1),a=BigInt(2),c=BigInt(3),u=BigInt(4),l=BigInt(5),d=BigInt(7),f=BigInt(8),m=BigInt(9),p=BigInt(16);function h(e,t){let r=e%t;return r>=o?r:t+r}function g(e,t,r){let n=e;for(;t-- >o;)n*=n,n%=r;return n}function y(e,t){if(e===o)throw Error("invert: expected non-zero number");if(t<=o)throw Error("invert: expected positive modulus, got "+t);let r=h(e,t),n=t,i=o,a=s,c=s,u=o;for(;r!==o;){let e=n/r,t=n%r,o=i-c*e,s=a-u*e;n=r,r=t,i=c,a=u,c=o,u=s}if(n!==s)throw Error("invert: does not exist");return h(i,t)}function b(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function v(e,t){let r=(e.ORDER+s)/u,n=e.pow(t,r);return b(e,n,t),n}function w(e,t){let r=(e.ORDER-l)/f,n=e.mul(t,a),i=e.pow(n,r),o=e.mul(t,i),s=e.mul(e.mul(o,a),i),c=e.mul(o,e.sub(s,e.ONE));return b(e,c,t),c}function A(e){if(e<c)throw Error("sqrt is not defined for small field");let t=e-s,r=0;for(;t%a===o;)t/=a,r++;let n=a,i=S(e);for(;1===E(i,n);)if(n++>1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return v;let u=i.pow(n,t),l=(t+s)/a;return function(e,n){if(e.is0(n))return n;if(1!==E(e,n))throw Error("Cannot find square root");let i=r,o=e.mul(e.ONE,u),a=e.pow(n,t),c=e.pow(n,l);for(;!e.eql(a,e.ONE);){if(e.is0(a))return e.ZERO;let t=1,r=e.sqr(a);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw Error("Cannot find square root");let n=s<<BigInt(i-t-1),u=e.pow(o,n);i=t,o=e.sqr(u),a=e.mul(a,o),c=e.mul(c,u)}return c}}let x=(e,t)=>(h(e,t)&s)===s,P=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function M(e){let t=P.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n.DS)(e,t),e}function T(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),o=e.inv(i);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),o),n}function E(e,t){let r=(e.ORDER-s)/a,n=e.pow(t,r),i=e.eql(n,e.ONE),o=e.eql(n,e.ZERO),c=e.eql(n,e.neg(e.ONE));if(!i&&!o&&!c)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function k(e,t){void 0!==t&&(0,i.Fe)(t);let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function S(e,t,r=!1,i={}){let a,g,x,P;if(e<=o)throw Error("invalid field: expected ORDER > 0, got "+e);let M=!1;if("object"==typeof t&&null!=t){if(i.sqrt||r)throw Error("cannot specify opts in two arguments");t.BITS&&(g=t.BITS),t.sqrt&&(x=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(M=t.modFromBytes),P=t.allowedLengths}else"number"==typeof t&&(g=t),i.sqrt&&(x=i.sqrt);let{nBitLength:E,nByteLength:_}=k(e,g);if(_>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let I=Object.freeze({ORDER:e,isLE:r,BITS:E,BYTES:_,MASK:(0,n.OG)(E),ZERO:o,ONE:s,allowedLengths:P,create:t=>h(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return o<=t&&t<e},is0:e=>e===o,isValidNot0:e=>!I.is0(e)&&I.isValid(e),isOdd:e=>(e&s)===s,neg:t=>h(-t,e),eql:(e,t)=>e===t,sqr:t=>h(t*t,e),add:(t,r)=>h(t+r,e),sub:(t,r)=>h(t-r,e),mul:(t,r)=>h(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<o)throw Error("invalid exponent, negatives unsupported");if(r===o)return e.ONE;if(r===s)return t;let n=e.ONE,i=t;for(;r>o;)r&s&&(n=e.mul(n,i)),i=e.sqr(i),r>>=s;return n})(I,e,t),div:(t,r)=>h(t*y(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>y(t,e),sqrt:x||(t=>(a||(a=e%u===c?v:e%f===l?w:e%p===m?function(e){let t=S(e),r=A(e),n=r(t,t.neg(t.ONE)),i=r(t,n),o=r(t,t.neg(n)),s=(e+d)/p;return(e,t)=>{let r=e.pow(t,s),a=e.mul(r,n),c=e.mul(r,i),u=e.mul(r,o),l=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);r=e.cmov(r,a,l),a=e.cmov(u,c,d);let f=e.eql(e.sqr(a),t),m=e.cmov(r,a,f);return b(e,m,t),m}}(e):A(e)),a(I,t))),toBytes:e=>r?(0,n.z)(e,_):(0,n.lq)(e,_),fromBytes:(t,i=!0)=>
1{if(P){if(!P.includes(t.length)||t.length>_)throw Error("Field.fromBytes: expected "+P+" bytes, got "+t.length);let e=new Uint8Array(_);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==_)throw Error("Field.fromBytes: expected "+_+" bytes, got "+t.length);let o=r?(0,n.lX)(t):(0,n.Ph)(t);if(M&&(o=h(o,e)),!i&&!I.isValid(o))throw Error("invalid field element: outside of range 0..ORDER");return o},invertBatch:e=>T(I,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(I)}function _(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function I(e){let t=_(e);return t+Math.ceil(t/2)}function B(e,t,r=!1){let i=e.length,o=_(t),a=I(t);if(i<16||i<a||i>1024)throw Error("expected "+a+"-1024 bytes of input, got "+i);let c=h(r?(0,n.lX)(e):(0,n.Ph)(e),t-s)+s;return r?(0,n.z)(c,o):(0,n.lq)(c,o)}},15162:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Coin=void 0;let n=r(29248);class i{static parse(e){let t=RegExp("([0-9]+)[ ]*([a-zA-Z]+)$").exec(e);if(!t||3!==t.length)throw Error("Invalid coin str");return new i(t[2],t[1])}constructor(e,t){this.denom=e,this.amount=t instanceof n.Int?t:new n.Int(t)}toString(){return`${this.amount.toString()}${this.denom}`}}t.Coin=i},16189:(e,t,r)=>{function n(e){return"string"==typeof e[0]?i(e):function(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}(e)}function i(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}r.d(t,{aP:()=>i,xW:()=>n})},16284:(e,t,r)=>{r.d(t,{k:()=>a});var n=r(87082),i=r(64092),o=r(60127),s=r(97461);function a(e){var t;return t=function(e){let t=!0,r="",n=0,i="",o=!1;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=!0),"("===a&&n++,")"===a&&n--,t){if(0===n){if(" "===a&&["event","function",""].includes(i))i="";else if(i+=a,")"===a){o=!0;break}continue}if(" "===a){","!==e[s-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=a,r+=a}}if(!o)throw new s.C("Unable to normalize signature.");return i}("string"==typeof e?e:(0,o.B)(e)),(0,i.S)((0,n.ZJ)(t))}},16420:(e,t,r)=>{e.exports=o;var n=r(85925);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(11238);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},16481:(e,t,r)=>{r.d(t,{J9:()=>o,Mc:()=>i,fD:()=>n});let n={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},16710:function(e,t,r){var n=r(65714).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t}
vendor: 4,174 bytes, line 1
1,c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;let u=c(r(36314)),l=c(r(32118)),d=a(r(27046)),f=new("function"!=typeof TextDecoder?d.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"==typeof e&&(e=n.from(e,"utf8")),l.default.encode(n.from(e))},t.baseDecode=function(e){return n.from(l.default.decode(e))};class m extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=m;class p{constructor(){this.buf=n.alloc(1024),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=n.concat([this.buf,n.alloc(1024)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(n.from(new u.default(e).toArray("le",64)))}writeBuffer(e){this.buf=n.concat([n.from(this.buf.subarray(0,this.length)),e,n.alloc(1024)]),this.length+=e.length}writeString(e){this.maybeResize();let t=n.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(n.from(e))}writeArray(e,t){for(let r of(this.maybeResize(),this.writeU32(e.length),e))this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}}function h(e,t,r){let n=r.value;r.value=function(...e){try{return n.apply(this,e)}catch(e){if(e instanceof RangeError&&["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e.code)>=0)throw new m("Reached the end of buffer when deserializing");throw e}}}t.BinaryWriter=p;class g{constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new u.default(e,"le")}readU128(){let e=this.readBuffer(16);return new u.default(e,"le")}readU256(){let e=this.readBuffer(32);return new u.default(e,"le")}readU512(){let e=this.readBuffer(64);return new u.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new m(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return f.decode(t)}catch(e){throw new m(`Error decoding UTF-8 string: ${e}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=[];for(let n=0;n<t;++n)r.push(e());return r}}function y(e){return e.charAt(0).toUpperCase()+e.slice(1)}function b(e,t,r,n,i){try{if("string"==typeof n)i[`write${y(n)}`](r);else if(n instanceof Array)if("number"==typeof n[0]){if(r.length!==n[0])throw new m(`Expecting byte array of length ${n[0]}, but got ${r.length} bytes`);i.writeFixedArray(r)}else if(2===n.length&&"number"==typeof n[1]){if(r.length!==n[1])throw new m(`Expecting byte array of length ${n[1]}, but got ${r.length} bytes`);for(let t=0;t<n[1];t++)b(e,null,r[t],n[0],i)}else i.writeArray(r,r=>{b(e,t,r,n[0],i)});else if(void 0!==n.kind)switch(n.kind){case"option":null==r?i.writeU8(0):(i.writeU8(1),b(e,t,r,n.type,i));break;case"map":i.writeU32(r.size),r.forEach((r,o)=>{b(e,t,o,n.key,i),b(e,t,r,n.value,i)});break;default:throw new m(`FieldType ${n} unrecognized`)}else v(e,r,i)}catch(e){throw e instanceof m&&e.addToFieldPath(t),e}}function v(e,t,r){if("function"==typeof t.borshSerialize)return void t.borshSerialize(r);let n=e.get(t.constructor);
1if(!n)throw new m(`Class ${t.constructor.name} is missing in schema`);if("struct"===n.kind)n.fields.map(([n,i])=>{b(e,n,t[n],i,r)});else if("enum"===n.kind){let i=t[n.field];for(let o=0;o<n.values.length;++o){let[s,a]=n.values[o];if(s===i){r.writeU8(o),b(e,s,t[s],a,r);break}}}else throw new m(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}function w(e,t,r,n){try{if("string"==typeof r)return n[`read${y(r)}`]();if(r instanceof Array)if("number"==typeof r[0])return n.readFixedArray(r[0]);else{if("number"!=typeof r[1])return n.readArray(()=>w(e,t,r[0],n));let i=[];for(let t=0;t<r[1];t++)i.push(w(e,null,r[0],n));return i}if("option"===r.kind){if(n.readU8())return w(e,t,r.type,n);return}if("map"===r.kind){let i=new Map,o=n.readU32();for(let s=0;s<o;s++){let o=w(e,t,r.key,n),s=w(e,t,r.value,n);i.set(o,s)}return i}return A(e,r,n)}catch(e){throw e instanceof m&&e.addToFieldPath(t),e}}function A(e,t,r){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(r);let n=e.get(t);if(!n)throw new m(`Class ${t.name} is missing in schema`);if("struct"===n.kind){let n={};for(let[i,o]of e.get(t).fields)n[i]=w(e,i,o,r);return new t(n)}if("enum"===n.kind){let i=r.readU8();if(i>=n.values.length)throw new m(`Enum index: ${i} is out of range`);let[o,s]=n.values[i],a=w(e,o,s,r);return new t({[o]:a})}throw new m(`Unexpected schema kind: ${n.kind} for ${t.constructor.name}`)}s([h],g.prototype,"readU8",null),s([h],g.prototype,"readU16",null),s([h],g.prototype,"readU32",null),s([h],g.prototype,"readU64",null),s([h],g.prototype,"readU128",null),s([h],g.prototype,"readU256",null),s([h],g.prototype,"readU512",null),s([h],g.prototype,"readString",null),s([h],g.prototype,"readFixedArray",null),s([h],g.prototype,"readArray",null),t.BinaryReader=g,t.serialize=function(e,t,r=p){let n=new r;return v(e,t,n),n.toArray()},t.deserialize=function(e,t,r,n=g){let i=new n(r),o=A(e,t,i);if(i.offset<r.length)throw new m(`Unexpected ${r.length-i.offset} bytes after deserialized data`);return o},t.deserializeUnchecked=function(e,t,r,n=g){return A(e,t,new n(r))}},17298:(e,t,r)=>{r.d(t,{Dg:()=>b,Ej:()=>y,Fl:()=>E,HT:()=>u,Ho:()=>p,M7:()=>h,Ro:()=>v,Ty:()=>A,di:()=>g,ii:()=>T,oB:()=>f,sH:()=>m,tf:()=>w,u:()=>M,uK:()=>d,xW:()=>c,xb:()=>l});var n=r(60832),i=r(55598),o=r(3995);let s=new TextEncoder,a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function u(e){return e instanceof Uint8Array?d(e):Array.isArray(e)?d(new Uint8Array(e)):e}function l(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(i.Sl(r,t.size),p(r,t.size)):r}function d(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=a[e[t]];let n=`0x${r}`;return"number"==typeof t.size?(i.Sl(n,t.size),h(n,t.size)):n}function f(e,t={}){let r,{signed:n,size:i}=t,o=BigInt(e);i?r=n?(1n<<8n*BigInt(i)-1n)-1n:2n**(8n*BigInt(i))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let s="bigint"==typeof r&&n?-r-1n:0;if(r&&o>r||o<s){let t="bigint"==typeof e?"n":"";throw new A({max:r?`${r}${t}`:void 0,min:`${s}${t}`,signed:n,size:i,value:`${e}${t}`})}let a=(n&&o<0?BigInt.asUintN(8*i,BigInt(o)):o).toString(16),c=`0x${a}`;return i?p(c,i):c}function m(e,t={}){return d(s.encode(e),t)}function p(e,t){return i.eV(e,{dir:"left",size:t})}function h(e,t){return i.eV(e,{dir:"right",size:t})}function g(e,t,r,n={}){let{strict:o}=n;i.kK(e,t);let s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&i.X(s,t,r),s}function y(e){return Math.ceil((e.length-2)/2)}function b(e,t={}){let{signed:r}=t;t.size&&i.Sl(e,t.size);let n=BigInt(e);if(!r)return n;let o=(1n<<8n*BigInt((e.length-2)/2))-1n;return n<=o>>1n?n:n-o-1n}function v(e,t={}){let{signed:r,size:n}=t;return r||n?Number(b(e,t)):Number(e)}function w(e,t={}){let{strict:r=!1}=t;try{return!function(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new x(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new P(e)}(e,{strict:r}),!0}catch{return!1}}class A extends n.C{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}n.C;class x extends n.C{constructor(e){super(`Value \`${"object"==typeof e?o.A(e):e}\` of type \`${typeof e}
vendor: 5,985 bytes, line 1
1\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class P extends n.C{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}n.C;class M extends n.C{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:"Hex.SizeOverflowError"})}}class T extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class E extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}},18768:(e,t,r)=>{r.d(t,{B4:()=>i,SK:()=>o,hX:()=>s});var n=r(97461);class i extends n.C{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class o extends n.C{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class s extends n.C{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},19024:(e,t,r)=>{r.d(t,{lB:()=>s});let n=new Map,i=new Map,o=0;function s(e,t,r){let s=++o,a=()=>n.get(e)||[],c=()=>{let t=a();if(!t.some(e=>e.id===s))return;let r=i.get(e);if(1===t.length&&r){let e=r();e instanceof Promise&&e.catch(()=>{})}let o=a();n.set(e,o.filter(e=>e.id!==s))},u=a();if(n.set(e,[...u,{id:s,fns:t}]),u&&u.length>0)return c;let l={};for(let e in t)l[e]=(...t)=>{let r=a();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let d=r(l);return"function"==typeof d&&i.set(e,d),c}},19113:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(87082),i=r(5852);function o(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.aT)(e)):e.blobs,s=[];for(let e of o)s.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?s:s.map(e=>(0,i.My)(e))}},19161:(e,t,r)=>{r.d(t,{n:()=>h});var n=r(67132),i=r(13949),o=r(50342),s=r(34960),a=r(7565),c=r(84437),u=r(69819),l=r(10635),d=r(5852);function f(e,t={}){void 0!==t.size&&(0,l.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,l.ME)(r,t)}var m=r(87082),p=r(7137);function h(e,t){let r="string"==typeof t?(0,m.aT)(t):t,h=(0,o.l)(r);if(0===(0,s.E)(r)&&e.length>0)throw new n.O;if((0,s.E)(t)&&32>(0,s.E)(t))throw new n.Iy({data:"string"==typeof t?t:(0,d.My)(t),params:e,size:(0,s.E)(t)});let y=0,b=[];for(let t=0;t<e.length;++t){let r=e[t];h.setPosition(y);let[o,s]=function e(t,r,{staticPosition:o}){let s=(0,p.k)(r.type);if(s){let[n,i]=s;return function(t,r,{length:n,staticPosition:i}){if(!n){let n=i+f(t.readBytes(32)),o=n+32;t.setPosition(n);let s=f(t.readBytes(32)),a=g(r),c=0,u=[];for(let n=0;n<s;++n){t.setPosition(o+(a?32*n:c));let[i,s]=e(t,r,{staticPosition:o});c+=s,u.push(i)}return t.setPosition(i+32),[u,32]}if(g(r)){let o=i+f(t.readBytes(32)),s=[];for(let i=0;i<n;++i){t.setPosition(o+32*i);let[n]=e(t,r,{staticPosition:o});s.push(n)}return t.setPosition(i+32),[s,32]}let o=0,s=[];for(let a=0;a<n;++a){let[n,a]=e(t,r,{staticPosition:i+o});o+=a,s.push(n)}return[s,o]}(t,{...r,type:i},{length:n,staticPosition:o})}if("tuple"===r.type)return function(t,r,{staticPosition:n}){let i=0===r.components.length||r.components.some(({name:e})=>!e),o=i?[]:{},s=0;if(g(r)){let a=n+f(t.readBytes(32));for(let n=0;n<r.components.length;++n){let c=r.components[n];t.setPosition(a+s);let[u,l]=e(t,c,{staticPosition:a});s+=l,o[i?n:c?.name]=u}return t.setPosition(n+32),[o,32]}for(let a=0;a<r.components.length;++a){let c=r.components[a],[u,l]=e(t,c,{staticPosition:n});o[i?a:c?.name]=u,s+=l}return[o,s]}(t,r,{staticPosition:o});if("address"===r.type){var m=t;let e=m.readBytes(32);return[(0,i.o)((0,d.My)((0,a.A1)(e,-20))),32]}if("bool"===r.type)return[function(e,t={}){let r=e;if(void 0!==t.size&&((0,l.Sl)(r,{size:t.size}),r=(0,c.B)(r)),r.length>1||r[0]>1)throw new u.xO(r);return!!r[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=f(e.readBytes(32));e.setPosition(r+t);let n=f(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[(0,d.My)(i),32]}return[(0,d.My)(e.readBytes(Number.parseInt(i,10),32)),32]}(t,r,{staticPosition:o});if(r.type.startsWith("uint")||r.type.startsWith("int")){var h=t,y=r;let e=y.type.startsWith("int"),n=Number.parseInt(y.type.split("int")[1]||"256",10),i=h.readBytes(32);return[n>48?function(e,t={}){void 0!==t.size&&(0,l.Sl)(e,{size:t.size});let r=(0,d.My)(e,t);return(0,l.uU)(r,t)}(i,{signed:e}):f(i,{signed:e}),32]}if("string"===r.type)return function(e,{staticPosition:t}){let r=f(e.readBytes(32));e.setPosition(t+r);let n=f(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),o=function(e,t={}){let r=e;return void 0!==t.size&&((0,l.Sl)(r,{size:t.size}),r=(0,c.B)(r,{dir:"right"})),new TextDecoder().decode(r)}((0,c.B)(i));return e.setPosition(t+32),[o,32]}(t,{staticPosition:o});throw new n.j(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(h,r,{staticPosition:0});y+=s,b.push(o)}return b}function g(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;
vendor: 4,567 bytes, line 1
1if("tuple"===t)return e.components?.some(g);let r=(0,p.k)(e.type);return!!(r&&g({...e,type:r[1]}))}},19711:(e,t,r)=>{r.d(t,{u:()=>o});var n=r(37581);let i=new Map;function o({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:s}){let a=async()=>{let t=u();c();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{s&&Array.isArray(e)&&e.sort(s);for(let r=0;r<t.length;r++){let{resolve:n}=t[r];n?.([e[r],e])}}).catch(e=>{for(let r=0;r<t.length;r++){let{reject:n}=t[r];n?.(e)}})},c=()=>i.delete(t),u=()=>i.get(t)||[],l=e=>i.set(t,[...u(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:i,reject:s}=(0,n.Y)();return(r?.([...u().map(({args:e})=>e),e])&&a(),u().length>0)?l({args:e,resolve:i,reject:s}):(l({args:e,resolve:i,reject:s}),setTimeout(a,o)),t}}}},20368:(e,t,r)=>{r.d(t,{UG:()=>s,xo:()=>i,zz:()=>o});var n=r(75422);class i extends n.C{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class o extends n.C{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class s extends n.C{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}},20847:(e,t,r)=>{r.d(t,{$:()=>rz});var n=r(56555),i=r(94744),o=r(45250),s=r(81731),a=r(84437),c=r(5852),u=r(97461),l=r(89304);function d(e){if(!(e instanceof u.C))return!1;let t=e.walk(e=>e instanceof l.M);return t instanceof l.M&&(t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile")}var f=r(34214),m=r(16189),p=r(87082),h=r(64092),g=r(73906);function y(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,g.q)(t)?t:null}function b(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,c.My)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let n=y(r[e]),i=n?(0,p.ZJ)(n):(0,h.S)((0,p.Af)(r[e]),"bytes");t=(0,h.S)((0,m.xW)([t,i]),"bytes")}return(0,c.My)(t)}function v(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,p.Af)(t).byteLength+2),n=0,i=t.split(".");for(let e=0;e<i.length;e++){var o;let t=(0,p.Af)(i[e]);t.byteLength>255&&(t=(0,p.Af)((o=function(e){let t=new Uint8Array(32).fill(0);return e?y(e)||(0,h.S)((0,p.Af)(e)):(0,c.My)(t)}(i[e]),`[${o.slice(2)}]`))),r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var w=r(4770),A=r(98048),x=r(10313);async function P(e,t){let{abi:r,address:n,args:s,functionName:a,...c}=t,u=(0,o.p)({abi:r,args:s,functionName:a});try{let{data:t}=await (0,w.T)(e,x.T,"call")({...c,data:u,to:n});return(0,i.e)({abi:r,args:s,functionName:a,data:t||"0x"})}catch(e){throw(0,A.j)(e,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:a})}}async function M(e,t){let{blockNumber:r,blockTag:u,coinType:l,name:m,gatewayUrls:p,strict:h}=t,{chain:g}=e,y=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!g)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.M)({blockNumber:r,chain:g,contract:"ensUniversalResolver"})})(),A=g?.ensTlds;if(A&&!A.some(e=>m.endsWith(e)))return null;let x=null!=l?[b(m),BigInt(l)]:[b(m)];try{let t=(0,o.p)({abi:n.Rm,functionName:"addr",args:x}),s={address:y,abi:n.Ag,functionName:"resolveWithGateways",args:[(0,c.nj)(v(m)),t,p??[f.J]],blockNumber:r,blockTag:u},l=(0,w.T)(e,P,"readContract"),d=await l(s);if("0x"===d[0])return null;let h=(0,i.e)({abi:n.Rm,args:x,functionName:"addr",data:d[0]});if("0x"===h||"0x00"===(0,a.B)(h))return null;return h}catch(e){if(h)throw e;if(d(e))return null;throw e}}class T extends u.C{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)}`],name:"EnsAvatarInvalidMetadataError"})}}class E extends u.C{constructor({reason:e}
vendor: 4,278 bytes, line 1
1){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class k extends u.C{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.`,{name:"EnsAvatarUriResolutionError"})}}class S extends u.C{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}u.C;let _=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,I=/^(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>\/.*)?$/,B=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,C=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function R(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||!Object.hasOwn(globalThis,"Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function O(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function U({uri:e,gatewayUrls:t}){let r=B.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=O(t?.ipfs,"https://ipfs.io"),i=O(t?.arweave,"https://arweave.net"),o=e.match(_),{protocol:s,subpath:a,target:c,subtarget:u=""}=o?.groups||{},l="ipns:/"===s||"ipns/"===a,d="ipfs:/"===s||"ipfs/"===a||I.test(e);if(e.startsWith("http")&&!l&&!d){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((l||d)&&c)return{uri:`${n}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&c)return{uri:`${i}/${c}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(C,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new k({uri:e})}function D(e){if("object"!=typeof e||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new T({data:e});return e.image||e.image_url||e.image_data}async function N({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(e=>e.json());return await $({gatewayUrls:e,uri:D(r)})}catch{throw new k({uri:t})}}async function $({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=U({uri:t,gatewayUrls:e});if(n||await R(r))return r;throw new k({uri:t})}async function F(e,{nft:t}){if("erc721"===t.namespace)return P(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 P(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 S({namespace:t.namespace})}async function j(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?z(e,{gatewayUrls:t,record:r}):$({uri:r,gatewayUrls:t})}async function z(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[o,s]=r.split(":"),[a,c]=n.split(":");if(!o||"eip155"!==o.toLowerCase())throw new E({reason:"Only EIP-155 supported"});if(!s)throw new E({reason:"Chain ID not found"});if(!c)throw new E({reason:"Contract address not found"});if(!i)throw new E({reason:"Token ID not found"});if(!a)throw new E({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}(r),{uri:i,isOnChain:o,isEncoded:s}=U({uri:await F(e,{nft:n}),gatewayUrls:t});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return $({uri:D(JSON.parse(s?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let a=n.tokenID;return"erc1155"===n.namespace&&(a=a.replace("0x","").padStart(64,"0")),N({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,a)})}async function L(e,t){let{blockNumber:r,blockTag:a,key:u,name:l,gatewayUrls:m,strict:p}=t,{chain:h}=e,g=(()=>
vendor: 4,204 bytes, line 1
1{if(t.universalResolverAddress)return t.universalResolverAddress;if(!h)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.M)({blockNumber:r,chain:h,contract:"ensUniversalResolver"})})(),y=h?.ensTlds;if(y&&!y.some(e=>l.endsWith(e)))return null;try{let t={address:g,abi:n.Ag,args:[(0,c.nj)(v(l)),(0,o.p)({abi:n.SJ,functionName:"text",args:[b(l),u]}),m??[f.J]],functionName:"resolveWithGateways",blockNumber:r,blockTag:a},s=(0,w.T)(e,P,"readContract"),d=await s(t);if("0x"===d[0])return null;let p=(0,i.e)({abi:n.SJ,functionName:"text",data:d[0]});return""===p?null:p}catch(e){if(p)throw e;if(d(e))return null;throw e}}async function q(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:o,strict:s,universalResolverAddress:a}){let c=await (0,w.T)(e,L,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:o,strict:s});if(!c)return null;try{return await j(e,{record:c,gatewayUrls:n})}catch{return null}}async function V(e,t){let{address:r,blockNumber:i,blockTag:o,coinType:a=60n,gatewayUrls:c,strict:u}=t,{chain:l}=e,m=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.M)({blockNumber:i,chain:l,contract:"ensUniversalResolver"})})();try{let t={address:m,abi:n.oX,args:[r,a,c??[f.J]],functionName:"reverseWithGateways",blockNumber:i,blockTag:o},s=(0,w.T)(e,P,"readContract"),[u]=await s(t);return u||null}catch(e){if(u)throw e;if(d(e))return null;throw e}}async function H(e,t){let{blockNumber:r,blockTag:n,name:i}=t,{chain:o}=e,a=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!o)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.M)({blockNumber:r,chain:o,contract:"ensUniversalResolver"})})(),u=o?.ensTlds;if(u&&!u.some(e=>i.endsWith(e)))throw Error(`${i} is not a valid ENS TLD (${u?.join(", ")}) for chain "${o.name}" (id: ${o.id}).`);let[l]=await (0,w.T)(e,P,"readContract")({address:a,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,c.nj)(v(i))],blockNumber:r,blockTag:n});return l}var G=r(72979),W=r(90206),J=r(76385),Z=r(24061),K=r(95084);async function Y(e,t){let{account:r=e.account,blockNumber:n,blockTag:i="latest",blobs:o,data:s,gas:a,gasPrice:u,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:f,to:m,value:p,...h}=t,g=r?(0,G.J)(r):void 0;try{(0,K.c)(t);let r="bigint"==typeof n?(0,c.cK)(n):void 0,y=e.chain?.formatters?.transactionRequest?.format,b=(y||Z.Bv)({...(0,J.o)(h,{format:y}),account:g,blobs:o,data:s,gas:a,gasPrice:u,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:f,to:m,value:p},"createAccessList"),v=await e.request({method:"eth_createAccessList",params:[b,r||i]});return{accessList:v.accessList,gasUsed:BigInt(v.gasUsed)}}catch(r){throw(0,W.d)(r,{...t,account:g,chain:e.chain})}}function X(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:i,transport:o})=>{"success"===i&&t===e&&(r[n]=o.request)}),t=>r[t]||e.request}async function Q(e){let t=X(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}var ee=r(67132);class et extends u.C{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var er=r(26013),en=r(7137),ei=r(493),eo=r(55562);let es="/docs/contract/encodeEventTopics";function ea(e){let{abi:t,eventName:r,args:n}=e,i=t[0];if(r){let e=(0,eo.iY)({abi:t,name:r});if(!e)throw new ee.M_(r,{docsPath:es});i=e}if("event"!==i.type)throw new ee.M_(void 0,{docsPath:es});let o=(0,ei.B)(i),s=(0,er.h)(o),a=[];if(n&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(a=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>ec({param:e,value:t[r][i]})):void 0!==t[r]&&null!==t[r]?ec({param:e,value:t[r]}):null)??[])}return[s,...a]}function ec({param:e,value:t}
1){if("string"===e.type||"bytes"===e.type)return(0,h.S)((0,p.ZJ)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new et(e.type);return(0,en.h)([e],[t])}async function eu(e,t){let{address:r,abi:n,args:i,eventName:o,fromBlock:s,strict:a,toBlock:u}=t,l=X(e,{method:"eth_newFilter"}),d=o?ea({abi:n,args:i,eventName:o}):void 0,f=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof s?(0,c.cK)(s):s,toBlock:"bigint"==typeof u?(0,c.cK)(u):u,topics:d}]});return{abi:n,args:i,eventName:o,id:f,request:l(f),strict:!!a,type:"event"}}async function el(e,{address:t,args:r,event:n,events:i,fromBlock:o,strict:s,toBlock:a}={}){let u=i??(n?[n]:void 0),l=X(e,{method:"eth_newFilter"}),d=[];u&&(d=[u.flatMap(e=>ea({abi:[e],eventName:e.name,args:r}))],n&&(d=d[0]));let f=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof o?(0,c.cK)(o):o,toBlock:"bigint"==typeof a?(0,c.cK)(a):a,...d.length?{topics:d}:{}}]});return{abi:u,args:r,eventName:n?n.name:void 0,fromBlock:o,id:f,request:l(f),strict:!!s,toBlock:a,type:"event"}}async function ed(e){let t=X(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}var ef=r(81672);async function em(e,t){let{abi:r,address:n,args:i,functionName:s,dataSuffix:a,...c}=t,u=(0,o.p)({abi:r,args:i,functionName:s});try{return await (0,w.T)(e,ef.Q,"estimateGas")({data:`${u}${a?a.replace("0x",""):""}`,to:n,...c})}catch(t){let e=c.account?(0,G.J)(c.account):void 0;throw(0,A.j)(t,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:e?.address})}}var ep=r(23803),eh=r(77372),eg=r(8819);async function ey(e,{address:t,blockNumber:r,blockTag:n=e.experimental_blockTag??"latest"}){let i="bigint"==typeof r?(0,c.cK)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,i||n]}))}async function eb(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var ev=r(27465),ew=r(61506),eA=r(10635);async function ex(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i,o=void 0!==r?(0,c.cK)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[o||n]},{dedupe:!!o}),(0,eA.ME)(i)}var eP=r(76152);async function eM(e,{address:t,blockNumber:r,blockTag:n="latest"}){let i=void 0!==r?(0,c.cK)(r):void 0,o=await e.request({method:"eth_getCode",params:[t,i||n]},{dedupe:!!i});if("0x"!==o)return o}var eT=r(45209),eE=r(18768),ek=r(34960),eS=r(19161);let e_="/docs/contract/decodeEventLog";function eI(e){let{abi:t,data:r,strict:n,topics:i}=e,o=n??!0,[s,...a]=i;if(!s)throw new ee._z({docsPath:e_});let c=t.find(e=>"event"===e.type&&s===(0,er.h)((0,ei.B)(e)));if(!(c&&"name"in c)||"event"!==c.type)throw new ee.kE(s,{docsPath:e_});let{name:u,inputs:l}=c,d=l?.some(e=>!("name"in e&&e.name)),f=d?[]:{},m=l.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed);for(let e=0;e<m.length;e++){let[t,r]=m[e],n=a[e];if(!n)throw new ee.l3({abiItem:c,param:t});f[d?r:t.name||r]=function({param:e,value:t}){return"string"===e.type||"bytes"===e.type||"tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/)?t:((0,eS.n)([e],t)||[])[0]}({param:t,value:n})}let p=l.filter(e=>!("indexed"in e&&e.indexed));if(p.length>0){if(r&&"0x"!==r)try{let e=(0,eS.n)(p,r);if(e)if(d)for(let t=0;t<l.length;t++)f[t]=f[t]??e.shift();else for(let t=0;t<p.length;t++)f[p[t].name]=e[t]}catch(e){if(o){if(e instanceof ee.Iy||e instanceof eE.SK)throw new ee.fo({abiItem:c,data:r,params:p,size:(0,ek.E)(r)});throw e}}else if(o)throw new ee.fo({abiItem:c,data:"0x",params:p,size:0})}return{eventName:u,args:Object.values(f).length>0?f:void 0}}function eB(e){let{abi:t,args:r,logs:n,strict:i=!0}=e,o=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return n.map(e=>{let n,s,a=t.filter(t=>"event"===t.type&&e.topics[0]===(0,er.h)(t));if(0===a.length)return null;for(let t of a)try{n=eI({...e,abi:[t],strict:!0}),s=t;break}catch{}if(!n&&!i){s=a[0];try{n=eI({...e,abi:[s],strict:!1})}catch{let t=s.inputs?.some(e=>!("name"in e&&e.name));return{...e,args:t?[]:{},eventName:s.name}}}return n&&s&&(!o||o.includes(n.eventName))&&function(e){let{args:t,inputs:r,matchArgs:n}=e;if(!n)return!0;
vendor: 9,041 bytes, line 1
1if(!t)return!1;function i(e,t,r){try{if("address"===e.type)return(0,eT.h)(t,r);if("string"===e.type||"bytes"===e.type)return(0,h.S)((0,p.ZJ)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(n)?n.every((e,n)=>{if(null==e)return!0;let o=r[n];return!!o&&(Array.isArray(e)?e:[e]).some(e=>i(o,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof n||Array.isArray(n))&&Object.entries(n).every(([e,n])=>{if(null==n)return!0;let o=r.find(t=>t.name===e);return!!o&&(Array.isArray(n)?n:[n]).some(r=>i(o,r,t[e]))})}({args:n.args,inputs:s.inputs,matchArgs:r})?{...n,...e}:null}).filter(Boolean)}var eC=r(39282);async function eR(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:o,events:s,args:a,strict:u}={}){let l=s??(o?[o]:void 0),d=[];l&&(d=[l.flatMap(e=>ea({abi:[e],eventName:e.name,args:s?void 0:a}))],o&&(d=d[0]));let f=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:"bigint"==typeof n?(0,c.cK)(n):n,toBlock:"bigint"==typeof i?(0,c.cK)(i):i}]})).map(e=>(0,eC.e)(e));return l?eB({abi:l,args:a,logs:f,strict:u??!1}):f}async function eO(e,t){let{abi:r,address:n,args:i,blockHash:o,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,l=s?(0,eo.iY)({abi:r,name:s}):void 0,d=l?void 0:r.filter(e=>"event"===e.type);return(0,w.T)(e,eR,"getLogs")({address:n,args:i,blockHash:o,event:l,events:d,fromBlock:a,toBlock:c,strict:u})}class eU extends u.C{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function eD(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,o,s,a,c,u,l]=await (0,w.T)(e,P,"readContract")({abi:eN,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:o,version:s,chainId:Number(a),verifyingContract:c,salt:u},extensions:l,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new eU({address:r});throw e}}let eN=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function e$(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var o;let s="bigint"==typeof r?(0,c.cK)(r):void 0;return{baseFeePerGas:(o=await e.request({method:"eth_feeHistory",params:[(0,c.cK)(t),s||n,i]},{dedupe:!!s})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:o.gasUsedRatio,oldestBlock:BigInt(o.oldestBlock),reward:o.reward?.map(e=>e.map(e=>BigInt(e)))}}async function eF(e,{filter:t}){let r="strict"in t&&t.strict,n=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof n[0])return n;let i=n.map(e=>(0,eC.e)(e));return"abi"in t&&t.abi?eB({abi:t.abi,logs:i,strict:r}):i}async function ej(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,eC.e)(e));return t.abi?eB({abi:t.abi,logs:n,strict:r}):n}var ez=r(70902);async function eL(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){let o=void 0!==r?(0,c.cK)(r):void 0;var s=await e.request({method:"eth_getProof",params:[t,i,o||(n??"latest")]});return{...s,balance:s.balance?BigInt(s.balance):void 0,nonce:s.nonce?(0,eA.ME)(s.nonce):void 0,storageProof:s.storageProof?s.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}async function eq(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let o=void 0!==r?(0,c.cK)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,o||n]})}var eV=r(24148);async function eH(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([(0,w.T)(e,ew.G,"getBlockNumber")({}),t?(0,w.T)(e,eV.x,"getTransaction")({hash:t}):void 0]),o=r?.blockNumber||i?.blockNumber;return o?n-o+1n:0n}var eG=r(95571),eW=r(69564),eJ=r(31859);async function eZ(e,t){let{account:r,authorizationList:a,allowFailure:c=!0,blockNumber:d,blockOverrides:f,blockTag:m,stateOverride:p}=t,h=t.contracts,{batchSize:g=t.batchSize??1024,deployless:y=t.deployless??!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},b=(()=>{if(t.multicallAddress)return t.multicallAddress;if(y)return null;if(e.chain)return(0,s.M)({blockNumber:d,chain:e.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),v=[[]],x=0,M=0;for(let e=0;e<h.length;e++){let{abi:t,address:n,args:i,functionName:s}=h[e];try{let e=(0,o.p)({abi:t,args:i,functionName:s});M+=(e.length-2)/2,g>0&&M>g&&v[x].length>0&&(x++,M=(e.length-2)/2,v[x]=[]),v[x]=[...v[x],{allowFailure:!0,callData:e,target:n}]}catch(o){let e=(0,A.j)(o,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:s,sender:r});if(!c)throw e;v[x]=[...v[x],{allowFailure:!0,callData:"0x",target:n}]}}let T=await Promise.allSettled(v.map(t=>(0,w.T)(e,P,"readContract")({...null===b?{code:eJ.Ez}:{address:b},abi:n.v2,account:r,args:[t],authorizationList:a,blockNumber:d,blockOverrides:f,blockTag:m,functionName:"aggregate3",stateOverride:p}))),E=[];for(let e=0;e<T.length;e++){let t=T[e];if("rejected"===t.status){if(!c)throw t.reason;for(let r=0;r<v[e].length;r++)E.push({status:"failure",error:t.reason,result:void 0});continue}let r=t.value;for(let t=0;t<r.length;t++){let{returnData:n,success:o}=r[t],{callData:s}=v[e][t],{abi:a,address:u,functionName:d,args:f}=h[E.length];try{if("0x"===s)throw new ee.O;if(!o)throw new l.$S({data:n});let e=(0,i.e)({abi:a,args:f,data:n,functionName:d});E.push(c?{result:e,status:"success"}:e)}catch(t){let e=(0,A.j)(t,{abi:a,address:u,args:f,docsPath:"/docs/contract/multicall",functionName:d});if(!c)throw e;E.push({error:e,result:void 0,status:"failure"})}}}if(E.length!==h.length)throw new u.C("multicall results mismatch");return E}var eK=r(26143),eY=r(82334),eX=r(74646),eQ=r(95913),e0=r(7949);async function e1(e,t){let{blockNumber:r,blockTag:n=e.experimental_blockTag??"latest",blocks:s,returnFullTransactions:a,traceTransfers:u,validation:d}=t;try{let t=[];for(let e of s){let r=e.blockOverrides?eK.J(e.blockOverrides):void 0,n=e.calls.map(e=>{let t=e.account?(0,G.J)(e.account):void 0,r=e.abi?(0,o.p)(e):e.data,n={...e,account:t,data:e.dataSuffix?(0,m.xW)([r||"0x",e.dataSuffix]):r,from:e.from??t?.address};return(0,K.c)(n),(0,Z.Bv)(n)}),i=e.stateOverrides?(0,e0.yH)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:n,stateOverrides:i})}let f="bigint"==typeof r?(0,c.cK)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:a,traceTransfers:u,validation:d},f||n]})).map((e,t)=>({...(0,eQ.$)(e),calls:e.calls.map((e,r)=>{let{abi:n,args:o,functionName:a,to:c}=s[t].calls[r],u=e.error?.data??e.returnData,d=BigInt(e.gasUsed),f=e.logs?.map(e=>(0,eC.e)(e)),m="0x1"===e.status?"success":"failure",p=n&&"success"===m&&"0x"!==u?(0,i.e)({abi:n,data:u,functionName:a}):null,h=(()=>{let t;if("success"!==m&&(e.error?.data==="0x"?t=new ee.O:e.error&&(t=new l.$S(e.error)),t))return(0,A.j)(t,{abi:n??[],address:c??"0x",args:o,functionName:a??"<unknown>"})})();return{data:u,gasUsed:d,logs:f,status:m,..."success"===m?{result:p}:{error:h}}})}))}catch(t){let e=(0,eX.l)(t,{});if(e instanceof eY.RM)throw t;throw e}}var e6=r(20368),e5=r(4171),e2=r(27908),e8=r(70490),e3=r(60127),e4=r(60832),e9=r(63395),e7=r(17298);function te(e,t){if(tu(e)>t)throw new tm({givenSize:tu(e),maxSize:t})}let tt={zero:48,nine:57,A:65,F:70,a:97,f:102};function tr(e){return e>=tt.zero&&e<=tt.nine?e-tt.zero:e>=tt.A&&e<=tt.F?e-(tt.A-10):e>=tt.a&&e<=tt.f?e-(tt.a-10):void 0}function tn(e,t={}){let{dir:r="left"}=t,n=e,i=0;for(let e=0;e<n.length-1;e++)if("0"===n["left"===r?e:n.length-e-1].toString())i++;else break;return"left"===r?n.slice(i):n.slice(0,n.length-i)}var ti=r(55598),to=r(3995);let ts=new TextDecoder,ta=new TextEncoder;function tc(e,t={}){let{size:r}=t,n=e;r&&(ti.Sl(e,r),n=e7.M7(e,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);let o=i.length/2,s=new Uint8Array(o);for(let e=0,t=0;e<o;e++){let r=tr(i.charCodeAt(t++)),n=tr(i.charCodeAt(t++));if(void 0===r||void 0===n)throw new e4.C(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);s[e]=r<<4|n}return s}function tu(e){return e.length}function tl(e,t={}){let{size:r}=t;void 0!==r&&te(e,r);let n=e7.uK(e,t);return e7.Ro(n,t)}function td(e){return tn(e,{dir:"left"})}class tf extends e4.C{constructor(e){super(`Bytes value \`${e}\` is not a valid boolean.`,{metaMessages:["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:"Bytes.InvalidBytesBooleanError"})}}e4.C;class tm extends e4.C{constructor({givenSize:e,maxSize:t}
vendor: 4,152 bytes, line 1
1){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class tp extends e4.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}class th extends e4.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}function tg(e,t={}){var r;let{as:n="string"==typeof e?"Hex":"Bytes"}=t,i=(0,e9.lY)(e instanceof Uint8Array?e:"string"==typeof e?tc(e):(r=e)instanceof Uint8Array?r:new Uint8Array(r));return"Bytes"===n?i:e7.uK(i)}class ty extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let tb={checksum:new ty(8192)}.checksum,tv=/^0x[a-fA-F0-9]{40}$/;function tw(e,t={}){let{strict:r=!0}=t;if(!tv.test(e))throw new tP({address:e,cause:new tM});if(r){if(e.toLowerCase()===e)return;if(tA(e)!==e)throw new tP({address:e,cause:new tT})}}function tA(e){if(tb.has(e))return tb.get(e);tw(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=tg(function(e,t={}){let{size:r}=t,n=ta.encode(e);return"number"==typeof r?(te(n,r),function(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;if(e.length>n)throw new th({size:e.length,targetSize:n,type:"Bytes"});let i=new Uint8Array(n);for(let t=0;t<n;t++){let o="right"===r;i[o?t:n-t-1]=e[o?t:e.length-t-1]}return i}(n,{dir:"right",size:r})):n}(t),{as:"Bytes"}),n=t.split("");for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&n[e]&&(n[e]=n[e].toUpperCase()),(15&r[e>>1])>=8&&n[e+1]&&(n[e+1]=n[e+1].toUpperCase());let i=`0x${n.join("")}`;return tb.set(e,i),i}function tx(e,t={}){let{strict:r=!0}=t??{};try{return tw(e,{strict:r}),!0}catch{return!1}}class tP extends e4.C{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class tM extends e4.C{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class tT extends e4.C{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function tE(e){let t=!0,r="",n=0,i="",o=!1;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=!0),"("===a&&n++,")"===a&&n--,t){if(0===n){if(" "===a&&["event","function","error",""].includes(i))i="";else if(i+=a,")"===a){o=!0;break}continue}if(" "===a){","!==e[s-1]&&","!==r&&",("!==r&&(r="",t=!1);continue}i+=a,r+=a}}if(!o)throw new e4.C("Unable to normalize signature.");return i}function tk(e,t={}){let{prepare:r=!0}=t,n=Array.isArray(e)||"string"==typeof e?function(e){let t;if("string"==typeof e)t=(0,e8.uT)(e);else{let r=(0,e2.e)(e),n=e.length;for(let i=0;i<n;i++){let n=e[i];if(!(0,e5.WL)(n)){t=(0,e8.uT)(n,r);break}}}if(!t)throw new e6.xo({signature:e});return t}(e):e;return{...n,...r?{hash:tI(n)}:{}}}function tS(e,t,r){let n,{args:i=[],prepare:o=!0}=r??{},s=e7.tf(t,{strict:!1}),a=e.filter(e=>s?"function"===e.type||"error"===e.type?t_(e)===e7.di(t,0,4):"event"===e.type&&tI(e)===t:"name"in e&&e.name===t);if(0===a.length)throw new tC({name:t});if(1===a.length)return{...a[0],...o?{hash:tI(a[0])}:{}};for(let e of a){if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...o?{hash:tI(e)}:{}};continue}
vendor: 14,468 bytes, lines 1-3
1if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return tx(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=function e(t,r,n){for(let i in t){let o=t[i],s=r[i];if("tuple"===o.type&&"tuple"===s.type&&"components"in o&&"components"in s)return e(o.components,s.components,n[i]);let a=[o.type,s.type];if(a.includes("address")&&a.includes("bytes20")||(a.includes("address")&&a.includes("string")||a.includes("address")&&a.includes("bytes"))&&tx(n[i],{strict:!1}))return a}}(e.inputs,n.inputs,i);if(t)throw new tB({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}}let c=(()=>{if(n)return n;let[e,...t]=a;return{...e,overloads:t}})();if(!c)throw new tC({name:t});return{...c,...o?{hash:tI(c)}:{}}}function t_(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tS(t,r)}return e[0]})();return e7.di(tI(t),0,4)}function tI(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tS(t,r)}return e[0]})();return"string"!=typeof t&&"hash"in t&&t.hash?t.hash:tg(e7.sH(function(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tS(t,r)}return e[0]})();return tE("string"==typeof t?t:e3.B(t))}(t)))}class tB extends e4.C{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${tE(e3.B(e.abiItem))}\`, and`,`\`${t.type}\` in \`${tE(e3.B(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:"AbiItem.AmbiguityError"})}}class tC extends e4.C{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}e4.C;var tR=r(73118),tO=r(79979);let tU=/^(.*)\[([0-9]*)\]$/,tD=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,tN=/^(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)?$/,t$=2n**256n-1n;function tF(e){let t=0;for(let r=0;r<e.length;r++){let{dynamic:n,encoded:i}=e[r];n?t+=32:t+=e7.Ej(i)}let r=[],n=[],i=0;for(let o=0;o<e.length;o++){let{dynamic:s,encoded:a}=e[o];s?(r.push(e7.oB(t+i,{size:32})),n.push(a),i+=e7.Ej(a)):r.push(a)}return e7.xW(...r,...n)}function tj(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function tz(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(tz);let r=tj(e.type);return!!(r&&tz({...e,type:r[1]}))}let tL={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 tH({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new tV({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new tq({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 tq({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};class tq extends e4.C{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class tV extends e4.C{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:"Cursor.PositionOutOfBoundsError"})}}class tH extends e4.C{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:"Cursor.RecursiveReadLimitExceededError"})}}function tG(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new tQ({expectedLength:e.length,givenLength:t.length});let i=tF(function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let i=0;i<t.length;i++)n.push(function e({checksumAddress:t=!1,parameter:r,value:n}){let i=tj(r.type);if(i){let[o,s]=i;return function(t,r){let{checksumAddress:n,length:i,parameter:o}=r,s=null===i;if(!Array.isArray(t))throw new t0(t);if(!s&&t.length!==i)throw new tY({expectedLength:i,givenLength:t.length,type:`${o.type}[${i}]`});let a=!1,c=[];for(let r=0;r<t.length;r++){let i=e({checksumAddress:n,parameter:o,value:t[r]});i.dynamic&&(a=!0),c.push(i)}if(s||a){let e=tF(c);if(s){let t=e7.oB(c.length,{size:32});return{dynamic:!0,encoded:c.length>0?e7.xW(t,e):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:e7.xW(...c.map(({encoded:e})=>e))}}(n,{checksumAddress:t,length:o,parameter:{...r,type:s}})}if("tuple"===r.type)return function(t,r){let{checksumAddress:n,parameter:i}=r,o=!1,s=[];for(let r=0;r<i.components.length;r++){let a=i.components[r],c=Array.isArray(t)?r:a.name,u=e({checksumAddress:n,parameter:a,value:t[c]});s.push(u),u.dynamic&&(o=!0)}return{dynamic:o,encoded:o?tF(s):e7.xW(...s.map(({encoded:e})=>e))}}(n,{checksumAddress:t,parameter:r});if("address"===r.type){var o=n,s={checksum:t};let{checksum:e=!1}=s;return tw(o,{strict:e}),{dynamic:!1,encoded:e7.Ho(o.toLowerCase())}}if("bool"===r.type){var a=n;if("boolean"!=typeof a)throw new e4.C(`Invalid boolean value: "${a}" (type: ${typeof a}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:e7.Ho(e7.xb(a))}}if(r.type.startsWith("uint")||r.type.startsWith("int")){let e=r.type.startsWith("int"),[,,t="256"]=tN.exec(r.type)??[];return function(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e<i)throw new e7.Ty({max:n.toString(),min:i.toString(),signed:t,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:e7.oB(e,{size:32,signed:t})}}(n,{signed:e,size:Number(t)})}if(r.type.startsWith("bytes"))return function(e,{type:t}){let[,r]=t.split("bytes"),n=e7.Ej(e);if(!r){let t=e;return n%32!=0&&(t=e7.M7(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:e7.xW(e7.Ho(e7.oB(n,{size:32})),t)}}if(n!==Number.parseInt(r,10))throw new tX({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:e7.M7(e)}}(n,{type:r.type});if("string"===r.type){var c=n;let e=e7.sH(c),t=Math.ceil(e7.Ej(e)/32),r=[];for(let n=0;n<t;n++)r.push(e7.M7(e7.di(e,32*n,(n+1)*32)));return{dynamic:!0,encoded:e7.xW(e7.M7(e7.oB(e7.Ej(e),{size:32})),...r)}}throw new t1(r.type)}({checksumAddress:e,parameter:t[i],value:r[i]}));return n}({checksumAddress:n,parameters:e,values:t}));return 0===i.length?"0x":i}function tW(e,t){if(e.length!==t.length)throw new tQ({expectedLength:e.length,givenLength:t.length});let r=[];for(let n=0;n<e.length;n++){let i=e[n],o=t[n];r.push(tW.encode(i,o))}return e7.xW(...r)}function tJ(e){return Array.isArray(e)&&"string"==typeof e[0]||"string"==typeof e?function(e){let t=[];if("string"==typeof e){let r=(0,e8.NV)(e),n=r.length;for(let e=0;e<n;e++)t.push((0,e8.Pj)(r[e],{modifiers:e5.Dv}))}else{let r=(0,e2.e)(e),n=e.length;for(let i=0;i<n;i++){let n=e[i];if((0,e5.WL)(n))continue;let o=(0,e8.NV)(n),s=o.length;for(let e=0;e<s;e++)t.push((0,e8.Pj)(o[e],{modifiers:e5.Dv,structs:r}))}}if(0===t.length)throw new tR.A9({params:e});return t}(e):e}(tW||(tW={})).encode=function e(t,r,n=!1){if("address"===t)return tw(r),e7.Ho(r.toLowerCase(),32*!!n);if("string"===t)return e7.sH(r);if("bytes"===t)return r;if("bool"===t)return e7.Ho(e7.xb(r),n?32:1);let i=t.match(tN);if(i){let[e,t,o="256"]=i,s=Number.parseInt(o,10)/8;return e7.oB(r,{size:n?32:s,signed:"int"===t})}let o=t.match(tD);if(o){let[e,t]=o;if(Number.parseInt(t,10)!==(r.length-2)/2)throw new tX({expectedSize:Number.parseInt(t,10),value:r});return e7.M7(r,32*!!n)}let s=t.match(tU);if(s&&Array.isArray(r)){let[t,n]=s,i=[];for(let t=0;t<r.length;t++)i.push(e(n,r[t],!0));return 0===i.length?"0x":e7.xW(...i)}throw new t1(t)};class tZ extends e4.C{constructor({data:e,parameters:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${tO.Q(t)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class tK extends e4.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class tY extends e4.C{constructor({expectedLength:e,givenLength:t,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class tX extends e4.C{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${e7.Ej(t)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class tQ extends e4.C{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding parameters/values length mismatch. 2Expected length (parameters): ${e} 3Given length (values): ${t}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class t0 extends e4.C{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class t1 extends e4.C{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function t6(e,t={}){return tk(e,t)}function t5(e,t,r){let n=tS(e,t,r);if("function"!==n.type)throw new tC({name:t,type:"function"});return n}let t2="0x0000000000000000000000000000000000000000";async function t8(e,t){let{blockNumber:r,blockTag:n,calls:i,stateOverrides:s,traceAssetChanges:a,traceTransfers:c,validation:l}=t,d=t.account?(0,G.J)(t.account):void 0;if(a&&!d)throw new u.C("`account` is required when `traceAssetChanges` is true");let f=d?function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return[function(e){let t=e.find(e=>"constructor"===e.type);if(!t)throw new tC({name:"constructor"});return t}(t),r]}return e})(),{bytecode:n,args:i}=r;return e7.xW(n,t.inputs?.length&&i?.length?tG(t.inputs,i):"0x")}(tk("constructor(bytes, bytes)"),{bytecode:eJ.LX,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",function(...e){let[t,r=[]]=(()=>
vendor: 9,850 bytes, line 3
3{if(Array.isArray(e[0])){let[t,r,n]=e;return[t5(t,r,{args:n}),n]}let[t,r]=e;return[t,r]})(),{overloads:n}=t,i=n?t5([t,...n],t.name,{args:r}):t,o=t_(i),s=r.length>0?tG(i.inputs,r):void 0;return s?e7.xW(o,s):o}(t6("function getBalance(address)"),[d.address])]}):void 0,m=a?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await Y(e,{account:d.address,...t,data:t.abi?(0,o.p)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],p=await e1(e,{blockNumber:r,blockTag:n,blocks:[...a?[{calls:[{data:f}],stateOverrides:s},{calls:m.map((e,t)=>({abi:[t6("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[d.address],to:e,from:t2,nonce:t})),stateOverrides:[{address:t2,nonce:0}]}]:[],{calls:[...i,{}].map(e=>({...e,from:d?.address})),stateOverrides:s},...a?[{calls:[{data:f}]},{calls:m.map((e,t)=>({abi:[t6("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[d.address],to:e,from:t2,nonce:t})),stateOverrides:[{address:t2,nonce:0}]},{calls:m.map((e,t)=>({to:e,abi:[t6("function decimals() returns (uint256)")],functionName:"decimals",from:t2,nonce:t})),stateOverrides:[{address:t2,nonce:0}]},{calls:m.map((e,t)=>({to:e,abi:[t6("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t2,nonce:t})),stateOverrides:[{address:t2,nonce:0}]},{calls:m.map((e,t)=>({to:e,abi:[t6("function symbol() returns (string)")],functionName:"symbol",from:t2,nonce:t})),stateOverrides:[{address:t2,nonce:0}]}]:[]],traceTransfers:c,validation:l}),h=a?p[2]:p[0],[g,y,,b,v,w,A,x]=a?p:[],{calls:P,...M}=h,T=P.slice(0,-1)??[],E=[...g?.calls??[],...y?.calls??[]].map(e=>"success"===e.status?(0,eA.uU)(e.data):null),k=[...b?.calls??[],...v?.calls??[]].map(e=>"success"===e.status?(0,eA.uU)(e.data):null),S=(w?.calls??[]).map(e=>"success"===e.status?e.result:null),_=(x?.calls??[]).map(e=>"success"===e.status?e.result:null),I=(A?.calls??[]).map(e=>"success"===e.status?e.result:null),B=[];for(let[e,t]of k.entries()){let r=E[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=S[e-1],i=_[e-1],o=I[e-1],s=0===e?{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",decimals:18,symbol:"ETH"}:{address:m[e-1],decimals:o||n?Number(n??1):void 0,symbol:i??void 0};B.some(e=>e.token.address===s.address)||B.push({token:s,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:B,block:M,results:T}}async function t3(e,t){let{abi:r,address:n,args:s,dataSuffix:a,functionName:c,...u}=t,l=u.account?(0,G.J)(u.account):e.account,d=(0,o.p)({abi:r,args:s,functionName:c});try{let{data:o}=await (0,w.T)(e,x.T,"call")({batch:!1,data:`${d}${a?a.replace("0x",""):""}`,to:n,...u,account:l}),f=(0,i.e)({abi:r,args:s,functionName:c,data:o||"0x"}),m=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:f,request:{abi:m,address:n,args:s,dataSuffix:a,functionName:c,...u,account:l}}}catch(e){throw(0,A.j)(e,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:c,sender:l?.address})}}async function t4(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}let t9="0x6492649264926492649264926492649264926492649264926492649264926492";class t7 extends e4.C{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function re(e,t={}){let{recovered:r}=t;if(void 0===e.r||void 0===e.s||r&&void 0===e.yParity)throw new ri({signature:e});if(e.r<0n||e.r>t$)throw new ro({value:e.r});if(e.s<0n||e.s>t$)throw new rs({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new ra({value:e.yParity})}function rt(e){if(130!==e.length&&132!==e.length)throw new rn({signature:e});let t=BigInt(e7.di(e,0,32)),r=BigInt(e7.di(e,32,64)),n=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return rr(t)}catch{throw new ra({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function rr(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return+(e%2==0);throw new rc({value:e})}class rn extends e4.C{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${e7.Ej(e7.HT(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ri extends e4.C{constructor({signature:e}){super(`Signature \`${to.A(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class ro extends e4.C{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class rs extends e4.C{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class ra extends e4.C{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class rc extends e4.C{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}let ru=tJ("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function rl(e){if("string"==typeof e){if("0x8010801080108010801080108010801080108010801080108010801080108010"!==e7.di(e,-32))throw new rd(e)}else re(e.authorization)}class rd extends e4.C{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}var rf=r(81746),rm=r(13949),rp=r(77703);async function rh({address:e,authorization:t,signature:r}){return(0,eT.h)((0,rm.b)(e),await (0,rp.g)({authorization:t,signature:r}))}var rg=r(93909),ry=r(37981);async function rb(e,t){let{address:r,chain:n=e.chain,hash:i,erc6492VerifierAddress:o=t.universalSignatureVerifierAddress??n?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??n?.contracts?.multicall3?.address}=t;if(n?.verifyHash)return await n.verifyHash(e,t);let a=(()=>{let e=t.signature;return(0,g.q)(e)?e:"object"==typeof e&&"r"in e&&"s"in e?function({r:e,s:t,to:r="hex",v:n,yParity:i}){let o=(()=>{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return+(n%2n===0n);throw Error("Invalid `v` or `yParity` value")})(),s=`0x${new ry.secp256k1.Signature((0,eA.uU)(e),(0,eA.uU)(t)).toCompactHex()}${0===o?"1b":"1c"}`;return"hex"===r?s:(0,p.aT)(s)}(e):(0,c.My)(e)})();try{if(function(e){try{return rl(e),!0}catch{return!1}}(a))return await rv(e,{...t,multicallAddress:s,signature:a});return await rw(e,{...t,verifierAddress:o,signature:a})}catch(e){try{if((0,eT.h)((0,rm.b)(r),await (0,rg.x)({hash:i,signature:a})))return!0}catch{}if(e instanceof rx)return!1;throw e}}async function rv(e,t){let{address:r,blockNumber:i,blockTag:s,hash:a,multicallAddress:u}=t,{authorization:l,data:d,signature:f,to:p}=function(e){rl(e);let t=e7.Ro(e7.di(e,-64,-32)),r=e7.di(e,-t-64,-64),n=e7.di(e,0,-t-64),[i,o,s]=function(e,t,r={}){let{as:n="Array",checksumAddress:i=!1}=r,o="string"==typeof t?tc(t):t,s=function(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(tL);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}(o);if(0===tu(o)&&e.length>0)throw new tK;if(tu(o)&&32>tu(o))throw new tZ({data:"string"==typeof t?t:e7.uK(t),parameters:e,size:tu(o)});let a=0,c="Array"===n?[]:{};for(let t=0;t<e.length;++t){let r=e[t];s.setPosition(a);let[o,u]=function e(t,r,n){let{checksumAddress:i,staticPosition:o}=n,s=tj(r.type);if(s){let[n,a]=s;return function(t,r,n){let{checksumAddress:i,length:o,staticPosition:s}=n;if(!o){let n=s+tl(t.readBytes(32)),o=n+32;t.setPosition(n);let a=tl(t.readBytes(32)),c=tz(r),u=0,l=[];for(let n=0;n<a;++n){t.setPosition(o+(c?32*n:u));let[s,a]=e(t,r,{checksumAddress:i,staticPosition:o});u+=a,l.push(s)}return t.setPosition(s+32),[l,32]}if(tz(r)){let n=s+tl(t.readBytes(32)),a=[];for(let s=0;s<o;++s){t.setPosition(n+32*s);let[o]=e(t,r,{checksumAddress:i,staticPosition:n});a.push(o)}return t.setPosition(s+32),[a,32]}let a=0,c=[];for(let n=0;n<o;++n){let[n,o]=e(t,r,{checksumAddress:i,staticPosition:s+a});a+=o,c.push(n)}return[c,a]}(t,{...r,type:a},{checksumAddress:i,length:n,staticPosition:o})}if("tuple"===r.type)return function(t,r,n){let{checksumAddress:i,staticPosition:o}=n,s=0===r.components.length||r.components.some(({name:e})=>!e),a=s?[]:{},c=0;if(tz(r)){let n=o+tl(t.readBytes(32));for(let o=0;o<r.components.length;++o){let u=r.components[o];t.setPosition(n+c);let[l,d]=e(t,u,{checksumAddress:i,staticPosition:n});c+=d,a[s?o:u?.name]=l}return t.setPosition(o+32),[a,32]}for(let n=0;n<r.components.length;++n){let u=r.components[n],[l,d]=e(t,u,{checksumAddress:i,staticPosition:o});a[s?n:u?.name]=l,c+=d}return[a,c]}(t,r,{checksumAddress:i,staticPosition:o});if("address"===r.type)return function(e,t={}){let r,{checksum:n=!1}=t,i=e.readBytes(32);return[(r=e7.uK(function(e,t,r,n={}){let{strict:i}=n;!1;let o=e.slice(-20,void 0);return i&&function(e,t,r){if("number"==typeof t&&"number"==typeof r&&tu(e)!==r-t)throw new tp({offset:r,position:"end",size:tu(e)}
3)}(o,-20,void 0),o}(i,-20)),n?tA(r):r),32]}(t,{checksum:i});if("bool"===r.type)return[function(e,t={}){let{size:r}=t,n=e;if(void 0!==r&&(te(n,r),n=td(n)),n.length>1||n[0]>1)throw new tf(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=tl(e.readBytes(32));e.setPosition(r+t);let n=tl(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[e7.uK(i),32]}return[e7.uK(e.readBytes(Number.parseInt(i,10),32)),32]}(t,r,{staticPosition:o});if(r.type.startsWith("uint")||r.type.startsWith("int")){var a=t,c=r;let e=c.type.startsWith("int"),n=Number.parseInt(c.type.split("int")[1]||"256",10),i=a.readBytes(32);return[n>48?function(e,t={}){let{size:r}=t;void 0!==r&&te(e,r);let n=e7.uK(e,t);return e7.Dg(n,t)}(i,{signed:e}):tl(i,{signed:e}),32]}if("string"===r.type)return function(e,{staticPosition:t}){let r=tl(e.readBytes(32));e.setPosition(t+r);let n=tl(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=function(e,t={}){let{size:r}=t,n=e;return void 0!==r&&(te(n,r),n=tn(n,{dir:"right"})),ts.decode(n)}(td(e.readBytes(n,32)));return e.setPosition(t+32),[i,32]}(t,{staticPosition:o});throw new t1(r.type)}(s,r,{checksumAddress:i,staticPosition:0});a+=u,"Array"===n?c.push(o):c[r.name??t]=o}return c}(ru,r);return{authorization:function(e,t={}){return"string"==typeof e.chainId?function(e){let{address:t,chainId:r,nonce:n}=e,i=function(e){if(void 0!==e.r&&void 0!==e.s){var t=e;let r=(()=>{var e;if("string"==typeof t)return rt(t);if(t instanceof Uint8Array)return rt(e7.uK(t));return"string"==typeof t.r?function(e){let t=(()=>{let t=e.v?Number(e.v):void 0,r=e.yParity?Number(e.yParity):void 0;if("number"==typeof t&&"number"!=typeof r&&(r=rr(t)),"number"!=typeof r)throw new ra({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}(t):t.v?{r:(e=t).r,s:e.s,yParity:rr(e.v)}:{r:t.r,s:t.s,...void 0!==t.yParity?{yParity:t.yParity}:{}}})();return re(r),r}}(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...i}}(e):{...e,...t.signature}}({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:n,...s&&"0x"!==s?{data:s,to:o}:{}}}(t.signature);if(await eM(e,{address:r,blockNumber:i,blockTag:s})===(0,m.aP)(["0xef0100",l.address]))return await rA(e,{address:r,blockNumber:i,blockTag:s,hash:a,signature:f});let h={address:l.address,chainId:Number(l.chainId),nonce:Number(l.nonce),r:(0,c.cK)(l.r,{size:32}),s:(0,c.cK)(l.s,{size:32}),yParity:l.yParity};if(!await rh({address:r,authorization:h}))throw new rx;let g=await (0,w.T)(e,P,"readContract")({...u?{address:u}:{code:eJ.Ez},authorizationList:[h],abi:n.v2,blockNumber:i,blockTag:"pending",functionName:"aggregate3",args:[[...d?[{allowFailure:!0,target:p??r,callData:d}]:[],{allowFailure:!0,target:r,callData:(0,o.p)({abi:n.UW,functionName:"isValidSignature",args:[a,f]})}]]}),y=g[g.length-1]?.returnData;if(y?.startsWith("0x1626ba7e"))return!0;throw new rx}async function rw(e,t){let{address:r,factory:i,factoryData:s,hash:a,signature:c,verifierAddress:u,...d}=t,f=await (async()=>{if(!i&&!s||function(e){try{if(e7.di(e,-32)!==t9)throw new t7(e);return!0}catch{return!1}}(c))return c;let{data:e,signature:t,to:r}={data:s,signature:c,to:i};return e7.xW(tG(tJ("address, bytes, bytes"),[r,e,t]),t9)})(),m=u?{to:u,data:(0,o.p)({abi:n.E5,functionName:"isValidSig",args:[r,a,f]}),...d}:{data:(0,rf.m)({abi:n.E5,args:[r,a,f],bytecode:eJ.fT}),...d},{data:p}=await (0,w.T)(e,x.T,"call")(m).catch(e=>{if(e instanceof l.zX)throw new rx;throw e});if((0,eA.Nx)(p??"0x0"))return!0;throw new rx}async function rA(e,t){let{address:r,blockNumber:i,blockTag:o,hash:s,signature:a}=t;if((await (0,w.T)(e,P,"readContract")({address:r,abi:n.UW,args:[s,a],blockNumber:i,blockTag:o,functionName:"isValidSignature"}).catch(e=>{if(e instanceof l.bG)throw new rx;throw e})).startsWith("0x1626ba7e"))return!0;throw new rx}class rx extends Error{}function rP(e,t){return(0,h.S)(function(e){let t="string"==typeof e?(0,c.i3)(e):"string"==typeof e.raw?e.raw:(0,c.My)(e.raw),r=(0,c.i3)(`\x19Ethereum Signed Message: 4${(0,ek.E)(t)}`);return(0,m.xW)([r,t])}(e),t)}async function rM(e,{address:t,message:r,factory:n,factoryData:i,signature:o,...s}){let a=rP(r);return(0,w.T)(e,rb,"verifyHash")({address:t,factory:n,factoryData:i,hash:a,signature:o,...s})}var rT=r(9580);function rE({data:e,primaryType:t,types:r}){let n=function e({data:t,primaryType:r,types:n}){let i=[{type:"bytes32"}],o=[function({primaryType:e,types:t}){let r=(0,c.nj)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),o=i?.[0];if(n.has(o)||void 0===r[o])return n;for(let t of(n.add(o),r[o]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,h.S)(r)}({primaryType:r,types:n})];for(let s of n[r]){let[r,a]=function t({types:r,name:n,type:i,value:o}){if(void 0!==r[i])return[{type:"bytes32"},(0,h.S)(e({data:o,primaryType:i,types:r}))];if("bytes"===i)return[{type:"bytes32"},(0,h.S)(o)];if("string"===i)return[{type:"bytes32"},(0,h.S)((0,c.nj)(o))];if(i.lastIndexOf("]")===i.length-1){let e=i.slice(0,i.lastIndexOf("[")),s=o.map(i=>t({name:n,type:e,types:r,value:i}));return[{type:"bytes32"},(0,h.S)((0,en.h)(s.map(([e])=>e),s.map(([,e])=>e)))]}return[{type:i},o]}({types:n,name:s.name,type:s.type,value:t[s.name]});i.push(r),o.push(a)}return(0,en.h)(i,o)}({data:e,primaryType:t,types:r});return(0,h.S)(n)}async function rk(e,t){let{address:r,factory:n,factoryData:i,signature:o,message:s,primaryType:a,types:c,domain:u,...l}=t,d=function(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:(0,rT.H4)({domain:t}),...e.types};(0,rT.$$)({domain:t,message:r,primaryType:n,types:i});let o=["0x1901"];return t&&o.push(function({domain:e,types:t}){return rE({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==n&&o.push(rE({data:r,primaryType:n,types:i})),(0,h.S)((0,m.xW)(o))}({message:s,primaryType:a,types:c,domain:u});return(0,w.T)(e,rb,"verifyHash")({address:r,factory:n,factoryData:i,hash:d,signature:o,...l})}var rS=r(52536),r_=r(23065),rI=r(19024),rB=r(35145),rC=r(8537),rR=r(45789);let rO=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,rU=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;
vendor: 2,947 bytes, line 4
4var rD=r(45667);async function rN(e,t){let{address:r,domain:n,message:i,nonce:o,scheme:s,signature:a,time:c=new Date,...u}=t,l=function(e){let{scheme:t,statement:r,...n}=e.match(rO)?.groups??{},{chainId:i,expirationTime:o,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(rU)?.groups??{},l=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...u,...i?{chainId:Number(i)}:{},...o?{expirationTime:new Date(o)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...l?{resources:l}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!l.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:o,time:s=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||o&&n.scheme!==o||n.expirationTime&&s>=n.expirationTime||n.notBefore&&s<n.notBefore)return!1;try{if(!n.address||!(0,rD.P)(n.address,{strict:!1})||t&&!(0,eT.h)(n.address,t))return!1}catch{return!1}return!0}({address:r,domain:n,message:l,nonce:o,scheme:s,time:c}))return!1;let d=rP(i);return rb(e,{address:l.address,hash:d,signature:a,...u})}var r$=r(31370),rF=r(12880),rj=r(94087);function rz(e){return{call:t=>(0,x.T)(e,t),createAccessList:t=>Y(e,t),createBlockFilter:()=>Q(e),createContractEventFilter:t=>eu(e,t),createEventFilter:t=>el(e,t),createPendingTransactionFilter:()=>ed(e),estimateContractGas:t=>em(e,t),estimateGas:t=>(0,ef.Q)(e,t),getBalance:t=>ey(e,t),getBlobBaseFee:()=>eb(e),getBlock:t=>(0,ev.g)(e,t),getBlockNumber:t=>(0,ew.G)(e,t),getBlockTransactionCount:t=>ex(e,t),getBytecode:t=>eM(e,t),getChainId:()=>(0,eP.T)(e),getCode:t=>eM(e,t),getContractEvents:t=>eO(e,t),getEip712Domain:t=>eD(e,t),getEnsAddress:t=>M(e,t),getEnsAvatar:t=>q(e,t),getEnsName:t=>V(e,t),getEnsResolver:t=>H(e,t),getEnsText:t=>L(e,t),getFeeHistory:t=>e$(e,t),estimateFeesPerGas:t=>(0,ep._)(e,t),getFilterChanges:t=>eF(e,t),getFilterLogs:t=>ej(e,t),getGasPrice:()=>(0,ez.L)(e),getLogs:t=>eR(e,t),getProof:t=>eL(e,t),estimateMaxPriorityFeePerGas:t=>(0,eh.b)(e,t),fillTransaction:t=>(0,eg.a)(e,t),getStorageAt:t=>eq(e,t),getTransaction:t=>(0,eV.x)(e,t),getTransactionConfirmations:t=>eH(e,t),getTransactionCount:t=>(0,eG.y)(e,t),getTransactionReceipt:t=>(0,eW.h)(e,t),multicall:t=>eZ(e,t),prepareTransactionRequest:t=>(0,r$.ft)(e,t),readContract:t=>P(e,t),sendRawTransaction:t=>(0,rF.L)(e,t),sendRawTransactionSync:t=>(0,rj.s)(e,t),simulate:t=>e1(e,t),simulateBlocks:t=>e1(e,t),simulateCalls:t=>t8(e,t),simulateContract:t=>t3(e,t),verifyHash:t=>rb(e,t),verifyMessage:t=>rM(e,t),verifySiweMessage:t=>rN(e,t),verifyTypedData:t=>rk(e,t),uninstallFilter:t=>t4(e,t),waitForTransactionReceipt:t=>(0,rS.n)(e,t),watchBlocks:t=>(function(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:o,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u,l,d,f,m=void 0!==a?a:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type&&"ipc"!==e.transport.transports[0].config.type),p=s??!1;return m?(()=>{let s=(0,rC.A)(["watchBlocks",e.uid,t,r,n,p,c]);return(0,rI.lB)(s,{onBlock:i,onError:o},i=>(0,rB.w)(async()=>{try{let n=await (0,w.T)(e,ev.g,"getBlock")({blockTag:t,includeTransactions:p});if(null!==n.number&&u?.number!=null){if(n.number===u.number)return;if(n.number-u.number>1&&r)for(let t=u?.number+1n;t<n.number;t++){let r=await (0,w.T)(e,ev.g,"getBlock")({blockNumber:t,includeTransactions:p});i.onBlock(r,u),u=r}}(u?.number==null||"pending"===t&&n?.number==null||null!==n.number&&n.number>u.number)&&(i.onBlock(n,u),u=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:c}))})():(l=!0,d=!0,f=()=>l=!1,(async()=>{try{n&&(0,w.T)(e,ev.g,"getBlock")({blockTag:t,includeTransactions:p}).then(e=>{l&&d&&(i(e,void 0),d=!1)}).catch(o);let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await r.subscribe({params:["newHeads"],async onData(t){if(!l)return;let r=await (0,w.T)(e,ev.g,"getBlock")({blockNumber:t.result?.number,includeTransactions:p}).catch(()=>{});l&&(i(r,u),d=!1,u=r)},onError(e){o?.(e)}});f=s,l||f()}catch(e){o?.(e)}})(),()=>f())})(e,t),watchBlockNumber:t=>(0,r_.q)(e,t),watchContractEvent:t=>(function(e,t){let{abi:r,address:n,args:i,batch:o=!0,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:l,pollingInterval:d=e.pollingInterval,strict:f}=t;return(void 0!==l?l:"bigint"==typeof a||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let t=f??!1,l=(0,rC.A)(["watchContractEvent",n,i,o,e.uid,s,d,t,a]);return(0,rI.lB)(l,{onLogs:u,onError:c},c=>{let u,l;void 0!==a&&(u=a-1n);let f=!1,m=(0,rB.w)(async()=>{if(!f){try{l=await (0,w.T)(e,eu,"createContractEventFilter")({abi:r,address:n,args:i,eventName:s,strict:t,fromBlock:a})}catch{}f=!0;return}try{let a;if(l)a=await (0,w.T)(e,eF,"getFilterChanges")({filter:l});else{let o=await (0,w.T)(e,ew.G,"getBlockNumber")({});a=u&&u<o?await (0,w.T)(e,eO,"getContractEvents")({abi:r,address:n,args:i,eventName:s,fromBlock:u+1n,toBlock:o,strict:t}):[],u=o}if(0===a.length)return;if(o)c.onLogs(a);else for(let e of a)c.onLogs([e])}catch(e){l&&e instanceof rR.Di&&(f=!1),c.onError?.(e)}},{emitOnBegin:!0,interval:d});return async()=>{l&&await (0,w.T)(e,t4,"uninstallFilter")({filter:l}),m()}})})():(()=>{let t=(0,rC.A)(["watchContractEvent",n,i,o,e.uid,s,d,f??!1]),a=!0,l=()=>a=!1;return(0,rI.lB)(t,{onLogs:u,onError:c},t=>((async()=>{try{let o=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),c=s?ea({abi:r,eventName:s,args:i}):[],{unsubscribe:u}=await o.subscribe({params:["logs",{address:n,topics:c}],onData(e){if(!a)return;let n=e.result;try{let{eventName:e,args:i}=eI({abi:r,data:n.data,topics:n.topics,strict:f}),o=(0,eC.e)(n,{args:i,eventName:e});t.onLogs([o])}catch(o){let e,r;if(o instanceof ee.fo||o instanceof ee.l3){if(f)return;e=o.abiItem.name,r=o.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,eC.e)(n,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});l=u,a||l()}catch(e){c?.(e)}})(),()=>l()))})()})(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:o,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:l=e.pollingInterval,strict:d}){let f,m,p=void 0!==u?u:"bigint"==typeof s||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type&&"ipc"!==e.transport.transports[0].config.type),h=d??!1;return p?(()=>{let u=(0,rC.A)(["watchEvent",t,r,n,e.uid,i,l,s]);return(0,rI.lB)(u,{onLogs:c,onError:a},a=>{let c,u;void 0!==s&&(c=s-1n);let d=!1,f=(0,rB.w)(async()=>{if(!d){try{u=await (0,w.T)(e,el,"createEventFilter")({address:t,args:r,event:i,events:o,strict:h,fromBlock:s})}catch{}d=!0;return}try{let s;if(u)s=await (0,w.T)(e,eF,"getFilterChanges")({filter:u});else{let n=await (0,w.T)(e,ew.G,"getBlockNumber")({});s=c&&c!==n?await (0,w.T)(e,eR,"getLogs")({address:t,args:r,event:i,events:o,fromBlock:c+1n,toBlock:n}):[],c=n}if(0===s.length)return;if(n)a.onLogs(s);else for(let e of s)a.onLogs([e])}catch(e){u&&e instanceof rR.Di&&(d=!1),a.onError?.(e)}},{emitOnBegin:!0,interval:l});return async()=>{u&&await (0,w.T)(e,t4,"uninstallFilter")({filter:u}),f()}})})():(f=!0,m=()=>f=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),s=o??(i?[i]:void 0),u=[];s&&(u=[s.flatMap(e=>ea({abi:[e],eventName:e.name,args:r}))],i&&(u=u[0]));let{unsubscribe:l}=await n.subscribe({params:["logs",{address:t,topics:u}],onData(e){if(!f)return;let t=e.result;try{let{eventName:e,args:r}=eI({abi:s??[],data:t.data,topics:t.topics,strict:h}),n=(0,eC.e)(t,{args:r,eventName:e});c([n])}catch(i){let e,r;if(i instanceof ee.fo||i instanceof ee.l3){if(d)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=(0,eC.e)(t,{args:r?[]:{},eventName:e});c([n])}},onError(e){a?.(e)}});m=l,f||m()}catch(e){a?.(e)}})(),()=>m())})(e,t),watchPendingTransactions:t=>(function(e,{batch:t=!0,onError:r,onTransactions:n,poll:i,pollingInterval:o=e.pollingInterval}){let s,a;return(void 0!==i?i:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type)?(()=>{let i=(0,rC.A)(["watchPendingTransactions",e.uid,t,o]);return(0,rI.lB)(i,{onTransactions:n,onError:r},r=>{let n,i=(0,rB.w)(async()=>{try{if(!n)try{n=await (0,w.T)(e,ed,"createPendingTransactionFilter")({});return}catch(e){throw i(),e}let o=await (0,w.T)(e,eF,"getFilterChanges")({filter:n});if(0===o.length)return;if(t)r.onTransactions(o);else for(let e of o)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:o});return async()=>{n&&await (0,w.T)(e,t4,"uninstallFilter")({filter:n}),i()}})})():(s=!0,a=()=>s=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!s)return;let t=e.result;n([t])},onError(e){r?.(e)}});a=t,s||a()}catch(e){r?.(e)}})(),()=>a())})(e,t)}}},23065:(e,t,r)=>{r.d(t,{q:()=>u});var n=r(10635),i=r(4770),o=r(19024),s=r(35145),a=r(8537),c=r(61506);function u(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:u,onError:l,poll:d,pollingInterval:f=e.pollingInterval}){let m;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].c
4onfig.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let n=(0,a.A)(["watchBlockNumber",e.uid,t,r,f]);return(0,o.lB)(n,{onBlockNumber:u,onError:l},n=>(0,s.w)(async()=>{try{let t=await (0,i.T)(e,c.G,"getBlockNumber")({cacheTime:0});if(void 0!==m){if(t===m)return;if(t-m>1&&r)for(let e=m+1n;e<t;e++)n.onBlockNumber(e,m),m=e}(void 0===m||t>m)&&(n.onBlockNumber(t,m),m=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:f}))})():(()=>{let i=(0,a.A)(["watchBlockNumber",e.uid,t,r]);return(0,o.lB)(i,{onBlockNumber:u,onError:l},t=>{let r=!0,i=()=>r=!1;return(async()=>{try{let o=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await o.subscribe({params:["newHeads"],onData(e){if(!r)return;let i=(0,n.uU)(e.result?.number);t.onBlockNumber(i,m),m=i},onError(e){t.onError?.(e)}});i=s,r||i()}catch(e){l?.(e)}})(),()=>i()})})()}},23803:(e,t,r)=>{r.d(t,{O:()=>u,_:()=>c});var n=r(6330),i=r(4770),o=r(77372),s=r(27465),a=r(70902);async function c(e,t){return u(e,t)}async function u(e,t){let{block:r,chain:c=e.chain,request:u,type:l="eip1559"}=t||{},d=await (async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:r,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new n.sM;let f=d.toString().split(".")[1]?.length??0,m=10**f,p=e=>e*BigInt(Math.ceil(d*m))/BigInt(m),h=r||await (0,i.T)(e,s.g,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas){let t=await c.fees.estimateFeesPerGas({block:r,client:e,multiply:p,request:u,type:l});if(null!==t)return t}if("eip1559"===l){if("bigint"!=typeof h.baseFeePerGas)throw new n.pw;let t="bigint"==typeof u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await (0,o.N)(e,{block:h,chain:c,request:u}),r=p(h.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??p(await (0,i.T)(e,a.L,"getGasPrice")({}))}}},24004:(e,t,r)=>{r.d(t,{Ak:()=>c,UT:()=>w,Xf:()=>b,fH:()=>y,hT:()=>g,u0:()=>a});var n=r(10727),i=r(14697);let o=BigInt(0),s=BigInt(1);function a(e,t){let r=t.negate();return e?r:t}function c(e,t){let r=(0,i.pS)(e.Fp,t.map(e=>e.Z));return t.map((t,n)=>e.fromAffine(t.toAffine(r[n])))}function u(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function l(e,t){u(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),o=2**e;return{windows:r,windowSize:i,mask:(0,n.OG)(e),maxNumber:o,shiftBy:BigInt(e)}}function d(e,t,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r,c=Number(e&i),u=e>>a;c>n&&(c-=o,u+=s);let l=t*n,d=l+Math.abs(c)-1,f=0===c;return{nextN:u,offset:d,isZero:f,isNeg:c<0,isNegF:t%2!=0,offsetF:l}}let f=new WeakMap,m=new WeakMap;function p(e){return m.get(e)||1}function h(e){if(e!==o)throw Error("invalid wNAF")}class g{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>o;)t&s&&(r=r.add(n)),n=n.double(),t>>=s;return r}precomputeWindow(e,t){let{windows:r,windowSize:n}=l(t,this.bits),i=[],o=e,s=o;for(let e=0;e<r;e++){s=o,i.push(s);for(let e=1;e<n;e++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(e,t,r){if(!this.Fn.isValid(r))throw Error("invalid scalar");let n=this.ZERO,i=this.BASE,o=l(e,this.bits);for(let e=0;e<o.windows;e++){let{nextN:s,offset:c,isZero:u,isNeg:l,isNegF:f,offsetF:m}=d(r,e,o);r=s,u?i=i.add(a(f,t[m])):n=n.add(a(l,t[c]))}return h(r),{p:n,f:i}}wNAFUnsafe(e,t,r,n=this.ZERO){let i=l(e,this.bits);for(let e=0;e<i.windows&&r!==o;e++){let{nextN:o,offset:s,isZero:a,isNeg:c}=d(r,e,i);if(r=o,!a){let e=t[s];n=n.add(c?e.negate():e)}}return h(r),n}getPrecomputes(e,t,r){let n=f.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),f.set(t,n))),n}cached(e,t,r){let n=p(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){let i=p(e);return 1===i?this._unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)}createCache(e,t){u(t,this.bits),m.set(e,t),f.delete(e)}hasCache(e){return 1!==p(e)}}function y(e,t,r,n){let i=t,a=e.ZERO,c=e.ZERO;for(;r>o||n>o;)r&s&&(a=a.add(i)),n&s&&(c=c.add(i)),i=i.double(),r>>=s,n>>=s;return{p1:a,p2:c}}
4function b(e,t,r,i){if(!Array.isArray(r))throw Error("array expected");r.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)});if(!Array.isArray(i))throw Error("array of scalars expected");i.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)});let o=r.length,s=i.length;if(o!==s)throw Error("arrays of points and scalars must have equal length");let a=e.ZERO,c=(0,n.dJ)(BigInt(o)),u=1;c>12?u=c-3:c>4?u=c-2:c>0&&(u=2);let l=(0,n.OG)(u),d=Array(Number(l)+1).fill(a),f=Math.floor((t.BITS-1)/u)*u,m=a;for(let e=f;e>=0;e-=u){d.fill(a);for(let t=0;t<s;t++){let n=Number(i[t]>>BigInt(e)&l);d[n]=d[n].add(r[t])}let t=a;for(let e=d.length-1,r=a;e>0;e--)r=r.add(d[e]),t=t.add(r);if(m=m.add(t),0!==e)for(let e=0;e<u;e++)m=m.double()}return m}function v(e,t,r){if(!t)return(0,i.D0)(e,{isLE:r});if(t.ORDER!==e)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.jr)(t),t}function w(e,t,r={},n){if(void 0===n&&(n="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>o))throw Error(`CURVE.${e} must be positive bigint`)}let i=v(t.p,r.Fp,n),s=v(t.n,r.Fn,n);for(let r of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!i.isValid(t[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}}},24061:(e,t,r)=>{r.d(t,{Bv:()=>o});var n=r(5852);let i={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function o(e,t){let r={};return void 0!==e.authorizationList&&(r.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,n.cK)(BigInt(e.r)):e.r,s:e.s?(0,n.cK)(BigInt(e.s)):e.s,chainId:(0,n.cK)(e.chainId),nonce:(0,n.cK)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.cK)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.cK)(e.v)}:{}}))),void 0!==e.accessList&&(r.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(r.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?r.blobs=e.blobs.map(e=>(0,n.My)(e)):r.blobs=e.blobs),void 0!==e.data&&(r.data=e.data),e.account&&(r.from=e.account.address),void 0!==e.from&&(r.from=e.from),void 0!==e.gas&&(r.gas=(0,n.cK)(e.gas)),void 0!==e.gasPrice&&(r.gasPrice=(0,n.cK)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(r.maxFeePerBlobGas=(0,n.cK)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(r.maxFeePerGas=(0,n.cK)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=(0,n.cK)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(r.nonce=(0,n.cK)(e.nonce)),void 0!==e.to&&(r.to=e.to),void 0!==e.type&&(r.type=i[e.type]),void 0!==e.value&&(r.value=(0,n.cK)(e.value)),r}},24148:(e,t,r)=>{r.d(t,{x:()=>s});var n=r(98770),i=r(5852),o=r(94900);async function s(e,{blockHash:t,blockNumber:r,blockTag:s,hash:a,index:c,sender:u,nonce:l}){let d=s||"latest",f=void 0!==r?(0,i.cK)(r):void 0,m=null;if(a?m=await e.request({method:"eth_getTransactionByHash",params:[a]},{dedupe:!0}):t?m=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.cK)(c)]},{dedupe:!0}):(f||d)&&"number"==typeof c?m=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||d,(0,i.cK)(c)]},{dedupe:!!f}):u&&"number"==typeof l&&(m=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[u,(0,i.cK)(l)]},{dedupe:!0})),!m)throw new n.Kz({blockHash:t,blockNumber:r,blockTag:d,hash:a,index:c});return(e.chain?.formatters?.transaction?.format||o.uP)(m,"getTransaction")}},24204:(e,t,r)=>{function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=r(50193),t.BufferWriter=r(70416),t.Reader=r(85925),t.BufferReader=r(16420),t.util=r(11238),t.rpc=r(33269),t.roots=r(42063),t.configure=n,n()},24902:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Int53=t.Uint32=void 0;let i=n(r(36314)),o=new i.default("18446744073709551615",10,"be");class s{static fromBigEndianBytes(e){return s.fromBytes(e)}static fromBytes(e,t="be"){if(4!==e.length)throw Error("Invalid input length. Expected 4 bytes.");for(let t=0;t<e.length;++t)if(!Number.isInteger(e[t])||e[t]>255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?e:Array.from(e).reverse();return new s(0x1000000*r[0]+65536*r[1]+256*r[2]+r[3])}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new s(Number.parseInt(e,10))}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(e<0||e>0xffffffff)throw Error("Input not in uint32 range: "+e.toString());this.data=e}toBytesBigEndian(){return new Uint8Array([255&Math.floor(this.data/0x1000000),255&Math.floor(this.data/65536),255&Math.floor(this.data/256),255&Math.floor(this.data/1)])}toBytesLittleEndian(){return new Uint8Array([255&Math.floor(this.data/1),255&Math.floor(this.data/256),255&Math.floor(this.data/65536),255&Math.floor(this.data/0x1000000)])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}t.Uint32=s;class a{static fromString(e){if(!e.match(/^-?[0-9]+$/))throw Error("Invalid string format");return new a(Number.parseInt(e,10))}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(e<Number.MIN_SAFE_INTEGER||e>Number.MAX_SAFE_INTEGER)throw Error("Input not in int53 range: "+e.toString());this.data=e}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}t.Int53=a;class c{static fromString(e){return new c(a.fromString(e).toNumber())}constructor(e){let t=new a(e);if(0>t.toNumber())throw Error("Input is negative");this.data=t}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}}t.Uint53=c;class u{static fromBytesBigEndian(e){return u.fromBytes(e)}static fromBytes(e,t="be"){if(8!==e.length)throw Error("Invalid input length. Expected 8 bytes.");for(let t=0;t<e.length;++t)if(!Number.isInteger(e[t])||e[t]>255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?Array.from(e):Array.from(e).reverse();return new u(new i.default(r))}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new u(new i.default(e,10,"be"))}static fromNumber(e){let t;if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");try{t=new i.default(e)}catch{throw Error("Input is not a safe integer")}return new u(t)}constructor(e){if(e.isNeg())throw Error("Input is negative");if(e.gt(o))throw Error("Input exceeds uint64 range");this.data=e}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}}t.Uint64=u},25073:(e,t,r)=>{let n=r(42742).v4,i=r(2622),o=function(e,t){if(!(this instanceof o))return new o(e,t);t||(t={}),this.options={reviver:void 0!==t.reviver?t.reviver:null,replacer:void 0!==t.replacer?t.replacer:null,generator:void 0!==t.generator?t.generator:function(){return n()},version:void 0!==t.version?t.version:2,notificationIdNull:"boolean"==typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=o,o.prototype.request=function(e,t,r,n){let o,s=this,a=null,c=Array.isArray(e)&&"function"==typeof t;if(1===this.options.version&&c)throw TypeError("JSON-RPC 1.0 does not support batching");let u=!c&&e&&"object"==typeof e&&"function"==typeof t;if(c||u)n=t,a=e;else{"function"==typeof r&&(n=r,r=void 0);let o="function"==typeof n;try{a=i(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(e){if(o)return void n(e);throw e}if(!o)return a}try{o=JSON.stringify(a,this.options.replacer)}catch(e){n(e);return}return this.callServer(o,function(e,t){s._parseResponse(e,t,n)}),a},o.prototype._parseResponse=function(e,t,r){let n;if(e)return void r(e);if(!t)return void r();try{n=JSON.parse(t,this.options.reviver)}catch(e){r(e);return}if(3===r.length)if(!Array.isArray(n))return void r(null,n.error,n.result);else{let e=function(e){return void 0!==e.error};r(null,n.filter(e),n.filter(function(t){return!e(t)}));return}r(null,n)}},25251:(e,t,r)=>{r.d(t,{vE:()=>c,kb:()=>s});var n=r(65714),i=r(95327),o=class extends i{socket;constructor(e,t){super(),this.socket=new window.WebSocket(e,t.protocols),this.socket.onopen=()=>
vendor: 4,417 bytes, line 4
4this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,r){let n=r||t;try{this.socket.send(e),n()}catch(e){n(e)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,r){this.socket.addEventListener(e,t,r)}};function s(e,t){return new o(e,t)}var a=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},c=class extends i{address;rpc_id;queue;options;autoconnect;ready;reconnect;reconnect_timer_id;reconnect_interval;max_reconnects;rest_options;current_reconnects;generate_request_id;socket;webSocketFactory;dataPack;constructor(e,t="ws://localhost:8080",{autoconnect:r=!0,reconnect:n=!0,reconnect_interval:i=1e3,max_reconnects:o=5,...s}={},c,u){super(),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=r,this.ready=!1,this.reconnect=n,this.reconnect_timer_id=void 0,this.reconnect_interval=i,this.max_reconnects=o,this.rest_options=s,this.current_reconnects=0,this.generate_request_id=c||(()=>"number"==typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),u?this.dataPack=u:this.dataPack=new a,this.autoconnect&&this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}connect(){this.socket||this._connect(this.address,{autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects,...this.rest_options})}call(e,t,r,n){return n||"object"!=typeof r||(n=r,r=null),new Promise((i,o)=>{if(!this.ready)return o(Error("socket not ready"));let s=this.generate_request_id(e,t);this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t||void 0,id:s}),n,e=>{if(e)return o(e);this.queue[s]={promise:[i,o]},r&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],o(Error("reply timeout"))},r))})})}async login(e){let t=await this.call("rpc.login",e);if(!t)throw Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((r,n)=>{if(!this.ready)return n(Error("socket not ready"));this.socket.send(this.dataPack.encode({jsonrpc:"2.0",method:e,params:t}),e=>{if(e)return n(e);r()})})}async subscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.on",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"==typeof e&&(e=[e]);let t=await this.call("rpc.off",e);if("string"==typeof e&&"ok"!==t[e])throw Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket&&this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return void 0!==this.reconnect_timer_id}willReconnect(){return this.reconnect&&(0===this.max_reconnects||this.current_reconnects<this.max_reconnects)}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",({data:e})=>{e instanceof ArrayBuffer&&(e=n.Buffer.from(e).toString());try{e=this.dataPack.decode(e)}catch(e){return}if(e.notification&&this.listeners(e.notification).length){if(!Object.keys(e.params).length)return this.emit(e.notification);let t=[e.notification];if(e.params.constructor===Object)t.push(e.params);else for(let r=0;r<e.params.length;r++)t.push(e.params[r]);return Promise.resolve().then(()=>{this.emit.apply(this,t)})}if(!this.queue[e.id])return e.method?Promise.resolve().then(()=>{this.emit(e.method,e?.params)}):void 0;"error"in e=="result"in e&&this.queue[e.id].promise[1](Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[e.id].timeout&&clearTimeout(this.queue[e.id].timeout),e.error?this.queue[e.id].promise[1](e.error):this.queue[e.id].promise[0](e.result),delete this.queue[e.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",({code:r,reason:n})=>{this.ready&&setTimeout(()=>
4this.emit("close",r,n),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)?this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",r,n),1))})}}},26013:(e,t,r)=>{r.d(t,{h:()=>n});let n=r(16284).k},26143:(e,t,r)=>{r.d(t,{J:()=>o});var n=r(17298);function i(e){return{address:e.address,amount:n.oB(e.amount),index:n.oB(e.index),validatorIndex:n.oB(e.validatorIndex)}}function o(e){return{..."bigint"==typeof e.baseFeePerGas&&{baseFeePerGas:n.oB(e.baseFeePerGas)},..."bigint"==typeof e.blobBaseFee&&{blobBaseFee:n.oB(e.blobBaseFee)},..."string"==typeof e.feeRecipient&&{feeRecipient:e.feeRecipient},..."bigint"==typeof e.gasLimit&&{gasLimit:n.oB(e.gasLimit)},..."bigint"==typeof e.number&&{number:n.oB(e.number)},..."bigint"==typeof e.prevRandao&&{prevRandao:n.oB(e.prevRandao)},..."bigint"==typeof e.time&&{time:n.oB(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(i)}}}},26255:(e,t,r)=>{let n;r.d(t,{Z:()=>eF});var i=r(6625),o=({maxRetries:e,retryInterval:t,backoffMultiplier:r=2.5,...n})=>(0,i.ye)({methodName:"track",path:"v2/tx/track",method:"post",maxRetries:e,retryInterval:t,backoffMultiplier:r})(n),s=(0,i.ye)({methodName:"status",path:"v2/tx/status",method:"get",throwOnError:!0});let a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},c=new Uint8Array(16),u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));let l=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();let i=(e=e||{}).random??e.rng?.()??function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(c)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return function(e,t=0){return(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase()}(i)};var d=(e=>(e.ibcTransfer="ibcTransfer",e.axelarTransfer="axelarTransfer",e.cctpTransfer="cctpTransfer",e.hyperlaneTransfer="hyperlaneTransfer",e.opInitTransfer="opInitTransfer",e.goFastTransfer="goFastTransfer",e.stargateTransfer="stargateTransfer",e.eurekaTransfer="eurekaTransfer",e.layerZeroTransfer="layerZeroTransfer",e))(d||{});function f(e){switch(e){case"STATE_SUBMITTED":case"STATE_PENDING":default:return"pending";case"STATE_COMPLETED_SUCCESS":return"success";case"STATE_COMPLETED_ERROR":case"STATE_PENDING_ERROR":return"failed"}}var m=e=>"completed"===e.status||"failed"===e.status||"incomplete"===e.status,p=e=>{let t=e?.statusResponse?.transfers?.[0]?.state,r=e?.status;return"STATE_COMPLETED_SUCCESS"===t||"STATE_COMPLETED_ERROR"===t||"STATE_ABANDONED"===t||"failed"===r||"success"===r},h=e=>{let t=e?.statusResponse?.transfers?.[0]?.state,r=e?.status;return"STATE_COMPLETED_SUCCESS"===t||"success"===r},g=new Map,y=async({transactionDetails:e,executeTransaction:t,trackTxPollingOptions:r,routeDetails:n,onRouteStatusUpdated:a,options:c,routeId:u,isCancelled:l})=>{A(),u??=n?.id;let d=g.get(u??"");if(e??=n?.transactionDetails??d?.transactionDetails??[],!(n&&m(n)&&n?.relatedRoutes?.every(e=>m(e))))for(let[d,f]of e.entries()){if(t&&!f.txHash){let{txHash:e,explorerLink:n}=await t?.(d);f.txHash=e,n||(n=(await o({chainId:f.chainId,txHash:f.txHash,...r})).explorerLink),f.explorerLink=n,await c?.onTransactionTracked?.({txHash:f.txHash,chainId:f.chainId,explorerLink:n})}if(void 0===f.txHash)return void b({routeId:u,routeDetails:n,transactionDetails:e,options:{onRouteStatusUpdated:a,...c}});for(;;){let t=g.get(u??""),r=t?.relatedRoutes?.every(e=>e&&m(e));if(p(f)&&r){c?.onTransactionCompleted?.({chainId:f.chainId,txHash:f.txHash,status:f.statusResponse});break}if(l?.()){console.info(`Polling cancelled for route ${u}`);break}try{let r=await s({chainId:f.chainId,txHash:f.txHash});if(f.statusResponse=r,b({routeId:u,routeDetails:n,transactionDetail
4s:e,options:{onRouteStatusUpdated:a,...c},relatedRoutes:n?.relatedRoutes}),p(f)){let e=t?.relatedRoutes&&t?.relatedRoutes.length>0?t.relatedRoutes:n?.relatedRoutes;if(e&&e.length>0){if(e.every(e=>m(e))){c?.onTransactionCompleted?.({chainId:f.chainId,txHash:f.txHash,status:r});break}}else{c?.onTransactionCompleted?.({chainId:f.chainId,txHash:f.txHash,status:r});break}}}catch(e){console.error(e)}finally{await (0,i.uk)(1e3)}}}},b=({transactionDetails:e,routeDetails:t,options:r,status:n,routeId:i,mainRouteId:o,transferIndexToRouteKey:s,relatedRoutes:a})=>{i??=t?.id??"";let c=t??g.get(i);if(i||void 0!=c||(c=(e=>{let t=l(),r={id:t,timestamp:Date.now(),route:v(e?.route),status:"unconfirmed",txsRequired:e?.route?.txsRequired??1,txsSigned:0,transactionDetails:[],transferEvents:[],relatedRoutes:[],userAddresses:e?.userAddresses??[]};return g.set(t,r),r})(r),i=c?.id),s??=c?.transferIndexToRouteKey,void 0===c)throw Error("No route details found");e??=c?.transactionDetails??[];let u=c?.txsRequired??r?.route?.txsRequired??1;c?.status==="signing"&&"pending"===n&&(c.txsSigned+=1);let d=t?.transferEvents??function(e){return e?e?.flatMap(e=>(e?.transferSequence??[]).map(e=>(function(e){let t=e?.axelarTransfer,r=e?.ibcTransfer,n=e?.cctpTransfer,i=e?.hyperlaneTransfer,o=e?.opInitTransfer,s=e?.goFastTransfer,a=e?.stargateTransfer,c=e?.eurekaTransfer,u=e?.layerZeroTransfer,l="";t?l="axelarTransfer":r?l="ibcTransfer":n?l="cctpTransfer":i?l="hyperlaneTransfer":o?l="opInitTransfer":s?l="goFastTransfer":a?l="stargateTransfer":c?l="eurekaTransfer":u&&(l="layerZeroTransfer");let d=n=>{switch(l){case"ibcTransfer":if("send"===n)return{explorerLink:r.packetTxs.sendTx?.explorerLink,txHash:r.packetTxs.sendTx?.txHash};return{explorerLink:r.packetTxs.receiveTx?.explorerLink??r.packetTxs.timeoutTx?.explorerLink,txHash:r.packetTxs.receiveTx?.txHash};case"eurekaTransfer":if("send"===n)return{explorerLink:c.packetTxs.sendTx?.explorerLink,txHash:c.packetTxs.sendTx?.txHash};return{explorerLink:c.packetTxs.receiveTx?.explorerLink??c.packetTxs.timeoutTx?.explorerLink,txHash:c.packetTxs.receiveTx?.txHash};case"goFastTransfer":if("send"===n)return{explorerLink:s.txs.orderSubmittedTx?.explorerLink,txHash:s.txs.orderSubmittedTx?.txHash};return{explorerLink:s.txs.orderFilledTx?.explorerLink??s.txs.orderTimeoutTx?.explorerLink??s.txs.orderRefundedTx?.explorerLink,txHash:s.txs.orderFilledTx?.txHash};case"axelarTransfer":let i=t.txs,o=t.txs?.contractCallWithTokenTxs;if("send"===n)return{explorerLink:i?.sendTx?.explorerLink??o?.sendTx?.explorerLink,txHash:i?.sendTx?.txHash??o?.sendTx?.txHash};return{explorerLink:i?.executeTx?.explorerLink??o?.executeTx?.explorerLink,txHash:i?.executeTx?.txHash??o?.executeTx?.txHash};default:if("send"===n)return{explorerLink:e[l]?.txs?.sendTx?.explorerLink,txHash:e[l]?.txs?.sendTx?.txHash};return{explorerLink:e[l]?.txs?.receiveTx?.explorerLink,txHash:e[l]?.txs?.receiveTx?.txHash}}},f={...r,...t,...n,...i,...a,...i,...o,...s,...a,...c,...u,transferType:l,fromExplorerLink:d("send")?.explorerLink,toExplorerLink:d("receive")?.explorerLink,fromTxHash:d("send")?.txHash,toTxHash:d("receive")?.txHash,durationInMs:(()=>{switch(l){case"ibcTransfer":{let e=r.packetTxs.sendTx?.onChainAt,t=r.packetTxs.receiveTx?.onChainAt;if(!e||!t)return;return new Date(t).getTime()-new Date(e).getTime()}case"eurekaTransfer":{let e=c.packetTxs.sendTx?.onChainAt,t=c.packetTxs.receiveTx?.onChainAt;if(!e||!t)return;return new Date(t).getTime()-new Date(e).getTime()}case"goFastTransfer":{let e=s.txs.orderSubmittedTx?.onChainAt,t=s.txs.orderFilledTx?.onChainAt;if(!e||!t)return;return new Date(t).getTime()-new Date(e).getTime()}case"axelarTransfer":{let e=t.txs,r=t.txs?.contractCallWithTokenTxs,n=e?.sendTx?.onChainAt??r?.sendTx?.onChainAt,i=e?.confirmTx?.onChainAt??r?.confirmTx?.onChainAt;if(!n||!i)return;return new Date(i).getTime()-new Date(n).getTime()}default:{let t=e[l],r=t?.txs?.sendTx?.onChainAt,n=t?.txs?.receiveTx?.onChainAt;if(!r||!n)return;return new Date(n).getTime()-new Date(r).getTime()}}})()},m=function(e){switch(e){case"TRANSFER_PENDING":case"TRANSFER_RECEIVED":case"AXELAR_TRANSFER_PENDING_CONFIRMATION":case"AXELAR_TRANSFER_PENDING_RECEIPT":case"CCTP_TRANSFER_SENT":case"CCTP_TRANSFER_PENDING_CONFIRMATION":case"CCTP_TRANSFER_CONFIRMED":case"HYPERLANE_TRANSFER_SENT":case"OPINIT_TRANSFER_SENT":case"GO_FAST_TRANSFER_SENT":case"STARGATE_TRANSFER_SENT":case"LAYER_ZERO_TRANSFER_SENT":case"LAYER_ZERO_TRANSFER_WAITING_FOR_COMPOSE":return"pending";case"TRANSFER_SUCCESS":case"AXELAR_TRANSFER_SUCCESS":case"CCTP_TRANSFER_RECEIVED":case"HYPERLANE_TRANSFER_RECEIVED":case"OPINIT_TRANSFER_RECEIVED":case"STARGATE_TRANSFER_RECEIVED":case"GO_FAST_TRANSFER_FILLED":case"LAYER_ZERO_TRANSFER_RECEIVED":return"completed";default:return"failed"}}(f.state);return{...f,status:m}})(e))):[]}(e.map(e=>e.statusResponse).filter(e=>void 0!==e)),f=e.every(e=>e.txHash||void 0===e.status),m=e.every(e=>p(e)),y=f&&m,b=e.some(e=>h(e)),A=e.some(e=>!h(e)),P=e?.findLast(e=>e.statusResponse?.transferAssetRelease)?.statusResponse?.transferAssetRelease,M=x({relatedRoutes:a??c?.relatedRoutes??[],transferIndexToRouteKey:s,transactionDetail
4s:e}),T={id:i,timestamp:c.timestamp,status:(()=>{if(n)return n;if(b&&!f)return"incomplete";if(y){if(!A)return"completed";else if(b&&A)return"incomplete";else if(A)return"failed"}return c?.status})(),route:v(c?.route??r?.route),txsRequired:u,transactionDetails:e,transferEvents:d,transferAssetRelease:P,userAddresses:(c?.userAddresses.length>0?c?.userAddresses:r?.userAddresses)??[],txsSigned:c?.txsSigned,transferIndexToRouteKey:s,mainRouteId:o??c?.mainRouteId,relatedRoutes:M},E=w(T),k=w(c);return r?.onRouteStatusUpdated&&JSON.stringify(E)!==JSON.stringify(k)&&r?.onRouteStatusUpdated?.(E),i&&g.set(i,T),T},v=e=>({usdAmountOut:e?.usdAmountOut,usdAmountIn:e?.usdAmountIn,amountIn:e?.amountIn,amountOut:e?.amountOut,sourceAssetDenom:e?.sourceAssetDenom,sourceAssetChainId:e?.sourceAssetChainId,destAssetDenom:e?.destAssetDenom,destAssetChainId:e?.destAssetChainId,estimatedRouteDurationSeconds:e?.estimatedRouteDurationSeconds,operations:e?.operations}),w=e=>({...e,transactionDetails:e.transactionDetails.map(e=>{let{statusResponse:t,...r}=e;return{...r,status:e?.status??f(t?.transfers?.[0]?.state)}})}),A=()=>{g.forEach((e,t)=>{("completed"===e.status||"failed"===e.status||"incomplete"===e.status)&&g.delete(t)})},x=({relatedRoutes:e,transferIndexToRouteKey:t,transactionDetails:r})=>{let n=[...e.map(e=>({...e}))];return t&&r?.forEach(e=>{Object.entries(t).forEach(([t,r])=>{let i=Number(t),o=e?.statusResponse?.transfers?.[i]?.state,s=(e=>{if(e)return"success"===e?"completed":e})(f(o)),a=e?.statusResponse?.transfers?.[i]?.transferAssetRelease,c=n.find(e=>e.routeKey===r);c&&o&&(c.status=s??"failed"),c&&a&&(c.transferAssetRelease=a)})}),n},P=r(55406),M=r(36219),T=r(49687),E=r(13957),k=r(52381),S=r(72316),_=r(58467),I=r(88772);function B(){return{baseVestingAccount:void 0,funderAddress:"",startTime:new Date,lockupPeriods:[],vestingPeriods:[]}}var C={typeUrl:"/evmos.vesting.v2.ClawbackVestingAccount",encode(e,t=I.Writer.create()){for(let r of(void 0!==e.baseVestingAccount&&P.HV.encode(e.baseVestingAccount,t.uint32(10).fork()).ldelim(),""!==e.funderAddress&&t.uint32(18).string(e.funderAddress),void 0!==e.startTime&&P.Dc.encode((0,M.C)(e.startTime),t.uint32(26).fork()).ldelim(),e.lockupPeriods))P.aA.encode(r,t.uint32(34).fork()).ldelim();for(let r of e.vestingPeriods)P.aA.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof I.Reader?e:new I.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.baseVestingAccount=P.HV.decode(r,r.uint32());break;case 2:i.funderAddress=r.string();break;case 3:i.startTime=(0,M.z)(P.Dc.decode(r,r.uint32()));break;case 4:i.lockupPeriods.push(P.aA.decode(r,r.uint32()));break;case 5:i.vestingPeriods.push(P.aA.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({baseVestingAccount:(0,M.vM)(e.baseVestingAccount)?P.HV.fromJSON(e.baseVestingAccount):void 0,funderAddress:(0,M.vM)(e.funderAddress)?String(e.funderAddress):"",startTime:(0,M.vM)(e.startTime)?(0,M.d4)(e.startTime):void 0,lockupPeriods:Array.isArray(e?.lockupPeriods)?e.lockupPeriods.map(e=>P.aA.fromJSON(e)):[],vestingPeriods:Array.isArray(e?.vestingPeriods)?e.vestingPeriods.map(e=>P.aA.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.baseVestingAccount&&(t.baseVestingAccount=e.baseVestingAccount?P.HV.toJSON(e.baseVestingAccount):void 0),void 0!==e.funderAddress&&(t.funderAddress=e.funderAddress),void 0!==e.startTime&&(t.startTime=e.startTime.toISOString()),e.lockupPeriods?t.lockupPeriods=e.lockupPeriods.map(e=>e?P.aA.toJSON(e):void 0):t.lockupPeriods=[],e.vestingPeriods?t.vestingPeriods=e.vestingPeriods.map(e=>e?P.aA.toJSON(e):void 0):t.vestingPeriods=[],t},fromPartial(e){let t=B();return t.baseVestingAccount=void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount?P.HV.fromPartial(e.baseVestingAccount):void 0,t.funderAddress=e.funderAddress??"",t.startTime=e.startTime??void 0,t.lockupPeriods=e.lockupPeriods?.map(e=>P.aA.fromPartial(e))||[],t.vestingPeriods=e.vestingPeriods?.map(e=>P.aA.fromPartial(e))||[],t},fromAmino(e){let t=B();return void 0!==e.base_vesting_account&&null!==e.base_vesting_account&&(t.baseVestingAccount=P.HV.fromAmino(e.base_vesting_account)),void 0!==e.funder_address&&null!==e.funder_address&&(t.funderAddress=e.funder_address),void 0!==e.start_time&&null!==e.start_time&&(t.startTime=(0,M.z)(P.Dc.fromAmino(e.start_time))),t.lockupPeriods=e.lockup_periods?.map(e=>P.aA.fromAmino(e))||[],t.vestingPeriods=e.vesting_periods?.map(e=>P.aA.fromAmino(e))||[],t},toAmino(e){let t={};return t.base_vesting_account=e.baseVestingAccount?P.HV.toAmino(e.baseVestingAccount):void 0,t.funder_address=""===e.funderAddress?void 0:e.funderAddress,t.start_time=e.startTime?P.Dc.toAmino((0,M.C)(e.startTime)):void 0,e.lockupPeriods?t.lockup_periods=e.lockupPeriods.map(e=>e?P.aA.toAmino(e):void 0):t.lockup_periods=e.lockupPeriods,e.vestingPeriods?t.vesting_periods=e.vestingPeriods.map(e=>e?P.aA.toAmino(e):void 0):t.vesting_periods=e.vestingPeriods,t},fromAminoMsg:e=>C.fromAmino(e.value),toAminoMsg:e=>({type:"vesting/ClawbackVestingAccount",value:C.toAmino(e)}),fromProtoMsg:e=>C.decode(e.value),toProto:e=>C.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.ClawbackVestingAccount",value:C.encode(e).finish()})};function R(e){let t=JSON.parse(e.msg??"");return"/ibc.applications.transfer.v1.MsgTransfer"===e.msgTypeUrl?{typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:_.MsgTransfer.fromJSON({sourcePort:t.source_port,sourceChannel:t.source_channel,token:t.token,sender:t.sender,receiver:t.receiver,timeoutHeight:t.timeout_height,timeoutTimestamp:t.timeout_timestamp,memo:t.memo})}:"/cosmwasm.wasm.v1.MsgExecuteContract"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:S.MsgExecuteContract.fromPartial({sender:t.sender,contract:t.contract,msg:(0,E.Pq)(JSON.stringify(t.msg)),funds:t.funds})}:"/cosmos.bank.v1beta1.MsgSend"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:k.MsgSend.fromPartial({fromAddress:t.from_address,toAddress:t.to_address,amount:t.amount})}:"/circle.cctp.v1.MsgDepositForBurn"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:P.ux.fromAmino(t)}:"/circle.cctp.v1.MsgDepositForBurnWithCaller"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:P.x4.fromAmino(t)}:"/initia.move.v1.MsgExecute"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:P.V_.fromPartial({sender:t.sender,moduleAddress:t.module_address,moduleName:t.module_name,functionName:t.function_name,args:t.args})}:"/opinit.ophost.v1.MsgInitiateTokenDeposit"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:P.gF.fromPartial({sender:t.sender,to:t.to,amount:t.amount,bridgeId:t.bridge_id})}:"/evmos.vesting.v2.ClawbackVestingAccount"===e.msgTypeUrl?{typeUrl:e.msgTypeUrl,value:C.fromPartial({baseVestingAccount:t.base_vesting_account,funderAddress:t.funder_address,lockupPeriods:t.lockup_periods,startTime:t.start_time,vestingPeriods:t.vesting_periods})}:{typeUrl:e.msgTypeUrl??"",value:t}}async function O(e,t,r,n,i,o=1.5){if(!n&&!i)throw Error("Either message or encodedMsg must be provided");let s=n?.map(e=>R(e));if(!(i=i||s))throw Error("Either message or encodedMsg must be provided");return r.includes("evmos")||r.includes("injective")||r.includes("dymension")||r.includes("sunrise-1")?n?.find(e=>"/cosmwasm.wasm.v1.MsgExecuteContract"===e.msgTypeUrl)?"2400000":"280000":Math.ceil(await e.simulate(t,i,"")*o).toFixed(0)}var U=r(32481),D=r(94060),N=r(69430),$=r(52627),F=r(27423),j=r(31305),z=r(17379),L=r(11746),q=r(89267),V=r(65714).Buffer,H={encode(e,t=$.BinaryWriter.create()){for(let r of(void 0!==e.baseAccount&&F.BaseAccount.encode(e.baseA
4ccount,t.uint32(10).fork()).ldelim(),e.originalVesting))j.Coin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.delegatedFree)j.Coin.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.delegatedVesting)j.Coin.encode(r,t.uint32(34).fork()).ldelim();return e.endTime!==BigInt(0)&&t.uint32(40).int64(e.endTime),t},decode(e,t){let r=e instanceof $.BinaryReader?e:new $.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i={baseAccount:void 0,originalVesting:[],delegatedFree:[],delegatedVesting:[],endTime:BigInt(0)};for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.baseAccount=F.BaseAccount.decode(r,r.uint32());break;case 2:i.originalVesting.push(j.Coin.decode(r,r.uint32()));break;case 3:i.delegatedFree.push(j.Coin.decode(r,r.uint32()));break;case 4:i.delegatedVesting.push(j.Coin.decode(r,r.uint32()));break;case 5:i.endTime=r.int64();break;default:r.skipType(7&e)}}return i}},G={encode(e,t=$.BinaryWriter.create()){for(let r of(e.startTime!==BigInt(0)&&t.uint32(8).int64(e.startTime),e.length!==BigInt(0)&&t.uint32(16).int64(e.length),e.amount))j.Coin.encode(r,t.uint32(26).fork()).ldelim();return 0!==e.actionType&&t.uint32(32).int32(e.actionType),t},decode(e,t){let r=e instanceof $.BinaryReader?e:new $.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i={startTime:BigInt(0),length:BigInt(0),amount:[],actionType:0};for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.startTime=r.int64();break;case 2:i.length=r.int64();break;case 3:i.amount.push(j.Coin.decode(r,r.uint32()));break;case 4:i.actionType=r.int32();break;default:r.skipType(7&e)}}return i}},W={encode(e,t=$.BinaryWriter.create()){for(let r of(void 0!==e.baseVestingAccount&&H.encode(e.baseVestingAccount,t.uint32(10).fork()).ldelim(),e.vestingPeriods))G.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof $.BinaryReader?e:new $.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i={baseVestingAccount:void 0,vestingPeriods:[]};for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.baseVestingAccount=H.decode(r,r.uint32());break;case 3:i.vestingPeriods.push(G.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i}};function J(){return{baseAccount:void 0,codeHash:new Uint8Array}}var Z={typeUrl:"/injective.types.v1beta1.EthAccount",encode:(e,t=I.Writer.create())=>(void 0!==e.baseAccount&&M.$q.encode(e.baseAccount,t.uint32(10).fork()).ldelim(),0!==e.codeHash.length&&t.uint32(18).bytes(e.codeHash),t),decode(e,t){let r=e instanceof I.Reader?e:new I.Reader(e),n=void 0===t?r.len:r.pos+t,i=J();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.baseAccount=M.$q.decode(r,r.uint32());break;case 2:i.codeHash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({baseAccount:(0,M.vM)(e.baseAccount)?M.$q.fromJSON(e.baseAccount):void 0,codeHash:(0,M.vM)(e.codeHash)?(0,M.DM)(e.codeHash):new Uint8Array}),toJSON(e){let t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?M.$q.toJSON(e.baseAccount):void 0),void 0!==e.codeHash&&(t.codeHash=(0,M.rT)(void 0!==e.codeHash?e.codeHash:new Uint8Array)),t},fromPartial(e){let t=J();return t.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?M.$q.fromPartial(e.baseAccount):void 0,t.codeHash=e.codeHash??new Uint8Array,t},fromAmino(e){let t=J();return void 0!==e.base_account&&null!==e.base_account&&(t.baseAccount=M.$q.fromAmino(e.base_account)),void 0!==e.code_hash&&null!==e.code_hash&&(t.codeHash=(0,M.DM)(e.code_hash)),t},toAmino(e){let t={};return t.base_account=e.baseAccount?M.$q.toAmino(e.baseAccount):void 0,t.code_hash=e.codeHash?(0,M.rT)(e.codeHash):void 0,t},fromAminoMsg:e=>Z.fromAmino(e.value),fromProtoMsg:e=>Z.decode(e.value),toProto:e=>Z.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/injective.types.v1beta1.EthAccount",value:Z.encode(e).finish()})},K=e=>{switch(e.typeUrl){case"/stride.vesting.StridePeriodicVestingAccount":{let t=W.decode(e.value).baseVestingAccount?.baseAccount;return(0,N.assertDefinedAndNotNull)(t),{address:t.address,pubkey:t.pubKey?(0,z.decodePubkey)(t.pubKey):null,accountNumber:Number(t.accountNumber),sequence:Number(t.sequence)}}case"/injective.types.v1beta1.EthAccount":return Y(e,"/injective.crypto.v1beta1.ethsecp256k1.PubKey");case"/ethermint.types.v1.EthAccount":return Y(e,"/ethermint.crypto.v1.ethsecp256k1.PubKey");default:if("/cosmos.auth.v1beta1.BaseAccount"===e.typeUrl){let{address:t,pubKey:r,accountNumber:n,sequence:i}=F.BaseAccount.decode(e.value);switch(r?.typeUrl){case"/initia.crypto.v1beta1.ethsecp256k1.PubKey":case"/ethermint.crypto.v1.ethsecp256k1.PubKey":case"/cosmos.evm.crypto.v1.ethsecp256k1.PubKey":{let{key:e}=L.PubKey.decode(r.value);return{address:t,pubkey:(0,q.encodeSecp256k1Pubkey)(e),accountNumber:Number(n),sequence:Number(i)}}}}return(0,T.accountFromAny)(e)}},Y=(e,t="/injective.crypto.v1beta1.ethsecp256k1.PubKey")=>{let r=Z.decode(e.value).baseAccount,n=r.pubKey;return{address:r.address,pubkey:n?{type:t,value:V.from(n.value).toString("base64")}:null,accountNumber:parseInt(r.accountNumber.toString(),10),sequence:parseInt(r.sequence.toString(),10)}},X=async e=>{if(D.Lg.endpointOptions.getRpcEndpointForChain)return D.Lg.endpointOptions.getRpcEndpointForChain(e);if(D.Lg.endpointOptions.endpoints&&D.Lg.endpointOptions.endpoints[e]){let t=D.Lg.endpointOptions.endpoints[e];if(t?.rpc)return t.rpc}console.warn("Warning: You are using unreliable public endpoints. We strongly recommend overriding them via endpointOptions for use beyond development settings.");let t=(0,U.Bt)().find(t=>t.chainId===e);if(!t)throw Error(`getRpcEndpointForChain: failed to find chain id '${e}' in registry`);
4if(t.apis?.rpc?.length===0||!t.apis?.rpc)throw Error(`getRpcEndpointForChain error: failed to find RPC endpoint for chain id '${e}'`);let r=t.apis?.rpc?.map(e=>e.address),n=await (0,U.yx)(r,"rpc");if(!n)throw Error(`getRpcEndpointForChain error: failed to find RPC endpoint for chain id '${e}'`);return n},Q=async({chainId:e,getOfflineSigner:t})=>{if(!t)throw Error("'getCosmosSigner' is not provided or configured in skip router");if(!D.Lg.signingStargateClientByChainId?.[e]){let[r,n]=await Promise.all([t(e),X(e)]);D.Lg.signingStargateClientByChainId[e]=await T.SigningStargateClient.connectWithSigner(n,r,{aminoTypes:D.Lg.aminoTypes,registry:D.Lg.registry,accountParser:K})}return{stargateClient:D.Lg.signingStargateClientByChainId[e],signer:await t(e)}},ee=r(56286),et=r(51659),er=async({chainId:e,signerAddress:t,messages:r,getFallbackGasAmount:n,getOfflineSigner:i,txIndex:o,simulate:s,getCosmosPriorityFeeDenom:a,isMultiRoutes:c})=>{let u=(await D.Lg.getSkipAssets({chainId:e}))?.[e],l=await D.Lg.getSkipChains(),d=await a?.(e),f=l?.find(t=>t.chainId===e);if(!f)throw Error(`failed to find chain id '${e}'`);let{feeAssets:m}=f;if(!m)throw Error(`failed to find fee assets for chain id '${e}'`);let p=await (async()=>{try{if(!1===s)throw Error("simulate");if(0!==o&&"noble-1"===e)return"0";let{stargateClient:n}=await Q({chainId:e,getOfflineSigner:i});return await O(n,t,e,r)}catch(t){if("simulate"===t.message&&!n)throw Error(`unable to get gas amount for ${e}'s message(s)`);if(n){let t=await n(e,"cosmos");if(!t)throw Error(`unable to estimate gas for message(s) ${r}`);return String(t)}throw t}})(),h=m.map(t=>{let r=(()=>{if(!t?.gasPrice)return;let e=t.gasPrice.average;if(""===e&&(e=t.gasPrice.high),""===e&&(e=t.gasPrice.low),e)return new T.GasPrice(et.Ww.fromUserInput((0,ee.g)(e).toFixed(),18),t?.denom??"")})();return r?"noble-1"===e?c&&0===o?(0,T.calculateFee)(Math.ceil(parseFloat(p)),r):"ibc/ef48e6b1a1a19f47ecaea62f5670c37c0580e86a9e88498b7e393eb6f49f33c0"===t.denom.toLowerCase()?(0,T.calculateFee)(2e6,r):(0,T.calculateFee)(2e5,r):(0,T.calculateFee)(Math.ceil(parseFloat(p)),r):null}),g=await (0,D.sX)({chains:{[e]:{address:t,denoms:m.map(e=>e.denom??"")}}}),y=m.map((t,r)=>{let n=u?.find(e=>e.denom===t.denom),i=n?.recommendedSymbol?.toUpperCase(),s=Number(n?.decimals);if(!n)return{error:`(${f?.prettyName}) Unable to find asset for ${t.denom}`};if(isNaN(s))return{error:`(${f?.prettyName}) Unable to find decimal for ${i}`};let a=h[r];if(!a)return{error:`(${f?.prettyName}) Unable to calculate fee for ${i}`,asset:t};if(0!==o&&"noble-1"===e)return{error:null,asset:t,fee:a};let c=g?.chains?.[e]?.denoms?.[t?.denom??""];if(c||(c={amount:"0",formattedAmount:"0"}),!a.amount[0]?.amount)return{error:`(${f?.prettyName}) Unable to get fee for ${i}`,asset:t};if(parseInt(c?.amount??"")<parseInt(a.amount[0]?.amount)){let e=new ee.g(parseFloat(c?.amount??"")).shiftedBy(-s).toFixed(s),r=new ee.g(parseFloat(a.amount[0]?.amount)).shiftedBy(-s).toFixed(s);return{error:`Insufficient balance for gas on ${f?.prettyName}. Need ${r} ${i} but only have ${e} ${i}.`,asset:t}}return{error:null,asset:t,fee:a}});if(d){let e=y.filter(e=>e?.error===null).find(e=>e?.asset?.denom===d);if(e)return e}let b=y.find(e=>e?.error===null);if(!b)throw y.length,Error(y[0]?.error||`Insufficient fee token to initiate transfer on ${f.prettyName}.`);return b},en=r(20847);async function ei(e,t,r){let{to:n,data:i,value:o}=t;if(!e.account)throw Error("estimateGasForEvmTx: No account found");let s=e.extend(en.$),a=await s.estimateFeesPerGas();try{return await s.estimateGas({account:e.account,to:n,data:`0x${i}`,value:""===o?void 0:BigInt(o??"")})*a.maxFeePerGas}catch(n){let e=await r?.(t.chainId??"","evm");if(e)return BigInt(e)*a.maxFeePerGas;throw n}}var eo=(0,i.FH)({methodName:"submit",method:"post",path:"v2/tx/submit"}),es=(0,i.FH)({methodName:"venues",path:"v2/fungible/venues",transformResponse:e=>e.venues}),ea=r(59903),ec=r(12160),eu=r(62222),el=r(76525),ed=r(41091),ef=r(45667),em=r(61311),ep=r(58458),eh=r(65714).Buffer,eg=async e=>{if(D.Lg.endpointOptions.getRestEndpointForChain)return D.Lg.endpointOptions.getRestEndpointForChain(e);if(D.Lg.endpointOptions.endpoints&&D.Lg.endpointOptions.endpoints[e]){let t=D.Lg.endpointOptions.endpoints[e];if(t?.rest)return t.rest}let t=(0,U.Bt)().find(t=>t.chainId===e);if(!t)throw Error(`getRestEndpointForChain error: failed to find chain id '${e}' in registry`);
4if(t.apis?.rest?.length===0||!t.apis?.rest)throw Error(`getRestEndpointForChain error: failed to find REST endpoint for chain id '${e}'`);let r=t.apis?.rest?.map(e=>e.address),n=await (0,U.yx)(r,"rest");if(!n)throw Error(`getRestEndpointForChain error: failed to find REST endpoint for chain id '${e}'`);return n},ey=async(e,t)=>{if(t.includes("dymension"))return eb(e,t);let r=await X(t),n=D.Lg.signingStargateClientByChainId[t]??await T.StargateClient.connect(r,{accountParser:K}),i=await n.getAccount(e);if(!i)throw Error("getAccountNumberAndSequence: failed to retrieve account");return n.disconnect(),{accountNumber:i.accountNumber,sequence:i.sequence}},eb=async(e,t)=>{let r=await eg(t),n=await fetch(`${r}/cosmos/auth/v1beta1/accounts/${e}`,{headers:{"Content-Type":"application/json"}});if(!n.ok)throw Error(`Failed to fetch account data: ${n.statusText}`);let o=await n.json(),s=(0,i.wu)(o),a=0,c=0;return s.account.baseAccount?(a=s.account.baseAccount.sequence,c=s.account.baseAccount.accountNumber):(a=s.account.sequence,c=s.account.accountNumber),{accountNumber:c,sequence:a}},ev={ethsecp256k1:"ethermint/PubKeyEthSecp256k1",...q.pubkeyType};function ew(e,t){let r=(0,U.rj)(t);return function(e,t,r){if(r){let r=L.PubKey.fromPartial({key:(0,E.Ey)(e.value)}),n="";return n=t?.includes("injective")?"/injective.crypto.v1beta1.ethsecp256k1.PubKey":"/ethermint.crypto.v1.ethsecp256k1.PubKey",ec.Any.fromPartial({typeUrl:n,value:Uint8Array.from(L.PubKey.encode(r).finish())})}{let r=(0,U.Dy)(t),n=L.PubKey.fromPartial({key:(0,E.Ey)(e.value)});return r?ec.Any.fromPartial({typeUrl:"/initia.crypto.v1beta1.ethsecp256k1.PubKey",value:Uint8Array.from(L.PubKey.encode(n).finish())}):(0,z.encodePubkey)(e)}}(r?function(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:ev.ethsecp256k1,value:(0,E.nk)(e)}}(e.pubkey):(0,q.encodeSecp256k1Pubkey)(e.pubkey),t,r)}var eA=async e=>{let{signer:t,signerAddress:r,chainId:n,cosmosMsgs:i,fee:o,signerData:{accountNumber:s,sequence:a,chainId:c}}=e,u=(await t.getAccounts()).find(e=>e.address===r);if(!u)throw Error("signCosmosMessageDirect error: failed to retrieve account from signer");let l=i.map(e=>R(e)),d=D.Lg.registry.encode({typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:l}}),f=et.Cj.fromString(o.gas).toNumber(),m=ew(u,n),p=(0,z.makeAuthInfoBytes)([{pubkey:m,sequence:a}],o.amount,f,o.granter,o.payer),h=(0,z.makeSignDoc)(d,p,n,s),{signature:g,signed:y}=await t.signDirect(r,h);return ea.TxRaw.fromPartial({bodyBytes:y.bodyBytes,authInfoBytes:y.authInfoBytes,signatures:[(0,E.Ey)(g.signature)]})},ex=async e=>{let{signer:t,signerAddress:r,chainId:n,cosmosMsgs:i,fee:o,signerData:{accountNumber:s,sequence:a,chainId:c}}=e,u=(await t.getAccounts()).find(e=>e.address===r);if(!u)throw Error("signCosmosMessageAmino: failed to retrieve account from signer");let l=i.map(e=>R(e)),d=eu.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,f=l.map(e=>D.Lg.aminoTypes.toAmino(e)),m=(0,q.makeSignDoc)(f,o,c,"",s,a),{signature:p,signed:h}=await t.signAmino(r,m),g={messages:h.msgs.map(e=>D.Lg.aminoTypes.fromAmino(e)),memo:h.memo};g.messages[0].value.memo=l[0].value.memo;let y=D.Lg.registry.encode({typeUrl:"/cosmos.tx.v1beta1.TxBody",value:g}),b=et.Cj.fromString(h.fee.gas).toNumber(),v=et.Cj.fromString(h.sequence).toNumber(),w=ew(u,n),A=(0,z.makeAuthInfoBytes)([{pubkey:w,sequence:v}],h.fee.amount,b,h.fee.granter,h.fee.payer,d);return ea.TxRaw.fromPartial({bodyBytes:y,authInfoBytes:A,signatures:[(0,E.Ey)(p.signature)]})},eP=async({tx:e,options:t,index:r,routeId:n})=>{let i,{userAddresses:o}=t;if(void 0===e)throw Error("executeCosmosTransaction error: tx is undefined");let s=e.cosmosTx?.chainId,a=e.cosmosTx?.msgs,c=o.find(t=>t.chainId===e.cosmosTx?.chainId)?.address,u=D.Lg.validateGasResults,l=u?.find(e=>e?.error!==null&&e?.error!==void 0);if("string"==typeof l?.error)throw Error(l?.error);let d=u?.[r];if(!d)throw Error(`executeRoute error: invalid gas at index ${r}`);if(void 0===s)throw Error("no chainId found for tx");if(void 0===a)throw Error("no messages found for tx");let{signer:f}=await Q({chainId:s,getOfflineSigner:t?.getCosmosSigner});if(!c)throw Error(`executeCosmosTransaction error: invalid address for chain '${e.cosmosTx?.chainId}'`);if(!(await f.getAccounts()).find(e=>e.address===c))throw Error("executeCosmosTransaction error: failed to retrieve account from signer");let m=d?.fee;if(!m)throw Error("executeCosmosTransaction error: failed to retrieve fee from gas");let{accountNumber:p,sequence:h}
4=await ey(c,s),g={signerAddress:c,chainId:s,cosmosMsgs:a,fee:m,signerData:{accountNumber:p,sequence:h,chainId:s}};t.onTransactionSignRequested?.({chainId:s,txIndex:r,signerAddress:c}),b({status:"signing",routeId:n,options:t}),i=(0,z.isOfflineDirectSigner)(f)?await eA({...g,signer:f}):await ex({...g,signer:f}),t?.onTransactionSigned?.({chainId:s}),b({status:"pending",routeId:n,options:t});let y=ea.TxRaw.encode(i).finish();return eh.from(y).toString("base64")},eM=async({tx:e,options:t,index:r,routeId:n})=>{if(void 0===e)throw Error("executeCosmosTransaction error: tx is undefined");let i=await eP({tx:e,options:t,index:r,routeId:n}),o=e.cosmosTx?.chainId,s=await eo({chainId:o,tx:i});return{chainId:e?.cosmosTx?.chainId??"",txHash:s?.txHash??"",explorerLink:s?.explorerLink??""}},eT=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],eE=async(e,t,r,n)=>{let i=D.Lg.validateGasResults,o=i?.find(e=>e?.error!==null&&e?.error!==void 0);if("string"==typeof o?.error)throw Error(o?.error);let{evmTx:s}=e,a=t.getEvmSigner;if(!a)throw Error("executeEVMTransaction error: getEvmSigner is not provided");if(!s?.chainId)throw Error("chain id not found in evmTx");let c=await a(s.chainId);if(!c.account)throw Error("executeEVMTransaction error: failed to retrieve account from signer");if(!s.chainId)throw Error("executeEVMTransaction error: chainId not found for evmTx");if(!s.value&&""!==s.value)throw Error("executeEVMTransaction error: no value found in evmTx");let{onApproveAllowance:u,onTransactionSigned:l,bypassApprovalCheck:d,useUnlimitedApproval:f}=t,m=c.extend(en.$);if(!d&&s.requiredErc20Approvals){for(let e of s.requiredErc20Approvals){let r=await m.readContract({address:e.tokenContract,abi:eT,functionName:"allowance",args:[c.account.address,e.spender]});if(!e.amount)throw Error("executeEVMTransaction error: no amount found in a requiredApproval");if(r>BigInt(e.amount))continue;u?.({status:"pending",allowance:e}),b({status:"allowance",routeId:n,options:t});let i=await m.writeContract({account:c.account,address:e.tokenContract,abi:eT,functionName:"approve",args:[e.spender,f?el.Ao:BigInt(e.amount)+BigInt(1e3)],chain:c.chain}),o=await m.waitForTransactionReceipt({hash:i});if("reverted"===o.status)throw Error(`executeEVMTransaction error: evm tx reverted for hash ${o.transactionHash}`)}u?.({status:"completed"})}t?.onTransactionSignRequested?.({chainId:s.chainId,signerAddress:c.account.address,txIndex:r}),b({status:"signing",routeId:n,options:t});let p=await m.sendTransaction({account:c.account,to:s.to,data:`0x${s.data}`,chain:c.chain,value:""===s.value?void 0:BigInt(s.value)});return b({status:"pending",routeId:n,options:t}),l?.({chainId:s.chainId}),await m.waitForTransactionReceipt({hash:p})},ek=async({tx:e,options:t,index:r,routeId:n})=>{let i=D.Lg.validateGasResults;if(void 0===e)throw Error("executeSvmTransaction error: tx is undefined");let o=i?.find(e=>e?.error!==null&&e?.error!==void 0);if("string"==typeof o?.error)throw Error(o?.error);let s=e?.svmTx,a=t?.getSvmSigner;if(!a)throw Error("executeSvmTransaction error: getSvmSigner is not provided");let c=await a();if(!s?.chainId)throw Error("executeSvmTransaction error: chainId not found in svmTx");let u=eh.from(s.tx??"","base64"),l=em.ZX.from(u);
4if(t.svmFeePayer){let e=l.serializeMessage(),r=await t.svmFeePayer.signTransaction(e);l.addSignature(new em.J3(t.svmFeePayer.address),eh.from(r))}if(!("signTransaction"in c))return;t?.onTransactionSignRequested?.({chainId:s.chainId,signerAddress:c.publicKey?.toBase58(),txIndex:r}),b({status:"signing",routeId:n,options:t});let d=await c.signTransaction(l);return t?.onTransactionSigned?.({chainId:s.chainId}),b({status:"pending",routeId:n,options:t}),d.serialize()},eS=async(e,t,r,n)=>{let o,s=e?.svmTx;if(!s?.chainId)throw Error("executeSvmTransaction error: chainId not found in svmTx");let a=await ek({tx:e,options:t,index:r,routeId:n});if(!a)throw Error("executeSvmTransaction error: signedTx is undefined");let c=await X(s.chainId),u=new em.Ng(c),l=await eo({chainId:s.chainId,tx:a.toString("base64")});if(o=l?.txHash,!(o=await u.sendRawTransaction(a,{preflightCommitment:"confirmed",maxRetries:5})))throw Error("executeSvmTransaction error: signature not found");let d=0,f=0;for(;;)try{let e=await u.getSignatureStatus(o,{searchTransactionHistory:!0});if(e?.value?.confirmationStatus==="confirmed")return{chainId:s.chainId,txHash:o,explorerLink:l?.explorerLink??""};if(d>12)throw await (0,i.uk)(3e3),Error(`executeSvmTransaction error: waiting finalized status timed out for ${o}`);d++,await (0,i.uk)(3e3)}catch(e){if(++f>12)throw e}},e_=async({requiredErc20Approvals:e,signer:t,chain:r,gasBalance:n,tx:i,routeId:o,options:s})=>{if(!t.account?.address)throw Error("validateEvmGasBalance: Signer address not found");for(let a of e){let e=t.extend(en.$);if(await e.readContract({address:a.tokenContract,abi:eT,functionName:"allowance",args:[t.account?.address,a.spender]})>BigInt(a.amount))continue;let c=BigInt((await e.estimateFeesPerGas()).maxFeePerGas)*BigInt(1e5);if(!n){let e=(await D.Lg.getSkipAssets({chainId:i.chainId}))[i.chainId],t=e?.find(e=>e.denom.includes("-native")),n=e?.find(e=>"0x0000000000000000000000000000000000000000"===e.denom.toLowerCase()),o=t||n;if(!o?.decimals)throw Error(`Insufficient balance for gas on ${r.prettyName}. Need ${c} gwei.`);let s=(0,ed.J)(c,o?.decimals);throw Error(`Insufficient balance for gas on ${r.prettyName}. Need ${s} ${o.symbol}.`)}if((0,ee.g)(n.amount).lt(Number(c))){let e=(await D.Lg.getSkipAssets({chainId:i.chainId}))[i.chainId],t=e?.find(e=>e.denom.includes("-native")||"0x0000000000000000000000000000000000000000"===e.denom.toLowerCase());if(!t?.decimals)return{error:`Insufficient balance for gas on ${r.prettyName}. Need ${c} gwei but only have ${n.amount} gwei.`,asset:null,fee:null};let o=(0,ed.J)(c,t?.decimals);return{error:`Insufficient balance for gas on ${r.prettyName}. Need ${o} ${t.symbol} but only have ${n.formattedAmount} ${t.symbol}.`,asset:null,fee:null}}let{onApproveAllowance:u,useUnlimitedApproval:l}=s;u?.({status:"pending",allowance:a}),b({status:"allowance",routeId:o,options:s});let d=await e.writeContract({account:t.account,address:a.tokenContract,abi:eT,functionName:"approve",args:[a.spender,l?el.Ao:BigInt(a.amount)+BigInt(1e3)],chain:t.chain}),f=await e.waitForTransactionReceipt({hash:d});if("reverted"===f.status)throw Error(`executeEVMTransaction error: evm tx reverted for hash ${f.transactionHash}`);u?.({status:"completed"}),b({status:"signing",routeId:o,options:s})}},eI=async({signer:e,tx:t,getFallbackGasAmount:r,options:n,routeId:i})=>{let o=t?.chainId??"",s=(await D.Lg.getSkipAssets({chainId:o}))?.[o],a=await D.Lg.getSkipChains(),c=a?.find?.(e=>e.chainId===o);if(!c)throw Error(`failed to find chain for chainId: '${o}'`);if(!e.account?.address)throw Error("validateEvmGasBalance: Signer address not found");let u=(await (0,D.sX)({chains:{[t?.chainId??""]:{address:e.account?.address}}}))?.chains?.[t?.chainId??""]?.denoms,l=u&&Object.entries(u).find(([e])=>e.includes("-native"))?.[1],d=u&&Object.entries(u).find(([e])=>"0x0000000000000000000000000000000000000000"===e.toLowerCase())?.[1],f=l||d,{requiredErc20Approvals:m}=t,{bypassApprovalCheck:p}=n;if(!p&&m)try{await e_({requiredErc20Approvals:m,signer:e,chain:c,gasBalance:f,tx:t,routeId:i,options:n})}catch(e){return{error:e.message,asset:null,fee:null}}let h=await ei(e,t,r);if(!f){let e=s?.find(e=>e.denom?.includes("-native")),t=s?.find(e=>e.denom?.toLowerCase()==="0x0000000000000000000000000000000000000000"),r=e||t;if(!r?.decimals)return{error:`Insufficient balance for gas on ${c.prettyName}. Need ${h} gwei.`,asset:null,fee:null};let n=(0,ed.J)(h,r?.decimals);return{error:`Insufficient balance for gas on ${c.prettyName}. Need ${n} ${r.symbol}.`,asset:null,fee:null}}if((0,ee.g)(f.amount??"").lt(Number(h))){let e=s?.find(e=>
4e.denom?.includes("-native")||e.denom?.toLowerCase()==="0x0000000000000000000000000000000000000000");if(!e?.decimals)return{error:`Insufficient balance for gas on ${c.prettyName}. Need ${h} gwei but only have ${f.amount} gwei.`,asset:null,fee:null};let t=(0,ed.J)(h,e?.decimals);return{error:`Insufficient balance for gas on ${c.prettyName}. Need ${t} ${e.symbol} but only have ${f.formattedAmount} ${e.symbol}.`,asset:null,fee:null}}},eB=async({tx:e,simulate:t})=>{let r;if(!e)throw Error("Transaction is required");if(!1===t)return{success:!0,logs:[],error:null,asset:null,fee:null};let n=await X(e.chainId??""),i=new em.Ng(n);if(!i)throw Error(`Failed to connect to ${e.chainId}`);if(!e.tx)throw Error("Transaction is required");let o=eh.from(e.tx,"base64");try{r=em.ZX.from(o)}catch(e){return{success:!1,error:{decodeError:e.message},asset:null,fee:null}}let s=await i.simulateTransaction(r);if(s.value.err){let e=s.value.logs??[],t=function(e){let t=e.find(e=>e.includes("insufficient lamports"));if(!t)return null;let r=t.match(/insufficient lamports (\d+), need (\d+)/);if(!r)return null;let n=parseInt(r[1]??"0",10);return(parseInt(r[2]??"0",10)-n)/em.Sr}(e),r=e.some(e=>e.includes("insufficient lamports"))&&null!==t,n=Object.keys(s.value.err).includes("InsufficientFundsForRent");return{success:!1,logs:e,error:r?`Insufficient balance for gas on Solana. You need ${t.toFixed(6)} SOL to proceed.`:n?"Insufficient funds for rent on Solana. You need to fund your account.":"Simulation failed",asset:null,fee:null}}return{success:!0,logs:s.value.logs??[],error:null,asset:null,fee:null}},eC=async({txs:e,onValidateGasBalance:t,getFallbackGasAmount:r,getCosmosSigner:n,getEvmSigner:i,simulate:o,disabledChainIds:s,enabledChainIds:a,getCosmosPriorityFeeDenom:c,routeId:u,options:l,isMultiRoutes:d})=>{let f=await Promise.all(e.map(async(e,f)=>{if(!e)throw Error(`invalid tx at index ${f}`);if("cosmosTx"in e&&!s?.includes(e?.cosmosTx?.chainId??"")&&(void 0===a||a.includes(e?.cosmosTx?.chainId??""))){if(t?.({status:"pending"}),b({status:"validating",routeId:u,options:l}),!e?.cosmosTx?.msgs)throw Error(`invalid msgs ${e?.cosmosTx?.msgs}`);try{return await er({chainId:e.cosmosTx.chainId??"",signerAddress:e.cosmosTx.signerAddress??"",messages:e.cosmosTx.msgs,getFallbackGasAmount:r,getOfflineSigner:n,txIndex:f,simulate:o,getCosmosPriorityFeeDenom:c,isMultiRoutes:d})}catch(e){return{error:e.message,asset:null,fee:null}}}if("evmTx"in e&&!s?.includes(e?.evmTx?.chainId??"")&&(void 0===a||a.includes(e?.evmTx?.chainId??""))){t?.({status:"pending"}),b({status:"validating",routeId:u,options:l});let n=await i?.(e?.evmTx?.chainId??"");if(!n)throw Error(`failed to get signer for chain ${e?.evmTx?.chainId}`);try{return await eI({tx:e.evmTx,signer:n,getFallbackGasAmount:r,routeId:u,options:l})}catch(e){return{error:e.message,asset:null,fee:null}}}if("svmTx"in e&&!s?.includes(e?.svmTx?.chainId??"")&&(void 0===a||a.includes(e?.svmTx?.chainId??""))){t?.({status:"pending"}),b({status:"validating",routeId:u,options:l});try{return await eB({tx:e.svmTx,simulate:o})}catch(e){return{error:e.message,asset:null,fee:null}}}}));if(0===f.filter(Boolean).length)return;let m=f.find(e=>e&&e?.error!==null);if(m)throw t?.({status:"error"}),D.Lg.validateGasResults=f,Error(`${m.error}`);t?.({status:"completed"}),D.Lg.validateGasResults=f},eR=async e=>{let{txs:t,onTransactionBroadcast:r,simulate:n=!0,batchSimulate:i=!0,getFallbackGasAmount:o=eU,getCosmosSigner:s,getEvmSigner:a,onValidateGasBalance:c,trackTxPollingOptions:u,batchSignTxs:l=!0,routeId:d,isMultiRoutes:f}=e;if(void 0===t)throw Error("executeTransactions error: txs is undefined in executeTransactions");let m=t.map(e=>"cosmosTx"in e?{chainType:"cosmos",chainId:e.cosmosTx?.chainId}:"svmTx"in e?{chainType:"svm",chainId:e.svmTx?.chainId}:"evmTx"in e?{chainType:"evm",chainId:e.evmTx?.chainId}:void 0),p=t.map(e=>{if("cosmosTx"in e)return{chainId:e.cosmosTx?.chainId,chainType:"cosmos"};if("evmTx"in e)return{chainId:e.evmTx?.chainId,chainType:"evm"};if("svmTx"in e)return{chainId:e.svmTx?.chainId,chainType:"svm"};throw Error("executeRoute error: invalid message type")});
4b({transactionDetails:p,routeId:d,options:e}),D.Lg.validateGasResults=void 0;let h=i?[]:m.map(e=>e?.chainId??"");await eC({txs:t,getFallbackGasAmount:o,getCosmosSigner:s,getEvmSigner:a,onValidateGasBalance:c,simulate:n,disabledChainIds:h,getCosmosPriorityFeeDenom:e.getCosmosPriorityFeeDenom,options:e,routeId:d,isMultiRoutes:f});let g=async r=>{await eC({txs:t,getFallbackGasAmount:o,getCosmosSigner:s,getEvmSigner:a,onValidateGasBalance:c,simulate:n,enabledChainIds:i?h:[r],getCosmosPriorityFeeDenom:e.getCosmosPriorityFeeDenom,options:e,routeId:d,isMultiRoutes:f})},y=[];if(l)for(let r=0;r<t.length;r++){let n=t[r];if(!n)throw Error(`executeRoute error: invalid message at index ${r}`);if("cosmosTx"in n){if(await g(n.cosmosTx?.chainId??""),!await (async()=>{try{let t=e.userAddresses.find(e=>e.chainId===n.cosmosTx?.chainId)?.address;if(!t)return!1;let{accountNumber:r}=await ey(t,n.cosmosTx?.chainId);if(r)return!0;return!1}catch(e){return!1}})())continue;let t=await eP({tx:n,options:e,index:r,routeId:d});y.push({index:r,chainId:n.cosmosTx?.chainId??"",tx:t,chainType:"cosmos"})}if("svmTx"in n){await g(n.svmTx?.chainId??"");let t=await ek({tx:n,options:e,index:r,routeId:d});if(!t)throw Error("executeRoute error: signedTx is undefined");y.push({index:r,chainId:n.svmTx?.chainId??"",tx:t.toString("base64"),chainType:"svm"})}}return{transactionDetails:p,executeTransaction:async n=>{let i,o=t[n];if(!o)throw Error(`executeRoute error: invalid message at index ${n}`);let s=y.find(e=>e.index===n);if(s){let e=await eo({chainId:s.chainId,tx:s.tx});i={chainId:s.chainId,txHash:e?.txHash??"",explorerLink:e?.explorerLink??""}}else if("cosmosTx"in o)await g(o.cosmosTx?.chainId??""),i=await eM({tx:o,options:e,index:n,routeId:d});else if("evmTx"in o){await g(o.evmTx?.chainId??"");let t=await eE(o,e,n,d);i={chainId:o?.evmTx?.chainId??"",txHash:t.transactionHash}}else if("svmTx"in o)await g(o.svmTx?.chainId??""),i=await eS(o,e,n,d);else throw Error("executeRoute error: invalid message type");return await r?.({...i}),i}}},eO={DEFAULT:3e5,SWAP:28e5,CARBON:1e6},eU=async(e,t)=>{if("evm"===t)return 15e4;if("cosmos"!==t)return;let r=await es(),n=Math.ceil(r?.some(t=>t.chainId===e)?eO.SWAP:eO.DEFAULT);return"carbon-1"===e?eO.CARBON:n},eD=async e=>{let t=await D.Lg.getSkipChains();return e.map(e=>{let r=t.find(t=>t.chainId===e.chainId);switch(r?.chainType){case"cosmos":try{if(r.chainId?.includes("penumbra"))try{return r.bech32Prefix===ep.p2.decode(e.address,143)?.prefix}catch{return["penumbracompat1","tpenumbra"].includes(ep.I.decode(e.address,1023).prefix)}return r.bech32Prefix===ep.I.decode(e.address,1023).prefix}catch{return!1}case"evm":try{return(0,ef.P)(e.address)}catch(e){return!1}case"svm":try{let t=new em.J3(e.address);return em.J3.isOnCurve(t)}catch(e){return!1}default:return!1}}).every(e=>e)},eN=async({userAddresses:e,route:t})=>{let r=[];if(e.forEach((e,n)=>{t.requiredChainAddresses[n]===e?.chainId&&r.push(e.address)}),r.length!==t.requiredChainAddresses.length&&(r=e.map(e=>e.address)),r.length!==t.requiredChainAddresses.length&&r.length!==t.chainIds?.length)throw Error("createValidAddressList error: invalid address list");if(!await eD(e))throw Error("createValidAddressList error: invalid user addresses");return r},e$=async e=>(0,i.FH)({methodName:"msgs",method:"post",path:"v2/fungible/msgs"})((e=>({sourceAssetDenom:e.sourceAssetDenom,sourceAssetChainId:e.sourceAssetChainId,destAssetDenom:e.destAssetDenom,destAssetChainId:e.destAssetChainId,amountIn:e.amountIn,amountOut:e.amountOut,addressList:e.addressList,operations:e.operations,estimatedAmountOut:e.estimatedAmountOut,slippageTolerancePercent:e.slippageTolerancePercent,feePayerAddress:e.feePayerAddress,timeoutSeconds:e.timeoutSeconds,postRouteHandler:e.postRouteHandler,chainIdsToAffiliates:e.chainIdsToAffiliates,enableGasWarnings:e.enableGasWarnings,apiUrl:e.apiUrl,apiKey:e.apiKey,abortDuplicateRequests:e.abortDuplicateRequests}))(e)),eF=async e=>{let{route:t,userAddresses:r,appendCosmosMsgs:n,timeoutSeconds:o}=e,{id:s}=b({status:"unconfirmed",options:e}),a=await eN({userAddresses:r,route:t}),c=await e$({timeoutSeconds:o,amountIn:t?.amountIn,amountOut:t.estimatedAmountOut||"0",sourceAssetChainId:t?.sourceAssetChainId,sourceAssetDenom:t?.sourceAssetDenom,destAssetChainId:t?.destAssetChainId,destAssetDenom:t?.destAssetDenom,operations:t?.operations,addressList:a,slippageTolerancePercent:e.slippageTolerancePercent||"1",chainIdsToAffiliates:i.yy.chainIdsToAffiliates,postRouteHandler:e.postRouteHandler,feePayerAddress:e.svmFeePayer?.address});
4n&&Object.entries(n).forEach(([e,t])=>{let r=c?.txs?.findIndex(t=>"cosmosTx"in t&&t.cosmosTx.chainId===e);if(void 0===r||-1===r)return;let n=c?.txs?.[r];n&&"cosmosTx"in n&&n.cosmosTx.msgs?.unshift(...t)});let{transactionDetails:u,executeTransaction:l}=await eR({...e,routeId:s,txs:c?.txs});await y({transactionDetails:u,executeTransaction:l,routeId:s,options:e})}},26854:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRfc3339=t.fromRfc3339=void 0;let r=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(\.\d{1,9})?((?:[+-]\d{2}:\d{2})|Z)$/;function n(e,t=2){return e.toString().padStart(t,"0")}t.fromRfc3339=function(e){let t,n,i,o=r.exec(e);if(!o)throw Error("Date string is not in RFC3339 format");let s=+o[1],a=+o[2],c=+o[3],u=+o[4],l=+o[5],d=+o[6],f=o[7]?Math.floor(1e3*o[7]):0;"Z"===o[8]?(t=1,n=0,i=0):(t="-"===o[8].substring(0,1)?-1:1,n=+o[8].substring(1,3),i=+o[8].substring(4,6));let m=t*(60*n+i)*60,p=new Date;return p.setUTCFullYear(s,a-1,c),p.setUTCHours(u,l,d,f),new Date(p.getTime()-1e3*m)},t.toRfc3339=function(e){let t=e.getUTCFullYear(),r=n(e.getUTCMonth()+1),i=n(e.getUTCDate()),o=n(e.getUTCHours()),s=n(e.getUTCMinutes()),a=n(e.getUTCSeconds()),c=n(e.getUTCMilliseconds(),3);return`${t}-${r}-${i}T${o}:${s}:${a}.${c}Z`}},26964:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;let i=n(r(36314));class o{static fromUserInput(e,t){let r,n;o.verifyFractionalDigits(t);let i=e.match(/[^0-9.]/);if(i)throw Error(`Invalid character at position ${i.index+1}`);if(""===e)r="0",n="";else if(-1===e.search(/\./))r=e,n="";else{let t=e.split(".");switch(t.length){case 0:case 1:throw Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!t[1])throw Error("Fractional part missing");r=t[0],n=t[1].replace(/0+$/,"");break;default:throw Error("More than one separator found")}}if(n.length>t)throw Error("Got more fractional digits than supported");return new o(`${r}${n.padEnd(t,"0")}`,t)}static fromAtomics(e,t){return o.verifyFractionalDigits(t),new o(e,t)}static zero(e){return o.verifyFractionalDigits(e),new o("0",e)}static one(e){return o.verifyFractionalDigits(e),new o("1"+"0".repeat(e),e)}static verifyFractionalDigits(e){if(!Number.isInteger(e))throw Error("Fractional digits is not an integer");if(e<0)throw Error("Fractional digits must not be negative");if(e>100)throw Error("Fractional digits must not exceed 100")}static compare(e,t){if(e.fractionalDigits!==t.fractionalDigits)throw Error("Fractional digits do not match");return e.data.atomics.cmp(new i.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}constructor(e,t){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new i.default(e),fractionalDigits:t}}clone(){return new o(this.atomics,this.fractionalDigits)}floor(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():o.fromAtomics(t.mul(e).toString(),this.fractionalDigits)}ceil(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():o.fromAtomics(t.addn(1).mul(e).toString(),this.fractionalDigits)}toString(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e),r=this.data.atomics.mod(e);if(r.isZero())return t.toString();{let e=r.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${t.toString()}.${e}`}}toFloatApproximation(){let e=Number(this.toString());if(Number.isNaN(e))throw Error("Conversion to number failed");return e}plus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");return new o(this.data.atomics.add(new i.default(e.atomics)).toString(),this.fractionalDigits)}minus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");let t=this.data.atomics.sub(new i.default(e.atomics));if(t.ltn(0))throw Error("Difference must not be negative");return new o(t.toString(),this.fractionalDigits)}multiply(e){return new o(this.data.atomics.mul(new i.default(e.toString())).toString(),this.fractionalDigits)}equals(e){return 0===o.compare(this,e)}isLessThan(e){return 0>o.compare(this,e)}isLessThanOrEqual(e){return 0>=o.compare(this,e)}isGreaterThan(e){return o.compare(this,e)>0}isGreaterThanOrEqual(e){return o.compare(this,e)>=0}}t.Decimal=o},27046:(e,t)=>{function r(e,t,r){return t<=e&&e<=r}function n(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function i(e){this.tokens=[].slice.call(e)}function o(e,t){if(e)throw TypeError("Decoder error");return t||65533}
4i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(;e.length;)this.tokens.push(e.shift());else this.tokens.push(e)}};var s="utf-8";function a(e,t){if(!(this instanceof a))return new a(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function c(e,t){if(!(this instanceof c))return new c(e,t);if((e=void 0!==e?String(e).toLowerCase():s)!==s)throw Error("Encoding not supported. Only utf-8 is supported");t=n(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function u(e){var t=e.fatal,n=0,i=0,s=0,a=128,c=191;this.handler=function(e,u){if(-1===u&&0!==s)return s=0,o(t);if(-1===u)return -1;if(0===s){if(r(u,0,127))return u;if(r(u,194,223))s=1,n=u-192;else if(r(u,224,239))224===u&&(a=160),237===u&&(c=159),s=2,n=u-224;else{if(!r(u,240,244))return o(t);240===u&&(a=144),244===u&&(c=143),s=3,n=u-240}return n<<=6*s,null}if(!r(u,a,c))return n=s=i=0,a=128,c=191,e.prepend(u),o(t);if(a=128,c=191,i+=1,n+=u-128<<6*(s-i),i!==s)return null;var l=n;return n=s=i=0,l}}function l(e){e.fatal,this.handler=function(e,t){if(-1===t)return -1;if(r(t,0,127))return t;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var n,i,o=[(t>>6*n)+i];n>0;){var s=t>>6*(n-1);o.push(128|63&s),n-=1}return o}}a.prototype={decode:function(e,t){r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=n(t),this._streaming||(this._decoder=new u({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var r,o,s=new i(r),a=[];!s.endOfStream()&&-1!==(o=this._decoder.handler(s,s.read()));)null!==o&&(Array.isArray(o)?a.push.apply(a,o):a.push(o));if(!this._streaming){do{if(-1===(o=this._decoder.handler(s,s.read())))break;if(null===o)continue;Array.isArray(o)?a.push.apply(a,o):a.push(o)}while(!s.endOfStream());this._decoder=null}!a.length||-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0);for(var c="",l=0;l<a.length;++l){var d=a[l];d<=65535?c+=String.fromCharCode(d):(d-=65536,c+=String.fromCharCode((d>>10)+55296,(1023&d)+56320))}return c}},c.prototype={encode:function(e,t){e=e?String(e):"",t=n(t),this._streaming||(this._encoder=new l(this._options)),this._streaming=!!t.stream;for(var r,o=[],s=new i(function(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var o=t.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(n===r-1)i.push(65533);else{var s=e.charCodeAt(n+1);if(56320<=s&&s<=57343){var a=1023&o,c=1023&s;i.push(65536+(a<<10)+c),n+=1}else i.push(65533)}n+=1}return i}(e));!s.endOfStream()&&-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);if(!this._streaming){for(;-1!==(r=this._encoder.handler(s,s.read()));)Array.isArray(r)?o.push.apply(o,r):o.push(r);this._encoder=null}return new Uint8Array(o)}},t.TextEncoder=c,t.TextDecoder=a},27131:(e,t,r)=>{r.d(t,{EQ:()=>a});var n=r(97461),i=r(50342),o=r(87082),s=r(5852);function a(e,t="hex"){let r=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),r=c(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:i}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))i(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,o.aT)(e):e,r=c(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),n=(0,i.l)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,s.My)(n.bytes):n.bytes}function c(e){if(e<256)return 1;if(e<65536)return 2;if(e<0x1000000)return 3;if(e<0x100000000)return 4;throw new n.C("Length is too large.")}},27465:(e,t,r)=>{r.d(t,{g:()=>s});
4var n=r(44175),i=r(5852),o=r(95913);async function s(e,{blockHash:t,blockNumber:r,blockTag:a=e.experimental_blockTag??"latest",includeTransactions:c}={}){let u=c??!1,l=void 0!==r?(0,i.cK)(r):void 0,d=null;if(!(d=t?await e.request({method:"eth_getBlockByHash",params:[t,u]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[l||a,u]},{dedupe:!!l})))throw new n.l({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||o.$)(d,"getBlock")}},27908:(e,t,r)=>{r.d(t,{e:()=>d});var n=r(78771),i=r(20368),o=r(73118),s=r(88603),a=r(75422);class c extends a.C{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var u=r(4171),l=r(70490);function d(e){let t={},r=e.length;for(let n=0;n<r;n++){let r=e[n];if(!(0,u.WL)(r))continue;let i=(0,u.FO)(r);if(!i)throw new s.s7({signature:r,type:"struct"});let o=i.properties.split(";"),a=[],c=o.length;for(let e=0;e<c;e++){let t=o[e].trim();if(!t)continue;let r=(0,l.Pj)(t,{type:"struct"});a.push(r)}if(!a.length)throw new s.X9({signature:r});t[i.name]=a}let a={},d=Object.entries(t),m=d.length;for(let e=0;e<m;e++){let[r,s]=d[e];a[r]=function e(t=[],r={},s=new Set){let a=[],u=t.length;for(let d=0;d<u;d++){let u=t[d];if(n.wj.test(u.type))a.push(u);else{let t=(0,n.Yv)(f,u.type);if(!t?.type)throw new o.nx({abiParameter:u});let{array:d,type:m}=t;if(m in r){if(s.has(m))throw new c({type:m});a.push({...u,type:`tuple${d??""}`,components:e(r[m],r,new Set([...s,m]))})}else if((0,l._o)(m))a.push(u);else throw new i.zz({type:m})}}return a}(s,t)}return a}let f=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/},29248:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint=t.Int=void 0;let i=n(r(35035)),o=r(4007);class s{constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e))if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.int=(0,i.default)(e)}else this.int=(0,i.default)(e);this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(s.maxInt))throw Error(`Integer out of range ${this.int.toString()}`)}toString(){return this.int.toString(10)}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}isZero(){return this.int.eq((0,i.default)(0))}equals(e){return this.int.equals(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.greaterOrEquals(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.lesserOrEquals(e.int)}abs(){return new s(this.int.abs())}absUInt(){return new a(this.int.abs())}add(e){return new s(this.int.add(e.int))}sub(e){return new s(this.int.subtract(e.int))}mul(e){return new s(this.int.multiply(e.int))}div(e){return new s(this.int.divide(e.int))}mod(e){return new s(this.int.mod(e.int))}neg(){return new s(this.int.negate())}pow(e){return new s(this.int.pow(e.toBigNumber()))}toBigNumber(){return this.int}}s.maxInt=(0,i.default)("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.Int=s;class a{constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e))if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error(`invalid integer: ${e}`);this.uint=(0,i.default)(e)}else this.uint=(0,i.default)(e);if(this.uint.isNegative())throw TypeError("Uint should not be negative");this.checkBitLen()}checkBitLen(){if(this.uint.abs().bitLength().gt(256))throw Error(`Integer out of range ${this.uint.toString()}`)}toString(){return this.uint.toString(10)}isZero(){return this.uint.eq((0,i.default)(0))}equals(e){return this.uint.equals(e.uint)}gt(e){return this.uint.gt(e.uint)}gte(e){return this.uint.greaterOrEquals(e.uint)}lt(e){return this.uint.lt(e.uint)}lte(e){return this.uint.lesserOrEquals(e.uint)}add(e){return new a(this.uint.add(e.uint))}sub(e){return new a(this.uint.subtract(e.uint))}mul(e){return new a(this.uint.multiply(e.uint))}div(e){return new a(this.uint.divide(e.uint))}mod(e){return new a(this.uint.mod(e.uint))}pow(e){return new a(this.uint.pow(e.toBigNumber()))}toBigNumber(){return this.uint}}t.Uint=a},31370:(e,t,r)=>{r.d(t,{MM:()=>v,ft:()=>x});var n=r(72979),i=r(23803),o=r(81672),s=r(27465),a=r(95571),c=r(6330),u=r(19113),l=r(92782),d=r(76973),f=r(11609),m=r(4770),p=r(99053),h=r(95084),g=r(8641),y=r(8819),b=r(761
452);let v=["blobVersionedHashes","chainId","fees","gas","nonce","type"],w=new Map,A=new p.A(128);async function x(e,t){let r,p,x=t;x.account??=e.account,x.parameters??=v;let{account:P,chain:M=e.chain,nonceManager:T,parameters:E}=x,k="function"==typeof M?.prepareTransactionRequest?{fn:M.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(M?.prepareTransactionRequest)?{fn:M.prepareTransactionRequest[0],runAt:M.prepareTransactionRequest[1].runAt}:void 0;async function S(){return r?r:void 0!==x.chainId?x.chainId:M?M.id:r=await (0,m.T)(e,b.T,"getChainId")({})}let _=P?(0,n.J)(P):P,I=x.nonce;if(E.includes("nonce")&&void 0===I&&_&&T){let t=await S();I=await T.consume({address:_.address,chainId:t,client:e})}k?.fn&&k.runAt?.includes("beforeFillTransaction")&&(x=await k.fn({...x,chain:M},{phase:"beforeFillTransaction"}),I??=x.nonce);let B=(!(E.includes("blobVersionedHashes")||E.includes("sidecars"))||!x.kzg||!x.blobs)&&!1!==A.get(e.uid)&&["fees","gas"].some(e=>E.includes(e))&&(E.includes("chainId")&&"number"!=typeof x.chainId||E.includes("nonce")&&"number"!=typeof I||E.includes("fees")&&"bigint"!=typeof x.gasPrice&&("bigint"!=typeof x.maxFeePerGas||"bigint"!=typeof x.maxPriorityFeePerGas)||E.includes("gas")&&"bigint"!=typeof x.gas)?await (0,m.T)(e,y.a,"fillTransaction")({...x,nonce:I}).then(t=>{let{chainId:r,from:n,gas:i,gasPrice:o,nonce:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,type:l,...d}=t.transaction;return A.set(e.uid,!0),{...x,...n?{from:n}:{},...l?{type:l}:{},...void 0!==r?{chainId:r}:{},...void 0!==i?{gas:i}:{},...void 0!==o?{gasPrice:o}:{},...void 0!==s?{nonce:s}:{},...void 0!==a?{maxFeePerBlobGas:a}:{},...void 0!==c?{maxFeePerGas:c}:{},...void 0!==u?{maxPriorityFeePerGas:u}:{},..."nonceKey"in d&&void 0!==d.nonceKey?{nonceKey:d.nonceKey}:{}}}).catch(t=>("TransactionExecutionError"!==t.name||t.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)&&A.set(e.uid,!1),x)):x;I??=B.nonce;let{blobs:C,gas:R,kzg:O,type:U}=x={...B,..._?{from:_?.address}:{},...I?{nonce:I}:{}};async function D(){return p||(p=await (0,m.T)(e,s.g,"getBlock")({blockTag:"latest"}))}if(k?.fn&&k.runAt?.includes("beforeFillParameters")&&(x=await k.fn({...x,chain:M},{phase:"beforeFillParameters"})),E.includes("nonce")&&void 0===I&&_&&!T&&(x.nonce=await (0,m.T)(e,a.y,"getTransactionCount")({address:_.address,blockTag:"pending"})),(E.includes("blobVersionedHashes")||E.includes("sidecars"))&&C&&O){let e=(0,u.S)({blobs:C,kzg:O});if(E.includes("blobVersionedHashes")){let t=(0,d.d)({commitments:e,to:"hex"});x.blobVersionedHashes=t}if(E.includes("sidecars")){let t=(0,l.t)({blobs:C,commitments:e,kzg:O}),r=(0,f.T)({blobs:C,commitments:e,proofs:t,to:"hex"});x.sidecars=r}}if(E.includes("chainId")&&(x.chainId=await S()),(E.includes("fees")||E.includes("type"))&&void 0===U)try{x.type=(0,g.L)(x)}catch{let t=w.get(e.uid);if(void 0===t){let r=await D();t="bigint"==typeof r?.baseFeePerGas,w.set(e.uid,t)}x.type=t?"eip1559":"legacy"}if(E.includes("fees"))if("legacy"!==x.type&&"eip2930"!==x.type){if(void 0===x.maxFeePerGas||void 0===x.maxPriorityFeePerGas){let t=await D(),{maxFeePerGas:r,maxPriorityFeePerGas:n}=await (0,i.O)(e,{block:t,chain:M,request:x});if(void 0===x.maxPriorityFeePerGas&&x.maxFeePerGas&&x.maxFeePerGas<n)throw new c.RR({maxPriorityFeePerGas:n});x.maxPriorityFeePerGas=n,x.maxFeePerGas=r}}else{if(void 0!==x.maxFeePerGas||void 0!==x.maxPriorityFeePerGas)throw new c.pw;if(void 0===x.gasPrice){let t=await D(),{gasPrice:r}=await (0,i.O)(e,{block:t,chain:M,request:x,type:"legacy"});x.gasPrice=r}}return E.includes("gas")&&void 0===R&&(x.gas=await (0,m.T)(e,o.Q,"estimateGas")({...x,account:_,prepare:_?.type==="local"?[]:["blobVersionedHashes"]})),k?.fn&&k.runAt?.includes("afterFillParameters")&&(x=await k.fn({...x,chain:M},{phase:"afterFillParameters"})),(0,h.c)(x),delete x.parameters,x}},31859:(e,t,r)=>{r.d(t,{Ez:()=>s,LX:()=>n,WN:()=>i,fT:()=>o});let n="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b
4602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",o="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
4603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",s="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
4150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"},32704:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromUtf8=t.toUtf8=void 0,t.toUtf8=function(e){return new TextEncoder().encode(e)},t.fromUtf8=function(e,t=!1){return new TextDecoder("utf-8",{fatal:!t}).decode(e)}},33082:(e,t)=>
4{Object.defineProperty(t,"__esModule",{value:!0}),t.fromAscii=t.toAscii=void 0,t.toAscii=function(e){return Uint8Array.from(e.split("").map(e=>{let t=e.charCodeAt(0);if(t<32||t>126)throw Error("Cannot encode character that is out of printable ASCII range: "+t);return t}))},t.fromAscii=function(e){return Array.from(e).map(e=>{if(e<32||e>126)throw Error("Cannot decode character that is out of printable ASCII range: "+e);return String.fromCharCode(e)}).join("")}},33269:(e,t,r)=>{t.Service=r(4657)},34214:(e,t,r)=>{r.d(t,{X:()=>y,J:()=>g});var n=r(56555),i=r(16481),o=r(67132),s=r(7565),a=r(81381),c=r(19161),u=r(493),l=r(16189),d=r(7137),f=r(55562);let m="/docs/contract/encodeErrorResult";function p(e){let{abi:t,errorName:r,args:n}=e,i=t[0];if(r){let e=(0,f.iY)({abi:t,args:n,name:r});if(!e)throw new o.yy(r,{docsPath:m});i=e}if("error"!==i.type)throw new o.yy(void 0,{docsPath:m});let s=(0,u.B)(i),c=(0,a.V)(s),p="0x";if(n&&n.length>0){if(!i.inputs)throw new o.ZP(i.name,{docsPath:m});p=(0,d.h)(i.inputs,n)}return(0,l.aP)([c,p])}let h="/docs/contract/encodeFunctionResult",g="x-batch-gateway:true";async function y(e){let{data:t,ccipRequest:r}=e,{args:[l]}=function(e){let{abi:t,data:r}=e,n=(0,s.di)(r,0,4),i=t.find(e=>"function"===e.type&&n===(0,a.V)((0,u.B)(e)));if(!i)throw new o.EB(n,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:i.name,args:"inputs"in i&&i.inputs&&i.inputs.length>0?(0,c.n)(i.inputs,(0,s.di)(r,4)):void 0}}({abi:n.b2,data:t}),m=[],b=[];return await Promise.all(l.map(async(e,t)=>{try{b[t]=e.urls.includes(g)?await y({data:e.data,ccipRequest:r}):await r(e),m[t]=!1}catch(e){var o;m[t]=!0,b[t]="HttpRequestError"===(o=e).name&&o.status?p({abi:n.b2,errorName:"HttpError",args:[o.status,o.shortMessage]}):p({abi:[i.Mc],errorName:"Error",args:["shortMessage"in o?o.shortMessage:o.message]})}})),function(e){let{abi:t,functionName:r,result:n}=e,i=t[0];if(r){let e=(0,f.iY)({abi:t,name:r});if(!e)throw new o.Iz(r,{docsPath:h});i=e}if("function"!==i.type)throw new o.Iz(void 0,{docsPath:h});if(!i.outputs)throw new o.MR(i.name,{docsPath:h});let s=(()=>{if(0===i.outputs.length)return[];if(1===i.outputs.length)return[n];if(Array.isArray(n))return n;throw new o.dm(n)})();return(0,d.h)(i.outputs,s)}({abi:n.b2,functionName:"query",result:[m,b]})}},34255:(e,t,r)=>{function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function o(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 r=t.outputLen;if(e.length<r)throw Error(`digestInto() expects output buffer of length at least ${r}`)}r.d(t,{CG:()=>s,ai:()=>n,ee:()=>i,t2:()=>o})},34960:(e,t,r)=>{r.d(t,{E:()=>i});var n=r(73906);function i(e){return(0,n.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},35145:(e,t,r)=>{r.d(t,{w:()=>i});var n=r(53645);function i(e,{emitOnBegin:t,initialWaitTime:r,interval:i}){let o=!0,s=()=>o=!1;return(async()=>{let a;t&&(a=await e({unpoll:s}));let c=await r?.(a)??i;await (0,n.u)(c);let u=async()=>{o&&(await e({unpoll:s}),await (0,n.u)(i),u())};u()})(),s}},35815:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PricePretty=void 0;let n=r(71179),i=r(65821);class o{constructor(e,t){this._fiatCurrency=e,this._options={separator:"",upperCase:!1,lowerCase:!1,locale:"en-US"},this.intPretty=new n.IntPretty(t).maxDecimals(e.maxDecimals).shrink(!0).trim(!0).locale(!1).inequalitySymbol(!0),this._options.locale=e.locale}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}get symbol(){return this._fiatCurrency.symbol}get fiatCurrency(){return this._fiatCurrency}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t._options.locale=e,t}roundTo(e){let t=this.clone();return t.intPretty=t.intPretty.roundTo(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){let e=this.symbol;this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this.toDec(),r=this.options;if(r.inequalitySymbol&&!t.isZero()&&t.abs().lt(i.DecUtils.getTenExponentN(-r.maxDecimals)))return this.intPretty.toStringWithSymbol
4s(`${e}${this._options.separator}`,"");let n=parseFloat(this.intPretty.toString()).toLocaleString(r.locale,{maximumFractionDigits:r.maxDecimals}),o="-"===n.charAt(0);return o&&(n=n.slice(1)),`${o?"-":""}${e}${this._options.separator}${n}`}clone(){let e=new o(this._fiatCurrency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}}t.PricePretty=o},36219:(e,t,r)=>{r.d(t,{$q:()=>y,C:()=>d,DM:()=>a,d4:()=>m,rT:()=>u,vM:()=>l,z:()=>f});var n=r(88772),i=r(17502);r(37193),n.util.Long!==i&&(n.util.Long=i,n.configure());var o=(()=>{if(void 0!==o)return o;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw"Unable to locate global object"})(),s=o.atob||(e=>o.Buffer.from(e,"base64").toString("binary"));function a(e){let t=s(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}var c=o.btoa||(e=>o.Buffer.from(e,"binary").toString("base64"));function u(e){let t=[];return e.forEach(e=>{t.push(String.fromCharCode(e))}),c(t.join(""))}function l(e){return null!=e}function d(e){var t;return{seconds:(t=e.getTime()/1e3,i.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function f(e){let t=1e3*e.seconds.toNumber();return new Date(t+=e.nanos/1e6)}function m(e){if(e instanceof Date)return d(e);if("string"==typeof e)return d(new Date(e));return{seconds:l(e.seconds)?i.fromValue(e.seconds):i.ZERO,nanos:l(e.nanos)?Number(e.nanos):0}}function p(){return{$typeUrl:"/google.protobuf.Any",typeUrl:"",value:new Uint8Array}}var h={typeUrl:"/google.protobuf.Any",encode:(e,t=n.Writer.create())=>(""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(e,t){let r=e instanceof n.Reader?e:new n.Reader(e),i=void 0===t?r.len:r.pos+t,o=p();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.typeUrl=r.string();break;case 2:o.value=r.bytes();break;default:r.skipType(7&e)}}return o},fromJSON:e=>({typeUrl:l(e.typeUrl)?String(e.typeUrl):"",value:l(e.value)?a(e.value):new Uint8Array}),toJSON(e){let t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=u(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){let t=p();return t.typeUrl=e.typeUrl??"",t.value=e.value??new Uint8Array,t},fromAmino:e=>({typeUrl:e.type,value:e.value}),toAmino(e){let t={};return t.type=e.typeUrl,t.value=e.value,t},fromAminoMsg:e=>h.fromAmino(e.value),fromProtoMsg:e=>h.decode(e.value),toProto:e=>h.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/google.protobuf.Any",value:h.encode(e).finish()})};function g(){return{address:"",pubKey:void 0,accountNumber:i.UZERO,sequence:i.UZERO}}var y={typeUrl:"/cosmos.auth.v1beta1.BaseAccount",encode:(e,t=n.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&h.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t),decode(e,t){let r=e instanceof n.Reader?e:new n.Reader(e),i=void 0===t?r.len:r.pos+t,o=g();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:o.address=r.string();break;case 2:o.pubKey=h.decode(r,r.uint32());break;case 3:o.accountNumber=r.uint64();break;case 4:o.sequence=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON:e=>({address:l(e.address)?String(e.address):"",pubKey:l(e.pubKey)?h.fromJSON(e.pubKey):void 0,accountNumber:l(e.accountNumber)?i.fromValue(e.accountNumber):i.UZERO,sequence:l(e.sequence)?i.fromValue(e.sequence):i.UZERO}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?h.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||i.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||i.UZERO).toString()),t},fromPartial(e){let t=g();return t.address=e.address??"",t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?h.fromPartial(e.pubKey):void 0,t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?i.fromValue(e.accountNumber):i.UZERO,t.sequence=void 0!==e.sequence&&null!==e.sequence?i.fromValue(e.sequence):i.UZERO,t},fromAmino(e){let t=g();return void 0!==e.address&&null!==e.address&&(t.address=e.address),void 0!==e.pub_key&&null!==e.pub_key&&
4(t.pubKey=h.fromAmino(e.pub_key)),void 0!==e.account_number&&null!==e.account_number&&(t.accountNumber=i.fromString(e.account_number)),void 0!==e.sequence&&null!==e.sequence&&(t.sequence=i.fromString(e.sequence)),t},toAmino(e){let t={};return t.address=""===e.address?void 0:e.address,t.pub_key=e.pubKey?h.toAmino(e.pubKey):void 0,t.account_number=e.accountNumber.isZero()?void 0:e.accountNumber?.toString(),t.sequence=e.sequence.isZero()?void 0:e.sequence?.toString(),t},fromAminoMsg:e=>y.fromAmino(e.value),toAminoMsg:e=>({type:"cosmos-sdk/BaseAccount",value:y.toAmino(e)}),fromProtoMsg:e=>y.decode(e.value),toProto:e=>y.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.auth.v1beta1.BaseAccount",value:y.encode(e).finish()})}},37193:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(71179),t),i(r(84493),t),i(r(15162),t),i(r(29248),t),i(r(66858),t),i(r(63498),t),i(r(65821),t),i(r(35815),t),i(r(40996),t)},37581:(e,t,r)=>{r.d(t,{Y:()=>n});function n(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}},39282:(e,t,r)=>{r.d(t,{e:()=>n});function n(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}},40996:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RatePretty=void 0;let n=r(71179);class i{constructor(e){this._options={separator:"",symbol:"%"},this.intPretty=new n.IntPretty(e),this.intPretty=this.intPretty.maxDecimals(3).shrink(!1).trim(!0).locale(!0).inequalitySymbol(!0)}get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}separator(e){let t=this.clone();return t._options.separator=e,t}symbol(e){let t=this.clone();return t._options.symbol=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}sign(e){let t=this.clone();return t.intPretty=t.intPretty.sign(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){return this.intPretty.moveDecimalPointRight(2).toStringWithSymbols("",`${this._options.separator}${this._options.symbol}`)}clone(){let e=new i(0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}}t.RatePretty=i},41091:(e,t,r)=>{r.d(t,{J:()=>n});function n(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[i,o]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}},42063:e=>{e.exports={}},42742:(e,t,r)=>{r.d(t,{v4:()=>u});var n,i=new Uint8Array(16);let o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));let c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!("string"==typeof r&&o.test(r)))throw TypeError("Stringified UUID is invali
4d");return r},u=function(e,t,r){var o=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=o[s];return t}return c(o)}},43482:(e,t,r)=>{r.d(t,{eL:()=>n,sz:()=>i});let n={gwei:9,wei:18},i={ether:-9,wei:9}},44175:(e,t,r)=>{r.d(t,{l:()=>i});var n=r(97461);class i extends n.C{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}},45209:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(83210),i=r(45667);function o(e,t){if(!(0,i.P)(e,{strict:!1}))throw new n.M({address:e});if(!(0,i.P)(t,{strict:!1}))throw new n.M({address:t});return e.toLowerCase()===t.toLowerCase()}},45250:(e,t,r)=>{r.d(t,{p:()=>l});var n=r(16189),i=r(7137),o=r(67132),s=r(81381),a=r(493),c=r(55562);let u="/docs/contract/encodeFunctionData";function l(e){let{args:t}=e,{abi:r,functionName:l}=(()=>{if(1===e.abi.length&&e.functionName?.startsWith("0x"))return e;let{abi:t,args:r,functionName:n}=e,i=t[0];if(n){let e=(0,c.iY)({abi:t,args:r,name:n});if(!e)throw new o.Iz(n,{docsPath:u});i=e}if("function"!==i.type)throw new o.Iz(void 0,{docsPath:u});return{abi:[i],functionName:(0,s.V)((0,a.B)(i))}})(),d=r[0],f="inputs"in d&&d.inputs?(0,i.h)(d.inputs,t??[]):void 0;return(0,n.aP)([l,f??"0x"])}},45667:(e,t,r)=>{r.d(t,{P:()=>a});var n=r(99053),i=r(13949);let o=/^0x[a-fA-F0-9]{40}$/,s=new n.A(8192);function a(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(s.has(n))return s.get(n);let a=!!o.test(e)&&(e.toLowerCase()===e||!r||(0,i.o)(e)===e);return s.set(n,a),a}},45789:(e,t,r)=>{r.d(t,{CL:()=>c,D5:()=>l,Di:()=>f,G1:()=>I,Gi:()=>u,L5:()=>T,MI:()=>C,RV:()=>x,Sf:()=>A,WT:()=>E,XU:()=>a,YW:()=>h,ab:()=>g,bq:()=>d,cg:()=>S,ch:()=>M,hA:()=>m,hl:()=>k,jz:()=>B,qZ:()=>p,s0:()=>y,sV:()=>w,uL:()=>_,vx:()=>v,xQ:()=>b,xq:()=>P});var n=r(97461),i=r(14351);class o extends n.C{constructor(e,{code:t,docsPath:r,metaMessages:n,name:o,shortMessage:s}){super(s,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||e.name,this.code=e instanceof i.J8?e.code:t??-1}}class s extends o{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class a extends o{constructor(e){super(e,{code:a.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(a,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends o{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends o{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends o{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends o{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends o{constructor(e){super(e,{code:f.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class m extends o{constructor(e){super(e,{code:m.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends o{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});
4class h extends o{constructor(e){super(e,{code:h.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class g extends o{constructor(e,{method:t}={}){super(e,{code:g.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends o{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class b extends o{constructor(e){super(e,{code:b.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends s{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends s{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class A extends s{constructor(e,{method:t}={}){super(e,{code:A.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class x extends s{constructor(e){super(e,{code:x.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class P extends s{constructor(e){super(e,{code:P.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class M extends s{constructor(e){super(e,{code:M.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class T extends s{constructor(e){super(e,{code:T.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class E extends s{constructor(e){super(e,{code:E.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class k extends s{constructor(e){super(e,{code:k.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class S extends s{constructor(e){super(e,{code:S.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class _ extends s{constructor(e){super(e,{code:_.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class I extends s{constructor(e){super(e,{code:I.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class B extends s{constructor(e){super(e,{code:B.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class C extends o{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},47091:(e,t,r)=>{r.d(t,{Hi:()=>i,ft:()=>o,uj:()=>a});var n=r(97461);class i extends n.C{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class o extends n.C{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentC
4onflictError"})}}function s(e){return e.reduce((e,{slot:t,value:r})=>`${e} ${t}: ${r} 5`,"")}function a(e){return e.reduce((e,{address:t,...r})=>{let n=`${e} ${t}: 6`;return r.nonce&&(n+=` nonce: ${r.nonce} 7`),r.balance&&(n+=` balance: ${r.balance} 8`),r.code&&(n+=` code: ${r.code} 9`),r.state&&(n+=" state:\n",n+=s(r.state)),r.stateDiff&&(n+=" stateDiff:\n",n+=s(r.stateDiff)),n}," State Override:\n").slice(0,-1)}},50193:(e,t,r)=>{e.exports=d;var n,i=r(11238),o=i.LongBits,s=i.base64,a=i.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function u(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var f=function(){return i.Buffer?function(){return(d.create=function(){return new n})()}:function(){return new d}};function m(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function h(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function g(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=f(),d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},p.prototype=Object.create(c.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(h,10,o.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=o.from(e);return this._push(h,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(h,t.length(),t)},d.prototype.bool=function(e){return this._push(m,1,+!!e)},d.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=o.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var y=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(m,1,0);if(i.isString(e)){var r=d.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(m,1,0)},d.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new c(u,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},d._configure=function(e){n=e,d.create=f(),n._configure()}},50342:(e,t,r)=>{r.d(t,{l:()=>o});var n=r(18768);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 n.hX({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.SK({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.B4({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 n.B4({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===1/0)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function o(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(i);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}},51383:(e,t,r)=>{r.d(t,{KC:()=>T,KJ:()=>g,L5:()=>E,NW:()=>M,PV:()=>P,YO:()=>p,Yj:()=>x,ai:()=>v,au:()=>k,bz:()=>m,eu:()=>y,g1:()=>A,lq:()=>w,me:()=>b,vt:()=>l,zM:()=>h});
9class n extends TypeError{constructor(e,t){let r,{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function o(e){return i(e)&&!Array.isArray(e)}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function*a(e,t,r,n){var o;for(let a of(i(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]),e)){let e=function(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:i,branch:o}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:i[i.length-1],path:i,branch:o,...e,message:u}}(a,t,r,n);e&&(yield e)}}function*c(e,t,r={}){let{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,u={path:n,branch:o,mask:a};s&&(e=t.coercer(e,u));let l="valid";for(let n of t.validator(e,u))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[d,f,m]of t.entries(e,u))for(let t of c(f,m,{path:void 0===d?n:[...n,d],branch:void 0===d?o:[...o,f],coerce:s,mask:a,message:r.message}))t[0]?(l=null!=t[0].refinement?"not_refined":"not_valid",yield[t[0],void 0]):s&&(f=t[1],void 0===d?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):i(e)&&(void 0!==f||d in e)&&(e[d]=f));if("not_valid"!==l)for(let n of t.refiner(e,u))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class u{constructor(e){let{type:t,schema:r,validator:n,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,n?this.validator=(e,t)=>a(n(e,t),t,this,e):this.validator=()=>[],i?this.refiner=(e,t)=>a(i(e,t),t,this,e):this.refiner=()=>[]}assert(e,t){var r=e,n=this,i=t;let o=d(r,n,{message:i});if(o[0])throw o[0]}create(e,t){return l(e,this,t)}is(e){var t,r;return t=e,r=this,!d(t,r)[0]}mask(e,t){var r=e,n=this,i=t;let o=d(r,n,{coerce:!0,mask:!0,message:i});if(!o[0])return o[1];throw o[0]}validate(e,t={}){return d(e,this,t)}}function l(e,t,r){let n=d(e,t,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function d(e,t,r={}){let i=c(e,t,r),o=function(e){let{done:t,value:r}=e.next();return t?void 0:r}(i);return o[0]?[new n(o[0],function*(){for(let e of i)e[0]&&(yield e[0])}),void 0]:[void 0,o[1]]}function f(e,t){return new u({type:e,schema:null,validator:t})}function m(){return f("any",()=>!0)}function p(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function h(){return f("boolean",e=>"boolean"==typeof e)}function g(e){return f("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`)}function y(e){let t=s(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function b(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function v(){return f("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`)}function w(e){return new u({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function A(e,t){return new u({type:"record",schema:null,*entries(r){if(i(r))for(let n in r){let i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function x(){return f("string",e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`)}function P(e){let t=f("never",()=>!1);return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function M(e){let t=Object.keys(e);return new u({type:"type",schema:e,*entries(r){if(i(r))for(let n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function T(e){let t=e.map(e=>e.type).join(" | ");return new u({type:"union",schema:null,coercer(t,r){for(let n of e){let[e,i]=n.validate(t,{coerce:!0,mask:r.mask});if(!e)return i}return t},validator(r,n){let i=[];for(let t of e){let[...e]=c(r,t,n),[o]=e;if(!o[0])return[];for(let[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function E(){return f("unknown",()=>!0)}function k(e,t,r){return new u({...e,coercer:(n,i)=>d(n,t)[0]?e.coercer(n,i):e.coercer(r(n,i),i)})}},51659:(e,t,r)=>{t.Cj=t.Ww=void 0;var n=r(26964);Object.defineProperty(t,"Ww",{enumerable:!0,get:function(){return n.Decimal}});var i=r(24902);Object.defineProperty(t,"Cj",{enumerable:!0,get:function(){return i.Int53}})},52474:(e,t,r)=>{r.d(t,{s:()=>f});var n=r(34255),i=r(6153);let o=(e,t,r)=>e&t^~e&r,s=(e,t,r)=>e&t^e&r^t&r;class a extends i.Vw{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.O8)(this.buffer)}update(e){(0,n.t2)(this);let{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.ZJ)(e)).length;for(let n=0;n<s;){let a=Math.min(o-this.pos,s-n);if(a===o){let t=(0,i.O8)(e);for(;o<=s-n;n+=o)this.process(t,n);continue}r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.t2)(this),(0,n.CG)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:o,isLE:s}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;
vendor: 1,573 bytes, line 9
9e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),c=4*!!n,u=4*!n;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);let c=(0,i.O8)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,d=this.get();if(l>d.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}let c=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),u=new Uint32Array([0x6a09e66
97,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),l=new Uint32Array(64);class d extends a{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:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=l[e-15],r=l[e-2],n=(0,i.Ow)(t,7)^(0,i.Ow)(t,18)^t>>>3,o=(0,i.Ow)(r,17)^(0,i.Ow)(r,19)^r>>>10;l[e]=o+l[e-7]+n+l[e-16]|0}let{A:r,B:n,C:a,D:u,E:d,F:f,G:m,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.Ow)(d,6)^(0,i.Ow)(d,11)^(0,i.Ow)(d,25))+o(d,f,m)+c[e]+l[e]|0,h=((0,i.Ow)(r,2)^(0,i.Ow)(r,13)^(0,i.Ow)(r,22))+s(r,n,a)|0;p=m,m=f,f=d,d=u+t|0,u=a,a=n,n=r,r=t+h|0}r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,d=d+this.E|0,f=f+this.F|0,m=m+this.G|0,p=p+this.H|0,this.set(r,n,a,u,d,f,m,p)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let f=(0,i.ld)(()=>new d)},52536:(e,t,r)=>{r.d(t,{n:()=>p});var n=r(44175),i=r(98770),o=r(4770),s=r(19024),a=r(37581),c=r(760),u=r(8537),l=r(27465),d=r(24148),f=r(69564),m=r(23065);async function p(e,t){let r,p,h,g,y,{checkReplacement:b=!0,confirmations:v=1,hash:w,onReplaced:A,retryCount:x=6,retryDelay:P=({count:e})=>200*~~(1<<e),timeout:M=18e4}=t,T=(0,u.A)(["waitForTransactionReceipt",e.uid,w]),E=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,k=!1,{promise:S,resolve:_,reject:I}=(0,a.Y)(),B=M?setTimeout(()=>{y?.(),g?.(),I(new i.WA({hash:w}))},M):void 0;return g=(0,s.lB)(T,{onReplaced:A,resolve:_,reject:I},async t=>{if((h=await (0,o.T)(e,f.h,"getTransactionReceipt")({hash:w}).catch(()=>void 0))&&v<=1){clearTimeout(B),t.resolve(h),g?.();return}y=(0,o.T)(e,m.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:E,async onBlockNumber(s){let a=e=>{clearTimeout(B),y?.(),e(),g?.()},u=s;if(!k)try{if(h){if(v>1&&(!h.blockNumber||u-h.blockNumber+1n<v))return;a(()=>t.resolve(h));return}if(b&&!r&&(k=!0,await (0,c.b)(async()=>{(r=await (0,o.T)(e,d.x,"getTransaction")({hash:w})).blockNumber&&(u=r.blockNumber)},{delay:P,retryCount:x}),k=!1),h=await (0,o.T)(e,f.h,"getTransactionReceipt")({hash:w}),v>1&&(!h.blockNumber||u-h.blockNumber+1n<v))return;a(()=>t.resolve(h))}catch(s){if(s instanceof i.Kz||s instanceof i.Kc){if(!r){k=!1;return}try{p=r,k=!0;let i=await (0,c.b)(()=>(0,o.T)(e,l.g,"getBlock")({blockNumber:u,includeTransactions:!0}),{delay:P,retryCount:x,shouldRetry:({error:e})=>e instanceof n.l});k=!1;let s=i.transactions.find(({from:e,nonce:t})=>e===p.from&&t===p.nonce);if(!s||(h=await (0,o.T)(e,f.h,"getTransactionReceipt")({hash:s.hash}),v>1&&(!h.blockNumber||u-h.blockNumber+1n<v)))return;let d="replaced";s.to===p.to&&s.value===p.value&&s.input===p.input?d="repriced":s.from===s.to&&0n===s.value&&(d="cancelled"),a(()=>{t.onReplaced?.({reason:d,replacedTransaction:p,transaction:s,transactionReceipt:h}),t.resolve(h)})}catch(e){a(()=>t.reject(e))}}else a(()=>t.reject(s))}}})}),S}},53645:(e,t,r)=>{r.d(t,{u:()=>n});async function n(e){return new Promise(t=>setTimeout(t,e))}},53678:(e,t,r)=>{r.d(t,{db:()=>o,eV:()=>i});var n=r(57842);function i(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.Fl({size:e.length,targetSize:r,type:"bytes"});let i=new Uint8Array(r);for(let n=0;n<r;n++){let o="right"===t;i[o?n:r-n-1]=e[o?n:e.length-n-1]}return i}(e,{dir:t,size:r})}function o(e,{dir:t,size:r=32}={}){if(null===r)return e;let i=e.replace("0x","");if(i.length>2*r)throw new n.Fl({size:Math.ceil(i.length/2),targetSize:r,type:"hex"});return`0x${i["right"===t?"padEnd":"padStart"](2*r,"0")}`}},53941:(e,t,r)=>{r.d(t,{bI:()=>E});var n=r(86895),i=r(34667),o=r(28599),s=r(10727),a=r(24004),c=r(14697);let u=(e,t)=>(e+(e>=0?t:-t)/g)/t;function l(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function d(e,t){let r={};for(let n of Object.keys(t))r[n]=void 0===e[n]?t[n]:e[n];return(0,s.d6)(r.lowS,"lowS"),(0,s.d6)(r.prehash,"prehash"),void 0!==r.format&&l(r.format),r}
vendor: 17,207 bytes, line 9
9class f extends Error{constructor(e=""){super(e)}}let m={Err:f,_tlv:{encode:(e,t)=>{let{Err:r}=m;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=(0,s.zW)(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?(0,s.zW)(i.length/2|128):"";return(0,s.zW)(e)+o+i+t},decode(e,t){let{Err:r}=m,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],o=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(n,n+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)o=o<<8|e;if(n+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let s=t.subarray(n,n+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+o)}}},_int:{encode(e){let{Err:t}=m;if(e<p)throw new t("integer: negative integers are not allowed");let r=(0,s.zW)(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=m;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return(0,s.Ph)(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=m,i=(0,s.qj)("signature",e),{v:o,l:a}=n.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");let{v:c,l:u}=n.decode(2,o),{v:l,l:d}=n.decode(2,u);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(c),s:r.decode(l)}},hexFromSig(e){let{_tlv:t,_int:r}=m,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},p=BigInt(0),h=BigInt(1),g=BigInt(2),y=BigInt(3),b=BigInt(4);function v(e,t){let r,{BYTES:n}=e;if("bigint"==typeof t)r=t;else{let i=(0,s.qj)("private key",t);try{r=e.fromBytes(i)}catch(e){throw Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw Error("invalid private key: out of range [1..N-1]");return r}function w(e){return Uint8Array.of(e?2:3)}function A(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}let x={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},P={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},M=BigInt(2),T=(0,c.D0)(x.p,{sqrt:function(e){let t=x.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),u=BigInt(88),l=e*e*e%t,d=l*l*e%t,f=(0,c.zH)(d,r,t)*d%t,m=(0,c.zH)(f,r,t)*d%t,p=(0,c.zH)(m,M,t)*l%t,h=(0,c.zH)(p,i,t)*p%t,g=(0,c.zH)(h,o,t)*h%t,y=(0,c.zH)(g,a,t)*g%t,b=(0,c.zH)(y,u,t)*y%t,v=(0,c.zH)(b,a,t)*g%t,w=(0,c.zH)(v,r,t)*d%t,A=(0,c.zH)(w,s,t)*h%t,P=(0,c.zH)(A,n,t)*l%t,E=(0,c.zH)(P,M,t);if(!T.eql(T.sqr(E),e))throw Error("Cannot find square root");return E}}),E=function(e,t){let r=t=>(function(e){let{CURVE:t,curveOpts:r,hash:n,ecdsaOpts:f}=function(e){let{CURVE:t,curveOpts:r}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,n=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,i={Fp:r,Fn:(0,c.D0)(t.n,{BITS:e.nBitLength,allowedLengths:n,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:i}}(e),n={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:n}}(e),x=function(e,t,r={}){(0,o.sd)(t),(0,s.DS)(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let n=r.randomBytes||o.po,a=r.hmac||((e,...r)=>(0,i.w)(t,e,(0,o.Id)(...r))),{Fp:u,Fn:f}=e,{ORDER:y,BITS:b}=f,{keygen:x,getPublicKey:P,getSharedSecret:M,utils:T,lengths:E}=function(e,t={}){let{Fn:r}=e,n=t.randomBytes||o.po,i=Object.assign(A(e.Fp,r),{seed:(0,c.Tp)(r.ORDER)});function a(e){try{return!!v(r,e)}catch(e){return!1}}function u(e=n(i.seed)){return(0,c.qy)((0,s.eV)(e,i.seed,"seed"),r.ORDER)}function l(t,n=!0){return e.BASE.multiply(v(r,t)).toBytes(n)}function d(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:n,publicKey:o,publicKeyUncompressed:a}=i;if(r.allowedLengths||n===o)return;let c=(0,s.qj)("key",t).length;return c===o||c===a}return Object.freeze({getPublicKey:l,getSharedSecret:function(t,n,i=!0){if(!0===d(t))throw Error("first arg must be private key");if(!1===d(n))throw Error("second arg must be public key");let o=v(r,t);return e.fromHex(n).multiply(o).toBytes(i)},keygen:function(e){let t=u(e);return{secretKey:t,publicKey:l(t)}},Point:e,utils:{isValidSecretKey:a,isValidPublicKey:function(t,r){let{publicKey:n,publicKeyUncompressed:o}=i;try{let i=t.length;if(!0===r&&i!==n||!1===r&&i!==o)return!1;return!!e.fromBytes(t)}catch(e){return!1}},randomSecretKey:u,isValidPrivateKey:a,randomPrivateKey:u,normPrivateKeyToScalar:e=>v(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)},lengths:i})}(e,r),k={prehash:!1,lowS:"boolean"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},S="compact";function _(e,t){if(!f.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class I{constructor(e,t,r){this.r=_("r",e),this.s=_("s",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,t=S){let r;if(!function(e,t){l(t);let r=E.signature;(0,s.eV)(e,"compact"===t?r:"recovered"===t?r+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:r}=m.toSig((0,s.eV)(e));return new I(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));let n=f.BYTES,i=e.subarray(0,n),o=e.subarray(n,2*n);return new I(f.fromBytes(i),f.fromBytes(o),r)}static fromHex(e,t){return this.fromBytes((0,o.aT)(e),t)}addRecoveryBit(e){return new I(this.r,this.s,e)}recoverPublicKey(t){let r=u.ORDER,{r:n,s:i,recovery:a}=this;if(null==a||![0,1,2,3].includes(a))throw Error("recovery id invalid");if(y*g<r&&a>1)throw Error("recovery id is ambiguous for h>1 curve");let c=2===a||3===a?n+y:n;if(!u.isValid(c))throw Error("recovery id 2 or 3 invalid");let l=u.toBytes(c),d=e.fromBytes((0,o.Id)(w((1&a)==0),l)),m=f.inv(c),p=C((0,s.qj)("msgHash",t)),h=f.create(-p*m),b=f.create(i*m),v=e.BASE.multiplyUnsafe(h).add(d.multiplyUnsafe(b));if(v.is0())throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>y>>h}toBytes(e=S){if(l(e),"der"===e)return(0,o.aT)(m.hexFromSig(this));let t=f.toBytes(this.r),r=f.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return(0,o.Id)(Uint8Array.of(this.recovery),t,r)}return(0,o.Id)(t,r)}toHex(e){return(0,o.My)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return I.fromBytes((0,s.qj)("sig",e),"compact")}static fromDER(e){return I.fromBytes((0,s.qj)("sig",e),"der")}normalizeS(){return this.hasHighS()?new I(this.r,f.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.My)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.My)(this.toBytes("compact"))}}let B=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=(0,s.Ph)(e),r=8*e.length-b;return r>0?t>>BigInt(r):t},C=r.bits2int_modN||function(e){return f.create(B(e))},R=(0,s.OG)(b);function O(e){return(0,s.aK)("num < 2^"+b,e,p,R),f.toBytes(e)}function U(e,r){return(0,s.eV)(e,void 0,"message"),r?(0,s.eV)(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:x,getPublicKey:P,getSharedSecret:M,utils:T,lengths:E,Point:e,sign:function(r,i,c={}){let{seed:u,k2sig:l}=function(t,r,i){if(["recovered","canonical"].some(e=>e in i))throw Error("sign() legacy options not supported");let{lowS:a,prehash:c,extraEntropy:u}=d(i,k),l=C(t=U(t,c)),m=v(f,r),g=[O(m),O(l)];if(null!=u&&!1!==u){let e=!0===u?n(E.secretKey):u;g.push((0,s.qj)("extraEntropy",e))}return{seed:(0,o.Id)(...g),k2sig:function(t){let r=B(t);if(!f.isValidNot0(r))return;let n=f.inv(r),i=e.BASE.multiply(r).toAffine(),o=f.create(i.x);if(o===p)return;let s=f.create(n*f.create(l+o*m));if(s===p)return;let c=2*(i.x!==o)|Number(i.y&h),u=s;return a&&s>y>>h&&(u=f.neg(s),c^=1),new I(o,u,c)}}}(r=(0,s.qj)("message",r),i,c);return(0,s.fg)(t.outputLen,f.BYTES,a)(u,l)},verify:function(t,r,n,i={}){let{lowS:a,prehash:c,format:u}=d(i,k);if(n=(0,s.qj)("publicKey",n),r=U((0,s.qj)("message",r),c),"strict"in i)throw Error("options.strict was renamed to lowS");let l=void 0===u?function(e){let t,r="string"==typeof e||(0,o.aY)(e),n=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!n)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(n)t=new I(e.r,e.s);else if(r){try{t=I.fromBytes((0,s.qj)("sig",e),"der")}catch(e){if(!(e instanceof m.Err))throw e}if(!t)try{t=I.fromBytes((0,s.qj)("sig",e),"compact")}catch(e){return!1}}return!!t&&t}(t):I.fromBytes((0,s.qj)("sig",t),u);if(!1===l)return!1;try{let t=e.fromBytes(n);if(a&&l.hasHighS())return!1;let{r:i,s:o}=l,s=C(r),c=f.inv(o),u=f.create(s*c),d=f.create(i*c),m=e.BASE.multiplyUnsafe(u).add(t.multiplyUnsafe(d));if(m.is0())return!1;return f.create(m.x)===i}catch(e){return!1}},recoverPublicKey:function(e,t,r={}){let{prehash:n}=d(r,k);return t=U(t,n),I.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:I,hash:t})}(function(e,t={}){let r=(0,a.UT)("weierstrass",e,t),{Fp:n,Fn:i}=r,c=r.CURVE,{h:l,n:d}=c;(0,s.DS)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:f}=t;if(f&&(!n.is0(c.a)||"bigint"!=typeof f.beta||!Array.isArray(f.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let m=A(n,i);function g(){if(!n.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let x=t.toBytes||function(e,t,r){let{x:i,y:a}=t.toAffine(),c=n.toBytes(i);if((0,s.d6)(r,"isCompressed"),!r)return(0,o.Id)(Uint8Array.of(4),c,n.toBytes(a));{g();let e=!n.isOdd(a);return(0,o.Id)(w(e),c)}},P=t.fromBytes||function(e){(0,s.eV)(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:r}=m,i=e.length,o=e[0],a=e.subarray(1);if(i===t&&(2===o||3===o)){let e,t=n.fromBytes(a);if(!n.isValid(t))throw Error("bad point: is not on curve, wrong x");let r=M(t);try{e=n.sqrt(r)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return g(),(1&o)==1!==n.isOdd(e)&&(e=n.neg(e)),{x:t,y:e}}if(i===r&&4===o){let e=n.BYTES,t=n.fromBytes(a.subarray(0,e)),r=n.fromBytes(a.subarray(e,2*e));if(!T(t,r))throw Error("bad point: is not on curve");return{x:t,y:r}}throw Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${r}`)};function M(e){let t=n.sqr(e),r=n.mul(t,e);return n.add(n.add(r,n.mul(e,c.a)),c.b)}function T(e,t){let r=n.sqr(t),i=M(e);return n.eql(r,i)}if(!T(c.Gx,c.Gy))throw Error("bad curve params: generator point");let E=n.mul(n.pow(c.a,y),b),k=n.mul(n.sqr(c.b),BigInt(27));if(n.is0(n.add(E,k)))throw Error("bad curve params: a or b");function S(e,t,r=!1){if(!n.isValid(t)||r&&n.is0(t))throw Error(`bad point coordinate ${e}`);return t}function _(e){if(!(e instanceof O))throw Error("ProjectivePoint expected")}function I(e){if(!f||!f.basises)throw Error("no endo");return function(e,t,r){let[[n,i],[o,a]]=t,c=u(a*e,r),l=u(-i*e,r),d=e-c*n-l*o,f=-c*i-l*a,m=d<p,g=f<p;m&&(d=-d),g&&(f=-f);let y=(0,s.OG)(Math.ceil((0,s.dJ)(r)/2))+h;if(d<p||d>=y||f<p||f>=y)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:m,k1:d,k2neg:g,k2:f}}(e,f.basises,i.ORDER)}let B=(0,s.x)((e,t)=>{let{X:r,Y:i,Z:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};let s=e.is0();null==t&&(t=s?n.ONE:n.inv(o));let a=n.mul(r,t),c=n.mul(i,t),u=n.mul(o,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(u,n.ONE))throw Error("invZ was invalid");return{x:a,y:c}}),C=(0,s.x)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!n.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:r,y:i}=e.toAffine();if(!n.isValid(r)||!n.isValid(i))throw Error("bad point: x or y not field elements");if(!T(r,i))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function R(e,t,r,i,o){return r=new O(n.mul(r.X,e),r.Y,r.Z),t=(0,a.u0)(i,t),r=(0,a.u0)(o,r),t.add(r)}class O{constructor(e,t,r){this.X=S("x",e),this.Y=S("y",t,!0),this.Z=S("z",r),Object.freeze(this)}static CURVE(){return c}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof O)throw Error("projective point not allowed");return n.is0(t)&&n.is0(r)?O.ZERO:new O(t,r,n.ONE)}static fromBytes(e){let t=O.fromAffine(P((0,s.eV)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return O.fromBytes((0,s.qj)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return D.createCache(this,e),t||this.multiply(y),this}assertValidity(){C(this)}hasEvenY(){let{y:e}=this.toAffine();if(!n.isOdd)throw Error("Field doesn't support isOdd");return!n.isOdd(e)}equals(e){_(e);let{X:t,Y:r,Z:i}=this,{X:o,Y:s,Z:a}=e,c=n.eql(n.mul(t,a),n.mul(o,i)),u=n.eql(n.mul(r,a),n.mul(s,i));return c&&u}negate(){return new O(this.X,n.neg(this.Y),this.Z)}double(){let{a:e,b:t}=c,r=n.mul(t,y),{X:i,Y:o,Z:s}=this,a=n.ZERO,u=n.ZERO,l=n.ZERO,d=n.mul(i,i),f=n.mul(o,o),m=n.mul(s,s),p=n.mul(i,o);return p=n.add(p,p),l=n.mul(i,s),l=n.add(l,l),a=n.mul(e,l),u=n.mul(r,m),u=n.add(a,u),a=n.sub(f,u),u=n.add(f,u),u=n.mul(a,u),a=n.mul(p,a),l=n.mul(r,l),m=n.mul(e,m),p=n.sub(d,m),p=n.mul(e,p),p=n.add(p,l),l=n.add(d,d),d=n.add(l,d),d=n.add(d,m),d=n.mul(d,p),u=n.add(u,d),m=n.mul(o,s),m=n.add(m,m),d=n.mul(m,p),a=n.sub(a,d),l=n.mul(m,f),l=n.add(l,l),new O(a,u,l=n.add(l,l))}add(e){_(e);let{X:t,Y:r,Z:i}=this,{X:o,Y:s,Z:a}=e,u=n.ZERO,l=n.ZERO,d=n.ZERO,f=c.a,m=n.mul(c.b,y),p=n.mul(t,o),h=n.mul(r,s),g=n.mul(i,a),b=n.add(t,r),v=n.add(o,s);b=n.mul(b,v),v=n.add(p,h),b=n.sub(b,v),v=n.add(t,i);let w=n.add(o,a);return v=n.mul(v,w),w=n.add(p,g),v=n.sub(v,w),w=n.add(r,i),u=n.add(s,a),w=n.mul(w,u),u=n.add(h,g),w=n.sub(w,u),d=n.mul(f,v),u=n.mul(m,g),d=n.add(u,d),u=n.sub(h,d),d=n.add(h,d),l=n.mul(u,d),h=n.add(p,p),h=n.add(h,p),g=n.mul(f,g),v=n.mul(m,v),h=n.add(h,g),g=n.sub(p,g),g=n.mul(f,g),v=n.add(v,g),p=n.mul(h,v),l=n.add(l,p),p=n.mul(w,v),u=n.mul(b,u),u=n.sub(u,p),p=n.mul(b,h),d=n.mul(w,d),new O(u,l,d=n.add(d,p))}subtract(e){return this.add(e.negate())}is0(){return this.equals(O.ZERO)}multiply(e){let r,n,{endo:o}=t;if(!i.isValidNot0(e))throw Error("invalid scalar: out of range");let s=e=>D.cached(this,e,e=>(0,a.Ak)(O,e));if(o){let{k1neg:t,k1:i,k2neg:a,k2:c}=I(e),{p:u,f:l}=s(i),{p:d,f:f}=s(c);n=l.add(f),r=R(o.beta,u,d,t,a)}else{let{p:t,f:i}=s(e);r=t,n=i}return(0,a.Ak)(O,[r,n])[0]}multiplyUnsafe(e){let{endo:r}=t;if(!i.isValid(e))throw Error("invalid scalar: out of range");if(e===p||this.is0())return O.ZERO;if(e===h)return this;if(D.hasCache(this))return this.multiply(e);if(!r)return D.unsafe(this,e);{let{k1neg:t,k1:n,k2neg:i,k2:o}=I(e),{p1:s,p2:c}=(0,a.fH)(O,this,n,o);return R(r.beta,s,c,t,i)}}multiplyAndAddUnsafe(e,t,r){let n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return B(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return l===h||(e?e(O,this):D.unsafe(this,d).is0())}clearCofactor(){let{clearCofactor:e}=t;return l===h?this:e?e(O,this):this.multiplyUnsafe(l)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}toBytes(e=!0){return(0,s.d6)(e,"isCompressed"),this.assertValidity(),x(O,this,e)}toHex(e=!0){return(0,o.My)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,a.Ak)(O,e)}static msm(e,t){return(0,a.Xf)(O,i,e,t)}static fromPrivateKey(e){return O.BASE.multiply(v(i,e))}}O.BASE=new O(c.Gx,c.Gy,n.ONE),O.ZERO=new O(n.ZERO,n.ONE,n.ZERO),O.Fp=n,O.Fn=i;let U=i.BITS,D=new a.hT(O,t.endo?Math.ceil(U/2):U);return O.BASE.precompute(8),O}(t,r),n,f),P=x.Point;return Object.assign({},x,{ProjectivePoint:P,CURVE:Object.assign({},e,(0,c.LH)(P.Fn.ORDER,P.Fn.BITS))})})({...e,hash:t});return{...r(t),create:r}}({...x,Fp:T,lowS:!0,endo:P},n.sc)},54743:(e,t,r)=>{r.d(t,{BD:()=>n,Ge:()=>i});
9let n=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,i=/^(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)?$/},55406:(e,t,r)=>{r.d(t,{$8:()=>B,C5:()=>q,DK:()=>_,Dc:()=>em,GB:()=>H,GG:()=>R,HV:()=>eu,Jh:()=>et,KO:()=>a,Kz:()=>m,PE:()=>U,RI:()=>Y,V_:()=>d,WD:()=>Q,XY:()=>P,ZL:()=>N,aA:()=>ed,aW:()=>h,bU:()=>W,cz:()=>ea,ek:()=>y,gF:()=>u,gz:()=>Z,hB:()=>v,qS:()=>T,rm:()=>eo,uR:()=>en,ux:()=>F,wJ:()=>k,x4:()=>z,xO:()=>A});var n=r(36219),i=r(17502),o=r(88772);function s(){return{denom:"",amount:""}}r(51659);var a={typeUrl:"/cosmos.base.v1beta1.Coin",encode:(e,t=o.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.denom=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:(0,n.vM)(e.denom)?String(e.denom):"",amount:(0,n.vM)(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){let t=s();return t.denom=e.denom??"",t.amount=e.amount??"",t},fromAmino(e){let t=s();return void 0!==e.denom&&null!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),t},toAmino(e){let t={};return t.denom=""===e.denom?void 0:e.denom,t.amount=e.amount??"",t},fromAminoMsg:e=>a.fromAmino(e.value),toAminoMsg:e=>({type:"cosmos-sdk/Coin",value:a.toAmino(e)}),fromProtoMsg:e=>a.decode(e.value),toProto:e=>a.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.base.v1beta1.Coin",value:a.encode(e).finish()})};function c(){return{sender:"",bridgeId:i.UZERO,to:"",amount:a.fromPartial({}),data:void 0}}var u={typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",encode:(e,t=o.Writer.create())=>(""!==e.sender&&t.uint32(10).string(e.sender),e.bridgeId.isZero()||t.uint32(16).uint64(e.bridgeId),""!==e.to&&t.uint32(26).string(e.to),void 0!==e.amount&&a.encode(e.amount,t.uint32(34).fork()).ldelim(),void 0!==e.data&&t.uint32(42).bytes(e.data),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.sender=r.string();break;case 2:i.bridgeId=r.uint64();break;case 3:i.to=r.string();break;case 4:i.amount=a.decode(r,r.uint32());break;case 5:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:(0,n.vM)(e.sender)?String(e.sender):"",bridgeId:(0,n.vM)(e.bridgeId)?i.fromValue(e.bridgeId):i.UZERO,to:(0,n.vM)(e.to)?String(e.to):"",amount:(0,n.vM)(e.amount)?a.fromJSON(e.amount):void 0,data:(0,n.vM)(e.data)?(0,n.DM)(e.data):void 0}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.bridgeId&&(t.bridgeId=(e.bridgeId||i.UZERO).toString()),void 0!==e.to&&(t.to=e.to),void 0!==e.amount&&(t.amount=e.amount?a.toJSON(e.amount):void 0),void 0!==e.data&&(t.data=void 0!==e.data?(0,n.rT)(e.data):void 0),t},fromPartial(e){let t=c();return t.sender=e.sender??"",t.bridgeId=void 0!==e.bridgeId&&null!==e.bridgeId?i.fromValue(e.bridgeId):i.UZERO,t.to=e.to??"",t.amount=void 0!==e.amount&&null!==e.amount?a.fromPartial(e.amount):void 0,t.data=e.data??void 0,t},fromAmino(e){let t=c();return void 0!==e.sender&&null!==e.sender&&(t.sender=e.sender),void 0!==e.bridge_id&&null!==e.bridge_id&&(t.bridgeId=i.fromString(e.bridge_id)),void 0!==e.to&&null!==e.to&&(t.to=e.to),void 0!==e.amount&&null!==e.amount&&(t.amount=a.fromAmino(e.amount)),void 0!==e.data&&null!==e.data&&(t.data=(0,n.DM)(e.data)),t},toAmino(e){let t={};return t.sender=""===e.sender?void 0:e.sender,t.bridge_id=e.bridgeId.isZero()?void 0:e.bridgeId?.toString(),t.to=""===e.to?void 0:e.to,t.amount=e.amount?a.toAmino(e.amount):a.toAmino(a.fromPartial({})),t.data=e.data?(0,n.rT)(e.data):void 0,t},fromAminoMsg:e=>u.fromAmino(e.value),toAminoMsg:e=>({type:"ophost/MsgInitiateTokenDeposit",value:u.toAmino(e)}),fromProtoMsg:e=>u.decode(e.value),toProto:e=>u.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/opinit.ophost.v1.MsgInitiateTokenDeposit",value:u.encode(e).finish()})};function l(){return{sender:"",moduleAddress:"",moduleName:"",functionName:"",typeArgs:[],args:[]}}var d={typeUrl:"/initia.move.v1.MsgExecute",encode(e,t=o.Writer.create()){for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.moduleAddress&&t.uint32(18).string(e.moduleAddress),""!==e.moduleName&&t.uint32(26).string(e.moduleName),""!==e.functionName&&t.uint32(34).string(e.functionName),e.typeArgs))t.uint32(42).string(r);for(let r of e.args)t.uint32(50).bytes(r);return t},decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.sender=r.string();break;case 2:i.moduleAddress=r.string();break;case 3:i.moduleName=r.string();break;case 4:i.functionName=r.string();break;case 5:i.typeArgs.push(r.string());break;case 6:i.args.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:(0,n.vM)(e.sender)?String(e.sender):"",moduleAddress:(0,n.vM)(e.moduleAddress)?String(e.moduleAddress):"",moduleName:(0,n.vM)(e.moduleName)?String(e.moduleName):"",functionName:(0,n.vM)(e.functionName)?String(e.functionName):"",typeArgs:Array.isArray(e?.typeArgs)?e.typeArgs.map(e=>String(e)):[],args:Array.isArray(e?.args)?e.args.map(e=>(0,n.DM)(e)):[]}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.moduleAddress&&(t.moduleAddress=e.moduleAddress),void 0!==e.moduleName&&(t.moduleName=e.moduleName),void 0!==e.functionName&&(t.functionName=e.functionName),e.typeArgs?t.typeArgs=e.typeArgs.map(e=>e):t.typeArgs=[],e.args?t.args=e.args.map(e=>(0,n.rT)(void 0!==e?e:new Uint8Array)):t.args=[],t},fromPartial(e){let t=l();return t.sender=e.sender??"",t.moduleAddress=e.moduleAddress??"",t.moduleName=e.moduleName??"",t.functionName=e.functionName??"",t.typeArgs=e.typeArgs?.map(e=>e)||[],t.args=e.args?.map(e=>e)||[],t},fromAmino(e){let t=l();return void 0!==e.sender&&null!==e.sender&&(t.sender=e.sender),void 0!==e.module_address&&null!==e.module_address&&(t.moduleAddress=e.module_address),void 0!==e.module_name&&null!==e.module_name&&(t.moduleName=e.module_name),void 0!==e.function_name&&null!==e.function_name&&(t.functionName=e.function_name),t.typeArgs=e.type_args?.map(e=>e)||[],t.args=e.args?.map(e=>(0,n.DM)(e))||[],t},toAmino(e){let t={};return t.sender=""===e.sender?void 0:e.sender,t.module_address=""===e.moduleAddress?void 0:e.moduleAddress,t.module_name=""===e.moduleName?void 0:e.moduleName,t.function_name=""===e.functionName?void 0:e.functionName,e.typeArgs?t.type_args=e.typeArgs.map(e=>e):t.type_args=e.typeArgs,e.args?t.args=e.args.map(e=>(0,n.rT)(e)):t.args=e.args,t},fromAminoMsg:e=>d.fromAmino(e.value),fromProtoMsg:e=>d.decode(e.value),toProto:e=>d.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/initia.move.v1.MsgExecute",value:d.encode(e).finish()})};function f(){return{from:"",newOwner:""}}var m={typeUrl:"/circle.cctp.v1.MsgUpdateOwner",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.newOwner&&t.uint32(18).string(e.newOwner),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.newOwner=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",newOwner:(0,n.vM)(e.newOwner)?String(e.newOwner):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.newOwner&&(t.newOwner=e.newOwner),t},fromPartial(e){let t=f();return t.from=e.from??"",t.newOwner=e.newOwner??"",t},fromAmino(e){let t=f();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.new_owner&&null!==e.new_owner&&(t.newOwner=e.new_owner),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.new_owner=""===e.newOwner?void 0:e.newOwner,t},fromAminoMsg:e=>m.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdateOwner",value:m.toAmino(e)}),fromProtoMsg:e=>m.decode(e.value),toProto:e=>m.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdateOwner",value:m.encode(e).finish()})};function p(){return{from:"",newAttesterManager:""}}var h={typeUrl:"/circle.cctp.v1.MsgUpdateAttesterManager",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.newAttesterManager&&t.uint32(18).string(e.newAttesterManager),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.newAttesterManager=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",newAttesterManager:(0,n.vM)(e.newAttesterManager)?String(e.newAttesterManager):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.newAttesterManager&&(t.newAttesterManager=e.newAttesterManager),t},fromPartial(e){let t=p();return t.from=e.from??"",t.newAttesterManager=e.newAttesterManager??"",t},fromAmino(e){let t=p();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.new_attester_manager&&null!==e.new_attester_manager&&(t.newAttesterManager=e.new_attester_manager),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.new_attester_manager=""===e.newAttesterManager?void 0:e.newAttesterManager,t},fromAminoMsg:e=>h.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdateAttesterManager",value:h.toAmino(e)}),fromProtoMsg:e=>h.decode(e.value),toProto:e=>h.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdateAttesterManager",value:h.encode(e).finish()})};function g(){return{from:"",newTokenController:""}}var y={typeUrl:"/circle.cctp.v1.MsgUpdateTokenController",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.newTokenController&&t.uint32(18).string(e.newTokenController),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.newTokenController=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",newTokenController:(0,n.vM)(e.newTokenController)?String(e.newTokenController):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.newTokenController&&(t.newTokenController=e.newTokenController),t},fromPartial(e){let t=g();return t.from=e.from??"",t.newTokenController=e.newTokenController??"",t},fromAmino(e){let t=g();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.new_token_controller&&null!==e.new_token_controller&&(t.newTokenController=e.new_token_controller),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.new_token_controller=""===e.newTokenController?void 0:e.newTokenController,t},fromAminoMsg:e=>y.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdateTokenController",value:y.toAmino(e)}),fromProtoMsg:e=>y.decode(e.value),toProto:e=>y.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdateTokenController",value:y.encode(e).finish()})};function b(){return{from:"",newPauser:""}}var v={typeUrl:"/circle.cctp.v1.MsgUpdatePauser",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.newPauser&&t.uint32(18).string(e.newPauser),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.newPauser=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",newPauser:(0,n.vM)(e.newPauser)?String(e.newPauser):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.newPauser&&(t.newPauser=e.newPauser),t},fromPartial(e){let t=b();return t.from=e.from??"",t.newPauser=e.newPauser??"",t},fromAmino(e){let t=b();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.new_pauser&&null!==e.new_pauser&&(t.newPauser=e.new_pauser),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.new_pauser=""===e.newPauser?void 0:e.newPauser,t},fromAminoMsg:e=>v.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdatePauser",value:v.toAmino(e)}),fromProtoMsg:e=>v.decode(e.value),toProto:e=>v.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdatePauser",value:v.encode(e).finish()})};function w(){return{from:""}}var A={typeUrl:"/circle.cctp.v1.MsgAcceptOwner",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.from=r.string():r.skipType(7&e)}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),t},fromPartial(e){let t=w();return t.from=e.from??"",t},fromAmino(e){let t=w();return void 0!==e.from&&null!==e.from&&(t.from=e.from),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t},fromAminoMsg:e=>A.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/AcceptOwner",value:A.toAmino(e)}),fromProtoMsg:e=>A.decode(e.value),toProto:e=>A.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgAcceptOwner",value:A.encode(e).finish()})};function x(){return{from:"",attester:""}}var P={typeUrl:"/circle.cctp.v1.MsgEnableAttester",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.attester&&t.uint32(18).string(e.attester),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.attester=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",attester:(0,n.vM)(e.attester)?String(e.attester):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.attester&&(t.attester=e.attester),t},fromPartial(e){let t=x();return t.from=e.from??"",t.attester=e.attester??"",t},fromAmino(e){let t=x();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.attester&&null!==e.attester&&(t.attester=e.attester),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.attester=""===e.attester?void 0:e.attester,t},fromAminoMsg:e=>P.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/EnableAttester",value:P.toAmino(e)}),fromProtoMsg:e=>P.decode(e.value),toProto:e=>P.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgEnableAttester",value:P.encode(e).finish()})};function M(){return{from:"",attester:""}}var T={typeUrl:"/circle.cctp.v1.MsgDisableAttester",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.attester&&t.uint32(18).string(e.attester),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.attester=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",attester:(0,n.vM)(e.attester)?String(e.attester):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.attester&&(t.attester=e.attester),t},fromPartial(e){let t=M();return t.from=e.from??"",t.attester=e.attester??"",t},fromAmino(e){let t=M();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.attester&&null!==e.attester&&(t.attester=e.attester),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.attester=""===e.attester?void 0:e.attester,t},fromAminoMsg:e=>T.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/DisableAttester",value:T.toAmino(e)}),fromProtoMsg:e=>T.decode(e.value),toProto:e=>T.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgDisableAttester",value:T.encode(e).finish()})};function E(){return{from:""}}var k={typeUrl:"/circle.cctp.v1.MsgPauseBurningAndMinting",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.from=r.string():r.skipType(7&e)}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),t},fromPartial(
9e){let t=E();return t.from=e.from??"",t},fromAmino(e){let t=E();return void 0!==e.from&&null!==e.from&&(t.from=e.from),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t},fromAminoMsg:e=>k.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/PauseBurningAndMinting",value:k.toAmino(e)}),fromProtoMsg:e=>k.decode(e.value),toProto:e=>k.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgPauseBurningAndMinting",value:k.encode(e).finish()})};function S(){return{from:""}}var _={typeUrl:"/circle.cctp.v1.MsgUnpauseBurningAndMinting",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.from=r.string():r.skipType(7&e)}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),t},fromPartial(e){let t=S();return t.from=e.from??"",t},fromAmino(e){let t=S();return void 0!==e.from&&null!==e.from&&(t.from=e.from),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t},fromAminoMsg:e=>_.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UnpauseBurningAndMinting",value:_.toAmino(e)}),fromProtoMsg:e=>_.decode(e.value),toProto:e=>_.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUnpauseBurningAndMinting",value:_.encode(e).finish()})};function I(){return{from:""}}var B={typeUrl:"/circle.cctp.v1.MsgPauseSendingAndReceivingMessages",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.from=r.string():r.skipType(7&e)}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),t},fromPartial(e){let t=I();return t.from=e.from??"",t},fromAmino(e){let t=I();return void 0!==e.from&&null!==e.from&&(t.from=e.from),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t},fromAminoMsg:e=>B.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/PauseSendingAndReceivingMessages",value:B.toAmino(e)}),fromProtoMsg:e=>B.decode(e.value),toProto:e=>B.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgPauseSendingAndReceivingMessages",value:B.encode(e).finish()})};function C(){return{from:""}}var R={typeUrl:"/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.from=r.string():r.skipType(7&e)}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),t},fromPartial(e){let t=C();return t.from=e.from??"",t},fromAmino(e){let t=C();return void 0!==e.from&&null!==e.from&&(t.from=e.from),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t},fromAminoMsg:e=>R.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UnpauseSendingAndReceivingMessages",value:R.toAmino(e)}),fromProtoMsg:e=>R.decode(e.value),toProto:e=>R.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages",value:R.encode(e).finish()})};function O(){return{from:"",messageSize:i.UZERO}}var U={typeUrl:"/circle.cctp.v1.MsgUpdateMaxMessageBodySize",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),e.messageSize.isZero()||t.uint32(16).uint64(e.messageSize),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.messageSize=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",messageSize:(0,n.vM)(e.messageSize)?i.fromValue(e.messageSize):i.UZERO}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.messageSize&&(t.messageSize=(e.messageSize||i.UZERO).toString()),t},fromPartial(e){let t=O();return t.from=e.from??"",t.messageSize=void 0!==e.messageSize&&null!==e.messageSize?i.fromValue(e.messageSize):i.UZERO,t}
9,fromAmino(e){let t=O();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.message_size&&null!==e.message_size&&(t.messageSize=i.fromString(e.message_size)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.message_size=e.messageSize.isZero()?void 0:e.messageSize?.toString(),t},fromAminoMsg:e=>U.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdateMaxMessageBodySize",value:U.toAmino(e)}),fromProtoMsg:e=>U.decode(e.value),toProto:e=>U.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdateMaxMessageBodySize",value:U.encode(e).finish()})};function D(){return{from:"",localToken:"",amount:""}}var N={typeUrl:"/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.localToken&&t.uint32(18).string(e.localToken),""!==e.amount&&t.uint32(26).string(e.amount),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.localToken=r.string();break;case 3:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",localToken:(0,n.vM)(e.localToken)?String(e.localToken):"",amount:(0,n.vM)(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.localToken&&(t.localToken=e.localToken),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){let t=D();return t.from=e.from??"",t.localToken=e.localToken??"",t.amount=e.amount??"",t},fromAmino(e){let t=D();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.local_token&&null!==e.local_token&&(t.localToken=e.local_token),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.local_token=""===e.localToken?void 0:e.localToken,t.amount=""===e.amount?void 0:e.amount,t},fromAminoMsg:e=>N.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/SetMaxBurnAmountPerMessage",value:N.toAmino(e)}),fromProtoMsg:e=>N.decode(e.value),toProto:e=>N.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage",value:N.encode(e).finish()})};function $(){return{from:"",amount:"",destinationDomain:0,mintRecipient:new Uint8Array,burnToken:""}}var F={typeUrl:"/circle.cctp.v1.MsgDepositForBurn",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.amount&&t.uint32(18).string(e.amount),0!==e.destinationDomain&&t.uint32(24).uint32(e.destinationDomain),0!==e.mintRecipient.length&&t.uint32(34).bytes(e.mintRecipient),""!==e.burnToken&&t.uint32(42).string(e.burnToken),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=$();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.amount=r.string();break;case 3:i.destinationDomain=r.uint32();break;case 4:i.mintRecipient=r.bytes();break;case 5:i.burnToken=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",amount:(0,n.vM)(e.amount)?String(e.amount):"",destinationDomain:(0,n.vM)(e.destinationDomain)?Number(e.destinationDomain):0,mintRecipient:(0,n.vM)(e.mintRecipient)?(0,n.DM)(e.mintRecipient):new Uint8Array,burnToken:(0,n.vM)(e.burnToken)?String(e.burnToken):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.destinationDomain&&(t.destinationDomain=Math.round(e.destinationDomain)),void 0!==e.mintRecipient&&(t.mintRecipient=(0,n.rT)(void 0!==e.mintRecipient?e.mintRecipient:new Uint8Array)),void 0!==e.burnToken&&(t.burnToken=e.burnToken),t},fromPartial(e){let t=$();return t.from=e.from??"",t.amount=e.amount??"",t.destinationDomain=e.destinationDomain??0,t.mintRecipient=e.mintRecipient??new Uint8Array,t.burnToken=e.burnToken??"",t},fromAmino(e){let t=$();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),void 0!==e.destination_domain&&null!==e.destination_domain&&(t.destinationDomain=e.destination_domain),void 0!==e.mint_recipient&&null!==e.mint_recipient&&(t.mintRecipient=(0,n.DM)(e.mint_recipient)),void 0!==e.burn_token&&null!==e.burn_token&&(t.burnToken=e.burn_token),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.amount=""===e.amount?void 0:e.amount,t.destination_domain=0===e.destinationDomain?void 0:e.destinationDomain,t.mint_recipient=e.mintRecipient?(0,n.rT)(e.mintRecipient):void 0,t.burn_token=""===e.burnToken?void 0:e.burnToken,t},fromAminoMsg:e=>F.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/DepositForBurn",value:F.toAmino(e)}),fromProtoMsg:e=>F.decode(e.value),toProto:e=>F.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgDepositForBurn",value:F.encode(e).finish()})};function j(){return{from:"",amount:"",destinationDomain:0,mintRecipient:new Uint8Array,burnToken:"",destinationCaller:new
9Uint8Array}}var z={typeUrl:"/circle.cctp.v1.MsgDepositForBurnWithCaller",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.amount&&t.uint32(18).string(e.amount),0!==e.destinationDomain&&t.uint32(24).uint32(e.destinationDomain),0!==e.mintRecipient.length&&t.uint32(34).bytes(e.mintRecipient),""!==e.burnToken&&t.uint32(42).string(e.burnToken),0!==e.destinationCaller.length&&t.uint32(50).bytes(e.destinationCaller),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=j();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.amount=r.string();break;case 3:i.destinationDomain=r.uint32();break;case 4:i.mintRecipient=r.bytes();break;case 5:i.burnToken=r.string();break;case 6:i.destinationCaller=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",amount:(0,n.vM)(e.amount)?String(e.amount):"",destinationDomain:(0,n.vM)(e.destinationDomain)?Number(e.destinationDomain):0,mintRecipient:(0,n.vM)(e.mintRecipient)?(0,n.DM)(e.mintRecipient):new Uint8Array,burnToken:(0,n.vM)(e.burnToken)?String(e.burnToken):"",destinationCaller:(0,n.vM)(e.destinationCaller)?(0,n.DM)(e.destinationCaller):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.destinationDomain&&(t.destinationDomain=Math.round(e.destinationDomain)),void 0!==e.mintRecipient&&(t.mintRecipient=(0,n.rT)(void 0!==e.mintRecipient?e.mintRecipient:new Uint8Array)),void 0!==e.burnToken&&(t.burnToken=e.burnToken),void 0!==e.destinationCaller&&(t.destinationCaller=(0,n.rT)(void 0!==e.destinationCaller?e.destinationCaller:new Uint8Array)),t},fromPartial(e){let t=j();return t.from=e.from??"",t.amount=e.amount??"",t.destinationDomain=e.destinationDomain??0,t.mintRecipient=e.mintRecipient??new Uint8Array,t.burnToken=e.burnToken??"",t.destinationCaller=e.destinationCaller??new Uint8Array,t},fromAmino(e){let t=j();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),void 0!==e.destination_domain&&null!==e.destination_domain&&(t.destinationDomain=e.destination_domain),void 0!==e.mint_recipient&&null!==e.mint_recipient&&(t.mintRecipient=(0,n.DM)(e.mint_recipient)),void 0!==e.burn_token&&null!==e.burn_token&&(t.burnToken=e.burn_token),void 0!==e.destination_caller&&null!==e.destination_caller&&(t.destinationCaller=(0,n.DM)(e.destination_caller)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.amount=""===e.amount?void 0:e.amount,t.destination_domain=0===e.destinationDomain?void 0:e.destinationDomain,t.mint_recipient=e.mintRecipient?(0,n.rT)(e.mintRecipient):void 0,t.burn_token=""===e.burnToken?void 0:e.burnToken,t.destination_caller=e.destinationCaller?(0,n.rT)(e.destinationCaller):void 0,t},fromAminoMsg:e=>z.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/DepositForBurnWithCaller",value:z.toAmino(e)}),fromProtoMsg:e=>z.decode(e.value),toProto:e=>z.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgDepositForBurnWithCaller",value:z.encode(e).finish()})};function L(){return{from:"",originalMessage:new Uint8Array,originalAttestation:new Uint8Array,newDestinationCaller:new Uint8Array,newMintRecipient:new Uint8Array}}var q={typeUrl:"/circle.cctp.v1.MsgReplaceDepositForBurn",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.originalMessage.length&&t.uint32(18).bytes(e.originalMessage),0!==e.originalAttestation.length&&t.uint32(26).bytes(e.originalAttestation),0!==e.newDestinationCaller.length&&t.uint32(34).bytes(e.newDestinationCaller),0!==e.newMintRecipient.length&&t.uint32(42).bytes(e.newMintRecipient),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=L();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.originalMessage=r.bytes();break;case 3:i.originalAttestation=r.bytes();break;case 4:i.newDestinationCaller=r.bytes();break;case 5:i.newMintRecipient=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",originalMessage:(0,n.vM)(e.originalMessage)?(0,n.DM)(e.originalMessage):new Uint8Array,originalAttestation:(0,n.vM)(e.originalAttestation)?(0,n.DM)(e.originalAttestation):new Uint8Array,newDestinationCaller:(0,n.vM)(e.newDestinationCaller)?(0,n.DM)(e.newDestinationCaller):new Uint8Array,newMintRecipient:(0,n.vM)(e.newMintRecipient)?(0,n.DM)(e.newMintRecipient):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.originalMessage&&(t.originalMessage=(0,n.rT)(void 0!==e.originalMessage?e.originalMessage:new Uint8Array)),void 0!==e.originalAttestation&&(t.originalAttestation=(0,n.rT)(void 0!==e.originalAttestation?e.originalAttestation:new Uint8Array)),void 0!==e.newDestinationCaller&&(t.newDestinationCaller=(0,n.rT)(void 0!==e.newDestinationCaller?e.newDestinationCaller:new
9Uint8Array)),void 0!==e.newMintRecipient&&(t.newMintRecipient=(0,n.rT)(void 0!==e.newMintRecipient?e.newMintRecipient:new Uint8Array)),t},fromPartial(e){let t=L();return t.from=e.from??"",t.originalMessage=e.originalMessage??new Uint8Array,t.originalAttestation=e.originalAttestation??new Uint8Array,t.newDestinationCaller=e.newDestinationCaller??new Uint8Array,t.newMintRecipient=e.newMintRecipient??new Uint8Array,t},fromAmino(e){let t=L();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.original_message&&null!==e.original_message&&(t.originalMessage=(0,n.DM)(e.original_message)),void 0!==e.original_attestation&&null!==e.original_attestation&&(t.originalAttestation=(0,n.DM)(e.original_attestation)),void 0!==e.new_destination_caller&&null!==e.new_destination_caller&&(t.newDestinationCaller=(0,n.DM)(e.new_destination_caller)),void 0!==e.new_mint_recipient&&null!==e.new_mint_recipient&&(t.newMintRecipient=(0,n.DM)(e.new_mint_recipient)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.original_message=e.originalMessage?(0,n.rT)(e.originalMessage):void 0,t.original_attestation=e.originalAttestation?(0,n.rT)(e.originalAttestation):void 0,t.new_destination_caller=e.newDestinationCaller?(0,n.rT)(e.newDestinationCaller):void 0,t.new_mint_recipient=e.newMintRecipient?(0,n.rT)(e.newMintRecipient):void 0,t},fromAminoMsg:e=>q.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/ReplaceDepositForBurn",value:q.toAmino(e)}),fromProtoMsg:e=>q.decode(e.value),toProto:e=>q.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgReplaceDepositForBurn",value:q.encode(e).finish()})};function V(){return{from:"",message:new Uint8Array,attestation:new Uint8Array}}var H={typeUrl:"/circle.cctp.v1.MsgReceiveMessage",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.message.length&&t.uint32(18).bytes(e.message),0!==e.attestation.length&&t.uint32(26).bytes(e.attestation),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=V();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.message=r.bytes();break;case 3:i.attestation=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",message:(0,n.vM)(e.message)?(0,n.DM)(e.message):new Uint8Array,attestation:(0,n.vM)(e.attestation)?(0,n.DM)(e.attestation):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.message&&(t.message=(0,n.rT)(void 0!==e.message?e.message:new Uint8Array)),void 0!==e.attestation&&(t.attestation=(0,n.rT)(void 0!==e.attestation?e.attestation:new Uint8Array)),t},fromPartial(e){let t=V();return t.from=e.from??"",t.message=e.message??new Uint8Array,t.attestation=e.attestation??new Uint8Array,t},fromAmino(e){let t=V();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.message&&null!==e.message&&(t.message=(0,n.DM)(e.message)),void 0!==e.attestation&&null!==e.attestation&&(t.attestation=(0,n.DM)(e.attestation)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.message=e.message?(0,n.rT)(e.message):void 0,t.attestation=e.attestation?(0,n.rT)(e.attestation):void 0,t},fromAminoMsg:e=>H.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/ReceiveMessage",value:H.toAmino(e)}),fromProtoMsg:e=>H.decode(e.value),toProto:e=>H.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgReceiveMessage",value:H.encode(e).finish()})};function G(){return{from:"",destinationDomain:0,recipient:new Uint8Array,messageBody:new Uint8Array}}var W={typeUrl:"/circle.cctp.v1.MsgSendMessage",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.destinationDomain&&t.uint32(16).uint32(e.destinationDomain),0!==e.recipient.length&&t.uint32(26).bytes(e.recipient),0!==e.messageBody.length&&t.uint32(34).bytes(e.messageBody),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=G();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.destinationDomain=r.uint32();break;case 3:i.recipient=r.bytes();break;case 4:i.messageBody=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",destinationDomain:(0,n.vM)(e.destinationDomain)?Number(e.destinationDomain):0,recipient:(0,n.vM)(e.recipient)?(0,n.DM)(e.recipient):new Uint8Array,messageBody:(0,n.vM)(e.messageBody)?(0,n.DM)(e.messageBody):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.destinationDomain&&(t.destinationDomain=Math.round(e.destinationDomain)),void 0!==e.recipient&&(t.re
9cipient=(0,n.rT)(void 0!==e.recipient?e.recipient:new Uint8Array)),void 0!==e.messageBody&&(t.messageBody=(0,n.rT)(void 0!==e.messageBody?e.messageBody:new Uint8Array)),t},fromPartial(e){let t=G();return t.from=e.from??"",t.destinationDomain=e.destinationDomain??0,t.recipient=e.recipient??new Uint8Array,t.messageBody=e.messageBody??new Uint8Array,t},fromAmino(e){let t=G();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.destination_domain&&null!==e.destination_domain&&(t.destinationDomain=e.destination_domain),void 0!==e.recipient&&null!==e.recipient&&(t.recipient=(0,n.DM)(e.recipient)),void 0!==e.message_body&&null!==e.message_body&&(t.messageBody=(0,n.DM)(e.message_body)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.destination_domain=0===e.destinationDomain?void 0:e.destinationDomain,t.recipient=e.recipient?(0,n.rT)(e.recipient):void 0,t.message_body=e.messageBody?(0,n.rT)(e.messageBody):void 0,t},fromAminoMsg:e=>W.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/SendMessage",value:W.toAmino(e)}),fromProtoMsg:e=>W.decode(e.value),toProto:e=>W.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgSendMessage",value:W.encode(e).finish()})};function J(){return{from:"",destinationDomain:0,recipient:new Uint8Array,messageBody:new Uint8Array,destinationCaller:new Uint8Array}}var Z={typeUrl:"/circle.cctp.v1.MsgSendMessageWithCaller",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.destinationDomain&&t.uint32(16).uint32(e.destinationDomain),0!==e.recipient.length&&t.uint32(26).bytes(e.recipient),0!==e.messageBody.length&&t.uint32(34).bytes(e.messageBody),0!==e.destinationCaller.length&&t.uint32(42).bytes(e.destinationCaller),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=J();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.destinationDomain=r.uint32();break;case 3:i.recipient=r.bytes();break;case 4:i.messageBody=r.bytes();break;case 5:i.destinationCaller=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",destinationDomain:(0,n.vM)(e.destinationDomain)?Number(e.destinationDomain):0,recipient:(0,n.vM)(e.recipient)?(0,n.DM)(e.recipient):new Uint8Array,messageBody:(0,n.vM)(e.messageBody)?(0,n.DM)(e.messageBody):new Uint8Array,destinationCaller:(0,n.vM)(e.destinationCaller)?(0,n.DM)(e.destinationCaller):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.destinationDomain&&(t.destinationDomain=Math.round(e.destinationDomain)),void 0!==e.recipient&&(t.recipient=(0,n.rT)(void 0!==e.recipient?e.recipient:new Uint8Array)),void 0!==e.messageBody&&(t.messageBody=(0,n.rT)(void 0!==e.messageBody?e.messageBody:new Uint8Array)),void 0!==e.destinationCaller&&(t.destinationCaller=(0,n.rT)(void 0!==e.destinationCaller?e.destinationCaller:new Uint8Array)),t},fromPartial(e){let t=J();return t.from=e.from??"",t.destinationDomain=e.destinationDomain??0,t.recipient=e.recipient??new Uint8Array,t.messageBody=e.messageBody??new Uint8Array,t.destinationCaller=e.destinationCaller??new Uint8Array,t},fromAmino(e){let t=J();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.destination_domain&&null!==e.destination_domain&&(t.destinationDomain=e.destination_domain),void 0!==e.recipient&&null!==e.recipient&&(t.recipient=(0,n.DM)(e.recipient)),void 0!==e.message_body&&null!==e.message_body&&(t.messageBody=(0,n.DM)(e.message_body)),void 0!==e.destination_caller&&null!==e.destination_caller&&(t.destinationCaller=(0,n.DM)(e.destination_caller)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.destination_domain=0===e.destinationDomain?void 0:e.destinationDomain,t.recipient=e.recipient?(0,n.rT)(e.recipient):void 0,t.message_body=e.messageBody?(0,n.rT)(e.messageBody):void 0,t.destination_caller=e.destinationCaller?(0,n.rT)(e.destinationCaller):void 0,t},fromAminoMsg:e=>Z.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/SendMessageWithCaller",value:Z.toAmino(e)}),fromProtoMsg:e=>Z.decode(e.value),toProto:e=>Z.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgSendMessageWithCaller",value:Z.encode(e).finish()})};function K(){return{from:"",originalMessage:new Uint8Array,originalAttestation:new Uint8Array,newMessageBody:new Uint8Array,newDestinationCaller:new
9Uint8Array}}var Y={typeUrl:"/circle.cctp.v1.MsgReplaceMessage",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.originalMessage.length&&t.uint32(18).bytes(e.originalMessage),0!==e.originalAttestation.length&&t.uint32(26).bytes(e.originalAttestation),0!==e.newMessageBody.length&&t.uint32(34).bytes(e.newMessageBody),0!==e.newDestinationCaller.length&&t.uint32(42).bytes(e.newDestinationCaller),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=K();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.originalMessage=r.bytes();break;case 3:i.originalAttestation=r.bytes();break;case 4:i.newMessageBody=r.bytes();break;case 5:i.newDestinationCaller=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",originalMessage:(0,n.vM)(e.originalMessage)?(0,n.DM)(e.originalMessage):new Uint8Array,originalAttestation:(0,n.vM)(e.originalAttestation)?(0,n.DM)(e.originalAttestation):new Uint8Array,newMessageBody:(0,n.vM)(e.newMessageBody)?(0,n.DM)(e.newMessageBody):new Uint8Array,newDestinationCaller:(0,n.vM)(e.newDestinationCaller)?(0,n.DM)(e.newDestinationCaller):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.originalMessage&&(t.originalMessage=(0,n.rT)(void 0!==e.originalMessage?e.originalMessage:new Uint8Array)),void 0!==e.originalAttestation&&(t.originalAttestation=(0,n.rT)(void 0!==e.originalAttestation?e.originalAttestation:new Uint8Array)),void 0!==e.newMessageBody&&(t.newMessageBody=(0,n.rT)(void 0!==e.newMessageBody?e.newMessageBody:new Uint8Array)),void 0!==e.newDestinationCaller&&(t.newDestinationCaller=(0,n.rT)(void 0!==e.newDestinationCaller?e.newDestinationCaller:new Uint8Array)),t},fromPartial(e){let t=K();return t.from=e.from??"",t.originalMessage=e.originalMessage??new Uint8Array,t.originalAttestation=e.originalAttestation??new Uint8Array,t.newMessageBody=e.newMessageBody??new Uint8Array,t.newDestinationCaller=e.newDestinationCaller??new Uint8Array,t},fromAmino(e){let t=K();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.original_message&&null!==e.original_message&&(t.originalMessage=(0,n.DM)(e.original_message)),void 0!==e.original_attestation&&null!==e.original_attestation&&(t.originalAttestation=(0,n.DM)(e.original_attestation)),void 0!==e.new_message_body&&null!==e.new_message_body&&(t.newMessageBody=(0,n.DM)(e.new_message_body)),void 0!==e.new_destination_caller&&null!==e.new_destination_caller&&(t.newDestinationCaller=(0,n.DM)(e.new_destination_caller)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.original_message=e.originalMessage?(0,n.rT)(e.originalMessage):void 0,t.original_attestation=e.originalAttestation?(0,n.rT)(e.originalAttestation):void 0,t.new_message_body=e.newMessageBody?(0,n.rT)(e.newMessageBody):void 0,t.new_destination_caller=e.newDestinationCaller?(0,n.rT)(e.newDestinationCaller):void 0,t},fromAminoMsg:e=>Y.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/ReplaceMessage",value:Y.toAmino(e)}),fromProtoMsg:e=>Y.decode(e.value),toProto:e=>Y.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgReplaceMessage",value:Y.encode(e).finish()})};function X(){return{from:"",amount:0}}var Q={typeUrl:"/circle.cctp.v1.MsgUpdateSignatureThreshold",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.amount&&t.uint32(16).uint32(e.amount),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=X();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.amount=r.uint32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",amount:(0,n.vM)(e.amount)?Number(e.amount):0}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.amount&&(t.amount=Math.round(e.amount)),t},fromPartial(e){let t=X();return t.from=e.from??"",t.amount=e.amount??0,t},fromAmino(e){let t=X();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.amount=0===e.amount?void 0:e.amount,t},fromAminoMsg:e=>Q.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UpdateSignatureThreshold",value:Q.toAmino(e)}),fromProtoMsg:e=>Q.decode(e.value),toProto:e=>Q.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUpdateSignatureThreshold",value:Q.encode(e).finish()})};function ee(){return{from:"",remoteDomain:0,remoteToken:new Uint8Array,localToken:""}}var et={typeUrl:"/circle.cctp.v1.MsgLinkTokenPair",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.remoteDomain&&t.uint32(16).uint32(e.remoteDomain),0!==e.remoteToken.length&&t.uint32(26).bytes(e.remoteToken),""!==e.localToken&&t.uint32(34).string(e.localToken),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=ee();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.remoteDomain=r.uint32();break;case 3:i.remoteToken=r.bytes();break;case 4:i.localToken=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",remoteDomain:(0,n.vM)(e.remoteDomain)?Number(e.remoteDomain):0,remoteToken:(0,n.vM)(e.remoteToken)?(0,n.DM)(e.remoteToken):new Uint8Array,localToken:(0,n.vM)(e.localToken)?String(e.localToken):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.remoteDomain&&(t.remoteDomain=Math.round(e.remoteDomain)),void 0!==e.remoteToken&&
9(t.remoteToken=(0,n.rT)(void 0!==e.remoteToken?e.remoteToken:new Uint8Array)),void 0!==e.localToken&&(t.localToken=e.localToken),t},fromPartial(e){let t=ee();return t.from=e.from??"",t.remoteDomain=e.remoteDomain??0,t.remoteToken=e.remoteToken??new Uint8Array,t.localToken=e.localToken??"",t},fromAmino(e){let t=ee();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.remote_domain&&null!==e.remote_domain&&(t.remoteDomain=e.remote_domain),void 0!==e.remote_token&&null!==e.remote_token&&(t.remoteToken=(0,n.DM)(e.remote_token)),void 0!==e.local_token&&null!==e.local_token&&(t.localToken=e.local_token),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.remote_domain=0===e.remoteDomain?void 0:e.remoteDomain,t.remote_token=e.remoteToken?(0,n.rT)(e.remoteToken):void 0,t.local_token=""===e.localToken?void 0:e.localToken,t},fromAminoMsg:e=>et.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/LinkTokenPair",value:et.toAmino(e)}),fromProtoMsg:e=>et.decode(e.value),toProto:e=>et.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgLinkTokenPair",value:et.encode(e).finish()})};function er(){return{from:"",remoteDomain:0,remoteToken:new Uint8Array,localToken:""}}var en={typeUrl:"/circle.cctp.v1.MsgUnlinkTokenPair",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.remoteDomain&&t.uint32(16).uint32(e.remoteDomain),0!==e.remoteToken.length&&t.uint32(26).bytes(e.remoteToken),""!==e.localToken&&t.uint32(34).string(e.localToken),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=er();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.remoteDomain=r.uint32();break;case 3:i.remoteToken=r.bytes();break;case 4:i.localToken=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",remoteDomain:(0,n.vM)(e.remoteDomain)?Number(e.remoteDomain):0,remoteToken:(0,n.vM)(e.remoteToken)?(0,n.DM)(e.remoteToken):new Uint8Array,localToken:(0,n.vM)(e.localToken)?String(e.localToken):""}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.remoteDomain&&(t.remoteDomain=Math.round(e.remoteDomain)),void 0!==e.remoteToken&&(t.remoteToken=(0,n.rT)(void 0!==e.remoteToken?e.remoteToken:new Uint8Array)),void 0!==e.localToken&&(t.localToken=e.localToken),t},fromPartial(e){let t=er();return t.from=e.from??"",t.remoteDomain=e.remoteDomain??0,t.remoteToken=e.remoteToken??new Uint8Array,t.localToken=e.localToken??"",t},fromAmino(e){let t=er();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.remote_domain&&null!==e.remote_domain&&(t.remoteDomain=e.remote_domain),void 0!==e.remote_token&&null!==e.remote_token&&(t.remoteToken=(0,n.DM)(e.remote_token)),void 0!==e.local_token&&null!==e.local_token&&(t.localToken=e.local_token),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.remote_domain=0===e.remoteDomain?void 0:e.remoteDomain,t.remote_token=e.remoteToken?(0,n.rT)(e.remoteToken):void 0,t.local_token=""===e.localToken?void 0:e.localToken,t},fromAminoMsg:e=>en.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/UnlinkTokenPair",value:en.toAmino(e)}),fromProtoMsg:e=>en.decode(e.value),toProto:e=>en.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgUnlinkTokenPair",value:en.encode(e).finish()})};function ei(){return{from:"",domainId:0,address:new Uint8Array}}var eo={typeUrl:"/circle.cctp.v1.MsgAddRemoteTokenMessenger",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.domainId&&t.uint32(16).uint32(e.domainId),0!==e.address.length&&t.uint32(26).bytes(e.address),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=ei();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.domainId=r.uint32();break;case 3:i.address=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",domainId:(0,n.vM)(e.domainId)?Number(e.domainId):0,address:(0,n.vM)(e.address)?(0,n.DM)(e.address):new Uint8Array}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.domainId&&(t.domainId=Math.round(e.domainId)),void 0!==e.address&&(t.address=(0,n.rT)(void 0!==e.address?e.address:new Uint8Array)),t},fromPartial(e){let t=ei();return t.from=e.from??"",t.domainId=e.domainId??0,t.address=e.address??new Uint8Array,t},fromAmino(e){let t=ei();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.domain_id&&null!==e.domain_id&&(t.domainId=e.domain_id),void 0!==e.address&&null!==e.address&&(t.address=(0,n.DM)(e.address)),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.domain_id=0===e.domainId?void 0:e.domainId,t.address=e.address?(0,n.rT)(e.address):void 0,t},fromAminoMsg:e=>eo.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/AddRemoteTokenMessenger",value:eo.toAmino(e)}),fromProtoMsg:e=>eo.decode(e.value),toProto:e=>eo.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgAddRemoteTokenMessenger",value:eo.encode(e).finish()})};function es(){return{from:"",domainId:0}}var ea={typeUrl:"/circle.cctp.v1.MsgRemoveRemoteTokenMessenger",encode:(e,t=o.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),0!==e.domainId&&t.uint32(16).uint32(e.domainId),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=es();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.from=r.string();break;case 2:i.domainId=r.uint32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({from:(0,n.vM)(e.from)?String(e.from):"",domainId:(0,n.vM)(e.domainId)?Number(e.domainId):0}),toJSON(e){let t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.domainId&&(t.domainId=Math.round(e.domainId)),t},fromPartial(e){let t=es();return t.from=e.from??"",t.domainId=e.domainId??0,t},fromAmino(e){let t=es();return void 0!==e.from&&null!==e.from&&(t.from=e.from),void 0!==e.domain_id&&null!==e.domain_id&&(t.domainId=e.domain_id),t},toAmino(e){let t={};return t.from=""===e.from?void 0:e.from,t.domain_id=0===e.domainId?void 0:e.domainId,t},fromAminoMsg:e=>ea.fromAmino(e.value),toAminoMsg:e=>({type:"cctp/RemoveRemoteTokenMessenger",value:ea.toAmino(e)}),fromProtoMsg:e=>ea.decode(e.value),toProto:e=>ea.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.MsgRemoveRemoteTokenMessenger",value:ea.encode(e).finish()})};function ec(){return{baseAccount:void 0,originalVesting:[],delegatedFree:[],delegatedVesting:[],endTime:i.ZERO}}var eu={typeUrl:"/cosmos.vesting.v1beta1.BaseVestingAccount",encode(e,t=o.Writer.create()){for(let r of(void 0!==e.baseAccount&&n.$q.encode(e.baseA
9ccount,t.uint32(10).fork()).ldelim(),e.originalVesting))a.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.delegatedFree)a.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.delegatedVesting)a.encode(r,t.uint32(34).fork()).ldelim();return e.endTime.isZero()||t.uint32(40).int64(e.endTime),t},decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),i=void 0===t?r.len:r.pos+t,s=ec();for(;r.pos<i;){let e=r.uint32();switch(e>>>3){case 1:s.baseAccount=n.$q.decode(r,r.uint32());break;case 2:s.originalVesting.push(a.decode(r,r.uint32()));break;case 3:s.delegatedFree.push(a.decode(r,r.uint32()));break;case 4:s.delegatedVesting.push(a.decode(r,r.uint32()));break;case 5:s.endTime=r.int64();break;default:r.skipType(7&e)}}return s},fromJSON:e=>({baseAccount:(0,n.vM)(e.baseAccount)?n.$q.fromJSON(e.baseAccount):void 0,originalVesting:Array.isArray(e?.originalVesting)?e.originalVesting.map(e=>a.fromJSON(e)):[],delegatedFree:Array.isArray(e?.delegatedFree)?e.delegatedFree.map(e=>a.fromJSON(e)):[],delegatedVesting:Array.isArray(e?.delegatedVesting)?e.delegatedVesting.map(e=>a.fromJSON(e)):[],endTime:(0,n.vM)(e.endTime)?i.fromValue(e.endTime):i.ZERO}),toJSON(e){let t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?n.$q.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map(e=>e?a.toJSON(e):void 0):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map(e=>e?a.toJSON(e):void 0):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map(e=>e?a.toJSON(e):void 0):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||i.ZERO).toString()),t},fromPartial(e){let t=ec();return t.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?n.$q.fromPartial(e.baseAccount):void 0,t.originalVesting=e.originalVesting?.map(e=>a.fromPartial(e))||[],t.delegatedFree=e.delegatedFree?.map(e=>a.fromPartial(e))||[],t.delegatedVesting=e.delegatedVesting?.map(e=>a.fromPartial(e))||[],t.endTime=void 0!==e.endTime&&null!==e.endTime?i.fromValue(e.endTime):i.ZERO,t},fromAmino(e){let t=ec();return void 0!==e.base_account&&null!==e.base_account&&(t.baseAccount=n.$q.fromAmino(e.base_account)),t.originalVesting=e.original_vesting?.map(e=>a.fromAmino(e))||[],t.delegatedFree=e.delegated_free?.map(e=>a.fromAmino(e))||[],t.delegatedVesting=e.delegated_vesting?.map(e=>a.fromAmino(e))||[],void 0!==e.end_time&&null!==e.end_time&&(t.endTime=i.fromString(e.end_time)),t},toAmino(e){let t={};return t.base_account=e.baseAccount?n.$q.toAmino(e.baseAccount):void 0,e.originalVesting?t.original_vesting=e.originalVesting.map(e=>e?a.toAmino(e):void 0):t.original_vesting=e.originalVesting,e.delegatedFree?t.delegated_free=e.delegatedFree.map(e=>e?a.toAmino(e):void 0):t.delegated_free=e.delegatedFree,e.delegatedVesting?t.delegated_vesting=e.delegatedVesting.map(e=>e?a.toAmino(e):void 0):t.delegated_vesting=e.delegatedVesting,t.end_time=e.endTime.isZero()?void 0:e.endTime?.toString(),t},fromAminoMsg:e=>eu.fromAmino(e.value),toAminoMsg:e=>({type:"cosmos-sdk/BaseVestingAccount",value:eu.toAmino(e)}),fromProtoMsg:e=>eu.decode(e.value),toProto:e=>eu.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.vesting.v1beta1.BaseVestingAccount",value:eu.encode(e).finish()})};function el(){return{length:i.ZERO,amount:[]}}var ed={typeUrl:"/cosmos.vesting.v1beta1.Period",encode(e,t=o.Writer.create()){for(let r of(e.length.isZero()||t.uint32(8).int64(e.length),e.amount))a.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=el();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.length=r.int64();break;case 2:i.amount.push(a.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({length:(0,n.vM)(e.length)?i.fromValue(e.length):i.ZERO,amount:Array.isArray(e?.amount)?e.amount.map(e=>a.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.length&&(t.length=(e.length||i.ZERO).toString()),e.amount?t.amount=e.amount.map(e=>e?a.toJSON(e):void 0):t.amount=[],t},fromPartial(e){let t=el();
9return t.length=void 0!==e.length&&null!==e.length?i.fromValue(e.length):i.ZERO,t.amount=e.amount?.map(e=>a.fromPartial(e))||[],t},fromAmino(e){let t=el();return void 0!==e.length&&null!==e.length&&(t.length=i.fromString(e.length)),t.amount=e.amount?.map(e=>a.fromAmino(e))||[],t},toAmino(e){let t={};return t.length=e.length.isZero()?void 0:e.length?.toString(),e.amount?t.amount=e.amount.map(e=>e?a.toAmino(e):void 0):t.amount=e.amount,t},fromAminoMsg:e=>ed.fromAmino(e.value),toAminoMsg:e=>({type:"cosmos-sdk/Period",value:ed.toAmino(e)}),fromProtoMsg:e=>ed.decode(e.value),toProto:e=>ed.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/cosmos.vesting.v1beta1.Period",value:ed.encode(e).finish()})};function ef(){return{seconds:i.ZERO,nanos:0}}var em={typeUrl:"/google.protobuf.Timestamp",encode:(e,t=o.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){let r=e instanceof o.Reader?e:new o.Reader(e),n=void 0===t?r.len:r.pos+t,i=ef();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.seconds=r.int64();break;case 2:i.nanos=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({seconds:(0,n.vM)(e.seconds)?i.fromValue(e.seconds):i.ZERO,nanos:(0,n.vM)(e.nanos)?Number(e.nanos):0}),toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||i.ZERO).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){let t=ef();return t.seconds=void 0!==e.seconds&&null!==e.seconds?i.fromValue(e.seconds):i.ZERO,t.nanos=e.nanos??0,t},fromAmino:e=>(0,n.d4)(e),toAmino:e=>(0,n.z)(e).toISOString().replace(/\.\d+Z$/,"Z"),fromAminoMsg:e=>em.fromAmino(e.value),fromProtoMsg:e=>em.decode(e.value),toProto:e=>em.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/google.protobuf.Timestamp",value:em.encode(e).finish()})}},55562:(e,t,r)=>{r.d(t,{iY:()=>c});
vendor: 5,700 bytes, line 9
9var n=r(67132),i=r(73906),o=r(45667),s=r(26013),a=r(81381);function c(e){let t,{abi:r,args:c=[],name:u}=e,l=(0,i.q)(u,{strict:!1}),d=r.filter(e=>l?"function"===e.type?(0,a.V)(e)===u:"event"===e.type&&(0,s.h)(e)===u:"name"in e&&e.name===u);if(0!==d.length){if(1===d.length)return d[0];for(let e of d){if("inputs"in e){if(!c||0===c.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===c.length&&c.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return(0,o.P)(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,i)=>"object"===n&&e(Object.values(t)[i],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=function e(t,r,n){for(let i in t){let s=t[i],a=r[i];if("tuple"===s.type&&"tuple"===a.type&&"components"in s&&"components"in a)return e(s.components,a.components,n[i]);let c=[s.type,a.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,o.P)(n[i],{strict:!1}))return c}}(e.inputs,t.inputs,c);if(r)throw new n.nM({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}}return t||d[0]}}},55598:(e,t,r)=>{r.d(t,{Sl:()=>i,X:()=>s,eV:()=>a,kK:()=>o});var n=r(17298);function i(e,t){if(n.Ej(e)>t)throw new n.u({givenSize:n.Ej(e),maxSize:t})}function o(e,t){if("number"==typeof t&&t>0&&t>n.Ej(e)-1)throw new n.ii({offset:t,position:"start",size:n.Ej(e)})}function s(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.Ej(e)!==r-t)throw new n.ii({offset:r,position:"end",size:n.Ej(e)})}function a(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;let o=e.replace("0x","");if(o.length>2*i)throw new n.Fl({size:Math.ceil(o.length/2),targetSize:i,type:"Hex"});return`0x${o["right"===r?"padEnd":"padStart"](2*i,"0")}`}},56555:(e,t,r)=>{r.d(t,{Ag:()=>s,E5:()=>d,Rm:()=>u,SJ:()=>c,UW:()=>l,b2:()=>i,oX:()=>a,v2:()=>n,xw:()=>f});let n=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],o=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],s=[...o,{name:"resolveWithGateways",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"}]}],a=[...o,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],c=[{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"}]}],l=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],d=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}
9],f=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}]},57842:(e,t,r)=>{r.d(t,{Fl:()=>o,NV:()=>s,ii:()=>i});var n=r(97461);class i extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class o extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class s extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}},58344:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(16481),i=r(67132),o=r(7565),s=r(81381),a=r(19161),c=r(493);function u(e){let{abi:t,data:r}=e,u=(0,o.di)(r,0,4);if("0x"===u)throw new i.O;let l=[...t||[],n.Mc,n.J9].find(e=>"error"===e.type&&u===(0,s.V)((0,c.B)(e)));if(!l)throw new i.Wq(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,a.n)(l.inputs,(0,o.di)(r,4)):void 0,errorName:l.name}}},58458:(e,t)=>{t.p2=t.I=void 0;let r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let e=0;e<r.length;e++)n[r.charAt(e)]=e;function i(e){let t=e>>25;return(0x1ffffff&e)<<5^0x3b6a57b2&-((0|t)&1)^0x26508e6d&-(t>>1&1)^0x1ea119fa&-(t>>2&1)^0x3d4233dd&-(t>>3&1)^0x2a1462b3&-(t>>4&1)}function o(e){let t=1;for(let r=0;r<e.length;++r){let n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=i(t)^n>>5}t=i(t);for(let r=0;r<e.length;++r){let n=e.charCodeAt(r);t=i(t)^31&n}return t}function s(e,t,r,n){let i=0,o=0,s=(1<<r)-1,a=[];for(let n=0;n<e.length;++n)for(i=i<<t|e[n],o+=t;o>=r;)a.push(i>>(o-=r)&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=t)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}function a(e){return s(e,8,5,!0)}function c(e){let t=s(e,5,8,!1);if(Array.isArray(t))return t}function u(e){let t=s(e,5,8,!1);if(Array.isArray(t))return t;throw Error(t)}function l(e){let t;function s(e,r){if(r=r||90,e.length<8)return e+" too short";if(e.length>r)return"Exceeds length limit";let s=e.toLowerCase(),a=e.toUpperCase();if(e!==s&&e!==a)return"Mixed-case string "+e;let c=(e=s).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;let u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return"Data too short";let d=o(u);if("string"==typeof d)return d;let f=[];for(let e=0;e<l.length;++e){let t=l.charAt(e),r=n[t];if(void 0===r)return"Unknown character "+t;d=i(d)^r,e+6>=l.length||f.push(r)}return d!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:0x2bc830a3,{decodeUnsafe:function(e,t){let r=s(e,t);if("object"==typeof r)return r},decode:function(e,t){let r=s(e,t);if("object"==typeof r)return r;throw Error(r)},encode:function(e,n,s){if(s=s||90,e.length+7+n.length>s)throw TypeError("Exceeds length limit");let a=o(e=e.toLowerCase());if("string"==typeof a)throw Error(a);let c=e+"1";for(let e=0;e<n.length;++e){let t=n[e];if(t>>5!=0)throw Error("Non 5-bit word");a=i(a)^t,c+=r.charAt(t)}for(let e=0;e<6;++e)a=i(a);a^=t;for(let e=0;e<6;++e){let t=a>>(5-e)*5&31;c+=r.charAt(t)}return c},toWords:a,fromWordsUnsafe:c,fromWords:u}}t.I=l("bech32"),t.p2=l("bech32m")},59222:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(82334),i=r(98770),o=r(74646);function s(e,{docsPath:t,...r}){let s=(()=>{let t=(0,o.l)(e,r);return t instanceof n.RM?e:t})();return new i.$s(s,{docsPath:t,...r})}},60127:(e,t,r)=>{r.d(t,{B:()=>i});var n=r(79979);function i(e){return"function"===e.type?`function ${e.name}(${(0,n.Q)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,n.Q)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,n.Q)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,n.Q)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,n.Q)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"}},60320:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(43482),i=r(41091);function o(e,t="wei"){return(0,i.J)(e,n.sz[t])}},60456:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
9(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase64=t.toBase64=void 0;let s=o(r(8186));t.toBase64=function(e){return s.fromByteArray(e)},t.fromBase64=function(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw Error("Invalid base64 string format");return s.toByteArray(e)}},60832:(e,t,r)=>{r.d(t,{C:()=>n});class n extends Error{static setStaticOptions(e){n.prototype.docsOrigin=e.docsOrigin,n.prototype.showVersion=e.showVersion,n.prototype.version=e.version}constructor(e,t={}){let r=(()=>{if(t.cause instanceof n){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof n&&t.cause.docsPath||t.docsPath,o=t.docsOrigin??n.prototype.docsOrigin,s=`${o}${i??""}`,a=!!(t.version??n.prototype.showVersion),c=t.version??n.prototype.version;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||i||a?["",r?`Details: ${r}`:void 0,i?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsOrigin",{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,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.cause=t.cause,this.details=r,this.docs=s,this.docsOrigin=o,this.docsPath=i,this.shortMessage=e,this.showVersion=a,this.version=c}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}Object.defineProperty(n,"defaultStaticOptions",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:"https://oxlib.sh",showVersion:!1,version:"[email protected]"}}),n.setStaticOptions(n.defaultStaticOptions)},61506:(e,t,r)=>{r.d(t,{G:()=>s});let n=new Map,i=new Map;async function o(e,{cacheKey:t,cacheTime:r=1/0}){let o=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),r=t(e,n),o=t(e,i);return{clear:()=>{r.clear(),o.clear()},promise:r,response:o}}(t),s=o.response.get();if(s&&r>0&&Date.now()-s.created.getTime()<r)return s.data;let a=o.promise.get();a||(a=e(),o.promise.set(a));try{let e=await a;return o.response.set({created:new Date,data:e}),e}finally{o.promise.clear()}}async function s(e,{cacheTime:t=e.cacheTime}={}){let r;return BigInt(await o(()=>e.request({method:"eth_blockNumber"}),{cacheKey:(r=e.uid,`blockNumber.${r}`),cacheTime:t}))}},63109:(e,t,r)=>{r.d(t,{PK:()=>c,iq:()=>o,uP:()=>a,zF:()=>s});var n=r(87298),i=r(97461);class o extends i.C{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class s extends i.C{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class a extends i.C{constructor({hash:e,size:t}){super(`Versioned hash "${e}
9" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class c extends i.C{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.E}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}},63498:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoinUtils=void 0;let n=r(15162),i=r(29248),o=r(66858),s=r(65821),a=r(14352);class c{static createCoinsFromPrimitives(e){return e.map(e=>new n.Coin(e.denom,e.amount))}static amountOf(e,t){let r=e.find(e=>e.denom===t);return r?r.amount:new i.Int(0)}static exclude(e,t){return e.filter(e=>0===t.indexOf(e.denom))}static concat(...e){return 0===e.length?[]:e.slice().reduce((e,t)=>{let r=e.find(e=>e.denom===t.denom);if(r){let i=new n.Coin(r.denom,r.amount.add(t.amount));e.push(i)}else{let r=new n.Coin(t.denom,t.amount);e.push(r)}return e},[])}static getCoinFromDecimals(e,t,r){let i=e.find(e=>e.coinDenom===r);if(!i)throw Error("Invalid currency");let s=new o.Dec(1);for(let e=0;e<i.coinDecimals;e++)s=s.mul(new o.Dec(10));let a=new o.Dec(t);if(a=a.mul(s),!new o.Dec(a.truncate()).equals(a))throw Error("Can't divide anymore");return new n.Coin(i.coinMinimalDenom,a.truncate())}static parseDecAndDenomFromCoin(e,t){let r=e.find(e=>e.coinMinimalDenom===t.denom);r||(r={coinDecimals:0,coinDenom:t.denom,coinMinimalDenom:t.denom});let n=new o.Dec(1);for(let e=0;e<r.coinDecimals;e++)n=n.mul(new o.Dec(10));return{amount:new o.Dec(t.amount).quoTruncate(n).toString(r.coinDecimals),denom:r.coinDenom}}static shrinkDecimals(e,t,r,n=!1){if(e.equals(new o.Dec(0)))return"0";let i=e.isNegative(),s=e.abs().truncate(),a=e.abs().sub(new o.Dec(s)),u=Math.max(r-s.toString().length+1,t),l=0===u?"":a.toString(u).replace("0.","");return(i?"-":"")+(n?c.integerStringToUSLocaleString(s.toString()):s.toString())+(l.length>0?".":"")+l}static coinToTrimmedString(e,t,r=" "){let n=new o.Dec(e.amount).quoTruncate(s.DecUtils.getPrecisionDec(t.coinDecimals));return`${s.DecUtils.trim(n)}${r}${t.coinDenom}`}}c.integerStringToUSLocaleString=a.integerStringToUSLocaleString,t.CoinUtils=c},63571:(e,t,r)=>{r.d(t,{w:()=>i});var n=r(6625),i=async e=>{let t={...e,cumulativeAffiliateFeeBps:n.yy.cumulativeAffiliateFeeBPS};return(0,n.FH)({methodName:"route",method:"post",path:"v2/fungible/route"})(t)}},64092:(e,t,r)=>{r.d(t,{S:()=>a});var n=r(63395),i=r(73906),o=r(87082),s=r(5852);function a(e,t){let r=(0,n.lY)((0,i.q)(e,{strict:!1})?(0,o.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,s.nj)(r)}},65821:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecUtils=void 0;let n=r(66858),i=r(29248);class o{static trim(e){let t="string"==typeof e?e:e.toString();if(0>t.indexOf("."))return t;for(let e=t.length-1;e>=0;e--)if("0"===t[e])t=t.slice(0,e);else break;return t.length>0&&"."===t[t.length-1]&&(t=t.slice(0,t.length-1)),t}static getTenExponentN(e){if(e<-n.Dec.precision)throw Error("Too little precision");if(o.tenExponentNs[e.toString()])return o.tenExponentNs[e.toString()];let t=new n.Dec(10).pow(new i.Int(e));return o.tenExponentNs[e.toString()]=t,t}static getTenExponentNInPrecisionRange(e){if(e>n.Dec.precision)throw Error("Too much precision");return o.getTenExponentN(e)}static getPrecisionDec(e){return o.getTenExponentNInPrecisionRange(e)}}o.tenExponentNs={},t.DecUtils=o},66858:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dec=void 0;let i=n(r(35035)),o=r(29248),s=r(4007),a=r(14352);class c{static calcPrecisionMultiplier(e){if(e<0)throw Error("Invalid prec");if(e>c.precision)throw Error("Too much precision");let t=e.toString(),r=c.precisionMultipliers.get(t);if(r)return r;let n=c.precision-e,o=(0,i.default)(10).pow(n);return c.precisionMultipliers.set(t,o),o}static reduceDecimalsFromString(e){let t=e.indexOf(".");if(t<0)return{res:e,isDownToZero:!1};let r=e.length-1-t-c.precision;if(r<=0)return{res:e,isDownToZero:!1};let n=e.slice(0,e.length-r);return{res:n,isDownToZero:/^[0.]*$/.test(n)}}constructor(e,t=0){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(0===e.length)throw Error("empty string");if(!(0,s.isValidDecimalString)(e))if((0,s.isExponentDecString)(e))e=(0,s.exponentDecStringToDecString)(e);else throw Error(`invalid decimal: ${e}`);let r=c.reduceDecimalsFromString(e);r.isDownToZero&&console.log(`WARNING: Got ${e}. Dec can only handle up to 18 decimals. However, since the decimal point of the input exceeds 18 digits, the remainder is discarded. As a result, input becomes 0.`),(e=r.res).indexOf(".")>=0&&(t=e.length-e.indexOf(".")-1,e=e.replace(".","")),this.int=(0,i.default)(e)}else e instanceof o.Int||e instanceof o.Uint?this.int=(0,i.default)(e.toString()):this.int=(0,i.default)(e);this.int=this.int.multiply(c.calcPrecisionMultiplier(t)),this.checkBitLen()}checkBitLen(){if(this.int.abs().gt(c.maxDec))throw Error(`Integer out of range ${this.int.toString()}`)}isZero(){return this.int.eq((0,i.default)(0))}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}equals(e){return this.int.eq(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.geq(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.leq(e.int)}neg(){return new c(this.int.negate(),c.precision)}abs(){return new c(this.int.abs(),c.precision)}add(e){return new c(this.int.add(e.int),c.precision)}sub(e){return new c(this.int.subtract(e.int),c.precision)}pow(e){if(e.isZero())return new c(1);if(e.isNegative())return new c(1).quo(this.pow(e.abs()));let t=new c(this.int,c.precision),r=new c(1);for(let n=e;n.gt(new o.Int(1));n=n.div(new o.Int(2)))n.mod(new o.Int(2)).isZero()||(r=r.mul(t)),t=t.mul(t);return t.mul(r)}approxSqrt(){return this.approxRoot(2)}approxRoot(e,t=300){if(this.isNegative())return this.neg().approxRoot(e).neg();if(1===e||this.isZero()||this.equals(c.one))return this;if(0===e)return c.one;let[r,n]=[c.one,c.one];for(let i=0;n.abs().gt(c.smallestDec)&&i<t;i++){let t=r.pow(new o.Int(e-1));t.isZero()&&(t=c.smallestDec),n=(n=(n=this.quo(t)).sub(r)).quoTruncate(new c(e)),r=r.add(n)}return r}mul(e){return new c(this.mulRaw(e).chopPrecisionAndRound(1),c.precision)}mulTruncate(e){return new c(this.mulRaw(e).chopPrecisionAndTruncate(),c.precision)}mulRoundUp(e){return new c(this.mulRaw(e).chopPrecisionAndRoundUp(),c.precision)}mulRaw(e){return new c(this.int.multiply(e.int),c.precision)}quo(e){return new c(this.quoRaw(e).chopPrecisionAndRound(1),c.precision)}quoTruncate(e){return new c(this.quoRaw(e).chopPrecisionAndTruncate(),c.precision)}quoRoundUp(e){return new c(this.quoRaw(e).chopPrecisionAndRoundUp(),c.precision)}quoRaw(e){let t=c.calcPrecisionMultiplier(0);return new c(this.int.multiply(t).multiply(t).divide(e.int),c.precision)}
9isInteger(){let e=c.calcPrecisionMultiplier(0);return this.int.remainder(e).equals((0,i.default)(0))}chopPrecisionAndRound(e){if(this.isNegative())return this.abs().chopPrecisionAndRound(e).negate();let t=c.calcPrecisionMultiplier(e-1),r=t.divide((0,i.default)(2)),{quotient:n,remainder:o}=this.int.divmod(t);return o.equals((0,i.default)(0))||o.lt(r)?n:o.gt(r)?n.add((0,i.default)(1)):n.divide((0,i.default)(2)).equals((0,i.default)(0))?n:n.add((0,i.default)(1))}chopPrecisionAndRoundUp(){if(this.isNegative())return this.abs().chopPrecisionAndTruncate().negate();let e=c.calcPrecisionMultiplier(0),{quotient:t,remainder:r}=this.int.divmod(e);return r.equals((0,i.default)(0))?t:t.add((0,i.default)(1))}chopPrecisionAndTruncate(){let e=c.calcPrecisionMultiplier(0);return this.int.divide(e)}toString(e=c.precision,t=!1){let r=c.calcPrecisionMultiplier(0),{quotient:n,remainder:o}=this.int.abs().divmod(r),s=o.toString(10);for(let e=0,t=s.length;e<c.precision-t;e++)s="0"+s;s=s.substring(0,e);let u=this.isNegative()&&!(n.eq((0,i.default)(0))&&0===s.length),l=t?(0,a.integerStringToUSLocaleString)(n.toString()):n.toString();return`${u?"-":""}${l}${s.length>0?"."+s:""}`}round(){return new o.Int(this.chopPrecisionAndRound(1))}roundTo(e){return new c(this.chopPrecisionAndRound(e),e-1)}roundUp(){return new o.Int(this.chopPrecisionAndRoundUp())}truncate(){return new o.Int(this.chopPrecisionAndTruncate())}roundDec(){return new c(this.chopPrecisionAndRound(1),0)}roundUpDec(){return new c(this.chopPrecisionAndRoundUp(),0)}truncateDec(){return new c(this.chopPrecisionAndTruncate(),0)}}c.precision=18,c.decimalPrecisionBits=60,c.maxDec=(0,i.default)("133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535"),c.precisionMultipliers=new Map,c.zero=new c(0),c.smallestDec=new c("1",c.precision),c.one=new c(1),t.Dec=c,o.Int.prototype.toDec=function(){return new c(this)},o.Uint.prototype.toDec=function(){return new c(this)}},67132:(e,t,r)=>{r.d(t,{BI:()=>P,EB:()=>A,Iy:()=>c,Iz:()=>v,MR:()=>w,M_:()=>b,Nc:()=>l,O:()=>u,Wq:()=>h,YE:()=>f,YF:()=>a,YW:()=>s,ZP:()=>m,_z:()=>g,d_:()=>_,dm:()=>S,fo:()=>M,gH:()=>d,j:()=>k,kE:()=>y,l3:()=>T,nK:()=>E,nM:()=>x,yy:()=>p});var n=r(493),i=r(34960),o=r(97461);class s extends o.C{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class a extends o.C{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}o.C;class c extends o.C{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.A)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}class u extends o.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class l extends o.C{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}. 10Expected length: ${e} 11Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends o.C{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.E)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class f extends o.C{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. 12Expected length (params): ${e} 13Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class m extends o.C{constructor(e,{docsPath:t}){super(`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`). 14Cannot encode error result without knowing what the parameter types are. 15Make sure you are using the correct ABI and that the inputs exist on it.`,{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}class p extends o.C{constructor(e,{docsPath:t}={}){super(`Error ${e?`"${e}" `:""}not found on ABI. 16Make sure you are using the correct ABI and that the error exists on it.`,{docsPath:t,name:"AbiErrorNotFoundError"})}}class h extends o.C{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. 17Make sure you are using the correct ABI and that the error exists on it. 18You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class g extends o.C{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class y extends o.C{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. 19Make sure you are using the correct ABI and that the event exists on it. 20You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class b extends o.C{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. 21Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}class v extends o.C{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. 22Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class w extends o.C{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. 23Cannot decode function result without knowing what the parameter types are. 24Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class A extends o.C{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI. 25Make sure you are using the correct ABI and that the function exists on it. 26You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class x extends o.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.B)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.B)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class P extends o.C{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}class M extends o.C{constructor({abiItem:e,data:t,params:r,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.A)(r,{includeName:!0})})`,`Data: ${t} (${i} bytes)`],name:"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=r,this.size=i}}class T extends o.C{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.B)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class E extends o.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. 27Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class k extends o.C{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. 28Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class S extends o.C{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class _ extends o.C{constructor(e){super(`"${e}" is not a valid definition type. 29Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}o.C},69545:(e,t,r)=>{r.d(t,{k:()=>ed});var n=r(6625),i=r(55406),o=r(36219),s=r(17502),a=r(94060),c=r(49687),u=r(44821),l=r(17379),d=r(88772),f=r(51659),m=r(72316),p=[["/circle.cctp.v1.MsgAcceptOwner",i.xO],["/circle.cctp.v1.MsgAddRemoteTokenMessenger",i.rm],["/circle.cctp.v1.MsgDepositForBurn",i.ux],["/circle.cctp.v1.MsgDepositForBurnWithCaller",i.x4],["/circle.cctp.v1.MsgDisableAttester",i.qS],["/circle.cctp.v1.MsgEnableAttester",i.XY],["/circle.cctp.v1.MsgLinkTokenPair",i.Jh],["/circle.cctp.v1.MsgPauseBurningAndMinting",i.wJ],["/circle.cctp.v1.MsgPauseSendingAndReceivingMessages",i.$8],["/circle.cctp.v1.MsgReceiveMessage",i.GB],["/circle.cctp.v1.MsgRemoveRemoteTokenMessenger",i.cz],["/circle.cctp.v1.MsgReplaceDepositForBurn",i.C5],["/circle.cctp.v1.MsgReplaceMessage",i.RI],["/circle.cctp.v1.MsgSendMessage",i.bU],["/circle.cctp.v1.MsgSendMessageWithCaller",i.gz],["/circle.cctp.v1.MsgUnlinkTokenPair",i.uR],["/circle.cctp.v1.MsgUnpauseBurningAndMinting",i.DK],["/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages",i.GG],["/circle.cctp.v1.MsgUpdateOwner",i.Kz],["/circle.cctp.v1.MsgUpdateAttesterManager",i.aW],["/circle.cctp.v1.MsgUpdateTokenController",i.ek],["/circle.cctp.v1.MsgUpdatePauser",i.hB],["/circle.cctp.v1.MsgUpdateMaxMessageBodySize",i.PE],["/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage",i.ZL],["/circle.cctp.v1.MsgUpdateSignatureThreshold",i.WD]],h={...{"/circle.cctp.v1.MsgAcceptOwner":{aminoType:"cctp/AcceptOwner",toAmino:i.xO.toAmino,fromAmino:i.xO.fromAmino},"/circle.cctp.v1.MsgAddRemoteTokenMessenger":{aminoType:"cctp/AddRemoteTokenMessenger",toAmino:i.rm.toAmino,fromAmino:i.rm.fromAmino},"/circle.cctp.v1.MsgDepositForBurn":{aminoType:"cctp/DepositForBurn",toAmino:i.ux.toAmino,fromAmino:i.ux.fromAmino},"/circle.cctp.v1.MsgDepositForBurnWithCaller":{aminoType:"cctp/DepositForBurnWithCaller",toAmino:i.x4.toAmino,fromAmino:i.x4.fromAmino},"/circle.cctp.v1.MsgDisableAttester":{aminoType:"cctp/DisableAttester",toAmino:i.qS.toAmino,fromAmino:i.qS.fromAmino},"/circle.cctp.v1.MsgEnableAttester":{aminoType:"cctp/EnableAttester",toAmino:i.XY.toAmino,fromAmino:i.XY.fromAmino}
29,"/circle.cctp.v1.MsgLinkTokenPair":{aminoType:"cctp/LinkTokenPair",toAmino:i.Jh.toAmino,fromAmino:i.Jh.fromAmino},"/circle.cctp.v1.MsgPauseBurningAndMinting":{aminoType:"cctp/PauseBurningAndMinting",toAmino:i.wJ.toAmino,fromAmino:i.wJ.fromAmino},"/circle.cctp.v1.MsgPauseSendingAndReceivingMessages":{aminoType:"cctp/PauseSendingAndReceivingMessages",toAmino:i.$8.toAmino,fromAmino:i.$8.fromAmino},"/circle.cctp.v1.MsgReceiveMessage":{aminoType:"cctp/ReceiveMessage",toAmino:i.GB.toAmino,fromAmino:i.GB.fromAmino},"/circle.cctp.v1.MsgRemoveRemoteTokenMessenger":{aminoType:"cctp/RemoveRemoteTokenMessenger",toAmino:i.cz.toAmino,fromAmino:i.cz.fromAmino},"/circle.cctp.v1.MsgReplaceDepositForBurn":{aminoType:"cctp/ReplaceDepositForBurn",toAmino:i.C5.toAmino,fromAmino:i.C5.fromAmino},"/circle.cctp.v1.MsgReplaceMessage":{aminoType:"cctp/ReplaceMessage",toAmino:i.RI.toAmino,fromAmino:i.RI.fromAmino},"/circle.cctp.v1.MsgSendMessage":{aminoType:"cctp/SendMessage",toAmino:i.bU.toAmino,fromAmino:i.bU.fromAmino},"/circle.cctp.v1.MsgSendMessageWithCaller":{aminoType:"cctp/SendMessageWithCaller",toAmino:i.gz.toAmino,fromAmino:i.gz.fromAmino},"/circle.cctp.v1.MsgUnlinkTokenPair":{aminoType:"cctp/UnlinkTokenPair",toAmino:i.uR.toAmino,fromAmino:i.uR.fromAmino},"/circle.cctp.v1.MsgUnpauseBurningAndMinting":{aminoType:"cctp/UnpauseBurningAndMinting",toAmino:i.DK.toAmino,fromAmino:i.DK.fromAmino},"/circle.cctp.v1.MsgUnpauseSendingAndReceivingMessages":{aminoType:"cctp/UnpauseSendingAndReceivingMessages",toAmino:i.GG.toAmino,fromAmino:i.GG.fromAmino},"/circle.cctp.v1.MsgUpdateOwner":{aminoType:"cctp/UpdateOwner",toAmino:i.Kz.toAmino,fromAmino:i.Kz.fromAmino},"/circle.cctp.v1.MsgUpdateAttesterManager":{aminoType:"cctp/UpdateAttesterManager",toAmino:i.aW.toAmino,fromAmino:i.aW.fromAmino},"/circle.cctp.v1.MsgUpdateTokenController":{aminoType:"cctp/UpdateTokenController",toAmino:i.ek.toAmino,fromAmino:i.ek.fromAmino},"/circle.cctp.v1.MsgUpdatePauser":{aminoType:"cctp/UpdatePauser",toAmino:i.hB.toAmino,fromAmino:i.hB.fromAmino},"/circle.cctp.v1.MsgUpdateMaxMessageBodySize":{aminoType:"cctp/UpdateMaxMessageBodySize",toAmino:i.PE.toAmino,fromAmino:i.PE.fromAmino},"/circle.cctp.v1.MsgSetMaxBurnAmountPerMessage":{aminoType:"cctp/SetMaxBurnAmountPerMessage",toAmino:i.ZL.toAmino,fromAmino:i.ZL.fromAmino},"/circle.cctp.v1.MsgUpdateSignatureThreshold":{aminoType:"cctp/UpdateSignatureThreshold",toAmino:i.WD.toAmino,fromAmino:i.WD.fromAmino}}},g=[...p];function y(){return{enableErc20:!1,enableEvmHook:!1}}var b={typeUrl:"/evmos.erc20.v1.Params",encode:(e,t=d.Writer.create())=>(!0===e.enableErc20&&t.uint32(8).bool(e.enableErc20),!0===e.enableEvmHook&&t.uint32(16).bool(e.enableEvmHook),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.enableErc20=r.bool();break;case 2:i.enableEvmHook=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({enableErc20:!!(0,o.vM)(e.enableErc20)&&!!e.enableErc20,enableEvmHook:!!(0,o.vM)(e.enableEvmHook)&&!!e.enableEvmHook}),toJSON(e){let t={};return void 0!==e.enableErc20&&(t.enableErc20=e.enableErc20),void 0!==e.enableEvmHook&&(t.enableEvmHook=e.enableEvmHook),t},fromPartial(e){let t=y();return t.enableErc20=e.enableErc20??!1,t.enableEvmHook=e.enableEvmHook??!1,t},fromAmino(e){let t=y();return void 0!==e.enable_erc20&&null!==e.enable_erc20&&(t.enableErc20=e.enable_erc20),void 0!==e.enable_evm_hook&&null!==e.enable_evm_hook&&(t.enableEvmHook=e.enable_evm_hook),t},toAmino(e){let t={};return t.enable_erc20=!1===e.enableErc20?void 0:e.enableErc20,t.enable_evm_hook=!1===e.enableEvmHook?void 0:e.enableEvmHook,t},fromAminoMsg:e=>b.fromAmino(e.value),toAminoMsg:e=>({type:"erc20/Params",value:b.toAmino(e)}),fromProtoMsg:e=>b.decode(e.value),toProto:e=>b.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.erc20.v1.Params",value:b.encode(e).finish()})};function v(){return{coin:i.KO.fromPartial({}),receiver:"",sender:""}}var w={typeUrl:"/evmos.erc20.v1.MsgConvertCoin",encode:(e,t=d.Writer.create())=>(void 0!==e.coin&&i.KO.encode(e.coin,t.uint32(10).fork()).ldelim(),""!==e.receiver&&t.uint32(18).string(e.receiver),""!==e.sender&&t.uint32(26).string(e.sender),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,o=v();for(;r.pos<n;){let e=r.uint32();switch(e>>>
293){case 1:o.coin=i.KO.decode(r,r.uint32());break;case 2:o.receiver=r.string();break;case 3:o.sender=r.string();break;default:r.skipType(7&e)}}return o},fromJSON:e=>({coin:(0,o.vM)(e.coin)?i.KO.fromJSON(e.coin):void 0,receiver:(0,o.vM)(e.receiver)?String(e.receiver):"",sender:(0,o.vM)(e.sender)?String(e.sender):""}),toJSON(e){let t={};return void 0!==e.coin&&(t.coin=e.coin?i.KO.toJSON(e.coin):void 0),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial(e){let t=v();return t.coin=void 0!==e.coin&&null!==e.coin?i.KO.fromPartial(e.coin):void 0,t.receiver=e.receiver??"",t.sender=e.sender??"",t},fromAmino(e){let t=v();return void 0!==e.coin&&null!==e.coin&&(t.coin=i.KO.fromAmino(e.coin)),void 0!==e.receiver&&null!==e.receiver&&(t.receiver=e.receiver),void 0!==e.sender&&null!==e.sender&&(t.sender=e.sender),t},toAmino(e){let t={};return t.coin=e.coin?i.KO.toAmino(e.coin):void 0,t.receiver=""===e.receiver?void 0:e.receiver,t.sender=""===e.sender?void 0:e.sender,t},fromAminoMsg:e=>w.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgConvertCoin",value:w.toAmino(e)}),fromProtoMsg:e=>w.decode(e.value),toProto:e=>w.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.erc20.v1.MsgConvertCoin",value:w.encode(e).finish()})};function A(){return{contractAddress:"",amount:"",receiver:"",sender:""}}var x={typeUrl:"/evmos.erc20.v1.MsgConvertERC20",encode:(e,t=d.Writer.create())=>(""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.receiver&&t.uint32(26).string(e.receiver),""!==e.sender&&t.uint32(34).string(e.sender),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.contractAddress=r.string();break;case 2:i.amount=r.string();break;case 3:i.receiver=r.string();break;case 4:i.sender=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({contractAddress:(0,o.vM)(e.contractAddress)?String(e.contractAddress):"",amount:(0,o.vM)(e.amount)?String(e.amount):"",receiver:(0,o.vM)(e.receiver)?String(e.receiver):"",sender:(0,o.vM)(e.sender)?String(e.sender):""}),toJSON(e){let t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial(e){let t=A();return t.contractAddress=e.contractAddress??"",t.amount=e.amount??"",t.receiver=e.receiver??"",t.sender=e.sender??"",t},fromAmino(e){let t=A();return void 0!==e.contract_address&&null!==e.contract_address&&(t.contractAddress=e.contract_address),void 0!==e.amount&&null!==e.amount&&(t.amount=e.amount),void 0!==e.receiver&&null!==e.receiver&&(t.receiver=e.receiver),void 0!==e.sender&&null!==e.sender&&(t.sender=e.sender),t},toAmino(e){let t={};return t.contract_address=""===e.contractAddress?void 0:e.contractAddress,t.amount=""===e.amount?void 0:e.amount,t.receiver=""===e.receiver?void 0:e.receiver,t.sender=""===e.sender?void 0:e.sender,t},fromAminoMsg:e=>x.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgConvertERC20",value:x.toAmino(e)}),fromProtoMsg:e=>x.decode(e.value),toProto:e=>x.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.erc20.v1.MsgConvertERC20",value:x.encode(e).finish()})};function P(){return{authority:"",params:b.fromPartial({})}}var M={typeUrl:"/evmos.erc20.v1.MsgUpdateParams",encode:(e,t=d.Writer.create())=>(""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&b.encode(e.params,t.uint32(18).fork()).ldelim(),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.authority=r.string();break;case 2:i.params=b.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({authority:(0,o.vM)(e.authority)?String(e.authority):"",params:(0,o.vM)(e.params)?b.fromJSON(e.params):void 0}),toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?b.toJSON(e.params):void 0),t},fromPartial(e){let t=P();return t.authority=e.authority??"",t.params=void 0!==e.params&&null!==e.params?b.fromPartial(e.params):void 0,t},fromAmino(e){let t=P();return void 0!==e.authority&&null!==e.authority&&(t.authority=e.authority),void 0!==e.params&&null!==e.params&&(t.params=b.fromAmino(e.params)),t},toAmino(e){let t={};return t.authority=""===e.authority?void 0:e.authority,t.params=e.params?b.toAmino(e.params):void 0,t},fromAminoMsg:e=>M.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/erc20/MsgUpdateParams",value:M.toAmino(e)}),fromProtoMsg:e=>M.decode(e.value),toProto:e=>M.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.erc20.v1.MsgUpdateParams",value:M.encode(e).finish()})},T=[["/evmos.erc20.v1.MsgConvertCoin",w],["/evmos.erc20.v1.MsgConvertERC20",x],["/evmos.erc20.v1.MsgUpdateParams",M]];function E(){return{stakingRewards:"",usageIncentives:"",communityPool:""}}var k={typeUrl:"/evmos.inflation.v1.InflationDistribution",encode:(e,t=d.Writer.create())=>(""!==e.stakingRewards&&t.uint32(10).string(f.Ww.fromUserInput(e.stakingRewards,18).atomics),""!==e.usageIncentives&&t.uint32(18).string(f.Ww.fromUserInput(e.usageIncentives,18).atomics),""!==e.communityPool&&t.uint32(26).string(f.Ww.fromUserInput(e.communityPool,18).atomics),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.stakingRewards=f.Ww.fromAtomics(r.string(),18).toString();break;case 2:i.usageIncentives=f.Ww.fromAtomics(r.string(),18).toString();break;case 3:i.communityPool=f.Ww.fromAtomics(r.string(),18).toString();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({stakingRewards:(0,o.vM)(e.stakingRewards)?String(e.stakingRewards):"",usageIncentives:(0,o.vM)(e.usageIncentives)?String(e.usageIncentives):"",communityPool:(0,o.vM)(e.communityPool)?String(e.communityPool):""}),toJSON(e){let t={};return void 0!==e.stakingRewards&&(t.stakingRewards=e.stakingRewards),void 0!==e.usageIncentives&&(t.usageIncentives=e.usageIncentives),void 0!==e.communityPool&&(t.communityPool=e.communityPool),t},fromPartial(e){let t=E();return t.stakingRewards=e.stakingRewards??"",t.usageIncentives=e.usageIncentives??"",t.communityPool=e.communityPool??"",t},fromAmino(e){let t=E();return void 0!==e.staking_rewards&&null!==e.staking_rewards&&(t.stakingRewards=e.staking_rewards),void 0!==e.usage_incentives&&null!==e.usage_incentives&&(t.usageIncentives=e.usage_incentives),void 0!==e.community_pool&&null!==e.community_pool&&(t.communityPool=e.community_pool),t},toAmino(e){let t={};return t.staking_rewards=""===e.stakingRewards?void 0:f.Ww.fromUserInput(e.stakingRewards,18).atomics,t.usage_incentives=""===e.usageIncentives?void 0:f.Ww.fromUserInput(e.usageIncentives,18).atomics,t.community_pool=""===e.communityPool?void 0:f.Ww.fromUserInput(e.communityPool,18).atomics,t},fromAminoMsg:e=>k.fromAmino(e.value),toAminoMsg:e=>({type:"inflation/InflationDistribution",value:k.toAmino(e)}),fromProtoMsg:e=>k.decode(e.value),toProto:e=>k.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.inflation.v1.InflationDistribution",value:k.encode(e).finish()})};function S(){return{a:"",r:"",c:"",bondingTarget:"",maxVariance:""}}var _={typeUrl:"/evmos.inflation.v1.ExponentialCalculation",encode:(e,t=d.Writer.create())=>(""!==e.a&&t.uint32(10).string(f.Ww.fromUserInput(e.a,18).atomics),""!==e.r&&t.uint32(18).string(f.Ww.fromUserInput(e.r,18).atomics),""!==e.c&&t.uint32(26).string(f.Ww.fromUserInput(e.c,18).atomics),""!==e.bondingTarget&&t.uint32(34).string(f.Ww.fromUserInput(e.bondingTarget,18).atomics),""!==e.maxVariance&&t.uint32(42).string(f.Ww.fromUserInput(e.maxVariance,18).atomics),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.a=f.Ww.fromAtomics(r.string(),18).toString();break;case 2:i.r=f.Ww.fromAtomics(r.string(),18).toString();break;case 3:i.c=f.Ww.fromAtomics(r.string(),18).toString();break;case 4:i.bondingTarget=f.Ww.fromAtomics(r.string(),18).toString();break;case 5:i.maxVariance=f.Ww.fromAtomics(r.string(),18).toString();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({a:(0,o.vM)(e.a)?String(e.a):"",r:(0,o.vM)(e.r)?String(e.r):"",c:(0,o.vM)(e.c)?String(e.c):"",bondingTarget:(0,o.vM)(e.bondingTarget)?String(e.bondingTarget):"",maxVariance:(0,o.vM)(e.maxVariance)?String(e.maxVariance):""}),toJSON(e){let t={};return void 0!==e.a&&(t.a=e.a),void 0!==e.r&&(t.r=e.r),void 0!==e.c&&(t.c=e.c),void 0!==e.bondingTarget&&(t.bondingTarget=e.bondingTarget),void 0!==e.maxVariance&&(t.maxVariance=e.maxVariance),t},fromPartial(e){let t=S();return t.a=e.a??"",t.r=e.r??"",t.c=e.c??"",t.bondingTarget=e.bondingTarget??"",t.maxVariance=e.maxVariance??"",t},fromAmino(e){let t=S();return void 0!==e.a&&null!==e.a&&(t.a=e.a),void 0!==e.r&&null!==e.r&&(t.r=e.r),void 0!==e.c&&null!==e.c&&(t.c=e.c),void 0!==e.bonding_target&&null!==e.bonding_target&&(t.bondingTarget=e.bonding_target),void 0!==e.max_variance&&null!==e.max_variance&&(t.maxVariance=e.max_variance),t},toAmino(e){let t={};return t.a=""===e.a?void 0:f.Ww.fromUserInput(e.a,18).atomics,t.r=""===e.r?void 0:f.Ww.fromUserInput(e.r,18).atomics,t.c=""===e.c?void 0:f.Ww.fromUserInput(e.c,18).atomics,t.bonding_target=""===e.bondingTarget?void 0:f.Ww.fromUserInput(e.bondingTarget,18).atomics,t.max_variance=""===e.maxVariance?void 0:f.Ww.fromUserInput(e.maxVariance,18).atomics,t},fromAminoMsg:e=>_.fromAmino(e.value),toAminoMsg:e=>({type:"inflation/ExponentialCalculation",value:_.toAmino(e)}),fromProtoMsg:e=>_.decode(e.value),toProto:e=>_.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.inflation.v1.ExponentialCalculation",value:_.encode(e).finish()})};function I(){return{mintDenom:"",exponentialCalculation:_.fromPartial({}),inflationDistribution:k.fromPartial({}),enableInflation:!1}}var B={typeUrl:"/evmos.inflation.v1.Params",encode:(e,t=d.Writer.create())=>(""!==e.mintDenom&&t.uint32(10).string(e.mintDenom),void 0!==e.exponentialCalculation&&_.encode(e.exponentialCalculation,t.uint32(18).fork()).ldelim(),void 0!==e.inflationDistribution&&k.encode(e.inflationDistribution,t.uint32(26).fork()).ldelim(),!0===e.enableInflation&&t.uint32(32).bool(e.enableInflation),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.mintDenom=r.string();break;case 2:i.exponentialCalculation=_.decode(r,r.uint32());break;case 3:i.inflationDistribution=k.decode(r,r.uint32());break;case 4:i.enableInflation=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({mintDenom:(0,o.vM)(e.mintDenom)?String(e.mintDenom):"",exponentialCalculation:(0,o.vM)(e.exponentialCalculation)?_.fromJSON(e.exponentialCalculation):void 0,inflationDistribution:(0,o.vM)(e.inflationDistribution)?k.fromJSON(e.inflationDistribution):void 0,enableInflation:!!(0,o.vM)(e.enableInflation)&&!!e.enableInflation}),toJSON(e){let t={};return void 0!==e.mintDenom&&(t.mintDenom=e.mintDenom),void 0!==e.exponentialCalculation&&(t.exponentialCalculation=e.exponentialCalculation?_.toJSON(e.exponentialCalculation):void 0),void 0!==e.inflationDistribution&&(t.inflationDistribution=e.inflationDistribution?k.toJSON(e.inflationDistribution):void 0),void 0!==e.enableInflation&&(t.enableInflation=e.enableInflation),t},fromPartial(e){let t=I();return t.mintDenom=e.mintDenom??"",t.exponentialCalculation=void 0!==e.exponentialCalculation&&null!==e.exponentialCalculation?_.fromPartial(e.exponentialCalculation):void 0,t.inflationDistribution=void 0!==e.inflationDistribution&&null!==e.inflationDistribution?k.fromPartial(e.inflationDistribution):void 0,t.enableInflation=e.enableInflation??!1,t},fromAmino(e){let t=I();return void 0!==e.mint_denom&&null!==e.mint_denom&&(t.mintDenom=e.mint_denom),void 0!==e.exponential_calculation&&null!==e.exponential_calculation&&(t.exponentialCalculation=_.fromAmino(e.exponential_calculation)),void 0!==e.inflation_distribution&&null!==e.inflation_distribution&&(t.inflationDistribution=k.fromAmino(e.inflation_distribution)),void 0!==e.enable_inflation&&null!==e.enable_inflation&&(t.enableInflation=e.enable_inflation),t},toAmino(e){let t={};return t.mint_denom=""===e.mintDenom?void 0:e.mintDenom,t.exponential_calculation=e.exponentialCalculation?_.toAmino(e.exponentialCalculation):void 0,t.inflation_distribution=e.inflationDistribution?k.toAmino(e.inflationDistribution):void 0,t.enable_inflation=!1===e.enableInflation?void 0:e.enableInflation,t},fromAminoMsg:e=>B.fromAmino(e.value),toAminoMsg:e=>
29({type:"inflation/Params",value:B.toAmino(e)}),fromProtoMsg:e=>B.decode(e.value),toProto:e=>B.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.inflation.v1.Params",value:B.encode(e).finish()})};function C(){return{authority:"",params:B.fromPartial({})}}var R={typeUrl:"/evmos.inflation.v1.MsgUpdateParams",encode:(e,t=d.Writer.create())=>(""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&B.encode(e.params,t.uint32(18).fork()).ldelim(),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.authority=r.string();break;case 2:i.params=B.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({authority:(0,o.vM)(e.authority)?String(e.authority):"",params:(0,o.vM)(e.params)?B.fromJSON(e.params):void 0}),toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?B.toJSON(e.params):void 0),t},fromPartial(e){let t=C();return t.authority=e.authority??"",t.params=void 0!==e.params&&null!==e.params?B.fromPartial(e.params):void 0,t},fromAmino(e){let t=C();return void 0!==e.authority&&null!==e.authority&&(t.authority=e.authority),void 0!==e.params&&null!==e.params&&(t.params=B.fromAmino(e.params)),t},toAmino(e){let t={};return t.authority=""===e.authority?void 0:e.authority,t.params=e.params?B.toAmino(e.params):void 0,t},fromAminoMsg:e=>R.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/inflation/MsgUpdateParams",value:R.toAmino(e)}),fromProtoMsg:e=>R.decode(e.value),toProto:e=>R.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.inflation.v1.MsgUpdateParams",value:R.encode(e).finish()})},O=[["/evmos.inflation.v1.MsgUpdateParams",R]];function U(){return{enableRevenue:!1,developerShares:"",addrDerivationCostCreate:s.UZERO}}var D={typeUrl:"/evmos.revenue.v1.Params",encode:(e,t=d.Writer.create())=>(!0===e.enableRevenue&&t.uint32(8).bool(e.enableRevenue),""!==e.developerShares&&t.uint32(18).string(f.Ww.fromUserInput(e.developerShares,18).atomics),e.addrDerivationCostCreate.isZero()||t.uint32(24).uint64(e.addrDerivationCostCreate),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.enableRevenue=r.bool();break;case 2:i.developerShares=f.Ww.fromAtomics(r.string(),18).toString();break;case 3:i.addrDerivationCostCreate=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({enableRevenue:!!(0,o.vM)(e.enableRevenue)&&!!e.enableRevenue,developerShares:(0,o.vM)(e.developerShares)?String(e.developerShares):"",addrDerivationCostCreate:(0,o.vM)(e.addrDerivationCostCreate)?s.fromValue(e.addrDerivationCostCreate):s.UZERO}),toJSON(e){let t={};return void 0!==e.enableRevenue&&(t.enableRevenue=e.enableRevenue),void 0!==e.developerShares&&(t.developerShares=e.developerShares),void 0!==e.addrDerivationCostCreate&&(t.addrDerivationCostCreate=(e.addrDerivationCostCreate||s.UZERO).toString()),t},fromPartial(e){let t=U();return t.enableRevenue=e.enableRevenue??!1,t.developerShares=e.developerShares??"",t.addrDerivationCostCreate=void 0!==e.addrDerivationCostCreate&&null!==e.addrDerivationCostCreate?s.fromValue(e.addrDerivationCostCreate):s.UZERO,t},fromAmino(e){let t=U();return void 0!==e.enable_revenue&&null!==e.enable_revenue&&(t.enableRevenue=e.enable_revenue),void 0!==e.developer_shares&&null!==e.developer_shares&&(t.developerShares=e.developer_shares),void 0!==e.addr_derivation_cost_create&&null!==e.addr_derivation_cost_create&&(t.addrDerivationCostCreate=s.fromString(e.addr_derivation_cost_create)),t},toAmino(e){let t={};return t.enable_revenue=!1===e.enableRevenue?void 0:e.enableRevenue,t.developer_shares=""===e.developerShares?void 0:f.Ww.fromUserInput(e.developerShares,18).atomics,t.addr_derivation_cost_create=e.addrDerivationCostCreate.isZero()?void 0:e.addrDerivationCostCreate?.toString(),t},fromAminoMsg:e=>D.fromAmino(e.value),toAminoMsg:e=>({type:"revenue/Params",value:D.toAmino(e)}),fromProtoMsg:e=>D.decode(e.value),toProto:e=>D.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.revenue.v1.Params",value:D.encode(e).finish()})};function N(){return{contractAddress:"",deployerAddress:"",withdrawerAddress:"",nonces:[]}}var $={typeUrl:"/evmos.revenue.v1.MsgRegisterRevenue",encode(e,t=d.Writer.create()){for(let r of(""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),""!==e.deployerAddress&&t.uint32(18).string(e.deployerAddress),""!==e.withdrawerAddress&&t.uint32(26).string(e.withdrawerAddress),t.uint32(34).fork(),e.nonces))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.contractAddress=r.string();break;case 2:i.deployerAddress=r.string();break;case 3:i.withdrawerAddress=r.string();break;case 4:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.pos<e;)i.nonces.push(r.uint64())}else i.nonces.push(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({contractAddress:(0,o.vM)(e.contractAddress)?String(e.contractAddress):"",deployerAddress:(0,o.vM)(e.deployerAddress)?String(e.deployerAddress):"",withdrawerAddress:(0,o.vM)(e.withdrawerAddress)?String(e.withdrawerAddress):"",nonces:Array.isArray(e?.nonces)?e.nonces.map(e=>s.fromValue(e)):[]}),toJSON(e){let t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.deployerAddress&&(t.deployerAddress=e.deployerAddress),void 0!==e.withdrawerAddress&&(t.withdrawerAddress=e.withdrawerAddress),e.nonces?t.nonces=e.nonces.map(e=>(e||s.UZERO).toString()):t.nonces=[],t},fromPartial(e){let t=N();return t.contractAddress=e.contractAddress??"",t.deployerAddress=e.deployerAddress??"",t.withdrawerAddress=e.withdrawerAddress??"",t.nonces=e.nonces?.map(e=>s.fromValue(e))||[],t},fromAmino(e){let t=N();return void 0!==e.contract_address&&null!==e.contract_address&&(t.contractAddress=e.contract_address),void 0!==e.deployer_address&&null!==e.deployer_address&&(t.deployerAddress=e.deployer_address),void 0!==e.withdrawer_address&&null!==e.withdrawer_address&&(t.withdrawerAddress=e.withdrawer_address),t.nonces=e.nonces?.map(e=>s.fromString(e))||[],t},toAmino(e){let t={};return t.contract_address=""===e.contractAddress?void 0:e.contractAddress,t.deployer_address=""===e.deployerAddress?void 0:e.deployerAddress,t.withdrawer_address=""===e.withdrawerAddress?void 0:e.withdrawerAddress,e.nonces?t.nonces=e.nonces.map(e=>e):t.nonces=e.nonces,t},fromAminoMsg:e=>$.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgRegisterRevenue",value:$.toAmino(e)}),fromProtoMsg:e=>$.decode(e.value),toProto:e=>$.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.revenue.v1.MsgRegisterRevenue",value:$.encode(e).finish()})};function F(){return{contractAddress:"",deployerAddress:"",withdrawerAddress:""}}var j={typeUrl:"/evmos.revenue.v1.MsgUpdateRevenue",encode:(e,t=d.Writer.create())=>(""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),""!==e.deployerAddress&&t.uint32(18).string(e.deployerAddress),""!==e.withdrawerAddress&&t.uint32(26).string(e.withdrawerAddress),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=F();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.contractAddress=r.string();break;case 2:i.deployerAddress=r.string();break;case 3:i.withdrawerAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({contractAddress:(0,o.vM)(e.contractAddress)?String(e.contractAddress):"",deployerAddress:(0,o.vM)(e.deployerAddress)?String(e.deployerAddress):"",withdrawerAddress:(0,o.vM)(e.withdrawerAddress)?String(e.withdrawerAddress):""}),toJSON(e){let t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.deployerAddress&&(t.deployerAddress=e.deployerAddress),void 0!==e.withdrawerAddress&&(t.withdrawerAddress=e.withdrawerAddress),t},fromPartial(e){let t=F();return t.contractAddress=e.contractAddress??"",t.deployerAddress=e.deployerAddress??"",t.withdrawerAddress=e.withdrawerAddress??"",t},fromAmino(e){let t=F();return void 0!==e.contract_address&&null!==e.contract_address&&(t.contractAddress=e.contract_address),void 0!==e.deployer_address&&null!==e.deployer_address&&(t.deployerAddress=e.deployer_address),void 0!==e.withdrawer_address&&null!==e.withdrawer_address&&(t.withdrawerAddress=e.withdrawer_address),t},toAmino(e){let t={};return t.contract_address=""===e.contractAddress?void 0:e.contractAddress,t.deployer_address=""===e.deployerAddress?void 0:e.deployerAddress,t.withdrawer_address=""===e.withdrawerAddress?void 0:e.withdrawerAddress,t},fromAminoMsg:e=>j.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgUpdateRevenue",value:j.toAmino(e)}),fromProtoMsg:e=>j.decode(e.value),toProto:e=>j.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.revenue.v1.MsgUpdateRevenue",value:j.encode(e).finish()})};function z(){return{contractAddress:"",deployerAddress:""}}var L={typeUrl:"/evmos.revenue.v1.MsgCancelRevenue",encode:(e,t=d.Writer.create())=>(""!==e.contractAddress&&t.uint32(10).string(e.contractAddress),""!==e.deployerAddress&&t.uint32(18).string(e.deployerAddress),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=z();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.contractAddress=r.string();break;case 2:i.deployerAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({contractAddress:(0,o.vM)(e.contractAddress)?String(e.contractAddress):"",deployerAddress:(0,o.vM)(e.deployerAddress)?String(e.deployerAddress):""}),toJSON(e){let t={};return void 0!==e.contractAddress&&(t.contractAddress=e.contractAddress),void 0!==e.deployerAddress&&(t.deployerAddress=e.deployerAddress),t},fromPartial(e){let t=z();return t.contractAddress=e.contractAddress??"",t.deployerAddress=e.deployerAddress??"",t},fromAmino(e){let t=z();return void 0!==e.contract_address&&null!==e.contract_address&&(t.contractAddress=e.contract_address),void 0!==e.deployer_address&&null!==e.deployer_address&&(t.deployerAddress=e.deployer_address),t},toAmino(e){let t={};return t.contract_address=""===e.contractAddress?void 0:e.contractAddress,t.deployer_address=""===e.deployerAddress?void 0:e.deployerAddress,t},fromAminoMsg:e=>L.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgCancelRevenue",value:L.toAmino(e)}),fromProtoMsg:e=>L.decode(e.value),toProto:e=>L.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.revenue.v1.MsgCancelRevenue",value:L.encode(e).finish()})};function q(){return{authority:"",params:D.fromPartial({})}}var V={typeUrl:"/evmos.revenue.v1.MsgUpdateParams",encode:(e,t=d.Writer.create())=>(""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&D.encode(e.params,t.uint32(18).fork()).ldelim(),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=q();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.authority=r.string();break;case 2:i.params=D.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({authority:(0,o.vM)(e.authority)?String(e.authority):"",params:(0,o.vM)(e.params)?D.fromJSON(e.params):void 0}),toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?D.toJSON(e.params):void 0),t},fromPartial(e){let t=q();return t.authority=e.authority??"",t.params=void 0!==e.params&&null!==e.params?D.fromPartial(e.params):void 0,t},fromAmino(e){let t=q();return void 0!==e.authority&&null!==e.authority&&(t.authority=e.authority),void 0!==e.params&&null!==e.params&&(t.params=D.fromAmino(e.params)),t},toAmino(e){let t={};return t.authority=""===e.authority?void 0:e.authority,t.params=e.params?D.toAmino(e.params):void 0,t},fromAminoMsg:e=>V.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgUpdateParams",value:V.toAmino(e)}),fromProtoMsg:e=>V.decode(e.value),toProto:e=>V.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.revenue.v1.MsgUpdateParams",value:V.encode(e).finish()})},H=[["/evmos.revenue.v1.MsgRegisterRevenue",$],["/evmos.revenue.v1.MsgUpdateRevenue",j],["/evmos.revenue.v1.MsgCancelRevenue",L],["/evmos.revenue.v1.MsgUpdateParams",V]];function G(){return{funderAddress:"",vestingAddress:"",enableGovClawback:!1}}var W={typeUrl:"/evmos.vesting.v2.MsgCreateClawbackVestingAccount",encode:(e,t=d.Writer.create())=>(""!==e.funderAddress&&t.uint32(10).string(e.funderAddress),""!==e.vestingAddress&&t.uint32(18).string(e.vestingAddress),!0===e.enableGovClawback&&t.uint32(24).bool(e.enableGovClawback),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=G();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.funderAddress=r.string();break;case 2:i.vestingAddress=r.string();break;case 3:i.enableGovClawback=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({funderAddress:(0,o.vM)(e.funderAddress)?String(e.funderAddress):"",vestingAddress:(0,o.vM)(e.vestingAddress)?String(e.vestingAddress):"",enableGovClawback:!!(0,o.vM)(e.enableGovClawback)&&!!e.enableGovClawback}),toJSON(e){let t={};return void 0!==e.funderAddress&&(t.funderAddress=e.funderAddress),void 0!==e.vestingAddress&&(t.vestingAddress=e.vestingAddress),void 0!==e.enableGovClawback&&(t.enableGovClawback=e.enableGovClawback),t},fromPartial(e){let t=G();return t.funderAddress=e.funderAddress??"",t.vestingAddress=e.vestingAddress??"",t.enableGovClawback=e.enableGovClawback??!1,t},fromAmino(e){let t=G();return void 0!==e.funder_address&&null!==e.funder_address&&(t.funderAddress=e.funder_address),void 0!==e.vesting_address&&null!==e.vesting_address&&(t.vestingAddress=e.vesting_address),void 0!==e.enable_gov_clawback&&null!==e.enable_gov_clawback&&(t.enableGovClawback=e.enable_gov_clawback),t},toAmino(e){let t={};return t.funder_address=""===e.funderAddress?void 0:e.funderAddress,t.vesting_address=""===e.vestingAddress?void 0:e.vestingAddress,t.enable_gov_clawback=!1===e.enableGovClawback?void 0:e.enableGovClawback,t},fromAminoMsg:e=>W.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgCreateClawbackVestingAccount",value:W.toAmino(e)}),fromProtoMsg:e=>W.decode(e.value),toProto:e=>W.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.MsgCreateClawbackVestingAccount",value:W.encode(e).finish()})};function J(){return{funderAddress:"",vestingAddress:"",startTime:new Date,lockupPeriods:[],vestingPeriods:[]}}var Z={typeUrl:"/evmos.vesting.v2.MsgFundVestingAccount",encode(e,t=d.Writer.create()){for(let r of(""!==e.funderAddress&&t.uint32(10).string(e.funderAddress),""!==e.vestingAddress&&t.uint32(18).string(e.vestingAddress),void 0!==e.startTime&&i.Dc.encode((0,o.C)(e.startTime),t.uint32(26).fork()).ldelim(),e.lockupPeriods))i.aA.encode(r,t.uint32(34).fork()).ldelim();for(let r of e.vestingPeriods)i.aA.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,s=J();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:s.funderAddress=r.string();break;case 2:s.vestingAddress=r.string();break;case 3:s.startTime=(0,o.z)(i.Dc.decode(r,r.uint32()));break;case 4:s.lockupPeriods.push(i.aA.decode(r,r.uint32()));break;case 5:s.vestingPeriods.push(i.aA.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON:e=>({funderAddress:(0,o.vM)(e.funderAddress)?String(e.funderAddress):"",vestingAddress:(0,o.vM)(e.vestingAddress)?String(e.vestingAddress):"",startTime:(0,o.vM)(e.startTime)?(0,o.d4)(e.startTime):void 0,lockupPeriods:Array.isArray(e?.lockupPeriods)?e.lockupPeriods.map(e=>i.aA.fromJSON(e)):[],vestingPeriods:Array.isArray(e?.vestingPeriods)?e.vestingPeriods.map(e=>i.aA.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.funderAddress&&(t.funderAddress=e.funderAddress),void 0!==e.vestingAddress&&(t.vestingAddress=e.vestingAddress),void 0!==e.startTime&&(t.startTime=e.startTime.toISOString()),e.lockupPeriods?t.lockupPeriods=e.lockupPeriods.map(e=>e?i.aA.toJSON(e):void 0):t.lockupPeriods=[],e.vestingPeriods?t.vestingPeriods=e.vestingPeriods.map(e=>e?i.aA.toJSON(e):void 0):t.vestingPeriods=[],t},fromPartial(e){let t=J();return t.funderAddress=e.funderAddress??"",t.vestingAddress=e.vestingAddress??"",t.startTime=e.startTime??void 0,t.lockupPeriods=e.lockupPeriods?.map(e=>i.aA.fromPartial(e))||[],t.vestingPeriods=e.vestingPeriods?.map(e=>i.aA.fromPartial(e))||[],t},fromAmino(e){let t=J();return void 0!==e.funder_add
29ress&&null!==e.funder_address&&(t.funderAddress=e.funder_address),void 0!==e.vesting_address&&null!==e.vesting_address&&(t.vestingAddress=e.vesting_address),void 0!==e.start_time&&null!==e.start_time&&(t.startTime=(0,o.z)(i.Dc.fromAmino(e.start_time))),t.lockupPeriods=e.lockup_periods?.map(e=>i.aA.fromAmino(e))||[],t.vestingPeriods=e.vesting_periods?.map(e=>i.aA.fromAmino(e))||[],t},toAmino(e){let t={};return t.funder_address=""===e.funderAddress?void 0:e.funderAddress,t.vesting_address=""===e.vestingAddress?void 0:e.vestingAddress,t.start_time=e.startTime?i.Dc.toAmino((0,o.C)(e.startTime)):void 0,e.lockupPeriods?t.lockup_periods=e.lockupPeriods.map(e=>e?i.aA.toAmino(e):void 0):t.lockup_periods=e.lockupPeriods,e.vestingPeriods?t.vesting_periods=e.vestingPeriods.map(e=>e?i.aA.toAmino(e):void 0):t.vesting_periods=e.vestingPeriods,t},fromAminoMsg:e=>Z.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgFundVestingAccount",value:Z.toAmino(e)}),fromProtoMsg:e=>Z.decode(e.value),toProto:e=>Z.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.MsgFundVestingAccount",value:Z.encode(e).finish()})};function K(){return{funderAddress:"",accountAddress:"",destAddress:""}}var Y={typeUrl:"/evmos.vesting.v2.MsgClawback",encode:(e,t=d.Writer.create())=>(""!==e.funderAddress&&t.uint32(10).string(e.funderAddress),""!==e.accountAddress&&t.uint32(18).string(e.accountAddress),""!==e.destAddress&&t.uint32(26).string(e.destAddress),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=K();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.funderAddress=r.string();break;case 2:i.accountAddress=r.string();break;case 3:i.destAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({funderAddress:(0,o.vM)(e.funderAddress)?String(e.funderAddress):"",accountAddress:(0,o.vM)(e.accountAddress)?String(e.accountAddress):"",destAddress:(0,o.vM)(e.destAddress)?String(e.destAddress):""}),toJSON(e){let t={};return void 0!==e.funderAddress&&(t.funderAddress=e.funderAddress),void 0!==e.accountAddress&&(t.accountAddress=e.accountAddress),void 0!==e.destAddress&&(t.destAddress=e.destAddress),t},fromPartial(e){let t=K();return t.funderAddress=e.funderAddress??"",t.accountAddress=e.accountAddress??"",t.destAddress=e.destAddress??"",t},fromAmino(e){let t=K();return void 0!==e.funder_address&&null!==e.funder_address&&(t.funderAddress=e.funder_address),void 0!==e.account_address&&null!==e.account_address&&(t.accountAddress=e.account_address),void 0!==e.dest_address&&null!==e.dest_address&&(t.destAddress=e.dest_address),t},toAmino(e){let t={};return t.funder_address=""===e.funderAddress?void 0:e.funderAddress,t.account_address=""===e.accountAddress?void 0:e.accountAddress,t.dest_address=""===e.destAddress?void 0:e.destAddress,t},fromAminoMsg:e=>Y.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgClawback",value:Y.toAmino(e)}),fromProtoMsg:e=>Y.decode(e.value),toProto:e=>Y.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.MsgClawback",value:Y.encode(e).finish()})};function X(){return{funderAddress:"",newFunderAddress:"",vestingAddress:""}}var Q={typeUrl:"/evmos.vesting.v2.MsgUpdateVestingFunder",encode:(e,t=d.Writer.create())=>(""!==e.funderAddress&&t.uint32(10).string(e.funderAddress),""!==e.newFunderAddress&&t.uint32(18).string(e.newFunderAddress),""!==e.vestingAddress&&t.uint32(26).string(e.vestingAddress),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=X();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:i.funderAddress=r.string();break;case 2:i.newFunderAddress=r.string();break;case 3:i.vestingAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({funderAddress:(0,o.vM)(e.funderAddress)?String(e.funderAddress):"",newFunderAddress:(0,o.vM)(e.newFunderAddress)?String(e.newFunderAddress):"",vestingAddress:(0,o.vM)(e.vestingAddress)?String(e.vestingAddress):""}),toJSON(e){let t={};return void 0!==e.funderAddress&&(t.funderAddress=e.funderAddress),void 0!==e.newFunderAddress&&(t.newFunderAddress=e.newFunderAddress),void 0!==e.vestingAddress&&(t.vestingAddress=e.vestingAddress),t},fromPartial(e){let t=X();return t.funderAddress=e.funderAddress??"",t.newFunderAddress=e.newFunderAddress??"",t.vestingAddress=e.vestingAddress??"",t},fromAmino(e){let t=X();return void 0!==e.funder_address&&null!==e.funder_address&&(t.funderAddress=e.funder_address),void 0!==e.new_funder_address&&null!==e.new_funder_address&&(t.newFunderAddress=e.new_funder_address),void 0!==e.vesting_address&&null!==e.vesting_address&&(t.vestingAddress=e.vesting_address),t},toAmino(e){let t={};return t.funder_address=""===e.funderAddress?void 0:e.funderAddress,t.new_funder_address=""===e.newFunderAddress?void 0:e.newFunderAddress,t.vesting_address=""===e.vestingAddress?void 0:e.vestingAddress,t},fromAminoMsg:e=>Q.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgUpdateVestingFunder",value:Q.toAmino(e)}),fromProtoMsg:e=>Q.decode(e.value),toProto:e=>Q.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.MsgUpdateVestingFunder",value:Q.encode(e).finish()})};function ee(){return{vestingAddress:""}}var et={typeUrl:"/evmos.vesting.v2.MsgConvertVestingAccount",encode:(e,t=d.Writer.create())=>(""!==e.vestingAddress&&t.uint32(10).string(e.vestingAddress),t),decode(e,t){let r=e instanceof d.Reader?e:new d.Reader(e),n=void 0===t?r.len:r.pos+t,i=ee();for(;r.pos<n;){let e=r.uint32();e>>>3==1?i.vestingAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({vestingAddress:(0,o.vM)(e.vestingAddress)?String(e.vestingAddress):""}),toJSON(e){let t={};return void 0!==e.vestingAddress&&(t.vestingAddress=e.vestingAddress),t},fromPartial(e){let t=ee();return t.vestingAddress=e.vestingAddress??"",t},fromAmino(e){let t=ee();return void 0!==e.vesting_address&&null!==e.vesting_address&&(t.vestingAddress=e.vesting_address),t},toAmino(e){let t={};return t.vesting_address=""===e.vestingAddress?void 0:e.vestingAddress,t},fromAminoMsg:e=>et.fromAmino(e.value),toAminoMsg:e=>({type:"evmos/MsgConvertVestingAccount",value:et.toAmino(e)}),fromProtoMsg:e=>et.decode(e.value),toProto:e=>et.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/evmos.vesting.v2.MsgConvertVestingAccount",value:et.encode(e).finish()})},er=[["/evmos.vesting.v2.MsgCreateClawbackVestingAccount",W],["/evmos.vesting.v2.MsgFundVestingAccount",Z],["/evmos.vesting.v2.MsgClawback",Y],["/evmos.vesting.v2.MsgUpdateVestingFunder",Q],["/evmos.vesting.v2.MsgConvertVestingAccount",et]],en={"/evmos.erc20.v1.MsgConvertCoin":{aminoType:"evmos/MsgConvertCoin",toAmino:w.toAmino,fromAmino:w.fromAmino},"/evmos.erc20.v1.MsgConvertERC20":{aminoType:"evmos/MsgConvertERC20",toAmino:x.toAmino,fromAmino:x.fromAmino},"/evmos.erc20.v1.MsgUpdateParams":{aminoType:"evmos/erc20/MsgUpdateParams",toAmino:M.toAmino,fromAmino:M.fromAmino}},ei={"/evmos.inflation.v1.MsgUpdateParams":{aminoType:"evmos/inflation/MsgUpdateParams",toAmino:R.toAmino,fromAmino:R.fromAmino}},eo={"/evmos.revenue.v1.MsgRegisterRevenue":{aminoType:"evmos/MsgRegisterRevenue",toAmino:$.toAmino,fromAmino:$.fromAmino},"/evmos.revenue.v1.MsgUpdateRevenue":{aminoType:"evmos/MsgUpdateRevenue",toAmino:j.toAmino,fromAmino:j.fromAmino},"/evmos.revenue.v1.MsgCancelRevenue":{aminoType:"evmos/MsgCancelRevenue",toAmino:L.toAmino,fromAmino:L.fromAmino},"/evmos.revenue.v1.MsgUpdateParams":{aminoType:"evmos/MsgUpdateParams",toAmino:V.toAmino,fromAmino:V.fromAmino}},es={"/evmos.vesting.v2.MsgCreateClawbackVestingAccount":{aminoType:"evmos/MsgCreateClawbackVestingAccount",toAmino:W.toAmino,fromAmino:W.fromAmino},"/evmos.vesting.v2.MsgFundVestingAccount":{aminoType:"evmos/MsgFundVestingAccount",toAmino:Z.toAmino,fromAmino:Z.fromAmino},"/evmos.vesting.v2.MsgClawback":{aminoType:"evmos/MsgClawback",toAmino:Y.toAmino,fromAmino:Y.fromAmino},"/evmos.vesting.v2.MsgUpdateVestingFunder":{aminoType:"evmos/MsgUpdateVestingFunder",toAmino:Q.toAmino,fromAmino:Q.fromAmino},"/evmos.vesting.v2.MsgConvertVestingAccount":{aminoType:"evmos/MsgConvertVestingAccount",toAmino:et.toAmino,fromAmino:et.fromAmino}},ea={...en,...ei,...eo,...es},ec=[...T,...O,...H,...er],eu={...{"/initia.move.v1.MsgExecute":{am
29inoType:"/initia.move.v1.MsgExecute",toAmino:i.V_.toAmino,fromAmino:i.V_.fromAmino}}},el={...{"/opinit.ophost.v1.MsgInitiateTokenDeposit":{aminoType:"ophost/MsgInitiateTokenDeposit",toAmino:i.gF.toAmino,fromAmino:i.gF.fromAmino}}},ed=(e={})=>{if(a.Lg.endpointOptions=e.endpointOptions??{},a.Lg.aminoTypes=new c.AminoTypes({...(0,c.createDefaultAminoConverters)(),...(0,u.A$)(),...h,...ea,...eu,...el,...e.aminoTypes??{}}),a.Lg.registry=new l.Registry([...c.defaultRegistryTypes,["/cosmwasm.wasm.v1.MsgExecuteContract",m.MsgExecuteContract],["/initia.move.v1.MsgExecute",i.V_],["/opinit.ophost.v1.MsgInitiateTokenDeposit",i.gF],...g,...ec,...e.registryTypes??[]]),!e.allowOptionsUpdateAfterApiCall&&n.yy.apiCalled&&!n.yy.initialized)throw Error("setClientOptions must be called before an api request is made");((e={})=>{if(n.yy.client=(0,n.HF)({apiUrl:e.apiUrl||"https://api.skip.build",apiKey:e.apiKey,apiHeaders:e.apiHeaders}),e.chainIdsToAffiliates&&(n.yy.cumulativeAffiliateFeeBPS=function(e){let t=Object.values(e).map(e=>e.affiliates).filter(e=>void 0!==e),r=t[0]?.reduce((e,t)=>{if(!t.basisPointsFee)throw Error("basisPointFee must exist in each affiliate");return e+parseInt(t.basisPointsFee,10)},0);if(!t.every(e=>e.reduce((e,t)=>{if(!t.basisPointsFee)throw Error("basisPointFee must exist in each affiliate");if(!t.address)throw Error("address to receive fee must exist in each affiliate");return e+parseInt(t?.basisPointsFee,10)},0)===r))throw Error("basisPointFee does not add up to the same number for each chain in chainIdsToAffiliates");return r?.toFixed(0)}(e.chainIdsToAffiliates),n.yy.chainIdsToAffiliates=e.chainIdsToAffiliates),!e.allowOptionsUpdateAfterApiCall&&n.yy.apiCalled&&!n.yy.initialized)throw Error("setApiOptions must be called before an api request is made");n.yy.initialized=!0})(e)}},69564:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(98770),i=r(956);async function o(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new n.Kc({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||i.uL)(r,"getTransactionReceipt")}},69819:(e,t,r)=>{r.d(t,{H2:()=>s,Ty:()=>i,u:()=>a,xO:()=>o});var n=r(97461);class i extends n.C{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class o extends n.C{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class s extends n.C{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}n.C;class a extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},70416:(e,t,r)=>{e.exports=o;var n=r(50193);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(11238);function o(){n.call(this)}function s(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},o.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},o._configure()},70490:(e,t,r)=>{r.d(t,{_o:()=>y,Pj:()=>h,uT:()=>d,NV:()=>g});var n=r(78771),i=r(20368),o=r(73118),s=r(88603),a=r(75422);class c extends a.C{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let u=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var l=r(4171);function d(e,t={}){if((0,l.Ji)(e))return function(e,t={}){let r=(0,l.ej)(e);if(!r)throw new s.s7({signature:e,type:"function"});let n=g(r.parameters),i=[],o=n.length;for(let e=0;e<o;e++)i.push(h(n[e],{modifiers:l.v7,structs:t,type:"function"}));let a=[];if(r.returns){let e=g(r.returns),n=e.length;for(let r=0;r<n;r++)a.push(h(e[r],{modifiers:l.v7,structs:t,type:"function"}))}return{name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:i,outputs:a}}(e,t);if((0,l.Rv)(e))return function(e,t={}){let r=(0,l.iB)(e);if(!r)throw new s.s7({signature:e,type:"event"});let n=g(r.parameters),i=[],o=n.length;for(let e=0;e<o;e++)i.push(h(n[e],{modifiers:l.fC,structs:t,type:"event"}));return{name:r.name,type:"event",inputs:i}}(e,t);if((0,l.pc)(e))return function(e,t={}){let r=(0,l.kz)(e);if(!r)throw new s.s7({signature:e,type:"error"});let n=g(r.parameters),i=[],o=n.length;for(let e=0;e<o;e++)i.push(h(n[e],{structs:t,type:"error"}));return{name:r.name,type:"error",inputs:i}}(e,t);if((0,l.l9)(e))return function(e,t={}){let r=(0,l.Yo)(e);if(!r)throw new s.s7({signature:e,type:"constructor"});let n=g(r.parameters),i=[],o=n.length;for(let e=0;e<o;e++)i.push(h(n[e],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:i}}(e,t);if((0,l.v8)(e)){var r=e;let t=(0,l.If)(r);if(!t)throw new s.s7({signature:r,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}if((0,l.sP)(e))return{type:"receive",stateMutability:"payable"};throw new s.x8({signature:e})}let f=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,m=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function h(e,t){var r,s;let a,c=function(e,t,r){let n="";if(r)for(let e of Object.entries(r)){if(!e)continue;let t="";for(let r of e[1])t+=`[${r.type}${r.name?`:${r.name}`:""}]`;n+=`(${e[0]}{${t}})`}return t?`${t}:${e}${n}`:`${e}${n}`}(e,t?.type,t?.structs);if(u.has(c))return u.get(c);let d=n.wj.test(e),v=(0,n.Yv)(d?m:f,e);if(!v)throw new o.dV({param:e});if(v.name&&("address"===(r=v.name)||"bool"===r||"function"===r||"string"===r||"tuple"===r||n.BD.test(r)||n.Ge.test(r)||b.test(r)))throw new o.zd({param:e,name:v.name});let w=v.name?{name:v.name}:{},A="indexed"===v.modifier?{indexed:!0}:{},x=t?.structs??{},P={};if(d){a="tuple";let e=g(v.type),t=[],r=e.length;for(let n=0;n<r;n++)t.push(h(e[n],{structs:x}));P={components:t}}else if(v.type in x)a="tuple",P={components:x[v.type]};else if(p.test(v.type))a=`${v.type}256`;else if("address payable"===v.type)a="address";else if(a=v.type,t?.type!=="struct"&&!y(a))throw new i.UG({type:a});if(v.modifier){if(!t?.modifiers?.has?.(v.modifier))throw new o.NO({param:e,type:t?.type,modifier:v.modifier});if(l.v7.has(v.modifier)&&(s=a,!v.array&&"bytes"!==s&&"string"!==s&&"tuple"!==s))throw new o.Pj({param:e,type:t?.type,modifier:v.modifier})}let M={type:`${a}${v.array??""}`,...w,...A,...P};return u.set(c,M),M}function g(e,t=[],r="",n=0){let i=e.trim().length;for(let o=0;o<i;o++){let i=e[o],s=e.slice(o+1);switch(i){case",":return 0===n?g(s,[...t,r.trim()]):g(s,t,`${r}${i}`,n);case"(":return g(s,t,`${r}${i}`,n+1);case")":return g(s,t,`${r}${i}`,n-1);default:return g(s,t,`${r}${i}`,n)}}if(""===r)return t;if(0!==n)throw new c({current:r,depth:n});return t.push(r.trim()),t}function y(e){return"address"===e||"bool"===e||"function"===e||"string"===e||n.BD.test(e)||n.Ge.test(e)}let b=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/},70902:(e,t,r)=>{r.d(t,{L:()=>n});async function n(e){return BigInt(await e.request({method:"eth_gasPrice"}))}},71179:(e,t,r)=>
29{Object.defineProperty(t,"__esModule",{value:!0}),t.IntPretty=void 0;let n=r(66858),i=r(65821),o=r(63498);class s{constructor(e){if(this.floatingDecimalPointRight=0,this._options={maxDecimals:0,trim:!1,shrink:!1,ready:!0,locale:!0,inequalitySymbol:!1,inequalitySymbolSeparator:" ",sign:!1,roundTo:void 0},"object"==typeof e&&"toDec"in e?e=e.toDec():e instanceof n.Dec||(e=new n.Dec(e)),e.isZero()){this.dec=e;return}let t=e.toString(),r=t.indexOf(".");if(-1===r){this.dec=e,this._options.maxDecimals=0;return}let i=t.slice(r+1),o=0;for(let e=i.length-1;e>=0&&"0"===i[e];e--)o++;let s=i.length-o;this.dec=e,this._options.maxDecimals=s}get options(){return this._options}moveDecimalPointLeft(e){let t=this.clone();return t.floatingDecimalPointRight+=-e,t}moveDecimalPointRight(e){let t=this.clone();return t.floatingDecimalPointRight+=e,t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t._options.maxDecimals=e,t}inequalitySymbol(e){let t=this.clone();return t._options.inequalitySymbol=e,t}inequalitySymbolSeparator(e){let t=this.clone();return t._options.inequalitySymbolSeparator=e,t}trim(e){let t=this.clone();return t._options.trim=e,t}shrink(e){let t=this.clone();return t._options.shrink=e,t}locale(e){let t=this.clone();return t._options.locale=e,t}sign(e){let t=this.clone();return t._options.sign=e,t}roundTo(e){let t=this.clone();return t._options.roundTo=e,t}ready(e){let t=this.clone();return t._options.ready=e,t}get isReady(){return this._options.ready}add(e){e instanceof n.Dec||(e=e.toDec());let t=new s(this.toDec().add(e));return t._options=Object.assign({},this._options),t}sub(e){e instanceof n.Dec||(e=e.toDec());let t=new s(this.toDec().sub(e));return t._options=Object.assign({},this._options),t}mul(e){e instanceof n.Dec||(e=e.toDec());let t=new s(this.toDec().mul(e));return t._options=Object.assign({},this._options),t}quo(e){e instanceof n.Dec||(e=e.toDec());let t=new s(this.toDec().quo(e));return t._options=Object.assign({},this._options),t}toDec(){if(0===this.floatingDecimalPointRight)return this.dec;{if(this.floatingDecimalPointRight>0)return this.dec.mulTruncate(i.DecUtils.getTenExponentN(this.floatingDecimalPointRight));let e=-this.floatingDecimalPointRight,t=this.dec;for(;e>0;)if(e>=n.Dec.precision)t=t.mulTruncate(i.DecUtils.getTenExponentN(-n.Dec.precision)),e-=n.Dec.precision;else{t=t.mulTruncate(i.DecUtils.getTenExponentN(-(e%n.Dec.precision)));break}return t}}toString(){return this.toStringWithSymbols("","")}toStringWithSymbols(e,t){let r,n=this.toDec();if(null!=this._options.roundTo&&this._options.roundTo>=1&&this._options.roundTo<=19&&(n=n.roundTo(this._options.roundTo)),this._options.inequalitySymbol&&!n.isZero()&&n.abs().lt(i.DecUtils.getTenExponentN(-this._options.maxDecimals))){let r=n.isNegative(),o="";return r?o="-":this._options.sign&&!n.isZero()&&(o="+"),`${r?">":"<"}${this._options.inequalitySymbolSeparator}${o}${e}${i.DecUtils.getTenExponentN(-this._options.maxDecimals).toString(this._options.maxDecimals,this._options.locale)}${t}`}r=this._options.shrink?o.CoinUtils.shrinkDecimals(n,0,this._options.maxDecimals,this._options.locale):n.toString(this._options.maxDecimals,this._options.locale),this._options.trim&&(r=i.DecUtils.trim(r));let s="-"===r.charAt(0);return s?r=r.slice(1):this._options.sign&&!n.isZero()&&(r=`+${r}`),`${s?"-":""}${e}${r}${t}`}clone(){return Object.setPrototypeOf({dec:this.dec,floatingDecimalPointRight:this.floatingDecimalPointRight,_options:Object.assign({},this._options)},s.prototype)}}t.IntPretty=s},72632:(e,t,r)=>{r.d(t,{c:()=>o});var n=r(43482),i=r(41091);function o(e,t="wei"){return(0,i.J)(e,n.eL[t])}},72979:(e,t,r)=>{r.d(t,{J:()=>n});function n(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},73118:(e,t,r)=>{r.d(t,{A9:()=>i,NO:()=>a,Pj:()=>c,dV:()=>o,nx:()=>u,zd:()=>s});var n=r(75422);n.C;class i extends n.C{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class o extends n.C{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class s extends n.C{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class a extends n.C{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class c extends n.C{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class u extends n.C{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invali
29d."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}},73906:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},74606:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,t){return({exclude:r,format:n})=>({exclude:r,format:(e,i)=>{let o=t(e,i);if(r)for(let e of r)delete o[e];return{...o,...n(e,i)}},type:e})}},74646:(e,t,r)=>{r.d(t,{l:()=>o});var n=r(97461),i=r(82334);function o(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof n.C?e.walk(e=>e?.code===i.A7.code):e;return o instanceof n.C?new i.A7({cause:e,message:o.details}):i.A7.nodeMessage.test(r)?new i.A7({cause:e,message:e.details}):i.BG.nodeMessage.test(r)?new i.BG({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.jj.nodeMessage.test(r)?new i.jj({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.K0.nodeMessage.test(r)?new i.K0({cause:e,nonce:t?.nonce}):i.Oh.nodeMessage.test(r)?new i.Oh({cause:e,nonce:t?.nonce}):i.vW.nodeMessage.test(r)?new i.vW({cause:e,nonce:t?.nonce}):i.k5.nodeMessage.test(r)?new i.k5({cause:e}):i.lY.nodeMessage.test(r)?new i.lY({cause:e,gas:t?.gas}):i.Fo.nodeMessage.test(r)?new i.Fo({cause:e,gas:t?.gas}):i.uC.nodeMessage.test(r)?new i.uC({cause:e}):i.lN.nodeMessage.test(r)?new i.lN({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.RM({cause:e})}},75084:(e,t,r)=>{r.d(t,{ev:()=>M});var n=r(86895),i=r(28599),o=r(24004),s=r(10727),a=r(14697);let c=BigInt(0),u=BigInt(1),l=BigInt(2),d=BigInt(8);class f{constructor(e){this.ep=e}static fromBytes(e){(0,s.SJ)()}static fromHex(e){(0,s.SJ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return(0,i.My)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}(0,i.AI)("HashToScalar-");let m=BigInt(0),p=BigInt(1),h=BigInt(2);BigInt(3);let g=BigInt(5),y=BigInt(8),b=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),v={p:b,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:y,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")},w=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function A(e,t){let r=(0,a.zi)(t*t*t,b),n=function(e){let t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=e*e%b*e%b,s=(0,a.zH)(o,h,b)*o%b,c=(0,a.zH)(s,p,b)*e%b,u=(0,a.zH)(c,g,b)*c%b,l=(0,a.zH)(u,t,b)*u%b,d=(0,a.zH)(l,r,b)*l%b,f=(0,a.zH)(d,n,b)*d%b,m=(0,a.zH)(f,i,b)*f%b,y=(0,a.zH)(m,i,b)*f%b,v=(0,a.zH)(y,t,b)*u%b;return{pow_p_5_8:(0,a.zH)(v,h,b)*e%b,b2:o}}(e*(0,a.zi)(r*r*t,b)).pow_p_5_8,i=(0,a.zi)(e*r*n,b),o=(0,a.zi)(t*i*i,b),s=i,c=(0,a.zi)(i*w,b),u=o===e,l=o===(0,a.zi)(-e,b),d=o===(0,a.zi)(-e*w,b);return u&&(i=s),(l||d)&&(i=c),(0,a.dQ)(i,b)&&(i=(0,a.zi)(-i,b)),{isValid:u||l,value:i}}let x=(0,a.D0)(v.p,{isLE:!0}),P=(0,a.D0)(v.n,{isLE:!0}),M=function(e){let{CURVE:t,curveOpts:r,hash:n,eddsaOpts:f}=function(e){let t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r={Fp:e.Fp,Fn:(0,a.D0)(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},n={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:r,hash:e.hash,eddsaOpts:n}}(e),m=function(e,t,r={}){if("function"!=typeof t)throw Error('"hash" function param is required');(0,s.DS)(r,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:n}=r,{BASE:o,Fp:a,Fn:c}=e,l=r.randomBytes||i.po,d=r.adjustScalarBytes||(e=>e),f=r.domain||((e,t,r)=>{if((0,s.d6)(r,"phflag"),t.length||r)throw Error("Contexts/pre-hash are not supported");return e});function m(e){return c.create((0,s.lX)(e))}function p(e){let{head:r,prefix:n,scalar:i}=function(e){let r=v.secretKey;e=(0,s.qj)("private key",e,r);let n=(0,s.qj)("hashed private key",t(e),2*r),i=d(n.slice(0,r)),o=n.slice(r,2*r),a=m(i);return{head:i,prefix:o,scalar:a}}(e),a=o.multiply(i),c=a.toBytes();return{head:r,prefix:n,scalar:i,point:a,pointBytes:c}}function h(e){return p(e).pointBytes}function g(e=Uint8Array.of(),...r){return m(t(f((0,i.Id)(...r),(0,s.qj)("context",e),!!n)))}let y={zip215:!0},b=a.BYTES,v={secretKey:b,publicKey:b,signature:2*b,seed:b};function w(e=l(v.seed)){return(0,s.eV)(e,v.seed,"seed")}let A={getExtendedPublicKey:p,randomSecretKey:w,isValidSecretKey:function(e){return(0,i.aY)(e)&&e.length===c.BYTES},isValidPublicKey:function(t,r){try{return!!e.fromBytes(t,r)}catch(e){return!1}},toMontgomery(t){let{y:r}=e.fromBytes(t),n=v.publicKey,i=32===n;if(!i&&57!==n)throw Error("only defined for 25519 and 448");let o=i?a.div(u+r,u-r):a.div(r-u,r+u);return a.toBytes(o)},toMontgomerySecret(e){let r=v.secretKey;return(0,s.eV)(e,r),d(t(e.subarray(0,r))).subarray(0,r)},randomPrivateKey:w,precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};return Object.freeze({keygen:function(e){let t=A.randomSecretKey(e);return{secretKey:t,publicKey:h(t)}},getPublicKey:h,sign:function(e,t,r={}){e=(0,s.qj)("message",e),n&&(e=n(e));let{prefix:a,scalar:u,pointBytes:l}=p(t),d=g(r.context,a,e),f=o.multiply(d).toBytes(),m=g(r.context,f,l,e),h=c.create(d+m*u);
29if(!c.isValid(h))throw Error("sign failed: invalid s");let y=(0,i.Id)(f,c.toBytes(h));return(0,s.eV)(y,v.signature,"result")},verify:function(t,r,i,a=y){let c,u,l,{context:d,zip215:f}=a,m=v.signature;t=(0,s.qj)("signature",t,m),r=(0,s.qj)("message",r),i=(0,s.qj)("publicKey",i,v.publicKey),void 0!==f&&(0,s.d6)(f,"zip215"),n&&(r=n(r));let p=m/2,h=t.subarray(0,p),b=(0,s.lX)(t.subarray(p,m));try{c=e.fromBytes(i,f),u=e.fromBytes(h,f),l=o.multiplyUnsafe(b)}catch(e){return!1}if(!f&&c.isSmallOrder())return!1;let w=g(d,u.toBytes(),c.toBytes(),r);return u.add(c.multiplyUnsafe(w)).subtract(l).clearCofactor().is0()},utils:A,Point:e,lengths:v})}(function(e,t={}){let r=(0,o.UT)("edwards",e,t,t.FpFnLE),{Fp:n,Fn:a}=r,f=r.CURVE,{h:m}=f;(0,s.DS)(t,{},{uvRatio:"function"});let p=l<<BigInt(8*a.BYTES)-u,h=e=>n.create(e),g=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(n.div(e,t))}}catch(e){return{isValid:!1,value:c}}});if(!function(e,t,r,n){let i=e.sqr(r),o=e.sqr(n),s=e.add(e.mul(t.a,i),o),a=e.add(e.ONE,e.mul(t.d,e.mul(i,o)));return e.eql(s,a)}(n,f,f.Gx,f.Gy))throw Error("bad curve params: generator point");function y(e,t,r=!1){let n=r?u:c;return(0,s.aK)("coordinate "+e,t,n,p),t}function b(e){if(!(e instanceof A))throw Error("ExtendedPoint expected")}let v=(0,s.x)((e,t)=>{let{X:r,Y:i,Z:o}=e,s=e.is0();null==t&&(t=s?d:n.inv(o));let a=h(r*t),l=h(i*t),f=n.mul(o,t);if(s)return{x:c,y:u};if(f!==u)throw Error("invZ was invalid");return{x:a,y:l}}),w=(0,s.x)(e=>{let{a:t,d:r}=f;if(e.is0())throw Error("bad point: ZERO");let{X:n,Y:i,Z:o,T:s}=e,a=h(n*n),c=h(i*i),u=h(o*o),l=h(u*u),d=h(a*t);if(h(u*h(d+c))!==h(l+h(r*h(a*c))))throw Error("bad point: equation left != right (1)");if(h(n*i)!==h(o*s))throw Error("bad point: equation left != right (2)");return!0});class A{constructor(e,t,r,n){this.X=y("x",e),this.Y=y("y",t),this.Z=y("z",r,!0),this.T=y("t",n),Object.freeze(this)}static CURVE(){return f}static fromAffine(e){if(e instanceof A)throw Error("extended point not allowed");let{x:t,y:r}=e||{};return y("x",t),y("y",r),new A(t,r,u,h(t*r))}static fromBytes(e,t=!1){let r=n.BYTES,{a:i,d:o}=f;e=(0,s.nC)((0,s.eV)(e,r,"point")),(0,s.d6)(t,"zip215");let a=(0,s.nC)(e),l=e[r-1];a[r-1]=-129&l;let d=(0,s.lX)(a),m=t?p:n.ORDER;(0,s.aK)("point.y",d,c,m);let y=h(d*d),{isValid:b,value:v}=g(h(y-u),h(o*y-i));if(!b)throw Error("bad point: invalid y coordinate");let w=(v&u)===u,x=(128&l)!=0;if(!t&&v===c&&x)throw Error("bad point: x=0 and x_0=1");return x!==w&&(v=h(-v)),A.fromAffine({x:v,y:d})}static fromHex(e,t=!1){return A.fromBytes((0,s.qj)("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return x.createCache(this,e),t||this.multiply(l),this}assertValidity(){w(this)}equals(e){b(e);let{X:t,Y:r,Z:n}=this,{X:i,Y:o,Z:s}=e,a=h(t*s),c=h(i*n),u=h(r*s),l=h(o*n);return a===c&&u===l}is0(){return this.equals(A.ZERO)}negate(){return new A(h(-this.X),this.Y,this.Z,h(-this.T))}double(){let{a:e}=f,{X:t,Y:r,Z:n}=this,i=h(t*t),o=h(r*r),s=h(l*h(n*n)),a=h(e*i),c=t+r,u=h(h(c*c)-i-o),d=a+o,m=d-s,p=a-o,g=h(u*m),y=h(d*p),b=h(u*p);return new A(g,y,h(m*d),b)}add(e){b(e);let{a:t,d:r}=f,{X:n,Y:i,Z:o,T:s}=this,{X:a,Y:c,Z:u,T:l}=e,d=h(n*a),m=h(i*c),p=h(s*r*l),g=h(o*u),y=h((n+i)*(a+c)-d-m),v=g-p,w=g+p,x=h(m-t*d),P=h(y*v),M=h(w*x),T=h(y*x);return new A(P,M,h(v*w),T)}subtract(e){return this.add(e.negate())}multiply(e){if(!a.isValidNot0(e))throw Error("invalid scalar: expected 1 <= sc < curve.n");let{p:t,f:r}=x.cached(this,e,e=>(0,o.Ak)(A,e));return(0,o.Ak)(A,[t,r])[0]}multiplyUnsafe(e,t=A.ZERO){if(!a.isValid(e))throw Error("invalid scalar: expected 0 <= sc < curve.n");return e===c?A.ZERO:this.is0()||e===u?this:x.unsafe(this,e,e=>(0,o.Ak)(A,e),t)}isSmallOrder(){return this.multiplyUnsafe(m).is0()}isTorsionFree(){return x.unsafe(this,f.n).is0()}toAffine(e){return v(this,e)}clearCofactor(){return m===u?this:this.multiplyUnsafe(m)}toBytes(){let{x:e,y:t}=this.toAffine(),r=n.toBytes(t);return r[r.length-1]|=e&u?128:0,r}toHex(){return(0,i.My)(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return(0,o.Ak)(A,e)}static msm(e,t){return(0,o.Xf)(A,a,e,t)}
29_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}A.BASE=new A(f.Gx,f.Gy,u,h(f.Gx*f.Gy)),A.ZERO=new A(c,u,u,c),A.Fp=n,A.Fn=a;let x=new o.hT(A,a.BITS);return A.BASE.precompute(8),A}(t,r),n,f),p=m.Point;return Object.assign({},m,{ExtendedPoint:p,CURVE:e,nBitLength:p.Fn.BITS,nByteLength:p.Fn.BYTES})}({...v,Fp:x,hash:n.Zf,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:A}),T=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),E=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),k=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),S=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),_=e=>A(p,e),I=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),B=e=>M.Point.Fp.create((0,s.lX)(e)&I);function C(e){let{d:t}=v,r=e=>x.create(e),n=r(w*e*e),i=r((n+p)*k),o=BigInt(-1),s=r((o-t*n)*r(n+t)),{isValid:c,value:u}=A(i,s),l=r(u*e);(0,a.dQ)(l,b)||(l=r(-l)),c||(u=l),c||(o=n);let d=r(o*(n-p)*S-s),f=u*u,m=r((u+u)*s),h=r(d*T),g=r(p-f),y=r(p+f);return new M.Point(r(m*y),r(g*h),r(h*y),r(m*g))}class R extends f{constructor(e){super(e)}static fromAffine(e){return new R(M.Point.fromAffine(e))}assertSame(e){if(!(e instanceof R))throw Error("RistrettoPoint expected")}init(e){return new R(e)}static hashToCurve(e){var t=(0,s.qj)("ristrettoHash",e,64);(0,i.DO)(t,64);let r=C(B(t.subarray(0,32))),n=C(B(t.subarray(32,64)));return new R(r.add(n))}static fromBytes(e){(0,i.DO)(e,32);let{a:t,d:r}=v,n=e=>x.create(e),o=B(e);if(!(0,s.ex)(x.toBytes(o),e)||(0,a.dQ)(o,b))throw Error("invalid ristretto255 encoding 1");let c=n(o*o),u=n(p+t*c),l=n(p-t*c),d=n(u*u),f=n(l*l),h=n(t*r*d-f),{isValid:g,value:y}=_(n(h*f)),w=n(y*l),A=n(y*w*h),P=n((o+o)*w);(0,a.dQ)(P,b)&&(P=n(-P));let T=n(u*A),E=n(P*T);if(!g||(0,a.dQ)(E,b)||T===m)throw Error("invalid ristretto255 encoding 2");return new R(new M.Point(P,T,p,E))}static fromHex(e){return R.fromBytes((0,s.qj)("ristrettoHex",e,32))}static msm(e,t){return(0,o.Xf)(R,M.Point.Fn,e,t)}toBytes(){let e,{X:t,Y:r,Z:n,T:i}=this.ep,o=e=>x.create(e),s=o(o(n+r)*o(n-r)),c=o(t*r),u=o(c*c),{value:l}=_(o(s*u)),d=o(l*s),f=o(l*c),m=o(d*f*i);if((0,a.dQ)(i*m,b)){let n=o(r*w),i=o(t*w);t=n,r=i,e=o(d*E)}else e=f;(0,a.dQ)(t*m,b)&&(r=o(-r));let p=o((n-r)*e);return(0,a.dQ)(p,b)&&(p=o(-p)),x.toBytes(p)}equals(e){this.assertSame(e);let{X:t,Y:r}=this.ep,{X:n,Y:i}=e.ep,o=e=>x.create(e),s=o(t*i)===o(r*n),a=o(r*i)===o(t*n);return s||a}is0(){return this.equals(R.ZERO)}}R.BASE=new R(M.Point.BASE),R.ZERO=new R(M.Point.ZERO),R.Fp=x,R.Fn=P},75422:(e,t,r)=>{r.d(t,{C:()=>n});class n extends Error{constructor(e,t={}){let r=t.cause instanceof n?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof n&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],"Version: [email protected]"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}},76152:(e,t,r)=>{r.d(t,{T:()=>i});var n=r(10635);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.ME)(t)}},76385:(e,t,r)=>{r.d(t,{o:()=>n});function n(e,{format:t}){if(!t)return{};let r={};return!function t(n){for(let i of Object.keys(n))i in e&&(r[i]=e[i]),n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])&&t(n[i])}(t(e||{})),r}},76525:(e,t,r)=>{r.d(t,{Ao:()=>n});let n=2n**256n-1n},76973:(e,t,r)=>{r.d(t,{d:()=>a});var n=r(5852);let i=r(86895).sc;var o=r(73906),s=r(87082);
29function a(e){let{commitments:t,version:r}=e,a=e.to??("string"==typeof t[0]?"hex":"bytes"),c=[];for(let e of t)c.push(function(e){let{commitment:t,version:r=1}=e,a=e.to??("string"==typeof t?"hex":"bytes"),c=function(e,t){let r=i((0,o.q)(e,{strict:!1})?(0,s.ZJ)(e):e);return"bytes"===(t||"hex")?r:(0,n.nj)(r)}(t,"bytes");return c.set([r],0),"bytes"===a?c:(0,n.My)(c)}({commitment:e,to:a,version:r}));return c}},77372:(e,t,r)=>{r.d(t,{N:()=>u,b:()=>c});var n=r(6330),i=r(10635),o=r(4770),s=r(27465),a=r(70902);async function c(e,t){return u(e,t)}async function u(e,t){let{block:r,chain:c=e.chain,request:u}=t||{};try{let t=c?.fees?.maxPriorityFeePerGas??c?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await (0,o.T)(e,s.g,"getBlock")({}),i=await t({block:n,client:e,request:u});if(null===i)throw Error();return i}if(void 0!==t)return t;let n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.uU)(n)}catch{let[t,i]=await Promise.all([r?Promise.resolve(r):(0,o.T)(e,s.g,"getBlock")({}),(0,o.T)(e,a.L,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.pw;let c=i-t.baseFeePerGas;if(c<0n)return 0n;return c}}},77703:(e,t,r)=>{r.d(t,{g:()=>u});var n=r(93909),i=r(16189),o=r(87082),s=r(5852),a=r(27131),c=r(64092);async function u(e){let{authorization:t,signature:r}=e;return(0,n.x)({hash:function(e){let{chainId:t,nonce:r,to:n}=e,u=e.contractAddress??e.address,l=(0,c.S)((0,i.aP)(["0x05",(0,a.EQ)([t?(0,s.cK)(t):"0x",u,r?(0,s.cK)(r):"0x"])]));return"bytes"===n?(0,o.aT)(l):l}(t),signature:r??t})}},78771:(e,t,r)=>{function n(e,t){let r=e.exec(t);return r?.groups}r.d(t,{BD:()=>i,Ge:()=>o,Yv:()=>n,wj:()=>s});let i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o=/^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)?$/,s=/^\(.+?\).*?$/},79979:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(78771);let i=/^tuple(?<array>(\[(\d*)\])*)$/;function o(e){let t="",r=e.length;for(let o=0;o<r;o++)t+=function e(t){let r=t.type;if(i.test(t.type)&&"components"in t){r="(";let o=t.components.length;for(let n=0;n<o;n++)r+=e(t.components[n]),n<o-1&&(r+=", ");let s=(0,n.Yv)(i,t.type);return r+=`)${s?.array||""}`,e({...t,type:r})}return("indexed"in t&&t.indexed&&(r=`${r}
29 indexed`),t.name)?`${r} ${t.name}`:r}(e[o]),o!==r-1&&(t+=", ");return t}},81381:(e,t,r)=>{r.d(t,{V:()=>o});var n=r(7565),i=r(16284);let o=e=>(0,n.di)((0,i.k)(e),0,4)},81672:(e,t,r)=>{r.d(t,{Q:()=>b});var n=r(72979),i=r(97461),o=r(77703),s=r(5852),a=r(72632),c=r(60320),u=r(98770);class l extends i.C{constructor(e,{account:t,docsPath:r,chain:n,data:i,gas:o,gasPrice:s,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:m,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,u.aO)({from:t?.address,to:m,value:void 0!==p&&`${(0,a.c)(p)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==s&&`${(0,c.Q)(s)} gwei`,maxFeePerGas:void 0!==l&&`${(0,c.Q)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,c.Q)(d)} gwei`,nonce:f})].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var d=r(82334),f=r(74646),m=r(76385),p=r(24061),h=r(7949),g=r(95084),y=r(31370);async function b(e,t){let{account:r=e.account,prepare:a=!0}=t,c=r?(0,n.J)(r):void 0,u=Array.isArray(a)?a:c?.type!=="local"?["blobVersionedHashes"]:void 0;try{let r=await (async()=>t.to?t.to:t.authorizationList&&t.authorizationList.length>0?await (0,o.g)({authorization:t.authorizationList[0]}).catch(()=>{throw new i.C("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:n,authorizationList:l,blobs:d,blobVersionedHashes:f,blockNumber:b,blockTag:v,data:w,gas:A,gasPrice:x,maxFeePerBlobGas:P,maxFeePerGas:M,maxPriorityFeePerGas:T,nonce:E,value:k,stateOverride:S,..._}=a?await (0,y.ft)(e,{...t,parameters:u,to:r}):t;if(A&&t.gas!==A)return A;let I=("bigint"==typeof b?(0,s.cK)(b):void 0)||v,B=(0,h.yH)(S);(0,g.c)(t);let C=e.chain?.formatters?.transactionRequest?.format,R=(C||p.Bv)({...(0,m.o)(_,{format:C}),account:c,accessList:n,authorizationList:l,blobs:d,blobVersionedHashes:f,data:w,gasPrice:x,maxFeePerBlobGas:P,maxFeePerGas:M,maxPriorityFeePerGas:T,nonce:E,to:r,value:k},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:B?[R,I??e.experimental_blockTag??"latest",B]:I?[R,I]:[R]}))}catch(r){throw function(e,{docsPath:t,...r}){return new l((()=>{let t=(0,f.l)(e,r);return t instanceof d.RM?e:t})(),{docsPath:t,...r})}(r,{...t,account:c,chain:e.chain})}}},81731:(e,t,r)=>{r.d(t,{M:()=>i});var n=r(84383);function i({blockNumber:e,chain:t,contract:r}){let i=t?.contracts?.[r];if(!i)throw new n.rj({chain:t,contract:{name:r}});if(e&&i.blockCreated&&i.blockCreated>e)throw new n.rj({blockNumber:e,chain:t,contract:{name:r,blockCreated:i.blockCreated}});return i.address}},81746:(e,t,r)=>{r.d(t,{m:()=>a});var n=r(67132),i=r(16189),o=r(7137);let s="/docs/contract/encodeDeployData";function a(e){let{abi:t,args:r,bytecode:a}=e;if(!r||0===r.length)return a;let c=t.find(e=>"type"in e&&"constructor"===e.type);if(!c)throw new n.YW({docsPath:s});if(!("inputs"in c)||!c.inputs||0===c.inputs.length)throw new n.YF({docsPath:s});let u=(0,o.h)(c.inputs,r);return(0,i.aP)([a,u])}},82334:(e,t,r)=>{r.d(t,{A7:()=>o,BG:()=>s,Fo:()=>m,K0:()=>c,Oh:()=>u,RM:()=>g,jj:()=>a,k5:()=>d,lN:()=>h,lY:()=>f,uC:()=>p,vW:()=>l});var n=r(60320),i=r(97461);class o extends i.C{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class s extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(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 a extends i.C{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.Q)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.
30Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends i.C{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class m extends i.C{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.C{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class h extends i.C{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.Q)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.Q)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(h,"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 g extends i.C{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},83210:(e,t,r)=>{r.d(t,{M:()=>i});var n=r(97461);class i extends n.C{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},84383:(e,t,r)=>{r.d(t,{EH:()=>o,YE:()=>a,jF:()=>s,qD:()=>c,rj:()=>i});var n=r(97461);class i extends n.C{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class o extends n.C{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} â ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} â ${e.name}`],name:"ChainMismatchError"})}}class s extends n.C{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class a extends n.C{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class c extends n.C{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}
30" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},84437:(e,t,r)=>{r.d(t,{B:()=>n});function n(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,i=0;for(let e=0;e<r.length-1;e++)if("0"===r["left"===t?e:r.length-e-1].toString())i++;else break;return(r="left"===t?r.slice(i):r.slice(0,r.length-i),"string"==typeof e)?(1===r.length&&"right"===t&&(r=`${r}0`),`0x${r.length%2==1?`0${r}`:r}`):r}},84493:(e,t,r)=>{var n=r(65714).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.CoinPretty=void 0;let i=r(71179),o=r(66858),s=r(65821);class a{static makeCoinDenomPretty(e){if(/^(?:0[xX][0-9a-fA-F]+|[0-9][0-9a-fA-F]*)$/.test(e)){let t=n.from(e.replace(/^0x/,""),"hex"),r=t.indexOf(0),i=-1===r?t.length:r;return t.toString("utf8",0,i).replace(/\u0000+/g,"").trim()}return e.replace(/\u0000+/g,"").trim()}constructor(e,t){this._currency=e,this._options={separator:" ",upperCase:!1,lowerCase:!1,hideDenom:!1,hideAmount:!1,showRawCoinDenom:!1,hideIBCMetadata:!1,maxCoinDenomLength:20},"object"==typeof t&&"toDec"in t?t=t.toDec():t instanceof o.Dec||(t=new o.Dec(t)),this.intPretty=new i.IntPretty(t.quoTruncate(s.DecUtils.getTenExponentNInPrecisionRange(e.coinDecimals))).maxDecimals(e.coinDecimals)}get options(){return Object.assign(Object.assign({},this._options),this.intPretty.options)}get denom(){return this.currency.coinDenom}get currency(){return this._currency}setCurrency(e){let t=this.clone();return t.intPretty=this.intPretty.moveDecimalPointRight(this._currency.coinDecimals-e.coinDecimals),t._currency=e,t}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}hideDenom(e){let t=this.clone();return t._options.hideDenom=e,t}hideAmount(e){let t=this.clone();return t._options.hideAmount=e,t}hideIBCMetadata(e){let t=this.clone();return t._options.hideIBCMetadata=e,t}showRawCoinDenom(e){let t=this.clone();return t._options.showRawCoinDenom=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}roundTo(e){let t=this.clone();return t.intPretty=t.intPretty.roundTo(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.add(t?e:e.mul(s.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}addDifferentDenoms(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.sub(t?e:e.mul(s.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toCoin(){let e=this.toDec().mulTruncate(s.DecUtils.getTenExponentNInPrecisionRange(this.currency.coinDecimals)).truncate();return{denom:this.currency.coinMinimalDenom,amount:e.toString()}}maxCoinDenomLength(e){let t=this.clone();return t._options.maxCoinDenomLength=e,t}toString(){let e=this.denom;this._options.hideIBCMetadata&&"originCurrency"in this.currency&&this.currency.originCurrency&&(e=this.currency.originCurrency.coinDenom),this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase()),this._options.showRawCoinDenom||(e=a.makeCoinDenomPretty(e)),this._options.hideIBCMetadata?e.length>this._options.maxCoinDenomLength&&(e=`${e.slice(0,this._options.maxCoinDenomLength)}...`):"originCurrency"in this.currency&&this.currency.originCurrency&&this.currency.originCurrency.coinDenom.length>this._options.maxCoinDenomLength&&(e=e.replace(this.currency.originCurrency.coinDenom,`${this.currency.originCurrency.coinDenom.slice(0,this._options.maxCoinDenomLength)}...`));let t=this._options.separator;return(this._options.hideDenom&&(e="",t=""),this._options.hideAmount)?e:this.intPretty.toStringWithSymbol
30s("",`${t}${e}`)}clone(){let e=new a(this._currency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}}t.CoinPretty=a},85217:(e,t,r)=>{function n([e,t]){return`${e}=${function e(t){return Array.isArray(t)?"%5B"+t.map(e).join("%2C%20")+"%5D":"bigint"==typeof t?`${t}n`:encodeURIComponent(String(null!=t&&null===Object.getPrototypeOf(t)?{...t}:t))}(t)}`}r.d(t,{g2:()=>u,eC:()=>c});var i=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,i;if(t){let{cause:e,...n}=t;e&&(i={cause:e}),Object.keys(n).length>0&&(r=n)}super(function(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${btoa(Object.entries(t).map(n).join("&"))}'`),`${r}\``}}(e,r),i),this.context={__code:e,...r},this.name="SolanaError"}};function o(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}var s=(e=>(e[e.Little=0]="Little",e[e.Big=1]="Big",e))(s||{});function a(e){return e?.endian!==1}var c=(e={})=>(function(e){var t;return Object.freeze({...t={fixedSize:e.size,write(t,r,n){e.range&&function(e,t,r,n){if(n<t||n>r)throw new i(8078011,{codecDescription:e,max:r,min:t,value:n})}(e.name,e.range[0],e.range[1],t);let o=new ArrayBuffer(e.size);return e.set(new DataView(o),t,a(e.config)),r.set(new Uint8Array(o),n),n+e.size}},encode:e=>{let r=new Uint8Array("fixedSize"in t?t.fixedSize:t.getSizeFromValue(e));return t.write(e,r,0),r}})})({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,r)=>e.setBigUint64(0,BigInt(t),r),size:8}),u=(e={})=>(function(e,t){if(o(e)!==o(t))throw new i(8078004);if(o(e)&&o(t)&&e.fixedSize!==t.fixedSize)throw new i(8078005,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!o(e)&&!o(t)&&e.maxSize!==t.maxSize)throw new i(8078006,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}})(c(e),((e={})=>(function(e){var t;return Object.freeze({...t={fixedSize:e.size,read(t,r=0){!function(e,t,r=0){if(t.length-r<=0)throw new i(8078e3,{codecDescription:e})}(e.name,t,r),function(e,t,r,n=0){let o=r.length-n;if(o<t)throw new i(8078001,{bytesLength:o,codecDescription:e,expected:t})}(e.name,e.size,t,r);let n=new DataView(function(e,t,r){let n=e.byteOffset+(t??0),i=r??e.byteLength;return e.buffer.slice(n,n+i)}(t,r,e.size));return[e.get(n,a(e.config)),r+e.size]}},decode:(e,r=0)=>t.read(e,r)[0]})})({config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}))(e))},85628:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeBech32=t.fromBech32=t.toBech32=void 0;let s=o(r(84049));function a(e,t,r){return s.encode(e,s.toWords(t),r)}function c(e,t=1/0){let r=s.decode(e,t);return{prefix:r.prefix,data:new Uint8Array(s.fromWords(r.words))}}t.toBech32=a,t.fromBech32=c,t.normalizeBech32=function(e){let{prefix:t,data:r}=c(e);return a(t,r)}},85925:(e,t,r)=>{e.exports=c;var n,i=r(11238),o=i.LongBits,s=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return i.Buffer?function(e){return(c.create=function(e){return i.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function d(){var e=new o(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function m(){if(this.pos+8>this.len)throw a(this,8);return new o(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var e=0xffffffff;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);
30if(t===r){var n=i.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do if(this.pos>=this.len)throw a(this);while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=l(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return m.call(this)[t](!0)},sfixed64:function(){return m.call(this)[t](!1)}})}},87082:(e,t,r)=>{r.d(t,{Af:()=>m,ZJ:()=>u,aT:()=>f});var n=r(97461),i=r(73906),o=r(53678),s=r(10635),a=r(5852);let c=new TextEncoder;function u(e,t={}){var r,n;return"number"==typeof e||"bigint"==typeof e?(r=e,n=t,f((0,a.cK)(r,n))):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,s.Sl)(r,{size:t.size}),(0,o.eV)(r,{size:t.size})):r}(e,t):(0,i.q)(e)?f(e,t):m(e,t)}let l={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function f(e,t={}){let r=e;t.size&&((0,s.Sl)(r,{size:t.size}),r=(0,o.eV)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let a=i.length/2,c=new Uint8Array(a);for(let e=0,t=0;e<a;e++){let r=d(i.charCodeAt(t++)),o=d(i.charCodeAt(t++));if(void 0===r||void 0===o)throw new n.C(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);c[e]=16*r+o}return c}function m(e,t={}){let r=c.encode(e);return"number"==typeof t.size?((0,s.Sl)(r,{size:t.size}),(0,o.eV)(r,{dir:"right",size:t.size})):r}},87298:(e,t,r)=>{r.d(t,{E:()=>n});let n=1},88603:(e,t,r)=>{r.d(t,{X9:()=>s,s7:()=>i,x8:()=>o});var n=r(75422);class i extends n.C{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class o extends n.C{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class s extends n.C{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}},88772:(e,t,r)=>{e.exports=r(24204)},89304:(e,t,r)=>{r.d(t,{zX:()=>y,bG:()=>b,M:()=>v,rR:()=>w,Po:()=>A,$S:()=>x});var n=r(72979),i=r(16481),o=r(58344),s=r(493),a=r(8537);function c({abiItem:e,args:t,includeFunctionName:r=!0,includeName:n=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${n&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,a.A)(t[r]):t[r]}`).join(", ")})`}var u=r(55562),l=r(72632),d=r(60320),f=r(67132),m=r(97461),p=r(47091),h=r(98770),g=r(13387);class y extends m.C{constructor(e,{account:t,docsPath:r,chain:i,data:o,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:m,value:g,stateOverride:y}){let b=t?(0,n.J)(t):void 0,v=(0,h.aO)({from:b?.address,to:m,value:void 0!==g&&`${(0,l.c)(g)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:s,gasPrice:void 0!==a&&`${(0,d.Q)(a)} gwei`,maxFeePerGas:void 0!==c&&`${(0,d.Q)(c)} gwei`,maxPriorityFeePerGas:void 0!==u&&`${(0,d.Q)(u)} gwei`,nonce:f});y&&(v+=` 31${(0,p.uj)(y)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(
vendor: 4,955 bytes, line 31
31Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class b extends m.C{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:i,functionName:o,sender:a}){let l=(0,u.iY)({abi:t,args:r,name:o}),d=l?c({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,s.B)(l,{includeName:!0}):void 0,m=(0,h.aO)({address:n&&(0,g.R)(n),function:f,args:d&&"()"!==d&&`${[...Array(o?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],m&&"Contract Call:",m].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=o,this.sender=a}}class v extends m.C{constructor({abi:e,data:t,functionName:r,message:n}){let a,u,l,d,m;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:a}=u=(0,o.W)({abi:e,data:t});if("Error"===n)d=a[0];else if("Panic"===n){let[e]=a;d=i.fD[e]}else{let e=r?(0,s.B)(r,{includeName:!0}):void 0,t=r&&a?c({abiItem:r,args:a,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){a=e}else n&&(d=n);a instanceof f.Wq&&(m=a.signature,l=[`Unable to decode signature "${m}" 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=${m}.`]),super(d&&"execution reverted"!==d||m?[`The contract function "${r}" reverted with the following ${m?"signature":"reason"}:`,d||m].join("\n"):`The contract function "${r}" reverted.`,{cause:a,metaMessages:l,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{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=u,this.raw=t,this.reason=d,this.signature=m}}class w extends m.C{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class A extends m.C{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class x extends m.C{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},90206:(e,t,r)=>{r.d(t,{d:()=>s});var n=r(89304),i=r(82334),o=r(74646);function s(e,{docsPath:t,...r}){let s=(()=>{let t=(0,o.l)(e,r);return t instanceof i.RM?e:t})();return new n.zX(s,{docsPath:t,...r})}},92782:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(87082),i=r(5852);function o(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),o="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.aT)(e)):e.blobs,s="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.aT)(e)):e.commitments,a=[];for(let e=0;e<o.length;e++){let r=o[e],n=s[e];a.push(Uint8Array.from(t.computeBlobKzgProof(r,n)))}return"bytes"===r?a:a.map(e=>(0,i.My)(e))}},93909:(e,t,r)=>{r.d(t,{x:()=>d});var n=r(13949),i=r(64092),o=r(73906),s=r(34960),a=r(10635),c=r(5852);async function u({hash:e,signature:t}){let n=(0,o.q)(e)?e:(0,c.nj)(e),{secp256k1:i}=await Promise.resolve().then(r.bind(r,37981)),u=(()=>
31{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:o}=t,s=l(Number(o??n));return new i.Signature((0,a.uU)(e),(0,a.uU)(r)).addRecoveryBit(s)}let e=(0,o.q)(t)?t:(0,c.nj)(t);if(65!==(0,s.E)(e))throw Error("invalid signature length");let r=l((0,a.ME)(`0x${e.slice(130)}`));return i.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(n.substring(2)).toHex(!1);return`0x${u}`}function l(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}async function d({hash:e,signature:t}){var r=await u({hash:e,signature:t});let o=(0,i.S)(`0x${r.substring(4)}`).substring(26);return(0,n.o)(`0x${o}`)}},94060:(e,t,r)=>{r.d(t,{Lg:()=>u,sX:()=>c});var n=r(6625),i=async e=>{let[t,r]=await Promise.all([l({includeEvm:!0,includeSvm:!0,...e}),l({includeEvm:!0,includeSvm:!0,onlyTestnets:!0,...e})]),n=[...t??[],...r??[]];return u.skipChains=n,n},o=(0,n.FH)({methodName:"assets",path:"v2/fungible/assets",transformResponse:e=>s(e.chainToAssetsMap),onSuccess:(e,t)=>{t?.includeEvmAssets&&t?.includeSvmAssets&&t?.includeCw20Assets&&(u.skipAssets=e)}}),s=e=>Object.entries(e??{}).reduce((e,[t,{assets:r}])=>(e[t]=(r??[]).map(e=>e),e),{}),a=async({chainId:e,...t})=>{let[r,n]=await Promise.all([o({chainIds:e?[e]:void 0,...t}),o({chainIds:e?[e]:void 0,onlyTestnets:!0,...t})]),i={...r,...n};return u.skipAssets=i,i},c=(0,n.FH)({methodName:"balances",method:"post",path:"v2/info/balances",onSuccess:(e,t)=>{t||(u.skipBalances=e)}}),u=class{static aminoTypes;static registry;static endpointOptions;static skipChains;static skipAssets;static skipBalances;static async getSkipChains(e){if(this.skipChains)return this.skipChains;let t=await i(e);return this.skipChains=t,t}static async getSkipAssets(e){if(e.chainId&&this.skipAssets?.[e.chainId]||!e.chainId&&this.skipAssets)return this.skipAssets;let t=await a(e);return this.skipAssets=t,t}static async getSkipBalances(){if(this.skipBalances)return this.skipBalances;let e=await c();return this.skipBalances=e,e}static signingStargateClientByChainId={};static validateGasResults},l=(0,n.FH)({methodName:"chains",path:"v2/info/chains",transformResponse:e=>e.chains,onSuccess:(e,t)=>{t?.includeEvm&&t?.includeSvm&&(u.skipChains=e)}})},94087:(e,t,r)=>{r.d(t,{s:()=>s});var n=r(98770),i=r(956),o=r(5852);async function s(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:s}){let a=await e.request({method:"eth_sendRawTransactionSync",params:s?[t,(0,o.cK)(s)]:[t]},{retryCount:0}),c=(e.chain?.formatters?.transactionReceipt?.format||i.uL)(a);if("reverted"===c.status&&r)throw new n.Sq({receipt:c});return c}},94744:(e,t,r)=>{r.d(t,{e:()=>a});var n=r(67132),i=r(19161),o=r(55562);let s="/docs/contract/decodeFunctionResult";function a(e){let{abi:t,args:r,functionName:a,data:c}=e,u=t[0];if(a){let e=(0,o.iY)({abi:t,args:r,name:a});if(!e)throw new n.Iz(a,{docsPath:s});u=e}if("function"!==u.type)throw new n.Iz(void 0,{docsPath:s});if(!u.outputs)throw new n.MR(u.name,{docsPath:s});let l=(0,i.n)(u.outputs,c);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0}},94900:(e,t,r)=>{r.d(t,{b4:()=>o,gU:()=>a,uP:()=>s});var n=r(10635),i=r(74606);let o={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function s(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.ME)(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,n.ME)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?o[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),r.yParity=(()=>
vendor: 4,278 bytes, line 31
31{if(e.yParity)return Number(e.yParity);if("bigint"==typeof r.v){if(0n===r.v||27n===r.v)return 0;if(1n===r.v||28n===r.v)return 1;if(r.v>=35n)return+(r.v%2n===0n)}})(),"legacy"===r.type&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),"eip2930"===r.type&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),"eip1559"===r.type&&delete r.maxFeePerBlobGas,r}let a=(0,i.q)("transaction",s)},95084:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(72979),i=r(76525),o=r(83210),s=r(82334),a=r(45667);function c(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:c,to:u}=e,l=t?(0,n.J)(t):void 0;if(l&&!(0,a.P)(l.address))throw new o.M({address:l.address});if(u&&!(0,a.P)(u))throw new o.M({address:u});if(r&&r>i.Ao)throw new s.BG({maxFeePerGas:r});if(c&&r&&c>r)throw new s.lN({maxFeePerGas:r,maxPriorityFeePerGas:c})}},95327:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,s),!0}for(u=1,c=Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,m=l.length;for(u=0;u<m;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,i);break;default:if(!c)for(f=1,c=Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||i&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},95571:(e,t,r)=>{r.d(t,{y:()=>o});var n=r(10635),i=r(5852);async function o(e,{address:t,blockTag:r="latest",blockNumber:o}){let s=await e.request({method:"eth_getTransactionCount",params:[t,"bigint"==typeof o?(0,i.cK)(o):r]},{dedupe:!!o});return(0,n.ME)(s)}},95913:(e,t,r)=>{r.d(t,{$:()=>o,R:()=>s});var n=r(74606),i=r(94900);function o(e,t){let r=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,i.uP)(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
31it?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let s=(0,n.q)("block",o)},97461:(e,t,r)=>{r.d(t,{C:()=>o});let n="2.43.5",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};class o extends Error{constructor(e,t={}){let r=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,s=t.cause instanceof o&&t.cause.docsPath||t.docsPath,a=i.getDocsUrl?.({...t,docsPath:s});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},98048:(e,t,r)=>{r.d(t,{j:()=>c});var n=r(67132),i=r(97461),o=r(89304),s=r(14351),a=r(45789);function c(e,{abi:t,address:r,args:c,docsPath:u,functionName:l,sender:d}){let f=e instanceof o.$S?e:e instanceof i.C?e.walk(e=>"data"in e)||e.walk():{},{code:m,data:p,details:h,message:g,shortMessage:y}=f,b=e instanceof n.O?new o.rR({functionName:l}):[3,a.bq.code].includes(m)&&(p||h||g||y)||m===a.Di.code&&"execution reverted"===h&&p?new o.M({abi:t,data:"object"==typeof p?p.data:p,functionName:l,message:f instanceof s.J8?h:y??g}):e;return new o.bG(b,{abi:t,args:c,contractAddress:r,docsPath:u,functionName:l,sender:d})}},98770:(e,t,r)=>{r.d(t,{$s:()=>l,Kc:()=>f,Kz:()=>d,Sq:()=>m,Vg:()=>c,WA:()=>p,aO:()=>s,fZ:()=>u,zW:()=>a});var n=r(72632),i=r(60320),o=r(97461);function s(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")}o.C;class a extends o.C{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends o.C{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","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}o.C,o.C;class u extends o.C{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class l extends o.C{constructor(e,{account:t,docsPath:r,chain:o,data:a,gas:c,gasPrice:u,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:m,value:p}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",s({chain:o&&`${o?.name} (id: ${o?.id})`,from:t?.address,to:m,value:void 0!==p&&`${(0,n.c)(p)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:c,gasPrice:void 0!==u&&`${(0,i.Q)(u)} gwei`,maxFeePerGas:void 0!==l&&`${(0,i.Q)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,i.Q)(d)} gwei`,nonce:f}
vendor: 2,003 bytes, line 31
31)].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class d extends o.C{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:i}){let o="Transaction";r&&void 0!==i&&(o=`Transaction at block time "${r}" at index "${i}"`),e&&void 0!==i&&(o=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(o=`Transaction at block number "${t}" at index "${i}"`),n&&(o=`Transaction with hash "${n}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class f extends o.C{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class m extends o.C{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}class p extends o.C{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},99053:(e,t,r)=>{r.d(t,{A:()=>n});class n extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}}}]);
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.