hydra-cluster-0.20.0: Integration test suite using a local cluster of cardano and hydra nodes
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Cluster.Faucet

Synopsis

Documentation

data FaucetLog Source #

Instances

Instances details
FromJSON FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

Methods

parseJSON :: Value -> Parser FaucetLog

parseJSONList :: Value -> Parser [FaucetLog]

omittedField :: Maybe FaucetLog

ToJSON FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

Methods

toJSON :: FaucetLog -> Value

toEncoding :: FaucetLog -> Encoding

toJSONList :: [FaucetLog] -> Value

toEncodingList :: [FaucetLog] -> Encoding

omitField :: FaucetLog -> Bool

Generic FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

Associated Types

type Rep FaucetLog :: Type -> Type Source #

Show FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

Eq FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

type Rep FaucetLog Source # 
Instance details

Defined in Hydra.Cluster.Faucet

type Rep FaucetLog = D1 ('MetaData "FaucetLog" "Hydra.Cluster.Faucet" "hydra-cluster-0.20.0-8reP7QGo6wY8RVPOtXpPTl" 'False) (C1 ('MetaCons "TraceResourceExhaustedHandled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "ReturnedFunds" 'PrefixI 'True) (S1 ('MetaSel ('Just "returnAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin)))

seedFromFaucet Source #

Arguments

:: RunningNode 
-> VerificationKey PaymentKey

Recipient of the funds

-> Coin

Amount to get from faucet

-> Tracer IO FaucetLog 
-> IO UTxO 

Create a specially marked "seed" UTXO containing requested Lovelace by redeeming funds available to the well-known faucet.

findFaucetUTxO :: RunningNode -> Coin -> IO UTxO Source #

seedFromFaucet_ Source #

Arguments

:: RunningNode 
-> VerificationKey PaymentKey

Recipient of the funds

-> Coin

Amount to get from faucet

-> Tracer IO FaucetLog 
-> IO () 

Like seedFromFaucet, but without returning the seeded UTxO'.

returnFundsToFaucet :: Tracer IO FaucetLog -> RunningNode -> Actor -> IO () Source #

Return the remaining funds to the faucet

returnFundsToFaucet' :: Tracer IO FaucetLog -> RunningNode -> SigningKey PaymentKey -> IO Coin Source #

createOutputAtAddress :: RunningNode -> AddressInEra -> TxOutDatum CtxTx -> Value -> IO (TxIn, TxOut CtxUTxO) Source #

calculateTxFee :: RunningNode -> SigningKey PaymentKey -> UTxO -> AddressInEra -> Coin -> IO Coin Source #

Build and sign tx and return the calculated fee. - Signing key should be the key of a sender - Address is used as a change address. - Lovelace amount should be one we are trying to send.

retryOnExceptions :: (MonadCatch m, MonadDelay m) => Tracer m FaucetLog -> m a -> m a Source #

Try to submit tx and retry when some caught exception/s take place.

publishHydraScriptsAs :: RunningNode -> Actor -> IO TxId Source #

Publish current Hydra scripts as scripts outputs for later referencing them.

The key of the given Actor is used to pay for fees in required transactions, it is expected to have sufficient funds.