ArrayDB¶
-
class
ArrayDB
(var_key: K, db: iconservice.iconscore.db.IconScoreDatabase, value_type: type)¶ Utility classes wrapping the state DB. ArrayDB supports length and iterator, maintains order.
K: [int, str, Address, bytes] V: [int, str, Address, bytes, bool] -
SIZE_BYTE_KEY
= b'size'¶
-
get
(index: int = 0) → V¶ Gets the value at index
Parameters: index – index Returns: value at the index
-
pop
() → Optional[V]¶ Gets and removes last added value
Returns: last added value
-
put
(value: V) → None¶ Puts the value at the end of array
Parameters: value – value to add
-