@eth-optimism/core-utils
Advanced tools
Comparing version 0.12.1 to 0.12.2
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 |
@@ -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
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
93302
81
1402
14
+ Addedethers@^5.7.0
+ Addednode-fetch@^2.6.7
+ Added@ethersproject/basex@5.7.0(transitive)
+ Added@ethersproject/hdnode@5.7.0(transitive)
+ Added@ethersproject/json-wallets@5.7.0(transitive)
+ Added@ethersproject/pbkdf2@5.7.0(transitive)
+ Added@ethersproject/providers@5.7.2(transitive)
+ Added@ethersproject/random@5.7.0(transitive)
+ Added@ethersproject/sha2@5.7.0(transitive)
+ Added@ethersproject/solidity@5.7.0(transitive)
+ Added@ethersproject/units@5.7.0(transitive)
+ Added@ethersproject/wallet@5.7.0(transitive)
+ Added@ethersproject/wordlists@5.7.0(transitive)
+ Addedaes-js@3.0.0(transitive)
+ Addedbech32@1.1.4(transitive)
+ Addedethers@5.7.2(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedscrypt-js@3.0.1(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedws@7.4.6(transitive)