View Source: contracts/NitroAdjudicator.sol

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

The NitroAdjudicator contract extends MultiAssetHolder and ForceMove



Finalizes a channel by providing a finalization proof, and liquidates all assets for the channel.

function concludeAndTransferAllAssets(uint48 largestTurnNum, struct IForceMove.FixedPart fixedPart, bytes32 appPartHash, bytes outcomeBytes, uint8 numStates, uint8[] whoSignedWhat, struct IForceMove.Signature[] sigs) public nonpayable


largestTurnNumuint48The largest turn number of the submitted states; will overwrite the stored value of turnNumRecord.
fixedPartstruct IForceMove.FixedPartData describing properties of the state channel that do not change with state updates.
appPartHashbytes32The keccak256 of the abi.encode of (challengeDuration, appDefinition, appData). Applies to all states in the finalization proof.
outcomeBytesbytesabi.encode of an array of Outcome.OutcomeItem structs.
numStatesuint8The number of states in the finalization proof.
whoSignedWhatuint8[]An array denoting which participant has signed which state: participant[i] signed the state with index whoSignedWhat[i].
sigsstruct IForceMove.Signature[]An array of signatures that support the state with the largestTurnNum.


Liquidates all assets for the channel

function transferAllAssets(bytes32 channelId, bytes outcomeBytes, bytes32 stateHash) public nonpayable


channelIdbytes32Unique identifier for a state channel
outcomeBytesbytesabi.encode of an array of Outcome.OutcomeItem structs.
stateHashbytes32stored state hash for the channel


Check that the submitted pair of states form a valid transition (public wrapper for internal function _requireValidTransition)

function validTransition(uint256 nParticipants, bool[2] isFinalAB, struct IForceMoveApp.VariablePart[2] ab, uint48 turnNumB, address appDefinition) public pure


true if the later state is a validTransition from its predecessor, reverts otherwise.


nParticipantsuint256Number of participants in the channel.
isFinalABbool[2]Pair of booleans denoting whether the first and second state (resp.) are final.
abstruct IForceMoveApp.VariablePart[2]Variable parts of each of the pair of states
turnNumBuint48turnNum of the later state of the pair.
appDefinitionaddressAddress of deployed contract containing application-specific validTransition function.
Last updated on by geoknee