From cc6a45862607091ad111d5a208bbe259412d8176 Mon Sep 17 00:00:00 2001 From: Moazzam Ahmed Date: Thu, 22 Aug 2024 00:54:59 +0500 Subject: [PATCH] Fixed error message returns null --- dist/web3-errors-extract.min.js | 2 +- lib/commonjs/lib/getErrorMessage.js | 7 +++++-- lib/commonjs/lib/getErrorMessage.js.map | 2 +- lib/esm/lib/getErrorMessage.js | 7 +++++-- lib/esm/lib/getErrorMessage.js.map | 2 +- lib/types/lib/getErrorMessage.d.ts.map | 2 +- package.json | 2 +- src/lib/getErrorMessage.ts | 11 +++++++---- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/dist/web3-errors-extract.min.js b/dist/web3-errors-extract.min.js index 144d9e0..18c0d81 100644 --- a/dist/web3-errors-extract.min.js +++ b/dist/web3-errors-extract.min.js @@ -10,7 +10,7 @@ ${this._compileErrors().join(` ${r.byteLength}`)),i=(0,re.uint8ArrayConcat)(n,r);return(0,re.sha3Raw)(i)};ae.hashMessage=Y2;var $2=(e,t)=>{let r=(0,ae.parseAndValidatePrivateKey)(t),n=(0,ae.hashMessage)(e),i=Nc.secp256k1.sign(n.substring(2),r),s=i.toCompactRawBytes(),o=i.r.toString(16).padStart(64,"0"),a=i.s.toString(16).padStart(64,"0"),u=i.recovery+27;return{message:e,messageHash:n,v:(0,re.numberToHex)(u),r:`0x${o}`,s:`0x${a}`,signature:`${(0,re.bytesToHex)(s)}${u.toString(16)}`}};ae.sign=$2;var e3=(e,t)=>cl(void 0,void 0,void 0,function*(){let r=e.sign((0,re.hexToBytes)(t));if((0,Kr.isNullish)(r.v)||(0,Kr.isNullish)(r.r)||(0,Kr.isNullish)(r.s))throw new Yt.TransactionSigningError("Signer Error");let n=r.validate(!0);if(n.length>0){let o="Signer Error ";for(let a of n)o+=`${o} ${a}.`;throw new Yt.TransactionSigningError(o)}let i=(0,re.bytesToHex)(r.serialize()),s=(0,re.sha3Raw)(i);return{messageHash:(0,re.bytesToHex)(r.getMessageToSign(!0)),v:`0x${r.v.toString(16)}`,r:`0x${r.r.toString(16).padStart(64,"0")}`,s:`0x${r.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:(0,re.bytesToHex)(s)}});ae.signTransaction=e3;var t3=e=>{if((0,Kr.isNullish)(e))throw new Yt.UndefinedRawTransactionError;let t=J2.TransactionFactory.fromSerializedData((0,re.hexToBytes)(e));return(0,re.toChecksumAddress)(t.getSenderAddress().toString())};ae.recoverTransaction=t3;var r3=(e,t,r,n,i)=>{if(typeof e=="object"){let l=`${e.r}${e.s.slice(2)}${e.v.slice(2)}`;return(0,ae.recover)(e.messageHash,l,r)}if(typeof t=="string"&&typeof r=="string"&&!(0,Kr.isNullish)(n)){let l=`${r}${n.slice(2)}${t.slice(2)}`;return(0,ae.recover)(e,l,i)}if((0,Kr.isNullish)(t))throw new Yt.InvalidSignatureError("signature string undefined");let s=130,o=r?e:(0,ae.hashMessage)(e),a=parseInt(t.substring(s),16);a>26&&(a-=27);let u=Nc.secp256k1.Signature.fromCompact(t.slice(2,s)).addRecoveryBit(a).recoverPublicKey(o.replace("0x","")).toRawBytes(!1),d=(0,re.sha3Raw)(u.subarray(1));return(0,re.toChecksumAddress)(`0x${d.slice(-40)}`)};ae.recover=r3;var n3=e=>{let t=(0,ae.parseAndValidatePrivateKey)(e),r=Nc.secp256k1.getPublicKey(t,!1),i=(0,re.sha3Raw)(r.slice(1)).slice(-40);return(0,re.toChecksumAddress)(`0x${i}`)};ae.privateKeyToAddress=n3;var i3=(e,t)=>{let r=(0,ae.parseAndValidatePrivateKey)(e);return`0x${(0,re.bytesToHex)(Nc.secp256k1.getPublicKey(r,t)).slice(4)}`};ae.privateKeyToPublicKey=i3;var s3=(e,t,r)=>cl(void 0,void 0,void 0,function*(){var n,i,s,o,a,u,d;let c=(0,ae.parseAndValidatePrivateKey)(e),l;if(r?.salt?l=typeof r.salt=="string"?(0,re.hexToBytes)(r.salt):r.salt:l=(0,re.randomBytes)(32),!((0,Kr.isString)(t)||(0,re.isUint8Array)(t)))throw new Yt.InvalidPasswordError;let h=typeof t=="string"?(0,re.hexToBytes)((0,re.utf8ToHex)(t)):t,m;if(r?.iv){if(m=typeof r.iv=="string"?(0,re.hexToBytes)(r.iv):r.iv,m.length!==16)throw new Yt.IVLengthError}else m=(0,re.randomBytes)(16);let b=(n=r?.kdf)!==null&&n!==void 0?n:"scrypt",_,y;if(b==="pbkdf2"){if(y={dklen:(i=r?.dklen)!==null&&i!==void 0?i:32,salt:(0,re.bytesToHex)(l).replace("0x",""),c:(s=r?.c)!==null&&s!==void 0?s:262144,prf:"hmac-sha256"},y.c<1e3)throw new Yt.PBKDF2IterationsError;_=(0,iw.pbkdf2Sync)(h,l,y.c,y.dklen,"sha256")}else if(b==="scrypt")y={n:(o=r?.n)!==null&&o!==void 0?o:8192,r:(a=r?.r)!==null&&a!==void 0?a:8,p:(u=r?.p)!==null&&u!==void 0?u:1,dklen:(d=r?.dklen)!==null&&d!==void 0?d:32,salt:(0,re.bytesToHex)(l).replace("0x","")},_=(0,sw.scryptSync)(h,l,y.n,y.p,y.r,y.dklen);else throw new Yt.InvalidKdfError;let v=yield(0,nw.encrypt)(c,_.slice(0,16),m,"aes-128-ctr"),E=(0,re.bytesToHex)(v).slice(2),I=(0,re.sha3Raw)((0,re.uint8ArrayConcat)(_.slice(16,32),v)).replace("0x","");return{version:3,id:(0,re.uuidV4)(),address:(0,ae.privateKeyToAddress)(c).toLowerCase().replace("0x",""),crypto:{ciphertext:E,cipherparams:{iv:(0,re.bytesToHex)(m).replace("0x","")},cipher:"aes-128-ctr",kdf:b,kdfparams:y,mac:I}}});ae.encrypt=s3;var o3=(e,t)=>{let r=(0,ae.parseAndValidatePrivateKey)(e,t);return{address:(0,ae.privateKeyToAddress)(r),privateKey:(0,re.bytesToHex)(r),signTransaction:n=>{throw new Yt.TransactionSigningError("Do not have network access to sign the transaction")},sign:n=>(0,ae.sign)(typeof n=="string"?n:JSON.stringify(n),r),encrypt:(n,i)=>cl(void 0,void 0,void 0,function*(){return(0,ae.encrypt)(r,n,i)})}};ae.privateKeyToAccount=o3;var a3=()=>{let e=Nc.secp256k1.utils.randomPrivateKey();return(0,ae.privateKeyToAccount)(`${(0,re.bytesToHex)(e)}`)};ae.create=a3;var c3=(e,t,r)=>cl(void 0,void 0,void 0,function*(){let n=typeof e=="object"?e:JSON.parse(r?e.toLowerCase():e);if(Kr.validator.validateJSONSchema(K2.keyStoreSchema,n),n.version!==3)throw new Yt.KeyStoreVersionError;let i=typeof t=="string"?(0,re.hexToBytes)((0,re.utf8ToHex)(t)):t;Kr.validator.validate(["bytes"],[i]);let s;if(n.crypto.kdf==="scrypt"){let d=n.crypto.kdfparams,c=typeof d.salt=="string"?(0,re.hexToBytes)(d.salt):d.salt;s=(0,sw.scryptSync)(i,c,d.n,d.p,d.r,d.dklen)}else if(n.crypto.kdf==="pbkdf2"){let d=n.crypto.kdfparams,c=typeof d.salt=="string"?(0,re.hexToBytes)(d.salt):d.salt;s=(0,iw.pbkdf2Sync)(i,c,d.c,d.dklen,"sha256")}else throw new Yt.InvalidKdfError;let o=(0,re.hexToBytes)(n.crypto.ciphertext);if((0,re.sha3Raw)((0,re.uint8ArrayConcat)(s.slice(16,32),o)).replace("0x","")!==n.crypto.mac)throw new Yt.KeyDerivationError;let u=yield(0,nw.decrypt)((0,re.hexToBytes)(n.crypto.ciphertext),s.slice(0,16),(0,re.hexToBytes)(n.crypto.cipherparams.iv));return(0,ae.privateKeyToAccount)(u)});ae.decrypt=c3});var cw=f(aw=>{"use strict";Object.defineProperty(aw,"__esModule",{value:!0})});var uw=f(hn=>{"use strict";var u3=hn&&hn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),ul=hn&&hn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&u3(t,e,r)};Object.defineProperty(hn,"__esModule",{value:!0});ul($m(),hn);ul(Tc(),hn);ul(Wd(),hn);ul(ln(),hn)});var lw=f(Ye=>{"use strict";var dw=Ye&&Ye.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),d3=Ye&&Ye.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l3=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&dw(t,e,r);return d3(t,e),t},f3=Ye&&Ye.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&dw(t,e,r)};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.txUtils=Ye.BaseTransaction=Ye.TransactionFactory=Ye.Transaction=Ye.AccessListEIP2930Transaction=Ye.FeeMarketEIP1559Transaction=void 0;var h3=u_();Object.defineProperty(Ye,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return h3.FeeMarketEIP1559Transaction}});var p3=m_();Object.defineProperty(Ye,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return p3.AccessListEIP2930Transaction}});var m3=g_();Object.defineProperty(Ye,"Transaction",{enumerable:!0,get:function(){return m3.Transaction}});var _3=v_();Object.defineProperty(Ye,"TransactionFactory",{enumerable:!0,get:function(){return _3.TransactionFactory}});var g3=Oc();Object.defineProperty(Ye,"BaseTransaction",{enumerable:!0,get:function(){return g3.BaseTransaction}});Ye.txUtils=l3(xc());f3(Sc(),Ye)});var ji=f(Br=>{"use strict";var y3=Br&&Br.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),ea=Br&&Br.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&y3(t,e,r)};Object.defineProperty(Br,"__esModule",{value:!0});ea(LA(),Br);ea(ow(),Br);ea(cw(),Br);ea(rm(),Br);ea(uw(),Br);ea(lw(),Br)});var E_=f(Un=>{"use strict";var fw=Un&&Un.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Un,"__esModule",{value:!0});Un.Web3BatchRequest=Un.DEFAULT_BATCH_REQUEST_TIMEOUT=void 0;var Mc=G(),dl=V();Un.DEFAULT_BATCH_REQUEST_TIMEOUT=1e3;var A_=class{constructor(t){this._requestManager=t,this._requests=new Map}get requests(){return[...this._requests.values()].map(t=>t.payload)}add(t){let r=Mc.jsonRpc.toPayload(t),n=new Mc.Web3DeferredPromise;return this._requests.set(r.id,{payload:r,promise:n}),n}execute(t){var r;return fw(this,void 0,void 0,function*(){if(this.requests.length===0)return Promise.resolve([]);let n=new Mc.Web3DeferredPromise({timeout:(r=t?.timeout)!==null&&r!==void 0?r:Un.DEFAULT_BATCH_REQUEST_TIMEOUT,eagerStart:!0,timeoutMessage:"Batch request timeout"});return this._processBatchRequest(n).catch(i=>n.reject(i)),n.catch(i=>{i instanceof dl.OperationTimeoutError&&this._abortAllRequests("Batch request timeout"),n.reject(i)}),n})}_processBatchRequest(t){var r,n;return fw(this,void 0,void 0,function*(){let i=yield this._requestManager.sendBatch([...this._requests.values()].map(a=>a.payload));if(i.length!==this._requests.size)throw this._abortAllRequests("Invalid batch response"),new dl.ResponseError(i,`Batch request size mismatch the results size. Requests: ${this._requests.size}, Responses: ${i.length}`);let s=this.requests.map(a=>a.id).map(Number).sort((a,u)=>a-u),o=i.map(a=>a.id).map(Number).sort((a,u)=>a-u);if(JSON.stringify(s)!==JSON.stringify(o))throw this._abortAllRequests("Invalid batch response"),new dl.ResponseError(i,`Batch request mismatch the results. Requests: [${s.join()}], Responses: [${o.join()}]`);for(let a of i)Mc.jsonRpc.isResponseWithResult(a)?(r=this._requests.get(a.id))===null||r===void 0||r.promise.resolve(a.result):Mc.jsonRpc.isResponseWithError(a)&&((n=this._requests.get(a.id))===null||n===void 0||n.promise.reject(a.error));t.resolve(i)})}_abortAllRequests(t){for(let{promise:r}of this._requests.values())r.reject(new dl.OperationAbortError(t))}};Un.Web3BatchRequest=A_});var pw=f(pn=>{"use strict";var b3=pn&&pn.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(pn,"__esModule",{value:!0});pn.Web3EthPluginBase=pn.Web3PluginBase=pn.Web3Context=void 0;var v3=V(),A3=G(),E3=ji(),T3=pc(),w3=E_(),T_=vp(),ll=Ed(),hw=Td(),kc=class e extends T_.Web3Config{constructor(t){var r;if(super(),this.providers=ll.Web3RequestManager.providers,(0,A3.isNullish)(t)||typeof t=="string"&&t.trim()!==""||(0,T3.isSupportedProvider)(t)){this._requestManager=new ll.Web3RequestManager(t),this._subscriptionManager=new hw.Web3SubscriptionManager(this._requestManager,{});return}let{config:n,provider:i,requestManager:s,subscriptionManager:o,registeredSubscriptions:a,accountProvider:u,wallet:d,requestManagerMiddleware:c}=t;this.setConfig(n??{}),this._requestManager=s??new ll.Web3RequestManager(i,(r=n?.enableExperimentalFeatures)===null||r===void 0?void 0:r.useSubscriptionWhenCheckingBlockTimeout,c),o?this._subscriptionManager=o:this._subscriptionManager=new hw.Web3SubscriptionManager(this.requestManager,a??{}),u&&(this._accountProvider=u),d&&(this._wallet=d)}get requestManager(){return this._requestManager}get subscriptionManager(){return this._subscriptionManager}get wallet(){return this._wallet}get accountProvider(){return this._accountProvider}static fromContextObject(...t){return new this(...t.reverse())}getContextObject(){var t;return{config:this.config,provider:this.provider,requestManager:this.requestManager,subscriptionManager:this.subscriptionManager,registeredSubscriptions:(t=this.subscriptionManager)===null||t===void 0?void 0:t.registeredSubscriptions,providers:this.providers,wallet:this.wallet,accountProvider:this.accountProvider}}use(t,...r){let n=new t(...r,this.getContextObject());return this.on(T_.Web3ConfigEvent.CONFIG_CHANGE,i=>{n.setConfig({[i.name]:i.newValue})}),n}link(t){this.setConfig(t.config),this._requestManager=t.requestManager,this.provider=t.provider,this._subscriptionManager=t.subscriptionManager,this._wallet=t.wallet,this._accountProvider=t._accountProvider,t.on(T_.Web3ConfigEvent.CONFIG_CHANGE,r=>{this.setConfig({[r.name]:r.newValue})})}registerPlugin(t){if(this[t.pluginNamespace]!==void 0)throw new v3.ExistingPluginNamespaceError(t.pluginNamespace);let r={[t.pluginNamespace]:t};r[t.pluginNamespace].link(this),Object.assign(this,r)}get provider(){return this.currentProvider}set provider(t){this.requestManager.setProvider(t)}get currentProvider(){return this.requestManager.provider}set currentProvider(t){this.requestManager.setProvider(t)}get givenProvider(){return e.givenProvider}setProvider(t){return this.provider=t,!0}setRequestManagerMiddleware(t){this.requestManager.setMiddleware(t)}get BatchRequest(){return w3.Web3BatchRequest.bind(void 0,this._requestManager)}extend(t){var r;return t.property&&!this[t.property]&&(this[t.property]={}),(r=t.methods)===null||r===void 0||r.forEach(n=>{let i=(...s)=>b3(this,void 0,void 0,function*(){return this.requestManager.send({method:n.call,params:s})});t.property?this[t.property][n.name]=i:this[n.name]=i}),this}};pn.Web3Context=kc;kc.providers=ll.Web3RequestManager.providers;var fl=class extends kc{registerNewTransactionType(t,r){E3.TransactionFactory.registerTransactionType(t,r)}};pn.Web3PluginBase=fl;var w_=class extends fl{};pn.Web3EthPluginBase=w_});var _w=f(mw=>{"use strict";Object.defineProperty(mw,"__esModule",{value:!0})});var I_=f(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.Iban=void 0;var hl=G(),I3=be(),R3=V(),Di=class e{constructor(t){if(this.toAddress=()=>{if(this.isDirect()){let r=this._iban.slice(4),n=e._parseInt(r,36),i=(0,hl.leftPad)(n,40);return(0,hl.toChecksumAddress)(i)}throw new Error("Iban is indirect and cannot be converted. Must be length of 34 or 35")},e.isIndirect(t)||e.isDirect(t))this._iban=t;else throw new Error("Invalid IBAN was provided")}static isDirect(t){return t.length===34||t.length===35}isDirect(){return e.isDirect(this._iban)}static isIndirect(t){return t.length===20}isIndirect(){return e.isIndirect(this._iban)}static isValid(t){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(t)&&e._mod9710(e._iso13616Prepare(t))===1}isValid(){return e.isValid(this._iban)}static fromBban(t){let r="XE",i=`0${(98-this._mod9710(this._iso13616Prepare(`${r}00${t}`))).toString()}`.slice(-2);return new e(`${r}${i}${t}`)}static createIndirect(t){return e.fromBban(`ETH${t.institution}${t.identifier}`)}static fromAddress(t){if(!(0,I3.isAddress)(t))throw new R3.InvalidAddressError(t);let n=BigInt((0,hl.hexToNumber)(t)).toString(36),i=(0,hl.leftPad)(n,15);return e.fromBban(i.toUpperCase())}static toIban(t){return e.fromAddress(t).toString()}client(){return this.isIndirect()?this._iban.slice(11):""}checksum(){return this._iban.slice(2,4)}institution(){return this.isIndirect()?this._iban.slice(7,11):""}toString(){return this._iban}};pl.Iban=Di;Di._iso13616Prepare=e=>{let n=e.toUpperCase();return`${n.slice(4)}${n.slice(0,4)}`.split("").map(s=>{let o=s.charCodeAt(0);return o>=65&&o<=90?o-65+10:s}).join("")};Di._parseInt=(e,t)=>[...e].reduce((r,n)=>BigInt(parseInt(n,t))+BigInt(t)*r,BigInt(0));Di._mod9710=e=>{let t=e,r;for(;t.length>2;)r=t.slice(0,9),t=`${(parseInt(r,10)%97).toString()}${t.slice(r.length)}`;return parseInt(t,10)%97};Di.toAddress=e=>new Di(e).toAddress()});var yw=f(gw=>{"use strict";Object.defineProperty(gw,"__esModule",{value:!0})});var jc=f(Fn=>{"use strict";var P3=Fn&&Fn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),bw=Fn&&Fn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&P3(t,e,r)};Object.defineProperty(Fn,"__esModule",{value:!0});var S3=I_();bw(I_(),Fn);bw(yw(),Fn);Fn.default=S3.Iban});var P_=f(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.outputSyncingFormatter=W.outputPostFormatter=W.inputPostFormatter=W.outputBlockFormatter=W.outputTransactionReceiptFormatter=W.outputLogFormatter=W.inputLogFormatter=W.inputTopicFormatter=W.outputTransactionFormatter=W.inputSignFormatter=W.inputTransactionFormatter=W.inputCallFormatter=W.txInputOptionsFormatter=W.inputAddressFormatter=W.inputDefaultBlockNumberFormatter=W.inputBlockNumberFormatter=W.outputBigIntegerFormatter=W.outputProofFormatter=W.inputStorageKeysFormatter=void 0;var Dc=V(),R_=jc(),x3=Pe(),Q=G(),Li=be(),B3=e=>e.map(t=>(0,Q.numberToHex)(t));W.inputStorageKeysFormatter=B3;var O3=e=>({address:(0,Q.toChecksumAddress)(e.address),nonce:(0,Q.hexToNumberString)(e.nonce),balance:(0,Q.hexToNumberString)(e.balance)});W.outputProofFormatter=O3;var C3=e=>(0,Q.toNumber)(e);W.outputBigIntegerFormatter=C3;var N3=e=>{if(!(0,Li.isNullish)(e))return typeof e=="string"&&(0,Li.isBlockTag)(e)?e:e==="genesis"?"0x0":typeof e=="string"&&(0,Q.isHexStrict)(e)?e.toLowerCase():(0,Q.numberToHex)(e)};W.inputBlockNumberFormatter=N3;var M3=(e,t)=>e?(0,W.inputBlockNumberFormatter)(e):(0,W.inputBlockNumberFormatter)(t);W.inputDefaultBlockNumberFormatter=M3;var k3=e=>{if(R_.Iban.isValid(e)&&R_.Iban.isDirect(e))return new R_.Iban(e).toAddress().toLowerCase();if((0,Q.isAddress)(e))return`0x${e.toLowerCase().replace("0x","")}`;throw new Dc.FormatterError(`Provided address ${e} is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted.`)};W.inputAddressFormatter=k3;var j3=e=>{var t;let r=Object.assign({},e);if(e.to&&(r.to=(0,W.inputAddressFormatter)(e.to)),e.data&&e.input)throw new Dc.FormatterError(`You can't have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.`);if(!e.input&&e.data&&(r.input=e.data,delete r.data),e.input&&!e.input.startsWith("0x")&&(r.input=`0x${e.input}`),r.input&&!(0,Q.isHexStrict)(r.input))throw new Dc.FormatterError("The input field must be HEX encoded data.");return(e.gas||e.gasLimit)&&(r.gas=(0,Q.toNumber)((t=e.gas)!==null&&t!==void 0?t:e.gasLimit)),(e.maxPriorityFeePerGas||e.maxFeePerGas)&&delete r.gasPrice,["gasPrice","gas","value","maxPriorityFeePerGas","maxFeePerGas","nonce","chainId"].filter(n=>!(0,Li.isNullish)(r[n])).forEach(n=>{r[n]=(0,Q.numberToHex)(r[n])}),r};W.txInputOptionsFormatter=j3;var D3=(e,t)=>{var r;let n=(0,W.txInputOptionsFormatter)(e),i=(r=n.from)!==null&&r!==void 0?r:t;return i&&(n.from=(0,W.inputAddressFormatter)(i)),n};W.inputCallFormatter=D3;var L3=(e,t)=>{var r;let n=(0,W.txInputOptionsFormatter)(e);if(typeof n.from!="number"&&!(n.from&&typeof n.from=="object")){if(n.from=(r=n.from)!==null&&r!==void 0?r:t,!e.from&&typeof e.from!="number")throw new Dc.FormatterError('The send transactions "from" field must be defined!');n.from=(0,W.inputAddressFormatter)(e.from)}return n};W.inputTransactionFormatter=L3;var q3=e=>(0,Q.isHexStrict)(e)?e:(0,Q.utf8ToHex)(e);W.inputSignFormatter=q3;var H3=e=>{let t=Object.assign({},e);return e.blockNumber&&(t.blockNumber=(0,Q.hexToNumber)(e.blockNumber)),e.transactionIndex&&(t.transactionIndex=(0,Q.hexToNumber)(e.transactionIndex)),t.nonce=(0,Q.hexToNumber)(e.nonce),t.gas=(0,Q.hexToNumber)(e.gas),e.gasPrice&&(t.gasPrice=(0,W.outputBigIntegerFormatter)(e.gasPrice)),e.maxFeePerGas&&(t.maxFeePerGas=(0,W.outputBigIntegerFormatter)(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=(0,W.outputBigIntegerFormatter)(e.maxPriorityFeePerGas)),e.type&&(t.type=(0,Q.hexToNumber)(e.type)),t.value=(0,W.outputBigIntegerFormatter)(e.value),e.to&&(0,Q.isAddress)(e.to)?t.to=(0,Q.toChecksumAddress)(e.to):t.to=void 0,e.from&&(t.from=(0,Q.toChecksumAddress)(e.from)),t};W.outputTransactionFormatter=H3;var U3=e=>{if((0,Li.isNullish)(e))return null;let t=String(e);return(0,Li.isHex)(t)?t:(0,Q.fromUtf8)(t)};W.inputTopicFormatter=U3;var F3=e=>{var t;let r=(0,Li.isNullish)(e)?{}:(0,Q.mergeDeep)({},e);return(0,Li.isNullish)(r.fromBlock)&&(r.fromBlock=x3.BlockTags.LATEST),r.fromBlock=(0,W.inputBlockNumberFormatter)(r.fromBlock),(0,Li.isNullish)(r.toBlock)||(r.toBlock=(0,W.inputBlockNumberFormatter)(r.toBlock)),r.topics=(t=r.topics)!==null&&t!==void 0?t:[],r.topics=r.topics.map(n=>Array.isArray(n)?n.map(W.inputTopicFormatter):(0,W.inputTopicFormatter)(n)),r.address&&(r.address=Array.isArray(r.address)?r.address.map(n=>(0,W.inputAddressFormatter)(n)):(0,W.inputAddressFormatter)(r.address)),r};W.inputLogFormatter=F3;var G3=e=>{let t=Object.assign({},e),r=typeof e.logIndex=="string"?e.logIndex:(0,Q.numberToHex)(e.logIndex);if(typeof e.blockHash=="string"&&typeof e.transactionHash=="string"){let n=(0,Q.sha3Raw)(`${e.blockHash.replace("0x","")}${e.transactionHash.replace("0x","")}${r.replace("0x","")}`);t.id=`log_${n.replace("0x","").slice(0,8)}`}else e.id||(t.id=void 0);return e.blockNumber&&(0,Q.isHexStrict)(e.blockNumber)&&(t.blockNumber=(0,Q.hexToNumber)(e.blockNumber)),e.transactionIndex&&(0,Q.isHexStrict)(e.transactionIndex)&&(t.transactionIndex=(0,Q.hexToNumber)(e.transactionIndex)),e.logIndex&&(0,Q.isHexStrict)(e.logIndex)&&(t.logIndex=(0,Q.hexToNumber)(e.logIndex)),e.address&&(t.address=(0,Q.toChecksumAddress)(e.address)),t};W.outputLogFormatter=G3;var V3=e=>{if(typeof e!="object")throw new Dc.FormatterError(`Received receipt is invalid: ${String(e)}`);let t=Object.assign({},e);return e.blockNumber&&(t.blockNumber=(0,Q.hexToNumber)(e.blockNumber)),e.transactionIndex&&(t.transactionIndex=(0,Q.hexToNumber)(e.transactionIndex)),t.cumulativeGasUsed=(0,Q.hexToNumber)(e.cumulativeGasUsed),t.gasUsed=(0,Q.hexToNumber)(e.gasUsed),e.logs&&Array.isArray(e.logs)&&(t.logs=e.logs.map(W.outputLogFormatter)),e.effectiveGasPrice&&(t.effectiveGasPrice=(0,Q.hexToNumber)(e.effectiveGasPrice)),e.contractAddress&&(t.contractAddress=(0,Q.toChecksumAddress)(e.contractAddress)),e.status&&(t.status=!!parseInt(e.status,10)),t};W.outputTransactionReceiptFormatter=V3;var W3=e=>{let t=Object.assign({},e);return t.gasLimit=(0,Q.hexToNumber)(e.gasLimit),t.gasUsed=(0,Q.hexToNumber)(e.gasUsed),t.size=(0,Q.hexToNumber)(e.size),t.timestamp=(0,Q.hexToNumber)(e.timestamp),e.number&&(t.number=(0,Q.hexToNumber)(e.number)),e.difficulty&&(t.difficulty=(0,W.outputBigIntegerFormatter)(e.difficulty)),e.totalDifficulty&&(t.totalDifficulty=(0,W.outputBigIntegerFormatter)(e.totalDifficulty)),e.transactions&&Array.isArray(e.transactions)&&(t.transactions=e.transactions.map(W.outputTransactionFormatter)),e.miner&&(t.miner=(0,Q.toChecksumAddress)(e.miner)),e.baseFeePerGas&&(t.baseFeePerGas=(0,W.outputBigIntegerFormatter)(e.baseFeePerGas)),t};W.outputBlockFormatter=W3;var Z3=e=>{var t;let r=Object.assign({},e);return e.ttl&&(r.ttl=(0,Q.numberToHex)(e.ttl)),e.workToProve&&(r.workToProve=(0,Q.numberToHex)(e.workToProve)),e.priority&&(r.priority=(0,Q.numberToHex)(e.priority)),e.topics&&!Array.isArray(e.topics)&&(r.topics=e.topics?[e.topics]:[]),r.topics=(t=r.topics)===null||t===void 0?void 0:t.map(n=>n.startsWith("0x")?n:(0,Q.fromUtf8)(n)),r};W.inputPostFormatter=Z3;var z3=e=>{var t;let r=Object.assign({},e);return e.expiry&&(r.expiry=(0,Q.hexToNumber)(e.expiry)),e.sent&&(r.sent=(0,Q.hexToNumber)(e.sent)),e.ttl&&(r.ttl=(0,Q.hexToNumber)(e.ttl)),e.workProved&&(r.workProved=(0,Q.hexToNumber)(e.workProved)),e.topics||(r.topics=[]),r.topics=(t=r.topics)===null||t===void 0?void 0:t.map(Q.toUtf8),r};W.outputPostFormatter=z3;var Q3=e=>{let t=Object.assign({},e);return t.startingBlock=(0,Q.hexToNumber)(e.startingBlock),t.currentBlock=(0,Q.hexToNumber)(e.currentBlock),t.highestBlock=(0,Q.hexToNumber)(e.highestBlock),e.knownStates&&(t.knownStates=(0,Q.hexToNumber)(e.knownStates)),e.pulledStates&&(t.pulledStates=(0,Q.hexToNumber)(e.pulledStates)),t};W.outputSyncingFormatter=Q3});var Aw=f(ta=>{"use strict";var S_=ta&&ta.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},vw;Object.defineProperty(ta,"__esModule",{value:!0});ta.Web3PromiEvent=void 0;var K3=Eo(),x_=class extends K3.Web3EventEmitter{constructor(t){super(),this[vw]="Promise",this._promise=new Promise(t)}then(t,r){return S_(this,void 0,void 0,function*(){return this._promise.then(t,r)})}catch(t){return S_(this,void 0,void 0,function*(){return this._promise.catch(t)})}finally(t){return S_(this,void 0,void 0,function*(){return this._promise.finally(t)})}on(t,r){return super.on(t,r),this}once(t,r){return super.once(t,r),this}};ta.Web3PromiEvent=x_;vw=Symbol.toStringTag});var Or=f($e=>{"use strict";var Ew=$e&&$e.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),J3=$e&&$e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Jr=$e&&$e.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ew(t,e,r)},X3=$e&&$e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ew(t,e,r);return J3(t,e),t};Object.defineProperty($e,"__esModule",{value:!0});$e.formatters=void 0;Jr(vp(),$e);Jr(Ed(),$e);Jr(Td(),$e);Jr(DA(),$e);Jr(pw(),$e);Jr(E_(),$e);Jr(pc(),$e);Jr(_w(),$e);Jr(P_(),$e);Jr(Aw(),$e);Jr(Eo(),$e);$e.formatters=X3(P_())});var ww=f(Tw=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,n={},i=!1,s=e.document,o;function a(E){typeof E!="function"&&(E=new Function(""+E));for(var I=new Array(arguments.length-1),x=0;x"u"?typeof global>"u"?Tw:global:self)});var Iw=f(B=>{"use strict";var K=B&&B.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(B,"__esModule",{value:!0});B.getProof=B.getChainId=B.requestAccounts=B.getPendingTransactions=B.getFeeHistory=B.submitHashrate=B.submitWork=B.getWork=B.getLogs=B.getFilterLogs=B.getFilterChanges=B.uninstallFilter=B.newPendingTransactionFilter=B.newBlockFilter=B.newFilter=B.compileSerpent=B.compileLLL=B.compileSolidity=B.getCompilers=B.getUncleByBlockNumberAndIndex=B.getUncleByBlockHashAndIndex=B.getTransactionReceipt=B.getTransactionByBlockNumberAndIndex=B.getTransactionByBlockHashAndIndex=B.getTransactionByHash=B.getBlockByNumber=B.getBlockByHash=B.estimateGas=B.call=B.sendRawTransaction=B.sendTransaction=B.signTransaction=B.sign=B.getCode=B.getUncleCountByBlockNumber=B.getUncleCountByBlockHash=B.getBlockTransactionCountByNumber=B.getBlockTransactionCountByHash=B.getTransactionCount=B.getStorageAt=B.getBalance=B.getBlockNumber=B.getAccounts=B.getMaxPriorityFeePerGas=B.getGasPrice=B.getHashRate=B.getMining=B.getCoinbase=B.getSyncing=B.getProtocolVersion=void 0;B.signTypedData=B.createAccessList=B.getNodeInfo=void 0;var Te=be();function Y3(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_protocolVersion",params:[]})})}B.getProtocolVersion=Y3;function $3(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_syncing",params:[]})})}B.getSyncing=$3;function ek(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_coinbase",params:[]})})}B.getCoinbase=ek;function tk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_mining",params:[]})})}B.getMining=tk;function rk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_hashrate",params:[]})})}B.getHashRate=rk;function nk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_gasPrice",params:[]})})}B.getGasPrice=nk;function ik(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_maxPriorityFeePerGas",params:[]})})}B.getMaxPriorityFeePerGas=ik;function sk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_accounts",params:[]})})}B.getAccounts=sk;function ok(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_blockNumber",params:[]})})}B.getBlockNumber=ok;function ak(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","blockNumberOrTag"],[t,r]),e.send({method:"eth_getBalance",params:[t,r]})})}B.getBalance=ak;function ck(e,t,r,n){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","hex","blockNumberOrTag"],[t,r,n]),e.send({method:"eth_getStorageAt",params:[t,r,n]})})}B.getStorageAt=ck;function uk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","blockNumberOrTag"],[t,r]),e.send({method:"eth_getTransactionCount",params:[t,r]})})}B.getTransactionCount=uk;function dk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32"],[t]),e.send({method:"eth_getBlockTransactionCountByHash",params:[t]})})}B.getBlockTransactionCountByHash=dk;function lk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag"],[t]),e.send({method:"eth_getBlockTransactionCountByNumber",params:[t]})})}B.getBlockTransactionCountByNumber=lk;function fk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32"],[t]),e.send({method:"eth_getUncleCountByBlockHash",params:[t]})})}B.getUncleCountByBlockHash=fk;function hk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag"],[t]),e.send({method:"eth_getUncleCountByBlockNumber",params:[t]})})}B.getUncleCountByBlockNumber=hk;function pk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","blockNumberOrTag"],[t,r]),e.send({method:"eth_getCode",params:[t,r]})})}B.getCode=pk;function mk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","hex"],[t,r]),e.send({method:"eth_sign",params:[t,r]})})}B.sign=mk;function _k(e,t){return K(this,void 0,void 0,function*(){return e.send({method:"eth_signTransaction",params:[t]})})}B.signTransaction=_k;function gk(e,t){return K(this,void 0,void 0,function*(){return e.send({method:"eth_sendTransaction",params:[t]})})}B.sendTransaction=gk;function yk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["hex"],[t]),e.send({method:"eth_sendRawTransaction",params:[t]})})}B.sendRawTransaction=yk;function bk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag"],[r]),e.send({method:"eth_call",params:[t,r]})})}B.call=bk;function vk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag"],[r]),e.send({method:"eth_estimateGas",params:[t,r]})})}B.estimateGas=vk;function Ak(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32","bool"],[t,r]),e.send({method:"eth_getBlockByHash",params:[t,r]})})}B.getBlockByHash=Ak;function Ek(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag","bool"],[t,r]),e.send({method:"eth_getBlockByNumber",params:[t,r]})})}B.getBlockByNumber=Ek;function Tk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32"],[t]),e.send({method:"eth_getTransactionByHash",params:[t]})})}B.getTransactionByHash=Tk;function wk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32","hex"],[t,r]),e.send({method:"eth_getTransactionByBlockHashAndIndex",params:[t,r]})})}B.getTransactionByBlockHashAndIndex=wk;function Ik(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag","hex"],[t,r]),e.send({method:"eth_getTransactionByBlockNumberAndIndex",params:[t,r]})})}B.getTransactionByBlockNumberAndIndex=Ik;function Rk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32"],[t]),e.send({method:"eth_getTransactionReceipt",params:[t]})})}B.getTransactionReceipt=Rk;function Pk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32","hex"],[t,r]),e.send({method:"eth_getUncleByBlockHashAndIndex",params:[t,r]})})}B.getUncleByBlockHashAndIndex=Pk;function Sk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag","hex"],[t,r]),e.send({method:"eth_getUncleByBlockNumberAndIndex",params:[t,r]})})}B.getUncleByBlockNumberAndIndex=Sk;function xk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_getCompilers",params:[]})})}B.getCompilers=xk;function Bk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["string"],[t]),e.send({method:"eth_compileSolidity",params:[t]})})}B.compileSolidity=Bk;function Ok(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["string"],[t]),e.send({method:"eth_compileLLL",params:[t]})})}B.compileLLL=Ok;function Ck(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["string"],[t]),e.send({method:"eth_compileSerpent",params:[t]})})}B.compileSerpent=Ck;function Nk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["filter"],[t]),e.send({method:"eth_newFilter",params:[t]})})}B.newFilter=Nk;function Mk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_newBlockFilter",params:[]})})}B.newBlockFilter=Mk;function kk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_newPendingTransactionFilter",params:[]})})}B.newPendingTransactionFilter=kk;function jk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["hex"],[t]),e.send({method:"eth_uninstallFilter",params:[t]})})}B.uninstallFilter=jk;function Dk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["hex"],[t]),e.send({method:"eth_getFilterChanges",params:[t]})})}B.getFilterChanges=Dk;function Lk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["hex"],[t]),e.send({method:"eth_getFilterLogs",params:[t]})})}B.getFilterLogs=Lk;function qk(e,t){return K(this,void 0,void 0,function*(){return Te.validator.validate(["filter"],[t]),e.send({method:"eth_getLogs",params:[t]})})}B.getLogs=qk;function Hk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_getWork",params:[]})})}B.getWork=Hk;function Uk(e,t,r,n){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes8","bytes32","bytes32"],[t,r,n]),e.send({method:"eth_submitWork",params:[t,r,n]})})}B.submitWork=Uk;function Fk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["bytes32","bytes32"],[t,r]),e.send({method:"eth_submitHashrate",params:[t,r]})})}B.submitHashrate=Fk;function Gk(e,t,r,n){return K(this,void 0,void 0,function*(){Te.validator.validate(["hex","blockNumberOrTag"],[t,r]);for(let i of n)Te.validator.validate(["number"],[i]);return e.send({method:"eth_feeHistory",params:[t,r,n]})})}B.getFeeHistory=Gk;function Vk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_pendingTransactions",params:[]})})}B.getPendingTransactions=Vk;function Wk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_requestAccounts",params:[]})})}B.requestAccounts=Wk;function Zk(e){return K(this,void 0,void 0,function*(){return e.send({method:"eth_chainId",params:[]})})}B.getChainId=Zk;function zk(e,t,r,n){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address","bytes32[]","blockNumberOrTag"],[t,r,n]),e.send({method:"eth_getProof",params:[t,r,n]})})}B.getProof=zk;function Qk(e){return K(this,void 0,void 0,function*(){return e.send({method:"web3_clientVersion",params:[]})})}B.getNodeInfo=Qk;function Kk(e,t,r){return K(this,void 0,void 0,function*(){return Te.validator.validate(["blockNumberOrTag"],[r]),e.send({method:"eth_createAccessList",params:[t,r]})})}B.createAccessList=Kk;function Jk(e,t,r,n=!1){return K(this,void 0,void 0,function*(){return Te.validator.validate(["address"],[t]),e.send({method:`eth_signTypedData${n?"":"_v4"}`,params:[t,r]})})}B.signTypedData=Jk});var Rw=f(mn=>{"use strict";var B_=mn&&mn.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(mn,"__esModule",{value:!0});mn.isListening=mn.getPeerCount=mn.getId=void 0;function Xk(e){return B_(this,void 0,void 0,function*(){return e.send({method:"net_version",params:[]})})}mn.getId=Xk;function Yk(e){return B_(this,void 0,void 0,function*(){return e.send({method:"net_peerCount",params:[]})})}mn.getPeerCount=Yk;function $k(e){return B_(this,void 0,void 0,function*(){return e.send({method:"net_listening",params:[]})})}mn.isListening=$k});var Pw=f(at=>{"use strict";var Gn=at&&at.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(at,"__esModule",{value:!0});at.ecRecover=at.sign=at.signTransaction=at.sendTransaction=at.importRawKey=at.lockAccount=at.unlockAccount=at.newAccount=at.getAccounts=void 0;var ej=e=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_listAccounts",params:[]})});at.getAccounts=ej;var tj=(e,t)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_newAccount",params:[t]})});at.newAccount=tj;var rj=(e,t,r,n)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_unlockAccount",params:[t,r,n]})});at.unlockAccount=rj;var nj=(e,t)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_lockAccount",params:[t]})});at.lockAccount=nj;var ij=(e,t,r)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_importRawKey",params:[t,r]})});at.importRawKey=ij;var sj=(e,t,r)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_sendTransaction",params:[t,r]})});at.sendTransaction=sj;var oj=(e,t,r)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_signTransaction",params:[t,r]})});at.signTransaction=oj;var aj=(e,t,r,n)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_sign",params:[t,r,n]})});at.sign=aj;var cj=(e,t,r)=>Gn(void 0,void 0,void 0,function*(){return e.send({method:"personal_ecRecover",params:[t,r]})});at.ecRecover=cj});var qi=f(sr=>{"use strict";var uj=sr&&sr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),dj=sr&&sr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),O_=sr&&sr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&uj(t,e,r);return dj(t,e),t};Object.defineProperty(sr,"__esModule",{value:!0});sr.personalRpcMethods=sr.netRpcMethods=sr.ethRpcMethods=void 0;var lj=O_(Iw());sr.ethRpcMethods=lj;var fj=O_(Rw());sr.netRpcMethods=fj;var hj=O_(Pw());sr.personalRpcMethods=hj});var _l=f(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.detectRawTransactionType=Wn.detectTransactionType=Wn.defaultTransactionTypeParser=void 0;var C_=G(),Lc=Pe(),Vn=be(),pj=V(),Sw={type:"object",properties:{accessList:{type:"null"},maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},xw={type:"object",properties:{maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},Bw={type:"object",properties:{gasPrice:{type:"null"}}},ml=(e,t,r)=>{try{Vn.validator.validateJSONSchema(e,t)}catch(n){throw n instanceof Vn.Web3ValidatorError?new pj.InvalidPropertiesForTransactionTypeError(n.errors,r):n}},mj=e=>{var t,r;let n=e;if(!(0,Vn.isNullish)(n.type)){let s;switch(n.type){case"0x0":s=Sw;break;case"0x1":s=xw;break;case"0x2":s=Bw;break;default:return(0,C_.format)({format:"uint"},n.type,Lc.ETH_DATA_FORMAT)}return ml(s,n,n.type),(0,C_.format)({format:"uint"},n.type,Lc.ETH_DATA_FORMAT)}if(!(0,Vn.isNullish)(n.maxFeePerGas)||!(0,Vn.isNullish)(n.maxPriorityFeePerGas))return ml(Bw,n,"0x2"),"0x2";if(!(0,Vn.isNullish)(n.accessList))return ml(xw,n,"0x1"),"0x1";let i=(t=n.hardfork)!==null&&t!==void 0?t:(r=n.common)===null||r===void 0?void 0:r.hardfork;if(!(0,Vn.isNullish)(i)){let s=Object.keys(Lc.HardforksOrdered).indexOf(i);if(s>=Object.keys(Lc.HardforksOrdered).indexOf("london"))return(0,Vn.isNullish)(n.gasPrice)?"0x2":"0x0";if(s===Object.keys(Lc.HardforksOrdered).indexOf("berlin"))return"0x0"}if(!(0,Vn.isNullish)(n.gasPrice))return ml(Sw,n,"0x0"),"0x0"};Wn.defaultTransactionTypeParser=mj;var _j=(e,t)=>{var r;return((r=t?.transactionTypeParser)!==null&&r!==void 0?r:Wn.defaultTransactionTypeParser)(e)};Wn.detectTransactionType=_j;var gj=e=>e[0]>127?"0x0":(0,C_.toHex)(e[0]);Wn.detectRawTransactionType=gj});var _n=f(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.accountSchema=J.storageProofSchema=J.feeHistorySchema=J.SignatureObjectSchema=J.transactionReceiptSchema=J.syncSchema=J.logSchema=J.blockHeaderSchema=J.blockSchema=J.withdrawalsSchema=J.transactionInfoSchema=J.transactionSchema=J.customChainSchema=J.hardforkSchema=J.chainSchema=J.accessListResultSchema=J.accessListSchema=J.accessListItemSchema=void 0;J.accessListItemSchema={type:"object",properties:{address:{format:"address"},storageKeys:{type:"array",items:{format:"bytes32"}}}};J.accessListSchema={type:"array",items:Object.assign({},J.accessListItemSchema)};J.accessListResultSchema={type:"object",properties:{accessList:Object.assign({},J.accessListSchema),gasUsed:{type:"string"}}};J.chainSchema={type:"string",enum:["goerli","kovan","mainnet","rinkeby","ropsten","sepolia"]};J.hardforkSchema={type:"string",enum:["arrowGlacier","berlin","byzantium","chainstart","constantinople","dao","homestead","istanbul","london","merge","muirGlacier","petersburg","shanghai","spuriousDragon","tangerineWhistle"]};J.customChainSchema={type:"object",properties:{name:{format:"string"},networkId:{format:"uint"},chainId:{format:"uint"}}};J.transactionSchema={type:"object",properties:{from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},J.accessListSchema),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},chain:Object.assign({},J.chainSchema),hardfork:Object.assign({},J.hardforkSchema),chainId:{format:"uint"},networkId:{format:"uint"},common:{type:"object",properties:{customChain:Object.assign({},J.customChainSchema),baseChain:Object.assign({},J.chainSchema),hardfork:Object.assign({},J.hardforkSchema)}},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}}};J.transactionInfoSchema={type:"object",properties:Object.assign(Object.assign({},J.transactionSchema.properties),{blockHash:{format:"bytes32"},blockNumber:{format:"uint"},hash:{format:"bytes32"},transactionIndex:{format:"uint"},from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},J.accessListSchema),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}})};J.withdrawalsSchema={type:"object",properties:{index:{format:"uint"},validatorIndex:{format:"uint"},address:{format:"address"},amount:{format:"uint"}}};J.blockSchema={type:"object",properties:{baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{oneOf:[{type:"array",items:Object.assign({},J.transactionInfoSchema)},{type:"array",items:{format:"bytes32"}}]},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},J.withdrawalsSchema)},withdrawalsRoot:{format:"bytes32"}}};J.blockHeaderSchema={type:"object",properties:{author:{format:"bytes32"},excessDataGas:{format:"uint"},baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{type:"array",items:{format:"bytes32"}},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},J.withdrawalsSchema)},withdrawalsRoot:{format:"bytes32"}}};J.logSchema={type:"object",properties:{removed:{format:"bool"},logIndex:{format:"uint"},transactionIndex:{format:"uint"},transactionHash:{format:"bytes32"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},address:{format:"address"},data:{format:"bytes"},topics:{type:"array",items:{format:"bytes32"}}}};J.syncSchema={type:"object",properties:{startingBlock:{format:"string"},currentBlock:{format:"string"},highestBlock:{format:"string"},knownStates:{format:"string"},pulledStates:{format:"string"}}};J.transactionReceiptSchema={type:"object",properties:{transactionHash:{format:"bytes32"},transactionIndex:{format:"uint"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},from:{format:"address"},to:{format:"address"},cumulativeGasUsed:{format:"uint"},gasUsed:{format:"uint"},effectiveGasPrice:{format:"uint"},contractAddress:{format:"address"},logs:{type:"array",items:Object.assign({},J.logSchema)},logsBloom:{format:"bytes"},root:{format:"bytes"},status:{format:"uint"},type:{format:"uint"}}};J.SignatureObjectSchema={type:"object",properties:{messageHash:{format:"bytes"},r:{format:"bytes32"},s:{format:"bytes32"},v:{format:"bytes"},message:{format:"bytes"},signature:{format:"bytes"}}};J.feeHistorySchema={type:"object",properties:{oldestBlock:{format:"uint"},baseFeePerGas:{type:"array",items:{format:"uint"}},reward:{type:"array",items:{type:"array",items:{format:"uint"}}},gasUsedRatio:{type:"array",items:{type:"number"}}}};J.storageProofSchema={type:"object",properties:{key:{format:"bytes32"},value:{format:"uint"},proof:{type:"array",items:{format:"bytes32"}}}};J.accountSchema={type:"object",properties:{balance:{format:"uint"},codeHash:{format:"bytes32"},nonce:{format:"uint"},storageHash:{format:"bytes32"},accountProof:{type:"array",items:{format:"bytes32"}},storageProof:{type:"array",items:Object.assign({},J.storageProofSchema)}}}});var na=f(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.formatTransaction=void 0;var yj=Pe(),xs=be(),ra=G(),bj=V(),Ow=_n();function vj(e,t=yj.DEFAULT_RETURN_FORMAT,r={transactionSchema:Ow.transactionInfoSchema,fillInputAndData:!1}){var n,i;let s=(0,ra.mergeDeep)({},e);if((0,xs.isNullish)(e?.common)||(s.common=Object.assign({},e.common),(0,xs.isNullish)((n=e.common)===null||n===void 0?void 0:n.customChain)||(s.common.customChain=Object.assign({},e.common.customChain))),s=(0,ra.format)((i=r.transactionSchema)!==null&&i!==void 0?i:Ow.transactionInfoSchema,s,t),!(0,xs.isNullish)(s.data)&&!(0,xs.isNullish)(s.input)&&(0,ra.toHex)(s.data)!==(0,ra.toHex)(s.input))throw new bj.TransactionDataAndInputError({data:(0,ra.bytesToHex)(s.data),input:(0,ra.bytesToHex)(s.input)});return r.fillInputAndData&&((0,xs.isNullish)(s.data)?(0,xs.isNullish)(s.input)||(s.data=s.input):s.input=s.data),(0,xs.isNullish)(s.gasLimit)||(s.gas=s.gasLimit,delete s.gasLimit),s}gl.formatTransaction=vj});var Cw=f(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.decodeSignedTransaction=void 0;var ia=G(),Aj=ji(),Ej=_l(),Tj=na();function wj(e,t,r={fillInputAndData:!1}){return{raw:(0,ia.format)({format:"bytes"},e,t),tx:(0,Tj.formatTransaction)(Object.assign(Object.assign({},Aj.TransactionFactory.fromSerializedData((0,ia.hexToBytes)(e)).toJSON()),{hash:(0,ia.bytesToHex)((0,ia.keccak256)((0,ia.hexToBytes)(e))),type:(0,Ej.detectRawTransactionType)((0,ia.hexToBytes)(e))}),t,{fillInputAndData:r.fillInputAndData})}}yl.decodeSignedTransaction=wj});var k_=f(gn=>{"use strict";var N_=gn&&gn.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(gn,"__esModule",{value:!0});gn.isListening=gn.getPeerCount=gn.getId=void 0;var Nw=G(),M_=qi();function Ij(e,t){return N_(this,void 0,void 0,function*(){let r=yield M_.netRpcMethods.getId(e.requestManager);return(0,Nw.format)({format:"uint"},r,t)})}gn.getId=Ij;function Rj(e,t){return N_(this,void 0,void 0,function*(){let r=yield M_.netRpcMethods.getPeerCount(e.requestManager);return(0,Nw.format)({format:"uint"},r,t)})}gn.getPeerCount=Rj;var Pj=e=>N_(void 0,void 0,void 0,function*(){return M_.netRpcMethods.isListening(e.requestManager)});gn.isListening=Pj});var q_=f(Cr=>{"use strict";var Sj=Cr&&Cr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),xj=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bj=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Sj(t,e,r);return xj(t,e),t},j_=Cr&&Cr.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Net=void 0;var Oj=Or(),D_=Bj(k_()),L_=class extends Oj.Web3Context{getId(t=this.defaultReturnFormat){return j_(this,void 0,void 0,function*(){return D_.getId(this,t)})}getPeerCount(t=this.defaultReturnFormat){return j_(this,void 0,void 0,function*(){return D_.getPeerCount(this,t)})}isListening(){return j_(this,void 0,void 0,function*(){return D_.isListening(this)})}};Cr.Net=L_});var sa=f(Zn=>{"use strict";var Cj=Zn&&Zn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),Mw=Zn&&Zn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Cj(t,e,r)};Object.defineProperty(Zn,"__esModule",{value:!0});var Nj=q_();Mw(q_(),Zn);Mw(k_(),Zn);Zn.default=Nj.Net});var Bs=f(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.NUMBER_DATA_FORMAT=zn.ALL_EVENTS_ABI=zn.ALL_EVENTS=void 0;var kw=Pe();zn.ALL_EVENTS="ALLEVENTS";zn.ALL_EVENTS_ABI={name:zn.ALL_EVENTS,signature:"",type:"event",inputs:[]};zn.NUMBER_DATA_FORMAT={bytes:kw.FMT_BYTES.HEX,number:kw.FMT_NUMBER.NUMBER}});var G_=f(aa=>{"use strict";var jw=aa&&aa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(aa,"__esModule",{value:!0});aa.getTransactionGasPricing=void 0;var Mj=Pe(),oa=be(),U_=V(),H_=G(),F_=Hi(),kj=qc();function jj(e,t,r){var n,i,s,o;return jw(this,void 0,void 0,function*(){let a=yield(0,F_.getBlock)(t,t.defaultBlock,!1,Mj.ETH_DATA_FORMAT);if((0,oa.isNullish)(a.baseFeePerGas))throw new U_.Eip1559NotSupportedError;let u;if((0,oa.isNullish)(e.gasPrice)&&BigInt(a.baseFeePerGas)===BigInt(0)&&(u=yield(0,F_.getGasPrice)(t,r)),!(0,oa.isNullish)(e.gasPrice)||!(0,oa.isNullish)(u)){let d=(0,H_.format)({format:"uint"},(n=e.gasPrice)!==null&&n!==void 0?n:u,r);return{maxPriorityFeePerGas:d,maxFeePerGas:d}}return{maxPriorityFeePerGas:(0,H_.format)({format:"uint"},(i=e.maxPriorityFeePerGas)!==null&&i!==void 0?i:t.defaultMaxPriorityFeePerGas,r),maxFeePerGas:(0,H_.format)({format:"uint"},(s=e.maxFeePerGas)!==null&&s!==void 0?s:BigInt(a.baseFeePerGas)*BigInt(2)+BigInt((o=e.maxPriorityFeePerGas)!==null&&o!==void 0?o:t.defaultMaxPriorityFeePerGas),r)}})}function Dj(e,t,r){return jw(this,void 0,void 0,function*(){let n=(0,kj.getTransactionType)(e,t);if(!(0,oa.isNullish)(n)){if(n.startsWith("-"))throw new U_.UnsupportedTransactionTypeError(n);if(Number(n)<0||Number(n)>127)throw new U_.UnsupportedTransactionTypeError(n);if((0,oa.isNullish)(e.gasPrice)&&(n==="0x0"||n==="0x1"))return{gasPrice:yield(0,F_.getGasPrice)(t,r),maxPriorityFeePerGas:void 0,maxFeePerGas:void 0};if(n==="0x2")return Object.assign({gasPrice:void 0},yield jj(e,t,r))}})}aa.getTransactionGasPricing=Dj});var qc=f(Ct=>{"use strict";var W_=Ct&&Ct.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.transactionBuilder=Ct.defaultTransactionBuilder=Ct.getTransactionType=Ct.getTransactionNonce=Ct.getTransactionFromOrToAttr=void 0;var Os=Pe(),Lj=ji(),qj=sa(),ze=be(),ca=V(),ua=G(),Hj=Bs(),V_=Hi(),Uj=_l(),Fj=_n(),Gj=G_(),Vj=(e,t,r,n)=>{if(r!==void 0&&e in r&&r[e]!==void 0){if(typeof r[e]=="string"&&(0,ze.isAddress)(r[e]))return r[e];if(!(0,ze.isHexStrict)(r[e])&&(0,ze.isNumber)(r[e])){if(t.wallet){let i=t.wallet.get((0,ua.format)({format:"uint"},r[e],Hj.NUMBER_DATA_FORMAT));if(!(0,ze.isNullish)(i))return i.address;throw new ca.LocalWalletNotAvailableError}throw new ca.LocalWalletNotAvailableError}else throw e==="from"?new ca.InvalidTransactionWithSender(r.from):new ca.InvalidTransactionWithReceiver(r.to)}if(e==="from"){if(!(0,ze.isNullish)(n))return(0,Lj.privateKeyToAddress)(n);if(!(0,ze.isNullish)(t.defaultAccount))return t.defaultAccount}};Ct.getTransactionFromOrToAttr=Vj;var Wj=(e,t,r=e.defaultReturnFormat)=>W_(void 0,void 0,void 0,function*(){if((0,ze.isNullish)(t))throw new ca.UnableToPopulateNonceError;return(0,V_.getTransactionCount)(e,t,e.defaultBlock,r)});Ct.getTransactionNonce=Wj;var Zj=(e,t)=>{let r=(0,Uj.detectTransactionType)(e,t);if(!(0,ze.isNullish)(r))return r;if(!(0,ze.isNullish)(t.defaultTransactionType))return(0,ua.format)({format:"uint"},t.defaultTransactionType,Os.ETH_DATA_FORMAT)};Ct.getTransactionType=Zj;function Dw(e){var t,r;return W_(this,void 0,void 0,function*(){let n=(0,ua.format)(Fj.transactionSchema,e.transaction,e.web3Context.defaultReturnFormat);if((0,ze.isNullish)(n.from)&&(n.from=(0,Ct.getTransactionFromOrToAttr)("from",e.web3Context,void 0,e.privateKey)),(0,ze.isNullish)(n.nonce)&&(n.nonce=yield(0,Ct.getTransactionNonce)(e.web3Context,n.from,Os.ETH_DATA_FORMAT)),(0,ze.isNullish)(n.value)&&(n.value="0x0"),(0,ze.isNullish)(n.data))(0,ze.isNullish)(n.input)?n.input="0x":n.input.startsWith("0x")||(n.input=`0x${n.input}`);else{if(!(0,ze.isNullish)(n.input)&&n.data!==n.input)throw new ca.TransactionDataAndInputError({data:(0,ua.bytesToHex)(n.data),input:(0,ua.bytesToHex)(n.input)});n.data.startsWith("0x")||(n.data=`0x${n.data}`)}if((0,ze.isNullish)(n.common)){if(e.web3Context.defaultCommon){let i=e.web3Context.defaultCommon,s=i.customChain.chainId,o=i.customChain.networkId,a=i.customChain.name;n.common=Object.assign(Object.assign({},i),{customChain:{chainId:s,networkId:o,name:a}})}(0,ze.isNullish)(n.chain)&&(n.chain=e.web3Context.defaultChain),(0,ze.isNullish)(n.hardfork)&&(n.hardfork=e.web3Context.defaultHardfork)}if((0,ze.isNullish)(n.chainId)&&(0,ze.isNullish)((t=n.common)===null||t===void 0?void 0:t.customChain.chainId)&&(n.chainId=yield(0,V_.getChainId)(e.web3Context,Os.ETH_DATA_FORMAT)),(0,ze.isNullish)(n.networkId)&&(n.networkId=(r=e.web3Context.defaultNetworkId)!==null&&r!==void 0?r:yield(0,qj.getId)(e.web3Context,Os.ETH_DATA_FORMAT)),(0,ze.isNullish)(n.gasLimit)&&!(0,ze.isNullish)(n.gas)&&(n.gasLimit=n.gas),n.type=(0,Ct.getTransactionType)(n,e.web3Context),(0,ze.isNullish)(n.accessList)&&(n.type==="0x1"||n.type==="0x2")&&(n.accessList=[]),e.fillGasPrice&&(n=Object.assign(Object.assign({},n),yield(0,Gj.getTransactionGasPricing)(n,e.web3Context,Os.ETH_DATA_FORMAT))),(0,ze.isNullish)(n.gas)&&(0,ze.isNullish)(n.gasLimit)&&e.fillGasLimit){let i=yield(0,V_.estimateGas)(e.web3Context,n,"latest",Os.ETH_DATA_FORMAT);n=Object.assign(Object.assign({},n),{gas:(0,ua.format)({format:"uint"},i,Os.ETH_DATA_FORMAT)})}return n})}Ct.defaultTransactionBuilder=Dw;var zj=e=>W_(void 0,void 0,void 0,function*(){var t;return((t=e.web3Context.transactionBuilder)!==null&&t!==void 0?t:Dw)(Object.assign(Object.assign({},e),{transaction:e.transaction}))});Ct.transactionBuilder=zj});var Q_=f(da=>{"use strict";var z_=da&&da.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(da,"__esModule",{value:!0});da.rejectIfBlockTimeout=void 0;var Qj=G(),Lw=V(),qw=Bs(),Hw=Hi();function Z_(e,t,r){let n=e.transactionPollingInterval,[i,s]=(0,Qj.rejectIfConditionAtInterval)(()=>z_(this,void 0,void 0,function*(){let a;try{a=yield(0,Hw.getBlockNumber)(e,qw.NUMBER_DATA_FORMAT)}catch(d){console.warn("An error happen while trying to get the block number",d);return}let u=a-t;if(u>=e.transactionBlockTimeout)return new Lw.TransactionBlockTimeoutError({starterBlockNumber:t,numberOfBlocks:u,transactionHash:r})}),n);return[s,{clean:()=>{clearInterval(i)}}]}function Kj(e,t,r){var n;return z_(this,void 0,void 0,function*(){let i=!0,s,o;function a(d,c){c&&console.warn("error happened at subscription. So revert to polling...",c),o.clean(),i=!1;let[l,h]=Z_(e,t,r);o.clean=h.clean,l.catch(m=>d(m))}try{s=yield(n=e.subscriptionManager)===null||n===void 0?void 0:n.subscribe("newHeads"),o={clean:()=>{var d;s.id&&((d=e.subscriptionManager)===null||d===void 0||d.removeSubscription(s).then(()=>{}).catch(()=>{}))}}}catch{return Z_(e,t,r)}return[new Promise((d,c)=>{try{s.on("data",l=>{if(i=!1,!l?.number)return;let h=Number(BigInt(l.number)-BigInt(t));h>=e.transactionBlockTimeout&&c(new Lw.TransactionBlockTimeoutError({starterBlockNumber:t,numberOfBlocks:h,transactionHash:r}))}),s.on("error",l=>{a(c,l)})}catch(l){a(c,l)}setTimeout(()=>{i&&a(c)},e.blockHeaderTimeout*1e3)}),o]})}function Jj(e,t){var r,n;return z_(this,void 0,void 0,function*(){let{provider:i}=e.requestManager,s,o=yield(0,Hw.getBlockNumber)(e,qw.NUMBER_DATA_FORMAT);return!((n=(r=i).supportsSubscriptions)===null||n===void 0)&&n.call(r)&&e.enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout?s=yield Kj(e,o,t):s=Z_(e,o,t),s})}da.rejectIfBlockTimeout=Jj});var bl=f(la=>{"use strict";var Xj=la&&la.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(la,"__esModule",{value:!0});la.trySendTransaction=void 0;var Yj=G(),$j=V(),eD=Q_();function tD(e,t,r){return Xj(this,void 0,void 0,function*(){let[n,i]=(0,Yj.rejectIfTimeout)(e.transactionSendTimeout,new $j.TransactionSendTimeoutError({numberOfSeconds:e.transactionSendTimeout/1e3,transactionHash:r})),[s,o]=yield(0,eD.rejectIfBlockTimeout)(e,r);try{return yield Promise.race([t(),i,s])}finally{clearTimeout(n),o.clean()}})}la.trySendTransaction=tD});var K_=f(fa=>{"use strict";var Uw=fa&&fa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(fa,"__esModule",{value:!0});fa.waitForTransactionReceipt=void 0;var rD=V(),Fw=G(),nD=Q_(),iD=Hi();function sD(e,t,r,n){var i;return Uw(this,void 0,void 0,function*(){let s=(i=e.transactionReceiptPollingInterval)!==null&&i!==void 0?i:e.transactionPollingInterval,[o,a]=(0,Fw.pollTillDefinedAndReturnIntervalId)(()=>Uw(this,void 0,void 0,function*(){try{return(n??iD.getTransactionReceipt)(e,t,r)}catch(h){console.warn("An error happen while trying to get the transaction receipt",h);return}}),s),[u,d]=(0,Fw.rejectIfTimeout)(e.transactionPollingTimeout,new rD.TransactionPollingTimeoutError({numberOfSeconds:e.transactionPollingTimeout/1e3,transactionHash:t})),[c,l]=yield(0,nD.rejectIfBlockTimeout)(e,t);try{return yield Promise.race([o,d,c])}finally{u&&clearTimeout(u),a&&clearInterval(a),l.clean()}})}fa.waitForTransactionReceipt=sD});var J_=f(ha=>{"use strict";var oD=ha&&ha.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ha,"__esModule",{value:!0});ha.watchTransactionByPolling=void 0;var vl=G(),aD=qi(),cD=_n(),uD=({web3Context:e,transactionReceipt:t,transactionPromiEvent:r,customTransactionReceiptSchema:n,returnFormat:i})=>{var s;let o=1,a=setInterval(()=>{oD(void 0,void 0,void 0,function*(){o>=e.transactionConfirmationBlocks&&clearInterval(a);let u=yield aD.ethRpcMethods.getBlockByNumber(e.requestManager,(0,vl.numberToHex)(BigInt(t.blockNumber)+BigInt(o)),!1);u?.hash&&(o+=1,r.emit("confirmation",{confirmations:(0,vl.format)({format:"uint"},o,i),receipt:(0,vl.format)(n??cD.transactionReceiptSchema,t,i),latestBlockHash:(0,vl.format)({format:"bytes32"},u.hash,i)}))})},(s=e.transactionReceiptPollingInterval)!==null&&s!==void 0?s:e.transactionPollingInterval)};ha.watchTransactionByPolling=uD});var Vw=f(pa=>{"use strict";var Gw=pa&&pa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(pa,"__esModule",{value:!0});pa.watchTransactionBySubscription=void 0;var X_=G(),dD=_n(),Y_=J_(),lD=({web3Context:e,transactionReceipt:t,transactionPromiEvent:r,customTransactionReceiptSchema:n,returnFormat:i})=>{let s=!0,o;setImmediate(()=>{var a;(a=e.subscriptionManager)===null||a===void 0||a.subscribe("newHeads").then(u=>{u.on("data",d=>Gw(void 0,void 0,void 0,function*(){var c;if(s=!1,!d?.number||o===d?.parentHash)return;o=d?.parentHash;let l=BigInt(d.number)-BigInt(t.blockNumber)+BigInt(1);r.emit("confirmation",{confirmations:(0,X_.format)({format:"uint"},l,i),receipt:(0,X_.format)(n??dD.transactionReceiptSchema,t,i),latestBlockHash:(0,X_.format)({format:"bytes32"},d.parentHash,i)}),l>=e.transactionConfirmationBlocks&&(yield(c=e.subscriptionManager)===null||c===void 0?void 0:c.removeSubscription(u))})),u.on("error",()=>Gw(void 0,void 0,void 0,function*(){var d;yield(d=e.subscriptionManager)===null||d===void 0?void 0:d.removeSubscription(u),s=!1,(0,Y_.watchTransactionByPolling)({web3Context:e,transactionReceipt:t,transactionPromiEvent:r,customTransactionReceiptSchema:n,returnFormat:i})}))}).catch(()=>{s=!1,(0,Y_.watchTransactionByPolling)({web3Context:e,transactionReceipt:t,customTransactionReceiptSchema:n,transactionPromiEvent:r,returnFormat:i})})}),setTimeout(()=>{s&&(0,Y_.watchTransactionByPolling)({web3Context:e,transactionReceipt:t,transactionPromiEvent:r,returnFormat:i})},e.blockHeaderTimeout*1e3)};pa.watchTransactionBySubscription=lD});var zw=f(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.watchTransactionForConfirmations=void 0;var Hc=G(),Ww=be(),Zw=V(),fD=_n(),hD=J_(),pD=Vw();function mD(e,t,r,n,i,s){if((0,Ww.isNullish)(r)||(0,Ww.isNullish)(r.blockHash))throw new Zw.TransactionMissingReceiptOrBlockHashError({receipt:r,blockHash:(0,Hc.format)({format:"bytes32"},r?.blockHash,i),transactionHash:(0,Hc.format)({format:"bytes32"},n,i)});if(!r.blockNumber)throw new Zw.TransactionReceiptMissingBlockNumberError({receipt:r});t.emit("confirmation",{confirmations:(0,Hc.format)({format:"uint"},1,i),receipt:(0,Hc.format)(s??fD.transactionReceiptSchema,r,i),latestBlockHash:(0,Hc.format)({format:"bytes32"},r.blockHash,i)});let o=e.requestManager.provider;o&&"supportsSubscriptions"in o&&o.supportsSubscriptions()?(0,pD.watchTransactionBySubscription)({web3Context:e,transactionReceipt:r,transactionPromiEvent:t,customTransactionReceiptSchema:s,returnFormat:i}):(0,hD.watchTransactionByPolling)({web3Context:e,transactionReceipt:r,transactionPromiEvent:t,customTransactionReceiptSchema:s,returnFormat:i})}Al.watchTransactionForConfirmations=mD});var Cs=f(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.jsonInterfaceMethodToString=ie.flattenTypes=ie.formatParam=ie.formatOddHexstrings=ie.isOddHexstring=ie.mapTypes=ie.mapStructToCoderFormat=ie.mapStructNameAndType=ie.isSimplifiedStructFormat=ie.isAbiConstructorFragment=ie.isAbiFunctionFragment=ie.isAbiEventFragment=ie.isAbiErrorFragment=ie.isAbiFragment=void 0;var _D=V(),or=G(),gD=e=>!(0,or.isNullish)(e)&&typeof e=="object"&&!(0,or.isNullish)(e.type)&&["function","event","constructor","error"].includes(e.type);ie.isAbiFragment=gD;var yD=e=>!(0,or.isNullish)(e)&&typeof e=="object"&&!(0,or.isNullish)(e.type)&&e.type==="error";ie.isAbiErrorFragment=yD;var bD=e=>!(0,or.isNullish)(e)&&typeof e=="object"&&!(0,or.isNullish)(e.type)&&e.type==="event";ie.isAbiEventFragment=bD;var vD=e=>!(0,or.isNullish)(e)&&typeof e=="object"&&!(0,or.isNullish)(e.type)&&e.type==="function";ie.isAbiFunctionFragment=vD;var AD=e=>!(0,or.isNullish)(e)&&typeof e=="object"&&!(0,or.isNullish)(e.type)&&e.type==="constructor";ie.isAbiConstructorFragment=AD;var ED=e=>typeof e=="object"&&typeof e.components>"u"&&typeof e.name>"u";ie.isSimplifiedStructFormat=ED;var TD=e=>e.includes("[]")?{type:"tuple[]",name:e.slice(0,-2)}:{type:"tuple",name:e};ie.mapStructNameAndType=TD;var wD=e=>{let t=[];for(let r of Object.keys(e)){let n=e[r];typeof n=="object"?t.push(Object.assign(Object.assign({},(0,ie.mapStructNameAndType)(r)),{components:(0,ie.mapStructToCoderFormat)(n)})):t.push({name:r,type:e[r]})}return t};ie.mapStructToCoderFormat=wD;var ID=e=>{let t=[];for(let r of e){let n=r;if(typeof r=="object"&&(n=Object.assign({},r)),typeof r=="object"&&r.type==="function"&&(n=Object.assign(Object.assign({},r),{type:"bytes24"})),(0,ie.isSimplifiedStructFormat)(n)){let i=Object.keys(n)[0];t.push(Object.assign(Object.assign({},(0,ie.mapStructNameAndType)(i)),{components:(0,ie.mapStructToCoderFormat)(n[i])}))}else t.push(n)}return t};ie.mapTypes=ID;var RD=e=>typeof e=="string"&&/^(-)?0x[0-9a-f]*$/i.test(e)&&e.length%2===1;ie.isOddHexstring=RD;var PD=e=>(0,ie.isOddHexstring)(e)?`0x0${e.substring(2)}`:e;ie.formatOddHexstrings=PD;var SD=/^bytes([0-9]*)$/,xD=/^bytes([0-9]*)\[\]$/,BD=/^(u?int)([0-9]*)$/,OD=/^(u?int)([0-9]*)\[\]$/,CD=(e,t)=>{let r=typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t;if(r instanceof BigInt||typeof r=="bigint")return r.toString(10);if(xD.exec(e)||OD.exec(e))return[...r].map(s=>(0,ie.formatParam)(e.replace("[]",""),s));let n=BD.exec(e);if(n){let i=parseInt(n[2]?n[2]:"256",10);if(i/8{let r=[];return t.forEach(n=>{if(typeof n.components=="object"){if(!n.type.startsWith("tuple"))throw new _D.AbiError(`Invalid value given "${n.type}". Error: components found but type is not tuple.`);let i=n.type.indexOf("["),s=i>=0?n.type.substring(i):"",o=(0,ie.flattenTypes)(e,n.components);Array.isArray(o)&&e?r.push(`tuple(${o.join(",")})${s}`):e?r.push(`(${o.join()})`):r.push(`(${o.join(",")})${s}`)}else r.push(n.type)}),r};ie.flattenTypes=ND;var MD=e=>{var t,r,n,i;return(0,ie.isAbiErrorFragment)(e)||(0,ie.isAbiEventFragment)(e)||(0,ie.isAbiFunctionFragment)(e)?!((t=e.name)===null||t===void 0)&&t.includes("(")?e.name:`${(r=e.name)!==null&&r!==void 0?r:""}(${(0,ie.flattenTypes)(!1,(n=e.inputs)!==null&&n!==void 0?n:[]).join(",")})`:`(${(0,ie.flattenTypes)(!1,(i=e.inputs)!==null&&i!==void 0?i:[]).join(",")})`};ie.jsonInterfaceMethodToString=MD});var $_=f(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.encodeErrorSignature=void 0;var kD=G(),jD=V(),Qw=Cs(),DD=e=>{if(typeof e!="string"&&!(0,Qw.isAbiErrorFragment)(e))throw new jD.AbiError("Invalid parameter value in encodeErrorSignature");let t;return e&&(typeof e=="function"||typeof e=="object")?t=(0,Qw.jsonInterfaceMethodToString)(e):t=e,(0,kD.sha3Raw)(t)};El.encodeErrorSignature=DD});var Jw=f(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.encodeEventSignature=void 0;var LD=G(),qD=V(),Kw=Cs(),HD=e=>{if(typeof e!="string"&&!(0,Kw.isAbiEventFragment)(e))throw new qD.AbiError("Invalid parameter value in encodeEventSignature");let t;return e&&(typeof e=="function"||typeof e=="object")?t=(0,Kw.jsonInterfaceMethodToString)(e):t=e,(0,LD.sha3Raw)(t)};Tl.encodeEventSignature=HD});function Ui(e,t){return e.exec(t)?.groups}var eg,tg,rg,Xw=du(()=>{eg=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,tg=/^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)?$/,rg=/^\(.+?\).*?$/});var UD,FD,ma,Yw=du(()=>{UD=Object.defineProperty,FD=(e,t,r)=>t in e?UD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ma=(e,t,r)=>(FD(e,typeof t!="symbol"?t+"":t,r),r)});var oI={};ky(oI,{BaseError:()=>ct,narrow:()=>WD,parseAbi:()=>pL,parseAbiItem:()=>mL,parseAbiParameter:()=>_L,parseAbiParameters:()=>gL});function WD(e){return e}function ZD(e){return $w.test(e)}function zD(e){return Ui($w,e)}function QD(e){return eI.test(e)}function KD(e){return Ui(eI,e)}function JD(e){return tI.test(e)}function XD(e){return Ui(tI,e)}function Uc(e){return rI.test(e)}function YD(e){return Ui(rI,e)}function $D(e){return nI.test(e)}function eL(e){return Ui(nI,e)}function rL(e){return tL.test(e)}function iL(e){return nL.test(e)}function oL(e,t){return t?`${t}:${e}`:e}function sg(e,t={}){if(JD(e)){let r=XD(e);if(!r)throw new ct("Invalid function signature.",{details:e});let n=pr(r.parameters),i=[],s=n.length;for(let a=0;a0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`});return[...t,r.trim()]}let i=e.length;for(let s=0;s{Xw();Yw();GD="abitype",VD="0.7.1",ct=class extends Error{constructor(e,t={}){let r=t.cause instanceof ct?t.cause.details:t.cause?.message?t.cause.message:t.details,n=t.cause instanceof ct&&t.cause.docsPath||t.docsPath,i=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...r?[`Details: ${r}`]:[],`Version: ${GD}@${VD}`].join(` `);super(i),ma(this,"details"),ma(this,"docsPath"),ma(this,"metaMessages"),ma(this,"shortMessage"),ma(this,"name","AbiTypeError"),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=n,this.metaMessages=t.metaMessages,this.shortMessage=e}};$w=/^error (?[a-zA-Z0-9_]+)\((?.*?)\)$/;eI=/^event (?[a-zA-Z0-9_]+)\((?.*?)\)$/;tI=/^function (?[a-zA-Z0-9_]+)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns \((?.*?)\))?$/;rI=/^struct (?[a-zA-Z0-9_]+) \{(?.*?)\}$/;nI=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;tL=/^fallback\(\)$/;nL=/^receive\(\) external payable$/;wl=new Set(["memory","indexed","storage","calldata"]),sL=new Set(["indexed"]),ig=new Set(["calldata","memory","storage"]);ng=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}]]);aL=/^(?[a-zA-Z0-9_]+?)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z0-9_]+))?$/,cL=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z0-9_]+))?$/,uL=/^u?int$/;dL=/^(?: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)$/;hL=/^(?[a-zA-Z0-9_]+?)(?(?:\[\d*?\])+?)?$/});var yn=f(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.isDynamic=wt.extractArrayType=wt.toAbiParams=wt.isAbiParameter=wt.convertExternalAbiParameter=wt.allocUnsafe=wt.alloc=wt.WORD_SIZE=void 0;var yL=(aI(),jy(oI)),uI=V(),cI=G(),og=Cs();wt.WORD_SIZE=32;function bL(e=0){var t;if(((t=globalThis.Buffer)===null||t===void 0?void 0:t.alloc)!==void 0){let r=globalThis.Buffer.alloc(e);return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}return new Uint8Array(e)}wt.alloc=bL;function vL(e=0){var t;if(((t=globalThis.Buffer)===null||t===void 0?void 0:t.allocUnsafe)!==void 0){let r=globalThis.Buffer.allocUnsafe(e);return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}return new Uint8Array(e)}wt.allocUnsafe=vL;function cg(e){var t,r;return Object.assign(Object.assign({},e),{name:(t=e.name)!==null&&t!==void 0?t:"",components:(r=e.components)===null||r===void 0?void 0:r.map(n=>cg(n))})}wt.convertExternalAbiParameter=cg;function dI(e){return!(0,cI.isNullish)(e)&&typeof e=="object"&&!(0,cI.isNullish)(e.type)&&typeof e.type=="string"}wt.isAbiParameter=dI;function AL(e){return e.map(t=>{var r;if(dI(t))return t;if(typeof t=="string")return cg((0,yL.parseAbiParameter)(t.replace(/tuple/,"")));if((0,og.isSimplifiedStructFormat)(t)){let n=Object.keys(t)[0],i=(0,og.mapStructNameAndType)(n);return i.name=(r=i.name)!==null&&r!==void 0?r:"",Object.assign(Object.assign({},i),{components:(0,og.mapStructToCoderFormat)(t[n])})}throw new uI.AbiError("Invalid abi")})}wt.toAbiParams=AL;function lI(e){let t=e.type.lastIndexOf("["),r=e.type.substring(0,t),n=e.type.substring(t),i=-1;if(n!=="[]"&&(i=Number(n.slice(1,-1)),isNaN(i)))throw new uI.AbiError("Invalid fixed array size",{size:n});return{param:{type:r,name:"",components:e.components},size:i}}wt.extractArrayType=lI;function ag(e){var t,r;return e.type==="string"||e.type==="bytes"||e.type.endsWith("[]")?!0:e.type==="tuple"?(r=(t=e.components)===null||t===void 0?void 0:t.some(ag))!==null&&r!==void 0?r:!1:e.type.endsWith("]")?ag(lI(e).param):!1}wt.isDynamic=ag});var lg=f(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.decodeAddress=ga.encodeAddress=void 0;var ug=V(),EL=G(),dg=be(),_a=yn(),fI=20,hI=_a.WORD_SIZE-fI;function TL(e,t){if(typeof t!="string")throw new ug.AbiError("address type expects string as input type",{value:t,name:e.name,type:e.type});let r=t.toLowerCase();if(r.startsWith("0x")||(r=`0x${r}`),!(0,dg.isAddress)(r))throw new ug.AbiError("provided input is not valid address",{value:t,name:e.name,type:e.type});let n=dg.utils.hexToUint8Array(r),i=(0,_a.alloc)(_a.WORD_SIZE);return i.set(n,hI),{dynamic:!1,encoded:i}}ga.encodeAddress=TL;function wL(e,t){let r=t.subarray(hI,_a.WORD_SIZE);if(r.length!==fI)throw new ug.AbiError("Invalid decoding input, not enough bytes to decode address",{bytes:t});let n=dg.utils.uint8ArrayToHexString(r);return{result:(0,EL.toChecksumAddress)(n),encoded:t.subarray(_a.WORD_SIZE),consumed:_a.WORD_SIZE}}ga.decodeAddress=wL});var pI=f(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.numberLimits=void 0;bn.numberLimits=new Map;var Rl=BigInt(256);for(let e=8;e<=256;e+=8)bn.numberLimits.set(`uint${e}`,{min:BigInt(0),max:Rl-BigInt(1)}),bn.numberLimits.set(`int${e}`,{min:-Rl/BigInt(2),max:Rl/BigInt(2)-BigInt(1)}),Rl*=BigInt(256);bn.numberLimits.set("int",bn.numberLimits.get("int256"));bn.numberLimits.set("uint",bn.numberLimits.get("uint256"))});var Gi=f(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.decodeNumber=ya.encodeNumber=void 0;var Fi=V(),mI=G(),_I=be(),Fc=yn(),gI=pI(),yI=BigInt(1)<n.max)throw new Fi.AbiError("provided input is greater then maximum for given type",{type:e.type,value:t,name:e.name,maximum:n.max.toString()});return{dynamic:!1,encoded:IL(r)}}ya.encodeNumber=PL;function SL(e,t){if(t.lengthn.max)throw new Fi.AbiError("decoded value is greater then maximum for given type",{type:e.type,value:i,name:e.name,maximum:n.max.toString()});return{result:i,encoded:t.subarray(Fc.WORD_SIZE),consumed:Fc.WORD_SIZE}}ya.decodeNumber=SL});var hg=f(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.decodeBool=ba.encodeBoolean=void 0;var fg=V(),xL=G(),bI=yn(),vI=Gi();function BL(e,t){let r;try{r=(0,xL.toBool)(t)}catch(n){if(n instanceof fg.InvalidBooleanError)throw new fg.AbiError("provided input is not valid boolean value",{type:e.type,value:t,name:e.name})}return(0,vI.encodeNumber)({type:"uint8",name:""},Number(r))}ba.encodeBoolean=BL;function OL(e,t){let r=(0,vI.decodeNumber)({type:"uint8",name:""},t);if(r.result>1||r.result<0)throw new fg.AbiError("Invalid boolean value encoded",{boolBytes:t.subarray(0,bI.WORD_SIZE),numberResult:r});return{result:r.result===BigInt(1),encoded:r.encoded,consumed:bI.WORD_SIZE}}ba.decodeBool=OL});var Sl=f(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.decodeBytes=va.encodeBytes=void 0;var Pl=V(),AI=G(),CL=be(),vn=yn(),EI=Gi(),NL=32;function ML(e,t){if(typeof t=="string"&&t.length%2!==0&&(t+="0"),!(0,CL.isBytes)(t))throw new Pl.AbiError("provided input is not valid bytes value",{type:e.type,value:t,name:e.name});let r=(0,AI.bytesToUint8Array)(t),[,n]=e.type.split("bytes");if(n){if(Number(n)>NL||Number(n)<1)throw new Pl.AbiError("invalid bytes type. Static byte type can have between 1 and 32 bytes",{type:e.type});if(Number(n)t.length)throw new Pl.AbiError("there is not enough data to decode",{type:e.type,encoded:t,size:n});return{result:(0,AI.bytesToHex)(i.subarray(0,n)),encoded:i.subarray(s*vn.WORD_SIZE),consumed:o+s*vn.WORD_SIZE}}va.decodeBytes=kL});var pg=f(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.decodeString=Aa.encodeString=void 0;var jL=V(),TI=G(),wI=Sl();function DL(e,t){if(typeof t!="string")throw new jL.AbiError("invalid input, should be string",{input:t});let r=(0,TI.utf8ToBytes)(t);return(0,wI.encodeBytes)({type:"bytes",name:""},r)}Aa.encodeString=DL;function LL(e,t){let r=(0,wI.decodeBytes)({type:"bytes",name:""},t);return{result:(0,TI.hexToUtf8)(r.result),encoded:r.encoded,consumed:r.consumed}}Aa.decodeString=LL});var mg=f(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.encodeDynamicParams=void 0;var qL=G(),HL=yn(),UL=Gi();function FL(e){let t=0,r=0,n=[],i=[];for(let s of e)s.dynamic?t+=HL.WORD_SIZE:t+=s.encoded.length;for(let s of e)s.dynamic?(n.push((0,UL.encodeNumber)({type:"uint256",name:""},t+r)),i.push(s),r+=s.encoded.length):n.push(s);return(0,qL.uint8ArrayConcat)(...n.map(s=>s.encoded),...i.map(s=>s.encoded))}xl.encodeDynamicParams=FL});var _g=f(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.decodeArray=Ea.encodeArray=void 0;var II=V(),RI=G(),Ol=Cl(),Bl=yn(),PI=Gi(),GL=mg();function VL(e,t){if(!Array.isArray(t))throw new II.AbiError("Expected value to be array",{abi:e,values:t});let{size:r,param:n}=(0,Bl.extractArrayType)(e),i=t.map(a=>(0,Ol.encodeParamFromAbiParameter)(n,a)),s=r===-1,o=i.length>0&&i[0].dynamic;if(!s&&t.length!==r)throw new II.AbiError("Given arguments count doesn't match array length",{arrayLength:r,argumentsLength:t.length});if(s||o){let a=(0,GL.encodeDynamicParams)(i);if(s){let u=(0,Ol.encodeNumber)({type:"uint256",name:""},i.length).encoded;return{dynamic:!0,encoded:i.length>0?(0,RI.uint8ArrayConcat)(u,a):u}}return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:(0,RI.uint8ArrayConcat)(...i.map(a=>a.encoded))}}Ea.encodeArray=VL;function WL(e,t){let{size:r,param:n}=(0,Bl.extractArrayType)(e),i=r===-1,s=0,o=[],a=t;if(i){let d=(0,PI.decodeNumber)({type:"uint32",name:""},t);r=Number(d.result),s=d.consumed,a=d.encoded}if((0,Bl.isDynamic)(n)){for(let d=0;d{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.decodeParamFromAbiParameter=we.encodeParamFromAbiParameter=we.decodeArray=we.encodeArray=we.decodeTuple=we.encodeTuple=we.decodeString=we.encodeString=we.decodeNumber=we.encodeNumber=we.decodeBytes=we.encodeBytes=we.decodeBool=we.encodeBoolean=we.decodeAddress=we.encodeAddress=void 0;var SI=V(),xI=lg(),BI=hg(),OI=Sl(),CI=Gi(),NI=pg(),MI=Nl(),kI=_g(),jI=lg();Object.defineProperty(we,"encodeAddress",{enumerable:!0,get:function(){return jI.encodeAddress}});Object.defineProperty(we,"decodeAddress",{enumerable:!0,get:function(){return jI.decodeAddress}});var DI=hg();Object.defineProperty(we,"encodeBoolean",{enumerable:!0,get:function(){return DI.encodeBoolean}});Object.defineProperty(we,"decodeBool",{enumerable:!0,get:function(){return DI.decodeBool}});var LI=Sl();Object.defineProperty(we,"encodeBytes",{enumerable:!0,get:function(){return LI.encodeBytes}});Object.defineProperty(we,"decodeBytes",{enumerable:!0,get:function(){return LI.decodeBytes}});var qI=Gi();Object.defineProperty(we,"encodeNumber",{enumerable:!0,get:function(){return qI.encodeNumber}});Object.defineProperty(we,"decodeNumber",{enumerable:!0,get:function(){return qI.decodeNumber}});var HI=pg();Object.defineProperty(we,"encodeString",{enumerable:!0,get:function(){return HI.encodeString}});Object.defineProperty(we,"decodeString",{enumerable:!0,get:function(){return HI.decodeString}});var UI=Nl();Object.defineProperty(we,"encodeTuple",{enumerable:!0,get:function(){return UI.encodeTuple}});Object.defineProperty(we,"decodeTuple",{enumerable:!0,get:function(){return UI.decodeTuple}});var FI=_g();Object.defineProperty(we,"encodeArray",{enumerable:!0,get:function(){return FI.encodeArray}});Object.defineProperty(we,"decodeArray",{enumerable:!0,get:function(){return FI.decodeArray}});function ZL(e,t){if(e.type==="string")return(0,NI.encodeString)(e,t);if(e.type==="bool")return(0,BI.encodeBoolean)(e,t);if(e.type==="address")return(0,xI.encodeAddress)(e,t);if(e.type==="tuple")return(0,MI.encodeTuple)(e,t);if(e.type.endsWith("]"))return(0,kI.encodeArray)(e,t);if(e.type.startsWith("bytes"))return(0,OI.encodeBytes)(e,t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return(0,CI.encodeNumber)(e,t);throw new SI.AbiError("Unsupported",{param:e,value:t})}we.encodeParamFromAbiParameter=ZL;function zL(e,t){if(e.type==="string")return(0,NI.decodeString)(e,t);if(e.type==="bool")return(0,BI.decodeBool)(e,t);if(e.type==="address")return(0,xI.decodeAddress)(e,t);if(e.type==="tuple")return(0,MI.decodeTuple)(e,t);if(e.type.endsWith("]"))return(0,kI.decodeArray)(e,t);if(e.type.startsWith("bytes"))return(0,OI.decodeBytes)(e,t);if(e.type.startsWith("uint")||e.type.startsWith("int"))return(0,CI.decodeNumber)(e,t);throw new SI.AbiError("Unsupported",{param:e,bytes:t})}we.decodeParamFromAbiParameter=zL});var Nl=f(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.decodeTuple=Ta.encodeTuple=void 0;var gg=V(),QL=G(),Ml=Cl(),KL=mg(),JL=yn(),XL=Gi();function YL(e,t){var r,n,i;let s=!1;if(!Array.isArray(t)&&typeof t!="object")throw new gg.AbiError("param must be either Array or Object",{param:e,input:t});let o=t,a=[];for(let u=0;u<((n=(r=e.components)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0);u+=1){let d=e.components[u],c;if(Array.isArray(o)){if(u>=o.length)throw new gg.AbiError("input param length missmatch",{param:e,input:t});c=(0,Ml.encodeParamFromAbiParameter)(d,o[u])}else{let l=o[(i=d.name)!==null&&i!==void 0?i:""];if(l==null)throw new gg.AbiError("missing input defined in abi",{param:e,input:t,paramName:d.name});c=(0,Ml.encodeParamFromAbiParameter)(d,l)}c.dynamic&&(s=!0),a.push(c)}return s?{dynamic:!0,encoded:(0,KL.encodeDynamicParams)(a)}:{dynamic:!1,encoded:(0,QL.uint8ArrayConcat)(...a.map(u=>u.encoded))}}Ta.encodeTuple=YL;function $L(e,t){let r={__length__:0},n=0;if(!e.components)return{result:r,encoded:t,consumed:n};let i=0;for(let[s,o]of e.components.entries()){let a;if((0,JL.isDynamic)(o)){let u=(0,XL.decodeNumber)({type:"uint32",name:""},t.subarray(n));a=(0,Ml.decodeParamFromAbiParameter)(o,t.subarray(Number(u.result))),n+=u.consumed,i+=a.consumed}else a=(0,Ml.decodeParamFromAbiParameter)(o,t.subarray(n)),n+=a.consumed;r.__length__+=1,r[s]=a.result,o.name&&o.name!==""&&(r[o.name]=a.result)}return{encoded:t.subarray(n+i),result:r,consumed:n+i}}Ta.decodeTuple=$L});var GI=f(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.decodeParameters=void 0;var eq=be(),tq=Nl(),rq=yn();function nq(e,t,r){let n=(0,rq.toAbiParams)(e),i=eq.utils.hexToUint8Array(t);return(0,tq.decodeTuple)({type:"tuple",name:"",components:n},i).result}kl.decodeParameters=nq});var jl=f(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.inferTypesAndEncodeParameters=wa.encodeParameters=void 0;var VI=V(),iq=G(),WI=be(),ZI=Cl(),sq=yn();function zI(e){let t=[];return e.forEach(r=>{if(Array.isArray(r)){let n=zI(r);t.push({type:"tuple",components:n,name:""})}else t.push({type:(0,iq.toHex)(r,!0)})}),t}function oq(e,t){if(e?.length!==t.length)throw new VI.AbiError("Invalid number of values received for given ABI",{expected:e?.length,received:t.length});let r=(0,sq.toAbiParams)(e);return WI.utils.uint8ArrayToHexString((0,ZI.encodeTuple)({type:"tuple",name:"",components:r},t).encoded)}wa.encodeParameters=oq;function aq(e){try{let t=zI(e);return WI.utils.uint8ArrayToHexString((0,ZI.encodeTuple)({type:"tuple",name:"",components:t},e).encoded)}catch{throw new VI.AbiError("Could not infer types from given params",{params:e})}}wa.inferTypesAndEncodeParameters=aq});var Gc=f(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.decodeParameter=Gt.decodeParameters=Gt.decodeParametersWith=Gt.encodeParameter=Gt.inferTypesAndEncodeParameters=Gt.encodeParameters=void 0;var QI=V(),cq=GI(),uq=jl(),KI=jl();Object.defineProperty(Gt,"encodeParameters",{enumerable:!0,get:function(){return KI.encodeParameters}});Object.defineProperty(Gt,"inferTypesAndEncodeParameters",{enumerable:!0,get:function(){return KI.inferTypesAndEncodeParameters}});var dq=(e,t)=>(0,uq.encodeParameters)([e],[t]);Gt.encodeParameter=dq;var lq=(e,t,r)=>{try{if(e.length>0&&(!t||t==="0x"||t==="0X"))throw new QI.AbiError("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return(0,cq.decodeParameters)(e,`0x${t.replace(/0x/i,"")}`,r)}catch(n){throw new QI.AbiError(`Parameter decoding error: ${n.message}`,{internalErr:n})}};Gt.decodeParametersWith=lq;var fq=(e,t)=>(0,Gt.decodeParametersWith)(e,t,!1);Gt.decodeParameters=fq;var hq=(e,t)=>(0,Gt.decodeParameters)([e],t)[0];Gt.decodeParameter=hq});var XI=f(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.encodeFunctionCall=Ns.encodeFunctionSignature=void 0;var JI=V(),pq=G(),yg=Cs(),mq=Gc(),_q=e=>{if(typeof e!="string"&&!(0,yg.isAbiFunctionFragment)(e))throw new JI.AbiError("Invalid parameter value in encodeFunctionSignature");let t;return e&&(typeof e=="function"||typeof e=="object")?t=(0,yg.jsonInterfaceMethodToString)(e):t=e,(0,pq.sha3Raw)(t).slice(0,10)};Ns.encodeFunctionSignature=_q;var gq=(e,t)=>{var r;if(!(0,yg.isAbiFunctionFragment)(e))throw new JI.AbiError("Invalid parameter value in encodeFunctionCall");return`${(0,Ns.encodeFunctionSignature)(e)}${(0,mq.encodeParameters)((r=e.inputs)!==null&&r!==void 0?r:[],t??[]).replace("0x","")}`};Ns.encodeFunctionCall=gq});var $I=f(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.decodeLog=void 0;var YI=Gc(),yq=["bool","string","int","uint","address","fixed","ufixed"],bq=(e,t)=>e==="string"?t:(0,YI.decodeParameter)(e,t),vq=(e,t,r)=>{let n=Array.isArray(r)?r:[r],i={},s={};for(let[h,m]of e.entries())m.indexed?i[h]=m:s[h]=m;let o=t?(0,YI.decodeParametersWith)(Object.values(s),t,!0):{__length__:0},a=n.length-Object.keys(i).length,u=Object.values(i).map((h,m)=>yq.some(b=>h.type.startsWith(b))?bq(h.type,n[m+a]):n[m+a]),d={__length__:0},c=0,l=0;for(let[h,m]of e.entries())d[h]=m.type==="string"?"":void 0,i[h]&&(d[h]=u[c],c+=1),s[h]&&(d[h]=o[String(l)],l+=1),m.name&&(d[m.name]=d[h]),d.__length__+=1;return d};Dl.decodeLog=vq});var eR=f(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.decodeContractErrorData=void 0;var Aq=$_(),Eq=Gc(),Tq=Cs(),wq=(e,t)=>{if(t?.data){let r,n,i;try{let s=t.data.slice(0,10),o=e.find(a=>(0,Aq.encodeErrorSignature)(a).startsWith(s));o?.inputs&&(r=o.name,n=(0,Tq.jsonInterfaceMethodToString)(o),i=(0,Eq.decodeParameters)([...o.inputs],t.data.substring(10)))}catch(s){console.error(s)}r&&t.setDecodedProperties(r,n,i)}};Ll.decodeContractErrorData=wq});var iR=f(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.getMessage=void 0;var Vi=G(),bg=V(),tR=jl(),Iq=/^\w+/,Rq=/^(.*)\[([0-9]*?)]$/,rR=(e,t,r=[])=>{let i=t.match(Iq)[0];return r.includes(i)||!e.types[i]?r:[i,...e.types[i].reduce((s,o)=>[...s,...rR(e,o.type,s).filter(a=>!s.includes(a))],[])]},Pq=(e,t)=>{let[r,...n]=rR(e,t);return[r,...n.sort()].map(s=>`${s}(${e.types[s].map(o=>`${o.type} ${o.name}`)})`).join("")},Sq=(e,t)=>(0,Vi.keccak256)(Pq(e,t)),vg=(e,t,r)=>(0,Vi.keccak256)(Bq(e,t,r)),xq=(e,t)=>{let n=`0x1901${vg(e,"EIP712Domain",e.domain).substring(2)}${vg(e,e.primaryType,e.message).substring(2)}`;return t?(0,Vi.keccak256)(n):n};ql.getMessage=xq;var nR=(e,t,r)=>{let n=t.match(Rq);if(n){let i=n[1],s=Number(n[2])||void 0;if(!Array.isArray(r))throw new bg.AbiError("Cannot encode data: value is not of array type",{data:r});if(s&&r.length!==s)throw new bg.AbiError(`Cannot encode data: expected length of ${s}, but got ${r.length}`,{data:r});let o=r.map(d=>nR(e,i,d)),a=o.map(d=>d[0]),u=o.map(d=>d[1]);return["bytes32",(0,Vi.keccak256)((0,tR.encodeParameters)(a,u))]}return e.types[t]?["bytes32",vg(e,t,r)]:t==="string"?["bytes32",(0,Vi.keccak256)(r)]:t==="bytes"?["bytes32",(0,Vi.keccak256)(r)]:[t,r]},Bq=(e,t,r)=>{let[n,i]=e.types[t].reduce(([s,o],a)=>{if((0,Vi.isNullish)(r[a.name])||(0,Vi.isNullish)(r[a.name]))throw new bg.AbiError(`Cannot encode data: missing data for '${a.name}'`,{data:r,field:a});let u=r[a.name],[d,c]=nR(e,a.type,u);return[[...s,d],[...o,c]]},[["bytes32"],[Sq(e,t)]]);return(0,tR.encodeParameters)(n,i)}});var ks=f($t=>{"use strict";var Oq=$t&&$t.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),Ms=$t&&$t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Oq(t,e,r)};Object.defineProperty($t,"__esModule",{value:!0});$t.getEncodedEip712Data=void 0;Ms($_(),$t);Ms(Jw(),$t);Ms(XI(),$t);Ms($I(),$t);Ms(Gc(),$t);Ms(Cs(),$t);Ms(eR(),$t);var Cq=iR();Object.defineProperty($t,"getEncodedEip712Data",{enumerable:!0,get:function(){return Cq.getMessage}})});var Eg=f(Qn=>{"use strict";var Nq=Qn&&Qn.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.getRevertReason=Qn.parseTransactionError=void 0;var Ag=V(),sR=ks(),Mq=Hi(),kq=(e,t)=>{var r,n,i,s,o;if(e instanceof Ag.ContractExecutionError&&e.cause instanceof Ag.Eip838ExecutionError){if(t!==void 0){let a=t.filter(u=>(0,sR.isAbiErrorFragment)(u));return(0,sR.decodeContractErrorData)(a,e.cause),{reason:e.cause.message,signature:(r=e.cause.data)===null||r===void 0?void 0:r.slice(0,10),data:(n=e.cause.data)===null||n===void 0?void 0:n.substring(10),customErrorName:e.cause.errorName,customErrorDecodedSignature:e.cause.errorSignature,customErrorArguments:e.cause.errorArgs}}return{reason:e.cause.message,signature:(i=e.cause.data)===null||i===void 0?void 0:i.slice(0,10),data:(s=e.cause.data)===null||s===void 0?void 0:s.substring(10)}}if(e instanceof Ag.InvalidResponseError&&!Array.isArray((o=e.cause)===null||o===void 0?void 0:o.errors)&&e.cause!==void 0)return e.cause.message;throw e};Qn.parseTransactionError=kq;function jq(e,t,r,n=e.defaultReturnFormat){return Nq(this,void 0,void 0,function*(){try{yield(0,Mq.call)(e,t,e.defaultBlock,n);return}catch(i){return(0,Qn.parseTransactionError)(i,r)}})}Qn.getRevertReason=jq});var aR=f(Ia=>{"use strict";var Dq=Ia&&Ia.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ia,"__esModule",{value:!0});Ia.getTransactionError=void 0;var Hl=V(),oR=Eg();function Lq(e,t,r,n,i,s){return Dq(this,void 0,void 0,function*(){let o=s;o===void 0&&(n!==void 0?o=(0,oR.parseTransactionError)(n):e.handleRevert&&t!==void 0&&(o=yield(0,oR.getRevertReason)(e,t,i)));let a;if(o===void 0)a=new Hl.TransactionRevertedWithoutReasonError(r);else if(typeof o=="string")a=new Hl.TransactionRevertInstructionError(o,void 0,r);else if(o.customErrorName!==void 0&&o.customErrorDecodedSignature!==void 0&&o.customErrorArguments!==void 0){let u=o;a=new Hl.TransactionRevertWithCustomError(u.reason,u.customErrorName,u.customErrorDecodedSignature,u.customErrorArguments,u.signature,r,u.data)}else a=new Hl.TransactionRevertInstructionError(o.reason,o.signature,r,o.data);return a})}Ia.getTransactionError=Lq});var Tg=f(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.decodeEventABI=void 0;var qq=G(),Hq=Pe(),Uq=ks(),Fq=_n(),Gq=Bs(),Vq=(e,t,r,n=Hq.DEFAULT_RETURN_FORMAT)=>{var i,s,o,a,u;let d=Object.assign({},e),c=(0,qq.format)(Fq.logSchema,t,n);if([Gq.ALL_EVENTS,"allEvents"].includes(d.name)){let h=r.find(m=>m.signature===t.topics[0]);h?d=h:d={anonymous:!0}}if(d.inputs=(s=(i=d.inputs)!==null&&i!==void 0?i:e.inputs)!==null&&s!==void 0?s:[],!d.anonymous){let h=0;((o=d.inputs)!==null&&o!==void 0?o:[]).forEach(m=>{m.indexed&&(h+=1)}),h>0&&t?.topics&&t?.topics.length!==h+1&&(d=Object.assign(Object.assign({},d),{anonymous:!0,inputs:[]}))}let l=d.anonymous?t.topics:((a=t.topics)!==null&&a!==void 0?a:[]).slice(1);return Object.assign(Object.assign({},c),{returnValues:(0,Uq.decodeLog)([...(u=d.inputs)!==null&&u!==void 0?u:[]],t.data,l),event:d.name,signature:d.anonymous||!t.topics||t.topics.length===0||!t.topics[0]?void 0:t.topics[0],raw:{data:t.data,topics:t.topics}})};Ul.decodeEventABI=Vq});var Rg=f(Pa=>{"use strict";var js=Pa&&Pa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.SendTxHelper=void 0;var Wq=Pe(),Ra=be(),Ds=V(),cR=qi(),Zq=G_(),uR=bl(),zq=zw(),Qq=Bs(),wg=aR(),Kq=Eg(),Jq=Tg(),Ig=class{constructor({options:t,web3Context:r,promiEvent:n,returnFormat:i}){this.options={checkRevertBeforeSending:!0},this.options=t,this.web3Context=r,this.promiEvent=n,this.returnFormat=i}getReceiptWithEvents(t){var r,n;let i=Object.assign({},t??{});if(!((r=this.options)===null||r===void 0)&&r.contractAbi&&i.logs&&i.logs.length>0){i.events={};for(let s of i.logs){let o=(0,Jq.decodeEventABI)(Qq.ALL_EVENTS_ABI,s,(n=this.options)===null||n===void 0?void 0:n.contractAbi,this.returnFormat);o.event&&(i.events[o.event]=o)}}return i}checkRevertBeforeSending(t){return js(this,void 0,void 0,function*(){if(this.options.checkRevertBeforeSending!==!1){let r=t;(0,Ra.isNullish)(t.data)&&(0,Ra.isNullish)(t.input)&&(0,Ra.isNullish)(t.gas)&&(r=Object.assign(Object.assign({},t),{gas:21e3}));let n=yield(0,Kq.getRevertReason)(this.web3Context,r,this.options.contractAbi);if(n!==void 0)throw yield(0,wg.getTransactionError)(this.web3Context,t,void 0,void 0,this.options.contractAbi,n)}})}emitSending(t){this.promiEvent.listenerCount("sending")>0&&this.promiEvent.emit("sending",t)}populateGasPrice({transactionFormatted:t,transaction:r}){var n;return js(this,void 0,void 0,function*(){let i=t;return!(!((n=this.options)===null||n===void 0)&&n.ignoreGasPricing)&&(0,Ra.isNullish)(t.gasPrice)&&((0,Ra.isNullish)(r.maxPriorityFeePerGas)||(0,Ra.isNullish)(r.maxFeePerGas))&&(i=Object.assign(Object.assign({},t),yield(0,Zq.getTransactionGasPricing)(t,this.web3Context,Wq.ETH_DATA_FORMAT))),i})}signAndSend({wallet:t,tx:r}){return js(this,void 0,void 0,function*(){if(t){let n=yield t.signTransaction(r);return(0,uR.trySendTransaction)(this.web3Context,()=>js(this,void 0,void 0,function*(){return cR.ethRpcMethods.sendRawTransaction(this.web3Context.requestManager,n.rawTransaction)}),n.transactionHash)}return(0,uR.trySendTransaction)(this.web3Context,()=>js(this,void 0,void 0,function*(){return cR.ethRpcMethods.sendTransaction(this.web3Context.requestManager,r)}))})}emitSent(t){this.promiEvent.listenerCount("sent")>0&&this.promiEvent.emit("sent",t)}emitTransactionHash(t){this.promiEvent.listenerCount("transactionHash")>0&&this.promiEvent.emit("transactionHash",t)}emitReceipt(t){this.promiEvent.listenerCount("receipt")>0&&this.promiEvent.emit("receipt",t)}handleError({error:t,tx:r}){var n;return js(this,void 0,void 0,function*(){let i=t;return i instanceof Ds.ContractExecutionError&&this.web3Context.handleRevert&&(i=yield(0,wg.getTransactionError)(this.web3Context,r,void 0,void 0,(n=this.options)===null||n===void 0?void 0:n.contractAbi)),(i instanceof Ds.InvalidResponseError||i instanceof Ds.ContractExecutionError||i instanceof Ds.TransactionRevertWithCustomError||i instanceof Ds.TransactionRevertedWithoutReasonError||i instanceof Ds.TransactionRevertInstructionError||i instanceof Ds.TransactionPollingTimeoutError)&&this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",i),i})}emitConfirmation({receipt:t,transactionHash:r,customTransactionReceiptSchema:n}){this.promiEvent.listenerCount("confirmation")>0&&(0,zq.watchTransactionForConfirmations)(this.web3Context,this.promiEvent,t,r,this.returnFormat,n)}handleResolve({receipt:t,tx:r}){var n,i,s;return js(this,void 0,void 0,function*(){if(!((n=this.options)===null||n===void 0)&&n.transactionResolver)return(i=this.options)===null||i===void 0?void 0:i.transactionResolver(t);if(t.status===BigInt(0)){let o=yield(0,wg.getTransactionError)(this.web3Context,r,t,void 0,(s=this.options)===null||s===void 0?void 0:s.contractAbi);throw this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",o),o}else return t})}};Pa.SendTxHelper=Ig});var Hi=f(H=>{"use strict";var Re=H&&H.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},Xq=H&&H.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);iRe(void 0,void 0,void 0,function*(){return Ae.ethRpcMethods.getProtocolVersion(e.requestManager)});H.getProtocolVersion=nH;var iH=e=>Re(void 0,void 0,void 0,function*(){return Ae.ethRpcMethods.getSyncing(e.requestManager)});H.isSyncing=iH;var sH=e=>Re(void 0,void 0,void 0,function*(){return Ae.ethRpcMethods.getCoinbase(e.requestManager)});H.getCoinbase=sH;var oH=e=>Re(void 0,void 0,void 0,function*(){return Ae.ethRpcMethods.getMining(e.requestManager)});H.isMining=oH;function aH(e,t){return Re(this,void 0,void 0,function*(){let r=yield Ae.ethRpcMethods.getHashRate(e.requestManager);return(0,Z.format)({format:"uint"},r,t??e.defaultReturnFormat)})}H.getHashRate=aH;function cH(e,t){return Re(this,void 0,void 0,function*(){let r=yield Ae.ethRpcMethods.getGasPrice(e.requestManager);return(0,Z.format)({format:"uint"},r,t??e.defaultReturnFormat)})}H.getGasPrice=cH;function uH(e,t){return Re(this,void 0,void 0,function*(){let r=yield Ae.ethRpcMethods.getMaxPriorityFeePerGas(e.requestManager);return(0,Z.format)({format:"uint"},r,t??e.defaultReturnFormat)})}H.getMaxPriorityFeePerGas=uH;function dH(e,t){return Re(this,void 0,void 0,function*(){let r=yield Ae.ethRpcMethods.getBlockNumber(e.requestManager);return(0,Z.format)({format:"uint"},r,t??e.defaultReturnFormat)})}H.getBlockNumber=dH;function lH(e,t,r=e.defaultBlock,n){return Re(this,void 0,void 0,function*(){let i=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s=yield Ae.ethRpcMethods.getBalance(e.requestManager,t,i);return(0,Z.format)({format:"uint"},s,n??e.defaultReturnFormat)})}H.getBalance=lH;function fH(e,t,r,n=e.defaultBlock,i){return Re(this,void 0,void 0,function*(){let s=(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),o=(0,Qe.isBlockTag)(n)?n:(0,Z.format)({format:"uint"},n,Ie.ETH_DATA_FORMAT),a=yield Ae.ethRpcMethods.getStorageAt(e.requestManager,t,s,o);return(0,Z.format)({format:"bytes"},a,i??e.defaultReturnFormat)})}H.getStorageAt=fH;function hH(e,t,r=e.defaultBlock,n){return Re(this,void 0,void 0,function*(){let i=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s=yield Ae.ethRpcMethods.getCode(e.requestManager,t,i);return(0,Z.format)({format:"bytes"},s,n??e.defaultReturnFormat)})}H.getCode=hH;function pH(e,t=e.defaultBlock,r=!1,n){return Re(this,void 0,void 0,function*(){let i;if((0,Qe.isBytes)(t)){let s=(0,Z.format)({format:"bytes32"},t,Ie.ETH_DATA_FORMAT);i=yield Ae.ethRpcMethods.getBlockByHash(e.requestManager,s,r)}else{let s=(0,Qe.isBlockTag)(t)?t:(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT);i=yield Ae.ethRpcMethods.getBlockByNumber(e.requestManager,s,r)}return(0,Z.format)(An.blockSchema,i,n??e.defaultReturnFormat)})}H.getBlock=pH;function mH(e,t=e.defaultBlock,r){return Re(this,void 0,void 0,function*(){let n;if((0,Qe.isBytes)(t)){let i=(0,Z.format)({format:"bytes32"},t,Ie.ETH_DATA_FORMAT);n=yield Ae.ethRpcMethods.getBlockTransactionCountByHash(e.requestManager,i)}else{let i=(0,Qe.isBlockTag)(t)?t:(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT);n=yield Ae.ethRpcMethods.getBlockTransactionCountByNumber(e.requestManager,i)}return(0,Z.format)({format:"uint"},n,r??e.defaultReturnFormat)})}H.getBlockTransactionCount=mH;function _H(e,t=e.defaultBlock,r){return Re(this,void 0,void 0,function*(){let n;if((0,Qe.isBytes)(t)){let i=(0,Z.format)({format:"bytes32"},t,Ie.ETH_DATA_FORMAT);n=yield Ae.ethRpcMethods.getUncleCountByBlockHash(e.requestManager,i)}else{let i=(0,Qe.isBlockTag)(t)?t:(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT);n=yield Ae.ethRpcMethods.getUncleCountByBlockNumber(e.requestManager,i)}return(0,Z.format)({format:"uint"},n,r??e.defaultReturnFormat)})}H.getBlockUncleCount=_H;function gH(e,t=e.defaultBlock,r,n){return Re(this,void 0,void 0,function*(){let i=(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s;if((0,Qe.isBytes)(t)){let o=(0,Z.format)({format:"bytes32"},t,Ie.ETH_DATA_FORMAT);s=yield Ae.ethRpcMethods.getUncleByBlockHashAndIndex(e.requestManager,o,i)}else{let o=(0,Qe.isBlockTag)(t)?t:(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT);s=yield Ae.ethRpcMethods.getUncleByBlockNumberAndIndex(e.requestManager,o,i)}return(0,Z.format)(An.blockSchema,s,n??e.defaultReturnFormat)})}H.getUncle=gH;function yH(e,t,r=e.defaultReturnFormat){return Re(this,void 0,void 0,function*(){let n=(0,Z.format)({format:"bytes32"},t,Ie.DEFAULT_RETURN_FORMAT),i=yield Ae.ethRpcMethods.getTransactionByHash(e.requestManager,n);return(0,Qe.isNullish)(i)?i:(0,Kn.formatTransaction)(i,r,{fillInputAndData:!0})})}H.getTransaction=yH;function bH(e,t){return Re(this,void 0,void 0,function*(){return(yield Ae.ethRpcMethods.getPendingTransactions(e.requestManager)).map(n=>(0,Kn.formatTransaction)(n,t??e.defaultReturnFormat,{fillInputAndData:!0}))})}H.getPendingTransactions=bH;function vH(e,t=e.defaultBlock,r,n){return Re(this,void 0,void 0,function*(){let i=(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s;if((0,Qe.isBytes)(t)){let o=(0,Z.format)({format:"bytes32"},t,Ie.ETH_DATA_FORMAT);s=yield Ae.ethRpcMethods.getTransactionByBlockHashAndIndex(e.requestManager,o,i)}else{let o=(0,Qe.isBlockTag)(t)?t:(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT);s=yield Ae.ethRpcMethods.getTransactionByBlockNumberAndIndex(e.requestManager,o,i)}return(0,Qe.isNullish)(s)?s:(0,Kn.formatTransaction)(s,n??e.defaultReturnFormat,{fillInputAndData:!0})})}H.getTransactionFromBlock=vH;function AH(e,t,r){return Re(this,void 0,void 0,function*(){let n=(0,Z.format)({format:"bytes32"},t,Ie.DEFAULT_RETURN_FORMAT),i=yield Ae.ethRpcMethods.getTransactionReceipt(e.requestManager,n);return(0,Qe.isNullish)(i)?i:(0,Z.format)(An.transactionReceiptSchema,i,r??e.defaultReturnFormat)})}H.getTransactionReceipt=AH;function EH(e,t,r=e.defaultBlock,n){return Re(this,void 0,void 0,function*(){let i=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s=yield Ae.ethRpcMethods.getTransactionCount(e.requestManager,t,i);return(0,Z.format)({format:"uint"},s,n??e.defaultReturnFormat)})}H.getTransactionCount=EH;function TH(e,t,r,n={checkRevertBeforeSending:!0}){let i=new lR.Web3PromiEvent((s,o)=>{setImmediate(()=>{Re(this,void 0,void 0,function*(){let a=new hR.SendTxHelper({web3Context:e,promiEvent:i,options:n,returnFormat:r}),u=(0,Kn.formatTransaction)(Object.assign(Object.assign({},t),{from:(0,dR.getTransactionFromOrToAttr)("from",e,t),to:(0,dR.getTransactionFromOrToAttr)("to",e,t)}),Ie.ETH_DATA_FORMAT);try{u=yield a.populateGasPrice({transaction:t,transactionFormatted:u}),yield a.checkRevertBeforeSending(u),a.emitSending(u);let d;e.wallet&&!(0,Qe.isNullish)(u.from)&&(d=e.wallet.get(u.from));let c=yield a.signAndSend({wallet:d,tx:u}),l=(0,Z.format)({format:"bytes32"},c,r??e.defaultReturnFormat);a.emitSent(u),a.emitTransactionHash(l);let h=yield(0,fR.waitForTransactionReceipt)(e,c,r??e.defaultReturnFormat),m=a.getReceiptWithEvents((0,Z.format)(An.transactionReceiptSchema,h,r??e.defaultReturnFormat));a.emitReceipt(m),s(yield a.handleResolve({receipt:m,tx:u})),a.emitConfirmation({receipt:m,transactionHash:c})}catch(d){o(yield a.handleError({error:d,tx:u}))}})})});return i}H.sendTransaction=TH;function wH(e,t,r,n={checkRevertBeforeSending:!0}){let i=new lR.Web3PromiEvent((s,o)=>{setImmediate(()=>{Re(this,void 0,void 0,function*(){let a=new hR.SendTxHelper({web3Context:e,promiEvent:i,options:n,returnFormat:r}),u=(0,Z.format)({format:"bytes"},t,Ie.ETH_DATA_FORMAT),d=Yq.TransactionFactory.fromSerializedData((0,Z.bytesToUint8Array)((0,Z.hexToBytes)(u))),c=Object.assign(Object.assign({},d.toJSON()),{from:d.getSenderAddress().toString()});try{let{v:l,r:h,s:m}=c,b=Xq(c,["v","r","s"]);yield a.checkRevertBeforeSending(b),a.emitSending(u);let _=yield(0,tH.trySendTransaction)(e,()=>Re(this,void 0,void 0,function*(){return Ae.ethRpcMethods.sendRawTransaction(e.requestManager,u)}));a.emitSent(u);let y=(0,Z.format)({format:"bytes32"},_,r??e.defaultReturnFormat);a.emitTransactionHash(y);let v=yield(0,fR.waitForTransactionReceipt)(e,_,r??e.defaultReturnFormat),E=a.getReceiptWithEvents((0,Z.format)(An.transactionReceiptSchema,v,r??e.defaultReturnFormat));a.emitReceipt(E),s(yield a.handleResolve({receipt:E,tx:c})),a.emitConfirmation({receipt:E,transactionHash:_})}catch(l){o(yield a.handleError({error:l,tx:c}))}})})});return i}H.sendSignedTransaction=wH;function IH(e,t,r,n=e.defaultReturnFormat){var i;return Re(this,void 0,void 0,function*(){let s=(0,Z.format)({format:"bytes"},t,Ie.DEFAULT_RETURN_FORMAT);if(!((i=e.wallet)===null||i===void 0)&&i.get(r)){let u=e.wallet.get(r).sign(s);return(0,Z.format)(An.SignatureObjectSchema,u,n)}if(typeof r=="number")throw new $q.SignatureError(t,'RPC method "eth_sign" does not support index signatures');let o=yield Ae.ethRpcMethods.sign(e.requestManager,r,s);return(0,Z.format)({format:"bytes"},o,n)})}H.sign=IH;function RH(e,t,r=e.defaultReturnFormat){return Re(this,void 0,void 0,function*(){let n=yield Ae.ethRpcMethods.signTransaction(e.requestManager,(0,Kn.formatTransaction)(t,Ie.ETH_DATA_FORMAT));return(0,Qe.isString)(n)?(0,eH.decodeSignedTransaction)(n,r,{fillInputAndData:!0}):{raw:(0,Z.format)({format:"bytes"},n.raw,r),tx:(0,Kn.formatTransaction)(n.tx,r,{fillInputAndData:!0})}})}H.signTransaction=RH;function PH(e,t,r=e.defaultBlock,n=e.defaultReturnFormat){return Re(this,void 0,void 0,function*(){let i=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s=yield Ae.ethRpcMethods.call(e.requestManager,(0,Kn.formatTransaction)(t,Ie.ETH_DATA_FORMAT),i);return(0,Z.format)({format:"bytes"},s,n)})}H.call=PH;function SH(e,t,r=e.defaultBlock,n){return Re(this,void 0,void 0,function*(){let i=(0,Kn.formatTransaction)(t,Ie.ETH_DATA_FORMAT),s=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),o=yield Ae.ethRpcMethods.estimateGas(e.requestManager,i,s);return(0,Z.format)({format:"uint"},o,n??e.defaultReturnFormat)})}H.estimateGas=SH;function xH(e,t,r){return Re(this,void 0,void 0,function*(){let{toBlock:n,fromBlock:i}=t;(0,Qe.isNullish)(n)||(typeof n=="number"||typeof n=="bigint")&&(n=(0,Z.numberToHex)(n)),(0,Qe.isNullish)(i)||(typeof i=="number"||typeof i=="bigint")&&(i=(0,Z.numberToHex)(i));let s=Object.assign(Object.assign({},t),{fromBlock:i,toBlock:n});return(yield Ae.ethRpcMethods.getLogs(e.requestManager,s)).map(u=>typeof u=="string"?u:(0,Z.format)(An.logSchema,u,r??e.defaultReturnFormat))})}H.getLogs=xH;function BH(e,t){return Re(this,void 0,void 0,function*(){let r=yield Ae.ethRpcMethods.getChainId(e.requestManager);return(0,Z.format)({format:"uint"},r,t??e.defaultReturnFormat)})}H.getChainId=BH;function OH(e,t,r,n=e.defaultBlock,i){return Re(this,void 0,void 0,function*(){let s=r.map(u=>(0,Z.format)({format:"bytes"},u,Ie.ETH_DATA_FORMAT)),o=(0,Qe.isBlockTag)(n)?n:(0,Z.format)({format:"uint"},n,Ie.ETH_DATA_FORMAT),a=yield Ae.ethRpcMethods.getProof(e.requestManager,t,s,o);return(0,Z.format)(An.accountSchema,a,i??e.defaultReturnFormat)})}H.getProof=OH;function CH(e,t,r=e.defaultBlock,n,i){return Re(this,void 0,void 0,function*(){let s=(0,Z.format)({format:"uint"},t,Ie.ETH_DATA_FORMAT),o=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),a=(0,Z.format)({type:"array",items:{format:"uint"}},n,rH.NUMBER_DATA_FORMAT),u=yield Ae.ethRpcMethods.getFeeHistory(e.requestManager,s,o,a);return(0,Z.format)(An.feeHistorySchema,u,i??e.defaultReturnFormat)})}H.getFeeHistory=CH;function NH(e,t,r=e.defaultBlock,n){return Re(this,void 0,void 0,function*(){let i=(0,Qe.isBlockTag)(r)?r:(0,Z.format)({format:"uint"},r,Ie.ETH_DATA_FORMAT),s=yield Ae.ethRpcMethods.createAccessList(e.requestManager,(0,Kn.formatTransaction)(t,Ie.ETH_DATA_FORMAT),i);return(0,Z.format)(An.accessListResultSchema,s,n??e.defaultReturnFormat)})}H.createAccessList=NH;function MH(e,t,r,n,i){return Re(this,void 0,void 0,function*(){let s=yield Ae.ethRpcMethods.signTypedData(e.requestManager,t,r,n);return(0,Z.format)({format:"bytes"},s,i??e.defaultReturnFormat)})}H.signTypedData=MH});var Cg=f(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.SyncingSubscription=En.NewHeadsSubscription=En.NewPendingTransactionsSubscription=En.LogsSubscription=void 0;var Fl=G(),Gl=Or(),Og=_n(),Pg=class extends Gl.Web3Subscription{_buildSubscriptionParams(){return["logs",this.args]}formatSubscriptionResult(t){return(0,Fl.format)(Og.logSchema,t,super.returnFormat)}};En.LogsSubscription=Pg;var Sg=class extends Gl.Web3Subscription{_buildSubscriptionParams(){return["newPendingTransactions"]}formatSubscriptionResult(t){return(0,Fl.format)({format:"string"},t,super.returnFormat)}};En.NewPendingTransactionsSubscription=Sg;var xg=class extends Gl.Web3Subscription{_buildSubscriptionParams(){return["newHeads"]}formatSubscriptionResult(t){return(0,Fl.format)(Og.blockHeaderSchema,t,super.returnFormat)}};En.NewHeadsSubscription=xg;var Bg=class extends Gl.Web3Subscription{_buildSubscriptionParams(){return["syncing"]}_processSubscriptionResult(t){if(typeof t=="boolean")this.emit("changed",t);else{let r=Object.fromEntries(Object.entries(t.status).map(([n,i])=>[n.charAt(0).toLowerCase()+n.substring(1),i]));this.emit("changed",t.syncing),this.emit("data",(0,Fl.format)(Og.syncSchema,r,super.returnFormat))}}};En.SyncingSubscription=Bg});var jg=f(Vt=>{"use strict";var kH=Vt&&Vt.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),jH=Vt&&Vt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DH=Vt&&Vt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&kH(t,e,r);return jH(t,e),t},ge=Vt&&Vt.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.Web3Eth=Vt.registeredSubscriptions=void 0;var Ng=Pe(),pR=Or(),mR=V(),Mg=G(),Jn=qi(),Ve=DH(Hi()),Wi=Cg();Vt.registeredSubscriptions={logs:Wi.LogsSubscription,newPendingTransactions:Wi.NewPendingTransactionsSubscription,newHeads:Wi.NewHeadsSubscription,syncing:Wi.SyncingSubscription,pendingTransactions:Wi.NewPendingTransactionsSubscription,newBlockHeaders:Wi.NewHeadsSubscription};var kg=class e extends pR.Web3Context{constructor(t){if(typeof t=="string"||(0,pR.isSupportedProvider)(t)){super({provider:t,registeredSubscriptions:Vt.registeredSubscriptions});return}if(t.registeredSubscriptions){super(t);return}super(Object.assign(Object.assign({},t),{registeredSubscriptions:Vt.registeredSubscriptions})),this.getFeeData=this.calculateFeeData}getProtocolVersion(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getProtocolVersion(this.requestManager)})}isSyncing(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getSyncing(this.requestManager)})}getCoinbase(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getCoinbase(this.requestManager)})}isMining(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getMining(this.requestManager)})}getHashrate(t){var r;return t===void 0&&(t=(r=this.defaultReturnFormat)!==null&&r!==void 0?r:Ng.DEFAULT_RETURN_FORMAT),ge(this,void 0,void 0,function*(){return this.getHashRate(t)})}getHashRate(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getHashRate(this,t)})}getGasPrice(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getGasPrice(this,t)})}getMaxPriorityFeePerGas(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getMaxPriorityFeePerGas(this,t)})}calculateFeeData(t=BigInt(2),r=Mg.ethUnitMap.Gwei){var n;return ge(this,void 0,void 0,function*(){let i=yield this.getBlock(void 0,!1),s=(n=i?.baseFeePerGas)!==null&&n!==void 0?n:void 0,o;try{o=yield this.getGasPrice()}catch{}let a;try{a=yield this.getMaxPriorityFeePerGas()}catch{}let u;return s&&(a=a??r,u=s*t+a),{gasPrice:o,maxFeePerGas:u,maxPriorityFeePerGas:a,baseFeePerGas:s}})}getAccounts(){var t;return ge(this,void 0,void 0,function*(){return((t=yield Jn.ethRpcMethods.getAccounts(this.requestManager))!==null&&t!==void 0?t:[]).map(n=>(0,Mg.toChecksumAddress)(n))})}getBlockNumber(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getBlockNumber(this,t)})}getBalance(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getBalance(this,t,r,n)})}getStorageAt(t,r,n=this.defaultBlock,i=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getStorageAt(this,t,r,n,i)})}getCode(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getCode(this,t,r,n)})}getBlock(t=this.defaultBlock,r=!1,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getBlock(this,t,r,n)})}getBlockTransactionCount(t=this.defaultBlock,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getBlockTransactionCount(this,t,r)})}getBlockUncleCount(t=this.defaultBlock,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getBlockUncleCount(this,t,r)})}getUncle(t=this.defaultBlock,r,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getUncle(this,t,r,n)})}getTransaction(t,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){let n=yield Ve.getTransaction(this,t,r);if(!n)throw new mR.TransactionNotFound;return n})}getPendingTransactions(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getPendingTransactions(this,t)})}getTransactionFromBlock(t=this.defaultBlock,r,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getTransactionFromBlock(this,t,r,n)})}getTransactionReceipt(t,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){let n=yield Ve.getTransactionReceipt(this,t,r);if(!n)throw new mR.TransactionNotFound;return n})}getTransactionCount(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getTransactionCount(this,t,r,n)})}sendTransaction(t,r=this.defaultReturnFormat,n){return Ve.sendTransaction(this,t,r,n)}sendSignedTransaction(t,r=this.defaultReturnFormat,n){return Ve.sendSignedTransaction(this,t,r,n)}sign(t,r,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.sign(this,t,r,n)})}signTransaction(t,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.signTransaction(this,t,r)})}call(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.call(this,t,r,n)})}estimateGas(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.estimateGas(this,t,r,n)})}getPastLogs(t,r=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getLogs(this,t,r)})}getWork(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getWork(this.requestManager)})}submitWork(t,r,n){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.submitWork(this.requestManager,t,r,n)})}requestAccounts(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.requestAccounts(this.requestManager)})}getChainId(t=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getChainId(this,t)})}getNodeInfo(){return ge(this,void 0,void 0,function*(){return Jn.ethRpcMethods.getNodeInfo(this.requestManager)})}getProof(t,r,n=this.defaultBlock,i=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getProof(this,t,r,n,i)})}getFeeHistory(t,r=this.defaultBlock,n,i=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.getFeeHistory(this,t,r,n,i)})}createAccessList(t,r=this.defaultBlock,n=this.defaultReturnFormat){return ge(this,void 0,void 0,function*(){return Ve.createAccessList(this,t,r,n)})}signTypedData(t,r,n,i){var s;return n===void 0&&(n=!1),i===void 0&&(i=(s=this.defaultReturnFormat)!==null&&s!==void 0?s:Ng.DEFAULT_RETURN_FORMAT),ge(this,void 0,void 0,function*(){return Ve.signTypedData(this,t,r,n,i)})}subscribe(t,r,n){var i,s;return n===void 0&&(n=(i=this.defaultReturnFormat)!==null&&i!==void 0?i:Ng.DEFAULT_RETURN_FORMAT),ge(this,void 0,void 0,function*(){let o=yield(s=this.subscriptionManager)===null||s===void 0?void 0:s.subscribe(t,r,n);return o instanceof Wi.LogsSubscription&&t==="logs"&&typeof r=="object"&&!(0,Mg.isNullish)(r.fromBlock)&&Number.isFinite(Number(r.fromBlock))&&setImmediate(()=>{this.getPastLogs(r).then(a=>{for(let u of a)o._processSubscriptionResult(u)}).catch(a=>{o._processSubscriptionError(a)})}),o})}static shouldClearSubscription({sub:t}){return!(t instanceof Wi.SyncingSubscription)}clearSubscriptions(t=!1){var r;return(r=this.subscriptionManager)===null||r===void 0?void 0:r.unsubscribe(t?e.shouldClearSubscription:void 0)}};Vt.Web3Eth=kg});var gR=f(_R=>{"use strict";Object.defineProperty(_R,"__esModule",{value:!0})});var Hg=f(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.validateTransactionForSigning=ne.validateGas=ne.validateFeeMarketGas=ne.validateLegacyGas=ne.validateHardfork=ne.validateBaseChain=ne.validateChainInfo=ne.validateCustomChainInfo=ne.validateTransactionCall=ne.isTransactionCall=ne.validateTransactionWithSender=ne.isTransactionWithSender=ne.isTransactionLegacyUnsigned=ne.isTransaction2930Unsigned=ne.isTransaction1559Unsigned=ne.isAccessList=ne.isAccessListEntry=ne.isBaseTransaction=void 0;var LH=Pe(),U=be(),It=V(),qH=na();function Vc(e){return!(!(0,U.isNullish)(e.to)&&!(0,U.isAddress)(e.to)||!(0,U.isHexStrict)(e.type)&&!(0,U.isNullish)(e.type)&&e.type.length!==2||!(0,U.isHexStrict)(e.nonce)||!(0,U.isHexStrict)(e.gas)||!(0,U.isHexStrict)(e.value)||!(0,U.isHexStrict)(e.input)||e.chainId&&!(0,U.isHexStrict)(e.chainId))}ne.isBaseTransaction=Vc;function yR(e){return!(!(0,U.isNullish)(e.address)&&!(0,U.isAddress)(e.address)||!(0,U.isNullish)(e.storageKeys)&&!e.storageKeys.every(t=>(0,U.isHexString32Bytes)(t)))}ne.isAccessListEntry=yR;function Dg(e){return!(!Array.isArray(e)||!e.every(t=>yR(t)))}ne.isAccessList=Dg;function Lg(e){return!(!Vc(e)||!(0,U.isHexStrict)(e.maxFeePerGas)||!(0,U.isHexStrict)(e.maxPriorityFeePerGas)||!Dg(e.accessList))}ne.isTransaction1559Unsigned=Lg;function qg(e){return!(!Vc(e)||!(0,U.isHexStrict)(e.gasPrice)||!Dg(e.accessList))}ne.isTransaction2930Unsigned=qg;function bR(e){return!(!Vc(e)||!(0,U.isHexStrict)(e.gasPrice))}ne.isTransactionLegacyUnsigned=bR;function vR(e){return!(!(0,U.isAddress)(e.from)||!Vc(e)||!Lg(e)&&!qg(e)&&!bR(e))}ne.isTransactionWithSender=vR;function HH(e){if(!vR(e))throw new It.InvalidTransactionWithSender(e)}ne.validateTransactionWithSender=HH;function AR(e){return!(!(0,U.isNullish)(e.from)&&!(0,U.isAddress)(e.from)||!(0,U.isAddress)(e.to)||!(0,U.isNullish)(e.gas)&&!(0,U.isHexStrict)(e.gas)||!(0,U.isNullish)(e.gasPrice)&&!(0,U.isHexStrict)(e.gasPrice)||!(0,U.isNullish)(e.value)&&!(0,U.isHexStrict)(e.value)||!(0,U.isNullish)(e.data)&&!(0,U.isHexStrict)(e.data)||!(0,U.isNullish)(e.input)&&!(0,U.isHexStrict)(e.input)||!(0,U.isNullish)(e.type)||Lg(e)||qg(e))}ne.isTransactionCall=AR;function UH(e){if(!AR(e))throw new It.InvalidTransactionCall(e)}ne.validateTransactionCall=UH;var FH=e=>{if(!(0,U.isNullish)(e.common)){if((0,U.isNullish)(e.common.customChain))throw new It.MissingCustomChainError;if((0,U.isNullish)(e.common.customChain.chainId))throw new It.MissingCustomChainIdError;if(!(0,U.isNullish)(e.chainId)&&e.chainId!==e.common.customChain.chainId)throw new It.ChainIdMismatchError({txChainId:e.chainId,customChainId:e.common.customChain.chainId})}};ne.validateCustomChainInfo=FH;var GH=e=>{if(!(0,U.isNullish)(e.common)&&!(0,U.isNullish)(e.chain)&&!(0,U.isNullish)(e.hardfork))throw new It.CommonOrChainAndHardforkError;if(!(0,U.isNullish)(e.chain)&&(0,U.isNullish)(e.hardfork)||!(0,U.isNullish)(e.hardfork)&&(0,U.isNullish)(e.chain))throw new It.MissingChainOrHardforkError({chain:e.chain,hardfork:e.hardfork})};ne.validateChainInfo=GH;var VH=e=>{if(!(0,U.isNullish)(e.common)&&!(0,U.isNullish)(e.common.baseChain)&&!(0,U.isNullish)(e.chain)&&e.chain!==e.common.baseChain)throw new It.ChainMismatchError({txChain:e.chain,baseChain:e.common.baseChain})};ne.validateBaseChain=VH;var WH=e=>{if(!(0,U.isNullish)(e.common)&&!(0,U.isNullish)(e.common.hardfork)&&!(0,U.isNullish)(e.hardfork)&&e.hardfork!==e.common.hardfork)throw new It.HardforkMismatchError({txHardfork:e.hardfork,commonHardfork:e.common.hardfork})};ne.validateHardfork=WH;var ZH=e=>{if((0,U.isNullish)(e.gas)||!(0,U.isUInt)(e.gas)||(0,U.isNullish)(e.gasPrice)||!(0,U.isUInt)(e.gasPrice))throw new It.InvalidGasOrGasPrice({gas:e.gas,gasPrice:e.gasPrice});if(!(0,U.isNullish)(e.maxFeePerGas)||!(0,U.isNullish)(e.maxPriorityFeePerGas))throw new It.UnsupportedFeeMarketError({maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas})};ne.validateLegacyGas=ZH;var zH=e=>{if(!(0,U.isNullish)(e.gasPrice)&&e.type==="0x2")throw new It.Eip1559GasPriceError(e.gasPrice);if(e.type==="0x0"||e.type==="0x1")throw new It.UnsupportedFeeMarketError({maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas});if((0,U.isNullish)(e.maxFeePerGas)||!(0,U.isUInt)(e.maxFeePerGas)||(0,U.isNullish)(e.maxPriorityFeePerGas)||!(0,U.isUInt)(e.maxPriorityFeePerGas))throw new It.InvalidMaxPriorityFeePerGasOrMaxFeePerGas({maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas})};ne.validateFeeMarketGas=zH;var QH=e=>{let t=!(0,U.isNullish)(e.gas)||!(0,U.isNullish)(e.gasLimit),r=t&&!(0,U.isNullish)(e.gasPrice),n=t&&!(0,U.isNullish)(e.maxPriorityFeePerGas)&&!(0,U.isNullish)(e.maxFeePerGas);if(!r&&!n)throw new It.MissingGasError({gas:e.gas,gasPrice:e.gasPrice,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas});if(r&&n)throw new It.TransactionGasMismatchError({gas:e.gas,gasPrice:e.gasPrice,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas});(r?ne.validateLegacyGas:ne.validateFeeMarketGas)(e),(!(0,U.isNullish)(e.type)&&e.type>"0x1"?ne.validateFeeMarketGas:ne.validateLegacyGas)(e)};ne.validateGas=QH;var KH=(e,t)=>{if(!(0,U.isNullish)(t)){t(e);return}if(typeof e!="object"||(0,U.isNullish)(e))throw new It.InvalidTransactionObjectError(e);(0,ne.validateCustomChainInfo)(e),(0,ne.validateChainInfo)(e),(0,ne.validateBaseChain)(e),(0,ne.validateHardfork)(e);let r=(0,qH.formatTransaction)(e,LH.ETH_DATA_FORMAT);if((0,ne.validateGas)(r),(0,U.isNullish)(r.nonce)||(0,U.isNullish)(r.chainId)||r.nonce.startsWith("-")||r.chainId.startsWith("-"))throw new It.InvalidNonceOrChainIdError({nonce:e.nonce,chainId:e.chainId})};ne.validateTransactionForSigning=KH});var ER=f(xa=>{"use strict";var JH=xa&&xa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(xa,"__esModule",{value:!0});xa.prepareTransactionForSigning=void 0;var XH=Pe(),Vl=G(),Ug=ji(),Sa=be(),YH=Hg(),$H=na(),e8=qc(),t8=e=>{var t,r;return{nonce:e.nonce,gasPrice:e.gasPrice,gasLimit:(t=e.gasLimit)!==null&&t!==void 0?t:e.gas,to:e.to,value:e.value,data:(r=e.data)!==null&&r!==void 0?r:e.input,type:e.type,chainId:e.chainId,accessList:e.accessList,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas}},r8=(e,t)=>{var r,n,i,s,o,a,u,d,c,l,h,m,b,_,y,v,E,I;let x=!(0,Sa.isNullish)(e.chain)&&!(0,Sa.isNullish)(e.hardfork)||!(0,Sa.isNullish)(e.common),P;if(!x)t.defaultCommon?(P=Object.assign({},t.defaultCommon),(0,Sa.isNullish)(P.hardfork)&&(P.hardfork=(r=e.hardfork)!==null&&r!==void 0?r:t.defaultHardfork),(0,Sa.isNullish)(P.baseChain)&&(P.baseChain=t.defaultChain)):P=Ug.Common.custom({name:"custom-network",chainId:(0,Vl.toNumber)(e.chainId),networkId:(0,Sa.isNullish)(e.networkId)?void 0:(0,Vl.toNumber)(e.networkId),defaultHardfork:(n=e.hardfork)!==null&&n!==void 0?n:t.defaultHardfork},{baseChain:t.defaultChain});else{let M=(a=(o=(s=(i=e?.common)===null||i===void 0?void 0:i.customChain)===null||s===void 0?void 0:s.name)!==null&&o!==void 0?o:e.chain)!==null&&a!==void 0?a:"custom-network",w=(0,Vl.toNumber)((c=(d=(u=e?.common)===null||u===void 0?void 0:u.customChain)===null||d===void 0?void 0:d.chainId)!==null&&c!==void 0?c:e?.chainId),S=(0,Vl.toNumber)((m=(h=(l=e?.common)===null||l===void 0?void 0:l.customChain)===null||h===void 0?void 0:h.networkId)!==null&&m!==void 0?m:e?.networkId),C=(y=(_=(b=e?.common)===null||b===void 0?void 0:b.hardfork)!==null&&_!==void 0?_:e?.hardfork)!==null&&y!==void 0?y:t.defaultHardfork,q=(I=(E=(v=e.common)===null||v===void 0?void 0:v.baseChain)!==null&&E!==void 0?E:e.chain)!==null&&I!==void 0?I:t.defaultChain;w&&S&&M&&(P=Ug.Common.custom({name:M,chainId:w,networkId:S,defaultHardfork:C},{baseChain:q}))}return{common:P}},n8=(e,t,r,n=!1,i=!0)=>JH(void 0,void 0,void 0,function*(){let s=yield(0,e8.transactionBuilder)({transaction:e,web3Context:t,privateKey:r,fillGasPrice:n,fillGasLimit:i}),o=(0,$H.formatTransaction)(s,XH.ETH_DATA_FORMAT);return(0,YH.validateTransactionForSigning)(o),Ug.TransactionFactory.fromTxData(t8(o),r8(o,t))});xa.prepareTransactionForSigning=n8});var Yr=f(De=>{"use strict";var i8=De&&De.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),Tn=De&&De.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&i8(t,e,r)};Object.defineProperty(De,"__esModule",{value:!0});De.SendTxHelper=De.trySendTransaction=De.waitForTransactionReceipt=De.getTransactionFromOrToAttr=De.transactionBuilder=De.detectTransactionType=void 0;ww();var s8=jg();Tn(jg(),De);Tn(Tg(),De);Tn(_n(),De);Tn(Bs(),De);Tn(gR(),De);Tn(Hg(),De);Tn(Hi(),De);Tn(na(),De);Tn(ER(),De);Tn(Cg(),De);var o8=_l();Object.defineProperty(De,"detectTransactionType",{enumerable:!0,get:function(){return o8.detectTransactionType}});var TR=qc();Object.defineProperty(De,"transactionBuilder",{enumerable:!0,get:function(){return TR.transactionBuilder}});Object.defineProperty(De,"getTransactionFromOrToAttr",{enumerable:!0,get:function(){return TR.getTransactionFromOrToAttr}});var a8=K_();Object.defineProperty(De,"waitForTransactionReceipt",{enumerable:!0,get:function(){return a8.waitForTransactionReceipt}});var c8=bl();Object.defineProperty(De,"trySendTransaction",{enumerable:!0,get:function(){return c8.trySendTransaction}});var u8=Rg();Object.defineProperty(De,"SendTxHelper",{enumerable:!0,get:function(){return u8.SendTxHelper}});De.default=s8.Web3Eth});var zl=f(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.decodeMethodReturn=Nr.decodeMethodParams=Nr.encodeMethodABI=Nr.encodeEventABI=Nr.decodeEventABI=void 0;var Wc=G(),Wl=Pe(),wn=ks(),Zl=Yr(),Fg=V(),d8=Yr();Object.defineProperty(Nr,"decodeEventABI",{enumerable:!0,get:function(){return d8.decodeEventABI}});var l8=({address:e},t,r)=>{var n,i;let s=r?.topics,o=(n=r?.filter)!==null&&n!==void 0?n:{},a={};if((0,Wc.isNullish)(r?.fromBlock)||(a.fromBlock=(0,Wc.format)(Zl.blockSchema.properties.number,r?.fromBlock,{number:Wl.FMT_NUMBER.HEX,bytes:Wl.FMT_BYTES.HEX})),(0,Wc.isNullish)(r?.toBlock)||(a.toBlock=(0,Wc.format)(Zl.blockSchema.properties.number,r?.toBlock,{number:Wl.FMT_NUMBER.HEX,bytes:Wl.FMT_BYTES.HEX})),s&&Array.isArray(s))a.topics=[...s];else if(a.topics=[],t&&!t.anonymous&&![Zl.ALL_EVENTS,"allEvents"].includes(t.name)&&a.topics.push((i=t.signature)!==null&&i!==void 0?i:(0,wn.encodeEventSignature)((0,wn.jsonInterfaceMethodToString)(t))),![Zl.ALL_EVENTS,"allEvents"].includes(t.name)&&t.inputs)for(let u of t.inputs){if(!u.indexed)continue;let d=o[u.name];if(!d){a.topics.push(null);continue}Array.isArray(d)?a.topics.push(d.map(c=>(0,wn.encodeParameter)(u.type,c))):u.type==="string"?a.topics.push((0,Wc.keccak256)(d)):a.topics.push((0,wn.encodeParameter)(u.type,d))}return a.topics.length||delete a.topics,e&&(a.address=e.toLowerCase()),a};Nr.encodeEventABI=l8;var f8=(e,t,r)=>{let n=Array.isArray(e.inputs)?e.inputs.length:0;if(e.inputs&&n!==t.length)throw new Fg.Web3ContractError(`The number of arguments is not matching the methods required number. You need to pass ${n} arguments.`);let i;if(e.inputs?i=(0,wn.encodeParameters)(Array.isArray(e.inputs)?e.inputs:[],t).replace("0x",""):i=(0,wn.inferTypesAndEncodeParameters)(t).replace("0x",""),(0,wn.isAbiConstructorFragment)(e)){if(!r)throw new Fg.Web3ContractError("The contract has no contract data option set. This is necessary to append the constructor parameters.");return r.startsWith("0x")?`${r}${i}`:`0x${r}${i}`}return`${(0,wn.encodeFunctionSignature)(e)}${i}`};Nr.encodeMethodABI=f8;var h8=(e,t,r=!0)=>{let n=r&&t&&t.length>=10&&t.startsWith("0x")?t.slice(10):t;if(!e.inputs)throw new Fg.Web3ContractError("No inputs found in the ABI");return(0,wn.decodeParameters)([...e.inputs],n)};Nr.decodeMethodParams=h8;var p8=(e,t)=>{if(e.type==="constructor")return t;if(!t)return null;let r=t.length>=2?t.slice(2):t;if(!e.outputs)return null;let n=(0,wn.decodeParameters)([...e.outputs],r);return n.__length__===1?n[0]:n};Nr.decodeMethodReturn=p8});var Vg=f(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.LogsSubscription=void 0;var m8=Or(),_8=Yr(),Gg=class extends m8.Web3Subscription{constructor(t,r){super(t,r),this.address=t.address,this.topics=t.topics,this.abi=t.abi,this.jsonInterface=t.jsonInterface}_buildSubscriptionParams(){return["logs",{address:this.address,topics:this.topics}]}formatSubscriptionResult(t){return(0,_8.decodeEventABI)(this.abi,t,this.jsonInterface,super.returnFormat)}};Ql.LogsSubscription=Gg});var Zg=f(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.getCreateAccessListParams=Mr.isWeb3ContractContext=Mr.getEstimateGasParams=Mr.getEthTxCallParams=Mr.getSendTxParams=void 0;var Zc=V(),In=G(),Wg=zl(),Kl=(e,t,r,n)=>{var i,s;let o={};return(!(0,In.isNullish)(e.data)||n==="both")&&(o.data=(0,Wg.encodeMethodABI)(t,r,(i=e.data)!==null&&i!==void 0?i:e.input)),(!(0,In.isNullish)(e.input)||n==="both")&&(o.input=(0,Wg.encodeMethodABI)(t,r,(s=e.input)!==null&&s!==void 0?s:e.data)),(0,In.isNullish)(o.input)&&(0,In.isNullish)(o.data)&&(o[n]=(0,Wg.encodeMethodABI)(t,r)),{data:o.data,input:o.input}},g8=({abi:e,params:t,options:r,contractOptions:n})=>{var i,s,o;if(!((o=(s=(i=r?.input)!==null&&i!==void 0?i:r?.data)!==null&&s!==void 0?s:n.input)!==null&&o!==void 0?o:n.data)&&!r?.to&&!n.address)throw new Zc.Web3ContractError("Contract address not specified");if(!r?.from&&!n.from)throw new Zc.Web3ContractError('Contract "from" address not specified');let u=(0,In.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),d=Kl(u,e,t,r?.dataInputFill);return u=Object.assign(Object.assign({},u),{data:d.data,input:d.input}),u};Mr.getSendTxParams=g8;var y8=({abi:e,params:t,options:r,contractOptions:n})=>{if(!r?.to&&!n.address)throw new Zc.Web3ContractError("Contract address not specified");let i=(0,In.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),s=Kl(i,e,t,r?.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i};Mr.getEthTxCallParams=y8;var b8=({abi:e,params:t,options:r,contractOptions:n})=>{let i=(0,In.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,data:n.data},r),s=Kl(i,e,t,r?.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i};Mr.getEstimateGasParams=b8;var v8=e=>typeof e=="object"&&!(0,In.isNullish)(e)&&Object.keys(e).length!==0&&!(0,In.isContractInitOptions)(e);Mr.isWeb3ContractContext=v8;var A8=({abi:e,params:t,options:r,contractOptions:n})=>{if(!r?.to&&!n.address)throw new Zc.Web3ContractError("Contract address not specified");if(!r?.from&&!n.from)throw new Zc.Web3ContractError('Contract "from" address not specified');let i=(0,In.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),s=Kl(i,e,t,r?.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i};Mr.getCreateAccessListParams=A8});var Kg=f(Ba=>{"use strict";var Zi=Ba&&Ba.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ba,"__esModule",{value:!0});Ba.Contract=void 0;var zc=Or(),$r=V(),_r=Yr(),mr=ks(),zg=Pe(),ar=G(),Xn=be(),zi=zl(),wR=Vg(),Ls=Zg(),E8={logs:wR.LogsSubscription,newHeads:_r.NewHeadsSubscription,newBlockHeaders:_r.NewHeadsSubscription},Qg=class e extends zc.Web3Context{constructor(t,r,n,i,s){var o,a,u;let d=(0,ar.isContractInitOptions)(r)?r:(0,ar.isContractInitOptions)(n)?n:void 0,c;(0,Ls.isWeb3ContractContext)(r)?c=r:(0,Ls.isWeb3ContractContext)(n)?c=n:c=i;let l;if(typeof r=="object"&&"provider"in r?l=r.provider:typeof n=="object"&&"provider"in n?l=n.provider:typeof i=="object"&&"provider"in i?l=i.provider:l=e.givenProvider,super(Object.assign(Object.assign({},c),{provider:l,registeredSubscriptions:E8})),this.syncWithContext=!1,this._functions={},c?.wallet&&(this._wallet=c.wallet),c?.accountProvider&&(this._accountProvider=c.accountProvider),!(0,Xn.isNullish)(d)&&!(0,Xn.isNullish)(d.data)&&!(0,Xn.isNullish)(d.input)&&this.config.contractDataInputFill!=="both")throw new $r.ContractTransactionDataAndInputError({data:d.data,input:d.input});this._overloadedMethodAbis=new Map;let h=(0,ar.isDataFormat)(i)?i:(0,ar.isDataFormat)(n)?n:s??this.defaultReturnFormat,m=typeof r=="string"?r:void 0;this.config.contractDataInputFill=(o=d?.dataInputFill)!==null&&o!==void 0?o:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,h),this.defaultReturnFormat!==h&&(this.defaultReturnFormat=h),(0,Xn.isNullish)(m)||this._parseAndSetAddress(m,h),this.options={address:m,jsonInterface:this._jsonInterface,gas:(a=d?.gas)!==null&&a!==void 0?a:d?.gasLimit,gasPrice:d?.gasPrice,from:d?.from,input:d?.input,data:d?.data},this.syncWithContext=(u=d?.syncWithContext)!==null&&u!==void 0?u:!1,c instanceof zc.Web3Context&&this.subscribeToContextEvents(c),Object.defineProperty(this.options,"address",{set:b=>this._parseAndSetAddress(b,h),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:b=>this._parseAndSetJsonInterface(b,h),get:()=>this._jsonInterface}),c instanceof zc.Web3Context&&c.on(zc.Web3ConfigEvent.CONFIG_CHANGE,b=>{this.setConfig({[b.name]:b.newValue})})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return this.options.address?t=new e([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):t=new e([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var r,n,i;let s=this._jsonInterface.find(l=>l.type==="constructor");s||(s={type:"constructor",stateMutability:""});let o=(0,ar.format)({format:"bytes"},(r=t?.input)!==null&&r!==void 0?r:this.options.input,zg.DEFAULT_RETURN_FORMAT),a=(0,ar.format)({format:"bytes"},(n=t?.data)!==null&&n!==void 0?n:this.options.data,zg.DEFAULT_RETURN_FORMAT);if((!o||o.trim()==="0x")&&(!a||a.trim()==="0x"))throw new $r.Web3ContractError("contract creation without any data provided.");let u=(i=t?.arguments)!==null&&i!==void 0?i:[],d=Object.assign(Object.assign({},this.options),{input:o,data:a}),c=o??a;return{arguments:u,send:l=>{let h=Object.assign({},l);return this._contractMethodDeploySend(s,u,h,d)},estimateGas:(l,h=this.defaultReturnFormat)=>Zi(this,void 0,void 0,function*(){let m=Object.assign({},l);return this._contractMethodEstimateGas({abi:s,params:u,returnFormat:h,options:m,contractOptions:d})}),encodeABI:()=>(0,zi.encodeMethodABI)(s,u,(0,ar.format)({format:"bytes"},c,this.defaultReturnFormat)),decodeData:l=>Object.assign(Object.assign({},(0,zi.decodeMethodParams)(s,l.replace(c,""),!1)),{__method__:s.type})}}getPastEvents(t,r,n){var i;return Zi(this,void 0,void 0,function*(){let s=typeof t=="string"?t:_r.ALL_EVENTS,o=typeof t!="string"&&!(0,ar.isDataFormat)(t)?t:(0,ar.isDataFormat)(r)?{}:r,a=(0,ar.isDataFormat)(t)?t:(0,ar.isDataFormat)(r)?r:n??this.defaultReturnFormat,u=s==="allEvents"||s===_r.ALL_EVENTS?_r.ALL_EVENTS_ABI:this._jsonInterface.find(v=>"name"in v&&v.name===s);if(!u)throw new $r.Web3ContractError(`Event ${s} not found.`);let{fromBlock:d,toBlock:c,topics:l,address:h}=(0,zi.encodeEventABI)(this.options,u,o??{}),m=yield(0,_r.getLogs)(this,{fromBlock:d,toBlock:c,topics:l,address:h},a),b=m?m.map(v=>typeof v=="string"?v:(0,_r.decodeEventABI)(u,v,this._jsonInterface,a)):[],_=(i=o?.filter)!==null&&i!==void 0?i:{},y=Object.keys(_);return y.length>0?b.filter(v=>typeof v=="string"?!0:y.every(E=>{var I;if(Array.isArray(_[E]))return _[E].some(P=>String(v.returnValues[E]).toUpperCase()===String(P).toUpperCase());let x=(I=u.inputs)===null||I===void 0?void 0:I.filter(P=>P.name===E)[0];return x?.indexed&&x.type==="string"&&(0,ar.keccak256)(_[E])===String(v.returnValues[E])?!0:String(v.returnValues[E]).toUpperCase()===String(_[E]).toUpperCase()})):b})}_parseAndSetAddress(t,r=this.defaultReturnFormat){this._address=t&&(0,ar.toChecksumAddress)((0,ar.format)({format:"address"},t,r))}decodeMethodData(t){let r=t.slice(0,10),i=this._jsonInterface.filter(s=>s.type!=="error").find(s=>r===(0,mr.encodeFunctionSignature)((0,mr.jsonInterfaceMethodToString)(s)));if(!i)throw new $r.Web3ContractError(`The ABI for the provided method signature ${r} was not found.`);return Object.assign(Object.assign({},(0,zi.decodeMethodParams)(i,t)),{__method__:(0,mr.jsonInterfaceMethodToString)(i)})}_parseAndSetJsonInterface(t,r=this.defaultReturnFormat){var n,i,s,o,a;this._functions={},this._methods={},this._events={};let u=[],d=t.filter(l=>l.type!=="error"),c=t.filter(l=>(0,mr.isAbiErrorFragment)(l));for(let l of d){let h=Object.assign(Object.assign({},l),{signature:""});if((0,mr.isAbiFunctionFragment)(h)){let m=(0,mr.jsonInterfaceMethodToString)(h),b=(0,mr.encodeFunctionSignature)(m);h.methodNameWithInputs=m,h.signature=b,h.constant=(i=(n=h.stateMutability==="view")!==null&&n!==void 0?n:h.stateMutability==="pure")!==null&&i!==void 0?i:h.constant,h.payable=(s=h.stateMutability==="payable")!==null&&s!==void 0?s:h.payable,this._overloadedMethodAbis.set(h.name,[...(o=this._overloadedMethodAbis.get(h.name))!==null&&o!==void 0?o:[],h]);let _=(a=this._overloadedMethodAbis.get(h.name))!==null&&a!==void 0?a:[],y=this._createContractMethod(_,c),v=this._createContractMethod(_,c,!0);this._functions[m]={signature:b,method:v},this._methods[h.name]=y,this._methods[m]=v,this._methods[b]=v}else if((0,mr.isAbiEventFragment)(h)){let m=(0,mr.jsonInterfaceMethodToString)(h),b=(0,mr.encodeEventSignature)(m),_=this._createContractEvent(h,r);h.signature=b,(!(m in this._events)||h.name==="bound")&&(this._events[m]=_),this._events[h.name]=_,this._events[b]=_}u=[...u,h]}this._events.allEvents=this._createContractEvent(_r.ALL_EVENTS_ABI,r),this._jsonInterface=[...u],this._errorsInterface=c}_getAbiParams(t,r){var n;try{return Xn.utils.transformJsonDataToAbiFormat((n=t.inputs)!==null&&n!==void 0?n:[],r)}catch(i){throw new $r.Web3ContractError(`Invalid parameters for method ${t.name}: ${i.message}`)}}_createContractMethod(t,r,n=!1){let i=t[t.length-1];return(...s)=>{var o,a,u;let d,c=(a=n?(o=this._overloadedMethodAbis.get(i.name))===null||o===void 0?void 0:o.filter(_=>_.signature===i.signature):this._overloadedMethodAbis.get(i.name))!==null&&a!==void 0?a:[],l=c[0],h=r,m=c.filter(_=>{var y;return((y=_.inputs)!==null&&y!==void 0?y:[]).length===s.length});if(c.length===1||m.length===0)d=this._getAbiParams(l,s),Xn.validator.validate((u=i.inputs)!==null&&u!==void 0?u:[],d);else{let _=[],y=[];for(let v of m)try{d=this._getAbiParams(v,s),Xn.validator.validate(v.inputs,d),y.push(v)}catch(E){_.push(E)}if(y.length===1?[l]=y:y.length>1&&([l]=y,console.warn(`Multiple methods found that is compatible with the given inputs. Found ${y.length} compatible methods: ${JSON.stringify(y.map(v=>`${v.methodNameWithInputs} (signature: ${v.signature})`))} - The first one will be used: ${l.methodNameWithInputs}`)),_.length===m.length)throw new Xn.Web3ValidatorError(_)}let b={arguments:d,call:(_,y)=>Zi(this,void 0,void 0,function*(){return this._contractMethodCall(l,d,h,_,y)}),send:_=>this._contractMethodSend(l,d,h,_),estimateGas:(_,y=this.defaultReturnFormat)=>Zi(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:l,params:d,returnFormat:y,options:_})}),encodeABI:()=>(0,zi.encodeMethodABI)(l,d),decodeData:_=>(0,zi.decodeMethodParams)(l,_),createAccessList:(_,y)=>Zi(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(l,d,h,_,y)})};return l.stateMutability==="payable",b}}_contractMethodCall(t,r,n,i,s){var o;return Zi(this,void 0,void 0,function*(){let a=(0,Ls.getEthTxCallParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{let u=yield(0,_r.call)(this,a,s,this.defaultReturnFormat);return(0,zi.decodeMethodReturn)(t,u)}catch(u){throw u instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,u.cause),u}})}_contractMethodCreateAccessList(t,r,n,i,s){var o;return Zi(this,void 0,void 0,function*(){let a=(0,Ls.getCreateAccessListParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{return(0,_r.createAccessList)(this,a,s,this.defaultReturnFormat)}catch(u){throw u instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,u.cause),u}})}_contractMethodSend(t,r,n,i,s){var o,a;let u=s??this.options;u=Object.assign(Object.assign({},u),{input:void 0,from:(a=(o=u.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&a!==void 0?a:void 0});let d=(0,Ls.getSendTxParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:u}),c=(0,_r.sendTransaction)(this,d,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return c.on("error",l=>{l instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,l.cause)}),c}_contractMethodDeploySend(t,r,n,i){var s,o;let a=i??this.options;a=Object.assign(Object.assign({},a),{from:(o=(s=a.from)!==null&&s!==void 0?s:this.defaultAccount)!==null&&o!==void 0?o:void 0});let u=(0,Ls.getSendTxParams)({abi:t,params:r,options:Object.assign(Object.assign({},n),{dataInputFill:this.contractDataInputFill}),contractOptions:a});return(0,_r.sendTransaction)(this,u,this.defaultReturnFormat,{transactionResolver:d=>{if(d.status===BigInt(0))throw new $r.Web3ContractError("code couldn't be stored",d);let c=this.clone();return c.options.address=d.contractAddress,c},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:r,returnFormat:n,options:i,contractOptions:s}){return Zi(this,void 0,void 0,function*(){let o=(0,Ls.getEstimateGasParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:s??this.options});return(0,_r.estimateGas)(this,o,zg.BlockTags.LATEST,n??this.defaultReturnFormat)})}_createContractEvent(t,r=this.defaultReturnFormat){return(...n)=>{var i;let{topics:s,fromBlock:o}=(0,zi.encodeEventABI)(this.options,t,n[0]),a=new wR.LogsSubscription({address:this.options.address,topics:s,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:r});return(0,Xn.isNullish)(o)||this.getPastEvents(t.name,{fromBlock:o,topics:s},r).then(u=>{u&&u.forEach(d=>a.emit("data",d))}).catch(u=>{a.emit("error",new $r.SubscriptionError("Failed to get past events.",u))}),(i=this.subscriptionManager)===null||i===void 0||i.addSubscription(a).catch(u=>{a.emit("error",new $r.SubscriptionError("Failed to subscribe.",u))}),a}}subscribeToContextEvents(t){let r=this;this.context=t,r.syncWithContext&&t.on(zc.Web3ConfigEvent.CONFIG_CHANGE,n=>{r.setConfig({[n.name]:n.newValue})})}};Ba.Contract=Qg});var RR=f(IR=>{"use strict";Object.defineProperty(IR,"__esModule",{value:!0})});var Kc=f(kr=>{"use strict";var T8=kr&&kr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),Qc=kr&&kr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&T8(t,e,r)};Object.defineProperty(kr,"__esModule",{value:!0});var w8=Kg();Qc(zl(),kr);Qc(Kg(),kr);Qc(Vg(),kr);Qc(RR(),kr);Qc(Zg(),kr);kr.default=w8.Contract});var Jc=f(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.networkIds=Rn.registryAddresses=Rn.methodsInInterface=Rn.interfaceIds=void 0;Rn.interfaceIds={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"};Rn.methodsInInterface={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash",text:"text",name:"name"};Rn.registryAddresses={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"};Rn.networkIds={"0x1":"main","0x5":"goerli"}});var PR=f(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.ENSRegistryAbi=void 0;Jl.ENSRegistryAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}]});var SR=f(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.PublicResolverAbi=void 0;Xl.PublicResolverAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"DNSZoneCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}]});var i1=f(jr=>{"use strict";var I8="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADc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TVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI",xR=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),BR=4;function R8(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,s=[0,1];for(let P=1;P>--u&1}let l=31,h=2**l,m=h>>>1,b=m>>1,_=h-1,y=0;for(let P=0;P1;){let q=M+w>>>1;P>>1|c(),S=S<<1^m,C=(C^m)<<1|m|1;E=S,I=1+C-S}let x=n-4;return v.map(P=>{switch(P-x){case 3:return x+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return x+256+(e[a++]<<8|e[a++]);case 1:return x+e[a++];default:return P-1}})}function P8(e){let t=0;return()=>e[t++]}function kR(e){return P8(R8(S8(e)))}function S8(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>t[i.charCodeAt(0)]=s);let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,s=0,o=0,a=0;i=8&&(n[s++]=a>>(o-=8));return n}function x8(e){return e&1?~e>>1:e>>1}function B8(e,t){let r=Array(e);for(let n=0,i=0;n{let t=eu(e);if(t.length)return t})}function DR(e){let t=[];for(;;){let r=e();if(r==0)break;t.push(O8(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(C8(r,e))}return t.flat()}function tu(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function LR(e,t,r){let n=Array(e).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function O8(e,t){let r=1+t(),n=t(),i=tu(t);return LR(i.length,1+e,t).flatMap((o,a)=>{let[u,...d]=o;return Array(i[a]).fill().map((c,l)=>{let h=l*n;return[u+l*r,d.map(m=>m+h)]})})}function C8(e,t){let r=1+t();return LR(r,1+e,t).map(i=>[i[0],i.slice(1)])}function N8(e){let t=[],r=eu(e);return i(n([]),[]),t;function n(s){let o=e(),a=tu(()=>{let u=eu(e).map(d=>r[d]);if(u.length)return n(u)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,u){if(!(s&4&&u===a[a.length-1])){s&2&&(u=a[a.length-1]),s&1&&t.push(a);for(let d of o)for(let c of d.Q)i(d,[...a,c],u)}}}function M8(e){return e.toString(16).toUpperCase().padStart(2,"0")}function qR(e){return`{${M8(e)}}`}function sy(e){let t=[];for(let r=0,n=e.length;r>24&255}function GR(e){return e&16777215}var $g,OR,ey,Yl;function U8(){let e=kR(k8);$g=new Map(jR(e).flatMap((t,r)=>t.map(n=>[n,r+1<<24]))),OR=new Set(eu(e)),ey=new Map,Yl=new Map;for(let[t,r]of DR(e)){if(!OR.has(t)&&r.length==2){let[n,i]=r,s=Yl.get(n);s||(s=new Map,Yl.set(n,s)),s.set(i,t)}ey.set(t,r.reverse())}}function VR(e){return e>=ru&&e=$l&&e=ef&&ttf&&t0&&i(tf+d)}else{let o=ey.get(s);o?r.push(...o):i(s)}if(!r.length)break;s=r.pop()}if(n&&t.length>1){let s=Xc(t[0]);for(let o=1;o0&&i>=o)o==0?(t.push(n,...r),r.length=0,n=a):r.push(a),i=o;else{let u=F8(n,a);u>=0?n=u:i==0&&o==0?(t.push(n),n=a):(r.push(a),i=o)}}return n>=0&&t.push(n,...r),t}function af(e){return WR(e).map(GR)}function Ma(e){return G8(WR(e))}var CR=45,V8=46,nf=".",ZR=65039,zR=1,sf=e=>Array.from(e);function nu(e,t){return e.P.has(t)||e.Q.has(t)}var ty=class extends Array{get is_emoji(){return!0}},of,oy,qs,ry,QR,KR,Ca,Jg,Oa,Qi,ny,iy;function ka(){if(of)return;let e=kR(I8),t=()=>eu(e),r=()=>new Set(t()),n=(c,l)=>l.forEach(h=>c.add(h));of=new Map(DR(e)),oy=r(),qs=t(),ry=new Set(t().map(c=>qs[c])),qs=new Set(qs),QR=r(),KR=r();let i=jR(e),s=e(),o=()=>{let c=new Set;return t().forEach(l=>n(c,i[l])),n(c,t()),c};Ca=tu(c=>{let l=tu(e).map(h=>h+96);if(l.length){let h=c>=s;l[0]-=32,l=Ki(l),h&&(l=`Restricted[${l}]`);let m=o(),b=o(),_=!e();return{N:l,P:m,Q:b,M:_,R:h}}}),Jg=r(),Oa=new Map;let a=t().concat(sf(Jg)).sort((c,l)=>c-l);a.forEach((c,l)=>{let h=e(),m=a[l]=h?a[l-h]:{V:[],M:new Map};m.V.push(c),Jg.has(c)||Oa.set(c,m)});for(let{V:c,M:l}of new Set(Oa.values())){let h=[];for(let b of c){let _=Ca.filter(v=>nu(v,b)),y=h.find(({G:v})=>_.some(E=>v.has(E)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(b),n(y.G,_)}let m=h.flatMap(b=>sf(b.G));for(let{G:b,V:_}of h){let y=new Set(m.filter(v=>!b.has(v)));for(let v of _)l.set(v,y)}}Qi=new Set;let u=new Set,d=c=>Qi.has(c)?u.add(c):Qi.add(c);for(let c of Ca){for(let l of c.P)d(l);for(let l of c.Q)d(l)}for(let c of Qi)!Oa.has(c)&&!u.has(c)&&Oa.set(c,zR);n(Qi,af(Qi)),ny=N8(e).map(c=>ty.from(c)).sort(HR),iy=new Map;for(let c of ny){let l=[iy];for(let h of c){let m=l.map(b=>{let _=b.get(h);return _||(_=new Map,b.set(h,_)),_});h===ZR?l.push(...m):l=m}for(let h of l)h.V=c}}function ay(e){return(uy(e)?"":`${cy(iu([e]))} `)+qR(e)}function cy(e){return`"${e}"\u200E`}function W8(e){if(e.length>=4&&e[2]==CR&&e[3]==CR)throw new Error(`invalid label extension: "${Ki(e.slice(0,4))}"`)}function Z8(e){for(let r=e.lastIndexOf(95);r>0;)if(e[--r]!==95)throw new Error("underscore allowed only at start")}function z8(e){let t=e[0],r=xR.get(t);if(r)throw Yc(`leading ${r}`);let n=e.length,i=-1;for(let s=1;st&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,s=e.length;for(let o=0;oe.slice())}function K8(e,t){ka();let r=t?af:Ma;return e.split(nf).map(n=>Ki(e1(sy(n),r,cf).flat())).join(nf)}function J8(e){return XR(dy(e,Ma,cf))}function X8(e){let t=dy(e,Ma,r=>r);for(let{type:r,output:n,error:i}of t){if(i)break;r!=="Greek"&&Y8(n,958,926)}return XR(t)}function Y8(e,t,r){let n=0;for(;;){let i=e.indexOf(t,n);if(i<0)break;e[i]=r,n=i+1}}function $8(e,t){return dy(e,Ma,t?r=>r.slice():cf)}function dy(e,t,r){if(!e)return[];ka();let n=0;return e.split(nf).map(i=>{let s=sy(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=e1(s,t,r),u=a.length,d;if(!u)throw new Error("empty label");let c=o.output=a.flat();if(Z8(c),!(o.emoji=u>1||a[0].is_emoji)&&c.every(h=>h<128))W8(c),d="ASCII";else{let h=a.flatMap(m=>m.is_emoji?[]:m);if(!h.length)d="Emoji";else{if(qs.has(c[0]))throw Yc("leading combining mark");for(let _=1;_o.has(a)):sf(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(s=>nu(i,s)))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}}function tU(e){let t=Ca;for(let r of e){let n=t.filter(i=>nu(i,r));if(!n.length)throw Ca.some(i=>nu(i,r))?$R(t[0],r):YR(r);if(t=n,n.length==1)break}return t}function XR(e){return e.map(({input:t,error:r,output:n})=>{if(r){let i=r.message;throw new Error(e.length==1?i:`Invalid label ${cy(iu(t,63))}: ${i}`)}return Ki(n)}).join(nf)}function YR(e){return new Error(`disallowed character: ${ay(e)}`)}function $R(e,t){let r=ay(t),n=Ca.find(i=>i.P.has(t));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function Yc(e){return new Error(`illegal placement: ${e}`)}function rU(e,t){for(let r of t)if(!nu(e,r))throw $R(e,r);if(e.M){let r=af(t);for(let n=1,i=r.length;nBR)throw new Error(`excessive non-spacing marks: ${cy(iu(r.slice(n-1,s)))} (${s-n}/${BR})`);n=s}}}function e1(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let s=t1(e);if(s)i.length&&(n.push(t(i)),i=[]),n.push(r(s));else{let o=e.pop();if(Qi.has(o))i.push(o);else{let a=of.get(o);if(a)i.push(...a);else if(!oy.has(o))throw YR(o)}}}return i.length&&n.push(t(i)),n}function cf(e){return e.filter(t=>t!=ZR)}function t1(e,t){let r=iy,n,i=e.length;for(;i&&(r=r.get(e[--i]),!!r);){let{V:s}=r;s&&(n=s,t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}var $c="valid",r1="mapped",Xg="ignored",nU="disallowed",iU="emoji",sU="nfc",oU="stop";function n1(e,{nf:t=!0}={}){ka();let r=sy(e).reverse(),n=[],i=[];for(;r.length;){let s=t1(r,n);if(s)i.push({type:iU,emoji:s.slice(),input:n,cps:cf(s)}),n=[];else{let o=r.pop();if(o==V8)i.push({type:oU,cp:o});else if(Qi.has(o))i.push({type:$c,cps:[o]});else if(oy.has(o))i.push({type:Xg,cp:o});else{let a=of.get(o);a?i.push({type:r1,cp:o,cps:a.slice()}):i.push({type:nU,cp:o})}}}if(t)for(let s=0,o=-1;sYg(h.type)?h.cps:[]),l=Ma(c);HR(l,c)?(i.splice(o,u-o,{type:sU,input:c,cps:l,tokens0:MR(d),tokens:n1(Ki(l),{nf:!1})}),s=o):s=u-1,o=-1}else o=s;else a.type!==Xg&&(o=-1)}return MR(i)}function Yg(e){return e==$c||e==r1}function NR(e){return e.some(t=>KR.has(t))}function MR(e){for(let t=0;tn.cps)})}return e}jr.ens_beautify=X8;jr.ens_emoji=Q8;jr.ens_normalize=J8;jr.ens_normalize_fragment=K8;jr.ens_split=$8;jr.ens_tokenize=n1;jr.is_combining_mark=JR;jr.nfc=Ma;jr.nfd=af;jr.safe_str_from_cps=iu;jr.should_escape=uy});var ly=f(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.namehash=Hs.normalize=void 0;var s1=G(),aU=i1(),cU=e=>(0,aU.ens_normalize)(e);Hs.normalize=cU;var uU=e=>{let t="";for(let r=0;r<32;r+=1)t+="00";if(e){let n=(0,Hs.normalize)(e).split(".");for(let i=n.length-1;i>=0;i-=1){let s=(0,s1.sha3Raw)(n[i]).slice(2);t=(0,s1.sha3Raw)(`0x${t}${s}`).slice(2)}}return`0x${t}`};Hs.namehash=uU});var a1=f(ja=>{"use strict";var uf=ja&&ja.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ja,"__esModule",{value:!0});ja.Registry=void 0;var o1=Kc(),dU=PR(),lU=SR(),fU=Jc(),df=ly(),fy=class{constructor(t,r){this.contract=new o1.Contract(dU.ENSRegistryAbi,r??fU.registryAddresses.main,t),this.context=t}getOwner(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.owner((0,df.namehash)(t)).call()}catch{throw new Error}})}getTTL(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.ttl((0,df.namehash)(t)).call()}catch{throw new Error}})}recordExists(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.recordExists((0,df.namehash)(t)).call()}catch{throw new Error}})}getResolver(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.resolver((0,df.namehash)(t)).call().then(r=>{if(typeof r=="string")return new o1.Contract(lU.PublicResolverAbi,r,this.context);throw new Error})}catch{throw new Error}})}get events(){return this.contract.events}};ja.Registry=fy});var d1=f(La=>{"use strict";var Yn=La&&La.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(La,"__esModule",{value:!0});La.Resolver=void 0;var c1=V(),u1=G(),hU=be(),Ji=Jc(),Da=ly(),hy=class{constructor(t){this.registry=t}getResolverContractAdapter(t){return Yn(this,void 0,void 0,function*(){return this.registry.getResolver(t)})}checkInterfaceSupport(t,r){var n,i;return Yn(this,void 0,void 0,function*(){if((0,u1.isNullish)(Ji.interfaceIds[r]))throw new c1.ResolverMethodMissingError((n=t.options.address)!==null&&n!==void 0?n:"",r);if(!(yield t.methods.supportsInterface(Ji.interfaceIds[r]).call()))throw new c1.ResolverMethodMissingError((i=t.options.address)!==null&&i!==void 0?i:"",r)})}supportsInterface(t,r){var n;return Yn(this,void 0,void 0,function*(){let i=yield this.getResolverContractAdapter(t),s=r;if(!(0,hU.isHexStrict)(s)){if(s=(n=(0,u1.sha3)(r))!==null&&n!==void 0?n:"",r==="")throw new Error("Invalid interface Id");s=s.slice(0,10)}return i.methods.supportsInterface(s).call()})}getAddress(t,r=60){return Yn(this,void 0,void 0,function*(){let n=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(n,Ji.methodsInInterface.addr),n.methods.addr((0,Da.namehash)(t),r).call()})}getPubkey(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.pubkey),r.methods.pubkey((0,Da.namehash)(t)).call()})}getContenthash(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.contenthash),r.methods.contenthash((0,Da.namehash)(t)).call()})}setAddress(t,r,n){return Yn(this,void 0,void 0,function*(){let i=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(i,Ji.methodsInInterface.setAddr),i.methods.setAddr((0,Da.namehash)(t),r).send(n)})}getText(t,r){return Yn(this,void 0,void 0,function*(){let n=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(n,Ji.methodsInInterface.text),n.methods.text((0,Da.namehash)(t),r).call()})}getName(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.name),r.methods.name((0,Da.namehash)(t)).call()})}};La.Resolver=hy});var f1=f(qa=>{"use strict";var Dr=qa&&qa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(qa,"__esModule",{value:!0});qa.ENS=void 0;var pU=Or(),l1=V(),mU=Yr(),_U=sa(),gU=Pe(),py=Jc(),yU=a1(),bU=d1(),my=class extends pU.Web3Context{constructor(t,r){super(r??""),this.registryAddress=t??py.registryAddresses.main,this._registry=new yU.Registry(this.getContextObject(),t),this._resolver=new bU.Resolver(this._registry)}getResolver(t){return Dr(this,void 0,void 0,function*(){return this._registry.getResolver(t)})}recordExists(t){return Dr(this,void 0,void 0,function*(){return this._registry.recordExists(t)})}getTTL(t){return Dr(this,void 0,void 0,function*(){return this._registry.getTTL(t)})}getOwner(t){return Dr(this,void 0,void 0,function*(){return this._registry.getOwner(t)})}getAddress(t,r=60){return Dr(this,void 0,void 0,function*(){return this._resolver.getAddress(t,r)})}getText(t,r){return Dr(this,void 0,void 0,function*(){return this._resolver.getText(t,r)})}getName(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getName(t)})}getPubkey(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getPubkey(t)})}getContenthash(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getContenthash(t)})}checkNetwork(){return Dr(this,void 0,void 0,function*(){let t=Date.now()/1e3;if(!this._lastSyncCheck||t-this._lastSyncCheck>3600){let i=yield(0,mU.isSyncing)(this);if(!(typeof i=="boolean"&&!i))throw new l1.ENSNetworkNotSyncedError;this._lastSyncCheck=t}if(this._detectedAddress)return this._detectedAddress;let r=yield(0,_U.getId)(this,Object.assign(Object.assign({},this.defaultReturnFormat),{number:gU.FMT_NUMBER.HEX})),n=py.registryAddresses[py.networkIds[r]];if(typeof n>"u")throw new l1.ENSUnsupportedNetworkError(r);return this._detectedAddress=n,this._detectedAddress})}supportsInterface(t,r){return Dr(this,void 0,void 0,function*(){return this._resolver.supportsInterface(t,r)})}get events(){return this._registry.events}setAddress(t,r,n){return Dr(this,void 0,void 0,function*(){return this._resolver.setAddress(t,r,n)})}};qa.ENS=my});var _y=f($n=>{"use strict";var vU=$n&&$n.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),AU=$n&&$n.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&vU(t,e,r)};Object.defineProperty($n,"__esModule",{value:!0});$n.registryAddresses=void 0;var EU=Jc();Object.defineProperty($n,"registryAddresses",{enumerable:!0,get:function(){return EU.registryAddresses}});AU(f1(),$n)});var m1=f(ut=>{"use strict";var ei=ut&&ut.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ut,"__esModule",{value:!0});ut.ecRecover=ut.sign=ut.signTransaction=ut.sendTransaction=ut.importRawKey=ut.lockAccount=ut.unlockAccount=ut.newAccount=ut.getAccounts=void 0;var lf=G(),h1=Yr(),p1=Pe(),Xi=be(),ti=qi(),TU=e=>ei(void 0,void 0,void 0,function*(){return(yield ti.personalRpcMethods.getAccounts(e)).map(lf.toChecksumAddress)});ut.getAccounts=TU;var wU=(e,t)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string"],[t]);let r=yield ti.personalRpcMethods.newAccount(e,t);return(0,lf.toChecksumAddress)(r)});ut.newAccount=wU;var IU=(e,t,r,n)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["address","string","uint"],[t,r,n]),ti.personalRpcMethods.unlockAccount(e,t,r,n)});ut.unlockAccount=IU;var RU=(e,t)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["address"],[t]),ti.personalRpcMethods.lockAccount(e,t)});ut.lockAccount=RU;var PU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["string","string"],[t,r]),ti.personalRpcMethods.importRawKey(e,t,r)});ut.importRawKey=PU;var SU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){let n=(0,h1.formatTransaction)(t,p1.ETH_DATA_FORMAT);return ti.personalRpcMethods.sendTransaction(e,n,r)});ut.sendTransaction=SU;var xU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){let n=(0,h1.formatTransaction)(t,p1.ETH_DATA_FORMAT);return ti.personalRpcMethods.signTransaction(e,n,r)});ut.signTransaction=xU;var BU=(e,t,r,n)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string","address","string"],[t,r,n]);let i=(0,Xi.isHexStrict)(t)?t:(0,lf.utf8ToHex)(t);return ti.personalRpcMethods.sign(e,i,r,n)});ut.sign=BU;var OU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string","string"],[t,r]);let n=(0,Xi.isHexStrict)(t)?t:(0,lf.utf8ToHex)(t);return ti.personalRpcMethods.ecRecover(e,n,r)});ut.ecRecover=OU});var yy=f(Lr=>{"use strict";var CU=Lr&&Lr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),NU=Lr&&Lr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),MU=Lr&&Lr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&CU(t,e,r);return NU(t,e),t},ri=Lr&&Lr.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.Personal=void 0;var kU=Or(),ni=MU(m1()),gy=class extends kU.Web3Context{getAccounts(){return ri(this,void 0,void 0,function*(){return ni.getAccounts(this.requestManager)})}newAccount(t){return ri(this,void 0,void 0,function*(){return ni.newAccount(this.requestManager,t)})}unlockAccount(t,r,n){return ri(this,void 0,void 0,function*(){return ni.unlockAccount(this.requestManager,t,r,n)})}lockAccount(t){return ri(this,void 0,void 0,function*(){return ni.lockAccount(this.requestManager,t)})}importRawKey(t,r){return ri(this,void 0,void 0,function*(){return ni.importRawKey(this.requestManager,t,r)})}sendTransaction(t,r){return ri(this,void 0,void 0,function*(){return ni.sendTransaction(this.requestManager,t,r)})}signTransaction(t,r){return ri(this,void 0,void 0,function*(){return ni.signTransaction(this.requestManager,t,r)})}sign(t,r,n){return ri(this,void 0,void 0,function*(){return ni.sign(this.requestManager,t,r,n)})}ecRecover(t,r){return ri(this,void 0,void 0,function*(){return ni.ecRecover(this.requestManager,t,r)})}};Lr.Personal=gy});var ff=f(Yi=>{"use strict";var jU=Yi&&Yi.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),DU=Yi&&Yi.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&jU(t,e,r)};Object.defineProperty(Yi,"__esModule",{value:!0});var LU=yy();DU(yy(),Yi);Yi.default=LU.Personal});var _1=f(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var $i=ks();by.default={encodeEventSignature:$i.encodeEventSignature,encodeFunctionCall:$i.encodeFunctionCall,encodeFunctionSignature:$i.encodeFunctionSignature,encodeParameter:$i.encodeParameter,encodeParameters:$i.encodeParameters,decodeParameter:$i.decodeParameter,decodeParameters:$i.decodeParameters,decodeLog:$i.decodeLog}});var g1=f(Ha=>{"use strict";var su=Ha&&Ha.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.initAccountsForContext=void 0;var qU=Pe(),HU=G(),UU=Yr(),gr=ji(),FU=e=>{let t=(o,a)=>su(void 0,void 0,void 0,function*(){let u=yield(0,UU.prepareTransactionForSigning)(o,e),d=(0,HU.format)({format:"bytes"},a,qU.ETH_DATA_FORMAT);return(0,gr.signTransaction)(u,d)}),r=o=>{let a=(0,gr.privateKeyToAccount)(o);return Object.assign(Object.assign({},a),{signTransaction:u=>su(void 0,void 0,void 0,function*(){return t(u,a.privateKey)})})},n=(o,a,u)=>su(void 0,void 0,void 0,function*(){var d;let c=yield(0,gr.decrypt)(o,a,(d=u?.nonStrict)!==null&&d!==void 0?d:!0);return Object.assign(Object.assign({},c),{signTransaction:l=>su(void 0,void 0,void 0,function*(){return t(l,c.privateKey)})})}),i=()=>{let o=(0,gr.create)();return Object.assign(Object.assign({},o),{signTransaction:a=>su(void 0,void 0,void 0,function*(){return t(a,o.privateKey)})})},s=new gr.Wallet({create:i,privateKeyToAccount:r,decrypt:n});return{signTransaction:t,create:i,privateKeyToAccount:r,decrypt:n,recoverTransaction:gr.recoverTransaction,hashMessage:gr.hashMessage,sign:gr.sign,recover:gr.recover,encrypt:gr.encrypt,wallet:s,privateKeyToAddress:gr.privateKeyToAddress,parseAndValidatePrivateKey:gr.parseAndValidatePrivateKey,privateKeyToPublicKey:gr.privateKeyToPublicKey}};Ha.initAccountsForContext=FU});var y1=f(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.Web3PkgInfo=void 0;hf.Web3PkgInfo={version:"4.9.0"}});var Ay=f(ht=>{"use strict";var GU=ht&&ht.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ht,"__esModule",{value:!0});ht.onNewProviderDiscovered=ht.requestEIP6963Providers=ht.web3ProvidersMapUpdated=ht.eip6963ProvidersMap=ht.Eip6963EventName=void 0;var vy;(function(e){e.eip6963announceProvider="eip6963:announceProvider",e.eip6963requestProvider="eip6963:requestProvider"})(vy=ht.Eip6963EventName||(ht.Eip6963EventName={}));ht.eip6963ProvidersMap=new Map;ht.web3ProvidersMapUpdated="web3:providersMapUpdated";var VU=()=>GU(void 0,void 0,void 0,function*(){return new Promise((e,t)=>{typeof window>"u"&&t(new Error("window object not available, EIP-6963 is intended to be used within a browser")),window.addEventListener(vy.eip6963announceProvider,r=>{ht.eip6963ProvidersMap.set(r.detail.info.uuid,r.detail);let n=new CustomEvent(ht.web3ProvidersMapUpdated,{detail:ht.eip6963ProvidersMap});window.dispatchEvent(n),e(ht.eip6963ProvidersMap)}),window.dispatchEvent(new Event(vy.eip6963requestProvider))})});ht.requestEIP6963Providers=VU;var WU=e=>{if(typeof window>"u")throw new Error("window object not available, EIP-6963 is intended to be used within a browser");window.addEventListener(ht.web3ProvidersMapUpdated,e)};ht.onNewProviderDiscovered=WU});var R1=f(yr=>{"use strict";var ZU=yr&&yr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),zU=yr&&yr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),QU=yr&&yr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ZU(t,e,r);return zU(t,e),t},v1=yr&&yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0});yr.Web3=void 0;var Ua=Or(),Ey=Yr(),KU=v1(Kc()),Ty=_y(),A1=jc(),E1=ff(),T1=sa(),w1=QU(G()),es=G(),b1=V(),JU=v1(_1()),XU=g1(),YU=y1(),I1=Ay(),ii=class extends Ua.Web3Context{constructor(t){var r;((0,es.isNullish)(t)||typeof t=="string"&&t.trim()===""||typeof t!="string"&&!(0,Ua.isSupportedProvider)(t)&&!t.provider)&&console.warn("NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!");let n={};typeof t=="string"||(0,Ua.isSupportedProvider)(t)?n.provider=t:t?n=t:n={},n.registeredSubscriptions=Object.assign(Object.assign({},Ey.registeredSubscriptions),(r=n.registeredSubscriptions)!==null&&r!==void 0?r:{}),super(n);let i=(0,XU.initAccountsForContext)(this);this._wallet=i.wallet,this._accountProvider=i,this.utils=w1;let s=this;class o extends KU.default{constructor(d,c,l,h,m){if((0,es.isContractInitOptions)(c)&&(0,es.isContractInitOptions)(l))throw new b1.InvalidMethodParamsError("Should not provide options at both 2nd and 3rd parameters");let b,_={},y,v;if(!(0,es.isNullish)(c)&&typeof c!="object"&&typeof c!="string")throw new b1.InvalidMethodParamsError;typeof c=="string"&&(b=c),(0,es.isContractInitOptions)(c)?_=c:(0,es.isContractInitOptions)(l)?_=l:_={},c instanceof Ua.Web3Context?y=c:l instanceof Ua.Web3Context?y=l:h instanceof Ua.Web3Context?y=h:y=s.getContextObject(),m?v=m:(0,es.isDataFormat)(l)?v=l:(0,es.isDataFormat)(h)&&(v=h),super(d,b,_,y,v),super.subscribeToContextEvents(s)}}let a=s.use(Ey.Web3Eth);this.eth=Object.assign(a,{ens:s.use(Ty.ENS,Ty.registryAddresses.main),Iban:A1.Iban,net:s.use(T1.Net),personal:s.use(E1.Personal),Contract:o,abi:JU.default,accounts:i})}};yr.Web3=ii;ii.version=YU.Web3PkgInfo.version;ii.utils=w1;ii.requestEIP6963Providers=I1.requestEIP6963Providers;ii.onNewProviderDiscovered=I1.onNewProviderDiscovered;ii.modules={Web3Eth:Ey.Web3Eth,Iban:A1.Iban,Net:T1.Net,ENS:Ty.ENS,Personal:E1.Personal};yr.default=ii});var S1=f(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0})});var B1=f(et=>{"use strict";var x1=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),$U=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),eF=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&x1(t,e,r)},Fa=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&x1(t,e,r);return $U(t,e),t};Object.defineProperty(et,"__esModule",{value:!0});et.iban=et.personal=et.ens=et.contract=et.accounts=et.abi=void 0;eF(Yr(),et);et.abi=Fa(ks());et.accounts=Fa(ji());et.contract=Fa(Kc());et.ens=Fa(_y());et.personal=Fa(ff());et.iban=Fa(jc())});var M1=f(gt=>{"use strict";var O1=gt&>.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),tF=gt&>.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C1=gt&>.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&O1(t,e,r);return tF(t,e),t},rF=gt&>.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&O1(t,e,r)};Object.defineProperty(gt,"__esModule",{value:!0});gt.ws=gt.http=gt.SocketProvider=gt.Eip1193Provider=void 0;var N1=G();Object.defineProperty(gt,"Eip1193Provider",{enumerable:!0,get:function(){return N1.Eip1193Provider}});Object.defineProperty(gt,"SocketProvider",{enumerable:!0,get:function(){return N1.SocketProvider}});gt.http=C1(bd());gt.ws=C1(Ad());rF(Ay(),gt)});var Iy=f(z=>{"use strict";var k1=z&&z.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),nF=z&&z.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wy=z&&z.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&k1(t,e,r)},si=z&&z.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&k1(t,e,r);return nF(t,e),t},iF=z&&z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(z,"__esModule",{value:!0});z.validator=z.utils=z.types=z.rpcMethods=z.providers=z.net=z.eth=z.errors=z.core=z.Web3Validator=z.WebSocketProvider=z.HttpProvider=z.Net=z.Personal=z.Iban=z.Contract=z.Web3Eth=z.Web3PromiEvent=z.Web3EthPluginBase=z.Web3PluginBase=z.Web3Context=z.Web3=void 0;var j1=iF(R1());z.Web3=j1.default;wy(S1(),z);z.default=j1.default;var pf=Or();Object.defineProperty(z,"Web3Context",{enumerable:!0,get:function(){return pf.Web3Context}});Object.defineProperty(z,"Web3PluginBase",{enumerable:!0,get:function(){return pf.Web3PluginBase}});Object.defineProperty(z,"Web3EthPluginBase",{enumerable:!0,get:function(){return pf.Web3EthPluginBase}});Object.defineProperty(z,"Web3PromiEvent",{enumerable:!0,get:function(){return pf.Web3PromiEvent}});var sF=Yr();Object.defineProperty(z,"Web3Eth",{enumerable:!0,get:function(){return sF.Web3Eth}});var oF=Kc();Object.defineProperty(z,"Contract",{enumerable:!0,get:function(){return oF.Contract}});var aF=jc();Object.defineProperty(z,"Iban",{enumerable:!0,get:function(){return aF.Iban}});var cF=ff();Object.defineProperty(z,"Personal",{enumerable:!0,get:function(){return cF.Personal}});var uF=sa();Object.defineProperty(z,"Net",{enumerable:!0,get:function(){return uF.Net}});var dF=bd();Object.defineProperty(z,"HttpProvider",{enumerable:!0,get:function(){return dF.HttpProvider}});var lF=Ad();Object.defineProperty(z,"WebSocketProvider",{enumerable:!0,get:function(){return lF.WebSocketProvider}});var fF=be();Object.defineProperty(z,"Web3Validator",{enumerable:!0,get:function(){return fF.Web3Validator}});z.core=si(Or());z.errors=si(V());z.eth=si(B1());z.net=si(sa());z.providers=si(M1());z.rpcMethods=si(qi());z.types=si(Pe());z.utils=si(G());z.validator=si(be());wy(V(),z);wy(Pe(),z)});var D1=f(ou=>{"use strict";var hF=ou&&ou.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ou,"__esModule",{value:!0});var pF=hF(Iy()),mF=e=>new pF.default(e);ou.default=mF});var L1=f(au=>{"use strict";var _F=au&&au.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(au,"__esModule",{value:!0});var gF=(e,t,r)=>{let n=e.slice(2,10),i=t.methodIDs[n];if(i){let s=r.eth.abi.decodeParameters(i.inputs,e.slice(10)),o={name:i.name,params:[]};for(let a=0;anew b.toString):d=u.toString()),h&&(Array.isArray(u)?d=u.map(b=>b.toLowerCase()):d=u.toLowerCase()),o.params.push({name:i.inputs[a].name,value:d,type:i.inputs[a].type})}return o}return null},yF=(e,t,r)=>_F(void 0,void 0,void 0,function*(){var n,i;let s;if(e?.data!=null&&e?.data!=null?s=e.data:s=JSON.parse(e.message.slice(e.message.indexOf("{"),e.message.lastIndexOf("}")+1)),s?.originalError){if(((n=s.originalError)===null||n===void 0?void 0:n.data)!=null&&((i=s.originalError)===null||i===void 0?void 0:i.data)!=null){let o=gF(s.originalError.data,t,r);if(console.log(o),o)return o}return s.originalError.message}return s});au.default=yF});var q1=f(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});var bF={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input or Insufficient Funds."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-1193",message:"Unrecognized Chain ID / Chain not found."}};Ry.default=bF});var Sy=f(Us=>{"use strict";var vF=Us&&Us.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},AF=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});var Py=AF(q1()),EF=(e,t)=>vF(void 0,void 0,void 0,function*(){if(e&&e?.code){let o=Py.default===null||Py.default===void 0?void 0:Py.default[e.code];return o?o.message:e.code==="ACTION_REJECTED"?"User rejected signing":e.message}let r=e?.toString();if(r&&r?.startsWith("Error: Transaction has been reverted by the EVM:")){let o=e.message.slice(42),u=JSON.parse(o).transactionHash;try{let d=yield t.eth.getTransaction(u);var n=yield t.eth.call(d);if(n=n.startsWith("0x")?n:`0x${n}`,n&&n.substring(138)){let c=t.utils.toAscii(n.substring(138));return console.log("Revert reason:",c),c}else console.log("Cannot get reason")}catch(d){var i=d.toString();if(i&&i.startsWith("Error")){var s=i.slice(i.indexOf("{"),i.length);if(s.indexOf("{")!==-1&&s.lastIndexOf("}"))return s=JSON.parse(s),s.message}}}return null});Us.default=EF});var H1=f(Fs=>{"use strict";var TF=Fs&&Fs.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},wF=Fs&&Fs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fs,"__esModule",{value:!0});var IF=wF(Sy()),RF=(e,t)=>TF(void 0,void 0,void 0,function*(){let r=e.message;typeof e.message!="string"&&(r=e.message.toString());let n=r.slice(r.indexOf("{"),r.length);return n.indexOf("{")!==-1&&n.lastIndexOf("}")?(n=JSON.parse(n),yield(0,IF.default)(n,t)):null});Fs.default=RF});var U1=f(Gs=>{"use strict";var PF=Gs&&Gs.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},xy=Gs&&Gs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gs,"__esModule",{value:!0});var SF=xy(L1()),xF=xy(H1()),BF=xy(Sy()),OF=(e,t,r)=>PF(void 0,void 0,void 0,function*(){var n,i,s,o;let a="Something went wrong. Please try again later.",u;if(e?.message&&(!((n=e.message)===null||n===void 0)&&n.includes("Internal JSON-RPC error."))?u=yield(0,xF.default)(e,t):e?.message&&(!((i=e.message)===null||i===void 0)&&i.includes("execution reverted:"))&&((s=e.message)===null||s===void 0?void 0:s.indexOf("{"))!==-1||e?.data!=null&&e?.data!=null?u=yield(0,SF.default)(e,r,t):e?.message&&(!((o=e.message)===null||o===void 0)&&o.includes("execution reverted:"))&&(u=e.message.slice(e.message.indexOf("execution reverted:"),e.message.length)),!u){let d=(0,BF.default)(e,t);d&&(u=d)}return u||a}),CF=(e,t,r)=>new Promise((n,i)=>{OF(e,t,r).then(s=>{n(s)}).catch(s=>{i(s)})});Gs.default=CF});var F1=f(cu=>{"use strict";var NF=cu&&cu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(cu,"__esModule",{value:!0});var MF=Iy();function kF(e){var t,r;return!((t=e?.innerError)===null||t===void 0)&&t.errorSignature||e.innerError||!((r=e?.data)===null||r===void 0)&&r.data.startsWith("0x")&&(e.innerError=new MF.Eip838ExecutionError(e.data)),e.innerError}var jF=(e,t)=>NF(void 0,void 0,void 0,function*(){let r=yield t.eth.getTransaction(e);r.gasPrice&&(delete r.maxPriorityFeePerGas,delete r.maxFeePerGas);try{return yield t.eth.call(r,r.blockNumber),"Success Tx"}catch(n){if(n?.innerError){let s=kF(n);return typeof s=="object"?s?.message?s.message:JSON.stringify(s):s}let i=n.toString();if(i&&i.startsWith("Error")){let s=i.slice(i.indexOf("{"),i.length);if(s.indexOf("{")!==-1&&s.lastIndexOf("}"))return s=JSON.parse(s),s.message}if(n?.message)return n.message}return"Reverted without reason"}),DF=(e,t)=>new Promise((r,n)=>{jF(e,t).then(i=>{r(i)}).catch(i=>{n(i)})});cu.default=DF});var V1=f(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});var G1=e=>e.type==="tuple"?"("+e.components.map(G1).join(",")+")":e.type,LF=(e,t)=>{let r={};return e.map(n=>{if(Array.isArray(n))n.map(function(i){if(i.name){let s=t.utils.sha3(i.name+"("+i.inputs.map(G1).join(",")+")");i.type==="event"?r[s.slice(2)]=i:r[s.slice(2,10)]=i}});else throw new Error("Expected ABI array, one or more got "+typeof n)}),r};By.default=LF});var W1=f(Ga=>{"use strict";var mf=Ga&&Ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.Web3errors=void 0;var qF=mf(D1()),HF=mf(U1()),UF=mf(F1()),FF=mf(V1()),Oy=class{constructor(t,r){if(this.state={savedABIs:[],methodIDs:{}},this.getErrorMessage=n=>(0,HF.default)(n,this.web3,this.state),this.getErrOfTx=n=>(0,UF.default)(n,this.web3),!t)throw new Error("RPC URL or Provider is required");this.web3=(0,qF.default)(t),r&&r?.length>0&&(this.state.methodIDs=(0,FF.default)(r,this.web3),this.state.savedABIs=this.state.savedABIs.concat(r))}};Ga.Web3errors=Oy});var WF=f(Vs=>{var GF=Vs&&Vs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),VF=Vs&&Vs.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&GF(t,e,r)};Object.defineProperty(Vs,"__esModule",{value:!0});VF(W1(),Vs)});WF();})(); + The first one will be used: ${l.methodNameWithInputs}`)),_.length===m.length)throw new Xn.Web3ValidatorError(_)}let b={arguments:d,call:(_,y)=>Zi(this,void 0,void 0,function*(){return this._contractMethodCall(l,d,h,_,y)}),send:_=>this._contractMethodSend(l,d,h,_),estimateGas:(_,y=this.defaultReturnFormat)=>Zi(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:l,params:d,returnFormat:y,options:_})}),encodeABI:()=>(0,zi.encodeMethodABI)(l,d),decodeData:_=>(0,zi.decodeMethodParams)(l,_),createAccessList:(_,y)=>Zi(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(l,d,h,_,y)})};return l.stateMutability==="payable",b}}_contractMethodCall(t,r,n,i,s){var o;return Zi(this,void 0,void 0,function*(){let a=(0,Ls.getEthTxCallParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{let u=yield(0,_r.call)(this,a,s,this.defaultReturnFormat);return(0,zi.decodeMethodReturn)(t,u)}catch(u){throw u instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,u.cause),u}})}_contractMethodCreateAccessList(t,r,n,i,s){var o;return Zi(this,void 0,void 0,function*(){let a=(0,Ls.getCreateAccessListParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{return(0,_r.createAccessList)(this,a,s,this.defaultReturnFormat)}catch(u){throw u instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,u.cause),u}})}_contractMethodSend(t,r,n,i,s){var o,a;let u=s??this.options;u=Object.assign(Object.assign({},u),{input:void 0,from:(a=(o=u.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&a!==void 0?a:void 0});let d=(0,Ls.getSendTxParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:u}),c=(0,_r.sendTransaction)(this,d,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface});return c.on("error",l=>{l instanceof $r.ContractExecutionError&&(0,mr.decodeContractErrorData)(n,l.cause)}),c}_contractMethodDeploySend(t,r,n,i){var s,o;let a=i??this.options;a=Object.assign(Object.assign({},a),{from:(o=(s=a.from)!==null&&s!==void 0?s:this.defaultAccount)!==null&&o!==void 0?o:void 0});let u=(0,Ls.getSendTxParams)({abi:t,params:r,options:Object.assign(Object.assign({},n),{dataInputFill:this.contractDataInputFill}),contractOptions:a});return(0,_r.sendTransaction)(this,u,this.defaultReturnFormat,{transactionResolver:d=>{if(d.status===BigInt(0))throw new $r.Web3ContractError("code couldn't be stored",d);let c=this.clone();return c.options.address=d.contractAddress,c},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:r,returnFormat:n,options:i,contractOptions:s}){return Zi(this,void 0,void 0,function*(){let o=(0,Ls.getEstimateGasParams)({abi:t,params:r,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:s??this.options});return(0,_r.estimateGas)(this,o,zg.BlockTags.LATEST,n??this.defaultReturnFormat)})}_createContractEvent(t,r=this.defaultReturnFormat){return(...n)=>{var i;let{topics:s,fromBlock:o}=(0,zi.encodeEventABI)(this.options,t,n[0]),a=new wR.LogsSubscription({address:this.options.address,topics:s,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:r});return(0,Xn.isNullish)(o)||this.getPastEvents(t.name,{fromBlock:o,topics:s},r).then(u=>{u&&u.forEach(d=>a.emit("data",d))}).catch(u=>{a.emit("error",new $r.SubscriptionError("Failed to get past events.",u))}),(i=this.subscriptionManager)===null||i===void 0||i.addSubscription(a).catch(u=>{a.emit("error",new $r.SubscriptionError("Failed to subscribe.",u))}),a}}subscribeToContextEvents(t){let r=this;this.context=t,r.syncWithContext&&t.on(zc.Web3ConfigEvent.CONFIG_CHANGE,n=>{r.setConfig({[n.name]:n.newValue})})}};Ba.Contract=Qg});var RR=f(IR=>{"use strict";Object.defineProperty(IR,"__esModule",{value:!0})});var Kc=f(kr=>{"use strict";var T8=kr&&kr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),Qc=kr&&kr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&T8(t,e,r)};Object.defineProperty(kr,"__esModule",{value:!0});var w8=Kg();Qc(zl(),kr);Qc(Kg(),kr);Qc(Vg(),kr);Qc(RR(),kr);Qc(Zg(),kr);kr.default=w8.Contract});var Jc=f(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.networkIds=Rn.registryAddresses=Rn.methodsInInterface=Rn.interfaceIds=void 0;Rn.interfaceIds={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"};Rn.methodsInInterface={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash",text:"text",name:"name"};Rn.registryAddresses={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"};Rn.networkIds={"0x1":"main","0x5":"goerli"}});var PR=f(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.ENSRegistryAbi=void 0;Jl.ENSRegistryAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}]});var SR=f(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.PublicResolverAbi=void 0;Xl.PublicResolverAbi=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"DNSZoneCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}]});var i1=f(jr=>{"use strict";var I8="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5Mx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yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI",xR=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),BR=4;function R8(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,s=[0,1];for(let P=1;P>--u&1}let l=31,h=2**l,m=h>>>1,b=m>>1,_=h-1,y=0;for(let P=0;P1;){let q=M+w>>>1;P>>1|c(),S=S<<1^m,C=(C^m)<<1|m|1;E=S,I=1+C-S}let x=n-4;return v.map(P=>{switch(P-x){case 3:return x+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return x+256+(e[a++]<<8|e[a++]);case 1:return x+e[a++];default:return P-1}})}function P8(e){let t=0;return()=>e[t++]}function kR(e){return P8(R8(S8(e)))}function S8(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>t[i.charCodeAt(0)]=s);let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,s=0,o=0,a=0;i=8&&(n[s++]=a>>(o-=8));return n}function x8(e){return e&1?~e>>1:e>>1}function B8(e,t){let r=Array(e);for(let n=0,i=0;n{let t=eu(e);if(t.length)return t})}function DR(e){let t=[];for(;;){let r=e();if(r==0)break;t.push(O8(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(C8(r,e))}return t.flat()}function tu(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function LR(e,t,r){let n=Array(e).fill().map(()=>[]);for(let i=0;in[o].push(s));return n}function O8(e,t){let r=1+t(),n=t(),i=tu(t);return LR(i.length,1+e,t).flatMap((o,a)=>{let[u,...d]=o;return Array(i[a]).fill().map((c,l)=>{let h=l*n;return[u+l*r,d.map(m=>m+h)]})})}function C8(e,t){let r=1+t();return LR(r,1+e,t).map(i=>[i[0],i.slice(1)])}function N8(e){let t=[],r=eu(e);return i(n([]),[]),t;function n(s){let o=e(),a=tu(()=>{let u=eu(e).map(d=>r[d]);if(u.length)return n(u)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,u){if(!(s&4&&u===a[a.length-1])){s&2&&(u=a[a.length-1]),s&1&&t.push(a);for(let d of o)for(let c of d.Q)i(d,[...a,c],u)}}}function M8(e){return e.toString(16).toUpperCase().padStart(2,"0")}function qR(e){return`{${M8(e)}}`}function sy(e){let t=[];for(let r=0,n=e.length;r>24&255}function GR(e){return e&16777215}var $g,OR,ey,Yl;function U8(){let e=kR(k8);$g=new Map(jR(e).flatMap((t,r)=>t.map(n=>[n,r+1<<24]))),OR=new Set(eu(e)),ey=new Map,Yl=new Map;for(let[t,r]of DR(e)){if(!OR.has(t)&&r.length==2){let[n,i]=r,s=Yl.get(n);s||(s=new Map,Yl.set(n,s)),s.set(i,t)}ey.set(t,r.reverse())}}function VR(e){return e>=ru&&e=$l&&e=ef&&ttf&&t0&&i(tf+d)}else{let o=ey.get(s);o?r.push(...o):i(s)}if(!r.length)break;s=r.pop()}if(n&&t.length>1){let s=Xc(t[0]);for(let o=1;o0&&i>=o)o==0?(t.push(n,...r),r.length=0,n=a):r.push(a),i=o;else{let u=F8(n,a);u>=0?n=u:i==0&&o==0?(t.push(n),n=a):(r.push(a),i=o)}}return n>=0&&t.push(n,...r),t}function af(e){return WR(e).map(GR)}function Ma(e){return G8(WR(e))}var CR=45,V8=46,nf=".",ZR=65039,zR=1,sf=e=>Array.from(e);function nu(e,t){return e.P.has(t)||e.Q.has(t)}var ty=class extends Array{get is_emoji(){return!0}},of,oy,qs,ry,QR,KR,Ca,Jg,Oa,Qi,ny,iy;function ka(){if(of)return;let e=kR(I8),t=()=>eu(e),r=()=>new Set(t()),n=(c,l)=>l.forEach(h=>c.add(h));of=new Map(DR(e)),oy=r(),qs=t(),ry=new Set(t().map(c=>qs[c])),qs=new Set(qs),QR=r(),KR=r();let i=jR(e),s=e(),o=()=>{let c=new Set;return t().forEach(l=>n(c,i[l])),n(c,t()),c};Ca=tu(c=>{let l=tu(e).map(h=>h+96);if(l.length){let h=c>=s;l[0]-=32,l=Ki(l),h&&(l=`Restricted[${l}]`);let m=o(),b=o(),_=!e();return{N:l,P:m,Q:b,M:_,R:h}}}),Jg=r(),Oa=new Map;let a=t().concat(sf(Jg)).sort((c,l)=>c-l);a.forEach((c,l)=>{let h=e(),m=a[l]=h?a[l-h]:{V:[],M:new Map};m.V.push(c),Jg.has(c)||Oa.set(c,m)});for(let{V:c,M:l}of new Set(Oa.values())){let h=[];for(let b of c){let _=Ca.filter(v=>nu(v,b)),y=h.find(({G:v})=>_.some(E=>v.has(E)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(b),n(y.G,_)}let m=h.flatMap(b=>sf(b.G));for(let{G:b,V:_}of h){let y=new Set(m.filter(v=>!b.has(v)));for(let v of _)l.set(v,y)}}Qi=new Set;let u=new Set,d=c=>Qi.has(c)?u.add(c):Qi.add(c);for(let c of Ca){for(let l of c.P)d(l);for(let l of c.Q)d(l)}for(let c of Qi)!Oa.has(c)&&!u.has(c)&&Oa.set(c,zR);n(Qi,af(Qi)),ny=N8(e).map(c=>ty.from(c)).sort(HR),iy=new Map;for(let c of ny){let l=[iy];for(let h of c){let m=l.map(b=>{let _=b.get(h);return _||(_=new Map,b.set(h,_)),_});h===ZR?l.push(...m):l=m}for(let h of l)h.V=c}}function ay(e){return(uy(e)?"":`${cy(iu([e]))} `)+qR(e)}function cy(e){return`"${e}"\u200E`}function W8(e){if(e.length>=4&&e[2]==CR&&e[3]==CR)throw new Error(`invalid label extension: "${Ki(e.slice(0,4))}"`)}function Z8(e){for(let r=e.lastIndexOf(95);r>0;)if(e[--r]!==95)throw new Error("underscore allowed only at start")}function z8(e){let t=e[0],r=xR.get(t);if(r)throw Yc(`leading ${r}`);let n=e.length,i=-1;for(let s=1;st&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,s=e.length;for(let o=0;oe.slice())}function K8(e,t){ka();let r=t?af:Ma;return e.split(nf).map(n=>Ki(e1(sy(n),r,cf).flat())).join(nf)}function J8(e){return XR(dy(e,Ma,cf))}function X8(e){let t=dy(e,Ma,r=>r);for(let{type:r,output:n,error:i}of t){if(i)break;r!=="Greek"&&Y8(n,958,926)}return XR(t)}function Y8(e,t,r){let n=0;for(;;){let i=e.indexOf(t,n);if(i<0)break;e[i]=r,n=i+1}}function $8(e,t){return dy(e,Ma,t?r=>r.slice():cf)}function dy(e,t,r){if(!e)return[];ka();let n=0;return e.split(nf).map(i=>{let s=sy(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=e1(s,t,r),u=a.length,d;if(!u)throw new Error("empty label");let c=o.output=a.flat();if(Z8(c),!(o.emoji=u>1||a[0].is_emoji)&&c.every(h=>h<128))W8(c),d="ASCII";else{let h=a.flatMap(m=>m.is_emoji?[]:m);if(!h.length)d="Emoji";else{if(qs.has(c[0]))throw Yc("leading combining mark");for(let _=1;_o.has(a)):sf(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(s=>nu(i,s)))throw new Error(`whole-script confusable: ${e.N}/${i.N}`)}}function tU(e){let t=Ca;for(let r of e){let n=t.filter(i=>nu(i,r));if(!n.length)throw Ca.some(i=>nu(i,r))?$R(t[0],r):YR(r);if(t=n,n.length==1)break}return t}function XR(e){return e.map(({input:t,error:r,output:n})=>{if(r){let i=r.message;throw new Error(e.length==1?i:`Invalid label ${cy(iu(t,63))}: ${i}`)}return Ki(n)}).join(nf)}function YR(e){return new Error(`disallowed character: ${ay(e)}`)}function $R(e,t){let r=ay(t),n=Ca.find(i=>i.P.has(t));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function Yc(e){return new Error(`illegal placement: ${e}`)}function rU(e,t){for(let r of t)if(!nu(e,r))throw $R(e,r);if(e.M){let r=af(t);for(let n=1,i=r.length;nBR)throw new Error(`excessive non-spacing marks: ${cy(iu(r.slice(n-1,s)))} (${s-n}/${BR})`);n=s}}}function e1(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let s=t1(e);if(s)i.length&&(n.push(t(i)),i=[]),n.push(r(s));else{let o=e.pop();if(Qi.has(o))i.push(o);else{let a=of.get(o);if(a)i.push(...a);else if(!oy.has(o))throw YR(o)}}}return i.length&&n.push(t(i)),n}function cf(e){return e.filter(t=>t!=ZR)}function t1(e,t){let r=iy,n,i=e.length;for(;i&&(r=r.get(e[--i]),!!r);){let{V:s}=r;s&&(n=s,t&&t.push(...e.slice(i).reverse()),e.length=i)}return n}var $c="valid",r1="mapped",Xg="ignored",nU="disallowed",iU="emoji",sU="nfc",oU="stop";function n1(e,{nf:t=!0}={}){ka();let r=sy(e).reverse(),n=[],i=[];for(;r.length;){let s=t1(r,n);if(s)i.push({type:iU,emoji:s.slice(),input:n,cps:cf(s)}),n=[];else{let o=r.pop();if(o==V8)i.push({type:oU,cp:o});else if(Qi.has(o))i.push({type:$c,cps:[o]});else if(oy.has(o))i.push({type:Xg,cp:o});else{let a=of.get(o);a?i.push({type:r1,cp:o,cps:a.slice()}):i.push({type:nU,cp:o})}}}if(t)for(let s=0,o=-1;sYg(h.type)?h.cps:[]),l=Ma(c);HR(l,c)?(i.splice(o,u-o,{type:sU,input:c,cps:l,tokens0:MR(d),tokens:n1(Ki(l),{nf:!1})}),s=o):s=u-1,o=-1}else o=s;else a.type!==Xg&&(o=-1)}return MR(i)}function Yg(e){return e==$c||e==r1}function NR(e){return e.some(t=>KR.has(t))}function MR(e){for(let t=0;tn.cps)})}return e}jr.ens_beautify=X8;jr.ens_emoji=Q8;jr.ens_normalize=J8;jr.ens_normalize_fragment=K8;jr.ens_split=$8;jr.ens_tokenize=n1;jr.is_combining_mark=JR;jr.nfc=Ma;jr.nfd=af;jr.safe_str_from_cps=iu;jr.should_escape=uy});var ly=f(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.namehash=Hs.normalize=void 0;var s1=G(),aU=i1(),cU=e=>(0,aU.ens_normalize)(e);Hs.normalize=cU;var uU=e=>{let t="";for(let r=0;r<32;r+=1)t+="00";if(e){let n=(0,Hs.normalize)(e).split(".");for(let i=n.length-1;i>=0;i-=1){let s=(0,s1.sha3Raw)(n[i]).slice(2);t=(0,s1.sha3Raw)(`0x${t}${s}`).slice(2)}}return`0x${t}`};Hs.namehash=uU});var a1=f(ja=>{"use strict";var uf=ja&&ja.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ja,"__esModule",{value:!0});ja.Registry=void 0;var o1=Kc(),dU=PR(),lU=SR(),fU=Jc(),df=ly(),fy=class{constructor(t,r){this.contract=new o1.Contract(dU.ENSRegistryAbi,r??fU.registryAddresses.main,t),this.context=t}getOwner(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.owner((0,df.namehash)(t)).call()}catch{throw new Error}})}getTTL(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.ttl((0,df.namehash)(t)).call()}catch{throw new Error}})}recordExists(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.recordExists((0,df.namehash)(t)).call()}catch{throw new Error}})}getResolver(t){return uf(this,void 0,void 0,function*(){try{return this.contract.methods.resolver((0,df.namehash)(t)).call().then(r=>{if(typeof r=="string")return new o1.Contract(lU.PublicResolverAbi,r,this.context);throw new Error})}catch{throw new Error}})}get events(){return this.contract.events}};ja.Registry=fy});var d1=f(La=>{"use strict";var Yn=La&&La.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(La,"__esModule",{value:!0});La.Resolver=void 0;var c1=V(),u1=G(),hU=be(),Ji=Jc(),Da=ly(),hy=class{constructor(t){this.registry=t}getResolverContractAdapter(t){return Yn(this,void 0,void 0,function*(){return this.registry.getResolver(t)})}checkInterfaceSupport(t,r){var n,i;return Yn(this,void 0,void 0,function*(){if((0,u1.isNullish)(Ji.interfaceIds[r]))throw new c1.ResolverMethodMissingError((n=t.options.address)!==null&&n!==void 0?n:"",r);if(!(yield t.methods.supportsInterface(Ji.interfaceIds[r]).call()))throw new c1.ResolverMethodMissingError((i=t.options.address)!==null&&i!==void 0?i:"",r)})}supportsInterface(t,r){var n;return Yn(this,void 0,void 0,function*(){let i=yield this.getResolverContractAdapter(t),s=r;if(!(0,hU.isHexStrict)(s)){if(s=(n=(0,u1.sha3)(r))!==null&&n!==void 0?n:"",r==="")throw new Error("Invalid interface Id");s=s.slice(0,10)}return i.methods.supportsInterface(s).call()})}getAddress(t,r=60){return Yn(this,void 0,void 0,function*(){let n=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(n,Ji.methodsInInterface.addr),n.methods.addr((0,Da.namehash)(t),r).call()})}getPubkey(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.pubkey),r.methods.pubkey((0,Da.namehash)(t)).call()})}getContenthash(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.contenthash),r.methods.contenthash((0,Da.namehash)(t)).call()})}setAddress(t,r,n){return Yn(this,void 0,void 0,function*(){let i=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(i,Ji.methodsInInterface.setAddr),i.methods.setAddr((0,Da.namehash)(t),r).send(n)})}getText(t,r){return Yn(this,void 0,void 0,function*(){let n=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(n,Ji.methodsInInterface.text),n.methods.text((0,Da.namehash)(t),r).call()})}getName(t){return Yn(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,Ji.methodsInInterface.name),r.methods.name((0,Da.namehash)(t)).call()})}};La.Resolver=hy});var f1=f(qa=>{"use strict";var Dr=qa&&qa.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(qa,"__esModule",{value:!0});qa.ENS=void 0;var pU=Or(),l1=V(),mU=Yr(),_U=sa(),gU=Pe(),py=Jc(),yU=a1(),bU=d1(),my=class extends pU.Web3Context{constructor(t,r){super(r??""),this.registryAddress=t??py.registryAddresses.main,this._registry=new yU.Registry(this.getContextObject(),t),this._resolver=new bU.Resolver(this._registry)}getResolver(t){return Dr(this,void 0,void 0,function*(){return this._registry.getResolver(t)})}recordExists(t){return Dr(this,void 0,void 0,function*(){return this._registry.recordExists(t)})}getTTL(t){return Dr(this,void 0,void 0,function*(){return this._registry.getTTL(t)})}getOwner(t){return Dr(this,void 0,void 0,function*(){return this._registry.getOwner(t)})}getAddress(t,r=60){return Dr(this,void 0,void 0,function*(){return this._resolver.getAddress(t,r)})}getText(t,r){return Dr(this,void 0,void 0,function*(){return this._resolver.getText(t,r)})}getName(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getName(t)})}getPubkey(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getPubkey(t)})}getContenthash(t){return Dr(this,void 0,void 0,function*(){return this._resolver.getContenthash(t)})}checkNetwork(){return Dr(this,void 0,void 0,function*(){let t=Date.now()/1e3;if(!this._lastSyncCheck||t-this._lastSyncCheck>3600){let i=yield(0,mU.isSyncing)(this);if(!(typeof i=="boolean"&&!i))throw new l1.ENSNetworkNotSyncedError;this._lastSyncCheck=t}if(this._detectedAddress)return this._detectedAddress;let r=yield(0,_U.getId)(this,Object.assign(Object.assign({},this.defaultReturnFormat),{number:gU.FMT_NUMBER.HEX})),n=py.registryAddresses[py.networkIds[r]];if(typeof n>"u")throw new l1.ENSUnsupportedNetworkError(r);return this._detectedAddress=n,this._detectedAddress})}supportsInterface(t,r){return Dr(this,void 0,void 0,function*(){return this._resolver.supportsInterface(t,r)})}get events(){return this._registry.events}setAddress(t,r,n){return Dr(this,void 0,void 0,function*(){return this._resolver.setAddress(t,r,n)})}};qa.ENS=my});var _y=f($n=>{"use strict";var vU=$n&&$n.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),AU=$n&&$n.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&vU(t,e,r)};Object.defineProperty($n,"__esModule",{value:!0});$n.registryAddresses=void 0;var EU=Jc();Object.defineProperty($n,"registryAddresses",{enumerable:!0,get:function(){return EU.registryAddresses}});AU(f1(),$n)});var m1=f(ut=>{"use strict";var ei=ut&&ut.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ut,"__esModule",{value:!0});ut.ecRecover=ut.sign=ut.signTransaction=ut.sendTransaction=ut.importRawKey=ut.lockAccount=ut.unlockAccount=ut.newAccount=ut.getAccounts=void 0;var lf=G(),h1=Yr(),p1=Pe(),Xi=be(),ti=qi(),TU=e=>ei(void 0,void 0,void 0,function*(){return(yield ti.personalRpcMethods.getAccounts(e)).map(lf.toChecksumAddress)});ut.getAccounts=TU;var wU=(e,t)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string"],[t]);let r=yield ti.personalRpcMethods.newAccount(e,t);return(0,lf.toChecksumAddress)(r)});ut.newAccount=wU;var IU=(e,t,r,n)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["address","string","uint"],[t,r,n]),ti.personalRpcMethods.unlockAccount(e,t,r,n)});ut.unlockAccount=IU;var RU=(e,t)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["address"],[t]),ti.personalRpcMethods.lockAccount(e,t)});ut.lockAccount=RU;var PU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){return Xi.validator.validate(["string","string"],[t,r]),ti.personalRpcMethods.importRawKey(e,t,r)});ut.importRawKey=PU;var SU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){let n=(0,h1.formatTransaction)(t,p1.ETH_DATA_FORMAT);return ti.personalRpcMethods.sendTransaction(e,n,r)});ut.sendTransaction=SU;var xU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){let n=(0,h1.formatTransaction)(t,p1.ETH_DATA_FORMAT);return ti.personalRpcMethods.signTransaction(e,n,r)});ut.signTransaction=xU;var BU=(e,t,r,n)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string","address","string"],[t,r,n]);let i=(0,Xi.isHexStrict)(t)?t:(0,lf.utf8ToHex)(t);return ti.personalRpcMethods.sign(e,i,r,n)});ut.sign=BU;var OU=(e,t,r)=>ei(void 0,void 0,void 0,function*(){Xi.validator.validate(["string","string"],[t,r]);let n=(0,Xi.isHexStrict)(t)?t:(0,lf.utf8ToHex)(t);return ti.personalRpcMethods.ecRecover(e,n,r)});ut.ecRecover=OU});var yy=f(Lr=>{"use strict";var CU=Lr&&Lr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),NU=Lr&&Lr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),MU=Lr&&Lr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&CU(t,e,r);return NU(t,e),t},ri=Lr&&Lr.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.Personal=void 0;var kU=Or(),ni=MU(m1()),gy=class extends kU.Web3Context{getAccounts(){return ri(this,void 0,void 0,function*(){return ni.getAccounts(this.requestManager)})}newAccount(t){return ri(this,void 0,void 0,function*(){return ni.newAccount(this.requestManager,t)})}unlockAccount(t,r,n){return ri(this,void 0,void 0,function*(){return ni.unlockAccount(this.requestManager,t,r,n)})}lockAccount(t){return ri(this,void 0,void 0,function*(){return ni.lockAccount(this.requestManager,t)})}importRawKey(t,r){return ri(this,void 0,void 0,function*(){return ni.importRawKey(this.requestManager,t,r)})}sendTransaction(t,r){return ri(this,void 0,void 0,function*(){return ni.sendTransaction(this.requestManager,t,r)})}signTransaction(t,r){return ri(this,void 0,void 0,function*(){return ni.signTransaction(this.requestManager,t,r)})}sign(t,r,n){return ri(this,void 0,void 0,function*(){return ni.sign(this.requestManager,t,r,n)})}ecRecover(t,r){return ri(this,void 0,void 0,function*(){return ni.ecRecover(this.requestManager,t,r)})}};Lr.Personal=gy});var ff=f(Yi=>{"use strict";var jU=Yi&&Yi.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),DU=Yi&&Yi.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&jU(t,e,r)};Object.defineProperty(Yi,"__esModule",{value:!0});var LU=yy();DU(yy(),Yi);Yi.default=LU.Personal});var _1=f(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var $i=ks();by.default={encodeEventSignature:$i.encodeEventSignature,encodeFunctionCall:$i.encodeFunctionCall,encodeFunctionSignature:$i.encodeFunctionSignature,encodeParameter:$i.encodeParameter,encodeParameters:$i.encodeParameters,decodeParameter:$i.decodeParameter,decodeParameters:$i.decodeParameters,decodeLog:$i.decodeLog}});var g1=f(Ha=>{"use strict";var su=Ha&&Ha.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.initAccountsForContext=void 0;var qU=Pe(),HU=G(),UU=Yr(),gr=ji(),FU=e=>{let t=(o,a)=>su(void 0,void 0,void 0,function*(){let u=yield(0,UU.prepareTransactionForSigning)(o,e),d=(0,HU.format)({format:"bytes"},a,qU.ETH_DATA_FORMAT);return(0,gr.signTransaction)(u,d)}),r=o=>{let a=(0,gr.privateKeyToAccount)(o);return Object.assign(Object.assign({},a),{signTransaction:u=>su(void 0,void 0,void 0,function*(){return t(u,a.privateKey)})})},n=(o,a,u)=>su(void 0,void 0,void 0,function*(){var d;let c=yield(0,gr.decrypt)(o,a,(d=u?.nonStrict)!==null&&d!==void 0?d:!0);return Object.assign(Object.assign({},c),{signTransaction:l=>su(void 0,void 0,void 0,function*(){return t(l,c.privateKey)})})}),i=()=>{let o=(0,gr.create)();return Object.assign(Object.assign({},o),{signTransaction:a=>su(void 0,void 0,void 0,function*(){return t(a,o.privateKey)})})},s=new gr.Wallet({create:i,privateKeyToAccount:r,decrypt:n});return{signTransaction:t,create:i,privateKeyToAccount:r,decrypt:n,recoverTransaction:gr.recoverTransaction,hashMessage:gr.hashMessage,sign:gr.sign,recover:gr.recover,encrypt:gr.encrypt,wallet:s,privateKeyToAddress:gr.privateKeyToAddress,parseAndValidatePrivateKey:gr.parseAndValidatePrivateKey,privateKeyToPublicKey:gr.privateKeyToPublicKey}};Ha.initAccountsForContext=FU});var y1=f(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.Web3PkgInfo=void 0;hf.Web3PkgInfo={version:"4.9.0"}});var Ay=f(ht=>{"use strict";var GU=ht&&ht.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(ht,"__esModule",{value:!0});ht.onNewProviderDiscovered=ht.requestEIP6963Providers=ht.web3ProvidersMapUpdated=ht.eip6963ProvidersMap=ht.Eip6963EventName=void 0;var vy;(function(e){e.eip6963announceProvider="eip6963:announceProvider",e.eip6963requestProvider="eip6963:requestProvider"})(vy=ht.Eip6963EventName||(ht.Eip6963EventName={}));ht.eip6963ProvidersMap=new Map;ht.web3ProvidersMapUpdated="web3:providersMapUpdated";var VU=()=>GU(void 0,void 0,void 0,function*(){return new Promise((e,t)=>{typeof window>"u"&&t(new Error("window object not available, EIP-6963 is intended to be used within a browser")),window.addEventListener(vy.eip6963announceProvider,r=>{ht.eip6963ProvidersMap.set(r.detail.info.uuid,r.detail);let n=new CustomEvent(ht.web3ProvidersMapUpdated,{detail:ht.eip6963ProvidersMap});window.dispatchEvent(n),e(ht.eip6963ProvidersMap)}),window.dispatchEvent(new Event(vy.eip6963requestProvider))})});ht.requestEIP6963Providers=VU;var WU=e=>{if(typeof window>"u")throw new Error("window object not available, EIP-6963 is intended to be used within a browser");window.addEventListener(ht.web3ProvidersMapUpdated,e)};ht.onNewProviderDiscovered=WU});var R1=f(yr=>{"use strict";var ZU=yr&&yr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),zU=yr&&yr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),QU=yr&&yr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ZU(t,e,r);return zU(t,e),t},v1=yr&&yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0});yr.Web3=void 0;var Ua=Or(),Ey=Yr(),KU=v1(Kc()),Ty=_y(),A1=jc(),E1=ff(),T1=sa(),w1=QU(G()),es=G(),b1=V(),JU=v1(_1()),XU=g1(),YU=y1(),I1=Ay(),ii=class extends Ua.Web3Context{constructor(t){var r;((0,es.isNullish)(t)||typeof t=="string"&&t.trim()===""||typeof t!="string"&&!(0,Ua.isSupportedProvider)(t)&&!t.provider)&&console.warn("NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!");let n={};typeof t=="string"||(0,Ua.isSupportedProvider)(t)?n.provider=t:t?n=t:n={},n.registeredSubscriptions=Object.assign(Object.assign({},Ey.registeredSubscriptions),(r=n.registeredSubscriptions)!==null&&r!==void 0?r:{}),super(n);let i=(0,XU.initAccountsForContext)(this);this._wallet=i.wallet,this._accountProvider=i,this.utils=w1;let s=this;class o extends KU.default{constructor(d,c,l,h,m){if((0,es.isContractInitOptions)(c)&&(0,es.isContractInitOptions)(l))throw new b1.InvalidMethodParamsError("Should not provide options at both 2nd and 3rd parameters");let b,_={},y,v;if(!(0,es.isNullish)(c)&&typeof c!="object"&&typeof c!="string")throw new b1.InvalidMethodParamsError;typeof c=="string"&&(b=c),(0,es.isContractInitOptions)(c)?_=c:(0,es.isContractInitOptions)(l)?_=l:_={},c instanceof Ua.Web3Context?y=c:l instanceof Ua.Web3Context?y=l:h instanceof Ua.Web3Context?y=h:y=s.getContextObject(),m?v=m:(0,es.isDataFormat)(l)?v=l:(0,es.isDataFormat)(h)&&(v=h),super(d,b,_,y,v),super.subscribeToContextEvents(s)}}let a=s.use(Ey.Web3Eth);this.eth=Object.assign(a,{ens:s.use(Ty.ENS,Ty.registryAddresses.main),Iban:A1.Iban,net:s.use(T1.Net),personal:s.use(E1.Personal),Contract:o,abi:JU.default,accounts:i})}};yr.Web3=ii;ii.version=YU.Web3PkgInfo.version;ii.utils=w1;ii.requestEIP6963Providers=I1.requestEIP6963Providers;ii.onNewProviderDiscovered=I1.onNewProviderDiscovered;ii.modules={Web3Eth:Ey.Web3Eth,Iban:A1.Iban,Net:T1.Net,ENS:Ty.ENS,Personal:E1.Personal};yr.default=ii});var S1=f(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0})});var B1=f(et=>{"use strict";var x1=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),$U=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),eF=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&x1(t,e,r)},Fa=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&x1(t,e,r);return $U(t,e),t};Object.defineProperty(et,"__esModule",{value:!0});et.iban=et.personal=et.ens=et.contract=et.accounts=et.abi=void 0;eF(Yr(),et);et.abi=Fa(ks());et.accounts=Fa(ji());et.contract=Fa(Kc());et.ens=Fa(_y());et.personal=Fa(ff());et.iban=Fa(jc())});var M1=f(gt=>{"use strict";var O1=gt&>.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),tF=gt&>.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),C1=gt&>.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&O1(t,e,r);return tF(t,e),t},rF=gt&>.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&O1(t,e,r)};Object.defineProperty(gt,"__esModule",{value:!0});gt.ws=gt.http=gt.SocketProvider=gt.Eip1193Provider=void 0;var N1=G();Object.defineProperty(gt,"Eip1193Provider",{enumerable:!0,get:function(){return N1.Eip1193Provider}});Object.defineProperty(gt,"SocketProvider",{enumerable:!0,get:function(){return N1.SocketProvider}});gt.http=C1(bd());gt.ws=C1(Ad());rF(Ay(),gt)});var Iy=f(z=>{"use strict";var k1=z&&z.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),nF=z&&z.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wy=z&&z.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&k1(t,e,r)},si=z&&z.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&k1(t,e,r);return nF(t,e),t},iF=z&&z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(z,"__esModule",{value:!0});z.validator=z.utils=z.types=z.rpcMethods=z.providers=z.net=z.eth=z.errors=z.core=z.Web3Validator=z.WebSocketProvider=z.HttpProvider=z.Net=z.Personal=z.Iban=z.Contract=z.Web3Eth=z.Web3PromiEvent=z.Web3EthPluginBase=z.Web3PluginBase=z.Web3Context=z.Web3=void 0;var j1=iF(R1());z.Web3=j1.default;wy(S1(),z);z.default=j1.default;var pf=Or();Object.defineProperty(z,"Web3Context",{enumerable:!0,get:function(){return pf.Web3Context}});Object.defineProperty(z,"Web3PluginBase",{enumerable:!0,get:function(){return pf.Web3PluginBase}});Object.defineProperty(z,"Web3EthPluginBase",{enumerable:!0,get:function(){return pf.Web3EthPluginBase}});Object.defineProperty(z,"Web3PromiEvent",{enumerable:!0,get:function(){return pf.Web3PromiEvent}});var sF=Yr();Object.defineProperty(z,"Web3Eth",{enumerable:!0,get:function(){return sF.Web3Eth}});var oF=Kc();Object.defineProperty(z,"Contract",{enumerable:!0,get:function(){return oF.Contract}});var aF=jc();Object.defineProperty(z,"Iban",{enumerable:!0,get:function(){return aF.Iban}});var cF=ff();Object.defineProperty(z,"Personal",{enumerable:!0,get:function(){return cF.Personal}});var uF=sa();Object.defineProperty(z,"Net",{enumerable:!0,get:function(){return uF.Net}});var dF=bd();Object.defineProperty(z,"HttpProvider",{enumerable:!0,get:function(){return dF.HttpProvider}});var lF=Ad();Object.defineProperty(z,"WebSocketProvider",{enumerable:!0,get:function(){return lF.WebSocketProvider}});var fF=be();Object.defineProperty(z,"Web3Validator",{enumerable:!0,get:function(){return fF.Web3Validator}});z.core=si(Or());z.errors=si(V());z.eth=si(B1());z.net=si(sa());z.providers=si(M1());z.rpcMethods=si(qi());z.types=si(Pe());z.utils=si(G());z.validator=si(be());wy(V(),z);wy(Pe(),z)});var D1=f(ou=>{"use strict";var hF=ou&&ou.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ou,"__esModule",{value:!0});var pF=hF(Iy()),mF=e=>new pF.default(e);ou.default=mF});var L1=f(au=>{"use strict";var _F=au&&au.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(au,"__esModule",{value:!0});var gF=(e,t,r)=>{let n=e.slice(2,10),i=t.methodIDs[n];if(i){let s=r.eth.abi.decodeParameters(i.inputs,e.slice(10)),o={name:i.name,params:[]};for(let a=0;anew b.toString):d=u.toString()),h&&(Array.isArray(u)?d=u.map(b=>b.toLowerCase()):d=u.toLowerCase()),o.params.push({name:i.inputs[a].name,value:d,type:i.inputs[a].type})}return o}return null},yF=(e,t,r)=>_F(void 0,void 0,void 0,function*(){var n,i;let s;if(e?.data!=null&&e?.data!=null?s=e.data:s=JSON.parse(e.message.slice(e.message.indexOf("{"),e.message.lastIndexOf("}")+1)),s?.originalError){if(((n=s.originalError)===null||n===void 0?void 0:n.data)!=null&&((i=s.originalError)===null||i===void 0?void 0:i.data)!=null){let o=gF(s.originalError.data,t,r);if(console.log(o),o)return o}return s.originalError.message}return s});au.default=yF});var q1=f(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});var bF={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input or Insufficient Funds."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-1193",message:"Unrecognized Chain ID / Chain not found."}};Ry.default=bF});var Sy=f(Us=>{"use strict";var vF=Us&&Us.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},AF=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});var Py=AF(q1()),EF=(e,t)=>vF(void 0,void 0,void 0,function*(){if(e&&e?.code){let o=Py.default===null||Py.default===void 0?void 0:Py.default[e.code];return o?o.message:e.code==="ACTION_REJECTED"?"User rejected signing":e.message}let r=e?.toString();if(r&&r?.startsWith("Error: Transaction has been reverted by the EVM:")){let o=e.message.slice(42),u=JSON.parse(o).transactionHash;try{let d=yield t.eth.getTransaction(u);var n=yield t.eth.call(d);if(n=n.startsWith("0x")?n:`0x${n}`,n&&n.substring(138)){let c=t.utils.toAscii(n.substring(138));return console.log("Revert reason:",c),c}else console.log("Cannot get reason")}catch(d){var i=d.toString();if(i&&i.startsWith("Error")){var s=i.slice(i.indexOf("{"),i.length);if(s.indexOf("{")!==-1&&s.lastIndexOf("}"))return s=JSON.parse(s),s.message}}}return null});Us.default=EF});var H1=f(Fs=>{"use strict";var TF=Fs&&Fs.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},wF=Fs&&Fs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fs,"__esModule",{value:!0});var IF=wF(Sy()),RF=(e,t)=>TF(void 0,void 0,void 0,function*(){let r=e.message;typeof e.message!="string"&&(r=e.message.toString());let n=r.slice(r.indexOf("{"),r.length);return n.indexOf("{")!==-1&&n.lastIndexOf("}")?(n=JSON.parse(n),yield(0,IF.default)(n,t)):null});Fs.default=RF});var U1=f(Gs=>{"use strict";var PF=Gs&&Gs.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})},xy=Gs&&Gs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gs,"__esModule",{value:!0});var SF=xy(L1()),xF=xy(H1()),BF=xy(Sy()),OF=(e,t,r)=>PF(void 0,void 0,void 0,function*(){var n,i,s,o;let a="Something went wrong. Please try again later.",u=null;if(e?.message&&(!((n=e.message)===null||n===void 0)&&n.includes("Internal JSON-RPC error."))?u=yield(0,xF.default)(e,t):e?.message&&(!((i=e.message)===null||i===void 0)&&i.includes("execution reverted:"))&&((s=e.message)===null||s===void 0?void 0:s.indexOf("{"))!==-1||e?.data!=null&&e?.data!=null?u=yield(0,SF.default)(e,r,t):e?.message&&(!((o=e.message)===null||o===void 0)&&o.includes("execution reverted:"))&&(u=e.message.slice(e.message.indexOf("execution reverted:"),e.message.length)),!u){let d=yield(0,BF.default)(e,t);d&&(u=d)}return u||(e.message?e.message:a)}),CF=(e,t,r)=>new Promise((n,i)=>{OF(e,t,r).then(s=>{n(s)}).catch(s=>{i(s)})});Gs.default=CF});var F1=f(cu=>{"use strict";var NF=cu&&cu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{d(n.next(c))}catch(l){o(l)}}function u(c){try{d(n.throw(c))}catch(l){o(l)}}function d(c){c.done?s(c.value):i(c.value).then(a,u)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(cu,"__esModule",{value:!0});var MF=Iy();function kF(e){var t,r;return!((t=e?.innerError)===null||t===void 0)&&t.errorSignature||e.innerError||!((r=e?.data)===null||r===void 0)&&r.data.startsWith("0x")&&(e.innerError=new MF.Eip838ExecutionError(e.data)),e.innerError}var jF=(e,t)=>NF(void 0,void 0,void 0,function*(){let r=yield t.eth.getTransaction(e);r.gasPrice&&(delete r.maxPriorityFeePerGas,delete r.maxFeePerGas);try{return yield t.eth.call(r,r.blockNumber),"Success Tx"}catch(n){if(n?.innerError){let s=kF(n);return typeof s=="object"?s?.message?s.message:JSON.stringify(s):s}let i=n.toString();if(i&&i.startsWith("Error")){let s=i.slice(i.indexOf("{"),i.length);if(s.indexOf("{")!==-1&&s.lastIndexOf("}"))return s=JSON.parse(s),s.message}if(n?.message)return n.message}return"Reverted without reason"}),DF=(e,t)=>new Promise((r,n)=>{jF(e,t).then(i=>{r(i)}).catch(i=>{n(i)})});cu.default=DF});var V1=f(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});var G1=e=>e.type==="tuple"?"("+e.components.map(G1).join(",")+")":e.type,LF=(e,t)=>{let r={};return e.map(n=>{if(Array.isArray(n))n.map(function(i){if(i.name){let s=t.utils.sha3(i.name+"("+i.inputs.map(G1).join(",")+")");i.type==="event"?r[s.slice(2)]=i:r[s.slice(2,10)]=i}});else throw new Error("Expected ABI array, one or more got "+typeof n)}),r};By.default=LF});var W1=f(Ga=>{"use strict";var mf=Ga&&Ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.Web3errors=void 0;var qF=mf(D1()),HF=mf(U1()),UF=mf(F1()),FF=mf(V1()),Oy=class{constructor(t,r){if(this.state={savedABIs:[],methodIDs:{}},this.getErrorMessage=n=>(0,HF.default)(n,this.web3,this.state),this.getErrOfTx=n=>(0,UF.default)(n,this.web3),!t)throw new Error("RPC URL or Provider is required");this.web3=(0,qF.default)(t),r&&r?.length>0&&(this.state.methodIDs=(0,FF.default)(r,this.web3),this.state.savedABIs=this.state.savedABIs.concat(r))}};Ga.Web3errors=Oy});var WF=f(Vs=>{var GF=Vs&&Vs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(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){n===void 0&&(n=r),e[n]=t[r]}),VF=Vs&&Vs.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&GF(t,e,r)};Object.defineProperty(Vs,"__esModule",{value:!0});VF(W1(),Vs)});WF();})(); /*! Bundled license information: @noble/hashes/utils.js: diff --git a/lib/commonjs/lib/getErrorMessage.js b/lib/commonjs/lib/getErrorMessage.js index 710e6ea..ad09a1c 100644 --- a/lib/commonjs/lib/getErrorMessage.js +++ b/lib/commonjs/lib/getErrorMessage.js @@ -18,7 +18,7 @@ const getweb3_1 = __importDefault(require("./getweb3.js")); const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const defaultErrMsg = "Something went wrong. Please try again later."; - let ret; + let ret = null; if ((err === null || err === void 0 ? void 0 : err.message) && ((_a = err.message) === null || _a === void 0 ? void 0 : _a.includes("Internal JSON-RPC error."))) { ret = yield (0, internalRPC_1.default)(err, web3); } @@ -31,7 +31,7 @@ const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, ret = err.message.slice(err.message.indexOf("execution reverted:"), err.message.length); } if (!ret) { - const errFromWeb3 = (0, getweb3_1.default)(err, web3); + const errFromWeb3 = yield (0, getweb3_1.default)(err, web3); if (errFromWeb3) { ret = errFromWeb3; } @@ -39,6 +39,9 @@ const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, if (ret) { return ret; } + else if (err.message) { + return err.message; + } return defaultErrMsg; }); const getErrorMessage = (err, web3, state) => { diff --git a/lib/commonjs/lib/getErrorMessage.js.map b/lib/commonjs/lib/getErrorMessage.js.map index b409752..9a2c169 100644 --- a/lib/commonjs/lib/getErrorMessage.js.map +++ b/lib/commonjs/lib/getErrorMessage.js.map @@ -1 +1 @@ -{"version":3,"file":"getErrorMessage.js","sourceRoot":"","sources":["../../../src/lib/getErrorMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,4EAAoD;AACpD,gEAA6C;AAC7C,wDAAuC;AAEvC,MAAM,gBAAgB,GAAG,CAAO,GAAQ,EAAE,IAAkC,EAAE,KAAU,EAAmB,EAAE;;IACzG,MAAM,aAAa,GAAG,+CAA+C,CAAC;IACtE,IAAI,GAAG,CAAC;IACR,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,MAAI,MAAA,GAAG,CAAC,OAAO,0CAAE,QAAQ,CAAC,0BAA0B,CAAC,CAAA,EAAE,CAAC;QACpE,GAAG,GAAG,MAAM,IAAA,qBAAgB,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;SAAM,IACH,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO;SACb,MAAA,GAAG,CAAC,OAAO,0CAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAA;QAC5C,CAAA,MAAA,GAAG,CAAC,OAAO,0CAAE,OAAO,CAAC,GAAG,CAAC,MAAK,CAAC,CAAC,CAAC,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,IAAI,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,SAAS,E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AC,MAAM,CACrB,CAAC;IACN,CAAC;IAED,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,MAAM,WAAW,GAAG,MAAM,IAAA,iBAAc,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACpD,IAAI,WAAW,EAAE,CAAC;YACd,GAAG,GAAG,WAAW,CAAC;QACtB,CAAC;IACL,CAAC;IAED,IAAI,GAAG,EAAE,CAAC;QACN,OAAO,GAAG,CAAC;IACf,CAAC;SAAM,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,OAAO,aAAa,CAAC;AACzB,CAAC,CAAA,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAE,IAAkC,EAAE,KAAU,EAAmB,EAAE;IAClG,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,gBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC;aAC7B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACX,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC,CAAA;AAED,kBAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/lib/esm/lib/getErrorMessage.js b/lib/esm/lib/getErrorMessage.js index 64db8f4..3dd5244 100644 --- a/lib/esm/lib/getErrorMessage.js +++ b/lib/esm/lib/getErrorMessage.js @@ -13,7 +13,7 @@ import getErrFromWeb3 from "./getweb3.js"; const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const defaultErrMsg = "Something went wrong. Please try again later."; - let ret; + let ret = null; if ((err === null || err === void 0 ? void 0 : err.message) && ((_a = err.message) === null || _a === void 0 ? void 0 : _a.includes("Internal JSON-RPC error."))) { ret = yield internalRPCError(err, web3); } @@ -26,7 +26,7 @@ const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, ret = err.message.slice(err.message.indexOf("execution reverted:"), err.message.length); } if (!ret) { - const errFromWeb3 = getErrFromWeb3(err, web3); + const errFromWeb3 = yield getErrFromWeb3(err, web3); if (errFromWeb3) { ret = errFromWeb3; } @@ -34,6 +34,9 @@ const _getErrorMessage = (err, web3, state) => __awaiter(void 0, void 0, void 0, if (ret) { return ret; } + else if (err.message) { + return err.message; + } return defaultErrMsg; }); const getErrorMessage = (err, web3, state) => { diff --git a/lib/esm/lib/getErrorMessage.js.map b/lib/esm/lib/getErrorMessage.js.map index 3b481e1..ce0cb5f 100644 --- a/lib/esm/lib/getErrorMessage.js.map +++ b/lib/esm/lib/getErrorMessage.js.map @@ -1 +1 @@ -{"version":3,"file":"getErrorMessage.js","sourceRoot":"","sources":["../../../src/lib/getErrorMessage.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,gBAAgB,MAAM,eAAe,CAAC;AAC7C,OAAO,cAAc,MAAM,WAAW,CAAC;AAEvC,MAAM,gBAAgB,GAAG,CAAO,GAAQ,EAAE,IAAkC,EAAE,KAAU,EAAmB,EAAE;;IACzG,MAAM,aAAa,GAAG,+CAA+C,CAAC;IACtE,IAAI,GAAG,CAAC;IACR,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,MAAI,MAAA,GAAG,CAAC,OAAO,0CAAE,QAAQ,CAAC,0BAA0B,CAAC,CAAA,EAAE,CAAC;QACpE,GAAG,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;SAAM,IACH,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO;SACb,MAAA,GAAG,CAAC,OAAO,0CAAE,QAAQ,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orMessage.d.ts.map index 0968b49..607482d 100644 --- a/lib/types/lib/getErrorMessage.d.ts.map +++ b/lib/types/lib/getErrorMessage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"getErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/lib/getErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAoClD,QAAA,MAAM,eAAe,QAAS,GAAG,QAAQ,KAAK,sBAAsB,CAAC,SAAS,GAAG,KAAG,QAAQ,MAAM,CAUjG,CAAA;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file +{"version":3,"file":"getErrorMessage.d.ts","sourceRoot":"","sources":["../../../src/lib/getErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAuClD,QAAA,MAAM,eAAe,QAAS,GAAG,QAAQ,KAAK,sBAAsB,CAAC,SAAS,GAAG,KAAG,QAAQ,MAAM,CAUjG,CAAA;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index de0eaca..20efd15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "web3-errors-extract", - "version": "0.2.0", + "version": "0.2.1", "description": "Get EVM based web3 transaction revert messages or any other errors", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", diff --git a/src/lib/getErrorMessage.ts b/src/lib/getErrorMessage.ts index 09d67b5..6794253 100644 --- a/src/lib/getErrorMessage.ts +++ b/src/lib/getErrorMessage.ts @@ -6,13 +6,13 @@ import getErrFromWeb3 from "./getweb3"; const _getErrorMessage = async (err: any, web3: Web3, state: any): Promise => { const defaultErrMsg = "Something went wrong. Please try again later."; - let ret; + let ret: string | null = null; if (err?.message && err.message?.includes("Internal JSON-RPC error.")) { ret = await internalRPCError(err, web3); } else if ( (err?.message && - err.message?.includes("execution reverted:") && - err.message?.indexOf("{") !== -1) || err?.data != null && err?.data != undefined + err.message?.includes("execution reverted:") && + err.message?.indexOf("{") !== -1) || err?.data != null && err?.data != undefined ) { ret = await executionReverted(err, state, web3); } else if (err?.message && err.message?.includes("execution reverted:")) { @@ -23,7 +23,7 @@ const _getErrorMessage = async (err: any, web3: Web3, st } if (!ret) { - const errFromWeb3 = getErrFromWeb3(err, web3); + const errFromWeb3 = await getErrFromWeb3(err, web3); if (errFromWeb3) { ret = errFromWeb3; } @@ -31,7 +31,10 @@ const _getErrorMessage = async (err: any, web3: Web3, st if (ret) { return ret; + } else if (err.message) { + return err.message; } + return defaultErrMsg; }