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

Plutus.Contracts.SealedBidAuction

Synopsis

Documentation

data AuctionParams Source #

Definition of an auction

Constructors

AuctionParams 

Fields

Instances

Instances details
Eq AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Show AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Generic AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Associated Types

type Rep AuctionParams :: Type -> Type Source #

ToJSON AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

FromJSON AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Lift DefaultUni AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Typeable DefaultUni AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep AuctionParams Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep AuctionParams = D1 ('MetaData "AuctionParams" "Plutus.Contracts.SealedBidAuction" "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) :*: S1 ('MetaSel ('Just "apPayoutTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))

newtype BidArgs Source #

Constructors

BidArgs 

Instances

Instances details
Show BidArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Generic BidArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Associated Types

type Rep BidArgs :: Type -> Type Source #

ToJSON BidArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

FromJSON BidArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep BidArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep BidArgs = D1 ('MetaData "BidArgs" "Plutus.Contracts.SealedBidAuction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "BidArgs" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretBid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SecretArgument Integer))))

newtype RevealArgs Source #

Constructors

RevealArgs 

Fields

Instances

Instances details
Show RevealArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Generic RevealArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Associated Types

type Rep RevealArgs :: Type -> Type Source #

ToJSON RevealArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

FromJSON RevealArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep RevealArgs Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep RevealArgs = D1 ('MetaData "RevealArgs" "Plutus.Contracts.SealedBidAuction" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "RevealArgs" 'PrefixI 'True) (S1 ('MetaSel ('Just "publicBid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

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.SealedBidAuction

Show AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Generic AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

Associated Types

type Rep AuctionError :: Type -> Type Source #

ToJSON AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

FromJSON AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

AsContractError AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

AsSMContractError AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep AuctionError Source # 
Instance details

Defined in Plutus.Contracts.SealedBidAuction

type Rep AuctionError = D1 ('MetaData "AuctionError" "Plutus.Contracts.SealedBidAuction" "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)))

type BidderSchema = (Endpoint "bid" BidArgs .\/ Endpoint "reveal" RevealArgs) .\/ Endpoint "payout" () Source #

type SellerSchema = Endpoint "payout" () Source #

packInteger :: Integer -> BuiltinByteString Source #

Pack an integer into a byte string with a leading sign byte in little-endian order

sellerContract :: AuctionParams -> Contract () SellerSchema AuctionError () Source #

Top-level contract for seller

bidderContract :: AuctionParams -> Contract () BidderSchema AuctionError () Source #

Top-level contract for buyer