Let's say I have validator, which checks datum against two numbers, hash, time and a string and there are some funds locked at this script address and I would like to unlock these funds using cardano-cli --tx-in-datum-file...
by providing datum file. Inside source code I have a custom data type like so:
data CustomDatum = CustomDatum
{ num1 :: Integer
, num2 :: Integer
, hash1 :: PubKeyHash
, time1 :: POSIXTime
, string1 :: String
}
deriving Show
PlutusTx.unstableMakeIsData ''VestingDatum
What are the rules to form correct datum file?
How should typed and not typed datum file look like to match my CustomDatum
inside Plutus script?
How are values mapped between datum file and custom data inside Plutus script?