Expand description

State schema.

Structs§

Undelegation
Undelegation metadata.

Constants§

DELEGATIONS
Map of active delegations.
RECEIPTS
Receipts.
UNDELEGATIONS
Map of undelegations.
UNDELEGATION_QUEUE
An undelegation queue.

Functions§

add_delegation
Add delegation for a given (from, to) pair.
add_undelegation
Record new undelegation and add to undelegation queue.
get_delegation
Retrieve delegation metadata for a given (from, to) pair.
get_delegations
Retrieve all delegation metadata originating from a given address.
get_delegations_by_destination
Return the number of delegated shares for each destination escrow account.
get_queued_undelegations
Retrieve all queued undelegations for epochs earlier than or equal to the passed epoch.
get_undelegations
Retrieve all undelegation metadata to a given address.
set_receipt
Store the given receipt.
sub_delegation
Subtract delegation from a given (from, to) pair.
take_receipt
Remove the given receipt from storage if it exists and return it, otherwise return None.
take_undelegation
Remove an existing undelegation and return it.