Peer Protocol
Last updated
Last updated
To exemplify the protocols as we define them, we will assume there exists a multisignature wallet shared between two parties, Alice and Bob. This is the only required re-usable on-chain component (with the exception of supporting libraries) to execute each of the protocols below.
Global Variables:
Type: Terms
Type: CfAppInterface
TODO: The name
getTurnTaker
needs to be standardized
Type: PeerBalance
TODO: This type needs to be abstracted to mirror the
Terms
type more closely such that arbitrary assets can be better represented
Variable Name
Type
Description
REGISTRY
address
The deployed on-chain address of the Registry
singleton contract
NONCE_REGISTRY
address
The deployed on-chain address of the NonceRegistry
singleton contract
Field
Type
Description
assetType
uint8
A value in the enum of {ETH, ERC20, Other}
limit
uint256
The exact total budget that an application can spend
token
address
If assetType
is ERC20
then the address of the token
Field
Type
Description
address
address
The on-chain address of the AppDefinition
contract implementing the application logic
token
address
If assetType
is ERC20
then the address of the token
abiEncoding
bytes4
The ABIEncoderV2 representation of the application's state encoding (e.g., "tuple(address,uint8)"
)
Field
Type
Description
address
address
The address of a party that deposited into an application
balance
uint256
The amount deposited into the application