{"_id":"@ignored/common","_rev":"14-c3974366d1859072c6811602384fb4e0","name":"@ignored/common","dist-tags":{"latest":"3.0.0-beta.6"},"versions":{"3.0.0-beta.3":{"name":"@ignored/common","version":"3.0.0-beta.3","keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"license":"MIT","_id":"@ignored/common@3.0.0-beta.3","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+common%22"},"dist":{"shasum":"8fbc2e1ccd93a93d33e0d274a8f8053c28c9935e","tarball":"https://registry.npmjs.org/@ignored/common/-/common-3.0.0-beta.3.tgz","fileCount":125,"integrity":"sha512-xUKvRsg+dSzOTtybBg1UOU/SpQeWNsHbhk7lrl8M7W+Ox686Nbn395ylMCO/08WWnmiXn/X16PgIuHrD0w0TFQ==","signatures":[{"sig":"MEYCIQDkfvvGh0vWxb1DUKY7E8PWnxdLrBj39XCfKdq7aG6/IgIhANolO15hMeR4TDm6K9NcRGZo4TiHo3vUZikzxdfW28Sf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/QUvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBWg//QyH/npVzi9VdLFDCjiNZhXB/7aKH9EvMdYyZgBOoahO+Nwn3\r\nMpIeqZ6NeWVEiK7ZblAURow6208PRTsjs7E/qXF9l8loyfoRGM0Pt5AOj/uW\r\nPifR2nc7KCv9Yjhj3MPymiizwSoukypBamVUKZa1oAW1dGWzuDMHJuYZsMY6\r\n2hl0BH6a3KGH42TihNRA4rkEZeGgZPU1tN/xIr7iPE6Cw5OvOrtyyvJm55Zx\r\n1AHDqoWTlqJKWmPu7nsmQ9Dp38bPaDiI6ktOzycUR6O1AgpvqkeNyVCBJBRf\r\nK07J569NoabnjiVv7kIUjWvW518Fepk01R5ZvBM6OcFZ/c8y966Dw3nC+FYM\r\nwp81FKzEDImCj1PTRwAZMOlOLN2zGnQ2R5hyWCexVf8bvJj7t77nx1ppO5iS\r\na3TMYOP/2Nj9lO0XtgnBetCSmp8q7r4MotGFssWBC5JOFUn6IN4C7KhDJNHE\r\nbw0oGld4QfQLHS+7rGToH3TMbzAShwrdPRpSlELzhvFJVMrdNSV50zwtkZvK\r\nvhsOwipcFakfMz1Sy/h+7AEKLnKYNABfcbtkokjLl1BTxj9Uw1DNK8w5pyJj\r\nJWwtpSxF7E+zMKyiSP2uqXRbq1fmc52ctv+BmjXSgkunw1/eQ502x+sIqShs\r\n9zscyDaSzpwTUjwVgo9UCo25bFH+8SH+Q9w=\r\n=b/ow\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e6cd90ad72ae51dc60e6f2b0b6d3e56312469bbb","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./tests/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"Resources common to all Ethereum implementations","directories":{},"_nodeVersion":"14.19.3","dependencies":{"crc-32":"^1.2.0","@ignored/util":"8.0.0-beta.3"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","tape":"^5.3.1","karma":"^6.3.2","eslint":"^8.0.0","ts-node":"^10.2.1","karma-tap":"^4.2.0","typescript":"^4.4.2","@types/node":"^16.11.7","@types/tape":"^4.13.2","karma-typescript":"^5.5.3","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/common_3.0.0-beta.3_1660749102963_0.09738617772453373","host":"s3://npm-registry-packages"}},"3.0.0-beta.4":{"name":"@ignored/common","version":"3.0.0-beta.4","keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"license":"MIT","_id":"@ignored/common@3.0.0-beta.4","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+common%22"},"dist":{"shasum":"965bf6a8e8d65e75e0ede976cff805e7b047bffe","tarball":"https://registry.npmjs.org/@ignored/common/-/common-3.0.0-beta.4.tgz","fileCount":125,"integrity":"sha512-4GFEPF0tjY+vfeb3KuWVurUMuJ2P3Cok3c0MR5fh1SlI9CjtHptSLpqaoKoGIRFm9I0FSs89XJuM4iwzQlEGlQ==","signatures":[{"sig":"MEYCIQCAVkf3GT7MbWRMUAYJjhF7lBedGkBHYohtThzxXSGYbQIhAIkxh7lFKO0BMp1iQ44YBtu3hCWCwDvs8hE7OeSEibQ+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAR6tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqM7RAAnMKGiUpFwLWkaK38dn0V9tHAgsj/cfU++kViTnD6sEkzRC7D\r\nmGLo2xhmxMC5nxjfU7iQNKyCs8dwvU9bkUoNto1OsZVF/Q+mrd5wCRrXzde3\r\nrdZQdIOWClh1GLQrbiAZoeSsX6NHniXSBPh85wvS8uKD4E8wYbihVMmS4Shl\r\nkfd4tjliSpKk84C343mVjS9hI9f7rTPOqly/QfQSFppElXluvBhIo0Xbk09U\r\n1nt0fQADya721bxTX58Ai23mY3Wl+hyRj8x3dx0v9TYYkNp3K/D4T2kBhtGB\r\nhK8UCgPs68DNBPdsgTgX6XIOUo0G2GQQGjqauwBdtdMwsSp6RkQWckoCIzwy\r\nbFckZ1KIJGlX537t4JZSAprAPmxus42IZeyf3pSrDvBvY3fE0870noxhxZGJ\r\n4HT9P7x8nXgRbW7nAlHbijwW7r7nckBEqyzpq9H2nwT4P7osIxAiLSbHc/Qd\r\nuxMvhQHQFShq/C06wBAcjzdUlnWl5+8QzkqxNXvkXAhAWLuFxXkJ0jn+dj5q\r\nXItVWHc+WxKwwRMO1U0ZVKg70iH69pYKDgq5kkSruZAS8Vbu+JcgbsEQgNgY\r\ncB0Q6JWkA77u4VrR/nCCmdbQyDBNebkTAsgK9ijO7S86b3b1eIuTm8PCPxIi\r\nQ5IcPkjG19TixeFawd2xi6dlu652xFPpgo0=\r\n=WZkJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./tests/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"Resources common to all Ethereum implementations","directories":{},"_nodeVersion":"14.19.3","dependencies":{"crc-32":"^1.2.0","@ignored/util":"8.0.0-beta.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/common_3.0.0-beta.4_1661017773034_0.4468747459416089","host":"s3://npm-registry-packages"}},"3.0.0-beta.5":{"name":"@ignored/common","version":"3.0.0-beta.5","keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"license":"MIT","_id":"@ignored/common@3.0.0-beta.5","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+common%22"},"dist":{"shasum":"0874cef0d10d756f444917f2f09e47dd018914d4","tarball":"https://registry.npmjs.org/@ignored/common/-/common-3.0.0-beta.5.tgz","fileCount":125,"integrity":"sha512-1ivsEBxSYWUTaIkM03I40w6EcIRX+LlCplK8u2t79gh11ZhAtTgysSMnw1/NyJhg1RZJC5ttZemzxfMnLonD2w==","signatures":[{"sig":"MEUCIQDTSj8NfZAzc7zkMo8l15iL4n7SBqyYB2Hq8SrN5gTuKgIgYau8ndGmemce1rKYQ1fkSzhFtu6LWO2M4Oph9mt+nYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASDSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXUg/+I2Y0NzAm+XR4IF7BHdlmvsXEcWNtc7oJ8s+8ensn9Nj9Jb9i\r\n1YCcIMYJgn0/LfGySP8fx42spEK5+WEAX83tiOqQjsHKOWnJN5KUd2cwz/HC\r\nz2XA7ibwngxuV+CSlu5GYaEoBXJTc3vb+R4mlJb04i1bvwKGci87okCstSCG\r\nbzT3etxP9gs/d6r2QF/1LxDxhmQwFZa0QR9nN2/lknZdsFQCbh3QGdWviq+5\r\nnrvlOD9troUYAB+cucq6mMInTijp2+kObJL+tZ6zKuV3MfbzvIoq20l8pYkL\r\nOtp0soGKnb2Xguz42RouZM77A0y20dehQbc/rgt4ZdShSm+BOPUP+xtoS6kk\r\nryat3+1vI23w0nyDj1uhbujjETW4aNF7HfDMxgIMR46kh6eyGVPJtsquftnY\r\nOo6+ph5Yt1EbnJkFg6a0ymAxIad+yN4Lv5SsDsHTKpppdq0uAsXSZiUlLIfO\r\n1uwEko4IUJcvV77eL8Zosx0BCifwjznZmy4aHu6Pc4gQhiC4nUbIjefTkC9B\r\ncrQ3i7amfstc6WGtgYJzXXELlFFZ8j/jITepr4UDv+UzJilvD18fKpbfm63u\r\nTo2xXakLQZPPfmIOND79UPvvoJmntl8baDlLW5SMZ+2zzlKuY5gO/cbPRPvx\r\nLNxKXPnDOBv42VZRT1BQXLlqF9GWW59QkhI=\r\n=8Cwb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./tests/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"Resources common to all Ethereum implementations","directories":{},"_nodeVersion":"14.19.3","dependencies":{"crc-32":"^1.2.0","@ignored/util":"8.0.0-beta.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/common_3.0.0-beta.5_1661018321803_0.1524096450081851","host":"s3://npm-registry-packages"}},"3.0.0-beta.6":{"name":"@ignored/common","version":"3.0.0-beta.6","keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"license":"MIT","_id":"@ignored/common@3.0.0-beta.6","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+common%22"},"dist":{"shasum":"3e4a50e60b02ff356cdc70385e974d041c484cbf","tarball":"https://registry.npmjs.org/@ignored/common/-/common-3.0.0-beta.6.tgz","fileCount":125,"integrity":"sha512-vPpcx0CVdJ42EzZThRjQYpefOAlladPtsOQc4QNEdzyI85WxrD2Fte/FoE2TYRjNUgRa+fIkp/6GFlIoRIAtwQ==","signatures":[{"sig":"MEUCIG72cTLLAsuBYzJmb4whTynKXm+oS+c7IhuWMa3I17aOAiEAy/N3X8N8BDCO8vZ7LAlUI1L6dKw4wfpcxz4NcmrRm1Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASOyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6tA/9FGR1vBQamMxxvr2Mczno8c5H4FLUbULmLdm6lA60ZoVzbusb\r\n2GfwH7arje9Os8U364jvfhexqsjjpl8aWxn1rZnzBemar4i5qWpnVMxC8ICW\r\nht3lYhJsWa3+UcYsolnr84VOqh4UDJkTWLw//01PnnQbzMHejhPXqIAmynko\r\nEoYOiKyandlgpkzQlVoqHLC5DtSbdOsgeC58benz4oa/iRB7k99In263FahU\r\nGZMQeHbk1r03g0ulgqJeG/WmZcdoXNh8HOJFBxPacIUvtGhrcayoNJand9p5\r\nI4FeWYyfZnOqWQFFGnZYw1woJS2cvuSp6isv6LLjZCLxe/kaV7r0gUAGQ46s\r\nFX+l1tnpJZb33WeHdbCUiLtysUImezBUA5lbDg7Pe2OqcwonR3WSOqCL0/3G\r\n4n3chkGhaG/maePeo8S6KK8CMFF0VZB6adTawGWJ40UG8cpfXzauKxzaF/L1\r\nqdTGKFfRtYclsWY8dn+UJE2sld6wJEXeTAEwK9uRgDKITHb6WGoOVpZOQReR\r\npVCRyYVF55gK2VtRdQEvRyeTjPdce1CIpcn5ERr/61NFALMBi8GGKDGmy952\r\ny5MyIv2CpaBnP/D/MaVAhqNn/EBEnZZ6zkN/4bgZeMEWCTChww9M07BHIUi5\r\nyW8rdsXB6g+5adMIwf4pkr12IA4iVw8QlDc=\r\n=D6QA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./tests/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"Resources common to all Ethereum implementations","directories":{},"_nodeVersion":"14.19.3","dependencies":{"crc-32":"^1.2.0","@ignored/util":"8.0.0-beta.6"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/common_3.0.0-beta.6_1661019058099_0.427390807928546","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-08-17T15:11:42.901Z","modified":"2026-06-12T13:45:59.704Z","3.0.0-beta.3":"2022-08-17T15:11:43.227Z","3.0.0-beta.4":"2022-08-20T17:49:33.241Z","3.0.0-beta.5":"2022-08-20T17:58:42.017Z","3.0.0-beta.6":"2022-08-20T18:10:58.306Z"},"bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+common%22"},"license":"MIT","homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common#readme","keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"description":"Resources common to all Ethereum implementations","maintainers":[{"email":"john@kanej.me","name":"kanej"},{"email":"email@patriciopalladino.com","name":"alcuadrado"}],"readme":"# @ethereumjs/common\n\n[![NPM Package][common-npm-badge]][common-npm-link]\n[![GitHub Issues][common-issues-badge]][common-issues-link]\n[![Actions Status][common-actions-badge]][common-actions-link]\n[![Code Coverage][common-coverage-badge]][common-coverage-link]\n[![Discord][discord-badge]][discord-link]\n\n| Resources common to all EthereumJS implementations. |\n| --------------------------------------------------- |\n\nNote: this `README` reflects the state of the library from `v2.0.0` onwards. See `README` from the [standalone repository](https://github.com/ethereumjs/ethereumjs-common) for an introduction on the last preceding release.\n\n## Installation\n\nTo obtain the latest version, simply require the project using `npm`:\n\n```shell\nnpm install @ethereumjs/common\n```\n\n## Usage\n\n### import / require\n\nimport (ESM, TypeScript):\n\n```typescript\nimport { Chain, Common, Hardfork } from '@ethereumjs/common\n```\n\nrequire (CommonJS, Node.js):\n\n```typescript\nconst { Common, Chain, Hardfork } = require('@ethereumjs/common')\n```\n\n## Parameters\n\nAll parameters can be accessed through the `Common` class, instantiated with an object containing either the `chain` (e.g. 'Chain.Mainnet') or the `chain` together with a specific `hardfork` provided:\n\n```typescript\n// With enums:\nconst common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London })\n\n// (also possible with directly passing in strings:)\nconst common = new Common({ chain: 'mainnet', hardfork: 'london' })\n```\n\nIf no hardfork is provided, the common is initialized with the default hardfork.\n\nCurrent `DEFAULT_HARDFORK`: `Hardfork.Merge`\n\nHere are some simple usage examples:\n\n```typescript\n// Instantiate with the chain (and the default hardfork)\nlet c = new Common({ chain: Chain.Ropsten })\nc.param('gasPrices', 'ecAddGas') // 500\n\n// Chain and hardfork provided\nc = new Common({ chain: Chain.Ropsten, hardfork: Hardfork.Byzantium })\nc.param('pow', 'minerReward') // 3000000000000000000\n\n// Get bootstrap nodes for chain/network\nc.bootstrapNodes() // Array with current nodes\n\n// Instantiate with an EIP activated\nc = new Common({ chain: Chain.Mainnet, eips: [2537] })\n```\n\n# API\n\n### Docs\n\nSee the API documentation for a full list of functions for accessing specific chain and\ndepending hardfork parameters. There are also additional helper functions like\n`paramByBlock (topic, name, blockNumber)` or `hardforkIsActiveOnBlock (hardfork, blockNumber)`\nto ease `blockNumber` based access to parameters.\n\nGenerated TypeDoc API [Documentation](./docs/README.md)\n\n### BigInt Support\n\nStarting with v4 the usage of [BN.js](https://github.com/indutny/bn.js/) for big numbers has been removed from the library and replaced with the usage of the native JS [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) data type (introduced in `ES2020`).\n\nPlease note that number-related API signatures have changed along with this version update and the minimal build target has been updated to `ES2020`.\n\n## Events\n\nThe `Common` class is implemented as an `EventEmitter` and is emitting the following events\non which you can react within your code:\n\n| Event             | Description                                                |\n| ----------------- | ---------------------------------------------------------- |\n| `hardforkChanged` | Emitted when a hardfork change occurs in the Common object |\n\n## Setup\n\n### Chains\n\nThe `chain` can be set in the constructor like this:\n\n```typescript\nconst c = new Common({ chain: Chain.Ropsten })\n```\n\nSupported chains:\n\n- `mainnet` (`Chain.Mainnet`)\n- `ropsten` (`Chain.Ropsten`)\n- `rinkeby` (`Chain.Rinkeby`)\n- `kovan` (`Chain.Kovan`)\n- `goerli` (`Chain.Goerli`)\n- `sepolia` (`Chain.Sepolia`) (`v2.6.1`+)\n- Private/custom chain parameters\n\nThe following chain-specific parameters are provided:\n\n- `name`\n- `chainId`\n- `networkId`\n- `consensusType` (e.g. `pow` or `poa`)\n- `consensusAlgorithm` (e.g. `ethash` or `clique`)\n- `consensusConfig` (depends on `consensusAlgorithm`, e.g. `period` and `epoch` for `clique`)\n- `genesis` block header values\n- `hardforks` block numbers\n- `bootstrapNodes` list\n- `dnsNetworks` list ([EIP-1459](https://eips.ethereum.org/EIPS/eip-1459)-compliant list of DNS networks for peer discovery)\n\nTo get an overview of the different parameters have a look at one of the chain-specifc\nfiles like `mainnet.json` in the `chains` directory, or to the `Chain` type in [./src/types.ts](./src/types.ts).\n\n### Working with private/custom chains\n\nThere are two distinct APIs available for setting up custom(ized) chains.\n\n#### Basic Chain Customization / Predefined Custom Chains\n\nThere is a dedicated `Common.custom()` static constructor which allows for an easy instantiation of a Common instance with somewhat adopted chain parameters, with the main use case to adopt on instantiating with a deviating chain ID (you can use this to adopt other chain parameters as well though). Instantiating a custom common instance with its own chain ID and inheriting all other parameters from `mainnet` can now be as easily done as:\n\n```typescript\nconst common = Common.custom({ chainId: 1234 })\n```\n\nThe `custom()` method also takes a string as a first input (instead of a dictionary). This can be used in combination with the `CustomChain` enum dict which allows for the selection of predefined supported custom chains for an easier `Common` setup of these supported chains:\n\n```typescript\nconst common = Common.custom(CustomChain.ArbitrumRinkebyTestnet)\n```\n\nThe following custom chains are currently supported:\n\n- `PolygonMainnet`\n- `PolygonMumbai`\n- `ArbitrumRinkebyTestnet`\n- `xDaiChain`\n- `OptimisticKovan`\n- `OptimisticEthereum`\n\n`Common` instances created with this simplified `custom()` constructor can't be used in all usage contexts (the HF configuration is very likely not matching the actual chain) but can be useful for specific use cases, e.g. for sending a tx with `@ethereumjs/tx` to an L2 network (see the `Tx` library [README](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx) for a complete usage example).\n\n#### Activate with a single custom Chain setup\n\nIf you want to initialize a `Common` instance with a single custom chain which is then directly activated\nyou can pass a dictionary - conforming to the parameter format described above - with your custom chain\nvalues to the constructor using the `chain` parameter or the `setChain()` method, here is some example:\n\n```typescript\nimport myCustomChain from './[PATH]/myCustomChain.json'\nconst common = new Common({ chain: myCustomChain })\n```\n\n#### Initialize using customChains Array\n\nA second way for custom chain initialization is to use the `customChains` constructor option. This\noption comes with more flexibility and allows for an arbitrary number of custom chains to be initialized on\na common instance in addition to the already supported ones. It also allows for an activation-independent\ninitialization, so you can add your chains by adding to the `customChains` array and either directly\nuse the `chain` option to activate one of the custom chains passed or activate a build in chain\n(e.g. `mainnet`) and switch to other chains - including the custom ones - by using `Common.setChain()`.\n\n```typescript\nimport myCustomChain1 from './[PATH]/myCustomChain1.json'\nimport myCustomChain2 from './[PATH]/myCustomChain2.json'\n// Add two custom chains, initial mainnet activation\nconst common1 = new Common({ chain: 'mainnet', customChains: [myCustomChain1, myCustomChain2] })\n// Somewhat later down the road...\ncommon1.setChain('customChain1')\n// Add two custom chains, activate customChain1\nconst common1 = new Common({\n  chain: 'customChain1',\n  customChains: [myCustomChain1, myCustomChain2],\n})\n```\n\nStarting with v3 custom genesis states should be passed to the [Blockchain](../blockchain/) library directly.\n\n### Hardforks\n\nThe `hardfork` can be set in constructor like this:\n\n```typescript\nimport { Chain, Common, Hardfork } from '@ethereumjs/common'\n\nconst c = new Common({ chain: Chain.Ropsten, hardfork: Hardfork.Byzantium })\n```\n\n### Active Hardforks\n\nThere are currently parameter changes by the following past and future hardfork by the\nlibrary supported:\n\n- `chainstart` (`Hardfork.Chainstart`)\n- `homestead` (`Hardfork.Homestead`)\n- `dao` (`Hardfork.Dao`)\n- `tangerineWhistle` (`Hardfork.TangerineWhistle`)\n- `spuriousDragon` (`Hardfork.SpuriousDragon`)\n- `byzantium` (`Hardfork.Byzantium`)\n- `constantinople` (`Hardfork.Constantinople`)\n- `petersburg` (`Hardfork.Petersburg`) (aka `constantinopleFix`, apply together with `constantinople`)\n- `istanbul` (`Hardfork.Instanbul`)\n- `muirGlacier` (`Hardfork.MuirGlacier`)\n- `berlin` (`Hardfork.Berlin`) (since `v2.2.0`)\n- `london` (`Hardfork.London`) (since `v2.4.0`)\n- `merge` (`Hardfork.Merge`) (`DEFAULT_HARDFORK`) (since `v2.5.0`)\n\n### Future Hardforks\n\nThe next upcoming HF `Hardfork.Shanghai` is currently not yet supported by this library.\n\n### Parameter Access\n\nFor hardfork-specific parameter access with the `param()` and `paramByBlock()` functions\nyou can use the following `topics`:\n\n- `gasConfig`\n- `gasPrices`\n- `vm`\n- `pow`\n\nSee one of the hardfork files like `byzantium.json` in the `hardforks` directory\nfor an overview. For consistency, the chain start (`chainstart`) is considered an own\nhardfork.\n\nThe hardfork-specific json files only contain the deltas from `chainstart` and\nshouldn't be accessed directly until you have a specific reason for it.\n\n### EIPs\n\nStarting with the `v2.0.0` release of the library, EIPs are now native citizens within the library\nand can be activated like this:\n\n```typescript\nconst c = new Common({ chain: Chain.Mainnet, eips: [2537] })\n```\n\nThe following EIPs are currently supported:\n\n- [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559): Fee market change for ETH 1.0 chain\n- [EIP-2315](https://eips.ethereum.org/EIPS/eip-2315): Simple subroutines for the EVM (`experimental`)\n- [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537): BLS precompiles\n- [EIP-2565](https://eips.ethereum.org/EIPS/eip-2565): ModExp gas cost\n- [EIP-2718](https://eips.ethereum.org/EIPS/eip-2565): Transaction Types\n- [EIP-2929](https://eips.ethereum.org/EIPS/eip-2929): gas cost increases for state access opcodes\n- [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930): Optional accesss list tx type\n- [EIP-3198](https://eips.ethereum.org/EIPS/eip-3198): Base fee Opcode\n- [EIP-3529](https://eips.ethereum.org/EIPS/eip-3529): Reduction in refunds\n- [EIP-3540](https://eips.ethereum.org/EIPS/eip-3541) - EVM Object Format (EOF) v1 (`experimental`)\n- [EIP-3541](https://eips.ethereum.org/EIPS/eip-3541): Reject new contracts starting with the 0xEF byte\n- [EIP-3554](https://eips.ethereum.org/EIPS/eip-3554): Difficulty Bomb Delay to December 2021 (only PoW networks)\n- [EIP-3607](https://eips.ethereum.org/EIPS/eip-3607): Reject transactions from senders with deployed code\n- [EIP-3670](https://eips.ethereum.org/EIPS/eip-3670): EOF - Code Validation (`experimental`)\n- [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675): Upgrade consensus to Proof-of-Stake (`experimental`)\n- [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): Push0 opcode (`v2.6.1`+)\n- [EIP-3860](https://eips.ethereum.org/EIPS/eip-3855): Limit and meter initcode (`experimental`)\n- [EIP-4345](https://eips.ethereum.org/EIPS/eip-4345): Difficulty Bomb Delay to June 2022\n- [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399): Supplant DIFFICULTY opcode with PREVRANDAO (Merge) (`experimental`)\n\n### Bootstrap Nodes\n\nYou can use `common.bootstrapNodes()` function to get nodes for a specific chain/network.\n\n## EthereumJS\n\nSee our organizational [documentation](https://ethereumjs.readthedocs.io) for an introduction to `EthereumJS` as well as information on current standards and best practices. If you want to join for work or carry out improvements on the libraries, please review our [contribution guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html) first.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\n[discord-badge]: https://img.shields.io/static/v1?logo=discord&label=discord&message=Join&color=blue\n[discord-link]: https://discord.gg/TNwARpR\n[common-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/common.svg\n[common-npm-link]: https://www.npmjs.com/package/@ethereumjs/common\n[common-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-monorepo/package:%20common?label=issues\n[common-issues-link]: https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A\"package%3A+common\"\n[common-actions-badge]: https://github.com/ethereumjs/ethereumjs-monorepo/workflows/Common/badge.svg\n[common-actions-link]: https://github.com/ethereumjs/ethereumjs-monorepo/actions?query=workflow%3A%22Common%22\n[common-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=common\n[common-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/common\n","readmeFilename":"README.md"}