hydra-plutus-0.19.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

Claims already deposited funds.

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 -> more checks will be added
  • 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 #