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
This commit is contained in:
Juliano Rizzo 2019-11-05 22:39:20 -03:00 committed by EIP Automerge Bot
parent 9f133839b3
commit 4459af0ef1

View File

@ -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 |