!functiona(b,c,d){functione(g,h){if(!c[g]){if(!b[g]){vari="function"==typeofrequire&&require;if(!h&&i)returni(g,!0);if(f)returnf(g,!0);varj=newError("Cannot find module '"+g+"'");throwj.code="MODULE_NOT_FOUND",j}vark=c[g]={exports:{}};b[g][0].call(k.exports,function(a){varc=b[g][1][a];returne(c?c:a)},k,k.exports,a,b,c,d)}returnc[g].exports}for(varf="function"==typeofrequire&&require,g=0;g<d.length;g++)e(d[g]);returne}({1:[function(a,b,c){b.exports=void0},{}],2:[function(a,b,c){"use strict";try{b.exports.XMLHttpRequest=XMLHttpRequest}catch(d){console.log("Warning: XMLHttpRequest is not defined"),b.exports.XMLHttpRequest=null}},{}],3:[function(a,b,c){"use strict";functiond(a){varb=[];for(varcina)null!=a[c]&&b.push(c+"="+j.hexlify(a[c]));returnb.join("&")}functione(a,b){i.call(this,a),j.defineProperty(this,"apiKey",b||null)}functionf(a){if(0==a.status&&"No records found"===a.message)returna.result;if(1!=a.status||"OK"!=a.message){varb=newError("invalid response");throwb.result=JSON.stringify(a),b}returna.result}functiong(a){if("2.0"!=a.jsonrpc){varb=newError("invalid response");throwb.result=JSON.stringify(a),b}if(a.error){varb=newError(a.error.message||"unknown error");throwa.error.code&&(b.code=a.error.code),a.error.data&&(b.data=a.error.data),b}returna.result}functionh(a){if("pending"===a)thrownewError("pending not supported");return"latest"===a?a:parseInt(a.substring(2),16)}vari=a("./provider.js"),j=function(){varb=a("ethers-utils/convert.js");return{defineProperty:a("ethers-utils/properties.js").defineProperty,hexlify:b.hexlify}}();i.inherits(e),j.defineProperty(e.prototype,"_call",function(){}),j.defineProperty(e.prototype,"_callProxy",function(){}),j.defineProperty(e.prototype,"perform",function(a,b){b||(b={});varc=this.testnet?"https://ropsten.etherscan.io":"https://api.etherscan.io",e="";switch(this.apiKey&&(e+="&apikey="+this.apiKey),a){case"getBlockNumber":returnc+="/api?module=proxy&action=eth_blockNumber"+e,i.fetchJSON(c,null,g);case"getGasPrice":returnc+="/api?module=proxy&action=eth_gasPrice"+e,i.fetchJSON(c,null,g);case"getBalance":returnc+="/api?module=account&action=balance&address="+b.address,c+="&tag="+b.blockTag+e,i.fetchJSON(c,null,f);case"getTransactionCount":returnc+="/api?module=proxy&action=eth_getTransactionCount&address="+b.address,c+="&tag="+b.blockTag+e,i.fetchJSON(c,null,g);case"getCode":returnc+="/api?module=proxy&action=eth_getCode&address="+b.address,c+="&tag="+b.blockTag+e,i.fetchJSON(c,null,g);case"getStorageAt":returnc+="/api?module=proxy&action=eth_getStorageAt&address="+b.address,c+="&position="+b.position,c+="&tag="+b.blockTag+e,i.fetchJSON(c,null,g);case"sendTransaction":returnc+="/api?module=proxy&action=eth_sendRawTransaction&hex="+b.signedTransaction,c+=e,i.fetchJSON(c,null,g);case"getBlock":if(b.blockTag)returnc+="/api?module=proxy&action=eth_getBlockByNumber&tag="+b.blockTag,c+="&boolean=false",c+=e,i.fetchJSON(c,null,g);thrownewError("getBlock by blockHash not implmeneted");case"getTransaction":returnc+="/api?module=proxy&action=eth_getTransactionByHash&txhash="+b.transactionHash,c+=e,i.fetchJSON(c,null,g);case"getTransactionReceipt":returnc+="/api?module=proxy&action=eth_getTransactionReceipt&txhash="+b.transactionHash,c+=e,i.fetchJSON(c,null,g);case"call":varj=d(b.transaction);returnj&&(j="&"+j),c+="/api?module=proxy&action=eth_call"+j,c+=e,i.fetchJSON(c,null,g);case"estimateGas":varj=d(b.transaction);returnj&&(j="&"+j),c+="/api?module=proxy&action=eth_estimateGas&"+j,c+=e,i.fetchJSON(c,null,g);case"getLogs":c+="/api?module=logs&action=getLogs";try{if(b.filter.fromBlock&&(c+="&fromBlock="+h(b.filter.fromBlock)),b.filter.toBlock&&(c+="&toBlock="+h(b.filter.toBlock)),b.filter.address&&(c+="&address="+b.filter.address),b.filter.topics&&b.filter.topics.length>0){if(b.filter.topics.length>1)thrownewError("unsupported topic format");vark=b.filter.topics[0];if("string"!=typeofk||66!==k.length)thrownewError("unsupported topic0 format");c+="&topic0="+k}}catch(l){returnPromise.reject(l)}returnc+=e,i.fetchJSON(c,null,f