iterator

class Iterator

Bases: object

The iterator for smart contracts.

property value: Any

Gets the element in the collection at the current position of the iterator.

Returns:

the element in the collection at the current position of the iterator

Return type:

Any

next() bool

Advances the iterator to the next element of the collection.

>>> from boa3.builtin.interop import storage
... iterator = storage.find(b'prefix')
... iterator.next()
True
Returns:

true if it advanced, false if there isn’t a next element

Return type:

bool