mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 04:15:54 +00:00
18b7bbb3b0
Merge note: currently cannot compile due to `quasiBoolean` (#63). This will be solved by https://github.com/status-im/nimbus/pull/65 ---- * Implemented most of the stubbed out state handling instructions The code compiles, but still fails at the moment due to incorrect initialization of the VM. Don't merge yet. More commits will be pushed in the coming days. * Fixed crash * trie put and del are void now * getBlockTransactionData and getReceipts * Working code for extcodesize0.json * fix origin.json * fix calldatasize1 * fix calldataloadSizeTooHighPartial * fix calldataloadSizeTooHigh * more efficient PushX implementation * fix and, or, xor
24 lines
819 B
Nim
24 lines
819 B
Nim
# Nimbus
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
import
|
|
constants, errors, eth_common, rlp, eth_common/eth_types
|
|
|
|
type
|
|
Account* = object
|
|
nonce*: UInt256
|
|
balance*: UInt256
|
|
storageRoot*: Hash256
|
|
codeHash*: Hash256
|
|
|
|
proc newAccount*(nonce: UInt256 = 0.u256, balance: UInt256 = 0.u256): Account =
|
|
result.nonce = nonce
|
|
result.balance = balance
|
|
result.storageRoot = BLANK_ROOT_HASH
|
|
result.codeHash = EMPTY_SHA3
|
|
|