atlas-cardano-0.5.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Test.Privnet.Ctx

Description

 
Synopsis

Context

data Ctx #

Constructors

Ctx 

Fields

User

data CreateUserConfig #

Constructors

CreateUserConfig 

Fields

Instances

Instances details
Default CreateUserConfig # 
Instance details

Defined in GeniusYield.Test.Privnet.Ctx

ctxUsersCtx → [User] #

List of context sibling users - all of which begin with same balance.

userVKeyUserGYPaymentVerificationKey #

Deprecated: Use userPaymentVKey.

Operations

ctxRunC ∷ ∀ a. CtxUserGYTxMonadNode a → IO a #

ctxRunF ∷ ∀ t v. Traversable t ⇒ CtxUserGYTxMonadNode (t (GYTxSkeleton v)) → IO (t GYTxBody) #

ctxRunFWithCollateral #

Arguments

∷ ∀ t v. Traversable t 
Ctx 
User 
GYTxOutRef

Reference to UTxO to be used as collateral.

Bool

To check whether this given collateral UTxO has value of exact 5 ada? If it doesn't have exact 5 ada, it would be ignored.

GYTxMonadNode (t (GYTxSkeleton v)) 
IO (t GYTxBody) 

Variant of ctxRunF where caller can also give the UTxO to be used as collateral.

ctxWaitUntilSlotCtxGYSlotIO () #

submitTxCtxUserGYTxBodyIO GYTxId #

submitTx'CtxGYTxIO GYTxId #

Helpers

newTempUserCtx #

Arguments

Ctx 
User

User which will fund this new user.

GYValue

Describes balance of new user.

CreateUserConfig 
IO User 

Creates a new user with the given balance. Note that the actual balance which this user get's could be more than what is provided to satisfy minimum ada requirement of a UTxO.

findOutputGYAddressGYTxBodyIO GYTxOutRef #

Function to find for the first locked output in the given GYTxBody at the given GYAddress.

addRefScriptCtx #

Arguments

Ctx

Given context.

User

User which will execute the transaction (if required).

GYScript 'PlutusV2

Given script.

IO GYTxOutRef

Returns the reference for the desired output.

Function to add for a reference script. It adds the script in so called "Always failing" validator so that it won't be later possible to spend this output. There is a slight optimisation here in that if the desired reference script already exists then we don't add another one and return the reference for the found one else, we create a new one.

addRefInputCtx #

Arguments

Ctx

Given context.

User

User which will execute this transaction.

Bool

Whether to inline the datum.

GYAddress

Address to put this output at.

GYDatum

The datum to put.

IO GYTxOutRef

Returns the reference for the required output.

Function to add for a reference input.