UNPKG

ethereum-hdwallet

Version:
1,502 lines (1,445 loc) 3.45 MB
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ (function (Buffer){(function (){ 'use strict'; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof2(obj); } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); } }return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var bip39 = require('bip39'); var hdkey = require('ethereumjs-wallet/hdkey'); var Transaction = require('ethereumjs-tx'); var EthCrypto = require('eth-crypto'); var isBuffer = require('is-buffer'); var Wallet = function () { function Wallet(seed) { var hdpath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; _classCallCheck(this, Wallet); var value = null; if (typeof seed === 'string') { value = Buffer.from(seed); } else if (isBuffer(seed)) { value = seed; } else { throw new Error('Seed must be Buffer or string'); } this.__hdwallet = hdkey.fromMasterSeed(value); this.__hdpath = hdpath; } _createClass(Wallet, [{ key: 'hdpath', value: function hdpath() { return this.__hdpath; } }, { key: 'getAddress', value: function getAddress() { return this.__hdwallet.derivePath(this.__hdpath).getWallet().getAddress(); } }, { key: 'getPublicKey', value: function getPublicKey() { var compress = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var uncompressed = this.__hdwallet.derivePath(this.__hdpath).getWallet().getPublicKey(); if (compress) { return Buffer.from(EthCrypto.publicKey.compress(uncompressed.toString('hex')), 'hex'); } return uncompressed; } }, { key: 'getPrivateKey', value: function getPrivateKey() { return this.__hdwallet.derivePath(this.__hdpath).getWallet().getPrivateKey(); } }, { key: 'signTransaction', value: function signTransaction(txParams) { var wallet = this.__hdwallet.derivePath(this.__hdpath).getWallet(); txParams.from = txParams.from || '0x' + wallet.getAddress().toString('hex'); var tx = new Transaction(txParams); var priv = wallet.getPrivateKey(); tx.sign(priv); return tx.serialize(); } }, { key: 'derive', value: function derive(hdpath) { if ((typeof hdpath === 'undefined' ? 'undefined' : _typeof(hdpath)) === undefined) return this; var clone = Object.assign(Object.create(Object.getPrototypeOf(this)), this); if (/^[0-9]+'?$/.test(hdpath)) { hdpath = '/' + hdpath; } clone.__hdpath = this.__hdpath + hdpath; return clone; } }]); return Wallet; }(); var HDWallet = { fromMnemonic: function fromMnemonic(mnemonic) { var value = null; if (isBuffer(mnemonic)) { value = mnemonic.toString(); } else { value = mnemonic; } var seed = bip39.mnemonicToSeedSync(value.trim()); return new Wallet(seed); }, fromSeed: function fromSeed(seed) { return new Wallet(seed); }, DefaultHDPath: 'm/44\'/60\'/0\'/0' }; if (typeof window !== 'undefined') { window.HDWallet = HDWallet; } module.exports = HDWallet; }).call(this)}).call(this,require("buffer").Buffer) },{"bip39":233,"buffer":274,"eth-crypto":325,"ethereumjs-tx":359,"ethereumjs-wallet/hdkey":365,"is-buffer":402}],2:[function(require,module,exports){ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],3:[function(require,module,exports){ var arrayLikeToArray = require("./arrayLikeToArray.js"); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return arrayLikeToArray(arr); } module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; },{"./arrayLikeToArray.js":2}],4:[function(require,module,exports){ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],5:[function(require,module,exports){ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],6:[function(require,module,exports){ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],7:[function(require,module,exports){ var arrayWithoutHoles = require("./arrayWithoutHoles.js"); var iterableToArray = require("./iterableToArray.js"); var unsupportedIterableToArray = require("./unsupportedIterableToArray.js"); var nonIterableSpread = require("./nonIterableSpread.js"); function _toConsumableArray(arr) { return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); } module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; },{"./arrayWithoutHoles.js":3,"./iterableToArray.js":5,"./nonIterableSpread.js":6,"./unsupportedIterableToArray.js":9}],8:[function(require,module,exports){ function _typeof(obj) { "@babel/helpers - typeof"; return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); } module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; },{}],9:[function(require,module,exports){ var arrayLikeToArray = require("./arrayLikeToArray.js"); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); } module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; },{"./arrayLikeToArray.js":2}],10:[function(require,module,exports){ module.exports={ "name": "goerli", "chainId": 5, "networkId": 5, "defaultHardfork": "istanbul", "consensus": { "type": "poa", "algorithm": "clique", "clique": { "period": 15, "epoch": 30000 } }, "comment": "Cross-client PoA test network", "url": "https://github.com/goerli/testnet", "genesis": { "hash": "0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a", "timestamp": "0x5c51a607", "gasLimit": 10485760, "difficulty": 1, "nonce": "0x0000000000000000", "extraData": "0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "stateRoot": "0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "homestead", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "tangerineWhistle", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "spuriousDragon", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "byzantium", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "constantinople", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "petersburg", "block": 0, "forkHash": "0xa3f5ab08" }, { "name": "istanbul", "block": 1561651, "forkHash": "0xc25efa5c" }, { "name": "berlin", "block": 4460644, "forkHash": "0x757a1c47" }, { "name": "london", "block": 5062605, "forkHash": "0xb8c6299d" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "51.141.78.53", "port": 30303, "id": "011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a", "location": "", "comment": "Upstream bootnode 1" }, { "ip": "13.93.54.137", "port": 30303, "id": "176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b", "location": "", "comment": "Upstream bootnode 2" }, { "ip": "94.237.54.114", "port": 30313, "id": "46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291", "location": "", "comment": "Upstream bootnode 3" }, { "ip": "18.218.250.66", "port": 30313, "id": "b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949", "location": "", "comment": "Upstream bootnode 4" }, { "ip": "3.11.147.67", "port": 30303, "id": "a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91", "location": "", "comment": "Ethereum Foundation bootnode" }, { "ip": "51.15.116.226", "port": 30303, "id": "a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd", "location": "", "comment": "Goerli Initiative bootnode" }, { "ip": "51.15.119.157", "port": 30303, "id": "807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33", "location": "", "comment": "Goerli Initiative bootnode" }, { "ip": "51.15.119.157", "port": 40303, "id": "a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd", "location": "", "comment": "Goerli Initiative bootnode" } ], "dnsNetworks": [ "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net" ] } },{}],11:[function(require,module,exports){ "use strict"; var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.chains = exports._getInitializedChains = void 0; var mainnet_json_1 = __importDefault(require("./mainnet.json")); var ropsten_json_1 = __importDefault(require("./ropsten.json")); var rinkeby_json_1 = __importDefault(require("./rinkeby.json")); var kovan_json_1 = __importDefault(require("./kovan.json")); var goerli_json_1 = __importDefault(require("./goerli.json")); var sepolia_json_1 = __importDefault(require("./sepolia.json")); /** * @hidden */ function _getInitializedChains(customChains) { var e_1, _a; var names = { '1': 'mainnet', '3': 'ropsten', '4': 'rinkeby', '42': 'kovan', '5': 'goerli', '11155111': 'sepolia', }; var chains = { mainnet: mainnet_json_1.default, ropsten: ropsten_json_1.default, rinkeby: rinkeby_json_1.default, kovan: kovan_json_1.default, goerli: goerli_json_1.default, sepolia: sepolia_json_1.default, }; if (customChains) { try { for (var customChains_1 = __values(customChains), customChains_1_1 = customChains_1.next(); !customChains_1_1.done; customChains_1_1 = customChains_1.next()) { var chain = customChains_1_1.value; var name_1 = chain.name; names[chain.chainId.toString()] = name_1; chains[name_1] = chain; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (customChains_1_1 && !customChains_1_1.done && (_a = customChains_1.return)) _a.call(customChains_1); } finally { if (e_1) throw e_1.error; } } } chains['names'] = names; return chains; } exports._getInitializedChains = _getInitializedChains; /** * @deprecated this constant will be internalized (removed) * on next major version update */ exports.chains = _getInitializedChains(); },{"./goerli.json":10,"./kovan.json":12,"./mainnet.json":13,"./rinkeby.json":14,"./ropsten.json":15,"./sepolia.json":16}],12:[function(require,module,exports){ module.exports={ "name": "kovan", "chainId": 42, "networkId": 42, "defaultHardfork": "istanbul", "consensus": { "type": "poa", "algorithm": "aura", "aura": {} }, "comment": "Parity PoA test network", "url": "https://kovan-testnet.github.io/website/", "genesis": { "hash": "0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9", "timestamp": null, "gasLimit": 6000000, "difficulty": 131072, "nonce": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "extraData": "0x", "stateRoot": "0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0x010ffe56" }, { "name": "homestead", "block": 0, "forkHash": "0x010ffe56" }, { "name": "tangerineWhistle", "block": 0, "forkHash": "0x010ffe56" }, { "name": "spuriousDragon", "block": 0, "forkHash": "0x010ffe56" }, { "name": "byzantium", "block": 5067000, "forkHash": "0x7f83c620" }, { "name": "constantinople", "block": 9200000, "forkHash": "0xa94e3dc4" }, { "name": "petersburg", "block": 10255201, "forkHash": "0x186874aa" }, { "name": "istanbul", "block": 14111141, "forkHash": "0x7f6599a6" }, { "name": "berlin", "block": 24770900, "forkHash": "0x1a0f10d9" }, { "name": "london", "block": 26741100, "forkHash": "0x1ed20b71" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "116.203.116.241", "port": 30303, "id": "16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45", "location": "", "comment": "1" }, { "ip": "3.217.96.11", "port": 30303, "id": "2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0", "location": "", "comment": "2" }, { "ip": "108.61.170.124", "port": 30303, "id": "740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c", "location": "", "comment": "3" }, { "ip": "157.230.31.163", "port": 30303, "id": "2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0", "location": "", "comment": "4" } ] } },{}],13:[function(require,module,exports){ module.exports={ "name": "mainnet", "chainId": 1, "networkId": 1, "defaultHardfork": "istanbul", "consensus": { "type": "pow", "algorithm": "ethash", "ethash": {} }, "comment": "The Ethereum main chain", "url": "https://ethstats.net/", "genesis": { "hash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", "timestamp": null, "gasLimit": 5000, "difficulty": 17179869184, "nonce": "0x0000000000000042", "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0xfc64ec04" }, { "name": "homestead", "block": 1150000, "forkHash": "0x97c2c34c" }, { "name": "dao", "block": 1920000, "forkHash": "0x91d1f948" }, { "name": "tangerineWhistle", "block": 2463000, "forkHash": "0x7a64da13" }, { "name": "spuriousDragon", "block": 2675000, "forkHash": "0x3edd5b10" }, { "name": "byzantium", "block": 4370000, "forkHash": "0xa00bc324" }, { "name": "constantinople", "block": 7280000, "forkHash": "0x668db0af" }, { "name": "petersburg", "block": 7280000, "forkHash": "0x668db0af" }, { "name": "istanbul", "block": 9069000, "forkHash": "0x879d6e30" }, { "name": "muirGlacier", "block": 9200000, "forkHash": "0xe029e991" }, { "name": "berlin", "block": 12244000, "forkHash": "0x0eb440f6" }, { "name": "london", "block": 12965000, "forkHash": "0xb715077d" }, { "name": "arrowGlacier", "block": 13773000, "forkHash": "0x20c327fc" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "18.138.108.67", "port": 30303, "id": "d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666", "location": "ap-southeast-1-001", "comment": "bootnode-aws-ap-southeast-1-001" }, { "ip": "3.209.45.79", "port": 30303, "id": "22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de", "location": "us-east-1-001", "comment": "bootnode-aws-us-east-1-001" }, { "ip": "34.255.23.113", "port": 30303, "id": "ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758", "location": "eu-west-1-001", "comment": "bootnode-aws-eu-west-1-001" }, { "ip": "35.158.244.151", "port": 30303, "id": "279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8", "location": "eu-central-1-001", "comment": "bootnode-aws-eu-central-1-001" }, { "ip": "52.187.207.27", "port": 30303, "id": "8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a", "location": "australiaeast-001", "comment": "bootnode-azure-australiaeast-001" }, { "ip": "191.234.162.198", "port": 30303, "id": "103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1", "location": "brazilsouth-001", "comment": "bootnode-azure-brazilsouth-001" }, { "ip": "52.231.165.108", "port": 30303, "id": "715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8", "location": "koreasouth-001", "comment": "bootnode-azure-koreasouth-001" }, { "ip": "104.42.217.25", "port": 30303, "id": "5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f", "location": "westus-001", "comment": "bootnode-azure-westus-001" } ], "dnsNetworks": [ "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net" ] } },{}],14:[function(require,module,exports){ module.exports={ "name": "rinkeby", "chainId": 4, "networkId": 4, "defaultHardfork": "istanbul", "consensus": { "type": "poa", "algorithm": "clique", "clique": { "period": 15, "epoch": 30000 } }, "comment": "PoA test network", "url": "https://www.rinkeby.io", "genesis": { "hash": "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177", "timestamp": "0x58ee40ba", "gasLimit": 4700000, "difficulty": 1, "nonce": "0x0000000000000000", "extraData": "0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "stateRoot": "0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0x3b8e0691" }, { "name": "homestead", "block": 1, "forkHash": "0x60949295" }, { "name": "tangerineWhistle", "block": 2, "forkHash": "0x8bde40dd" }, { "name": "spuriousDragon", "block": 3, "forkHash": "0xcb3a64bb" }, { "name": "byzantium", "block": 1035301, "forkHash": "0x8d748b57" }, { "name": "constantinople", "block": 3660663, "forkHash": "0xe49cab14" }, { "name": "petersburg", "block": 4321234, "forkHash": "0xafec6b27" }, { "name": "istanbul", "block": 5435345, "forkHash": "0xcbdb8838" }, { "name": "berlin", "block": 8290928, "forkHash": "0x6910c8bd" }, { "name": "london", "block": 8897988, "forkHash": "0x8e29f2f3" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "52.169.42.101", "port": 30303, "id": "a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf", "location": "", "comment": "IE" }, { "ip": "52.3.158.184", "port": 30303, "id": "343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8", "location": "", "comment": "INFURA" }, { "ip": "159.89.28.211", "port": 30303, "id": "b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6", "location": "", "comment": "AKASHA" } ], "dnsNetworks": [ "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net" ] } },{}],15:[function(require,module,exports){ module.exports={ "name": "ropsten", "chainId": 3, "networkId": 3, "defaultHardfork": "istanbul", "consensus": { "type": "pow", "algorithm": "ethash", "ethash": {} }, "comment": "PoW test network", "url": "https://github.com/ethereum/ropsten", "genesis": { "hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", "timestamp": null, "gasLimit": 16777216, "difficulty": 1048576, "nonce": "0x0000000000000042", "extraData": "0x3535353535353535353535353535353535353535353535353535353535353535", "stateRoot": "0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0x30c7ddbc" }, { "name": "homestead", "block": 0, "forkHash": "0x30c7ddbc" }, { "name": "tangerineWhistle", "block": 0, "forkHash": "0x30c7ddbc" }, { "name": "spuriousDragon", "block": 10, "forkHash": "0x63760190" }, { "name": "byzantium", "block": 1700000, "forkHash": "0x3ea159c7" }, { "name": "constantinople", "block": 4230000, "forkHash": "0x97b544f3" }, { "name": "petersburg", "block": 4939394, "forkHash": "0xd6e2149b" }, { "name": "istanbul", "block": 6485846, "forkHash": "0x4bc66396" }, { "name": "muirGlacier", "block": 7117117, "forkHash": "0x6727ef90" }, { "name": "berlin", "block": 9812189, "forkHash": "0xa157d377" }, { "name": "london", "block": 10499401, "forkHash": "0x7119b6b3" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "52.176.7.10", "port": 30303, "id": "30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606", "location": "", "comment": "US-Azure geth" }, { "ip": "52.176.100.77", "port": 30303, "id": "865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c", "location": "", "comment": "US-Azure parity" }, { "ip": "52.232.243.152", "port": 30303, "id": "6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f", "location": "", "comment": "Parity" }, { "ip": "192.81.208.223", "port": 30303, "id": "94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09", "location": "", "comment": "@gpip" } ], "dnsNetworks": [ "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net" ] } },{}],16:[function(require,module,exports){ module.exports={ "name": "sepolia", "chainId": 11155111, "networkId": 11155111, "defaultHardfork": "istanbul", "consensus": { "type": "pow", "algorithm": "ethash", "ethash": {} }, "comment": "PoW test network to replace Ropsten", "url": "https://github.com/ethereum/go-ethereum/pull/23730", "genesis": { "hash": "0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9", "timestamp": "0x6159af19", "gasLimit": 30000000, "difficulty": 131072, "nonce": "0x0000000000000000", "extraData": "0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521", "stateRoot": "0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494" }, "hardforks": [ { "name": "chainstart", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "homestead", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "tangerineWhistle", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "spuriousDragon", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "byzantium", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "constantinople", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "petersburg", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "istanbul", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "muirGlacier", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "berlin", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "london", "block": 0, "forkHash": "0xfe3366e7" }, { "name": "merge", "block": null, "forkHash": null }, { "name": "shanghai", "block": null, "forkHash": null } ], "bootstrapNodes": [ { "ip": "18.168.182.86", "port": 30303, "id": "9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066", "location": "", "comment": "geth" }, { "ip": "52.14.151.177", "port": 30303, "id": "ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7", "location": "", "comment": "besu" } ], "dnsNetworks": [] } },{}],17:[function(require,module,exports){ module.exports={ "name": "EIP-1559", "number": 1559, "comment": "Fee market change for ETH 1.0 chain", "url": "https://eips.ethereum.org/EIPS/eip-1559", "status": "Review", "minimumHardfork": "berlin", "requiredEIPs": [2930], "gasConfig": { "baseFeeMaxChangeDenominator": { "v": 8, "d": "Maximum base fee change denominator" }, "elasticityMultiplier": { "v": 2, "d": "Maximum block gas target elasticity" }, "initialBaseFee": { "v": 1000000000, "d": "Initial base fee on first EIP1559 block" } }, "gasPrices": {}, "vm": {}, "pow": {} } },{}],18:[function(require,module,exports){ module.exports={ "name": "EIP-2315", "number": 2315, "comment": "Simple subroutines for the EVM", "url": "https://eips.ethereum.org/EIPS/eip-2315", "status": "Draft", "minimumHardfork": "istanbul", "gasConfig": {}, "gasPrices": { "beginsub": { "v": 2, "d": "Base fee of the BEGINSUB opcode" }, "returnsub": { "v": 5, "d": "Base fee of the RETURNSUB opcode" }, "jumpsub": { "v": 10, "d": "Base fee of the JUMPSUB opcode" } }, "vm": {}, "pow": {} } },{}],19:[function(require,module,exports){ module.exports={ "name": "EIP-2537", "number": 2537, "comment": "BLS12-381 precompiles", "url": "https://eips.ethereum.org/EIPS/eip-2537", "status": "Draft", "minimumHardfork": "chainstart", "gasConfig": {}, "gasPrices": { "Bls12381G1AddGas": { "v": 600, "d": "Gas cost of a single BLS12-381 G1 addition precompile-call" }, "Bls12381G1MulGas": { "v": 12000, "d": "Gas cost of a single BLS12-381 G1 multiplication precompile-call" }, "Bls12381G2AddGas": { "v": 4500, "d": "Gas cost of a single BLS12-381 G2 addition precompile-call" }, "Bls12381G2MulGas": { "v": 55000, "d": "Gas cost of a single BLS12-381 G2 multiplication precompile-call" }, "Bls12381PairingBaseGas": { "v": 115000, "d": "Base gas cost of BLS12-381 pairing check" }, "Bls12381PairingPerPairGas": { "v": 23000, "d": "Per-pair gas cost of BLS12-381 pairing check" }, "Bls12381MapG1Gas": { "v": 5500, "d": "Gas cost of BLS12-381 map field element to G1" }, "Bls12381MapG2Gas": { "v": 110000, "d": "Gas cost of BLS12-381 map field element to G2" }, "Bls12381MultiExpGasDiscount": { "v": [[1, 1200], [2, 888], [3, 764], [4, 641], [5, 594], [6, 547], [7, 500], [8, 453], [9, 438], [10, 423], [11, 408], [12, 394], [13, 379], [14, 364], [15, 349], [16, 334], [17, 330], [18, 326], [19, 322], [20, 318], [21, 314], [22, 310], [23, 306], [24, 302], [25, 298], [26, 294], [27, 289], [28, 285], [29, 281], [30, 277], [31, 273], [32, 269], [33, 268], [34, 266], [35, 265], [36, 263], [37, 262], [38, 260], [39, 259], [40, 257], [41, 256], [42, 254], [43, 253], [44, 251], [45, 250], [46, 248], [47, 247], [48, 245], [49, 244], [50, 242], [51, 241], [52, 239], [53, 238], [54, 236], [55, 235], [56, 233], [57, 232], [58, 231], [59, 229], [60, 228], [61, 226], [62, 225], [63, 223], [64, 222], [65, 221], [66, 220], [67, 219], [68, 219], [69, 218], [70, 217], [71, 216], [72, 216], [73, 215], [74, 214], [75, 213], [76, 213], [77, 212], [78, 211], [79, 211], [80, 210], [81, 209], [82, 208], [83, 208], [84, 207], [85, 206], [86, 205], [87, 205], [88, 204], [89, 203], [90, 202], [91, 202], [92, 201], [93, 200], [94, 199], [95, 199], [96, 198], [97, 197], [98, 196], [99, 196], [100, 195], [101, 194], [102, 193], [103, 193], [104, 192], [105, 191], [106, 191], [107, 190], [108, 189], [109, 188], [110, 188], [111, 187], [112, 186], [113, 185], [114, 185], [115, 184], [116, 183], [117, 182], [118, 182], [119, 181], [120, 180], [121, 179], [122, 179], [123, 178], [124, 177], [125, 176], [126, 176], [127, 175], [128, 174]], "d": "Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair" } }, "vm": {}, "pow": {} } },{}],20:[function(require,module,exports){ module.exports={ "name": "EIP-2565", "number": 2565, "comment": "ModExp gas cost", "url": "https://eips.ethereum.org/EIPS/eip-2565", "status": "Last call", "minimumHardfork": "byzantium", "gasConfig": {}, "gasPrices": { "modexpGquaddivisor": { "v": 3, "d": "Gquaddivisor from modexp precompile for gas calculation" } }, "vm": {}, "pow": {} } },{}],21:[function(require,module,exports){ module.exports={ "name": "EIP-2718", "comment": "Typed Transaction Envelope", "url": "https://eips.ethereum.org/EIPS/eip-2718", "status": "Draft", "minimumHardfork": "chainstart", "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": {} } },{}],22:[function(require,module,exports){ module.exports={ "name": "EIP-2929", "comment": "Gas cost increases for state access opcodes", "url": "https://eips.ethereum.org/EIPS/eip-2929", "status": "Draft", "minimumHardfork": "chainstart", "gasConfig": {}, "gasPrices": { "coldsload": { "v": 2100, "d": "Gas cost of the first read of storage from a given location (per transaction)" }, "coldaccountaccess": { "v": 2600, "d": "Gas cost of the first read of a given address (per transaction)" }, "warmstorageread": { "v": 100, "d": "Gas cost of reading storage locations which have already loaded 'cold'" }, "sstoreCleanGasEIP2200": { "v": 2900, "d": "Once per SSTORE operation from clean non-zero to something else" }, "sstoreNoopGasEIP2200": { "v": 100, "d": "Once per SSTORE operation if the value doesn't change" }, "sstoreDirtyGasEIP2200": { "v": 100, "d": "Once per SSTORE operation if a dirty value is changed" }, "sstoreInitRefundEIP2200": { "v": 19900, "d": "Once per SSTORE operation for resetting to the original zero value" }, "sstoreCleanRefundEIP2200": { "v": 4900, "d": "Once per SSTORE operation for resetting to the original non-zero value" }, "call": { "v": 0, "d": "Base fee of the CALL opcode" }, "callcode": { "v": 0, "d": "Base fee of the CALLCODE opcode" }, "delegatecall": { "v": 0, "d": "Base fee of the DELEGATECALL opcode" }, "staticcall": { "v": 0, "d": "Base fee of the STATICCALL opcode" }, "balance": { "v": 0, "d": "Base fee of the BALANCE opcode" }, "extcodesize": { "v": 0, "d": "Base fee of the EXTCODESIZE opcode" }, "extcodecopy": { "v": 0, "d": "Base fee of the EXTCODECOPY opcode" }, "extcodehash": { "v": 0, "d": "Base fee of the EXTCODEHASH opcode" }, "sload": { "v": 0, "d": "Base fee of the SLOAD opcode" }, "sstore": { "v": 0, "d": "Base fee of the SSTORE opcode" } }, "vm": {}, "pow": {} } },{}],23:[function(require,module,exports){ module.exports={ "name": "EIP-2930", "comment": "Optional access lists", "url": "https://eips.ethereum.org/EIPS/eip-2930", "status": "Draft", "minimumHardfork": "istanbul", "requiredEIPs": [2718, 2929], "gasConfig": {}, "gasPrices": { "accessListStorageKeyCost": { "v": 1900, "d": "Gas cost per storage key in an Access List transaction" }, "accessListAddressCost": { "v": 2400, "d": "Gas cost per storage key in an Access List transaction" } }, "vm": {}, "pow": {} } },{}],24:[function(require,module,exports){ module.exports={ "name": "EIP-3198", "number": 3198, "comment": "BASEFEE opcode", "url": "https://eips.ethereum.org/EIPS/eip-3198", "status": "Review", "minimumHardfork": "london", "gasConfig": {}, "gasPrices": { "basefee": { "v": 2, "d": "Gas cost of the BASEFEE opcode" } }, "vm": {}, "pow": {} } },{}],25:[function(require,module,exports){ module.exports={ "name": "EIP-3529", "comment": "Reduction in refunds", "url": "https://eips.ethereum.org/EIPS/eip-3529", "status": "Draft", "minimumHardfork": "berlin", "requiredEIPs": [2929], "gasConfig": { "maxRefundQuotient": { "v": 5, "d": "Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)" } }, "gasPrices": { "selfdestructRefund": { "v": 0, "d": "Refunded following a selfdestruct operation" }, "sstoreClearRefundEIP2200": { "v": 4800, "d": "Once per SSTORE operation for clearing an originally existing storage slot" } }, "vm": {}, "pow": {} } },{}],26:[function(require,module,exports){ module.exports={ "name": "EIP-3541", "comment": "Reject new contracts starting with the 0xEF byte", "url": "https://eips.ethereum.org/EIPS/eip-3541", "status": "Draft", "minimumHardfork": "berlin", "requiredEIPs": [], "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": {} } },{}],27:[function(require,module,exports){ module.exports={ "name": "EIP-3554", "comment": "Reduction in refunds", "url": "Difficulty Bomb Delay to December 1st 2021", "status": "Draft", "minimumHardfork": "muirGlacier", "requiredEIPs": [], "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": { "difficultyBombDelay": { "v": 9500000, "d": "the amount of blocks to delay the difficulty bomb with" } } } },{}],28:[function(require,module,exports){ module.exports={ "name": "EIP-3607", "number": 3607, "comment": "Reject transactions from senders with deployed code", "url": "https://eips.ethereum.org/EIPS/eip-3607", "status": "Draft", "minimumHardfork": "chainstart", "requiredEIPs": [], "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": {} } },{}],29:[function(require,module,exports){ module.exports={ "name": "EIP-3675", "number": 3675, "comment": "Upgrade consensus to Proof-of-Stake", "url": "https://eips.ethereum.org/EIPS/eip-3675", "status": "Draft", "minimumHardfork": "london", "requiredEIPs": [], "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": {} } },{}],30:[function(require,module,exports){ module.exports={ "name": "EIP-3855", "number": 3855, "comment": "PUSH0 instruction", "url": "https://eips.ethereum.org/EIPS/eip-3855", "status": "Review", "minimumHardfork": "chainstart", "requiredEIPs": [], "gasConfig": {}, "gasPrices": { "push0": { "v": 2, "d": "Base fee of the PUSH0 opcode" } }, "vm": {}, "pow": {} } },{}],31:[function(require,module,exports){ module.exports={ "name": "EIP-4345", "number": 4345, "comment": "Difficulty Bomb Delay to June 2022", "url": "https://eips.ethereum.org/EIPS/eip-4345", "status": "Review", "minimumHardfork": "london", "gasConfig": {}, "gasPrices": {}, "vm": {}, "pow": { "difficultyBombDelay": { "v": 10700000, "d": "the amount of blocks to delay the difficulty bomb with" } } } },{}],32:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EIPs = void 0; exports.EIPs = { 1559: require('./1559.json'), 2315: require('./2315.json'), 2537: require('./2537.json'), 2565: require('./2565.json'), 2718: require('./2718.json'), 2929: require('./2929.json'), 2930: require('./2930.json'), 3198: require('./3198.json'), 3529: require('./3529.json'), 3541: require('./3541.json'), 3554: require('./3554.json'), 3607: require('./3607.json'), 3675: require('./3675.json'), 3855: require('./3855.json'), 4345: require('./4345.json'), }; },{"./1559.json":17,"./2315.json":18,"./2537.json":19,"./2565.json":20,"./2718.json":21,"./2929.json":22,"./2930.json":23,"./3198.json":24,"./3529.json":25,"./3541.json":26,"./3554.json":27,"./3607.json":28,"./3675.json":29,"./3855.json":30,"./4345.json":31}],33:[function(require,module,exports){ module.exports={ "0x0000000000000000000000000000000000000000": "0x1", "0x0000000000000000000000000000000000000001": "0x1", "0x0000000000000000000000000000000000000002": "0x1", "0x0000000000000000000000000000000000000003": "0x1", "0x0000000000000000000000000000000000000004": "0x1", "0x0000000000000000000000000000000000000005": "0x1", "0x0000000000000000000000000000000000000006": "0x1", "0x0000000000000000000000000000000000000007": "0x1", "0x0000000000000000000000000000000000000008": "0x1", "0x0000000000000000000000000000000000000009": "0x1", "0x000000000000000000000000000000000000000a": "0x1", "0x000000000000000000000000000000000000000b": "0x1", "0x000000000000000000000000000000000000000c": "0x1", "0x000000000000000000000000000000000000000d": "0x1", "0x000000000000000000000000000000000000000e": "0x1", "0x000000000000000000000000000000000000000f": "0x1", "0x0000000000000000000000000000000000000010": "0x1", "0x0000000000000000000000000000000000000011": "0x1", "0x0000000000000000000000000000000000000012": "0x1", "0x0000000000000000000000000000000000000013": "0x1", "0x0000000000000000000000000000000000000014": "0x1", "0x0000000000000000000000000000000000000015": "0x1", "0x0000000000000000000000000000000000000016": "0x1", "0x0000000000000000000000000000000000000017": "0x1", "0x0000000000000000000000000000000000000018": "0x1", "0x