Skip to content

Commit 9a3298e

Browse files
committed
Bumped version to v7.0.9, added CHANGELOG entry
1 parent 0ac965f commit 9a3298e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## [7.0.9] - 2021-03-04
10+
11+
This release adds support for very high `chainId` numbers exceeding `MAX_SAFE_INTEGER` (an example is the chain ID `34180983699157880` used for the ephemeral Yolov3 testnet preparing for the `berlin` hardfork, but high chain IDs might be used for things like private test networks and the like as well).
12+
13+
Function signatures for methods in `address` and `signature` are therefore expanded to allow for a `BNLike` input type (`BN | PrefixedHexString | number | Buffer`) for chain ID related parameters.
14+
15+
All function signatures are still taking in a `number` input for backwards-compatibility reasons. If you use one of the following functions to implement generic use cases in your library where the chain ID is not yet known it is recommended to updated to one of the other input types (with plain `Buffer` likely be the most future-proof). Note that on some functions this changes the return value as well.
16+
17+
- `account`: `toChecksumAddresss(hexAddress: string, eip1191ChainId?: number): string`
18+
- -> `toChecksumAddress = function(hexAddress: string, eip1191ChainId?: BNLike): string`
19+
- `account`: `isValidChecksumAddress(hexAddress: string, eip1191ChainId?: number)`
20+
- -> `isValidChecksumAddress(hexAddress: string, eip1191ChainId?: BNLike)`
21+
- `signature`: `ecsign(msgHash: Buffer, privateKey: Buffer, chainId?: number): ECDSASignature`
22+
- -> `ecsign(msgHash: Buffer, privateKey: Buffer, chainId?: number): ECDSASignature` (return value stays the same on `number` input)
23+
- -> `ecsign(msgHash: Buffer, privateKey: Buffer, chainId: BNLike): ECDSASignatureBuffer` (changed return value for other type inputs)
24+
- `signature`: `ecrecover(msgHash: Buffer, v: number, r: Buffer, s: Buffer, chainId?: number): Buffer`
25+
- -> `ecrecover(msgHash: Buffer, v: BNLike, r: Buffer, s: Buffer, chainId?: BNLike): Buffer`
26+
- `signature`: `toRpcSig(v: number, r: Buffer, s: Buffer, chainId?: number): string`
27+
- -> `toRpcSig(v: BNLike, r: Buffer, s: Buffer, chainId?: BNLike): string`
28+
- `signature`: `isValidSignature(v: number, r: Buffer, s: Buffer, homesteadOrLater: boolean = true, chainId?: number)`
29+
- -> `isValidSignature(v: BNLike, r: Buffer, s: Buffer, homesteadOrLater: boolean = true, chainId?: BNLike)`
30+
31+
[7.0.9]: https://github.com/ethereumjs/ethereumjs-util/compare/v7.0.8...v7.0.9
32+
933
## [7.0.8] - 2021-02-01
1034

1135
- New `Address.equals(address: Address)` function for easier address equality comparions, PR [#285](https://github.com/ethereumjs/ethereumjs-util/pull/285)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereumjs-util",
3-
"version": "7.0.8",
3+
"version": "7.0.9",
44
"description": "a collection of utility functions for Ethereum",
55
"main": "dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)