From 4459af0ef16774ec073e4e68658e714414bc603f Mon Sep 17 00:00:00 2001 From: Juliano Rizzo Date: Tue, 5 Nov 2019 22:39:20 -0300 Subject: [PATCH] Automatically merged updates to draft EIP(s) 1191 (#2355) Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing --- EIPS/eip-1191.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EIPS/eip-1191.md b/EIPS/eip-1191.md index e5939234..3934e864 100644 --- a/EIPS/eip-1191.md +++ b/EIPS/eip-1191.md @@ -26,6 +26,7 @@ Convert the address using the same algorithm defined by EIP-55 but if a register ## Rationale Benefits: - By means of a minimal code change on existing libraries, users are protected from losing funds by mixing addresses of different Ethereum based networks. + ## Backwards Compatibility This proposal is fully backward compatible. The checksum calculation is changed only for new networks that choose to adopt this EIP and add their chain numbers to the Adoption Table included in this document. @@ -45,6 +46,7 @@ def eth_checksum_encode(addr, chainid=1): out = addr[:2] + ''.join([c.upper() if int(a,16) >= 8 else c for c,a in aggregate]) return out ``` + ## Test Cases ```python eth_mainnet = [ @@ -99,6 +101,7 @@ for chainid, cases in test_cases.items(): assert ( addr == eth_checksum_encode(addr,chainid) ) ``` ## Adoption + ### Adoption Table | Network | Chain id | Supports this EIP |