| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.Contracts.Auction
Synopsis
- data AuctionState
- data AuctionInput
- type BuyerSchema = Endpoint "bid" Ada
- type SellerSchema = EmptySchema
- data AuctionParams = AuctionParams {}
- data HighestBid = HighestBid {
- highestBid :: Ada
- highestBidder :: Address
- auctionBuyer :: ThreadToken -> AuctionParams -> Contract AuctionOutput BuyerSchema AuctionError ()
- auctionSeller :: Value -> POSIXTime -> Contract AuctionOutput SellerSchema AuctionError ()
- data AuctionOutput = AuctionOutput {}
- data AuctionError
- = StateMachineContractError SMContractError
- | AuctionContractError ContractError
- data ThreadToken
- getThreadToken :: forall e w (schema :: Row Type). AsSMContractError e => Contract w schema e ThreadToken
- covIdx :: CoverageIndex
Documentation
data AuctionState Source #
The states of the auction
Constructors
| Ongoing HighestBid | |
| Finished HighestBid |
Instances
data AuctionInput Source #
Transition between auction states
Instances
type BuyerSchema = Endpoint "bid" Ada Source #
type SellerSchema = EmptySchema Source #
data AuctionParams Source #
Definition of an auction
Constructors
| AuctionParams | |
Instances
data HighestBid Source #
Constructors
| HighestBid | |
Fields
| |
Instances
auctionBuyer :: ThreadToken -> AuctionParams -> Contract AuctionOutput BuyerSchema AuctionError () Source #
auctionSeller :: Value -> POSIXTime -> Contract AuctionOutput SellerSchema AuctionError () Source #
Client code for the seller
data AuctionOutput Source #
Observable state of the auction app
Constructors
| AuctionOutput | |
Fields | |
Instances
data AuctionError Source #
Constructors
| StateMachineContractError SMContractError | State machine operation failed |
| AuctionContractError ContractError | Endpoint, coin selection, etc. failed |
Instances
data ThreadToken #
Instances
getThreadToken :: forall e w (schema :: Row Type). AsSMContractError e => Contract w schema e ThreadToken #