Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ethereumjs/common

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethereumjs/common - npm Package Compare versions

Comparing version 2.6.0 to 2.6.1

dist.browser/chains/sepolia.json

3

dist.browser/chains/index.js

@@ -23,2 +23,3 @@ "use strict";

var goerli_json_1 = __importDefault(require("./goerli.json"));
var sepolia_json_1 = __importDefault(require("./sepolia.json"));
/**

@@ -35,2 +36,3 @@ * @hidden

'5': 'goerli',
'11155111': 'sepolia',
};

@@ -43,2 +45,3 @@ var chains = {

goerli: goerli_json_1.default,
sepolia: sepolia_json_1.default,
};

@@ -45,0 +48,0 @@ if (customChains) {

8

dist.browser/chains/kovan.json

@@ -65,9 +65,9 @@ {

"name": "berlin",
"block": null,
"forkHash": null
"block": 24770900,
"forkHash": "0x1a0f10d9"
},
{
"name": "london",
"block": null,
"forkHash": null
"block": 26741100,
"forkHash": "0x1ed20b71"
},

@@ -74,0 +74,0 @@ {

@@ -17,4 +17,5 @@ "use strict";

3675: require('./3675.json'),
3855: require('./3855.json'),
4345: require('./4345.json'),
};
//# sourceMappingURL=index.js.map

@@ -11,2 +11,3 @@ "use strict";

'5': 'goerli',
'11155111': 'sepolia',
},

@@ -18,2 +19,3 @@ mainnet: require('./mainnet.json'),

goerli: require('./goerli.json'),
sepolia: require('./sepolia.json'),
};

@@ -20,0 +22,0 @@ /**

@@ -49,3 +49,4 @@ /// <reference types="bn.js" />

Kovan = 42,
Goerli = 5
Goerli = 5,
Sepolia = 11155111
}

@@ -52,0 +53,0 @@ export declare enum Hardfork {

@@ -93,2 +93,3 @@ "use strict";

Chain[Chain["Goerli"] = 5] = "Goerli";
Chain[Chain["Sepolia"] = 11155111] = "Sepolia";
})(Chain = exports.Chain || (exports.Chain = {}));

@@ -255,3 +256,3 @@ var Hardfork;

}
throw new Error("Custom chain " + chainParamsOrName + " not supported");
throw new Error("Custom chain ".concat(chainParamsOrName, " not supported"));
}

@@ -296,3 +297,3 @@ };

}
throw new Error("Chain with ID " + chain + " not supported");
throw new Error("Chain with ID ".concat(chain, " not supported"));
}

@@ -302,3 +303,3 @@ if (initializedChains[chain]) {

}
throw new Error("Chain with name " + chain + " not supported");
throw new Error("Chain with name ".concat(chain, " not supported"));
};

@@ -335,3 +336,3 @@ /**

if (chain[param] === undefined) {
throw new Error("Missing required chain parameter: " + param);
throw new Error("Missing required chain parameter: ".concat(param));
}

@@ -361,3 +362,3 @@ }

if (!this._isSupportedHardfork(hardfork)) {
throw new Error("Hardfork " + hardfork + " not set as supported in supportedHardforks");
throw new Error("Hardfork ".concat(hardfork, " not set as supported in supportedHardforks"));
}

@@ -385,3 +386,3 @@ var existing = false;

if (!existing) {
throw new Error("Hardfork with name " + hardfork + " not supported");
throw new Error("Hardfork with name ".concat(hardfork, " not supported"));
}

@@ -443,8 +444,8 @@ };

if (td) {
var msgAdd = "block number: " + blockNumber + " (-> " + hardfork + "), ";
var msgAdd = "block number: ".concat(blockNumber, " (-> ").concat(hardfork, "), ");
if (minTdHF) {
if (!this.hardforkGteHardfork(hardfork, minTdHF)) {
var msg = 'HF determined by block number is lower than the minimum total difficulty HF';
msgAdd += "total difficulty: " + td + " (-> " + minTdHF + ")";
throw new Error(msg + ": " + msgAdd);
msgAdd += "total difficulty: ".concat(td, " (-> ").concat(minTdHF, ")");
throw new Error("".concat(msg, ": ").concat(msgAdd));
}

@@ -455,4 +456,4 @@ }

var msg = 'Maximum HF determined by total difficulty is lower than the block number HF';
msgAdd += "total difficulty: " + td + " (-> " + maxTdHF + ")";
throw new Error(msg + ": " + msgAdd);
msgAdd += "total difficulty: ".concat(td, " (-> ").concat(maxTdHF, ")");
throw new Error("".concat(msg, ": ").concat(msgAdd));
}

@@ -491,3 +492,3 @@ }

else if (onlySupported && !this._isSupportedHardfork(hardfork)) {
throw new Error("Hardfork " + hardfork + " not set as supported in supportedHardforks");
throw new Error("Hardfork ".concat(hardfork, " not set as supported in supportedHardforks"));
}

@@ -518,3 +519,3 @@ return hardfork;

}
throw new Error("Hardfork " + hardfork + " not defined for chain " + this.chainName());
throw new Error("Hardfork ".concat(hardfork, " not defined for chain ").concat(this.chainName()));
};

@@ -559,14 +560,13 @@ /**

if (!(eip in eips_1.EIPs)) {
throw new Error(eip + " not supported");
throw new Error("".concat(eip, " not supported"));
}
var minHF = this_1.gteHardfork(eips_1.EIPs[eip]['minimumHardfork']);
if (!minHF) {
throw new Error(eip + " cannot be activated on hardfork " + this_1.hardfork() + ", minimumHardfork: " + minHF);
throw new Error("".concat(eip, " cannot be activated on hardfork ").concat(this_1.hardfork(), ", minimumHardfork: ").concat(minHF));
}
if (eips_1.EIPs[eip].requiredEIPs) {
// eslint-disable-next-line no-extra-semi
;
eips_1.EIPs[eip].requiredEIPs.forEach(function (elem) {
if (!(eips.includes(elem) || _this.isActivatedEIP(elem))) {
throw new Error(eip + " requires EIP " + elem + ", but is not included in the EIP list");
throw new Error("".concat(eip, " requires EIP ").concat(elem, ", but is not included in the EIP list"));
}

@@ -661,3 +661,3 @@ });

if (!hfChanges[1][topic]) {
throw new Error("Topic " + topic + " not defined");
throw new Error("Topic ".concat(topic, " not defined"));
}

@@ -690,7 +690,7 @@ if (hfChanges[1][topic][name] !== undefined) {

if (!(eip in eips_1.EIPs)) {
throw new Error(eip + " not supported");
throw new Error("".concat(eip, " not supported"));
}
var eipParams = eips_1.EIPs[eip];
if (!(topic in eipParams)) {
throw new Error("Topic " + topic + " not defined");
throw new Error("Topic ".concat(topic, " not defined"));
}

@@ -1030,3 +1030,3 @@ if (eipParams[topic][name] === undefined) {

var forkhash = (0, ethereumjs_util_1.intToBuffer)((0, crc_32_1.buf)(inputBuffer) >>> 0).toString('hex');
return "0x" + forkhash;
return "0x".concat(forkhash);
};

@@ -1087,2 +1087,4 @@ /**

return require('./genesisStates/goerli.json');
case 'sepolia':
return require('./genesisStates/sepolia.json');
}

@@ -1089,0 +1091,0 @@ // Custom chains with genesis state provided

@@ -12,2 +12,3 @@ "use strict";

const goerli_json_1 = __importDefault(require("./goerli.json"));
const sepolia_json_1 = __importDefault(require("./sepolia.json"));
/**

@@ -23,2 +24,3 @@ * @hidden

'5': 'goerli',
'11155111': 'sepolia',
};

@@ -31,2 +33,3 @@ const chains = {

goerli: goerli_json_1.default,
sepolia: sepolia_json_1.default,
};

@@ -33,0 +36,0 @@ if (customChains) {

@@ -65,9 +65,9 @@ {

"name": "berlin",
"block": null,
"forkHash": null
"block": 24770900,
"forkHash": "0x1a0f10d9"
},
{
"name": "london",
"block": null,
"forkHash": null
"block": 26741100,
"forkHash": "0x1ed20b71"
},

@@ -74,0 +74,0 @@ {

@@ -17,4 +17,5 @@ "use strict";

3675: require('./3675.json'),
3855: require('./3855.json'),
4345: require('./4345.json'),
};
//# sourceMappingURL=index.js.map

@@ -11,2 +11,3 @@ "use strict";

'5': 'goerli',
'11155111': 'sepolia',
},

@@ -18,2 +19,3 @@ mainnet: require('./mainnet.json'),

goerli: require('./goerli.json'),
sepolia: require('./sepolia.json'),
};

@@ -20,0 +22,0 @@ /**

@@ -49,3 +49,4 @@ /// <reference types="bn.js" />

Kovan = 42,
Goerli = 5
Goerli = 5,
Sepolia = 11155111
}

@@ -52,0 +53,0 @@ export declare enum Hardfork {

@@ -56,2 +56,3 @@ "use strict";

Chain[Chain["Goerli"] = 5] = "Goerli";
Chain[Chain["Sepolia"] = 11155111] = "Sepolia";
})(Chain = exports.Chain || (exports.Chain = {}));

@@ -446,3 +447,2 @@ var Hardfork;

if (eips_1.EIPs[eip].requiredEIPs) {
// eslint-disable-next-line no-extra-semi
;

@@ -857,2 +857,4 @@ eips_1.EIPs[eip].requiredEIPs.forEach((elem) => {

return require('./genesisStates/goerli.json');
case 'sepolia':
return require('./genesisStates/sepolia.json');
}

@@ -859,0 +861,0 @@ // Custom chains with genesis state provided

{
"name": "@ethereumjs/common",
"version": "2.6.0",
"version": "2.6.1",
"description": "Resources common to all Ethereum implementations",

@@ -30,4 +30,2 @@ "license": "MIT",

"coverage": "../../config/cli/coverage.sh",
"format": "ethereumjs-config-format",
"format:fix": "ethereumjs-config-format-fix",
"tsc": "../../config/cli/ts-compile.sh",

@@ -44,6 +42,6 @@ "lint": "../../config/cli/lint.sh",

"crc-32": "^1.2.0",
"ethereumjs-util": "^7.1.3"
"ethereumjs-util": "^7.1.4"
},
"devDependencies": {
"@types/node": "^11.13.4",
"@types/node": "^16.11.7",
"@types/tape": "^4.13.2",

@@ -55,3 +53,3 @@ "eslint": "^6.8.0",

"karma-tap": "^4.2.0",
"karma-typescript": "^5.5.1",
"karma-typescript": "^5.5.3",
"nyc": "^15.1.0",

@@ -58,0 +56,0 @@ "prettier": "^2.0.5",

@@ -118,2 +118,3 @@ # @ethereumjs/common

- `goerli` (`Chain.Goerli`)
- `sepolia` (`Chain.Sepolia`) (`v2.6.1`+)
- Private/custom chain parameters

@@ -296,2 +297,3 @@

- [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675): Upgrade consensus to Proof-of-Stake (`experimental`)
- [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): Push0 opcode (`v2.6.1`+)

@@ -298,0 +300,0 @@ ## Bootstrap Nodes

@@ -7,2 +7,3 @@ import { Chain, chainsType } from './../types'

import goerli from './goerli.json'
import sepolia from './sepolia.json'

@@ -19,2 +20,3 @@ /**

'5': 'goerli',
'11155111': 'sepolia',
}

@@ -27,2 +29,3 @@ const chains: any = {

goerli,
sepolia,
}

@@ -29,0 +32,0 @@ if (customChains) {

@@ -65,9 +65,9 @@ {

"name": "berlin",
"block": null,
"forkHash": null
"block": 24770900,
"forkHash": "0x1a0f10d9"
},
{
"name": "london",
"block": null,
"forkHash": null
"block": 26741100,
"forkHash": "0x1ed20b71"
},

@@ -74,0 +74,0 @@ {

@@ -16,3 +16,4 @@ import { eipsType } from './../types'

3675: require('./3675.json'),
3855: require('./3855.json'),
4345: require('./4345.json'),
}

@@ -10,2 +10,3 @@ import { genesisStatesType } from './../types'

'5': 'goerli',
'11155111': 'sepolia',
},

@@ -17,2 +18,3 @@ mainnet: require('./mainnet.json'),

goerli: require('./goerli.json'),
sepolia: require('./sepolia.json'),
}

@@ -19,0 +21,0 @@

@@ -65,2 +65,3 @@ import { EventEmitter } from 'events'

Goerli = 5,
Sepolia = 11155111,
}

@@ -576,3 +577,2 @@

if (EIPs[eip].requiredEIPs) {
// eslint-disable-next-line no-extra-semi
;(EIPs[eip].requiredEIPs as number[]).forEach((elem) => {

@@ -1019,2 +1019,4 @@ if (!(eips.includes(elem) || this.isActivatedEIP(elem))) {

return require('./genesisStates/goerli.json')
case 'sepolia':
return require('./genesisStates/sepolia.json')
}

@@ -1021,0 +1023,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc