Add generateAddress utility
This commit is contained in:
parent
a7c1168b3a
commit
a28ef962b3
|
@ -0,0 +1,4 @@
|
|||
import nimcrypto, eth_common, rlp
|
||||
|
||||
proc generateAddress*(address: EthAddress, nonce: AccountNonce): EthAddress =
|
||||
result[0..19] = keccak256.digest(rlp.encodeList(address, nonce).toOpenArray).data[12..31]
|
|
@ -12,7 +12,7 @@ import
|
|||
./gas_meter, ./gas_costs, ./opcode_values, ./vm_forks,
|
||||
../memory, ../message, ../stack, ../code_stream, ../computation,
|
||||
../../vm_state, ../../errors, ../../constants, ../../vm_types,
|
||||
../../db/[db_chain, state_db]
|
||||
../../db/[db_chain, state_db], ../../utils/addresses
|
||||
|
||||
# ##################################
|
||||
# Syntactic sugar
|
||||
|
|
Loading…
Reference in New Issue