StatusManager.sol

View Source: contracts/StatusManager.sol

โ†— Extends: IStatusManager โ†˜ Derived Contracts: ForceMove, MultiAssetHolder

The StatusManager is responsible for on-chain storage of the status of active channels


Contract Members

Constants & Variables

mapping(bytes32 => bytes32) public statusOf;

Functions


_mode

Computes the ChannelMode for a given channelId.

function _mode(bytes32 channelId) internal view
returns(enum IStatusManager.ChannelMode)

Arguments

NameTypeDescription
channelIdbytes32Unique identifier for a channel.

_generateStatus

Formats the input data for on chain storage.

function _generateStatus(struct IStatusManager.ChannelData channelData) internal pure
returns(status bytes32)

Arguments

NameTypeDescription
channelDatastruct IStatusManager.ChannelDataChannelData data.

_generateFingerprint

function _generateFingerprint(bytes32 stateHash, bytes32 outcomeHash) internal pure
returns(uint160)

Arguments

NameTypeDescription
stateHashbytes32
outcomeHashbytes32

_unpackStatus

Unpacks turnNumRecord, finalizesAt and fingerprint from the status of a particular channel.

function _unpackStatus(bytes32 channelId) internal view
returns(turnNumRecord uint48, finalizesAt uint48, fingerprint uint160)

Returns

turnNumRecord A turnNum that (the adjudicator knows) is supported by a signature from each participant.

Arguments

NameTypeDescription
channelIdbytes32Unique identifier for a state channel.