SingleAssetPayments.sol
View Source: contracts/examples/SingleAssetPayments.sol
โ Extends: IForceMoveApp
The SingleAssetPayments contract complies with the ForceMoveApp interface and implements a simple payment channel with a single asset type only.
Functions
validTransition
Encodes the payment channel update rules.
function validTransition(struct IForceMoveApp.VariablePart a, struct IForceMoveApp.VariablePart b, uint48 turnNumB, uint256 nParticipants) public pure
returns(bool)
Returns
true if the transition conforms to the rules, false otherwise.
Arguments
Name | Type | Description |
---|---|---|
a | struct IForceMoveApp.VariablePart | State being transitioned from. |
b | struct IForceMoveApp.VariablePart | State being transitioned to. |
turnNumB | uint48 | Turn number being transitioned to. |
nParticipants | uint256 | Number of participants in this state channel. |