diff --git a/asset-manifest.json b/asset-manifest.json index e00ec30..231f3ff 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/NoFakeChain/static/css/main.a3245c0a.css", - "main.js": "/NoFakeChain/static/js/main.c6ce8fbc.js", + "main.js": "/NoFakeChain/static/js/main.5c699e86.js", "index.html": "/NoFakeChain/index.html", "main.a3245c0a.css.map": "/NoFakeChain/static/css/main.a3245c0a.css.map", - "main.c6ce8fbc.js.map": "/NoFakeChain/static/js/main.c6ce8fbc.js.map" + "main.5c699e86.js.map": "/NoFakeChain/static/js/main.5c699e86.js.map" }, "entrypoints": [ "static/css/main.a3245c0a.css", - "static/js/main.c6ce8fbc.js" + "static/js/main.5c699e86.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 7a44760..989d588 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new C(e)},i(C,_),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;tr-a&&(this.process(n,0),a=0);for(var o=a;oa)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");var f=o.slice(u+1).reduce((function(e,t){var n;return Math.min(Number(null!==(n=t.timestamp)&&void 0!==n?n:a),e)}),a);if(f0&&void 0!==arguments[0]?arguments[0]:[],n=M(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(!(r in Em))throw new Error("".concat(r," not supported"));var i=this.gteHardfork(Em[r].minimumHardfork);if(!i)throw new Error("".concat(r," cannot be activated on hardfork ").concat(this.hardfork(),", minimumHardfork: ").concat(i));if(void 0!==Em[r].requiredEIPs){var a,o=M(Em[r].requiredEIPs);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(!t.includes(s)&&!this.isActivatedEIP(s))throw new Error("".concat(r," requires EIP ").concat(s,", but is not included in the EIP list"))}}catch(u){o.e(u)}finally{o.f()}}}}catch(u){n.e(u)}finally{n.f()}this._eips=t}},{key:"param",value:function(e,t){var n,r,i=M(this._eips);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(void 0!==(n=this.paramByEIP(e,t,a)))return n}}catch(o){i.e(o)}finally{i.f()}return this.paramByHardfork(e,t,this._hardfork)}},{key:"paramByHardfork",value:function(e,t,n){var r,i=null,a=M(this.HARDFORK_CHANGES);try{for(a.s();!(r=a.n()).done;){var o=r.value;if("eips"in o[1]){var s,u=M(o[1].eips);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=this.paramByEIP(e,t,c);i="bigint"===typeof l?l:i}}catch(f){u.e(f)}finally{u.f()}}else{if(void 0===o[1][e])throw new Error("Topic ".concat(e," not defined"));void 0!==o[1][e][t]&&(i=o[1][e][t].v)}if(o[0]===n)break}}catch(f){a.e(f)}finally{a.f()}return BigInt(null!==i&&void 0!==i?i:0)}},{key:"paramByEIP",value:function(e,t,n){if(!(n in Em))throw new Error("".concat(n," not supported"));var r=Em[n];if(!(e in r))throw new Error("Topic ".concat(e," not defined"));if(void 0!==r[e][t]){var i=r[e][t].v;return BigInt(i)}}},{key:"paramByBlock",value:function(e,t,n,r,i){var a=this.getHardforkByBlockNumber(n,r,i);return this.paramByHardfork(e,t,a)}},{key:"isActivatedEIP",value:function(e){if(this.eips().includes(e))return!0;var t,n=M(this.HARDFORK_CHANGES);try{for(n.s();!(t=n.n()).done;){var r=t.value[1];if(this.gteHardfork(r.name)&&"eips"in r&&r.eips.includes(e))return!0}}catch(i){n.e(i)}finally{n.f()}return!1}},{key:"hardforkIsActiveOnBlock",value:function(e,t){var n=gm(t,Yv.BigInt),r=null!==e&&void 0!==e?e:this._hardfork,i=this.hardforkBlock(r);return"bigint"===typeof i&&i!==BigInt(0)&&n>=i}},{key:"activeOnBlock",value:function(e){return this.hardforkIsActiveOnBlock(null,e)}},{key:"hardforkGteHardfork",value:function(e,t){var n,r=null!==e&&void 0!==e?e:this._hardfork,i=-1,a=-1,o=0,s=M(this.hardforks());try{for(s.s();!(n=s.n()).done;){var u=n.value;u.name===r&&(i=o),u.name===t&&(a=o),o+=1}}catch(c){s.e(c)}finally{s.f()}return i>=a&&-1!==a}},{key:"gteHardfork",value:function(e){return this.hardforkGteHardfork(null,e)}},{key:"hardforkBlock",value:function(e){var t,n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.block;return void 0===r||null===r?null:BigInt(r)}},{key:"hardforkTimestamp",value:function(e){var t,n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.timestamp;return void 0===r||null===r?null:BigInt(r)}},{key:"eipBlock",value:function(e){var t,n=M(this.HARDFORK_CHANGES);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r[1];if("eips"in i&&i.eips.includes(e))return this.hardforkBlock("number"===typeof r[0]?String(r[0]):r[0])}}catch(a){n.e(a)}finally{n.f()}return null}},{key:"hardforkTTD",value:function(e){var t,n=null!==e&&void 0!==e?e:this._hardfork,r=null===(t=this._getHardfork(n))||void 0===t?void 0:t.ttd;return void 0===r||null===r?null:BigInt(r)}},{key:"isHardforkBlock",value:function(e,t){var n=gm(e,Yv.BigInt),r=null!==t&&void 0!==t?t:this._hardfork,i=this.hardforkBlock(r);return"bigint"===typeof i&&i!==BigInt(0)&&i===n}},{key:"nextHardforkBlockOrTimestamp",value:function(e){var t,n,r=null!==e&&void 0!==e?e:this._hardfork,i=this.hardforks(),a=i.findIndex((function(e){return e.name===r}));if(r===Wv.Merge&&(a-=1),a<0)return null;var o=null!==(t=i[a].timestamp)&&void 0!==t?t:i[a].block;o=null!==o&&void 0!==o?Number(o):null;var s=i.slice(a+1).find((function(e){var t,n=null!==(t=e.timestamp)&&void 0!==t?t:e.block;return n=null!==n&&void 0!==n?Number(n):null,e.name!==Wv.Merge&&null!==n&&void 0!==n&&n!==o}));if(void 0===s)return null;var u=null!==(n=s.timestamp)&&void 0!==n?n:s.block;return null===u||void 0===u?null:BigInt(u)}},{key:"nextHardforkBlock",value:function(e){var t=null!==e&&void 0!==e?e:this._hardfork,n=this.hardforkBlock(t);if(null===n&&t===Wv.Merge){var r=this.hardforks(),i=r.findIndex((function(e){return null!==e.ttd&&void 0!==e.ttd}));if(i<0)throw Error("Merge hardfork should have been found");n=this.hardforkBlock(r[i-1].name)}return null===n?null:this.hardforks().reduce((function(e,t){var r=BigInt(null===t.block||void 0!==t.ttd&&null!==t.ttd?0:t.block);return r>n&&null===e?r:e}),null)}},{key:"isNextHardforkBlock",value:function(e,t){var n=gm(e,Yv.BigInt),r=null!==t&&void 0!==t?t:this._hardfork,i=this.nextHardforkBlock(r);return null!==i&&i===n}},{key:"_calcForkHash",value:function(e,t){var n,r=new Uint8Array,i=0,a=M(this.hardforks());try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.block,u=o.timestamp,c=o.name,l=null!==u&&void 0!==u?u:s;if("number"===typeof(l=null!==l?Number(l):null)&&0!==l&&l!==i&&c!==Wv.Merge)r=xf(r,Tl(l.toString(16).padStart(16,"0"))),i=l;if(o.name===e)break}}catch(h){a.e(h)}finally{a.f()}var f=xf(t,r),d=Nl(function(e){var t=am(e);return Tl("0x".concat(sm(t.slice(2))))}(_m(f)>>>0));return d}},{key:"forkHash",value:function(e,t){var n=null!==e&&void 0!==e?e:this._hardfork,r=this._getHardfork(n);if(null===r||null===(null===r||void 0===r?void 0:r.block)&&void 0===(null===r||void 0===r?void 0:r.timestamp)&&void 0===(null===r||void 0===r?void 0:r.ttd)){throw new Error("No fork hash calculation possible for future hardfork")}if(null!==(null===r||void 0===r?void 0:r.forkHash)&&void 0!==(null===r||void 0===r?void 0:r.forkHash))return r.forkHash;if(!t)throw new Error("genesisHash required for forkHash calculation");return this._calcForkHash(n,t)}},{key:"hardforkForForkHash",value:function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null}},{key:"setForkHashes",value:function(e){var t,n,r=M(this.hardforks());try{for(r.s();!(n=r.n()).done;){var i=n.value,a=null!==(t=i.timestamp)&&void 0!==t?t:i.block;null!==i.forkHash&&void 0!==i.forkHash||(null===a||void 0===a)&&"undefined"===typeof i.ttd||(i.forkHash=this.forkHash(i.name,e))}}catch(o){r.e(o)}finally{r.f()}}},{key:"genesis",value:function(){return this._chainParams.genesis}},{key:"hardforks",value:function(){return this._chainParams.hardforks}},{key:"bootstrapNodes",value:function(){return this._chainParams.bootstrapNodes}},{key:"dnsNetworks",value:function(){return this._chainParams.dnsNetworks}},{key:"hardfork",value:function(){return this._hardfork}},{key:"chainId",value:function(){return BigInt(this._chainParams.chainId)}},{key:"chainName",value:function(){return this._chainParams.name}},{key:"networkId",value:function(){return BigInt(this._chainParams.networkId)}},{key:"eips",value:function(){return this._eips}},{key:"consensusType",value:function(){var e,t,n=this.hardfork(),r=M(this.HARDFORK_CHANGES);try{for(r.s();!(t=r.n()).done;){var i=t.value;if("consensus"in i[1]&&(e=i[1].consensus.type),i[0]===n)break}}catch(a){r.e(a)}finally{r.f()}return null!==e&&void 0!==e?e:this._chainParams.consensus.type}},{key:"consensusAlgorithm",value:function(){var e,t,n=this.hardfork(),r=M(this.HARDFORK_CHANGES);try{for(r.s();!(t=r.n()).done;){var i=t.value;if("consensus"in i[1]&&(e=i[1].consensus.algorithm),i[0]===n)break}}catch(a){r.e(a)}finally{r.f()}return null!==e&&void 0!==e?e:this._chainParams.consensus.algorithm}},{key:"consensusConfig",value:function(){var e,t,n,r=this.hardfork(),i=M(this.HARDFORK_CHANGES);try{for(i.s();!(n=i.n()).done;){var a=n.value;if("consensus"in a[1]&&(t=a[1].consensus[a[1].consensus.algorithm]),a[0]===r)break}}catch(o){i.e(o)}finally{i.f()}return null!==(e=null!==t&&void 0!==t?t:this._chainParams.consensus[this.consensusAlgorithm()])&&void 0!==e?e:{}}},{key:"copy",value:function(){var e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e}}],[{key:"custom",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null!==(t=r.baseChain)&&void 0!==t?t:"mainnet",a=Object.assign({},n._getChainParams(i));if(a.name="custom-chain","string"!==typeof e)return new n(Object.assign({chain:Object.assign(Object.assign({},a),e)},r));if(e===Xv.PolygonMainnet)return n.custom({name:Xv.PolygonMainnet,chainId:137,networkId:137},r);if(e===Xv.PolygonMumbai)return n.custom({name:Xv.PolygonMumbai,chainId:80001,networkId:80001},r);if(e===Xv.ArbitrumRinkebyTestnet)return n.custom({name:Xv.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},r);if(e===Xv.ArbitrumOne)return n.custom({name:Xv.ArbitrumOne,chainId:42161,networkId:42161},r);if(e===Xv.xDaiChain)return n.custom({name:Xv.xDaiChain,chainId:100,networkId:100},r);if(e===Xv.OptimisticKovan)return n.custom({name:Xv.OptimisticKovan,chainId:69,networkId:69},Object.assign({hardfork:Wv.Berlin},r));if(e===Xv.OptimisticEthereum)return n.custom({name:Xv.OptimisticEthereum,chainId:10,networkId:10},Object.assign({hardfork:Wv.Berlin},r));throw new Error("Custom chain ".concat(e," not supported"))}},{key:"fromGethGenesis",value:function(e,t){var r,i=t.chain,a=t.eips,o=t.genesisHash,s=t.hardfork,u=function(e,t,n){try{if(["config","difficulty","gasLimit","alloc"].some((function(t){return!(t in e)})))throw new Error("Invalid format, expected geth genesis fields missing");return void 0!==t&&(e.name=t),om(e,n)}catch(r){throw new Error("Error parsing parameters file: ".concat(r.message))}}(e,i,t.mergeForkIdPostMerge),c=new n({chain:null!==(r=u.name)&&void 0!==r?r:"custom",customChains:[u],eips:a,hardfork:null!==s&&void 0!==s?s:u.hardfork});return void 0!==o&&c.setForkHashes(o),c}},{key:"isSupportedChainId",value:function(e){var t=this._getInitializedChains();return Boolean(t.names[e.toString()])}},{key:"_getChainParams",value:function(e,t){var n=e,r=this._getInitializedChains(t);if("number"===typeof n||"bigint"===typeof n){if(n=n.toString(),r.names[n])return r[r.names[n]];throw new Error("Chain with ID ".concat(n," not supported"))}if(void 0!==r[n])return r[n];throw new Error("Chain with name ".concat(n," not supported"))}},{key:"_getInitializedChains",value:function(e){for(var t={},n=0,r=Object.entries(Zv);n