Is the data ready when starting the script? Then --input-file
is the appropriate feature: Sorry, misread the first sentence of the question, thanks @cocreature
Hi @Alexander_Bernauer ,
The answer is contained in the documentation page of Daml Script , but it did take me a few minutes to re-puzzle it out, so I definitely agree it could be more explicit. The mechanism is actually really simple: the input file is used to define the argument to the script function. Here is a complete example. First, Main.daml:
module Main where
import Daml.Script
data InputLine = InputLine with name: Text, age: Int
deriving (Show, Eq)
setup : [InputLine] -> Script Int…