Socket
Socket
Sign inDemoInstall

@eth-optimism/core-utils

Package Overview
Dependencies
Maintainers
5
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eth-optimism/core-utils - npm Package Compare versions

Comparing version 0.0.1-alpha.28 to 0.0.1-alpha.29

build/src/app/ethereum.js

3

build/src/app/constants.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.INVALID_ADDRESS = exports.ZERO_ADDRESS = void 0;
exports.CHAIN_ID = exports.INVALID_ADDRESS = exports.ZERO_ADDRESS = void 0;
exports.ZERO_ADDRESS = '0x' + '00'.repeat(20);
exports.INVALID_ADDRESS = '0xdeaDDeADDEaDdeaDdEAddEADDEAdDeadDEADDEaD';
exports.CHAIN_ID = 420;
//# sourceMappingURL=constants.js.map

@@ -12,5 +12,6 @@ "use strict";

};
exports.keccak256 = (value) => {
exports.keccak256 = (value, returnPrefixed = false) => {
const preimage = misc_1.add0x(value);
return misc_1.remove0x(ethers_1.ethers.utils.keccak256(preimage));
const hash = ethers_1.ethers.utils.keccak256(preimage);
return returnPrefixed ? hash : misc_1.remove0x(hash);
};

@@ -17,0 +18,0 @@ exports.keccak256FromUtf8 = (s) => {

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

__exportStar(require("./equals"), exports);
__exportStar(require("./ethereum"), exports);
__exportStar(require("./log"), exports);

@@ -27,0 +28,0 @@ __exportStar(require("./misc"), exports);

@@ -43,3 +43,3 @@ "use strict";

}
static async assertRevertsAsync(revertMessage, func) {
static async assertRevertsAsync(func, revertMessage) {
let succeeded = true;

@@ -52,3 +52,4 @@ try {

if (e instanceof Error) {
assert.equal(e.message, `VM Exception while processing transaction: revert ${revertMessage}`);
const expectedMessage = `VM Exception while processing transaction: revert ${revertMessage}`;
assert(e.message.startsWith(expectedMessage), `Function did not throw expected error. Expected: ${expectedMessage}*, Received: ${e.message}`);
}

@@ -55,0 +56,0 @@ else {

{
"name": "@eth-optimism/core-utils",
"version": "0.0.1-alpha.28",
"version": "0.0.1-alpha.29",
"description": "Optimism Core Utils",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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