remove withMinAda

This commit is contained in:
fanghr 2022-05-11 17:31:17 +08:00
parent 48b1d658e9
commit 749d2ffc1a
2 changed files with 8 additions and 13 deletions

View file

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

View file

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