format...

This commit is contained in:
Seungheon Oh 2022-04-18 19:17:36 -05:00
parent c90cd94c59
commit aa4d198e9f
2 changed files with 23 additions and 24 deletions

View file

@ -5,13 +5,12 @@ Description: Sample based testing for Treasury Withdrawal Effect
This module tests the Treasury Withdrawal Effect. This module tests the Treasury Withdrawal Effect.
-} -}
module Spec.Effect.TreasuryWithdrawalEffect (currSymbol, signer, validator, validatorHashTN, withdrawalEffect) where
module Spec.Effect.TreasuryWithdrawalEffect(currSymbol, signer, validator, validatorHashTN, withdrawalEffect) where
import Plutarch.Api.V1 import Plutarch.Api.V1
import Plutus.V1.Ledger.Api import Plutus.V1.Ledger.Api
import Plutus.V1.Ledger.Value qualified as Value
import Plutus.V1.Ledger.Interval qualified as Interval import Plutus.V1.Ledger.Interval qualified as Interval
import Plutus.V1.Ledger.Value qualified as Value
import Agora.Effect.TreasuryWithdrawal (treasuryWithdrawalValidator) import Agora.Effect.TreasuryWithdrawal (treasuryWithdrawalValidator)
@ -34,26 +33,26 @@ validatorHashTN = let ValidatorHash vh = validatorHash validator in TokenName vh
withdrawalEffect :: ScriptContext withdrawalEffect :: ScriptContext
withdrawalEffect = withdrawalEffect =
ScriptContext ScriptContext
{ scriptContextTxInfo = { scriptContextTxInfo =
TxInfo TxInfo
{ txInfoInputs = { txInfoInputs =
[ TxInInfo [ TxInInfo
(TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1) (TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1)
TxOut TxOut
{ txOutAddress = Address (ScriptCredential $ validatorHash validator) Nothing { txOutAddress = Address (ScriptCredential $ validatorHash validator) Nothing
, txOutValue = Value.singleton currSymbol validatorHashTN 1 , txOutValue = Value.singleton currSymbol validatorHashTN 1
, txOutDatumHash = Nothing , txOutDatumHash = Nothing
} }
] ]
, txInfoOutputs = [] , txInfoOutputs = []
, txInfoFee = Value.singleton "" "" 2 , txInfoFee = Value.singleton "" "" 2
, txInfoMint = mempty , txInfoMint = mempty
, txInfoDCert = [] , txInfoDCert = []
, txInfoWdrl = [] , txInfoWdrl = []
, txInfoValidRange = Interval.always , txInfoValidRange = Interval.always
, txInfoSignatories = [signer] , txInfoSignatories = [signer]
, txInfoData = [] , txInfoData = []
, txInfoId = "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" , txInfoId = "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be"
} }
, scriptContextPurpose = Spending (TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1) , scriptContextPurpose = Spending (TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1)
} }

View file

@ -152,9 +152,9 @@ test-suite agora-test
main-is: Spec.hs main-is: Spec.hs
hs-source-dirs: agora-test hs-source-dirs: agora-test
other-modules: other-modules:
Spec.Effect.TreasuryWithdrawalEffect
Spec.Model.MultiSig Spec.Model.MultiSig
Spec.Sample.Stake Spec.Sample.Stake
Spec.Effect.TreasuryWithdrawalEffect
Spec.Stake Spec.Stake
Spec.Util Spec.Util
Spec.AuthorityToken Spec.AuthorityToken