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

Plutus.Contracts.Auction

Synopsis

Documentation

data AuctionState Source #

The states of the auction

Instances

Instances details
Eq AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

Show AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep AuctionState :: Type -> Type Source #

ToJSON AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

UnsafeFromData AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromData AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

ToData AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionState Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionState = D1 ('MetaData "AuctionState" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Ongoing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HighestBid)) :+: C1 ('MetaCons "Finished" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HighestBid)))

data AuctionInput Source #

Transition between auction states

Constructors

Bid 
Payout 

Instances

Instances details
Show AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep AuctionInput :: Type -> Type Source #

ToJSON AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

UnsafeFromData AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromData AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

ToData AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionInput Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionInput = D1 ('MetaData "AuctionInput" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Bid" 'PrefixI 'True) (S1 ('MetaSel ('Just "newBid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ada) :*: S1 ('MetaSel ('Just "newBidder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)) :+: C1 ('MetaCons "Payout" 'PrefixI 'False) (U1 :: Type -> Type))

data AuctionParams Source #

Definition of an auction

Constructors

AuctionParams 

Fields

Instances

Instances details
Eq AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

Show AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep AuctionParams :: Type -> Type Source #

ToJSON AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

Lift DefaultUni AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

Typeable DefaultUni AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionParams = D1 ('MetaData "AuctionParams" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "AuctionParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "apOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash) :*: (S1 ('MetaSel ('Just "apAsset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "apEndTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))

data HighestBid Source #

Instances

Instances details
Eq HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

Show HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep HighestBid :: Type -> Type Source #

ToJSON HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

UnsafeFromData HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromData HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

ToData HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep HighestBid Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep HighestBid = D1 ('MetaData "HighestBid" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "HighestBid" 'PrefixI 'True) (S1 ('MetaSel ('Just "highestBid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ada) :*: S1 ('MetaSel ('Just "highestBidder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)))

data AuctionOutput Source #

Observable state of the auction app

Instances

Instances details
Eq AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Show AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep AuctionOutput :: Type -> Type Source #

Semigroup AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

Monoid AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

ToJSON AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionOutput Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionOutput = D1 ('MetaData "AuctionOutput" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "AuctionOutput" 'PrefixI 'True) (S1 ('MetaSel ('Just "auctionState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Last AuctionState)) :*: S1 ('MetaSel ('Just "auctionThreadToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Last ThreadToken))))

data AuctionError Source #

Constructors

StateMachineContractError SMContractError

State machine operation failed

AuctionContractError ContractError

Endpoint, coin selection, etc. failed

Instances

Instances details
Eq AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

Show AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

Generic AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

Associated Types

type Rep AuctionError :: Type -> Type Source #

ToJSON AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

FromJSON AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

AsContractError AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

AsSMContractError AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionError Source # 
Instance details

Defined in Plutus.Contracts.Auction

type Rep AuctionError = D1 ('MetaData "AuctionError" "Plutus.Contracts.Auction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "StateMachineContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SMContractError)) :+: C1 ('MetaCons "AuctionContractError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError)))

data ThreadToken Source #

Instances

Instances details
Eq ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Ord ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Show ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Generic ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Associated Types

type Rep ThreadToken :: Type -> Type Source #

ToJSON ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

FromJSON ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

ToSchema ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

ToSchema ThreadToken 
Instance details

Defined in Schema

UnsafeFromData ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

FromData ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

ToData ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Lift DefaultUni ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

Typeable DefaultUni ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

type Rep ThreadToken 
Instance details

Defined in Plutus.Contract.StateMachine.ThreadToken

type Rep ThreadToken = D1 ('MetaData "ThreadToken" "Plutus.Contract.StateMachine.ThreadToken" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "ThreadToken" 'PrefixI 'True) (S1 ('MetaSel ('Just "ttOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Just "ttCurrencySymbol") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CurrencySymbol)))

getThreadToken :: forall e w (schema :: Row Type). AsSMContractError e => Contract w schema e ThreadToken Source #

Create a thread token. The thread token contains a reference to an unspent output of the wallet, so it needs to used with mkStateMachine immediately, and the machine must be initialised, to prevent the output from getting spent in the mean time.