-
Notifications
You must be signed in to change notification settings - Fork 1
/
3.604c2584e65e18eea15e.js
1 lines (1 loc) · 94.1 KB
/
3.604c2584e65e18eea15e.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"/UYa":function(e,t,r){e.exports=r("1aEN")},"/oFA":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,i){return e(n.default,t,(0,o.default)(r),i)}};var n=i(r("abV/")),o=i(r("aR5N"));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},"/u+i":function(e,t,r){r("QXrW"),r("4CaD");const n=r("y2lW"),o=(e,t)=>e+t,i=["sync","latest"];function s(e){return Number.parseInt(e,16)}e.exports=class extends n{constructor(e={}){super(),this._blockResetDuration=e.blockResetDuration||2e4,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(e=>this.once("latest",e))}removeAllListeners(e){e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e,t){i.includes(e)&&this._maybeStart()}_onRemoveListener(e,t){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return i.map(e=>this.listenerCount(e)).reduce(o)}_newPotentialLatest(e){const t=this._currentBlock;t&&s(e)<=s(t)||this._setCurrentBlock(e)}_setCurrentBlock(e){const t=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:t,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},"/uSP":function(e,t,r){const n=r("+qE3").EventEmitter,o=r("MCLT").inherits;function i(){n.call(this),this.isLocked=!0}e.exports=i,o(i,n),i.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},i.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},i.prototype.await=function(e){this.isLocked?this.once("unlock",e):setTimeout(e)}},"03A+":function(e,t,r){var n=r("JTzB"),o=r("ExA7"),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},"0EcT":function(e,t,r){"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0});var o=r("IzB8");t.secp256k1=o;var i=r("mhLr"),s=r("OZ/i");t.BN=s;var a=r("o8pB");t.rlp=a,Object.assign(t,i),n(r("boA1")),n(r("dhqH")),n(r("0ZP9")),n(r("Pd9Q")),n(r("C939")),n(r("0hT/"))},"0QlC":function(e,t){function r(e){return null==e?e:Number.parseInt(e,16)}function n(e){return null==e?e:"0x"+e.toString(16)}e.exports=async function({provider:e,fromBlock:t,toBlock:o}){t||(t=o);const i=r(t),s=r(o),a=Array(s-i+1).fill().map((e,t)=>i+t).map(n);return await Promise.all(a.map(t=>(function(e,t,r){return new Promise((t,n)=>{e.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:r},(e,r)=>{if(e)return n(e);t(r.result)})})})(e,0,[t,!1])))}},"0ZP9":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("aYMp"),o=r("mObS"),i=r("mhLr"),s=r("o8pB"),a=r("C939");t.keccak=function(t,r){return void 0===r&&(r=256),t="string"!=typeof t||i.isHexString(t)?a.toBuffer(t):e.from(t,"utf8"),r||(r=256),n("keccak"+r).update(t).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=a.toBuffer(e),o("sha256").update(e).digest()},t.ripemd160=function(e,t){e=a.toBuffer(e);var r=o("rmd160").update(e).digest();return!0===t?a.setLength(r,32):r},t.rlphash=function(e){return t.keccak(s.encode(e))}}).call(this,r("HDXh").Buffer)},"0hT/":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("9lTW"),o=r("mhLr"),i=r("o8pB"),s=r("C939");t.defineProperties=function(t,r,a){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return s.baToJSON(t.raw)},t.serialize=function(){return i.encode(t.raw)},r.forEach((function(r,o){function i(){return t.raw[o]}function a(i){"00"!==(i=s.toBuffer(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=s.stripZeros(i),n(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||n(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[o]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:a}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:a,get:i})})),a)if("string"==typeof a&&(a=e.from(o.stripHexPrefix(a),"hex")),e.isBuffer(a)&&(a=i.decode(a)),Array.isArray(a)){if(a.length>t._fields.length)throw new Error("wrong number of fields in data");a.forEach((function(e,r){t[t._fields[r]]=s.toBuffer(e)}))}else{if("object"!=typeof a)throw new Error("invalid data");var c=Object.keys(a);r.forEach((function(e){-1!==c.indexOf(e.name)&&(t[e.name]=a[e.name]),-1!==c.indexOf(e.alias)&&(t[e.alias]=a[e.alias])}))}}}).call(this,r("HDXh").Buffer)},"1aEN":function(e,t){e.exports=function(e){return(t,r,n,o)=>{const i=e[t.method];return void 0===i?n():"function"==typeof i?i(t,r,n,o):(r.result=i,void o())}}},"2J3U":function(e,t){e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},"2nhq":function(e,t,r){const n=r("rdBT").Mutex,o=r("w92A"),i=r("/UYa"),s=r("FqFB"),a=r("rW7p"),c=r("hyCD"),{intToHex:u,hexToInt:f}=r("UJ2e");function l(e){return d(async(...t)=>{const r=await e(...t);return u(r.id)})}function d(e){return o(async(t,r)=>{const n=await e.apply(null,t.params);r.result=n})}function p(e,t){const r=[];for(let n in e)r.push(e[n]);return r}e.exports=function({blockTracker:e,provider:t}){let r=0,o={};const h=new n,y=function({mutex:e}){return t=>async(r,n,o,i)=>{(await e.acquire())(),t(r,n,o,i)}}({mutex:h}),g=i({eth_newFilter:y(l(m)),eth_newBlockFilter:y(l(_)),eth_newPendingTransactionFilter:y(l(b)),eth_uninstallFilter:y(d(x)),eth_getFilterChanges:y(d(w)),eth_getFilterLogs:y(d(k))}),v=async({oldBlock:e,newBlock:t})=>{if(0===o.length)return;const r=await h.acquire();try{await Promise.all(p(o).map(async r=>{try{await r.update({oldBlock:e,newBlock:t})}catch(n){console.error(n)}}))}catch(n){console.error(n)}r()};return g.newLogFilter=m,g.newBlockFilter=_,g.newPendingTransactionFilter=b,g.uninstallFilter=x,g.getFilterChanges=w,g.getFilterLogs=k,g.destroy=()=>{!async function(){const e=p(o).length;o={},A({prevFilterCount:e,newFilterCount:0})}()},g;async function m(e){const r=new s({provider:t,params:e});return await B(r),r}async function _(){const e=new a({provider:t});return await B(e),e}async function b(){const e=new c({provider:t});return await B(e),e}async function w(e){const t=f(e),r=o[t];if(!r)throw new Error(`No filter for index "${t}"`);return r.getChangesAndClear()}async function k(e){const t=f(e),r=o[t];if(!r)throw new Error(`No filter for index "${t}"`);return results="log"===r.type?r.getAllResults():[],results}async function x(e){const t=f(e),r=Boolean(o[t]);return r&&await async function(e){const t=p(o).length;delete o[e],A({prevFilterCount:t,newFilterCount:p(o).length})}(t),r}async function B(t){const n=p(o).length,i=await e.getLatestBlock();return await t.initialize({currentBlock:i}),o[++r]=t,t.id=r,t.idHex=u(r),A({prevFilterCount:n,newFilterCount:p(o).length}),r}function A({prevFilterCount:t,newFilterCount:r}){0===t&&r>0?e.on("sync",v):t>0&&0===r&&e.removeListener("sync",v)}}},"2sf1":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},"3qT5":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0;for(var r=Math.max(e.length-t,0),n=Array(r),o=0;o<r;o++)n[o]=e[t+o];return n},e.exports=t.default},"4CaD":function(e,t,r){"use strict";const n=(e,t)=>(function(){const r=t.promiseModule,n=new Array(arguments.length);for(let e=0;e<arguments.length;e++)n[e]=arguments[e];return new r((r,o)=>{n.push(t.errorFirst?function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e<arguments.length;e++)t[e-1]=arguments[e];e?(t.unshift(e),o(t)):r(t)}else e?o(e):r(n)}:function(e){if(t.multiArgs){const e=new Array(arguments.length-1);for(let t=0;t<arguments.length;t++)e[t]=arguments[t];r(e)}else r(e)}),e.apply(this,n)})});e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=e=>{const r=t=>"string"==typeof t?e===t:t.test(e);return t.include?t.include.some(r):!t.exclude.some(r)};let o;o="function"==typeof e?function(){return t.excludeMain?e.apply(this,arguments):n(e,t).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const i in e){const s=e[i];o[i]="function"==typeof s&&r(i)?n(s,t):s}return o}},"56vw":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)((function(t,r){var o;try{o=e.apply(this,t)}catch(i){return r(i)}(0,n.default)(o)&&"function"==typeof o.then?o.then((function(e){a(r,null,e)}),(function(e){a(r,e.message?e:new Error(e))})):r(null,o)}))};var n=s(r("GoyQ")),o=s(r("hGab")),i=s(r("LgDX"));function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){try{e(t,r)}catch(n){(0,i.default)(c,n)}}function c(e){throw e}e.exports=t.default},"6oS5":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=r||n.default;var a=(0,o.default)(t)?[]:{};e(t,(function(e,t,r){(0,s.default)(e)((function(e,n){arguments.length>2&&(n=(0,i.default)(arguments,1)),a[t]=n,r(e)}))}),(function(e){r(e,a)}))};var n=a(r("vN+2")),o=a(r("MMmD")),i=a(r("3qT5")),s=a(r("aR5N"));function a(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},"6sVZ":function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},"6vPO":function(e,t,r){(function(t){const n=r("0EcT"),o=r("OZ/i");var i=function(){};function s(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e}function a(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function c(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function u(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null}function f(e){var t=typeof e;if("string"===t)return n.isHexPrefixed(e)?new o(n.stripHexPrefix(e),16):new o(e,10);if("number"===t)return new o(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function l(e){var t=/^(\w+)\((.*)\)$/.exec(e);if(3!==t.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(t[2]);if(null!==r&&3===r.length)return{method:t[1],args:r[1].split(","),retargs:r[2].split(",")};var n=t[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:t[1],args:n}}function d(e,r){var i,s,l,p;if("address"===e)return d("uint160",f(r));if("bool"===e)return d("uint8",r?1:0);if("string"===e)return d("bytes",t.from(r,"utf8"));if(g(e)){if(void 0===r.length)throw new Error("Not an array?");if("dynamic"!==(i=u(e))&&0!==i&&r.length>i)throw new Error("Elements exceed array size: "+i);for(p in l=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof r&&(r=JSON.parse(r)),r)l.push(d(e,r[p]));if("dynamic"===i){var h=d("uint256",r.length);l.unshift(h)}return t.concat(l)}if("bytes"===e)return r=t.from(r),l=t.concat([d("uint256",r.length),r]),r.length%32!=0&&(l=t.concat([l,n.zeros(32-r.length%32)])),l;if(e.startsWith("bytes")){if((i=a(e))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);return n.setLengthRight(r,32)}if(e.startsWith("uint")){if((i=a(e))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((s=f(r)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+s.bitLength());if(s<0)throw new Error("Supplied uint is negative");return s.toArrayLike(t,"be",32)}if(e.startsWith("int")){if((i=a(e))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((s=f(r)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(t,"be",32)}if(e.startsWith("ufixed")){if(i=c(e),(s=f(r))<0)throw new Error("Supplied ufixed is negative");return d("uint256",s.mul(new o(2).pow(new o(i[1]))))}if(e.startsWith("fixed"))return i=c(e),d("int256",f(r).mul(new o(2).pow(new o(i[1]))));throw new Error("Unsupported or invalid type: "+e)}function p(e,r,n){var i,s,a,c;if("string"==typeof e&&(e=h(e)),"address"===e.name)return p(e.rawType,r,n).toArrayLike(t,"be",20).toString("hex");if("bool"===e.name)return p(e.rawType,r,n).toString()===new o(1).toString();if("string"===e.name){var u=p(e.rawType,r,n);return t.from(u,"utf8").toString()}if(e.isArray){for(a=[],i=e.size,"dynamic"===e.size&&(n=p("uint256",r,n).toNumber(),i=p("uint256",r,n).toNumber(),n+=32),c=0;c<i;c++){var f=p(e.subArray,r,n);a.push(f),n+=e.subArray.memoryUsage}return a}if("bytes"===e.name)return n=p("uint256",r,n).toNumber(),i=p("uint256",r,n).toNumber(),r.slice(n+32,n+32+i);if(e.name.startsWith("bytes"))return r.slice(n,n+e.size);if(e.name.startsWith("uint")){if((s=new o(r.slice(n,n+32),16,"be")).bitLength()>e.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+s.bitLength());return s}if(e.name.startsWith("int")){if((s=new o(r.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+s.bitLength());return s}if(e.name.startsWith("ufixed")){if(i=new o(2).pow(new o(e.size[1])),!(s=p("uint256",r,n)).mod(i).isZero())throw new Error("Decimals not supported yet");return s.div(i)}if(e.name.startsWith("fixed")){if(i=new o(2).pow(new o(e.size[1])),!(s=p("int256",r,n)).mod(i).isZero())throw new Error("Decimals not supported yet");return s.div(i)}throw new Error("Unsupported or invalid type: "+e.name)}function h(e){var t,r,n;if(g(e)){t=u(e);var o=e.slice(0,e.lastIndexOf("["));return o=h(o),{isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:o.memoryUsage*t,subArray:o}}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=a(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=c(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes<N> width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint<N> width: "+r.size);return r}function y(e){return"string"===e||"bytes"===e||"dynamic"===u(e)}function g(e){return e.lastIndexOf("]")===e.length-1}function v(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString()}i.eventID=function(e,r){var o=e+"("+r.map(s).join(",")+")";return n.keccak256(t.from(o))},i.methodID=function(e,t){return i.eventID(e,t).slice(0,4)},i.rawEncode=function(e,r){var n=[],o=[],i=0;e.forEach((function(e){if(g(e)){var t=u(e);i+="dynamic"!==t?32*t:32}else i+=32}));for(var a=0;a<e.length;a++){var c=s(e[a]),f=d(c,r[a]);y(c)?(n.push(d("uint256",i)),o.push(f),i+=f.length):n.push(f)}return t.concat(n.concat(o))},i.rawDecode=function(e,r){var n=[];r=t.from(r);for(var o=0,i=0;i<e.length;i++){var a=h(s(e[i])),c=p(a,r,o);o+=a.memoryUsage,n.push(c)}return n},i.simpleEncode=function(e){var r=Array.prototype.slice.call(arguments).slice(1),n=l(e);if(r.length!==n.args.length)throw new Error("Argument count mismatch");return t.concat([i.methodID(n.method,n.args),i.rawEncode(n.args,r)])},i.simpleDecode=function(e,t){var r=l(e);if(!r.retargs)throw new Error("No return values in method");return i.rawDecode(r.retargs,t)},i.stringify=function(e,t){var r=[];for(var n in e){var o=e[n],i=t[n];i=/^[^\[]+\[.*\]$/.test(o)?i.map((function(e){return v(o,e)})).join(", "):v(o,i),r.push(i)}return r},i.solidityHexValue=function(e,r,o){var s,c;if(g(e)){var l=e.replace(/\[.*?\]/,"");if(!g(l)){var d=u(e);if("dynamic"!==d&&0!==d&&r.length>d)throw new Error("Elements exceed array size: "+d)}var p=r.map((function(e){return i.solidityHexValue(l,e,256)}));return t.concat(p)}if("bytes"===e)return r;if("string"===e)return t.from(r,"utf8");if("bool"===e){o=o||8;var h=Array(o/4).join("0");return t.from(r?h+"1":h+"0","hex")}if("address"===e){var y=20;return o&&(y=o/8),n.setLengthLeft(r,y)}if(e.startsWith("bytes")){if((s=a(e))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);return n.setLengthRight(r,s)}if(e.startsWith("uint")){if((s=a(e))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((c=f(r)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+c.bitLength());return c.toArrayLike(t,"be",(o=o||s)/8)}if(e.startsWith("int")){if((s=a(e))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((c=f(r)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+c.bitLength());return o=o||s,c.toTwos(s).toArrayLike(t,"be",o/8)}throw new Error("Unsupported or invalid type: "+e)},i.solidityPack=function(e,r){if(e.length!==r.length)throw new Error("Number of types are not matching the values");for(var n=[],o=0;o<e.length;o++){var a=s(e[o]);n.push(i.solidityHexValue(a,r[o],null))}return t.concat(n)},i.soliditySHA3=function(e,t){return n.keccak256(i.solidityPack(e,t))},i.soliditySHA256=function(e,t){return n.sha256(i.solidityPack(e,t))},i.solidityRIPEMD160=function(e,t){return n.ripemd160(i.solidityPack(e,t),!0)},i.fromSerpent=function(e){for(var t,r=[],n=0;n<e.length;n++){var o=e[n];if("s"===o)r.push("bytes");else if("b"===o){for(var i="bytes",s=n+1;s<e.length&&(t=e[s])>="0"&&t<="9";)i+=e[s]-"0",s++;n=s-1,r.push(i)}else if("i"===o)r.push("int256");else{if("a"!==o)throw new Error("Unsupported or invalid type: "+o);r.push("int256[]")}}return r},i.toSerpent=function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];if("bytes"===n)t.push("s");else if(n.startsWith("bytes"))t.push("b"+a(n));else if("int256"===n)t.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);t.push("a")}}return t.join("")},e.exports=i}).call(this,r("HDXh").Buffer)},"7GkX":function(e,t,r){var n=r("b80T"),o=r("A90E"),i=r("MMmD");e.exports=function(e){return i(e)?n(e):o(e)}},8:function(e,t){},"8Pg7":function(e,t,r){const n=r("zvTS");e.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}}},"8dO3":function(e,t,r){"use strict";var n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(e){for(var t=0;t<24;++t){var r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],l=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49],p=l^(i<<1|s>>>31),h=d^(s<<1|i>>>31),y=e[0]^p,g=e[1]^h,v=e[10]^p,m=e[11]^h,_=e[20]^p,b=e[21]^h,w=e[30]^p,k=e[31]^h,x=e[40]^p,B=e[41]^h,A=e[2]^(p=r^(a<<1|c>>>31)),T=e[3]^(h=o^(c<<1|a>>>31)),P=e[12]^p,S=e[13]^h,E=e[22]^p,L=e[23]^h,j=e[32]^p,C=e[33]^h,M=e[42]^p,R=e[43]^h,O=e[4]^(p=i^(u<<1|f>>>31)),N=e[5]^(h=s^(f<<1|u>>>31)),H=e[14]^p,U=e[15]^h,z=e[24]^p,I=e[25]^h,K=e[34]^p,F=e[35]^h,D=e[44]^p,q=e[45]^h,W=e[6]^(p=a^(l<<1|d>>>31)),V=e[7]^(h=c^(d<<1|l>>>31)),G=e[16]^p,$=e[17]^h,Z=e[26]^p,J=e[27]^h,X=e[36]^p,Q=e[37]^h,Y=e[46]^p,ee=e[47]^h,te=e[8]^(p=u^(r<<1|o>>>31)),re=e[9]^(h=f^(o<<1|r>>>31)),ne=e[18]^p,oe=e[19]^h,ie=e[28]^p,se=e[29]^h,ae=e[38]^p,ce=e[39]^h,ue=e[48]^p,fe=e[49]^h,le=y,de=g,pe=m<<4|v>>>28,he=v<<4|m>>>28,ye=_<<3|b>>>29,ge=b<<3|_>>>29,ve=k<<9|w>>>23,me=w<<9|k>>>23,_e=x<<18|B>>>14,be=B<<18|x>>>14,we=A<<1|T>>>31,ke=T<<1|A>>>31,xe=S<<12|P>>>20,Be=P<<12|S>>>20,Ae=E<<10|L>>>22,Te=L<<10|E>>>22,Pe=C<<13|j>>>19,Se=j<<13|C>>>19,Ee=M<<2|R>>>30,Le=R<<2|M>>>30,je=N<<30|O>>>2,Ce=O<<30|N>>>2,Me=H<<6|U>>>26,Re=U<<6|H>>>26,Oe=I<<11|z>>>21,Ne=z<<11|I>>>21,He=K<<15|F>>>17,Ue=F<<15|K>>>17,ze=q<<29|D>>>3,Ie=D<<29|q>>>3,Ke=W<<28|V>>>4,Fe=V<<28|W>>>4,De=$<<23|G>>>9,qe=G<<23|$>>>9,We=Z<<25|J>>>7,Ve=J<<25|Z>>>7,Ge=X<<21|Q>>>11,$e=Q<<21|X>>>11,Ze=ee<<24|Y>>>8,Je=Y<<24|ee>>>8,Xe=te<<27|re>>>5,Qe=re<<27|te>>>5,Ye=ne<<20|oe>>>12,et=oe<<20|ne>>>12,tt=se<<7|ie>>>25,rt=ie<<7|se>>>25,nt=ae<<8|ce>>>24,ot=ce<<8|ae>>>24,it=ue<<14|fe>>>18,st=fe<<14|ue>>>18;e[0]=le^~xe&Oe,e[1]=de^~Be&Ne,e[10]=Ke^~Ye&ye,e[11]=Fe^~et&ge,e[20]=we^~Me&We,e[21]=ke^~Re&Ve,e[30]=Xe^~pe&Ae,e[31]=Qe^~he&Te,e[40]=je^~De&tt,e[41]=Ce^~qe&rt,e[2]=xe^~Oe&Ge,e[3]=Be^~Ne&$e,e[12]=Ye^~ye&Pe,e[13]=et^~ge&Se,e[22]=Me^~We&nt,e[23]=Re^~Ve&ot,e[32]=pe^~Ae&He,e[33]=he^~Te&Ue,e[42]=De^~tt&ve,e[43]=qe^~rt&me,e[4]=Oe^~Ge&it,e[5]=Ne^~$e&st,e[14]=ye^~Pe&ze,e[15]=ge^~Se&Ie,e[24]=We^~nt&_e,e[25]=Ve^~ot&be,e[34]=Ae^~He&Ze,e[35]=Te^~Ue&Je,e[44]=tt^~ve&Ee,e[45]=rt^~me&Le,e[6]=Ge^~it&le,e[7]=$e^~st&de,e[16]=Pe^~ze&Ke,e[17]=Se^~Ie&Fe,e[26]=nt^~_e&we,e[27]=ot^~be&ke,e[36]=He^~Ze&Xe,e[37]=Ue^~Je&Qe,e[46]=ve^~Ee&je,e[47]=me^~Le&Ce,e[8]=it^~le&xe,e[9]=st^~de&Be,e[18]=ze^~Ke&Ye,e[19]=Ie^~Fe&et,e[28]=_e^~we&Me,e[29]=be^~ke&Re,e[38]=Ze^~Xe&pe,e[39]=Je^~Qe&he,e[48]=Ee^~je&De,e[49]=Le^~Ce&qe,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},"9SRK":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,i){i=i||n.default,t=t||[];var s=[],a=0,c=(0,o.default)(r);e(t,(function(e,t,r){var n=a++;c(e,(function(e,t){s[n]=t,r(e)}))}),(function(e){i(e,s)}))};var n=i(r("vN+2")),o=i(r("aR5N"));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},A90E:function(e,t,r){var n=r("6sVZ"),o=r("V6Ve"),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},AP2z:function(e,t,r){var n=r("nmnc"),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(c){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},B8du:function(e,t){e.exports=function(){return!1}},BMM2:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,s,a,c=(0,o.default)(e);return c?function(e){var t=-1;return function(){var r=e.next();return r.done?null:{value:r.value,key:++t}}}(c):(r=(0,i.default)(t=e),s=-1,a=r.length,function(){var e=r[++s];return s<a?{value:t[e],key:e}:null})};var n=s(r("MMmD")),o=s(r("oEkW")),i=s(r("7GkX"));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},C939:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("mhLr"),o=r("OZ/i");t.zeros=function(t){return e.allocUnsafe(t).fill(0)},t.setLengthLeft=function(e,r,n){void 0===n&&(n=!1);var o=t.zeros(r);return e=t.toBuffer(e),n?e.length<r?(e.copy(o),o):e.slice(0,r):e.length<r?(e.copy(o,r-e.length),o):e.slice(-r)},t.setLength=t.setLengthLeft,t.setLengthRight=function(e,r){return t.setLength(e,r,!0)},t.unpad=function(e){for(var t=(e=n.stripHexPrefix(e))[0];e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t){if(!n.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(n.padToEven(n.stripHexPrefix(t)),"hex")}else if("number"==typeof t)t=n.intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t},t.bufferToInt=function(e){return new o(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new o(e).fromTwos(256)},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!=typeof e?e:n.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],o=0;o<r.length;o++)n.push(t.baToJSON(r[o]));return n}}}).call(this,r("HDXh").Buffer)},DSRE:function(e,t,r){(function(e){var n=r("Kz5y"),o=r("B8du"),i=t&&!t.nodeType&&t,s=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===i?n.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||o}).call(this,r("YuTi")(e))},DXFP:function(e,t,r){"use strict";var n=r("T6cd"),o=r("Mjbn");e.exports=function(e){var t=n(e),r=o(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},EqmL:function(e,t,r){const n=r("ja2i"),o=r("t7TP");e.exports=class extends n{constructor(){super(({blockTracker:e,provider:t,engine:r})=>{const{events:n,middleware:i}=o({blockTracker:e,provider:t});return n.on("notification",e=>r.emit("data",null,e)),i})}}},ExA7:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},FqFB:function(e,t,r){const n=r("QXrW"),o=r("Nk1h"),i=r("8Pg7"),{hexToInt:s,incrementHexInt:a,minBlockRef:c,blockRefIsNumber:u}=r("UJ2e");e.exports=class extends i{constructor({provider:e,params:t}){super(),this.type="log",this.ethQuery=new n(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},t),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(e=>e.toLowerCase()))}async initialize({currentBlock:e}){let t=this.params.fromBlock;["latest","pending"].includes(t)&&(t=e),"earliest"===t&&(t="0x0"),this.params.fromBlock=t;const r=c(this.params.toBlock,e),n=Object.assign({},this.params,{toBlock:r}),o=await this._fetchLogs(n);this.addInitialResults(o)}async update({oldBlock:e,newBlock:t}){const r=t;let n;n=e?a(e):t;const o=Object.assign({},this.params,{fromBlock:n,toBlock:r}),i=(await this._fetchLogs(o)).filter(e=>this.matchLog(e));this.addResults(i)}async _fetchLogs(e){return await o(t=>this.ethQuery.getLogs(e,t))()}matchLog(e){if(s(this.params.fromBlock)>=s(e.blockNumber))return!1;if(u(this.params.toBlock)&&s(this.params.toBlock)<=s(e.blockNumber))return!1;const t=e.address&&e.address.toLowerCase();return!(this.params.address&&t&&!this.params.address.includes(t))&&this.params.topics.every((t,r)=>{let n=e.topics[r];if(!n)return!1;n=n.toLowerCase();let o=Array.isArray(t)?t:[t];return!!o.includes(null)||(o=o.map(e=>e.toLowerCase())).includes(n)})}}},GoyQ:function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},HtlB:function(e,t,r){const n=r("tnHP"),o=r("ga3E");function i(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!e.length)throw t;const r=e.map((function(e){return"bytes"===e.type?n.toBuffer(e.value):e.value})),i=e.map((function(e){return e.type})),s=e.map((function(e){if(!e.name)throw t;return e.type+" "+e.name}));return o.soliditySHA3(["bytes32","bytes32"],[o.soliditySHA3(new Array(e.length).fill("string"),s),o.soliditySHA3(i,r)])}function s(e,t){const r=n.toBuffer(t),o=n.fromRpcSig(r);return n.ecrecover(e,o.v,o.r,o.s)}function a(e){const t=n.toBuffer(e.data);return s(n.hashPersonalMessage(t),e.sig)}function c(e,t){for(var r=""+e;r.length<t;)r="0"+r;return r}e.exports={concatSig:function(e,t,r){const o=n.fromSigned(t),i=n.fromSigned(r),s=n.bufferToInt(e),a=c(n.toUnsigned(o).toString("hex"),64),u=c(n.toUnsigned(i).toString("hex"),64),f=n.stripHexPrefix(n.intToHex(s));return n.addHexPrefix(a.concat(u,f)).toString("hex")},normalize:function(e){if(e){if("number"==typeof e){const t=n.toBuffer(e);e=n.bufferToHex(t)}if("string"!=typeof e){var t="eth-sig-util.normalize() requires hex string or integer input.";throw new Error(t+=" received "+typeof e+": "+e)}return n.addHexPrefix(e.toLowerCase())}},personalSign:function(e,t){var r=n.toBuffer(t.data),o=n.hashPersonalMessage(r),i=n.ecsign(o,e);return n.bufferToHex(this.concatSig(i.v,i.r,i.s))},recoverPersonalSignature:function(e){const t=a(e),r=n.publicToAddress(t);return n.bufferToHex(r)},extractPublicKey:function(e){return"0x"+a(e).toString("hex")},typedSignatureHash:function(e){const t=i(e);return n.bufferToHex(t)},signTypedData:function(e,t){const r=i(t.data),o=n.ecsign(r,e);return n.bufferToHex(this.concatSig(o.v,o.r,o.s))},recoverTypedSignature:function(e){const t=s(i(e.data),e.sig),r=n.publicToAddress(t);return n.bufferToHex(r)}}},IGju:function(e,t,r){"use strict";e.exports=r("DXFP")(r("qWKu"))},JTzB:function(e,t,r){var n=r("NykK"),o=r("ExA7");e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},KWkM:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(n.default,e,t)};var n=i(r("abV/")),o=i(r("6oS5"));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},KfNM:function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},KwLt:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},Kz5y:function(e,t,r){var n=r("WFqU"),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},LCem:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r("/oFA")),o=i(r("9SRK"));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(o.default),e.exports=t.default},LgDX:function(e,t,r){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=c,t.wrap=u;var o,i=(o=r("3qT5"))&&o.__esModule?o:{default:o},s=t.hasSetImmediate="function"==typeof e&&e,a=t.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function c(e){setTimeout(e,0)}function u(e){return function(t){var r=(0,i.default)(arguments,1);e((function(){t.apply(null,r)}))}}t.default=u(s?e:a?n.nextTick:c)}).call(this,r("URgk").setImmediate,r("KCCg"))},LvDv:function(e,t,r){"use strict";var n=r("rdbr"),o=r("WgPA");e.exports=function(e){if(!n(e.then))throw new TypeError("Expected a promise");return function(t){e.then((function(e){o(t,null,e)}),(function(e){o(t,e)}))}}},MMmD:function(e,t,r){var n=r("lSCD"),o=r("shjB");e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},Mjbn:function(e,t,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");e.exports=function(e){function t(t,r,n,i){o.call(this,i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}return i(t,o),t.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(o){n=o}r(n)},t.prototype._flush=function(){},t.prototype._read=function(e){this.push(this.squeeze(e))},t.prototype.update=function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this},t.prototype.squeeze=function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r},t.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},t.prototype._clone=function(){var e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e},t}},NDoG:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,c){if(c=(0,o.default)(c||n.default),e<=0||!t)return c(null);var u=(0,i.default)(t),f=!1,l=0,d=!1;function p(e,t){if(l-=1,e)f=!0,c(e);else{if(t===a.default||f&&l<=0)return f=!0,c(null);d||h()}}function h(){for(d=!0;l<e&&!f;){var t=u();if(null===t)return f=!0,void(l<=0&&c(null));l+=1,r(t.value,t.key,(0,s.default)(p))}d=!1}h()}};var n=c(r("vN+2")),o=c(r("2sf1")),i=c(r("BMM2")),s=c(r("rH6r")),a=c(r("KwLt"));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},Nk1h:function(e,t,r){"use strict";var n=function(e,t,r){return function(){for(var n=this,o=new Array(arguments.length),i=0;i<arguments.length;i++)o[i]=arguments[i];return new t((function(t,i){o.push((function(e,n){if(e)i(e);else if(r.multiArgs){for(var o=new Array(arguments.length-1),s=1;s<arguments.length;s++)o[s-1]=arguments[s];t(o)}else t(n)})),e.apply(n,o)}))}},o=e.exports=function(e,t,r){"function"!=typeof t&&(r=t,t=Promise),(r=r||{}).exclude=r.exclude||[/.+Sync$/];var o="function"==typeof e?function(){return r.excludeMain?e.apply(this,arguments):n(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce((function(o,i){var s=e[i];return o[i]="function"==typeof s&&function(e){var t=function(t){return"string"==typeof t?e===t:t.test(e)};return r.include?r.include.some(t):!r.exclude.some(t)}(i)?n(s,t,r):s,o}),o)};o.all=o},NykK:function(e,t,r){var n=r("nmnc"),o=r("AP2z"),i=r("KfNM"),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},Pd9Q:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("IzB8"),o=r("OZ/i"),i=r("C939"),s=r("0ZP9");function a(e,t){return t?e-(2*t+35):e-27}function c(e){return 0===e||1===e}t.ecsign=function(e,t,r){var o=n.sign(e,t),i=o.recovery;return{r:o.signature.slice(0,32),s:o.signature.slice(32,64),v:r?i+(2*r+35):i+27}},t.ecrecover=function(t,r,o,s,u){var f=e.concat([i.setLength(o,32),i.setLength(s,32)],64),l=a(r,u);if(!c(l))throw new Error("Invalid signature v value");var d=n.recover(t,f,l);return n.publicKeyConvert(d,!1).slice(1)},t.toRpcSig=function(t,r,n,o){if(!c(a(t,o)))throw new Error("Invalid signature v value");return i.bufferToHex(e.concat([i.setLengthLeft(r,32),i.setLengthLeft(n,32),i.toBuffer(t)]))},t.fromRpcSig=function(e){var t=i.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)}},t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var s=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new o("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!c(a(e,i)))return!1;var f=new o(t),l=new o(r);return!(f.isZero()||f.gt(u)||l.isZero()||l.gt(u)||n&&1===l.cmp(s))},t.hashPersonalMessage=function(t){var r=e.from("Ethereum Signed Message:\n"+t.length.toString(),"utf-8");return s.keccak(e.concat([r,t]))}}).call(this,r("HDXh").Buffer)},PpH3:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(r,n,o){return e(r,t,n,o)}},e.exports=t.default},QXrW:function(e,t,r){const n=r("U6jy"),o=r("2J3U")();function i(e){this.currentProvider=e}function s(e){return function(){const t=this;var r=[].slice.call(arguments),n=r.pop();t.sendAsync({method:e,params:r},n)}}function a(e,t){return function(){const r=this;var n=[].slice.call(arguments),o=n.pop();n.length<e&&n.push("latest"),r.sendAsync({method:t,params:n},o)}}e.exports=i,i.prototype.getBalance=a(2,"eth_getBalance"),i.prototype.getCode=a(2,"eth_getCode"),i.prototype.getTransactionCount=a(2,"eth_getTransactionCount"),i.prototype.getStorageAt=a(3,"eth_getStorageAt"),i.prototype.call=a(2,"eth_call"),i.prototype.protocolVersion=s("eth_protocolVersion"),i.prototype.syncing=s("eth_syncing"),i.prototype.coinbase=s("eth_coinbase"),i.prototype.mining=s("eth_mining"),i.prototype.hashrate=s("eth_hashrate"),i.prototype.gasPrice=s("eth_gasPrice"),i.prototype.accounts=s("eth_accounts"),i.prototype.blockNumber=s("eth_blockNumber"),i.prototype.getBlockTransactionCountByHash=s("eth_getBlockTransactionCountByHash"),i.prototype.getBlockTransactionCountByNumber=s("eth_getBlockTransactionCountByNumber"),i.prototype.getUncleCountByBlockHash=s("eth_getUncleCountByBlockHash"),i.prototype.getUncleCountByBlockNumber=s("eth_getUncleCountByBlockNumber"),i.prototype.sign=s("eth_sign"),i.prototype.sendTransaction=s("eth_sendTransaction"),i.prototype.sendRawTransaction=s("eth_sendRawTransaction"),i.prototype.estimateGas=s("eth_estimateGas"),i.prototype.getBlockByHash=s("eth_getBlockByHash"),i.prototype.getBlockByNumber=s("eth_getBlockByNumber"),i.prototype.getTransactionByHash=s("eth_getTransactionByHash"),i.prototype.getTransactionByBlockHashAndIndex=s("eth_getTransactionByBlockHashAndIndex"),i.prototype.getTransactionByBlockNumberAndIndex=s("eth_getTransactionByBlockNumberAndIndex"),i.prototype.getTransactionReceipt=s("eth_getTransactionReceipt"),i.prototype.getUncleByBlockHashAndIndex=s("eth_getUncleByBlockHashAndIndex"),i.prototype.getUncleByBlockNumberAndIndex=s("eth_getUncleByBlockNumberAndIndex"),i.prototype.getCompilers=s("eth_getCompilers"),i.prototype.compileLLL=s("eth_compileLLL"),i.prototype.compileSolidity=s("eth_compileSolidity"),i.prototype.compileSerpent=s("eth_compileSerpent"),i.prototype.newFilter=s("eth_newFilter"),i.prototype.newBlockFilter=s("eth_newBlockFilter"),i.prototype.newPendingTransactionFilter=s("eth_newPendingTransactionFilter"),i.prototype.uninstallFilter=s("eth_uninstallFilter"),i.prototype.getFilterChanges=s("eth_getFilterChanges"),i.prototype.getFilterLogs=s("eth_getFilterLogs"),i.prototype.getLogs=s("eth_getLogs"),i.prototype.getWork=s("eth_getWork"),i.prototype.submitWork=s("eth_submitWork"),i.prototype.submitHashrate=s("eth_submitHashrate"),i.prototype.sendAsync=function(e,t){var r;this.currentProvider.sendAsync((r=e,n({id:o(),jsonrpc:"2.0",params:[]},r)),(function(e,r){if(!e&&r.error&&(e=new Error("EthQuery - RPC Error - "+r.error.message)),e)return t(e);t(null,r.result)}))}},Rlsf:function(e,t,r){const n=r("l1gh"),o=r("KWkM"),i=r("MCLT").inherits,s=r("tnHP"),a=r("HtlB"),c=r("U6jy"),u=r("odnP"),f=r("Uu7K"),l=r("a5O3"),d=/^[0-9A-Fa-f]+$/g;function p(e){this.nonceLock=u(1),e.getAccounts&&(this.getAccounts=e.getAccounts),e.processTransaction&&(this.processTransaction=e.processTransaction),e.processMessage&&(this.processMessage=e.processMessage),e.processPersonalMessage&&(this.processPersonalMessage=e.processPersonalMessage),e.processTypedMessage&&(this.processTypedMessage=e.processTypedMessage),this.approveTransaction=e.approveTransaction||this.autoApprove,this.approveMessage=e.approveMessage||this.autoApprove,this.approvePersonalMessage=e.approvePersonalMessage||this.autoApprove,this.approveDecryptMessage=e.approveDecryptMessage||this.autoApprove,this.approveEncryptionPublicKey=e.approveEncryptionPublicKey||this.autoApprove,this.approveTypedMessage=e.approveTypedMessage||this.autoApprove,e.signTransaction&&(this.signTransaction=e.signTransaction||m("signTransaction")),e.signMessage&&(this.signMessage=e.signMessage||m("signMessage")),e.signPersonalMessage&&(this.signPersonalMessage=e.signPersonalMessage||m("signPersonalMessage")),e.decryptMessage&&(this.decryptMessage=e.decryptMessage||m("decryptMessage")),e.encryptionPublicKey&&(this.encryptionPublicKey=e.encryptionPublicKey||m("encryptionPublicKey")),e.signTypedMessage&&(this.signTypedMessage=e.signTypedMessage||m("signTypedMessage")),e.recoverPersonalSignature&&(this.recoverPersonalSignature=e.recoverPersonalSignature),e.publishTransaction&&(this.publishTransaction=e.publishTransaction),this.estimateGas=e.estimateGas||this.estimateGas,this.getGasPrice=e.getGasPrice||this.getGasPrice}function h(e){return e.toLowerCase()}function y(e){const t=s.addHexPrefix(e);return s.isValidAddress(t)}function g(e){const t=s.addHexPrefix(e);return!s.isValidAddress(t)&&v(e)}function v(e){return"string"==typeof e&&"0x"===e.slice(0,2)&&e.slice(2).match(d)}function m(e){return function(t,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+e+'" fn in constructor options'))}}e.exports=p,i(p,f),p.prototype.handleRequest=function(e,t,r){const o=this;let i,s,a,u,f;switch(o._parityRequests={},o._parityRequestCount=0,e.method){case"eth_coinbase":return void o.getAccounts((function(e,t){if(e)return r(e);r(null,t[0]||null)}));case"eth_accounts":return void o.getAccounts((function(e,t){if(e)return r(e);r(null,t)}));case"eth_sendTransaction":return i=e.params[0],void n([e=>o.validateTransaction(i,e),e=>o.processTransaction(i,e)],r);case"eth_signTransaction":return i=e.params[0],void n([e=>o.validateTransaction(i,e),e=>o.processSignTransaction(i,e)],r);case"eth_sign":return s=c(a=e.params[2]||{},{from:f=e.params[0],data:u=e.params[1]}),void n([e=>o.validateMessage(s,e),e=>o.processMessage(s,e)],r);case"personal_sign":return function(){const t=e.params[0];if(g(e.params[1])&&y(t)){let t="The eth_personalSign method requires params ordered ";t+="[message, address]. This was previously handled incorrectly, ",t+="and has been corrected automatically. ",t+="Please switch this param order for smooth behavior in the future.",console.warn(t),f=e.params[0],u=e.params[1]}else u=e.params[0],f=e.params[1];s=c(a=e.params[2]||{},{from:f,data:u}),n([e=>o.validatePersonalMessage(s,e),e=>o.processPersonalMessage(s,e)],r)}();case"eth_decryptMessage":return function(){const t=e.params[0];if(g(e.params[1])&&y(t)){let t="The eth_decryptMessage method requires params ordered ";t+="[message, address]. This was previously handled incorrectly, ",t+="and has been corrected automatically. ",t+="Please switch this param order for smooth behavior in the future.",console.warn(t),f=e.params[0],u=e.params[1]}else u=e.params[0],f=e.params[1];s=c(a=e.params[2]||{},{from:f,data:u}),n([e=>o.validateDecryptMessage(s,e),e=>o.processDecryptMessage(s,e)],r)}();case"encryption_public_key":return function(){const t=e.params[0];n([e=>o.validateEncryptionPublicKey(t,e),e=>o.processEncryptionPublicKey(t,e)],r)}();case"personal_ecRecover":return s=c(a=e.params[2]||{},{sig:e.params[1],data:u=e.params[0]}),void o.recoverPersonalSignature(s,r);case"eth_signTypedData":return s=c(a=e.params[2]||{},{from:f=e.params[1],data:u=e.params[0]}),void n([e=>o.validateTypedMessage(s,e),e=>o.processTypedMessage(s,e)],r);case"parity_postTransaction":return void o.parityPostTransaction(i=e.params[0],r);case"parity_postSign":return void o.parityPostSign(f=e.params[0],u=e.params[1],r);case"parity_checkRequest":return void o.parityCheckRequest(e.params[0],r);case"parity_defaultAccount":return void o.getAccounts((function(e,t){if(e)return r(e);r(null,t[0]||null)}));default:return void t()}},p.prototype.getAccounts=function(e){e(null,[])},p.prototype.processTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeAndSubmitTx(e,t)],t)},p.prototype.processSignTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeTx(e,t)],t)},p.prototype.processMessage=function(e,t){const r=this;n([t=>r.approveMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signMessage(e,t)],t)},p.prototype.processPersonalMessage=function(e,t){const r=this;n([t=>r.approvePersonalMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signPersonalMessage(e,t)],t)},p.prototype.processDecryptMessage=function(e,t){const r=this;n([t=>r.approveDecryptMessage(e,t),(e,t)=>r.checkApproval("decryptMessage",e,t),t=>r.decryptMessage(e,t)],t)},p.prototype.processEncryptionPublicKey=function(e,t){const r=this;n([t=>r.approveEncryptionPublicKey(e,t),(e,t)=>r.checkApproval("encryptionPublicKey",e,t),t=>r.encryptionPublicKey(e,t)],t)},p.prototype.processTypedMessage=function(e,t){const r=this;n([t=>r.approveTypedMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signTypedMessage(e,t)],t)},p.prototype.autoApprove=function(e,t){t(null,!0)},p.prototype.checkApproval=function(e,t,r){r(t?null:new Error("User denied "+e+" signature."))},p.prototype.parityPostTransaction=function(e,t){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[e]},(function(e,t){r._parityRequests[n]=e?{error:e}:t.result})),t(null,n)},p.prototype.parityPostSign=function(e,t,r){const n=this,o=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[e,t]},(function(e,t){n._parityRequests[o]=e?{error:e}:t.result})),r(null,o)},p.prototype.parityCheckRequest=function(e,t){const r=this._parityRequests[e]||null;return r?r.error?t(r.error):void t(null,r):t(null,null)},p.prototype.recoverPersonalSignature=function(e,t){let r;try{r=a.recoverPersonalSignature(e)}catch(n){return t(n)}t(null,r)},p.prototype.validateTransaction=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign transaction."));this.validateSender(e.from,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign transaction for this address: "${e.from}"`))}))},p.prototype.validateMessage=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign message."));this.validateSender(e.from,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))}))},p.prototype.validatePersonalMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign personal message.")):void 0===e.data?t(new Error("Undefined message - message required to sign personal message.")):v(e.data)?void this.validateSender(e.from,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})):t(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},p.prototype.validateDecryptMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to decrypt message.")):void 0===e.data?t(new Error("Undefined message - message required to decrypt message.")):v(e.data)?void this.validateSender(e.from,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to decrypt message for this address: "${e.from}"`))})):t(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},p.prototype.validateEncryptionPublicKey=function(e,t){this.validateSender(e,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to obtain encryption public key for this address: "${e}"`))}))},p.prototype.validateTypedMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign typed data.")):void 0===e.data?t(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(e.from,(function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))}))},p.prototype.validateSender=function(e,t){if(!e)return t(null,!1);this.getAccounts((function(r,n){if(r)return t(r);const o=-1!==n.map(h).indexOf(e.toLowerCase());t(null,o)}))},p.prototype.finalizeAndSubmitTx=function(e,t){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r),r.publishTransaction.bind(r)],(function(e,n){if(r.nonceLock.leave(),e)return t(e);t(null,n)}))}))},p.prototype.finalizeTx=function(e,t){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r)],(function(n,o){if(r.nonceLock.leave(),n)return t(n);t(null,{raw:o,tx:e})}))}))},p.prototype.publishTransaction=function(e,t){this.emitPayload({method:"eth_sendRawTransaction",params:[e]},(function(e,r){if(e)return t(e);t(null,r.result)}))},p.prototype.estimateGas=function(e,t){l(this.engine,e,t)},p.prototype.getGasPrice=function(e){this.emitPayload({method:"eth_gasPrice",params:[]},(function(t,r){if(t)return e(t);e(null,r.result)}))},p.prototype.fillInTxExtras=function(e,t){const r=e.from,n={};void 0===e.gasPrice&&(n.gasPrice=this.getGasPrice.bind(this)),void 0===e.nonce&&(n.nonce=this.emitPayload.bind(this,{method:"eth_getTransactionCount",params:[r,"pending"]})),void 0===e.gas&&(n.gas=this.estimateGas.bind(this,function(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gas:e.gas,gasPrice:e.gasPrice,nonce:e.nonce}}(e))),o(n,(function(r,n){if(r)return t(r);const o={};n.gasPrice&&(o.gasPrice=n.gasPrice),n.nonce&&(o.nonce=n.nonce.result),n.gas&&(o.gas=n.gas),t(null,c(e,o))}))}},T6cd:function(e,t,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");e.exports=function(e){function t(t,r,n,i,s){o.call(this,s),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new e,this._state.initialize(t,r),this._finalized=!1}return i(t,o),t.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(o){n=o}r(n)},t.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},t.prototype.update=function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(e)||(e=n.from(e,t)),this._state.absorb(e),this},t.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t},t.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},t.prototype._clone=function(){var e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e},t}},UJ2e:function(e,t){function r(e){return e.sort((e,t)=>"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:n(e)-n(t))}function n(e){return null==e?e:Number.parseInt(e,16)}function o(e){if(null==e)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function i(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(...e){return r(e)[0]},maxBlockRef:function(...e){const t=r(e);return t[t.length-1]},sortBlockRefs:r,bnToHex:function(e){return"0x"+e.toString(16)},blockRefIsNumber:function(e){return e&&!["earliest","latest","pending"].includes(e)},hexToInt:n,incrementHexInt:function(e){return null==e?e:o(n(e)+1)},intToHex:o,unsafeRandomBytes:function(e){let t="0x";for(let r=0;r<e;r++)t+=i(),t+=i();return t}}},"UNi/":function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},Uu7K:function(e,t,r){const n=r("xQaN");function o(){}e.exports=o,o.prototype.setEngine=function(e){const t=this;t.engine||(t.engine=e,e.on("block",(function(e){t.currentBlock=e})),e.on("start",(function(){t.start()})),e.on("stop",(function(){t.stop()})))},o.prototype.handleRequest=function(e,t,r){throw new Error("Subproviders should override `handleRequest`.")},o.prototype.emitPayload=function(e,t){this.engine.sendAsync(n(e),t)},o.prototype.stop=function(){},o.prototype.start=function(){}},V5x4:function(e,t,r){const n=r("4CaD"),o=r("/u+i");function i(e,t){return new Promise(r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()})}e.exports=class extends o{constructor(e={}){if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");const t=e.pollingInterval||2e4,r=e.retryTimeout||t/10,n=void 0===e.keepEventLoopActive||e.keepEventLoopActive,o=e.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:t},e)),this._provider=e.provider,this._pollingInterval=t,this._retryTimeout=r,this._keepEventLoopActive=n,this._setSkipCacheFlag=o}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch(e=>this.emit("error",e))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await i(this._pollingInterval,!this._keepEventLoopActive)}catch(e){const r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${e.stack}`);try{this.emit("error",r)}catch(t){console.error(r)}await i(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){const e={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0);const t=await n(t=>this._provider.sendAsync(e,t))();if(t.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${t.error}`);return t.result}}},V6Ve:function(e,t,r){var n=r("kekF")(Object.keys,Object);e.exports=n},WFqU:function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r("yLpj"))},WPTD:function(e,t,r){(function(t){const n=r(t.browser?"7sdD":8),o=r("MCLT").inherits,i=r("xQaN"),s=r("Uu7K"),{ethErrors:a,serializeError:c}=r("z8+S");function u(e){this.rpcUrl=e.rpcUrl}e.exports=u,o(u,s),u.prototype.handleRequest=function(e,t,r){const o=this.rpcUrl;let s=i(e);n({uri:o,method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s),rejectUnauthorized:!1,timeout:2e4},(function(e,t,n){if(e)return r(c(e));switch(t.statusCode){case 405:return r(a.rpc.methodNotFound());case 504:return function(){let e="Gateway timeout. The request took too long to process. ";e+="This can happen when querying logs over too wide a block range.";const t=new Error("Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.");return r(c(t))}();case 429:return function(){const e=new Error("Too Many Requests");return r(c(e))}();default:if(200!=t.statusCode){const e=new Error("Unknown Error: "+t.body);return r(c(e))}}let o;try{o=JSON.parse(n)}catch(e){return console.error(e.stack),r(c(e))}if(o.error)return r(o.error);r(null,o.result)}))}}).call(this,r("KCCg"))},WgPA:function(e,t,r){"use strict";(function(t){e.exports="function"==typeof t?t:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,r("URgk").setImmediate)},YOJA:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r("tMv7")),o=i(r("PpH3"));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)(n.default,1),e.exports=t.default},Z0cm:function(e,t){var r=Array.isArray;e.exports=r},a5O3:function(e,t,r){const n=r("xQaN");e.exports=function(e,t,r){e.sendAsync(n({method:"eth_estimateGas",params:[t]}),(function(e,t){if(e)return"no contract code at given address"===e.message?r(null,"0xcf08"):r(e);r(null,t.result)}))}},aR5N:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var n,o=(n=r("56vw"))&&n.__esModule?n:{default:n},i="function"==typeof Symbol;function s(e){return i&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return s(e)?(0,o.default)(e):e},t.isAsync=s},"abV/":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){((0,n.default)(e)?d:p)(e,(0,f.default)(t),r)};var n=l(r("MMmD")),o=l(r("KwLt")),i=l(r("k2x9")),s=l(r("PpH3")),a=l(r("vN+2")),c=l(r("2sf1")),u=l(r("rH6r")),f=l(r("aR5N"));function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){r=(0,c.default)(r||a.default);var n=0,i=0,s=e.length;function f(e,t){e?r(e):++i!==s&&t!==o.default||r(null)}for(0===s&&r(null);n<s;n++)t(e[n],n,(0,u.default)(f))}var p=(0,s.default)(i.default,1/0);e.exports=t.default},b80T:function(e,t,r){var n=r("UNi/"),o=r("03A+"),i=r("Z0cm"),s=r("DSRE"),a=r("wJg7"),c=r("c6wG"),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),f=!r&&o(e),l=!r&&!f&&s(e),d=!r&&!f&&!l&&c(e),p=r||f||l||d,h=p?n(e.length,String):[],y=h.length;for(var g in e)!t&&!u.call(e,g)||p&&("length"==g||l&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,y))||h.push(g);return h}},boA1:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("OZ/i");t.MAX_INTEGER=new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new n("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=e.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=e.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=e.from(t.KECCAK256_RLP_S,"hex")}).call(this,r("HDXh").Buffer)},c6wG:function(e,t,r){var n=r("dD9F"),o=r("sEf8"),i=r("mdPL"),s=i&&i.isTypedArray,a=s?o(s):n;e.exports=a},"cC/c":function(e,t,r){const n=r("ja2i"),o=r("2nhq");e.exports=class extends n{constructor(){super(({blockTracker:e,provider:t})=>o({blockTracker:e,provider:t}))}}},"dAl+":function(e,t,r){(function(e,r){var n="Expected a function",o=1,i=2,s=1/0,a=9007199254740991,c="[object Arguments]",u="[object Array]",f="[object Boolean]",l="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",y="[object Map]",g="[object Number]",v="[object Object]",m="[object RegExp]",_="[object Set]",b="[object String]",w="[object Symbol]",k="[object ArrayBuffer]",x="[object DataView]",B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,A=/^\w*$/,T=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,E=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j[c]=j[u]=j[k]=j[f]=j[x]=j[l]=j[d]=j[p]=j[y]=j[g]=j[v]=j[m]=j[_]=j[b]=j["[object WeakMap]"]=!1;var C="object"==typeof e&&e&&e.Object===Object&&e,M="object"==typeof self&&self&&self.Object===Object&&self,R=C||M||Function("return this")(),O=t&&!t.nodeType&&t,N=O&&"object"==typeof r&&r&&!r.nodeType&&r,H=N&&N.exports===O&&C.process,U=function(){try{return H&&H.binding("util")}catch(e){}}(),z=U&&U.isTypedArray;function I(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function K(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function F(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function D(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}function q(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function W(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var V,G,$,Z=Array.prototype,J=Function.prototype,X=Object.prototype,Q=R["__core-js_shared__"],Y=(V=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",ee=J.toString,te=X.hasOwnProperty,re=X.toString,ne=RegExp("^"+ee.call(te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=R.Symbol,ie=R.Uint8Array,se=X.propertyIsEnumerable,ae=Z.splice,ce=oe?oe.isConcatSpreadable:void 0,ue=(G=Object.keys,$=Object,function(e){return G($(e))}),fe=Ie(R,"DataView"),le=Ie(R,"Map"),de=Ie(R,"Promise"),pe=Ie(R,"Set"),he=Ie(R,"WeakMap"),ye=Ie(Object,"create"),ge=Ze(fe),ve=Ze(le),me=Ze(de),_e=Ze(pe),be=Ze(he),we=oe?oe.prototype:void 0,ke=we?we.valueOf:void 0,xe=we?we.toString:void 0;function Be(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ae(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Pe(e){var t=-1,r=e?e.length:0;for(this.__data__=new Te;++t<r;)this.add(e[t])}function Se(e){this.__data__=new Ae(e)}function Ee(e,t){for(var r=e.length;r--;)if(Xe(e[r][0],t))return r;return-1}Be.prototype.clear=function(){this.__data__=ye?ye(null):{}},Be.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Be.prototype.get=function(e){var t=this.__data__;if(ye){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return te.call(t,e)?t[e]:void 0},Be.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:te.call(t,e)},Be.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?"__lodash_hash_undefined__":t,this},Ae.prototype.clear=function(){this.__data__=[]},Ae.prototype.delete=function(e){var t=this.__data__,r=Ee(t,e);return!(r<0||(r==t.length-1?t.pop():ae.call(t,r,1),0))},Ae.prototype.get=function(e){var t=this.__data__,r=Ee(t,e);return r<0?void 0:t[r][1]},Ae.prototype.has=function(e){return Ee(this.__data__,e)>-1},Ae.prototype.set=function(e,t){var r=this.__data__,n=Ee(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Te.prototype.clear=function(){this.__data__={hash:new Be,map:new(le||Ae),string:new Be}},Te.prototype.delete=function(e){return ze(this,e).delete(e)},Te.prototype.get=function(e){return ze(this,e).get(e)},Te.prototype.has=function(e){return ze(this,e).has(e)},Te.prototype.set=function(e,t){return ze(this,e).set(e,t),this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.clear=function(){this.__data__=new Ae},Se.prototype.delete=function(e){return this.__data__.delete(e)},Se.prototype.get=function(e){return this.__data__.get(e)},Se.prototype.has=function(e){return this.__data__.has(e)},Se.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ae){var n=r.__data__;if(!le||n.length<199)return n.push([e,t]),this;r=this.__data__=new Te(n)}return r.set(e,t),this};var Le,je=(Le=function(e,t){return e&&Ce(e,t,at)},function(e,t){if(null==e)return e;if(!et(e))return Le(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e}),Ce=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}return e};function Me(e,t){for(var r=0,n=(t=qe(t,e)?[t]:He(t)).length;null!=e&&r<n;)e=e[$e(t[r++])];return r&&r==n?e:void 0}function Re(e,t){return null!=e&&t in Object(e)}function Oe(e,t,r,n,s){return e===t||(null==e||null==t||!nt(e)&&!ot(t)?e!=e&&t!=t:function(e,t,r,n,s,a){var p=Ye(e),h=Ye(t),B=u,A=u;p||(B=(B=Ke(e))==c?v:B),h||(A=(A=Ke(t))==c?v:A);var T=B==v&&!D(e),P=A==v&&!D(t),S=B==A;if(S&&!T)return a||(a=new Se),p||st(e)?Ue(e,t,r,n,s,a):function(e,t,r,n,s,a,c){switch(r){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!n(new ie(e),new ie(t)));case f:case l:case g:return Xe(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case y:var u=q;case _:if(u||(u=W),e.size!=t.size&&!(a&i))return!1;var p=c.get(e);if(p)return p==t;a|=o,c.set(e,t);var h=Ue(u(e),u(t),n,s,a,c);return c.delete(e),h;case w:if(ke)return ke.call(e)==ke.call(t)}return!1}(e,t,B,r,n,s,a);if(!(s&i)){var E=T&&te.call(e,"__wrapped__"),L=P&&te.call(t,"__wrapped__");if(E||L){var j=E?e.value():e,C=L?t.value():t;return a||(a=new Se),r(j,C,n,s,a)}}return!!S&&(a||(a=new Se),function(e,t,r,n,o,s){var a=o&i,c=at(e),u=c.length;if(u!=at(t).length&&!a)return!1;for(var f=u;f--;){var l=c[f];if(!(a?l in t:te.call(t,l)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var p=!0;s.set(e,t),s.set(t,e);for(var h=a;++f<u;){var y=e[l=c[f]],g=t[l];if(n)var v=a?n(g,y,l,t,e,s):n(y,g,l,e,t,s);if(!(void 0===v?y===g||r(y,g,n,o,s):v)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,s,a))}(e,t,Oe,r,n,s))}function Ne(e,t){var r=-1,n=et(e)?Array(e.length):[];return je(e,(function(e,o,i){n[++r]=t(e,o,i)})),n}function He(e){return Ye(e)?e:Ge(e)}function Ue(e,t,r,n,s,a){var c=s&i,u=e.length,f=t.length;if(u!=f&&!(c&&f>u))return!1;var l=a.get(e);if(l&&a.get(t))return l==t;var d=-1,p=!0,h=s&o?new Pe:void 0;for(a.set(e,t),a.set(t,e);++d<u;){var y=e[d],g=t[d];if(n)var v=c?n(g,y,d,t,e,a):n(y,g,d,e,t,a);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!F(t,(function(e,t){if(!h.has(t)&&(y===e||r(y,e,n,s,a)))return h.add(t)}))){p=!1;break}}else if(y!==g&&!r(y,g,n,s,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ze(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Ie(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!nt(e)||function(e){return!!Y&&Y in e}(e))&&(tt(e)||D(e)?ne:E).test(Ze(e))}(r)?r:void 0}var Ke=function(e){return re.call(e)};function Fe(e){return Ye(e)||Qe(e)||!!(ce&&e&&e[ce])}function De(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||L.test(e))&&e>-1&&e%1==0&&e<t}function qe(e,t){if(Ye(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!it(e))||A.test(e)||!B.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!nt(e)}function Ve(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}(fe&&Ke(new fe(new ArrayBuffer(1)))!=x||le&&Ke(new le)!=y||de&&"[object Promise]"!=Ke(de.resolve())||pe&&Ke(new pe)!=_||he&&"[object WeakMap]"!=Ke(new he))&&(Ke=function(e){var t=re.call(e),r=t==v?e.constructor:void 0,n=r?Ze(r):void 0;if(n)switch(n){case ge:return x;case ve:return y;case me:return"[object Promise]";case _e:return _;case be:return"[object WeakMap]"}return t});var Ge=Je((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(it(e))return xe?xe.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var r=[];return T.test(e)&&r.push(""),e.replace(P,(function(e,t,n,o){r.push(n?o.replace(S,"$1"):t||e)})),r}));function $e(e){if("string"==typeof e||it(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Ze(e){if(null!=e){try{return ee.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Je(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(Je.Cache||Te),r}function Xe(e,t){return e===t||e!=e&&t!=t}function Qe(e){return function(e){return ot(e)&&et(e)}(e)&&te.call(e,"callee")&&(!se.call(e,"callee")||re.call(e)==c)}Je.Cache=Te;var Ye=Array.isArray;function et(e){return null!=e&&rt(e.length)&&!tt(e)}function tt(e){var t=nt(e)?re.call(e):"";return t==p||t==h}function rt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function nt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ot(e){return!!e&&"object"==typeof e}function it(e){return"symbol"==typeof e||ot(e)&&re.call(e)==w}var st=z?function(e){return function(t){return e(t)}}(z):function(e){return ot(e)&&rt(e.length)&&!!j[re.call(e)]};function at(e){return et(e)?function(e,t){var r=Ye(e)||Qe(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!te.call(e,i)||o&&("length"==i||De(i,n))||r.push(i);return r}(e):function(e){if((t=e)!==("function"==typeof(r=t&&t.constructor)&&r.prototype||X))return ue(e);var t,r,n=[];for(var o in Object(e))te.call(e,o)&&"constructor"!=o&&n.push(o);return n}(e)}function ct(e){return e}r.exports=function(e,t){return function e(t,r,n,o,i){var s=-1,a=t.length;for(n||(n=Fe),i||(i=[]);++s<a;){var c=t[s];r>0&&n(c)?r>1?e(c,r-1,n,o,i):K(i,c):o||(i[i.length]=c)}return i}(function(e,t){return(Ye(e)?I:Ne)(e,"function"==typeof(r=t)?r:null==r?ct:"object"==typeof r?Ye(r)?function(e,t){return qe(e)&&We(t)?Ve($e(e),t):function(r){var n=function(e,t,r){var n=null==e?void 0:Me(e,t);return void 0===n?void 0:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){for(var n,o=-1,i=(t=qe(t,e)?[t]:He(t)).length;++o<i;){var s=$e(t[o]);if(!(n=null!=e&&r(e,s)))break;e=e[s]}return n||!!(i=e?e.length:0)&&rt(i)&&De(s,i)&&(Ye(e)||Qe(e))}(e,t,Re)}(r,e):Oe(t,n,void 0,o|i)}}(r[0],r[1]):1==(s=function(e){for(var t=at(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,We(o)]}return t}(n=r)).length&&s[0][2]?Ve(s[0][0],s[0][1]):function(e){return e===n||function(e,t,r,n){var s=r.length,a=s;if(null==e)return!a;for(e=Object(e);s--;){var c=r[s];if(c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=r[s])[0],f=e[u],l=c[1];if(c[2]){if(void 0===f&&!(u in e))return!1}else{var d=new Se;if(!Oe(l,f,void 0,o|i,d))return!1}}return!0}(e,0,s)}:qe(a=r)?(c=$e(a),function(e){return null==e?void 0:e[c]}):function(e){return function(t){return Me(t,e)}}(a));var r,n,s,a,c}(e,t),1)}}).call(this,r("yLpj"),r("YuTi")(e))},dD9F:function(e,t,r){var n=r("NykK"),o=r("shjB"),i=r("ExA7"),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[n(e)]}},dhqH:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("9lTW"),o=r("mhLr"),i=r("IzB8"),s=r("OZ/i"),a=r("C939"),c=r("0ZP9");t.zeroAddress=function(){var e=a.zeros(20);return a.bufferToHex(e)},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===a.addHexPrefix(e)},t.toChecksumAddress=function(e,t){e=o.stripHexPrefix(e).toLowerCase();for(var r=void 0!==t?t.toString()+"0x":"",n=c.keccak(r+e).toString("hex"),i="0x",s=0;s<e.length;s++)parseInt(n[s],16)>=8?i+=e[s].toUpperCase():i+=e[s];return i},t.isValidChecksumAddress=function(e,r){return t.isValidAddress(e)&&t.toChecksumAddress(e,r)===e},t.generateAddress=function(t,r){t=a.toBuffer(t);var n=new s(r);return n.isZero()?c.rlphash([t,null]).slice(-20):c.rlphash([t,e.from(n.toArray())]).slice(-20)},t.generateAddress2=function(t,r,o){var i=a.toBuffer(t),s=a.toBuffer(r),u=a.toBuffer(o);return n(20===i.length),n(32===s.length),c.keccak256(e.concat([e.from("ff","hex"),i,s,c.keccak256(u)])).slice(-20)},t.isPrecompiled=function(e){var t=a.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},t.isValidPrivate=function(e){return i.privateKeyVerify(e)},t.isValidPublic=function(t,r){return void 0===r&&(r=!1),64===t.length?i.publicKeyVerify(e.concat([e.from([4]),t])):!!r&&i.publicKeyVerify(t)},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=a.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),n(64===e.length),c.keccak(e).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e))},t.privateToPublic=function(e){return e=a.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)},t.importPublic=function(e){return 64!==(e=a.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e}}).call(this,r("HDXh").Buffer)},f4g2:function(e,t,r){const n=r("+qE3").EventEmitter,o=r("MCLT").inherits,i=r("tnHP"),s=r("V5x4"),a=r("LCem"),c=r("YOJA"),u=r("/uSP"),f=(r("gO+T"),r("xQaN")),l=function(){};function d(e){n.call(this),this.setMaxListeners(30),e=e||{};const t={sendAsync:this._handleAsync.bind(this)};this._blockTracker=e.blockTracker||new s({provider:e.blockTrackerProvider||t,pollingInterval:e.pollingInterval||4e3,setSkipCacheFlag:!0}),this._ready=new u,this.currentBlock=null,this._providers=[]}e.exports=d,o(d,n),d.prototype.start=function(e=l){const t=this;t._ready.go(),t._blockTracker.on("latest",e=>{t._getBlockByNumberWithRetry(e,(e,r)=>{if(e)return void this.emit("error",e);if(!r)return console.log(r),void this.emit("error",new Error("Could not find block"));const n=function(e){return{number:i.toBuffer(e.number),hash:i.toBuffer(e.hash),parentHash:i.toBuffer(e.parentHash),nonce:i.toBuffer(e.nonce),mixHash:i.toBuffer(e.mixHash),sha3Uncles:i.toBuffer(e.sha3Uncles),logsBloom:i.toBuffer(e.logsBloom),transactionsRoot:i.toBuffer(e.transactionsRoot),stateRoot:i.toBuffer(e.stateRoot),receiptsRoot:i.toBuffer(e.receiptRoot||e.receiptsRoot),miner:i.toBuffer(e.miner),difficulty:i.toBuffer(e.difficulty),totalDifficulty:i.toBuffer(e.totalDifficulty),size:i.toBuffer(e.size),extraData:i.toBuffer(e.extraData),gasLimit:i.toBuffer(e.gasLimit),gasUsed:i.toBuffer(e.gasUsed),timestamp:i.toBuffer(e.timestamp),transactions:e.transactions}}(r);t._setCurrentBlock(n),t.emit("rawBlock",r),t.emit("latest",r)})}),t._blockTracker.on("sync",t.emit.bind(t,"sync")),t._blockTracker.on("error",t.emit.bind(t,"error")),t._running=!0,t.emit("start")},d.prototype.stop=function(){this._blockTracker.removeAllListeners(),this._running=!1,this.emit("stop")},d.prototype.isRunning=function(){return this._running},d.prototype.addProvider=function(e,t){"number"==typeof t?this._providers.splice(t,0,e):this._providers.push(e),e.setEngine(this)},d.prototype.removeProvider=function(e){const t=this._providers.indexOf(e);if(t<0)throw new Error("Provider not found.");this._providers.splice(t,1)},d.prototype.send=function(e){throw new Error("Web3ProviderEngine does not support synchronous requests.")},d.prototype.sendAsync=function(e,t){const r=this;r._ready.await((function(){Array.isArray(e)?a(e,r._handleAsync.bind(r),t):r._handleAsync(e,t)}))},d.prototype._getBlockByNumberWithRetry=function(e,t){const r=this;let n=5;return void o();function o(){r._getBlockByNumber(e,i)}function i(e,r){return e?t(e):r?void t(null,r):n>0?(n--,void setTimeout((function(){o()}),1e3)):void t(null,null)}},d.prototype._getBlockByNumber=function(e,t){const r=f({method:"eth_getBlockByNumber",params:[e,!1],skipCache:!0});this._handleAsync(r,(e,r)=>e?t(e):t(null,r.result))},d.prototype._handleAsync=function(e,t){var r=this,n=-1,o=null,i=null,s=[];function a(r,n){i=r,o=n,c(s,(function(e,t){e?e(i,o,t):t()}),(function(){var r={id:e.id,jsonrpc:e.jsonrpc,result:o};null!=i?(r.error={message:i.stack||i.message||i,code:-32e3},t(i,r)):t(null,r)}))}!function t(o){if(n+=1,s.unshift(o),n>=r._providers.length)a(new Error('Request for method "'+e.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{r._providers[n].handleRequest(e,t,a)}catch(i){a(i)}}()},d.prototype._setCurrentBlock=function(e){this.currentBlock=e,this.emit("block",e)}},"gO+T":function(e,t,r){const n=r("rE/H");function o(e){return"never"!==a(e)}function i(e){var t=s(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function s(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function a(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}e.exports={cacheIdentifierForPayload:function(e,t={}){if(!o(e))return null;const{includeBlockRef:r}=t,s=r?e.params:i(e);return e.method+":"+n(s)},canCache:o,blockTagForPayload:function(e){var t=s(e);return t>=e.params.length?null:e.params[t]},paramsWithoutBlockTag:i,blockTagParamIndex:s,cacheTypeForPayload:a}},ga3E:function(e,t,r){e.exports=r("6vPO")},hGab:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,o.default)(arguments),r=t.pop();e.call(this,t,r)}};var n,o=(n=r("3qT5"))&&n.__esModule?n:{default:n};e.exports=t.default},hyCD:function(e,t,r){const n=r("dAl+"),o=r("zvTS"),i=r("0QlC"),{incrementHexInt:s}=r("UJ2e");e.exports=class extends o{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){const t=e,r=s(e),o=await i({provider:this.provider,fromBlock:r,toBlock:t}),a=n(o,e=>e.transactions);this.addResults(a)}}},j6BP:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,n){return e(t,n)}},e.exports=t.default},ja2i:function(e,t,r){const n=r("Uu7K");e.exports=class extends n{constructor(e){if(super(),!e)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=e}setEngine(e){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const t=this._constructorFn({engine:e,provider:e,blockTracker:e._blockTracker});if(!t)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof t)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=t}handleRequest(e,t,r){const n={id:e.id};this.middleware(e,n,(function(e){t((t,r,o)=>{t?(delete n.result,n.error={message:t.message||t}):n.result=r,e?e(o):o()})}),(function(e){if(e)return r(e);r(null,n.result)}))}}},k2x9:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,i){(0,n.default)(t)(e,(0,o.default)(r),i)};var n=i(r("NDoG")),o=i(r("aR5N"));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},kekF:function(e,t){e.exports=function(e,t){return function(r){return e(t(r))}}},"kzD/":function(e,t){e.exports=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},l1gh:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t=(0,i.default)(t||o.default),!(0,n.default)(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function u(t){var n=(0,c.default)(e[r++]);t.push((0,a.default)(f)),n.apply(null,t)}function f(n){if(n||r===e.length)return t.apply(null,arguments);u((0,s.default)(arguments,1))}u([])};var n=u(r("Z0cm")),o=u(r("vN+2")),i=u(r("2sf1")),s=u(r("3qT5")),a=u(r("rH6r")),c=u(r("aR5N"));function u(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},lSCD:function(e,t,r){var n=r("NykK"),o=r("GoyQ");e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},mdPL:function(e,t,r){(function(e){var n=r("WFqU"),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===o&&n.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,r("YuTi")(e))},nmnc:function(e,t,r){var n=r("Kz5y");e.exports=n.Symbol},oEkW:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n&&e[n]&&e[n]()};var n="function"==typeof Symbol&&Symbol.iterator;e.exports=t.default},odnP:function(e,t,r){(function(t){!function(r){"use strict";var n=function(e){setTimeout(e,0)};void 0!==t&&t&&"function"==typeof t.nextTick&&(n=t.nextTick),e.exports=function(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else e=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(t.current-=e=e||1,t.queue.length){var r=t.queue[0];r.n+t.current>t.capacity||(t.queue.shift(),t.current+=r.n,n(r.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return t.current+(e=e||1)<=t.capacity}};return t}}()}).call(this,r("KCCg"))},qWKu:function(e,t,r){"use strict";var n=r("hwdV").Buffer,o=r("8dO3");function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&o.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,o.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);for(var t=n.alloc(e),r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0);return t},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i},rH6r:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},rW7p:function(e,t,r){const n=r("zvTS"),o=r("0QlC"),{incrementHexInt:i}=r("UJ2e");e.exports=class extends n{constructor({provider:e}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:t}){const r=t,n=i(e),s=(await o({provider:this.provider,fromBlock:n,toBlock:r})).map(e=>e.hash);this.addResults(s)}}},rdBT:function(e,t,r){"use strict";(function(e,r){class n{constructor(e){this.tasks=[],this.count=e}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let e=this.tasks.shift();if(void 0===e)throw"Unexpected undefined value in tasks list";e()}}acquire(){return new Promise((t,n)=>{this.tasks.push(()=>{var e=!1;t(()=>{e||(e=!0,this.count++,this.sched())})}),e&&e.nextTick?e.nextTick(this.sched.bind(this)):r(this.sched.bind(this))})}use(e){return this.acquire().then(t=>e().then(e=>(t(),e)).catch(e=>{throw t(),e}))}}t.Semaphore=n,t.Mutex=class extends n{constructor(){super(1)}}}).call(this,r("KCCg"),r("URgk").setImmediate)},rdbr:function(e,t,r){"use strict";var n=Object.prototype.toString;e.exports=function(e){return"[object Function]"===n.call(e)}},sEf8:function(e,t){e.exports=function(e){return function(t){return e(t)}}},shjB:function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},t7TP:function(e,t,r){const n=r("y2lW"),o=r("/UYa"),i=r("w92A"),s=r("2nhq"),{unsafeRandomBytes:a,incrementHexInt:c}=r("UJ2e"),u=r("0QlC");function f(e){return{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}e.exports=function({blockTracker:e,provider:t}){const r={},l=s({blockTracker:e,provider:t});let d=!1;const p=new n,h=o({eth_subscribe:i((async function(n,o){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const i=n.params[0],s=a(16);let p;switch(i){case"newHeads":p=function({subId:r}){const n={type:i,destroy:async()=>{e.removeListener("sync",n.update)},update:async({oldBlock:e,newBlock:n})=>{const o=n,i=c(e);(await u({provider:t,fromBlock:i,toBlock:o})).map(f).forEach(e=>{y(r,e)})}};return e.on("sync",n.update),n}({subId:s});break;case"logs":const r=n.params[1];p=function({subId:e,filter:t}){return t.on("update",t=>y(e,t)),{type:i,destroy:async()=>await l.uninstallFilter(t.idHex)}}({subId:s,filter:await l.newLogFilter(r)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return r[s]=p,void(o.result=s)})),eth_unsubscribe:i((async function(e,t){if(d)throw new Error("SubscriptionManager - attempting to use after destroying");const n=e.params[0],o=r[n];o?(delete r[n],await o.destroy(),t.result=!0):t.result=!1}))});return h.destroy=function(){p.removeAllListeners();for(const e in r)r[e].destroy(),delete r[e];d=!0},{events:p,middleware:h};function y(e,t){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:e,result:t}})}}},tMv7:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,s){(0,n.default)(t)(e,(0,o.default)((0,i.default)(r)),s)};var n=s(r("NDoG")),o=s(r("j6BP")),i=s(r("aR5N"));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},tnHP:function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r("IGju"),i=r("IzB8"),s=r("9lTW"),a=r("o8pB"),c=r("OZ/i"),u=r("mObS"),f=r("hwdV").Buffer;Object.assign(t,r("mhLr")),t.MAX_INTEGER=new c("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new c("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=f.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=f.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=f.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=c,t.rlp=a,t.secp256k1=i,t.zeros=function(e){return f.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,r,n){var o=t.zeros(r);return e=t.toBuffer(e),n?e.length<r?(e.copy(o),o):e.slice(0,r):e.length<r?(e.copy(o,r-e.length),o):e.slice(-r)},t.setLengthRight=function(e,r){return t.setLength(e,r,!0)},t.unpad=t.stripZeros=function(e){for(var r=(e=t.stripHexPrefix(e))[0];e.length>0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!f.isBuffer(e))if(Array.isArray(e))e=f.from(e);else if("string"==typeof e)e=t.isHexString(e)?f.from(t.padToEven(t.stripHexPrefix(e)),"hex"):f.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null==e)e=f.allocUnsafe(0);else if(c.isBN(e))e=e.toArrayLike(f);else{if(!e.toArray)throw new Error("invalid type");e=f.from(e.toArray())}return e},t.bufferToInt=function(e){return new c(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new c(e).fromTwos(256)},t.toUnsigned=function(e){return f.from(e.toTwos(256).toArray())},t.keccak=function(e,r){return e=t.toBuffer(e),r||(r=256),o("keccak"+r).update(e).digest()},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,r){e=t.toBuffer(e);var n=u("rmd160").update(e).digest();return!0===r?t.setLength(n,32):n},t.rlphash=function(e){return t.keccak(a.encode(e))},t.isValidPrivate=function(e){return i.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?i.publicKeyVerify(f.concat([f.from([4]),e])):!!t&&i.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var l=t.privateToPublic=function(e){return e=t.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var r=i.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},t.hashPersonalMessage=function(e){var r=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(f.concat([r,e]))},t.ecrecover=function(e,r,n,o){var s=f.concat([t.setLength(n,32),t.setLength(o,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var c=i.recover(e,s,a);return i.publicKeyConvert(c,!1).slice(1)},t.toRpcSig=function(e,r,n){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(f.concat([t.setLengthLeft(r,32),t.setLengthLeft(n,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(l(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var r=t.keccak(e).toString("hex"),n="0x",o=0;o<e.length;o++)parseInt(r[o],16)>=8?n+=e[o].toUpperCase():n+=e[o];return n},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=(r=new c(r)).isZero()?null:f.from(r.toArray()),t.rlphash([e,r]).slice(-20)},t.isPrecompiled=function(e){var r=t.unpad(e);return 1===r.length&&r[0]>=1&&r[0]<=8},t.addHexPrefix=function(e){return"string"!=typeof e?e:t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,r,n){var o=new c("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new c("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==t.length||32!==r.length||27!==e&&28!==e||(t=new c(t),r=new c(r),t.isZero()||t.gt(i)||r.isZero()||r.gt(i)||!1===n&&1===new c(r).cmp(o)))},t.baToJSON=function(e){if(f.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],n=0;n<e.length;n++)r.push(t.baToJSON(e[n]));return r}},t.defineProperties=function(e,r,o){if(e.raw=[],e._fields=[],e.toJSON=function(r){if(r){var n={};return e._fields.forEach((function(t){n[t]="0x"+e[t].toString("hex")})),n}return t.baToJSON(this.raw)},e.serialize=function(){return a.encode(e.raw)},r.forEach((function(r,n){function o(){return e.raw[n]}function i(o){"00"!==(o=t.toBuffer(o)).toString("hex")||r.allowZero||(o=f.allocUnsafe(0)),r.allowLess&&r.length?(o=t.stripZeros(o),s(r.length>=o.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===o.length||!r.length||s(r.length===o.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[n]=o}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:o,set:i}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:i,get:o})})),o)if("string"==typeof o&&(o=f.from(t.stripHexPrefix(o),"hex")),f.isBuffer(o)&&(o=a.decode(o)),Array.isArray(o)){if(o.length>e._fields.length)throw new Error("wrong number of fields in data");o.forEach((function(r,n){e[e._fields[n]]=t.toBuffer(r)}))}else{if("object"!==(void 0===o?"undefined":n(o)))throw new Error("invalid data");var i=Object.keys(o);r.forEach((function(t){-1!==i.indexOf(t.name)&&(e[t.name]=o[t.name]),-1!==i.indexOf(t.alias)&&(e[t.alias]=o[t.alias])}))}}},"vN+2":function(e,t){e.exports=function(){}},w92A:function(e,t,r){const n=r("LvDv");e.exports=function(e){return(t,r,o,i)=>{let s=null;const a=e(t,r,(async function(){return s=new Promise(e=>{o(t=>e(t))}),void(await s)}));n(a)(e=>{s?n(s)((t,r)=>{if(t)return console.error(t),i(t);r(e)}):i(e)})}}},wJg7:function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},xQaN:function(e,t,r){const n=r("kzD/"),o=r("U6jy");e.exports=function(e){return o({id:n(),jsonrpc:"2.0",params:[]},e)}},zvTS:function(e,t,r){const n=r("y2lW");e.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(e=>this.emit("update",e))}addInitialResults(e){}getChangesAndClear(){const e=this.updates;return this.updates=[],e}}}}]);