mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 05:14:14 +00:00
Make generateAddress a func
This commit is contained in:
parent
a28ef962b3
commit
c3c84782a5
@ -1,4 +1,4 @@
|
|||||||
import nimcrypto, eth_common, rlp
|
import nimcrypto, eth_common, rlp
|
||||||
|
|
||||||
proc generateAddress*(address: EthAddress, nonce: AccountNonce): EthAddress =
|
func generateAddress*(address: EthAddress, nonce: AccountNonce): EthAddress =
|
||||||
result[0..19] = keccak256.digest(rlp.encodeList(address, nonce).toOpenArray).data[12..31]
|
result[0..19] = keccak256.digest(rlp.encodeList(address, nonce).toOpenArray).data[12..31]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user