CountingApp.sol

View Source: contracts/CountingApp.sol

โ†— Extends: ForceMoveApp

The CountingApp contracts complies with the ForceMoveApp interface and allows only for a simple counter to be incremented. Used for testing purposes.


Structs

CountingAppData

struct CountingAppData {
uint256 counter
}

Functions


appData

Decodes the appData.

function appData(bytes appDataBytes) internal pure
returns(struct CountingApp.CountingAppData)

Returns

A CountingAppDatat struct containing the application-specific data.

Arguments

NameTypeDescription
appDataBytesbytesThe abi.encode of a CountingAppData struct describing the application-specific data.

validTransition

Encodes the CountingApp rules.

function validTransition(struct ForceMoveApp.VariablePart a, struct ForceMoveApp.VariablePart b, uint48 , uint256 ) public pure
returns(bool)

Returns

true if the transition conforms to the rules, false otherwise.

Arguments

NameTypeDescription
astruct ForceMoveApp.VariablePartState being transitioned from.
bstruct ForceMoveApp.VariablePartState being transitioned to.
uint48a State being transitioned from.
uint256a State being transitioned from.
Last updated on by geoknee