take collaterals into account
This commit is contained in:
parent
75f5e83bcf
commit
35b862153c
3 changed files with 32 additions and 8 deletions
|
|
@ -9,6 +9,7 @@ module Spec.Sample.Effect.TreasuryWithdrawal (
|
|||
inputTreasury,
|
||||
inputUser,
|
||||
inputGAT,
|
||||
inputCollateral,
|
||||
outputTreasury,
|
||||
outputUser,
|
||||
buildReceiversOutputFromDatum,
|
||||
|
|
@ -106,6 +107,16 @@ inputUser indx val =
|
|||
, txOutDatumHash = Just (DatumHash "")
|
||||
}
|
||||
|
||||
inputCollateral :: Int -> TxInInfo
|
||||
inputCollateral indx =
|
||||
TxInInfo -- Initiator
|
||||
(TxOutRef "" 1)
|
||||
TxOut
|
||||
{ txOutAddress = Address (users !! indx) Nothing
|
||||
, txOutValue = Value.singleton "" "" 2000000
|
||||
, txOutDatumHash = Just (DatumHash "")
|
||||
}
|
||||
|
||||
outputTreasury :: Int -> Value -> TxOut
|
||||
outputTreasury indx val =
|
||||
TxOut
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue