-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3-es2015.edc7db99a301cf55f79e.js
More file actions
1 lines (1 loc) · 100 KB
/
3-es2015.edc7db99a301cf55f79e.js
File metadata and controls
1 lines (1 loc) · 100 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+2Lv":function(t,e,r){"use strict";t.exports=r("Wglz")(r("kWIS"))},"/JJz":function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r("+2Lv"),i=r("IzB8"),s=r("9lTW"),a=r("o8pB"),c=r("OZ/i"),u=r("mObS"),f=r("hwdV").Buffer;Object.assign(e,r("mhLr")),e.MAX_INTEGER=new c("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new c("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=f.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=f.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=f.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=c,e.rlp=a,e.secp256k1=i,e.zeros=function(t){return f.allocUnsafe(t).fill(0)},e.zeroAddress=function(){var t=e.zeros(20);return e.bufferToHex(t)},e.setLengthLeft=e.setLength=function(t,r,n){var o=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(o),o):t.slice(0,r):t.length<r?(t.copy(o,r-t.length),o):t.slice(-r)},e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=e.stripZeros=function(t){for(var r=(t=e.stripHexPrefix(t))[0];t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},e.toBuffer=function(t){if(!f.isBuffer(t))if(Array.isArray(t))t=f.from(t);else if("string"==typeof t)t=e.isHexString(t)?f.from(e.padToEven(e.stripHexPrefix(t)),"hex"):f.from(t);else if("number"==typeof t)t=e.intToBuffer(t);else if(null==t)t=f.allocUnsafe(0);else if(c.isBN(t))t=t.toArrayLike(f);else{if(!t.toArray)throw new Error("invalid type");t=f.from(t.toArray())}return t},e.bufferToInt=function(t){return new c(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new c(t).fromTwos(256)},e.toUnsigned=function(t){return f.from(t.toTwos(256).toArray())},e.keccak=function(t,r){return t=e.toBuffer(t),r||(r=256),o("keccak"+r).update(t).digest()},e.keccak256=function(t){return e.keccak(t)},e.sha3=e.keccak,e.sha256=function(t){return t=e.toBuffer(t),u("sha256").update(t).digest()},e.ripemd160=function(t,r){t=e.toBuffer(t);var n=u("rmd160").update(t).digest();return!0===r?e.setLength(n,32):n},e.rlphash=function(t){return e.keccak(a.encode(t))},e.isValidPrivate=function(t){return i.privateKeyVerify(t)},e.isValidPublic=function(t,e){return 64===t.length?i.publicKeyVerify(f.concat([f.from([4]),t])):!!e&&i.publicKeyVerify(t)},e.pubToAddress=e.publicToAddress=function(t,r){return t=e.toBuffer(t),r&&64!==t.length&&(t=i.publicKeyConvert(t,!1).slice(1)),s(64===t.length),e.keccak(t).slice(-20)};var l=e.privateToPublic=function(t){return t=e.toBuffer(t),i.publicKeyCreate(t,!1).slice(1)};e.importPublic=function(t){return 64!==(t=e.toBuffer(t)).length&&(t=i.publicKeyConvert(t,!1).slice(1)),t},e.ecsign=function(t,e){var r=i.sign(t,e),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},e.hashPersonalMessage=function(t){var r=e.toBuffer("\x19Ethereum Signed Message:\n"+t.length.toString());return e.keccak(f.concat([r,t]))},e.ecrecover=function(t,r,n,o){var s=f.concat([e.setLength(n,32),e.setLength(o,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var c=i.recover(t,s,a);return i.publicKeyConvert(c,!1).slice(1)},e.toRpcSig=function(t,r,n){if(27!==t&&28!==t)throw new Error("Invalid recovery id");return e.bufferToHex(f.concat([e.setLengthLeft(r,32),e.setLengthLeft(n,32),e.toBuffer(t-27)]))},e.fromRpcSig=function(t){if(65!==(t=e.toBuffer(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)}},e.privateToAddress=function(t){return e.publicToAddress(l(t))},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===e.addHexPrefix(t)},e.toChecksumAddress=function(t){t=e.stripHexPrefix(t).toLowerCase();for(var r=e.keccak(t).toString("hex"),n="0x",o=0;o<t.length;o++)parseInt(r[o],16)>=8?n+=t[o].toUpperCase():n+=t[o];return n},e.isValidChecksumAddress=function(t){return e.isValidAddress(t)&&e.toChecksumAddress(t)===t},e.generateAddress=function(t,r){return t=e.toBuffer(t),r=(r=new c(r)).isZero()?null:f.from(r.toArray()),e.rlphash([t,r]).slice(-20)},e.isPrecompiled=function(t){var r=e.unpad(t);return 1===r.length&&r[0]>=1&&r[0]<=8},e.addHexPrefix=function(t){return"string"!=typeof t?t:e.isHexPrefixed(t)?t:"0x"+t},e.isValidSignature=function(t,e,r,n){var o=new c("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new c("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==e.length||32!==r.length||27!==t&&28!==t||(e=new c(e),r=new c(r),e.isZero()||e.gt(i)||r.isZero()||r.gt(i)||!1===n&&1===new c(r).cmp(o)))},e.baToJSON=function(t){if(f.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.baToJSON(t[n]));return r}},e.defineProperties=function(t,r,o){if(t.raw=[],t._fields=[],t.toJSON=function(r){if(r){var n={};return t._fields.forEach((function(e){n[e]="0x"+t[e].toString("hex")})),n}return e.baToJSON(this.raw)},t.serialize=function(){return a.encode(t.raw)},r.forEach((function(r,n){function o(){return t.raw[n]}function i(o){"00"!==(o=e.toBuffer(o)).toString("hex")||r.allowZero||(o=f.allocUnsafe(0)),r.allowLess&&r.length?(o=e.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),t.raw[n]=o}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:o,set:i}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:i,get:o})})),o)if("string"==typeof o&&(o=f.from(e.stripHexPrefix(o),"hex")),f.isBuffer(o)&&(o=a.decode(o)),Array.isArray(o)){if(o.length>t._fields.length)throw new Error("wrong number of fields in data");o.forEach((function(r,n){t[t._fields[n]]=e.toBuffer(r)}))}else{if("object"!==(void 0===o?"undefined":n(o)))throw new Error("invalid data");var i=Object.keys(o);r.forEach((function(e){-1!==i.indexOf(e.name)&&(t[e.name]=o[e.name]),-1!==i.indexOf(e.alias)&&(t[e.alias]=o[e.alias])}))}}},"/UYa":function(t,e,r){t.exports=r("1aEN")},"/oFA":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,i){return t(n.default,e,(0,o.default)(r),i)}};var n=i(r("abV/")),o=i(r("aR5N"));function i(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},"/u+i":function(t,e,r){r("QXrW"),r("4CaD");const n=r("y2lW"),o=(t,e)=>t+e,i=["sync","latest"];function s(t){return Number.parseInt(t,16)}t.exports=class extends n{constructor(t={}){super(),this._blockResetDuration=t.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(t=>this.once("latest",t))}removeAllListeners(t){t?super.removeAllListeners(t):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(t,e){i.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){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(t=>this.listenerCount(t)).reduce(o)}_newPotentialLatest(t){const e=this._currentBlock;e&&s(t)<=s(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_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(t,e,r){const n=r("+qE3").EventEmitter,o=r("MCLT").inherits;function i(){n.call(this),this.isLocked=!0}t.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(t){this.isLocked?this.once("unlock",t):setTimeout(t)}},"03A+":function(t,e,r){var n=r("JTzB"),o=r("ExA7"),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(t){return o(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},"0QlC":function(t,e){function r(t){return null==t?t:Number.parseInt(t,16)}function n(t){return null==t?t:"0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:e,toBlock:o}){e||(e=o);const i=r(e),s=r(o),a=Array(s-i+1).fill().map((t,e)=>i+e).map(n);return await Promise.all(a.map(e=>function(t,e,r){return new Promise((e,n)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:r},(t,r)=>{if(t)return n(t);e(r.result)})})}(t,0,[e,!1])))}},"1aEN":function(t,e){t.exports=function(t){return(e,r,n,o)=>{const i=t[e.method];return void 0===i?n():"function"==typeof i?i(e,r,n,o):(r.result=i,void o())}}},"2J3U":function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return r%=e,r++}}},"2nhq":function(t,e,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(t){return h(async(...e)=>{const r=await t(...e);return u(r.id)})}function h(t){return o(async(e,r)=>{const n=await t.apply(null,e.params);r.result=n})}function p(t,e){const r=[];for(let n in t)r.push(t[n]);return r}t.exports=function({blockTracker:t,provider:e}){let r=0,o={};const d=new n,y=function({mutex:t}){return e=>async(r,n,o,i)=>{(await t.acquire())(),e(r,n,o,i)}}({mutex:d}),g=i({eth_newFilter:y(l(_)),eth_newBlockFilter:y(l(m)),eth_newPendingTransactionFilter:y(l(b)),eth_uninstallFilter:y(h(x)),eth_getFilterChanges:y(h(w)),eth_getFilterLogs:y(h(k))}),v=async({oldBlock:t,newBlock:e})=>{if(0===o.length)return;const r=await d.acquire();try{await Promise.all(p(o).map(async r=>{try{await r.update({oldBlock:t,newBlock:e})}catch(n){console.error(n)}}))}catch(n){console.error(n)}r()};return g.newLogFilter=_,g.newBlockFilter=m,g.newPendingTransactionFilter=b,g.uninstallFilter=x,g.getFilterChanges=w,g.getFilterLogs=k,g.destroy=()=>{!async function(){const t=p(o).length;o={},A({prevFilterCount:t,newFilterCount:0})}()},g;async function _(t){const r=new s({provider:e,params:t});return await B(r),r}async function m(){const t=new a({provider:e});return await B(t),t}async function b(){const t=new c({provider:e});return await B(t),t}async function w(t){const e=f(t),r=o[e];if(!r)throw new Error(`No filter for index "${e}"`);return r.getChangesAndClear()}async function k(t){const e=f(t),r=o[e];if(!r)throw new Error(`No filter for index "${e}"`);return results="log"===r.type?r.getAllResults():[],results}async function x(t){const e=f(t),r=Boolean(o[e]);return r&&await async function(t){const e=p(o).length;delete o[t],A({prevFilterCount:e,newFilterCount:p(o).length})}(e),r}async function B(e){const n=p(o).length,i=await t.getLatestBlock();return await e.initialize({currentBlock:i}),r++,o[r]=e,e.id=r,e.idHex=u(r),A({prevFilterCount:n,newFilterCount:p(o).length}),r}function A({prevFilterCount:e,newFilterCount:r}){0===e&&r>0?t.on("sync",v):e>0&&0===r&&t.removeListener("sync",v)}}},"2sf1":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null!==t){var e=t;t=null,e.apply(this,arguments)}}},t.exports=e.default},"2zHa":function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");t.exports=function(t){function e(e,r,n,i){o.call(this,i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return i(e,o),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(o){n=o}r(n)},e.prototype._flush=function(){},e.prototype._read=function(t){this.push(this.squeeze(t))},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.squeeze=function(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},"3Lfr":function(t,e,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];e.p1600=function(t){for(var e=0;e<24;++e){var r=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49],p=l^(i<<1|s>>>31),d=h^(s<<1|i>>>31),y=t[0]^p,g=t[1]^d,v=t[10]^p,_=t[11]^d,m=t[20]^p,b=t[21]^d,w=t[30]^p,k=t[31]^d,x=t[40]^p,B=t[41]^d,A=t[2]^(p=r^(a<<1|c>>>31)),S=t[3]^(d=o^(c<<1|a>>>31)),T=t[12]^p,E=t[13]^d,L=t[22]^p,P=t[23]^d,j=t[32]^p,R=t[33]^d,C=t[42]^p,M=t[43]^d,z=t[4]^(p=i^(u<<1|f>>>31)),N=t[5]^(d=s^(f<<1|u>>>31)),O=t[14]^p,H=t[15]^d,U=t[24]^p,K=t[25]^d,I=t[34]^p,F=t[35]^d,q=t[44]^p,D=t[45]^d,W=t[6]^(p=a^(l<<1|h>>>31)),V=t[7]^(d=c^(h<<1|l>>>31)),G=t[16]^p,J=t[17]^d,$=t[26]^p,Z=t[27]^d,Y=t[36]^p,Q=t[37]^d,X=t[46]^p,tt=t[47]^d,et=t[8]^(p=u^(r<<1|o>>>31)),rt=t[9]^(d=f^(o<<1|r>>>31)),nt=t[18]^p,ot=t[19]^d,it=t[28]^p,st=t[29]^d,at=t[38]^p,ct=t[39]^d,ut=t[48]^p,ft=t[49]^d,lt=y,ht=g,pt=_<<4|v>>>28,dt=v<<4|_>>>28,yt=m<<3|b>>>29,gt=b<<3|m>>>29,vt=k<<9|w>>>23,_t=w<<9|k>>>23,mt=x<<18|B>>>14,bt=B<<18|x>>>14,wt=A<<1|S>>>31,kt=S<<1|A>>>31,xt=E<<12|T>>>20,Bt=T<<12|E>>>20,At=L<<10|P>>>22,St=P<<10|L>>>22,Tt=R<<13|j>>>19,Et=j<<13|R>>>19,Lt=C<<2|M>>>30,Pt=M<<2|C>>>30,jt=N<<30|z>>>2,Rt=z<<30|N>>>2,Ct=O<<6|H>>>26,Mt=H<<6|O>>>26,zt=K<<11|U>>>21,Nt=U<<11|K>>>21,Ot=I<<15|F>>>17,Ht=F<<15|I>>>17,Ut=D<<29|q>>>3,Kt=q<<29|D>>>3,It=W<<28|V>>>4,Ft=V<<28|W>>>4,qt=J<<23|G>>>9,Dt=G<<23|J>>>9,Wt=$<<25|Z>>>7,Vt=Z<<25|$>>>7,Gt=Y<<21|Q>>>11,Jt=Q<<21|Y>>>11,$t=tt<<24|X>>>8,Zt=X<<24|tt>>>8,Yt=et<<27|rt>>>5,Qt=rt<<27|et>>>5,Xt=nt<<20|ot>>>12,te=ot<<20|nt>>>12,ee=st<<7|it>>>25,re=it<<7|st>>>25,ne=at<<8|ct>>>24,oe=ct<<8|at>>>24,ie=ut<<14|ft>>>18,se=ft<<14|ut>>>18;t[0]=lt^~xt&zt,t[1]=ht^~Bt&Nt,t[10]=It^~Xt&yt,t[11]=Ft^~te>,t[20]=wt^~Ct&Wt,t[21]=kt^~Mt&Vt,t[30]=Yt^~pt&At,t[31]=Qt^~dt&St,t[40]=jt^~qt&ee,t[41]=Rt^~Dt&re,t[2]=xt^~zt&Gt,t[3]=Bt^~Nt&Jt,t[12]=Xt^~yt&Tt,t[13]=te^~gt&Et,t[22]=Ct^~Wt&ne,t[23]=Mt^~Vt&oe,t[32]=pt^~At&Ot,t[33]=dt^~St&Ht,t[42]=qt^~ee&vt,t[43]=Dt^~re&_t,t[4]=zt^~Gt&ie,t[5]=Nt^~Jt&se,t[14]=yt^~Tt&Ut,t[15]=gt^~Et&Kt,t[24]=Wt^~ne&mt,t[25]=Vt^~oe&bt,t[34]=At^~Ot&$t,t[35]=St^~Ht&Zt,t[44]=ee^~vt&Lt,t[45]=re^~_t&Pt,t[6]=Gt^~ie<,t[7]=Jt^~se&ht,t[16]=Tt^~Ut&It,t[17]=Et^~Kt&Ft,t[26]=ne^~mt&wt,t[27]=oe^~bt&kt,t[36]=Ot^~$t&Yt,t[37]=Ht^~Zt&Qt,t[46]=vt^~Lt&jt,t[47]=_t^~Pt&Rt,t[8]=ie^~lt&xt,t[9]=se^~ht&Bt,t[18]=Ut^~It&Xt,t[19]=Kt^~Ft&te,t[28]=mt^~wt&Ct,t[29]=bt^~kt&Mt,t[38]=$t^~Yt&pt,t[39]=Zt^~Qt&dt,t[48]=Lt^~jt&qt,t[49]=Pt^~Rt&Dt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},"3qT5":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),o=0;o<r;o++)n[o]=t[e+o];return n},t.exports=e.default},"4CaD":function(t,e,r){"use strict";const n=(t,e)=>function(){const r=e.promiseModule,n=new Array(arguments.length);for(let t=0;t<arguments.length;t++)n[t]=arguments[t];return new r((r,o)=>{n.push(e.errorFirst?function(t,n){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),o(e)):r(e)}else t?o(t):r(n)}:function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];r(t)}else r(t)}),t.apply(this,n)})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=t=>{const r=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(r):!e.exclude.some(r)};let o;o="function"==typeof t?function(){return e.excludeMain?t.apply(this,arguments):n(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const i in t){const s=t[i];o[i]="function"==typeof s&&r(i)?n(s,e):s}return o}},"56vw":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,o.default)((function(e,r){var o;try{o=t.apply(this,e)}catch(i){return r(i)}(0,n.default)(o)&&"function"==typeof o.then?o.then((function(t){a(r,null,t)}),(function(t){a(r,t.message?t:new Error(t))})):r(null,o)}))};var n=s(r("GoyQ")),o=s(r("hGab")),i=s(r("LgDX"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e,r){try{t(e,r)}catch(n){(0,i.default)(c,n)}}function c(t){throw t}t.exports=e.default},"5e3G":function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");t.exports=function(t){function e(e,r,n,i,s){o.call(this,s),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return i(e,o),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(o){n=o}r(n)},e.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},"6oS5":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){r=r||n.default;var a=(0,o.default)(e)?[]:{};t(e,(function(t,e,r){(0,s.default)(t)((function(t,n){arguments.length>2&&(n=(0,i.default)(arguments,1)),a[e]=n,r(t)}))}),(function(t){r(t,a)}))};var n=a(r("vN+2")),o=a(r("MMmD")),i=a(r("3qT5")),s=a(r("aR5N"));function a(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},"6sVZ":function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},"6vPO":function(t,e,r){(function(e){const n=r("tnHP"),o=r("OZ/i");var i=function(){};function s(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function c(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function u(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function f(t){var e=typeof t;if("string"===e)return n.isHexPrefixed(t)?new o(n.stripHexPrefix(t),16):new o(t,10);if("number"===e)return new o(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t){var e=/^(\w+)\((.*)\)$/.exec(t);if(3!==e.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(e[2]);if(null!==r&&3===r.length)return{method:e[1],args:r[1].split(","),retargs:r[2].split(",")};var n=e[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:e[1],args:n}}function h(t,r){var i,s,l,p;if("address"===t)return h("uint160",f(r));if("bool"===t)return h("uint8",r?1:0);if("string"===t)return h("bytes",e.from(r,"utf8"));if(g(t)){if(void 0===r.length)throw new Error("Not an array?");if("dynamic"!==(i=u(t))&&0!==i&&r.length>i)throw new Error("Elements exceed array size: "+i);for(p in l=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof r&&(r=JSON.parse(r)),r)l.push(h(t,r[p]));if("dynamic"===i){var d=h("uint256",r.length);l.unshift(d)}return e.concat(l)}if("bytes"===t)return r=e.from(r),l=e.concat([h("uint256",r.length),r]),r.length%32!=0&&(l=e.concat([l,n.zeros(32-r.length%32)])),l;if(t.startsWith("bytes")){if((i=a(t))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);return n.setLengthRight(r,32)}if(t.startsWith("uint")){if((i=a(t))%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(e,"be",32)}if(t.startsWith("int")){if((i=a(t))%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(e,"be",32)}if(t.startsWith("ufixed")){if(i=c(t),(s=f(r))<0)throw new Error("Supplied ufixed is negative");return h("uint256",s.mul(new o(2).pow(new o(i[1]))))}if(t.startsWith("fixed"))return i=c(t),h("int256",f(r).mul(new o(2).pow(new o(i[1]))));throw new Error("Unsupported or invalid type: "+t)}function p(t,r,n){var i,s,a,c;if("string"==typeof t&&(t=d(t)),"address"===t.name)return p(t.rawType,r,n).toArrayLike(e,"be",20).toString("hex");if("bool"===t.name)return p(t.rawType,r,n).toString()===new o(1).toString();if("string"===t.name){var u=p(t.rawType,r,n);return e.from(u,"utf8").toString()}if(t.isArray){for(a=[],i=t.size,"dynamic"===t.size&&(n=p("uint256",r,n).toNumber(),i=p("uint256",r,n).toNumber(),n+=32),c=0;c<i;c++){var f=p(t.subArray,r,n);a.push(f),n+=t.subArray.memoryUsage}return a}if("bytes"===t.name)return n=p("uint256",r,n).toNumber(),i=p("uint256",r,n).toNumber(),r.slice(n+32,n+32+i);if(t.name.startsWith("bytes"))return r.slice(n,n+t.size);if(t.name.startsWith("uint")){if((s=new o(r.slice(n,n+32),16,"be")).bitLength()>t.size)throw new Error("Decoded int exceeds width: "+t.size+" vs "+s.bitLength());return s}if(t.name.startsWith("int")){if((s=new o(r.slice(n,n+32),16,"be").fromTwos(256)).bitLength()>t.size)throw new Error("Decoded uint exceeds width: "+t.size+" vs "+s.bitLength());return s}if(t.name.startsWith("ufixed")){if(i=new o(2).pow(new o(t.size[1])),!(s=p("uint256",r,n)).mod(i).isZero())throw new Error("Decimals not supported yet");return s.div(i)}if(t.name.startsWith("fixed")){if(i=new o(2).pow(new o(t.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: "+t.name)}function d(t){var e,r,n;if(g(t)){e=u(t);var o=t.slice(0,t.lastIndexOf("["));return o=d(o),{isArray:!0,name:t,size:e,memoryUsage:"dynamic"===e?32:o.memoryUsage*e,subArray:o}}switch(t){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes"}if(r={rawType:n,name:t,memoryUsage:32},t.startsWith("bytes")&&"bytes"!==t||t.startsWith("uint")||t.startsWith("int")?r.size=a(t):(t.startsWith("ufixed")||t.startsWith("fixed"))&&(r.size=c(t)),t.startsWith("bytes")&&"bytes"!==t&&(r.size<1||r.size>32))throw new Error("Invalid bytes<N> width: "+r.size);if((t.startsWith("uint")||t.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(t){return"string"===t||"bytes"===t||"dynamic"===u(t)}function g(t){return t.lastIndexOf("]")===t.length-1}function v(t,e){return t.startsWith("address")||t.startsWith("bytes")?"0x"+e.toString("hex"):e.toString()}i.eventID=function(t,r){var o=t+"("+r.map(s).join(",")+")";return n.keccak256(e.from(o))},i.methodID=function(t,e){return i.eventID(t,e).slice(0,4)},i.rawEncode=function(t,r){var n=[],o=[],i=0;t.forEach((function(t){if(g(t)){var e=u(t);i+="dynamic"!==e?32*e:32}else i+=32}));for(var a=0;a<t.length;a++){var c=s(t[a]),f=h(c,r[a]);y(c)?(n.push(h("uint256",i)),o.push(f),i+=f.length):n.push(f)}return e.concat(n.concat(o))},i.rawDecode=function(t,r){var n=[];r=e.from(r);for(var o=0,i=0;i<t.length;i++){var a=d(s(t[i])),c=p(a,r,o);o+=a.memoryUsage,n.push(c)}return n},i.simpleEncode=function(t){var r=Array.prototype.slice.call(arguments).slice(1),n=l(t);if(r.length!==n.args.length)throw new Error("Argument count mismatch");return e.concat([i.methodID(n.method,n.args),i.rawEncode(n.args,r)])},i.simpleDecode=function(t,e){var r=l(t);if(!r.retargs)throw new Error("No return values in method");return i.rawDecode(r.retargs,e)},i.stringify=function(t,e){var r=[];for(var n in t){var o=t[n],i=e[n];i=/^[^\[]+\[.*\]$/.test(o)?i.map((function(t){return v(o,t)})).join(", "):v(o,i),r.push(i)}return r},i.solidityHexValue=function(t,r,o){var s,c;if(g(t)){var l=t.replace(/\[.*?\]/,"");if(!g(l)){var h=u(t);if("dynamic"!==h&&0!==h&&r.length>h)throw new Error("Elements exceed array size: "+h)}var p=r.map((function(t){return i.solidityHexValue(l,t,256)}));return e.concat(p)}if("bytes"===t)return r;if("string"===t)return e.from(r,"utf8");if("bool"===t){o=o||8;var d=Array(o/4).join("0");return e.from(r?d+"1":d+"0","hex")}if("address"===t){var y=20;return o&&(y=o/8),n.setLengthLeft(r,y)}if(t.startsWith("bytes")){if((s=a(t))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);return n.setLengthRight(r,s)}if(t.startsWith("uint")){if((s=a(t))%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(e,"be",(o=o||s)/8)}if(t.startsWith("int")){if((s=a(t))%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(e,"be",o/8)}throw new Error("Unsupported or invalid type: "+t)},i.solidityPack=function(t,r){if(t.length!==r.length)throw new Error("Number of types are not matching the values");for(var n=[],o=0;o<t.length;o++){var a=s(t[o]);n.push(i.solidityHexValue(a,r[o],null))}return e.concat(n)},i.soliditySHA3=function(t,e){return n.keccak256(i.solidityPack(t,e))},i.soliditySHA256=function(t,e){return n.sha256(i.solidityPack(t,e))},i.solidityRIPEMD160=function(t,e){return n.ripemd160(i.solidityPack(t,e),!0)},i.fromSerpent=function(t){for(var e,r=[],n=0;n<t.length;n++){var o=t[n];if("s"===o)r.push("bytes");else if("b"===o){for(var i="bytes",s=n+1;s<t.length&&(e=t[s])>="0"&&e<="9";)i+=t[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(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if("bytes"===n)e.push("s");else if(n.startsWith("bytes"))e.push("b"+a(n));else if("int256"===n)e.push("i");else{if("int256[]"!==n)throw new Error("Unsupported or invalid type: "+n);e.push("a")}}return e.join("")},t.exports=i}).call(this,r("tjlA").Buffer)},"7GkX":function(t,e,r){var n=r("b80T"),o=r("A90E"),i=r("MMmD");t.exports=function(t){return i(t)?n(t):o(t)}},8:function(t,e){},"8Pg7":function(t,e,r){const n=r("zvTS");t.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},"9SRK":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){i=i||n.default,e=e||[];var s=[],a=0,c=(0,o.default)(r);t(e,(function(t,e,r){var n=a++;c(t,(function(t,e){s[n]=e,r(t)}))}),(function(t){i(t,s)}))};var n=i(r("vN+2")),o=i(r("aR5N"));function i(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},A90E:function(t,e,r){var n=r("6sVZ"),o=r("V6Ve"),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=[];for(var r in Object(t))i.call(t,r)&&"constructor"!=r&&e.push(r);return e}},AP2z:function(t,e,r){var n=r("nmnc"),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(c){}var o=s.call(t);return n&&(e?t[a]=r:delete t[a]),o}},B8du:function(t,e){t.exports=function(){return!1}},BMM2:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,n.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,s,a,c=(0,o.default)(t);return c?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(c):(r=(0,i.default)(e=t),s=-1,a=r.length,function(){var t=r[++s];return s<a?{value:e[t],key:t}:null})};var n=s(r("MMmD")),o=s(r("oEkW")),i=s(r("7GkX"));function s(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},DSRE:function(t,e,r){(function(t){var n=r("Kz5y"),o=r("B8du"),i=e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?n.Buffer:void 0;t.exports=(a?a.isBuffer:void 0)||o}).call(this,r("YuTi")(t))},DUCy:function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");t.exports=function(t){function e(e,r,n,i,s){o.call(this,s),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return i(e,o),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(o){n=o}r(n)},e.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},EqmL:function(t,e,r){const n=r("ja2i"),o=r("t7TP");t.exports=class extends n{constructor(){super(({blockTracker:t,provider:e,engine:r})=>{const{events:n,middleware:i}=o({blockTracker:t,provider:e});return n.on("notification",t=>r.emit("data",null,t)),i})}}},ExA7:function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},FqFB:function(t,e,r){const n=r("QXrW"),o=r("Nk1h"),i=r("8Pg7"),{hexToInt:s,incrementHexInt:a,minBlockRef:c,blockRefIsNumber:u}=r("UJ2e");t.exports=class extends i{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new n(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(t=>t.toLowerCase()))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const r=c(this.params.toBlock,t),n=Object.assign({},this.params,{toBlock:r}),o=await this._fetchLogs(n);this.addInitialResults(o)}async update({oldBlock:t,newBlock:e}){const r=e;let n;n=t?a(t):e;const o=Object.assign({},this.params,{fromBlock:n,toBlock:r}),i=(await this._fetchLogs(o)).filter(t=>this.matchLog(t));this.addResults(i)}async _fetchLogs(t){return await o(e=>this.ethQuery.getLogs(t,e))()}matchLog(t){if(s(this.params.fromBlock)>=s(t.blockNumber))return!1;if(u(this.params.toBlock)&&s(this.params.toBlock)<=s(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every((e,r)=>{let n=t.topics[r];if(!n)return!1;n=n.toLowerCase();let o=Array.isArray(e)?e:[e];return!!o.includes(null)||(o=o.map(t=>t.toLowerCase()),o.includes(n))})}}},GoyQ:function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},HtlB:function(t,e,r){const n=r("uXik"),o=r("ga3E");function i(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const r=t.map((function(t){return"bytes"===t.type?n.toBuffer(t.value):t.value})),i=t.map((function(t){return t.type})),s=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return o.soliditySHA3(["bytes32","bytes32"],[o.soliditySHA3(new Array(t.length).fill("string"),s),o.soliditySHA3(i,r)])}function s(t,e){const r=n.toBuffer(e),o=n.fromRpcSig(r);return n.ecrecover(t,o.v,o.r,o.s)}function a(t){const e=n.toBuffer(t.data);return s(n.hashPersonalMessage(e),t.sig)}function c(t,e){for(var r=""+t;r.length<e;)r="0"+r;return r}t.exports={concatSig:function(t,e,r){const o=n.fromSigned(e),i=n.fromSigned(r),s=n.bufferToInt(t),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(t){if(t){if("number"==typeof t){const e=n.toBuffer(t);t=n.bufferToHex(e)}if("string"!=typeof t){var e="eth-sig-util.normalize() requires hex string or integer input.";throw new Error(e+=" received "+typeof t+": "+t)}return n.addHexPrefix(t.toLowerCase())}},personalSign:function(t,e){var r=n.toBuffer(e.data),o=n.hashPersonalMessage(r),i=n.ecsign(o,t);return n.bufferToHex(this.concatSig(i.v,i.r,i.s))},recoverPersonalSignature:function(t){const e=a(t),r=n.publicToAddress(e);return n.bufferToHex(r)},extractPublicKey:function(t){return"0x"+a(t).toString("hex")},typedSignatureHash:function(t){const e=i(t);return n.bufferToHex(e)},signTypedData:function(t,e){const r=i(e.data),o=n.ecsign(r,t);return n.bufferToHex(this.concatSig(o.v,o.r,o.s))},recoverTypedSignature:function(t){const e=s(i(t.data),t.sig),r=n.publicToAddress(e);return n.bufferToHex(r)}}},JTzB:function(t,e,r){var n=r("NykK"),o=r("ExA7");t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},KWkM:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,o.default)(n.default,t,e)};var n=i(r("abV/")),o=i(r("6oS5"));function i(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},KfNM:function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},KwLt:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={},t.exports=e.default},Kz5y:function(t,e,r){var n=r("WFqU"),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},LCem:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(r("/oFA")),o=i(r("9SRK"));function i(t){return t&&t.__esModule?t:{default:t}}e.default=(0,n.default)(o.default),t.exports=e.default},LgDX:function(t,e,r){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=c,e.wrap=u;var o,i=(o=r("3qT5"))&&o.__esModule?o:{default:o},s=e.hasSetImmediate="function"==typeof t&&t,a=e.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function c(t){setTimeout(t,0)}function u(t){return function(e){var r=(0,i.default)(arguments,1);t((function(){e.apply(null,r)}))}}e.default=u(s?t:a?n.nextTick:c)}).call(this,r("URgk").setImmediate,r("8oxB"))},LvDv:function(t,e,r){"use strict";var n=r("rdbr"),o=r("WgPA");t.exports=function(t){if(!n(t.then))throw new TypeError("Expected a promise");return function(e){t.then((function(t){o(e,null,t)}),(function(t){o(e,t)}))}}},MMmD:function(t,e,r){var n=r("lSCD"),o=r("shjB");t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},NDoG:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,c){if(c=(0,o.default)(c||n.default),t<=0||!e)return c(null);var u=(0,i.default)(e),f=!1,l=0,h=!1;function p(t,e){if(l-=1,t)f=!0,c(t);else{if(e===a.default||f&&l<=0)return f=!0,c(null);h||d()}}function d(){for(h=!0;l<t&&!f;){var e=u();if(null===e)return f=!0,void(l<=0&&c(null));l+=1,r(e.value,e.key,(0,s.default)(p))}h=!1}d()}};var n=c(r("vN+2")),o=c(r("2sf1")),i=c(r("BMM2")),s=c(r("rH6r")),a=c(r("KwLt"));function c(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},Nk1h:function(t,e,r){"use strict";const n=(t,e)=>function(...r){return new(0,e.promiseModule)((n,o)=>{r.push(e.multiArgs?(...t)=>{e.errorFirst?t[0]?o(t):(t.shift(),n(t)):n(t)}:e.errorFirst?(t,e)=>{t?o(t):n(e)}:n),t.apply(this,r)})};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const r=typeof t;if(null===t||"object"!==r&&"function"!==r)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":r}\``);const o=t=>{const r=e=>"string"==typeof e?t===e:e.test(t);return e.include?e.include.some(r):!e.exclude.some(r)};let i;i="function"===r?function(...r){return e.excludeMain?t(...r):n(t,e).apply(this,r)}:Object.create(Object.getPrototypeOf(t));for(const s in t){const r=t[s];i[s]="function"==typeof r&&o(s)?n(r,e):r}return i}},NykK:function(t,e,r){var n=r("nmnc"),o=r("AP2z"),i=r("KfNM"),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},PpH3:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return function(r,n,o){return t(r,e,n,o)}},t.exports=e.default},QXrW:function(t,e,r){const n=r("U6jy"),o=r("2J3U")();function i(t){this.currentProvider=t}function s(t){return function(){const e=this;var r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function a(t,e){return function(){const r=this;var n=[].slice.call(arguments),o=n.pop();n.length<t&&n.push("latest"),r.sendAsync({method:e,params:n},o)}}t.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(t,e){var r;this.currentProvider.sendAsync((r=t,n({id:o(),jsonrpc:"2.0",params:[]},r)),(function(t,r){if(!t&&r.error&&(t=new Error("EthQuery - RPC Error - "+r.error.message)),t)return e(t);e(null,r.result)}))}},Rlsf:function(t,e,r){const n=r("l1gh"),o=r("KWkM"),i=r("MCLT").inherits,s=r("/JJz"),a=r("HtlB"),c=r("U6jy"),u=r("odnP"),f=r("Uu7K"),l=r("a5O3"),h=/^[0-9A-Fa-f]+$/g;function p(t){this.nonceLock=u(1),t.getAccounts&&(this.getAccounts=t.getAccounts),t.processTransaction&&(this.processTransaction=t.processTransaction),t.processMessage&&(this.processMessage=t.processMessage),t.processPersonalMessage&&(this.processPersonalMessage=t.processPersonalMessage),t.processTypedMessage&&(this.processTypedMessage=t.processTypedMessage),this.approveTransaction=t.approveTransaction||this.autoApprove,this.approveMessage=t.approveMessage||this.autoApprove,this.approvePersonalMessage=t.approvePersonalMessage||this.autoApprove,this.approveDecryptMessage=t.approveDecryptMessage||this.autoApprove,this.approveEncryptionPublicKey=t.approveEncryptionPublicKey||this.autoApprove,this.approveTypedMessage=t.approveTypedMessage||this.autoApprove,t.signTransaction&&(this.signTransaction=t.signTransaction||_("signTransaction")),t.signMessage&&(this.signMessage=t.signMessage||_("signMessage")),t.signPersonalMessage&&(this.signPersonalMessage=t.signPersonalMessage||_("signPersonalMessage")),t.decryptMessage&&(this.decryptMessage=t.decryptMessage||_("decryptMessage")),t.encryptionPublicKey&&(this.encryptionPublicKey=t.encryptionPublicKey||_("encryptionPublicKey")),t.signTypedMessage&&(this.signTypedMessage=t.signTypedMessage||_("signTypedMessage")),t.recoverPersonalSignature&&(this.recoverPersonalSignature=t.recoverPersonalSignature),t.publishTransaction&&(this.publishTransaction=t.publishTransaction),this.estimateGas=t.estimateGas||this.estimateGas,this.getGasPrice=t.getGasPrice||this.getGasPrice}function d(t){return t.toLowerCase()}function y(t){const e=s.addHexPrefix(t);return s.isValidAddress(e)}function g(t){const e=s.addHexPrefix(t);return!s.isValidAddress(e)&&v(t)}function v(t){return"string"==typeof t&&"0x"===t.slice(0,2)&&t.slice(2).match(h)}function _(t){return function(e,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+t+'" fn in constructor options'))}}t.exports=p,i(p,f),p.prototype.handleRequest=function(t,e,r){const o=this;let i,s,a,u,f;switch(o._parityRequests={},o._parityRequestCount=0,t.method){case"eth_coinbase":return void o.getAccounts((function(t,e){if(t)return r(t);r(null,e[0]||null)}));case"eth_accounts":return void o.getAccounts((function(t,e){if(t)return r(t);r(null,e)}));case"eth_sendTransaction":return i=t.params[0],void n([t=>o.validateTransaction(i,t),t=>o.processTransaction(i,t)],r);case"eth_signTransaction":return i=t.params[0],void n([t=>o.validateTransaction(i,t),t=>o.processSignTransaction(i,t)],r);case"eth_sign":return f=t.params[0],u=t.params[1],a=t.params[2]||{},s=c(a,{from:f,data:u}),void n([t=>o.validateMessage(s,t),t=>o.processMessage(s,t)],r);case"personal_sign":return function(){const e=t.params[0];if(g(t.params[1])&&y(e)){let e="The eth_personalSign method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),f=t.params[0],u=t.params[1]}else u=t.params[0],f=t.params[1];a=t.params[2]||{},s=c(a,{from:f,data:u}),n([t=>o.validatePersonalMessage(s,t),t=>o.processPersonalMessage(s,t)],r)}();case"eth_decryptMessage":return function(){const e=t.params[0];if(g(t.params[1])&&y(e)){let e="The eth_decryptMessage method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, ",e+="and has been corrected automatically. ",e+="Please switch this param order for smooth behavior in the future.",console.warn(e),f=t.params[0],u=t.params[1]}else u=t.params[0],f=t.params[1];a=t.params[2]||{},s=c(a,{from:f,data:u}),n([t=>o.validateDecryptMessage(s,t),t=>o.processDecryptMessage(s,t)],r)}();case"encryption_public_key":return function(){const e=t.params[0];n([t=>o.validateEncryptionPublicKey(e,t),t=>o.processEncryptionPublicKey(e,t)],r)}();case"personal_ecRecover":return u=t.params[0],a=t.params[2]||{},s=c(a,{sig:t.params[1],data:u}),void o.recoverPersonalSignature(s,r);case"eth_signTypedData":return u=t.params[0],f=t.params[1],a=t.params[2]||{},s=c(a,{from:f,data:u}),void n([t=>o.validateTypedMessage(s,t),t=>o.processTypedMessage(s,t)],r);case"parity_postTransaction":return i=t.params[0],void o.parityPostTransaction(i,r);case"parity_postSign":return f=t.params[0],u=t.params[1],void o.parityPostSign(f,u,r);case"parity_checkRequest":return void o.parityCheckRequest(t.params[0],r);case"parity_defaultAccount":return void o.getAccounts((function(t,e){if(t)return r(t);r(null,e[0]||null)}));default:return void e()}},p.prototype.getAccounts=function(t){t(null,[])},p.prototype.processTransaction=function(t,e){const r=this;n([e=>r.approveTransaction(t,e),(t,e)=>r.checkApproval("transaction",t,e),e=>r.finalizeAndSubmitTx(t,e)],e)},p.prototype.processSignTransaction=function(t,e){const r=this;n([e=>r.approveTransaction(t,e),(t,e)=>r.checkApproval("transaction",t,e),e=>r.finalizeTx(t,e)],e)},p.prototype.processMessage=function(t,e){const r=this;n([e=>r.approveMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signMessage(t,e)],e)},p.prototype.processPersonalMessage=function(t,e){const r=this;n([e=>r.approvePersonalMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signPersonalMessage(t,e)],e)},p.prototype.processDecryptMessage=function(t,e){const r=this;n([e=>r.approveDecryptMessage(t,e),(t,e)=>r.checkApproval("decryptMessage",t,e),e=>r.decryptMessage(t,e)],e)},p.prototype.processEncryptionPublicKey=function(t,e){const r=this;n([e=>r.approveEncryptionPublicKey(t,e),(t,e)=>r.checkApproval("encryptionPublicKey",t,e),e=>r.encryptionPublicKey(t,e)],e)},p.prototype.processTypedMessage=function(t,e){const r=this;n([e=>r.approveTypedMessage(t,e),(t,e)=>r.checkApproval("message",t,e),e=>r.signTypedMessage(t,e)],e)},p.prototype.autoApprove=function(t,e){e(null,!0)},p.prototype.checkApproval=function(t,e,r){r(e?null:new Error("User denied "+t+" signature."))},p.prototype.parityPostTransaction=function(t,e){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[t]},(function(t,e){r._parityRequests[n]=t?{error:t}:e.result})),e(null,n)},p.prototype.parityPostSign=function(t,e,r){const n=this,o=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[t,e]},(function(t,e){n._parityRequests[o]=t?{error:t}:e.result})),r(null,o)},p.prototype.parityCheckRequest=function(t,e){const r=this._parityRequests[t]||null;return r?r.error?e(r.error):void e(null,r):e(null,null)},p.prototype.recoverPersonalSignature=function(t,e){let r;try{r=a.recoverPersonalSignature(t)}catch(n){return e(n)}e(null,r)},p.prototype.validateTransaction=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign transaction."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign transaction for this address: "${t.from}"`))}))},p.prototype.validateMessage=function(t,e){if(void 0===t.from)return e(new Error("Undefined address - from address required to sign message."));this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))}))},p.prototype.validatePersonalMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign personal message.")):void 0===t.data?e(new Error("Undefined message - message required to sign personal message.")):v(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))})):e(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},p.prototype.validateDecryptMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to decrypt message.")):void 0===t.data?e(new Error("Undefined message - message required to decrypt message.")):v(t.data)?void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to decrypt message for this address: "${t.from}"`))})):e(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},p.prototype.validateEncryptionPublicKey=function(t,e){this.validateSender(t,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to obtain encryption public key for this address: "${t}"`))}))},p.prototype.validateTypedMessage=function(t,e){return void 0===t.from?e(new Error("Undefined address - from address required to sign typed data.")):void 0===t.data?e(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(t.from,(function(r,n){return r?e(r):n?void e():e(new Error(`Unknown address - unable to sign message for this address: "${t.from}"`))}))},p.prototype.validateSender=function(t,e){if(!t)return e(null,!1);this.getAccounts((function(r,n){if(r)return e(r);const o=-1!==n.map(d).indexOf(t.toLowerCase());e(null,o)}))},p.prototype.finalizeAndSubmitTx=function(t,e){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r),r.publishTransaction.bind(r)],(function(t,n){if(r.nonceLock.leave(),t)return e(t);e(null,n)}))}))},p.prototype.finalizeTx=function(t,e){const r=this;r.nonceLock.take((function(){n([r.fillInTxExtras.bind(r,t),r.signTransaction.bind(r)],(function(n,o){if(r.nonceLock.leave(),n)return e(n);e(null,{raw:o,tx:t})}))}))},p.prototype.publishTransaction=function(t,e){this.emitPayload({method:"eth_sendRawTransaction",params:[t]},(function(t,r){if(t)return e(t);e(null,r.result)}))},p.prototype.estimateGas=function(t,e){l(this.engine,t,e)},p.prototype.getGasPrice=function(t){this.emitPayload({method:"eth_gasPrice",params:[]},(function(e,r){if(e)return t(e);t(null,r.result)}))},p.prototype.fillInTxExtras=function(t,e){const r=t.from,n={};void 0===t.gasPrice&&(n.gasPrice=this.getGasPrice.bind(this)),void 0===t.nonce&&(n.nonce=this.emitPayload.bind(this,{method:"eth_getTransactionCount",params:[r,"pending"]})),void 0===t.gas&&(n.gas=this.estimateGas.bind(this,function(t){return{from:t.from,to:t.to,value:t.value,data:t.data,gas:t.gas,gasPrice:t.gasPrice,nonce:t.nonce}}(t))),o(n,(function(r,n){if(r)return e(r);const o={};n.gasPrice&&(o.gasPrice=n.gasPrice),n.nonce&&(o.nonce=n.nonce.result),n.gas&&(o.gas=n.gas),e(null,c(t,o))}))}},S00V:function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("gc9i");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(t,e){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(var e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&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(t){this.squeezing||this.absorbLastFewBits(1);for(var e=n.alloc(t),r=0;r<t;++r)e[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 e},i.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=i},ScbU:function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("1IWx").Transform,i=r("P7XM");t.exports=function(t){function e(e,r,n,i){o.call(this,i),this._rate=e,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new t,this._state.initialize(e,r),this._finalized=!1}return i(e,o),e.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(o){n=o}r(n)},e.prototype._flush=function(){},e.prototype._read=function(t){this.push(this.squeeze(t))},e.prototype.update=function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(t)||(t=n.from(t,e)),this._state.absorb(t),this},e.prototype.squeeze=function(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(t);return void 0!==e&&(r=r.toString(e)),r},e.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},e.prototype._clone=function(){var t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},e}},UJ2e:function(t,e){function r(t){return t.sort((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:n(t)-n(e))}function n(t){return null==t?t:Number.parseInt(t,16)}function o(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return r(t)[0]},maxBlockRef:function(...t){const e=r(t);return e[e.length-1]},sortBlockRefs:r,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:n,incrementHexInt:function(t){return null==t?t:o(n(t)+1)},intToHex:o,unsafeRandomBytes:function(t){let e="0x";for(let r=0;r<t;r++)e+=i(),e+=i();return e}}},"UNi/":function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},Uu7K:function(t,e,r){const n=r("xQaN");function o(){}t.exports=o,o.prototype.setEngine=function(t){const e=this;e.engine||(e.engine=t,t.on("block",(function(t){e.currentBlock=t})),t.on("start",(function(){e.start()})),t.on("stop",(function(){e.stop()})))},o.prototype.handleRequest=function(t,e,r){throw new Error("Subproviders should override `handleRequest`.")},o.prototype.emitPayload=function(t,e){this.engine.sendAsync(n(t),e)},o.prototype.stop=function(){},o.prototype.start=function(){}},V5x4:function(t,e,r){const n=r("4CaD"),o=r("/u+i");function i(t,e){return new Promise(r=>{const n=setTimeout(r,t);n.unref&&e&&n.unref()})}t.exports=class extends o{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,r=t.retryTimeout||e/10,n=void 0===t.keepEventLoopActive||t.keepEventLoopActive,o=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=r,this._keepEventLoopActive=n,this._setSkipCacheFlag=o}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch(t=>this.emit("error",t))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await i(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const r=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",r)}catch(e){console.error(r)}await i(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await n(e=>this._provider.sendAsync(t,e))();if(e.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${e.error}`);return e.result}}},V6Ve:function(t,e,r){var n=r("kekF")(Object.keys,Object);t.exports=n},WFqU:function(t,e,r){(function(e){t.exports="object"==typeof e&&e&&e.Object===Object&&e}).call(this,r("yLpj"))},WPTD:function(t,e,r){(function(e){const n=r(e.browser?"7sdD":8),o=r("MCLT").inherits,i=r("xQaN"),s=r("Uu7K"),{ethErrors:a,serializeError:c}=r("z8+S");function u(t){this.rpcUrl=t.rpcUrl}t.exports=u,o(u,s),u.prototype.handleRequest=function(t,e,r){const o=this.rpcUrl;let s=i(t);n({uri:o,method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s),rejectUnauthorized:!1,timeout:2e4},(function(t,e,n){if(t)return r(c(t));switch(e.statusCode){case 405:return r(a.rpc.methodNotFound());case 504:return function(){let t="Gateway timeout. The request took too long to process. ";t+="This can happen when querying logs over too wide a block range.";const e=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(e))}();case 429:return function(){const t=new Error("Too Many Requests");return r(c(t))}();default:if(200!=e.statusCode){const t=new Error("Unknown Error: "+e.body);return r(c(t))}}let o;try{o=JSON.parse(n)}catch(t){return console.error(t.stack),r(c(t))}if(o.error)return r(o.error);r(null,o.result)}))}}).call(this,r("8oxB"))},WgPA:function(t,e,r){"use strict";(function(e){t.exports="function"==typeof e?e:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}}).call(this,r("URgk").setImmediate)},Wglz:function(t,e,r){"use strict";var n=r("DUCy"),o=r("ScbU");t.exports=function(t){var e=n(t),r=o(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(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: "+t)}}}},YOJA:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(r("tMv7")),o=i(r("PpH3"));function i(t){return t&&t.__esModule?t:{default:t}}e.default=(0,o.default)(n.default,1),t.exports=e.default},Z0cm:function(t,e){t.exports=Array.isArray},a5O3:function(t,e,r){const n=r("xQaN");t.exports=function(t,e,r){t.sendAsync(n({method:"eth_estimateGas",params:[e]}),(function(t,e){if(t)return"no contract code at given address"===t.message?r(null,"0xcf08"):r(t);r(null,e.result)}))}},aR5N:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=void 0;var n,o=(n=r("56vw"))&&n.__esModule?n:{default:n},i="function"==typeof Symbol;function s(t){return i&&"AsyncFunction"===t[Symbol.toStringTag]}e.default=function(t){return s(t)?(0,o.default)(t):t},e.isAsync=s},"abV/":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){((0,n.default)(t)?h:p)(t,(0,f.default)(e),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(t){return t&&t.__esModule?t:{default:t}}function h(t,e,r){r=(0,c.default)(r||a.default);var n=0,i=0,s=t.length;function f(t,e){t?r(t):++i!==s&&e!==o.default||r(null)}for(0===s&&r(null);n<s;n++)e(t[n],n,(0,u.default)(f))}var p=(0,s.default)(i.default,1/0);t.exports=e.default},b80T:function(t,e,r){var n=r("UNi/"),o=r("03A+"),i=r("Z0cm"),s=r("DSRE"),a=r("wJg7"),c=r("c6wG"),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=i(t),f=!r&&o(t),l=!r&&!f&&s(t),h=!r&&!f&&!l&&c(t),p=r||f||l||h,d=p?n(t.length,String):[],y=d.length;for(var g in t)!e&&!u.call(t,g)||p&&("length"==g||l&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,y))||d.push(g);return d}},c6wG:function(t,e,r){var n=r("dD9F"),o=r("sEf8"),i=r("mdPL"),s=i&&i.isTypedArray,a=s?o(s):n;t.exports=a},"cC/c":function(t,e,r){const n=r("ja2i"),o=r("2nhq");t.exports=class extends n{constructor(){super(({blockTracker:t,provider:e})=>o({blockTracker:t,provider:e}))}}},"dAl+":function(t,e,r){(function(t,r){var n="[object Arguments]",o="[object Map]",i="[object Object]",s="[object Set]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[n]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d["[object Function]"]=d[o]=d["[object Number]"]=d[i]=d["[object RegExp]"]=d[s]=d["[object String]"]=d["[object WeakMap]"]=!1;var y="object"==typeof t&&t&&t.Object===Object&&t,g="object"==typeof self&&self&&self.Object===Object&&self,v=y||g||Function("return this")(),_=e&&!e.nodeType&&e,m=_&&"object"==typeof r&&r&&!r.nodeType&&r,b=m&&m.exports===_&&y.process,w=function(){try{return b&&b.binding("util")}catch(t){}}(),k=w&&w.isTypedArray;function x(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function B(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function A(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function S(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}function T(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function E(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var L,P,j,R=Array.prototype,C=Function.prototype,M=Object.prototype,z=v["__core-js_shared__"],N=(L=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",O=C.toString,H=M.hasOwnProperty,U=M.toString,K=RegExp("^"+O.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=v.Symbol,F=v.Uint8Array,q=M.propertyIsEnumerable,D=R.splice,W=I?I.isConcatSpreadable:void 0,V=(P=Object.keys,j=Object,function(t){return P(j(t))}),G=xt(v,"DataView"),J=xt(v,"Map"),$=xt(v,"Promise"),Z=xt(v,"Set"),Y=xt(v,"WeakMap"),Q=xt(Object,"create"),X=Rt(G),tt=Rt(J),et=Rt($),rt=Rt(Z),nt=Rt(Y),ot=I?I.prototype:void 0,it=ot?ot.valueOf:void 0,st=ot?ot.toString:void 0;function at(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ct(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ut(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ft(t){var e=-1,r=t?t.length:0;for(this.__data__=new ut;++e<r;)this.add(t[e])}function lt(t){this.__data__=new ct(t)}function ht(t,e){for(var r=t.length;r--;)if(Mt(t[r][0],e))return r;return-1}at.prototype.clear=function(){this.__data__=Q?Q(null):{}},at.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},at.prototype.get=function(t){var e=this.__data__;if(Q){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return H.call(e,t)?e[t]:void 0},at.prototype.has=function(t){var e=this.__data__;return Q?void 0!==e[t]:H.call(e,t)},at.prototype.set=function(t,e){return this.__data__[t]=Q&&void 0===e?"__lodash_hash_undefined__":e,this},ct.prototype.clear=function(){this.__data__=[]},ct.prototype.delete=function(t){var e=this.__data__,r=ht(e,t);return!(r<0||(r==e.length-1?e.pop():D.call(e,r,1),0))},ct.prototype.get=function(t){var e=this.__data__,r=ht(e,t);return r<0?void 0:e[r][1]},ct.prototype.has=function(t){return ht(this.__data__,t)>-1},ct.prototype.set=function(t,e){var r=this.__data__,n=ht(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},ut.prototype.clear=function(){this.__data__={hash:new at,map:new(J||ct),string:new at}},ut.prototype.delete=function(t){return kt(this,t).delete(t)},ut.prototype.get=function(t){return kt(this,t).get(t)},ut.prototype.has=function(t){return kt(this,t).has(t)},ut.prototype.set=function(t,e){return kt(this,t).set(t,e),this},ft.prototype.add=ft.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ft.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.clear=function(){this.__data__=new ct},lt.prototype.delete=function(t){return this.__data__.delete(t)},lt.prototype.get=function(t){return this.__data__.get(t)},lt.prototype.has=function(t){return this.__data__.has(t)},lt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof ct){var n=r.__data__;if(!J||n.length<199)return n.push([t,e]),this;r=this.__data__=new ut(n)}return r.set(t,e),this};var pt,dt=(pt=function(t,e){return t&&yt(t,e,Dt)},function(t,e){if(null==t)return t;if(!Ot(t))return pt(t,e);for(var r=t.length,n=-1,o=Object(t);++n<r&&!1!==e(o[n],n,o););return t}),yt=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var a=i[++n];if(!1===e(o[a],a,o))break}return t};function gt(t,e){for(var r=0,n=(e=Tt(e,t)?[e]:bt(e)).length;null!=t&&r<n;)t=t[jt(e[r++])];return r&&r==n?t:void 0}function vt(t,e){return null!=t&&e in Object(t)}function _t(t,e,r,a,c){return t===e||(null==t||null==e||!Kt(t)&&!It(e)?t!=t&&e!=e:function(t,e,r,a,c,u){var f=Nt(t),l=Nt(e),h="[object Array]",p="[object Array]";f||(h=(h=Bt(t))==n?i:h),l||(p=(p=Bt(e))==n?i:p);var d=h==i&&!S(t),y=p==i&&!S(e),g=h==p;if(g&&!d)return u||(u=new lt),f||qt(t)?wt(t,e,r,a,c,u):function(t,e,r,n,i,a,c){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!n(new F(t),new F(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case o:var u=T;case s:if(u||(u=E),t.size!=e.size&&!(2&a))return!1;var f=c.get(t);if(f)return f==e;a|=1,c.set(t,e);var l=wt(u(t),u(e),n,i,a,c);return c.delete(t),l;case"[object Symbol]":if(it)return it.call(t)==it.call(e)}return!1}(t,e,h,r,a,c,u);if(!(2&c)){var v=d&&H.call(t,"__wrapped__"),_=y&&H.call(e,"__wrapped__");if(v||_){var m=v?t.value():t,b=_?e.value():e;return u||(u=new lt),r(m,b,a,c,u)}}return!!g&&(u||(u=new lt),function(t,e,r,n,o,i){var s=2&o,a=Dt(t),c=a.length;if(c!=Dt(e).length&&!s)return!1;for(var u=c;u--;){var f=a[u];if(!(s?f in e:H.call(e,f)))return!1}var l=i.get(t);if(l&&i.get(e))return l==e;var h=!0;i.set(t,e),i.set(e,t);for(var p=s;++u<c;){var d=t[f=a[u]],y=e[f];if(n)var g=s?n(y,d,f,e,t,i):n(d,y,f,t,e,i);if(!(void 0===g?d===y||r(d,y,n,o,i):g)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var v=t.constructor,_=e.constructor;v!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i.delete(t),i.delete(e),h}(t,e,r,a,c,u))}(t,e,_t,r,a,c))}function mt(t,e){var r=-1,n=Ot(t)?Array(t.length):[];return dt(t,(function(t,o,i){n[++r]=e(t,o,i)})),n}function bt(t){return Nt(t)?t:Pt(t)}function wt(t,e,r,n,o,i){var s=2&o,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(t);if(u&&i.get(e))return u==e;var f=-1,l=!0,h=1&o?new ft:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var p=t[f],d=e[f];if(n)var y=s?n(d,p,f,e,t,i):n(p,d,f,t,e,i);if(void 0!==y){if(y)continue;l=!1;break}if(h){if(!A(e,(function(t,e){if(!h.has(e)&&(p===t||r(p,t,n,o,i)))return h.add(e)}))){l=!1;break}}else if(p!==d&&!r(p,d,n,o,i)){l=!1;break}}return i.delete(t),i.delete(e),l}function kt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function xt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Kt(t)||function(t){return!!N&&N in t}(t))&&(Ht(t)||S(t)?K:h).test(Rt(t))}(r)?r:void 0}var Bt=function(t){return U.call(t)};function At(t){return Nt(t)||zt(t)||!!(W&&t&&t[W])}function St(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||p.test(t))&&t>-1&&t%1==0&&t<e}function Tt(t,e){if(Nt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Ft(t))||c.test(t)||!a.test(t)||null!=e&&t in Object(e)}function Et(t){return t==t&&!Kt(t)}function Lt(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}}(G&&"[object DataView]"!=Bt(new G(new ArrayBuffer(1)))||J&&Bt(new J)!=o||$&&"[object Promise]"!=Bt($.resolve())||Z&&Bt(new Z)!=s||Y&&"[object WeakMap]"!=Bt(new Y))&&(Bt=function(t){var e=U.call(t),r=e==i?t.constructor:void 0,n=r?Rt(r):void 0;if(n)switch(n){case X:return"[object DataView]";case tt:return o;case et:return"[object Promise]";case rt:return s;case nt:return"[object WeakMap]"}return e});var Pt=Ct((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(Ft(t))return st?st.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var r=[];return u.test(t)&&r.push(""),t.replace(f,(function(t,e,n,o){r.push(n?o.replace(l,"$1"):e||t)})),r}));function jt(t){if("string"==typeof t||Ft(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Rt(t){if(null!=t){try{return O.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ct(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(Ct.Cache||ut),r}function Mt(t,e){return t===e||t!=t&&e!=e}function zt(t){return function(t){return It(t)&&Ot(t)}(t)&&H.call(t,"callee")&&(!q.call(t,"callee")||U.call(t)==n)}Ct.Cache=ut;var Nt=Array.isArray;function Ot(t){return null!=t&&Ut(t.length)&&!Ht(t)}function Ht(t){var e=Kt(t)?U.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function Ut(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Kt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function It(t){return!!t&&"object"==typeof t}function Ft(t){return"symbol"==typeof t||It(t)&&"[object Symbol]"==U.call(t)}var qt=k?function(t){return function(e){return t(e)}}(k):function(t){return It(t)&&Ut(t.length)&&!!d[U.call(t)]};function Dt(t){return Ot(t)?function(t,e){var r=Nt(t)||zt(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!H.call(t,i)||o&&("length"==i||St(i,n))||r.push(i);return r}(t):function(t){if((e=t)!==("function"==typeof(r=e&&e.constructor)&&r.prototype||M))return V(t);var e,r,n=[];for(var o in Object(t))H.call(t,o)&&"constructor"!=o&&n.push(o);return n}(t)}function Wt(t){return t}r.exports=function(t,e){return function t(e,r,n,o,i){var s=-1,a=e.length;for(n||(n=At),i||(i=[]);++s<a;){var c=e[s];r>0&&n(c)?r>1?t(c,r-1,n,o,i):B(i,c):o||(i[i.length]=c)}return i}(function(t,e){return(Nt(t)?x:mt)(t,"function"==typeof(r=e)?r:null==r?Wt:"object"==typeof r?Nt(r)?function(t,e){return Tt(t)&&Et(e)?Lt(jt(t),e):function(r){var n=function(t,e,r){var n=null==t?void 0:gt(t,e);return void 0===n?void 0:n}(r,t);return void 0===n&&n===e?function(t,e){return null!=t&&function(t,e,r){for(var n,o=-1,i=(e=Tt(e,t)?[e]:bt(e)).length;++o<i;){var s=jt(e[o]);if(!(n=null!=t&&r(t,s)))break;t=t[s]}return n||!!(i=t?t.length:0)&&Ut(i)&&St(s,i)&&(Nt(t)||zt(t))}(t,e,vt)}(r,t):_t(e,n,void 0,3)}}(r[0],r[1]):1==(o=function(t){for(var e=Dt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Et(o)]}return e}(n=r)).length&&o[0][2]?Lt(o[0][0],o[0][1]):function(t){return t===n||function(t,e,r,n){var o=r.length,i=o;if(null==t)return!i;for(t=Object(t);o--;){var s=r[o];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<i;){var a=(s=r[o])[0],c=t[a];if(s[2]){if(void 0===c&&!(a in t))return!1}else if(!_t(s[1],c,void 0,3,new lt))return!1}return!0}(t,0,o)}:Tt(i=r)?(s=jt(i),function(t){return null==t?void 0:t[s]}):function(t){return function(e){return gt(e,t)}}(i));var r,n,o,i,s}(t,e),1)}}).call(this,r("yLpj"),r("YuTi")(t))},dD9F:function(t,e,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,t.exports=function(t){return i(t)&&o(t.length)&&!!s[n(t)]}},dZRn:function(t,e,r){"use strict";t.exports=r("gnsD")(r("S00V"))},f4g2:function(t,e,r){const n=r("+qE3").EventEmitter,o=r("MCLT").inherits,i=r("/JJz"),s=r("V5x4"),a=r("LCem"),c=r("YOJA"),u=r("/uSP"),f=(r("gO+T"),r("xQaN")),l=function(){};function h(t){n.call(this),this.setMaxListeners(30),t=t||{};const e={sendAsync:this._handleAsync.bind(this)};this._blockTracker=t.blockTracker||new s({provider:t.blockTrackerProvider||e,pollingInterval:t.pollingInterval||4e3,setSkipCacheFlag:!0}),this._ready=new u,this.currentBlock=null,this._providers=[]}t.exports=h,o(h,n),h.prototype.start=function(t=l){const e=this;e._ready.go(),e._blockTracker.on("latest",t=>{e._getBlockByNumberWithRetry(t,(t,r)=>{if(t)return void this.emit("error",t);if(!r)return console.log(r),void this.emit("error",new Error("Could not find block"));const n={number:i.toBuffer((o=r).number),hash:i.toBuffer(o.hash),parentHash:i.toBuffer(o.parentHash),nonce:i.toBuffer(o.nonce),mixHash:i.toBuffer(o.mixHash),sha3Uncles:i.toBuffer(o.sha3Uncles),logsBloom:i.toBuffer(o.logsBloom),transactionsRoot:i.toBuffer(o.transactionsRoot),stateRoot:i.toBuffer(o.stateRoot),receiptsRoot:i.toBuffer(o.receiptRoot||o.receiptsRoot),miner:i.toBuffer(o.miner),difficulty:i.toBuffer(o.difficulty),totalDifficulty:i.toBuffer(o.totalDifficulty),size:i.toBuffer(o.size),extraData:i.toBuffer(o.extraData),gasLimit:i.toBuffer(o.gasLimit),gasUsed:i.toBuffer(o.gasUsed),timestamp:i.toBuffer(o.timestamp),transactions:o.transactions};var o;e._setCurrentBlock(n),e.emit("rawBlock",r),e.emit("latest",r)})}),e._blockTracker.on("sync",e.emit.bind(e,"sync")),e._blockTracker.on("error",e.emit.bind(e,"error")),e._running=!0,e.emit("start")},h.prototype.stop=function(){this._blockTracker.removeAllListeners(),this._running=!1,this.emit("stop")},h.prototype.isRunning=function(){return this._running},h.prototype.addProvider=function(t,e){"number"==typeof e?this._providers.splice(e,0,t):this._providers.push(t),t.setEngine(this)},h.prototype.removeProvider=function(t){const e=this._providers.indexOf(t);if(e<0)throw new Error("Provider not found.");this._providers.splice(e,1)},h.prototype.send=function(t){throw new Error("Web3ProviderEngine does not support synchronous requests.")},h.prototype.sendAsync=function(t,e){const r=this;r._ready.await((function(){Array.isArray(t)?a(t,r._handleAsync.bind(r),e):r._handleAsync(t,e)}))},h.prototype._getBlockByNumberWithRetry=function(t,e){const r=this;let n=5;return void o();function o(){r._getBlockByNumber(t,i)}function i(t,r){return t?e(t):r?void e(null,r):n>0?(n--,void setTimeout((function(){o()}),1e3)):void e(null,null)}},h.prototype._getBlockByNumber=function(t,e){const r=f({method:"eth_getBlockByNumber",params:[t,!1],skipCache:!0});this._handleAsync(r,(t,r)=>t?e(t):e(null,r.result))},h.prototype._handleAsync=function(t,e){var r=this,n=-1,o=null,i=null,s=[];function a(r,n){i=r,o=n,c(s,(function(t,e){t?t(i,o,e):e()}),(function(){var r={id:t.id,jsonrpc:t.jsonrpc,result:o};null!=i?(r.error={message:i.stack||i.message||i,code:-32e3},e(i,r)):e(null,r)}))}!function e(o){if(n+=1,s.unshift(o),n>=r._providers.length)a(new Error('Request for method "'+t.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{r._providers[n].handleRequest(t,e,a)}catch(i){a(i)}}()},h.prototype._setCurrentBlock=function(t){this.currentBlock=t,this.emit("block",t)}},"gO+T":function(t,e,r){const n=r("rE/H");function o(t){return"never"!==a(t)}function i(t){var e=s(t);return e>=t.params.length?t.params:"eth_getBlockByNumber"===t.method?t.params.slice(1):t.params.slice(0,e)}function s(t){switch(t.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(t){switch(t.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"}}t.exports={cacheIdentifierForPayload:function(t,e={}){if(!o(t))return null;const{includeBlockRef:r}=e,s=r?t.params:i(t);return t.method+":"+n(s)},canCache:o,blockTagForPayload:function(t){var e=s(t);return e>=t.params.length?null:t.params[e]},paramsWithoutBlockTag:i,blockTagParamIndex:s,cacheTypeForPayload:a}},ga3E:function(t,e,r){t.exports=r("6vPO")},gc9i:function(t,e,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];e.p1600=function(t){for(var e=0;e<24;++e){var r=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],h=t[9]^t[19]^t[29]^t[39]^t[49],p=l^(i<<1|s>>>31),d=h^(s<<1|i>>>31),y=t[0]^p,g=t[1]^d,v=t[10]^p,_=t[11]^d,m=t[20]^p,b=t[21]^d,w=t[30]^p,k=t[31]^d,x=t[40]^p,B=t[41]^d,A=t[2]^(p=r^(a<<1|c>>>31)),S=t[3]^(d=o^(c<<1|a>>>31)),T=t[12]^p,E=t[13]^d,L=t[22]^p,P=t[23]^d,j=t[32]^p,R=t[33]^d,C=t[42]^p,M=t[43]^d,z=t[4]^(p=i^(u<<1|f>>>31)),N=t[5]^(d=s^(f<<1|u>>>31)),O=t[14]^p,H=t[15]^d,U=t[24]^p,K=t[25]^d,I=t[34]^p,F=t[35]^d,q=t[44]^p,D=t[45]^d,W=t[6]^(p=a^(l<<1|h>>>31)),V=t[7]^(d=c^(h<<1|l>>>31)),G=t[16]^p,J=t[17]^d,$=t[26]^p,Z=t[27]^d,Y=t[36]^p,Q=t[37]^d,X=t[46]^p,tt=t[47]^d,et=t[8]^(p=u^(r<<1|o>>>31)),rt=t[9]^(d=f^(o<<1|r>>>31)),nt=t[18]^p,ot=t[19]^d,it=t[28]^p,st=t[29]^d,at=t[38]^p,ct=t[39]^d,ut=t[48]^p,ft=t[49]^d,lt=y,ht=g,pt=_<<4|v>>>28,dt=v<<4|_>>>28,yt=m<<3|b>>>29,gt=b<<3|m>>>29,vt=k<<9|w>>>23,_t=w<<9|k>>>23,mt=x<<18|B>>>14,bt=B<<18|x>>>14,wt=A<<1|S>>>31,kt=S<<1|A>>>31,xt=E<<12|T>>>20,Bt=T<<12|E>>>20,At=L<<10|P>>>22,St=P<<10|L>>>22,Tt=R<<13|j>>>19,Et=j<<13|R>>>19,Lt=C<<2|M>>>30,Pt=M<<2|C>>>30,jt=N<<30|z>>>2,Rt=z<<30|N>>>2,Ct=O<<6|H>>>26,Mt=H<<6|O>>>26,zt=K<<11|U>>>21,Nt=U<<11|K>>>21,Ot=I<<15|F>>>17,Ht=F<<15|I>>>17,Ut=D<<29|q>>>3,Kt=q<<29|D>>>3,It=W<<28|V>>>4,Ft=V<<28|W>>>4,qt=J<<23|G>>>9,Dt=G<<23|J>>>9,Wt=$<<25|Z>>>7,Vt=Z<<25|$>>>7,Gt=Y<<21|Q>>>11,Jt=Q<<21|Y>>>11,$t=tt<<24|X>>>8,Zt=X<<24|tt>>>8,Yt=et<<27|rt>>>5,Qt=rt<<27|et>>>5,Xt=nt<<20|ot>>>12,te=ot<<20|nt>>>12,ee=st<<7|it>>>25,re=it<<7|st>>>25,ne=at<<8|ct>>>24,oe=ct<<8|at>>>24,ie=ut<<14|ft>>>18,se=ft<<14|ut>>>18;t[0]=lt^~xt&zt,t[1]=ht^~Bt&Nt,t[10]=It^~Xt&yt,t[11]=Ft^~te>,t[20]=wt^~Ct&Wt,t[21]=kt^~Mt&Vt,t[30]=Yt^~pt&At,t[31]=Qt^~dt&St,t[40]=jt^~qt&ee,t[41]=Rt^~Dt&re,t[2]=xt^~zt&Gt,t[3]=Bt^~Nt&Jt,t[12]=Xt^~yt&Tt,t[13]=te^~gt&Et,t[22]=Ct^~Wt&ne,t[23]=Mt^~Vt&oe,t[32]=pt^~At&Ot,t[33]=dt^~St&Ht,t[42]=qt^~ee&vt,t[43]=Dt^~re&_t,t[4]=zt^~Gt&ie,t[5]=Nt^~Jt&se,t[14]=yt^~Tt&Ut,t[15]=gt^~Et&Kt,t[24]=Wt^~ne&mt,t[25]=Vt^~oe&bt,t[34]=At^~Ot&$t,t[35]=St^~Ht&Zt,t[44]=ee^~vt&Lt,t[45]=re^~_t&Pt,t[6]=Gt^~ie<,t[7]=Jt^~se&ht,t[16]=Tt^~Ut&It,t[17]=Et^~Kt&Ft,t[26]=ne^~mt&wt,t[27]=oe^~bt&kt,t[36]=Ot^~$t&Yt,t[37]=Ht^~Zt&Qt,t[46]=vt^~Lt&jt,t[47]=_t^~Pt&Rt,t[8]=ie^~lt&xt,t[9]=se^~ht&Bt,t[18]=Ut^~It&Xt,t[19]=Kt^~Ft&te,t[28]=mt^~wt&Ct,t[29]=bt^~kt&Mt,t[38]=$t^~Yt&pt,t[39]=Zt^~Qt&dt,t[48]=Lt^~jt&qt,t[49]=Pt^~Rt&Dt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},gnsD:function(t,e,r){"use strict";var n=r("5e3G"),o=r("2zHa");t.exports=function(t){var e=n(t),r=o(t);return function(t,n){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,n);case"keccak256":return new e(1088,512,null,256,n);case"keccak384":return new e(832,768,null,384,n);case"keccak512":return new e(576,1024,null,512,n);case"sha3-224":return new e(1152,448,6,224,n);case"sha3-256":return new e(1088,512,6,256,n);case"sha3-384":return new e(832,768,6,384,n);case"sha3-512":return new e(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: "+t)}}}},hGab:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){var e=(0,o.default)(arguments),r=e.pop();t.call(this,e,r)}};var n,o=(n=r("3qT5"))&&n.__esModule?n:{default:n};t.exports=e.default},hyCD:function(t,e,r){const n=r("dAl+"),o=r("zvTS"),i=r("0QlC"),{incrementHexInt:s}=r("UJ2e");t.exports=class extends o{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,r=s(t),o=await i({provider:this.provider,fromBlock:r,toBlock:e}),a=n(o,t=>t.transactions);this.addResults(a)}}},j6BP:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,r,n){return t(e,n)}},t.exports=e.default},ja2i:function(t,e,r){const n=r("Uu7K");t.exports=class extends n{constructor(t){if(super(),!t)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=t}setEngine(t){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const e=this._constructorFn({engine:t,provider:t,blockTracker:t._blockTracker});if(!e)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof e)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=e}handleRequest(t,e,r){const n={id:t.id};this.middleware(t,n,(function(t){e((e,r,o)=>{e?(delete n.result,n.error={message:e.message||e}):n.result=r,t?t(o):o()})}),(function(t){if(t)return r(t);r(null,n.result)}))}}},k2x9:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,i){(0,n.default)(e)(t,(0,o.default)(r),i)};var n=i(r("NDoG")),o=i(r("aR5N"));function i(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},kWIS:function(t,e,r){"use strict";var n=r("hwdV").Buffer,o=r("3Lfr");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(t,e){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(var e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(o.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&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(t){this.squeezing||this.absorbLastFewBits(1);for(var e=n.alloc(t),r=0;r<t;++r)e[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 e},i.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=i},kekF:function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},"kzD/":function(t,e){t.exports=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},l1gh:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(e=(0,i.default)(e||o.default),!(0,n.default)(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function u(e){var n=(0,c.default)(t[r++]);e.push((0,a.default)(f)),n.apply(null,e)}function f(n){if(n||r===t.length)return e.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(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},lSCD:function(t,e,r){var n=r("NykK"),o=r("GoyQ");t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},mdPL:function(t,e,r){(function(t){var n=r("WFqU"),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,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(t){}}();t.exports=a}).call(this,r("YuTi")(t))},nmnc:function(t,e,r){var n=r("Kz5y");t.exports=n.Symbol},oEkW:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return n&&t[n]&&t[n]()};var n="function"==typeof Symbol&&Symbol.iterator;t.exports=e.default},odnP:function(t,e,r){(function(e){!function(r){"use strict";var n=function(t){setTimeout(t,0)};void 0!==e&&e&&"function"==typeof e.nextTick&&(n=e.nextTick),t.exports=function(t){var e={capacity:t||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===e.firstHere){e.current++,e.firstHere=!0;var t=1}else t=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(e.leave)},e.current+r.n-t>e.capacity)return 1===t&&(e.current--,e.firstHere=!1),e.queue.push(r);e.current+=r.n-t,r.task(e.leave),1===t&&(e.firstHere=!1)},leave:function(t){if(e.current-=t=t||1,e.queue.length){var r=e.queue[0];r.n+e.current>e.capacity||(e.queue.shift(),e.current+=r.n,n(r.task))}else if(e.current<0)throw new Error("leave called too many times.")},available:function(t){return e.current+(t=t||1)<=e.capacity}};return e}}()}).call(this,r("8oxB"))},rH6r:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}},t.exports=e.default},rW7p:function(t,e,r){const n=r("zvTS"),o=r("0QlC"),{incrementHexInt:i}=r("UJ2e");t.exports=class extends n{constructor({provider:t}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const r=e,n=i(t),s=(await o({provider:this.provider,fromBlock:n,toBlock:r})).map(t=>t.hash);this.addResults(s)}}},rdBT:function(t,e,r){"use strict";(function(t,r){class n{constructor(t){this.tasks=[],this.count=t}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let t=this.tasks.shift();if(void 0===t)throw"Unexpected undefined value in tasks list";t()}}acquire(){return new Promise((e,n)=>{this.tasks.push(()=>{var t=!1;e(()=>{t||(t=!0,this.count++,this.sched())})}),t&&t.nextTick?t.nextTick(this.sched.bind(this)):r(this.sched.bind(this))})}use(t){return this.acquire().then(e=>t().then(t=>(e(),t)).catch(t=>{throw e(),t}))}}e.Semaphore=n,e.Mutex=class extends n{constructor(){super(1)}}}).call(this,r("8oxB"),r("URgk").setImmediate)},rdbr:function(t,e,r){"use strict";var n=Object.prototype.toString;t.exports=function(t){return"[object Function]"===n.call(t)}},sEf8:function(t,e){t.exports=function(t){return function(e){return t(e)}}},shjB:function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},t7TP:function(t,e,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(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const r={},l=s({blockTracker:t,provider:e});let h=!1;const p=new n,d=o({eth_subscribe:i((async function(n,o){if(h)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()=>{t.removeListener("sync",n.update)},update:async({oldBlock:t,newBlock:n})=>{const o=n,i=c(t);(await u({provider:e,fromBlock:i,toBlock:o})).map(f).forEach(t=>{y(r,t)})}};return t.on("sync",n.update),n}({subId:s});break;case"logs":const r=n.params[1];p=function({subId:t,filter:e}){return e.on("update",e=>y(t,e)),{type:i,destroy:async()=>await l.uninstallFilter(e.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(t,e){if(h)throw new Error("SubscriptionManager - attempting to use after destroying");const n=t.params[0],o=r[n];o?(delete r[n],await o.destroy(),e.result=!0):e.result=!1}))});return d.destroy=function(){p.removeAllListeners();for(const t in r)r[t].destroy(),delete r[t];h=!0},{events:p,middleware:d};function y(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},tMv7:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r,s){(0,n.default)(e)(t,(0,o.default)((0,i.default)(r)),s)};var n=s(r("NDoG")),o=s(r("j6BP")),i=s(r("aR5N"));function s(t){return t&&t.__esModule?t:{default:t}}t.exports=e.default},uXik:function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=r("dZRn"),i=r("IzB8"),s=r("9lTW"),a=r("o8pB"),c=r("OZ/i"),u=r("mObS"),f=r("hwdV").Buffer;Object.assign(e,r("mhLr")),e.MAX_INTEGER=new c("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new c("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=f.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=f.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=f.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=c,e.rlp=a,e.secp256k1=i,e.zeros=function(t){return f.allocUnsafe(t).fill(0)},e.zeroAddress=function(){var t=e.zeros(20);return e.bufferToHex(t)},e.setLengthLeft=e.setLength=function(t,r,n){var o=e.zeros(r);return t=e.toBuffer(t),n?t.length<r?(t.copy(o),o):t.slice(0,r):t.length<r?(t.copy(o,r-t.length),o):t.slice(-r)},e.setLengthRight=function(t,r){return e.setLength(t,r,!0)},e.unpad=e.stripZeros=function(t){for(var r=(t=e.stripHexPrefix(t))[0];t.length>0&&"0"===r.toString();)r=(t=t.slice(1))[0];return t},e.toBuffer=function(t){if(!f.isBuffer(t))if(Array.isArray(t))t=f.from(t);else if("string"==typeof t)t=e.isHexString(t)?f.from(e.padToEven(e.stripHexPrefix(t)),"hex"):f.from(t);else if("number"==typeof t)t=e.intToBuffer(t);else if(null==t)t=f.allocUnsafe(0);else if(c.isBN(t))t=t.toArrayLike(f);else{if(!t.toArray)throw new Error("invalid type");t=f.from(t.toArray())}return t},e.bufferToInt=function(t){return new c(e.toBuffer(t)).toNumber()},e.bufferToHex=function(t){return"0x"+(t=e.toBuffer(t)).toString("hex")},e.fromSigned=function(t){return new c(t).fromTwos(256)},e.toUnsigned=function(t){return f.from(t.toTwos(256).toArray())},e.keccak=function(t,r){return t=e.toBuffer(t),r||(r=256),o("keccak"+r).update(t).digest()},e.keccak256=function(t){return e.keccak(t)},e.sha3=e.keccak,e.sha256=function(t){return t=e.toBuffer(t),u("sha256").update(t).digest()},e.ripemd160=function(t,r){t=e.toBuffer(t);var n=u("rmd160").update(t).digest();return!0===r?e.setLength(n,32):n},e.rlphash=function(t){return e.keccak(a.encode(t))},e.isValidPrivate=function(t){return i.privateKeyVerify(t)},e.isValidPublic=function(t,e){return 64===t.length?i.publicKeyVerify(f.concat([f.from([4]),t])):!!e&&i.publicKeyVerify(t)},e.pubToAddress=e.publicToAddress=function(t,r){return t=e.toBuffer(t),r&&64!==t.length&&(t=i.publicKeyConvert(t,!1).slice(1)),s(64===t.length),e.keccak(t).slice(-20)};var l=e.privateToPublic=function(t){return t=e.toBuffer(t),i.publicKeyCreate(t,!1).slice(1)};e.importPublic=function(t){return 64!==(t=e.toBuffer(t)).length&&(t=i.publicKeyConvert(t,!1).slice(1)),t},e.ecsign=function(t,e){var r=i.sign(t,e),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n},e.hashPersonalMessage=function(t){var r=e.toBuffer("\x19Ethereum Signed Message:\n"+t.length.toString());return e.keccak(f.concat([r,t]))},e.ecrecover=function(t,r,n,o){var s=f.concat([e.setLength(n,32),e.setLength(o,32)],64),a=r-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var c=i.recover(t,s,a);return i.publicKeyConvert(c,!1).slice(1)},e.toRpcSig=function(t,r,n){if(27!==t&&28!==t)throw new Error("Invalid recovery id");return e.bufferToHex(f.concat([e.setLengthLeft(r,32),e.setLengthLeft(n,32),e.toBuffer(t-27)]))},e.fromRpcSig=function(t){if(65!==(t=e.toBuffer(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)}},e.privateToAddress=function(t){return e.publicToAddress(l(t))},e.isValidAddress=function(t){return/^0x[0-9a-fA-F]{40}$/.test(t)},e.isZeroAddress=function(t){return e.zeroAddress()===e.addHexPrefix(t)},e.toChecksumAddress=function(t){t=e.stripHexPrefix(t).toLowerCase();for(var r=e.keccak(t).toString("hex"),n="0x",o=0;o<t.length;o++)parseInt(r[o],16)>=8?n+=t[o].toUpperCase():n+=t[o];return n},e.isValidChecksumAddress=function(t){return e.isValidAddress(t)&&e.toChecksumAddress(t)===t},e.generateAddress=function(t,r){return t=e.toBuffer(t),r=(r=new c(r)).isZero()?null:f.from(r.toArray()),e.rlphash([t,r]).slice(-20)},e.isPrecompiled=function(t){var r=e.unpad(t);return 1===r.length&&r[0]>=1&&r[0]<=8},e.addHexPrefix=function(t){return"string"!=typeof t?t:e.isHexPrefixed(t)?t:"0x"+t},e.isValidSignature=function(t,e,r,n){var o=new c("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),i=new c("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return!(32!==e.length||32!==r.length||27!==t&&28!==t||(e=new c(e),r=new c(r),e.isZero()||e.gt(i)||r.isZero()||r.gt(i)||!1===n&&1===new c(r).cmp(o)))},e.baToJSON=function(t){if(f.isBuffer(t))return"0x"+t.toString("hex");if(t instanceof Array){for(var r=[],n=0;n<t.length;n++)r.push(e.baToJSON(t[n]));return r}},e.defineProperties=function(t,r,o){if(t.raw=[],t._fields=[],t.toJSON=function(r){if(r){var n={};return t._fields.forEach((function(e){n[e]="0x"+t[e].toString("hex")})),n}return e.baToJSON(this.raw)},t.serialize=function(){return a.encode(t.raw)},r.forEach((function(r,n){function o(){return t.raw[n]}function i(o){"00"!==(o=e.toBuffer(o)).toString("hex")||r.allowZero||(o=f.allocUnsafe(0)),r.allowLess&&r.length?(o=e.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),t.raw[n]=o}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:o,set:i}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:i,get:o})})),o)if("string"==typeof o&&(o=f.from(e.stripHexPrefix(o),"hex")),f.isBuffer(o)&&(o=a.decode(o)),Array.isArray(o)){if(o.length>t._fields.length)throw new Error("wrong number of fields in data");o.forEach((function(r,n){t[t._fields[n]]=e.toBuffer(r)}))}else{if("object"!==(void 0===o?"undefined":n(o)))throw new Error("invalid data");var i=Object.keys(o);r.forEach((function(e){-1!==i.indexOf(e.name)&&(t[e.name]=o[e.name]),-1!==i.indexOf(e.alias)&&(t[e.alias]=o[e.alias])}))}}},"vN+2":function(t,e){t.exports=function(){}},w92A:function(t,e,r){const n=r("LvDv");t.exports=function(t){return(e,r,o,i)=>{let s=null;const a=t(e,r,(async function(){return s=new Promise(t=>{o(e=>t(e))}),void(await s)}));n(a)(t=>{s?n(s)((e,r)=>{if(e)return console.error(e),i(e);r(t)}):i(t)})}}},wJg7:function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},xQaN:function(t,e,r){const n=r("kzD/"),o=r("U6jy");t.exports=function(t){return o({id:n(),jsonrpc:"2.0",params:[]},t)}},zvTS:function(t,e,r){const n=r("y2lW");t.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach(t=>this.emit("update",t))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}}}]);