atlas-0.1.0.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainersupport@geniusyield.co
Stabilitydevelop
Safe HaskellNone
LanguageHaskell2010

GeniusYield.Test.Privnet.Ctx

Description

 
Synopsis

Context

data Ctx #

Constructors

Ctx 

Fields

User

data User #

Constructors

User 

data UserIdx #

Constructors

User1

user 1 is used as geniusyield user

User2 
User3 

Operations

ctxRunC ∷ ∀ a. Ctx → UserIdx → GYTxMonadNode a → IO a #

ctxRunF ∷ ∀ t v. Traversable t ⇒ Ctx → UserIdx → GYTxMonadNode (t (GYTxSkeleton v)) → IO (t GYTxBody) #

__ctxRunF ∷ ∀ t v. Traversable t ⇒ Ctx → User → GYTxMonadNode (t (GYTxSkeleton v)) → IO (t GYTxBody) #

ctxWaitNextSlot ∷ Ctx → IO () #

ctxWaitUntilSlot ∷ Ctx → GYSlot → IO () #

Helpers

ctxUser ∷ Ctx → UserIdx → User #

newTempUserCtx #

Arguments

∷ Ctx 
→ UserIdx

User which will fund this new user.

→ GYValue

Describes balance of new user.

→ IO User 

Creates a new user with the given balance. Note that we'll deduct 5 ada from the given fund as a collateral output.

findOutput ∷ GYAddress → GYTxBody → IO GYTxOutRef #

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

addRefScriptCtx #

Arguments

∷ Ctx

Given context.

→ UserIdx

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.

→ UserIdx

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.