Skip to content

Commit

Permalink
Util: More explicit EIP-1191 checksum usage discouraged note / Client…
Browse files Browse the repository at this point in the history
…: remove Rinkeby from CLI test matrix (#1463)

* util: added more explicit note about providing a chainId to produce EIP-1191 compatible checksums with toChecksumAddress() being discouraged

* client: removed Rinkeby from client CLI runs being to unreliable often leading to CI failures
  • Loading branch information
holgerd77 committed Sep 10, 2021
1 parent ee1a44e commit 69f5ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/client-build.yml
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
network: ['rinkeby', 'goerli']
network: ['goerli']
syncmode: ['full', 'light']
fail-fast: false
steps:
Expand Down
8 changes: 5 additions & 3 deletions packages/util/src/account.ts
Expand Up @@ -139,12 +139,14 @@ export const isValidAddress = function (hexAddress: string): boolean {
/**
* Returns a checksummed address.
*
* If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
* If an eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
* has the effect of checksummed addresses for one chain having invalid checksums for others.
* For more details see [EIP-1191](https://eips.ethereum.org/EIPS/eip-1191).
*
* WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
* used variation in Ethereum was without the chainId. This may change in the future.
* WARNING: Checksums with and without the chainId will differ and the EIP-1191 checksum is not
* backwards compatible to the original widely adopted checksum format standard introduced in
* [EIP-55](https://eips.ethereum.org/EIPS/eip-55), so this will break in existing applications.
* Usage of this EIP is therefore discouraged unless you have a very targeted use case.
*/
export const toChecksumAddress = function (hexAddress: string, eip1191ChainId?: BNLike): string {
assertIsHexString(hexAddress)
Expand Down

0 comments on commit 69f5ec6

Please sign in to comment.