|
| 1 | +module HydraAuctionOnchain.Types.AuctionTerms |
| 2 | + ( PAuctionTerms (PAuctionTerms) |
| 3 | + ) where |
| 4 | + |
| 5 | +import Plutarch.Api.V2 |
| 6 | + ( AmountGuarantees (Positive) |
| 7 | + , KeyGuarantees (Sorted) |
| 8 | + , PPOSIXTime |
| 9 | + , PPubKeyHash |
| 10 | + , PValue |
| 11 | + ) |
| 12 | +import Plutarch.DataRepr (PDataFields) |
| 13 | + |
| 14 | +newtype PAuctionTerms (s :: S) |
| 15 | + = PAuctionTerms |
| 16 | + ( Term |
| 17 | + s |
| 18 | + ( PDataRecord |
| 19 | + '[ "auctionLot" ':= PValue 'Sorted 'Positive |
| 20 | + , "sellerPkh" ':= PPubKeyHash |
| 21 | + , "sellerVk" ':= PByteString |
| 22 | + , "delegates" ':= PBuiltinList (PAsData PPubKeyHash) |
| 23 | + , "biddingStart" ':= PPOSIXTime |
| 24 | + , "biddingEnd" ':= PPOSIXTime |
| 25 | + , "purchaseDeadline" ':= PPOSIXTime |
| 26 | + , "cleanup" ':= PPOSIXTime |
| 27 | + , "auctionFeePerDelegate" ':= PInteger |
| 28 | + , "startingBid" ':= PInteger |
| 29 | + , "minBidIncrement" ':= PInteger |
| 30 | + , "minDepositAmount" ':= PInteger |
| 31 | + ] |
| 32 | + ) |
| 33 | + ) |
| 34 | + deriving stock (Generic) |
| 35 | + deriving anyclass (PlutusType, PIsData, PDataFields, PShow, PEq) |
| 36 | + |
| 37 | +instance DerivePlutusType PAuctionTerms where |
| 38 | + type DPTStrat _ = PlutusTypeData |
0 commit comments