@eth-optimism/core-utils
Advanced tools
Comparing version 0.0.1-alpha.28 to 0.0.1-alpha.29
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84489
55
2113