java.lang.Object
com.hedera.hashgraph.sdk.AccessListItem
An EIP-2930 access list entry: an
Ethereum address together with the storage keys of that account the transaction intends to access.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static List<AccessListItem> accessListItemsFromRlp(com.esaulpaugh.headlong.rlp.RLPItem accessListItem) Decode an entire access list from the RLP item holding the list.Build the nested RLP object representation of an entire access list.addStorageKey(byte[] storageKey) Append a single storage key.(package private) static List<AccessListItem> decodeAccessList(byte[] accessList) Decode the storedaccessListbytes (either empty or a self-contained RLP list) back into items.(package private) static byte[]encodeAccessList(List<AccessListItem> items) Encode a list of access list items to their canonical, self-contained RLP list bytes.(package private) static AccessListItemfromRlp(com.esaulpaugh.headlong.rlp.RLPItem item) Decode a single access list entry from its RLP representation.byte[]List<byte[]> setAddress(byte[] address) setStorageKeys(List<byte[]> storageKeys) (package private) ObjectBuild the nested RLP object representation of this item:[address, [storageKeys...]].toString()
-
Constructor Details
-
AccessListItem
public AccessListItem()Constructor.
-
-
Method Details
-
getAddress
public byte[] getAddress()- Returns:
- the address this entry refers to
-
setAddress
- Parameters:
address- the address this entry refers to- Returns:
this
-
getStorageKeys
- Returns:
- the storage keys this entry refers to
-
setStorageKeys
- Parameters:
storageKeys- the storage keys this entry refers to- Returns:
this
-
addStorageKey
Append a single storage key.- Parameters:
storageKey- the storage key to add- Returns:
this
-
toRlpObject
Object toRlpObject()Build the nested RLP object representation of this item:[address, [storageKeys...]]. The returned value is suitable for inclusion in the object list passed toRLPEncoder.list/RLPEncoder.sequence. -
accessListItemsToRlpObject
Build the nested RLP object representation of an entire access list.- Parameters:
items- the access list items (may be null)- Returns:
- a list of nested RLP objects, one per item
-
fromRlp
Decode a single access list entry from its RLP representation.- Parameters:
item- the RLP item for a single entry- Returns:
- the decoded item, or null if the entry is malformed
-
accessListItemsFromRlp
static List<AccessListItem> accessListItemsFromRlp(com.esaulpaugh.headlong.rlp.RLPItem accessListItem) Decode an entire access list from the RLP item holding the list. Malformed entries are skipped.- Parameters:
accessListItem- the RLP item representing the whole access list- Returns:
- the decoded access list items
-
encodeAccessList
Encode a list of access list items to their canonical, self-contained RLP list bytes. An empty (or null) list encodes to an empty byte array so that the storedaccessListfield stays""for the common empty case.- Parameters:
items- the access list items- Returns:
- the RLP-encoded access list, or an empty byte array when there are no items
-
decodeAccessList
Decode the storedaccessListbytes (either empty or a self-contained RLP list) back into items.- Parameters:
accessList- the stored access list bytes- Returns:
- the decoded items (empty when there are none)
-
toString
-