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

@eth-optimism/core-utils

Package Overview
Dependencies
Maintainers
2
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.12.1 to 0.12.2

dist/etherscan.d.ts

3

dist/index.d.ts
export * from './common';
export * from './external';
export * from './optimism';
export * from './gnosis-safe-checksum';
export * from './etherscan';
export * from './helpers/setupProxyContract';

@@ -20,2 +20,5 @@ "use strict";

__exportStar(require("./optimism"), exports);
__exportStar(require("./gnosis-safe-checksum"), exports);
__exportStar(require("./etherscan"), exports);
__exportStar(require("./helpers/setupProxyContract"), exports);
//# sourceMappingURL=index.js.map

8

dist/optimism/hashing.d.ts

@@ -24,6 +24,6 @@ import { BigNumberish, BigNumber } from '@ethersproject/bignumber';

};
export declare const hashCrossDomainMessage: (nonce: BigNumber, sender: string, target: string, value: BigNumber, gasLimit: BigNumber, data: string) => string;
export declare const hashCrossDomainMessagev0: (target: string, sender: string, data: string, nonce: BigNumber) => string;
export declare const hashCrossDomainMessagev1: (nonce: BigNumber, sender: string, target: string, value: BigNumberish, gasLimit: BigNumberish, data: string) => string;
export declare const hashWithdrawal: (nonce: BigNumber, sender: string, target: string, value: BigNumber, gasLimit: BigNumber, data: string) => string;
export declare const hashCrossDomainMessage: (nonce: BigNumber, sender: string, target: string, value: BigNumber, gasLimit: BigNumber, message: string) => string;
export declare const hashCrossDomainMessagev0: (target: string, sender: string, message: string, nonce: BigNumber) => string;
export declare const hashCrossDomainMessagev1: (nonce: BigNumber, sender: string, target: string, value: BigNumberish, gasLimit: BigNumberish, message: string) => string;
export declare const hashWithdrawal: (nonce: BigNumber, sender: string, target: string, value: BigNumber, gasLimit: BigNumber, message: string) => string;
export declare const hashOutputRootProof: (proof: OutputRootProof) => string;

@@ -7,9 +7,9 @@ "use strict";

const encoding_1 = require("./encoding");
const hashCrossDomainMessage = (nonce, sender, target, value, gasLimit, data) => {
const hashCrossDomainMessage = (nonce, sender, target, value, gasLimit, message) => {
const { version } = (0, encoding_1.decodeVersionedNonce)(nonce);
if (version.eq(0)) {
return (0, exports.hashCrossDomainMessagev0)(target, sender, data, nonce);
return (0, exports.hashCrossDomainMessagev0)(target, sender, message, nonce);
}
else if (version.eq(1)) {
return (0, exports.hashCrossDomainMessagev1)(nonce, sender, target, value, gasLimit, data);
return (0, exports.hashCrossDomainMessagev1)(nonce, sender, target, value, gasLimit, message);
}

@@ -19,11 +19,11 @@ throw new Error(`unknown version ${version.toString()}`);

exports.hashCrossDomainMessage = hashCrossDomainMessage;
const hashCrossDomainMessagev0 = (target, sender, data, nonce) => {
return (0, keccak256_1.keccak256)((0, encoding_1.encodeCrossDomainMessageV0)(target, sender, data, nonce));
const hashCrossDomainMessagev0 = (target, sender, message, nonce) => {
return (0, keccak256_1.keccak256)((0, encoding_1.encodeCrossDomainMessageV0)(target, sender, message, nonce));
};
exports.hashCrossDomainMessagev0 = hashCrossDomainMessagev0;
const hashCrossDomainMessagev1 = (nonce, sender, target, value, gasLimit, data) => {
return (0, keccak256_1.keccak256)((0, encoding_1.encodeCrossDomainMessageV1)(nonce, sender, target, value, gasLimit, data));
const hashCrossDomainMessagev1 = (nonce, sender, target, value, gasLimit, message) => {
return (0, keccak256_1.keccak256)((0, encoding_1.encodeCrossDomainMessageV1)(nonce, sender, target, value, gasLimit, message));
};
exports.hashCrossDomainMessagev1 = hashCrossDomainMessagev1;
const hashWithdrawal = (nonce, sender, target, value, gasLimit, data) => {
const hashWithdrawal = (nonce, sender, target, value, gasLimit, message) => {
const types = ['uint256', 'address', 'address', 'uint256', 'uint256', 'bytes'];

@@ -36,3 +36,3 @@ const encoded = abi_1.defaultAbiCoder.encode(types, [

gasLimit,
data,
message,
]);

@@ -39,0 +39,0 @@ return (0, keccak256_1.keccak256)(encoded);

@@ -8,1 +8,2 @@ export * from './alias';

export * from './op-provider';
export * from './constants';

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

__exportStar(require("./op-provider"), exports);
__exportStar(require("./constants"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@eth-optimism/core-utils",
"version": "0.12.1",
"version": "0.12.2",
"description": "[Optimism] Core typescript utilities",

@@ -10,13 +10,2 @@ "main": "dist/index",

],
"scripts": {
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "eslint . --max-warnings=0",
"lint:fix": "yarn lint:check --fix",
"pre-commit": "lint-staged",
"test": "ts-mocha test/**/*.spec.ts",
"test:coverage": "nyc ts-mocha test/**/*.spec.ts && nyc merge .nyc_output coverage.json"
},
"keywords": [

@@ -41,9 +30,11 @@ "optimism",

"@ethersproject/bytes": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/constants": "^5.7.0",
"@ethersproject/keccak256": "^5.7.0",
"@ethersproject/properties": "^5.7.0",
"@ethersproject/rlp": "^5.7.0",
"@ethersproject/properties": "^5.7.0",
"@ethersproject/web": "^5.7.0",
"chai": "^4.3.4"
"chai": "^4.3.4",
"ethers": "^5.7.0",
"node-fetch": "^2.6.7"
},

@@ -53,3 +44,14 @@ "devDependencies": {

"mocha": "^10.0.0"
},
"scripts": {
"all": "pnpm clean && pnpm build && pnpm test && pnpm lint:fix && pnpm lint",
"build": "tsc -p tsconfig.json",
"clean": "rimraf dist/ ./tsconfig.tsbuildinfo",
"lint": "pnpm lint:fix && pnpm lint:check",
"lint:check": "eslint . --max-warnings=0",
"lint:fix": "pnpm lint:check --fix",
"pre-commit": "lint-staged",
"test": "ts-mocha test/**/*.spec.ts",
"test:coverage": "nyc ts-mocha test/**/*.spec.ts && nyc merge .nyc_output coverage.json"
}
}
}

@@ -16,3 +16,3 @@ # @eth-optimism/core-utils

```bash
$ yarn
$ pnpm i
```

@@ -23,6 +23,6 @@

```bash
$ yarn build
$ yarn start
$ yarn test
$ yarn lint
$ pnpm build
$ pnpm start
$ pnpm test
$ pnpm lint
```

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