Accounts and State
Accounts
Same as Ethereum, Scroll has two account types: Externally-owned account (EOA) and contract account that holds the smart contract and additional storage.
The account structure in Scroll follows the standard Ethereum format:
nonce: A counter that indicates the number of transactions sent by the sender.balance: The balance ofETHtoken in the account (unit in wei).storageRoot: The root hash of the storage trie.codeHash: The Keccak hash digest of the contract bytecode.
State
The state of a blockchain is a collection of account data. The state trie encodes account data and their corresponding addresses to a Merkle tree data structure. The root of tree, or the state of the blockchain, is a cryptographic digest of all the account data contained in the tree.
Scroll uses Ethereum’s Merkle-Patricia Trie (MPT) for both the state trie and the storage trie that stores the key-value entries in smart contracts. This ensures full compatibility with Ethereum’s state proof format and tooling.