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

Plutus.Contracts.SimpleEscrow

Description

This simple escrow contract facilitiates and exchange of currencies.

Synopsis

Documentation

data EscrowParams Source #

Constructors

EscrowParams 

Fields

Instances

Instances details
Show EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Generic EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Associated Types

type Rep EscrowParams :: Type -> Type Source #

ToJSON EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

FromJSON EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

UnsafeFromData EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

FromData EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

ToData EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Lift DefaultUni EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Typeable DefaultUni EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep EscrowParams Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep EscrowParams = D1 ('MetaData "EscrowParams" "Plutus.Contracts.SimpleEscrow" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "EscrowParams" 'PrefixI 'True) ((S1 ('MetaSel ('Just "payee") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash) :*: S1 ('MetaSel ('Just "paying") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :*: (S1 ('MetaSel ('Just "expecting") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "deadline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))

data RedeemFailReason Source #

Constructors

DeadlinePassed 

Instances

Instances details
Eq RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Show RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Generic RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Associated Types

type Rep RedeemFailReason :: Type -> Type Source #

ToJSON RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

FromJSON RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep RedeemFailReason Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep RedeemFailReason = D1 ('MetaData "RedeemFailReason" "Plutus.Contracts.SimpleEscrow" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "DeadlinePassed" 'PrefixI 'False) (U1 :: Type -> Type))

data EscrowError Source #

Instances

Instances details
Show EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Generic EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Associated Types

type Rep EscrowError :: Type -> Type Source #

ToJSON EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

FromJSON EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

AsContractError EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

AsEscrowError EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep EscrowError Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type Rep EscrowError = D1 ('MetaData "EscrowError" "Plutus.Contracts.SimpleEscrow" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "RedeemFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RedeemFailReason)) :+: (C1 ('MetaCons "RefundFailed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError))))

data Escrow Source #

Instances

Instances details
ValidatorTypes Escrow Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

Associated Types

type RedeemerType Escrow Source #

type DatumType Escrow Source #

type DatumType Escrow Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

type RedeemerType Escrow Source # 
Instance details

Defined in Plutus.Contracts.SimpleEscrow

lockEp :: Promise () EscrowSchema EscrowError () Source #

Lock the paying Value in the output of this script, with the requirement that the transaction validates before the deadline.

redeemEp :: Promise () EscrowSchema EscrowError RedeemSuccess Source #

Attempts to redeem the Value locked into this script by paying in from the callers address to the payee.

refundEp :: Promise () EscrowSchema EscrowError RefundSuccess Source #

Refunds the locked amount back to the payee.