hydra-plutus-0.20.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Contract.Deposit

Description

The validator used to deposit and recover locked funds

Synopsis

Documentation

data DepositRedeemer Source #

Constructors

Claim CurrencySymbol

Claims already deposited funds. FIXME: Make sure to change the spec and add head CS to the Claim redeemer.

Recover Integer

Recovers m number of deposited outputs.

Instances

Instances details
FromData DepositRedeemer Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

fromBuiltinData :: BuiltinData -> Maybe DepositRedeemer

ToData DepositRedeemer Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

toBuiltinData :: DepositRedeemer -> BuiltinData

UnsafeFromData DepositRedeemer Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

unsafeFromBuiltinData :: BuiltinData -> DepositRedeemer

newtype DepositDatum Source #

Deposit datum containing HeadId, deadline and a list of deposits.

Constructors

DepositDatum (CurrencySymbol, POSIXTime, [Commit]) 

Instances

Instances details
FromData DepositDatum Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

fromBuiltinData :: BuiltinData -> Maybe DepositDatum

ToData DepositDatum Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

toBuiltinData :: DepositDatum -> BuiltinData

UnsafeFromData DepositDatum Source # 
Instance details

Defined in Hydra.Contract.Deposit

Methods

unsafeFromBuiltinData :: BuiltinData -> DepositDatum

validator :: DepositDatum -> DepositRedeemer -> ScriptContext -> Bool Source #

v_deposit validator checks

  • Claim redeemer ->
  • The deadline has not been reached.
  • HeadId matches.
  • Recover redeemer
  • The deadline has been reached.
  • The hash of recovered outputs are matching the deposited outputs.

compiledValidator :: CompiledCode ValidatorType Source #

validatorScript :: SerialisedScript Source #

validatorHash :: ScriptHash Source #