Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Contracts App

Sebastian S edited this page May 15, 2020 · 2 revisions

The App interface (contracts/App.sol:App)

Every App that should be played in a state channel needs to implement this interface.

Functions

validTransition(Params params, State from, State to, uint actorIdx)

ValidTransition checks if the given state transition is valid, as performed by the channel participant with index actorIdx. ValidTransition should revert on an invalid transition. Only App specific checks should be performed. The adjudicator already checks the following:

  • state corresponds to the params
  • correct dimensions of the allocation
  • preservation of balances
  • params.participants[actorIdx] signed the to state