plutus-use-cases-0.1.0.0: Collection of smart contracts to develop the plutus/wallet interface
Safe HaskellNone
LanguageHaskell2010

Plutus.Contracts.PingPong

Description

A state machine with two states and two roles that take turns.

Documentation

data PingPongState Source #

Constructors

Pinged 
Ponged 
Stopped 

Instances

Instances details
Eq PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Show PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Generic PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Associated Types

type Rep PingPongState :: Type -> Type Source #

ToJSON PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

FromJSON PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

UnsafeFromData PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

FromData PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

ToData PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Eq PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Lift DefaultUni PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Typeable DefaultUni PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep PingPongState Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep PingPongState = D1 ('MetaData "PingPongState" "Plutus.Contracts.PingPong" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Pinged" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Ponged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Stopped" 'PrefixI 'False) (U1 :: Type -> Type)))

data Input Source #

Constructors

Ping 
Pong 
Stop 

Instances

Instances details
Show Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Generic Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Associated Types

type Rep Input :: Type -> Type Source #

Methods

from :: Input -> Rep Input x Source #

to :: Rep Input x -> Input Source #

ToJSON Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

FromJSON Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

UnsafeFromData Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

FromData Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

ToData Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Lift DefaultUni Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Typeable DefaultUni Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep Input Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep Input = D1 ('MetaData "Input" "Plutus.Contracts.PingPong" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Ping" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Pong" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Stop" 'PrefixI 'False) (U1 :: Type -> Type)))

data PingPongError Source #

Instances

Instances details
Show PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Generic PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

Associated Types

type Rep PingPongError :: Type -> Type Source #

ToJSON PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

FromJSON PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

AsContractError PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

AsSMContractError PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep PingPongError Source # 
Instance details

Defined in Plutus.Contracts.PingPong

type Rep PingPongError = D1 ('MetaData "PingPongError" "Plutus.Contracts.PingPong" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "PingPongContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError)) :+: (C1 ('MetaCons "PingPongSMError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SMContractError)) :+: C1 ('MetaCons "StoppedUnexpectedly" 'PrefixI 'False) (U1 :: Type -> Type)))

type PingPongSchema = (((Endpoint "initialise" () .\/ Endpoint "ping" ()) .\/ Endpoint "pong" ()) .\/ Endpoint "stop" ()) .\/ Endpoint "wait" () Source #