core icon indicating copy to clipboard operation
core copied to clipboard

Create EthereumAddress interface and class

Open brunobar79 opened this issue 6 years ago • 1 comments

By having an interface EthereumAddress we can forget about all the type related issues (string vs hex, etc).

If we have an EthereumAddress obj also we could call toChecksumAddress inside of the constructor and have some utility function like toShortString (which could return 0x1234...1234), etc.

cc: @danfinlay

brunobar79 avatar Nov 14 '18 03:11 brunobar79

Agreed. We should use this type both internally as soon as possible and eventually externally once all consuming applications are also using TypeScript.

bitpshr avatar Nov 14 '18 13:11 bitpshr