2018-09-04 11:23:47 +00:00
|
|
|
import nimcrypto, eth_common, rlp
|
|
|
|
|
2018-09-04 11:27:07 +00:00
|
|
|
func generateAddress*(address: EthAddress, nonce: AccountNonce): EthAddress =
|
2018-09-06 12:48:06 +00:00
|
|
|
result[0..19] = keccak256.digest(rlp.encodeList(address, nonce).toOpenArray).data.toOpenArray(12, 31)
|