nim-eth/eth/common/utils.nim

13 lines
279 B
Nim
Raw Normal View History

2019-07-07 09:55:17 +00:00
import nimcrypto, hashes, stew/byteutils, eth_types
2019-02-05 10:10:36 +00:00
proc hash*(d: MDigest): Hash {.inline.} = hash(d.data)
proc parseAddress*(hexString: string): EthAddress =
hexToPaddedByteArray[20](hexString)
proc `$`*(a: EthAddress): string =
a.toHex()
2019-06-26 12:48:04 +00:00
var nimbusStats*: NimbusStats