Skip to main content

VersionProtocol

VersionProtocol Objects

class VersionProtocol(typing.Protocol)

as_u64

def as_u64() -> int

Get the underlying u64 value of this version

get_congested_version_suggested_gas_price

def get_congested_version_suggested_gas_price() -> int

Returns the suggested_gas_price embedded in this congested shared object version. The suggested_gas_price here is used for a gas price feedback mechanism for transactions canceled due to shared object congestion.

is_canceled

def is_canceled() -> bool

Checks if this version is canceled, i.e., the corresponding object appears in a canceled transaction.

is_congested

def is_congested() -> bool

Check if this version is congested, i.e., the corresponding object is the reason for transaction cancellation.

is_valid

def is_valid() -> bool

Checks if this version is valid, i.e., the corresponding object does not appear in a canceled transaction.

next

def next() -> Version

Returns the next version, or an error if overflow occurs.

previous

def previous() -> Version

Returns the previous version, or an error if underflow occurs.