remove withMinAda

This commit is contained in:
fanghr 2022-05-11 17:31:17 +08:00
parent 7d5805016f
commit f121688990
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
2 changed files with 8 additions and 13 deletions

View file

@ -80,7 +80,6 @@ import Spec.Sample.Shared (
stake,
stakeAddress,
stakeAssetClass,
withMinAda,
)
import Spec.Util (datumPair, toDatumHash)
@ -105,7 +104,7 @@ mintGST =
governorOutput =
TxOut
{ txOutAddress = govValidatorAddress
, txOutValue = withMinAda gst
, txOutValue = gst <> minAda
, txOutDatumHash = Just $ toDatumHash governorOutputDatum
}
@ -207,7 +206,7 @@ createProposal =
proposalOutput =
TxOut
{ txOutAddress = proposalValidatorAddress
, txOutValue = withMinAda pst
, txOutValue = pst <> minAda
, txOutDatumHash = Just (toDatumHash proposalDatum)
}
@ -239,7 +238,7 @@ createProposal =
governorOutput =
governorInput
{ txOutDatumHash = Just $ toDatumHash governorOutputDatum
, txOutValue = withMinAda gst
, txOutValue = gst <> minAda
}
---
@ -257,7 +256,7 @@ createProposal =
stakeOutput =
stakeInput
{ txOutDatumHash = Just $ toDatumHash stakeOutputDatum
, txOutValue = withMinAda sst <> Value.assetClassValue (untag stake.gtClassRef) stackedGTs
, txOutValue = sst <> Value.assetClassValue (untag stake.gtClassRef) stackedGTs <> minAda
}
---
@ -381,7 +380,7 @@ mintGATs =
governorOutput =
governorInput
{ txOutDatumHash = Just $ toDatumHash governorOutputDatum
, txOutValue = withMinAda gst
, txOutValue = gst <> minAda
}
---
@ -394,7 +393,7 @@ mintGATs =
proposalOutput =
proposalInput
{ txOutDatumHash = Just $ toDatumHash proposalOutputDatum
, txOutValue = withMinAda pst
, txOutValue = pst <> minAda
}
--
@ -404,7 +403,7 @@ mintGATs =
TxOut
{ txOutAddress = mockEffectAddress
, txOutDatumHash = Just $ toDatumHash mockEffectOutputDatum
, txOutValue = withMinAda gat
, txOutValue = gat <> minAda
}
--
@ -519,7 +518,7 @@ mutateState =
governorOutput =
governorInput
{ txOutDatumHash = Just $ toDatumHash governorOutputDatum
, txOutValue = withMinAda gst
, txOutValue = gst <> minAda
}
--

View file

@ -10,7 +10,6 @@ module Spec.Sample.Shared (
signer,
signer2,
minAda,
withMinAda,
-- * Components
@ -167,9 +166,6 @@ defaultProposalThresholds =
minAda :: Value
minAda = Value.singleton "" "" 10_000_000
withMinAda :: Value -> Value
withMinAda v = v <> minAda
authorityToken :: AuthorityToken
authorityToken = authorityTokenFromGovernor governor