add tests for GAT minting

no more propsoal T_T
This commit is contained in:
Hongrui Fang 2022-07-18 18:31:51 +08:00
parent f6cf4f01db
commit c450e1252d
No known key found for this signature in database
GPG key ID: 1E0454204FC7D755
12 changed files with 1544 additions and 751 deletions

File diff suppressed because it is too large Load diff

View file

@ -327,7 +327,7 @@ mkTestTree name ps isValid = group name [proposal, stake]
let proposalInputDatum = mkProposalInputDatum ps
in testValidator
isValid
"propsoal"
"proposal"
(proposalValidator Shared.proposal)
proposalInputDatum
(mkProposalRedeemer ps)

View file

@ -242,7 +242,7 @@ mkTimeRange ps =
in closedBoundedInterval s $ o + di
else always
-- | Get the starting time of the propsoal.
-- | Get the starting time of the proposal.
mkProposalStartingTime :: Parameters -> ProposalStartingTime
mkProposalStartingTime ps =
if ps.timeRangeClosed
@ -413,7 +413,7 @@ invalidProposalStatusParameters =
--------------------------------------------------------------------------------
{- | Create a test tree that runs the propsoal minting policy, the governor
{- | Create a test tree that runs the proposal minting policy, the governor
validator and the stake validator to test the functionalities of creting
proposals
-}

View file

@ -1,15 +1,15 @@
{- |
Module : Sample.Proposal.Shared
Maintainer : connor@mlabs.city
Description: Shared constants for propsoal samples
Description: Shared constants for proposal samples
Shared constants for propsoal samples.
Shared constants for proposal samples.
-}
module Sample.Proposal.Shared (proposalTxRef, stakeTxRef, governorTxRef) where
import PlutusLedgerApi.V1 (TxId)
-- | 'TxId' of all the propsoal inputs in the samples.
-- | 'TxId' of all the proposal inputs in the samples.
proposalTxRef :: TxId
proposalTxRef = "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be"

View file

@ -540,7 +540,7 @@ mkTestTree name ps isValid = group name [stake, proposal]
ref = mkProposalRef idx
in testValidator
isValid
"propsoal"
"proposal"
(proposalValidator Shared.proposal)
(mkProposalInputDatum ps pid)
proposalRedeemer

View file

@ -253,7 +253,7 @@ mkTestTree name ps isValid = group name [proposal, stake]
proposal =
testValidator
isValid
"propsoal"
"proposal"
(proposalValidator Shared.proposal)
proposalInputDatum
(mkProposalRedeemer ps)

View file

@ -186,7 +186,7 @@ instance Default ProposalThresholds where
ProposalThresholds
{ execute = Tagged 1000
, create = Tagged 1
, vote = Tagged 10
, vote = Tagged 100
}
authorityToken :: AuthorityToken