plutus-playground-server-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Starter

Synopsis

Documentation

newtype MyDatum Source #

These are the data script and redeemer types. We are using an integer value for both, but you should define your own types.

Constructors

MyDatum Integer 

Instances

Instances details
UnsafeFromData MyDatum Source # 
Instance details

Defined in Starter

FromData MyDatum Source # 
Instance details

Defined in Starter

ToData MyDatum Source # 
Instance details

Defined in Starter

Lift DefaultUni MyDatum Source # 
Instance details

Defined in Starter

Typeable DefaultUni MyDatum Source # 
Instance details

Defined in Starter

newtype MyRedeemer Source #

Constructors

MyRedeemer Integer 

Instances

Instances details
UnsafeFromData MyRedeemer Source # 
Instance details

Defined in Starter

FromData MyRedeemer Source # 
Instance details

Defined in Starter

ToData MyRedeemer Source # 
Instance details

Defined in Starter

Lift DefaultUni MyRedeemer Source # 
Instance details

Defined in Starter

Typeable DefaultUni MyRedeemer Source # 
Instance details

Defined in Starter

validateSpend :: MyDatum -> MyRedeemer -> ScriptContext -> Bool Source #

This method is the spending validator (which gets lifted to its on-chain representation).

contractAddress :: Address Source #

The address of the contract (the hash of its validator script).

data Starter Source #

Instances

Instances details
ValidatorTypes Starter Source # 
Instance details

Defined in Starter

type DatumType Starter Source # 
Instance details

Defined in Starter

type RedeemerType Starter Source # 
Instance details

Defined in Starter

starterInstance :: TypedValidator Starter Source #

The script instance is the compiled validator (ready to go onto the chain)

type Schema = Endpoint "publish" (Integer, Value) .\/ Endpoint "redeem" Integer Source #

The schema of the contract, with two endpoints.

publish :: AsContractError e => Promise () Schema e () Source #

The "publish" contract endpoint.

redeem :: AsContractError e => Promise () Schema e () Source #

The "redeem" contract endpoint.