Package com.norswap.nanoeth.data
Class StorageKey
java.lang.Object
com.norswap.nanoeth.data.StorageKey
- All Implemented Interfaces:
RLPLayoutable
@Wrapper public final class StorageKey extends Object implements RLPLayoutable
Represents a 256-bit (32 bytes) Ethereum storage key within an account's storage tree.
-
Field Summary
Fields Modifier and Type Field Description byte[]
bytes
The 32-bytes big-endian representation of the storage key. -
Constructor Summary
Constructors Constructor Description StorageKey(byte[] bytes)
StorageKey(String hexString)
Creates a hash from a hex string (e.g. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.norswap.nanoeth.rlp.RLPLayoutable
rlpEncode, rlpHexString
-
Field Details
-
bytes
public final byte[] bytesThe 32-bytes big-endian representation of the storage key.
-
-
Constructor Details
-
StorageKey
-
StorageKey
Creates a hash from a hex string (e.g. 0x123).If the post-0x part of the hex string is not 64 characters long, the key will be padded with zeroes at the start so that it is 32 bytes long.
-
-
Method Details
-
rlpLayout
Description copied from interface:RLPLayoutable
Returns the RLP layout for the object.- Specified by:
rlpLayout
in interfaceRLPLayoutable
-
equals
-
hashCode
public int hashCode() -
toString
-