Skip to content

Commit

Permalink
Start using the new rlpFields macro
Browse files Browse the repository at this point in the history
  • Loading branch information
alehander92 committed Jan 30, 2018
1 parent 0fa5c5f commit e6e3f09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nimcache/
runner
5 changes: 4 additions & 1 deletion nimbus.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -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"


4 changes: 3 additions & 1 deletion src/account.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import
constants, errors, bigints
constants, errors, bigints, rlp

type
Account* = ref object
Expand All @@ -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)

0 comments on commit e6e3f09

Please sign in to comment.