Start using the new rlpFields macro
This commit is contained in:
parent
0fa5c5fd94
commit
e6e3f09ebd
|
@ -1 +1,2 @@
|
|||
nimcache/
|
||||
runner
|
||||
|
|
|
@ -7,5 +7,8 @@ description = "An Ethereum 2.0 Sharding Client for Resource-Restricted Devices
|
|||
license = "Apache License 2.0"
|
||||
skipDirs = @["tests"]
|
||||
|
||||
requires "nim >= 0.17.0", "https://github.com/status-im/nim-keccak-tiny.git >= 0.1.0"
|
||||
requires "nim >= 0.17.0",
|
||||
"https://github.com/status-im/nim-keccak-tiny.git >= 0.1.0",
|
||||
"https://github.com/status-im/nim-rlp.git >= 1.0.0"
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import
|
||||
constants, errors, bigints
|
||||
constants, errors, bigints, rlp
|
||||
|
||||
type
|
||||
Account* = ref object
|
||||
|
@ -8,5 +8,7 @@ type
|
|||
#storageRoot*:
|
||||
#codeHash*:
|
||||
|
||||
rlpFields Account, nonce, balance
|
||||
|
||||
proc newAccount*(nonce: Int256 = 0.i256, balance: Int256 = 0.i256): Account =
|
||||
Account(nonce: nonce, balance: balance)
|
||||
|
|
Loading…
Reference in New Issue