fix linter errors

This commit is contained in:
Emily Martins 2022-04-19 11:07:11 +02:00
parent f79f85b2c0
commit eba9ce452e
5 changed files with 12 additions and 11 deletions

View file

@ -127,7 +127,7 @@ proposalCreation =
, status = Draft
, cosigners = [signer]
, thresholds = propThresholds
, votes = ProposalVotes $ AssocMap.empty
, votes = ProposalVotes AssocMap.empty
}
)
@ -156,7 +156,7 @@ proposalCreation =
[ TxInInfo
(TxOutRef "0b2086cbf8b6900f8cb65e012de4516cb66b5cb08a9aaba12a8b88be" 1)
TxOut
{ txOutAddress = Address (ScriptCredential $ validatorHash validator) Nothing
{ txOutAddress = Address (ScriptCredential $ validatorHash govValidator) Nothing
, txOutValue = Value.assetClassValue proposal.governorSTAssetClass 1
, txOutDatumHash = Just (toDatumHash govBefore)
}

View file

@ -60,6 +60,7 @@ common lang
NamedFieldPuns
NamedWildCards
NumericUnderscores
OverloadedLabels
OverloadedStrings
PartialTypeSignatures
PatternGuards
@ -78,7 +79,6 @@ common lang
UndecidableInstances
ViewPatterns
OverloadedRecordDot
OverloadedLabels
QualifiedDo
default-language: Haskell2010
@ -130,10 +130,10 @@ library
Agora.MultiSig
Agora.Proposal
Agora.Proposal.Time
Agora.Record
Agora.SafeMoney
Agora.Stake
Agora.Treasury
Agora.Record
other-modules:
Agora.Utils
@ -159,11 +159,11 @@ test-suite agora-test
Spec.AuthorityToken
Spec.Effect.TreasuryWithdrawal
Spec.Model.MultiSig
Spec.Proposal
Spec.Sample.Effect.TreasuryWithdrawal
Spec.Sample.Proposal
Spec.Sample.Stake
Spec.Stake
Spec.Sample.Proposal
Spec.Proposal
Spec.Util
build-depends: agora

View file

@ -239,7 +239,7 @@ PlutusTx.makeIsDataIndexed
]
-- | Parameters that identify the Proposal validator script.
data Proposal = Proposal
newtype Proposal = Proposal
{ governorSTAssetClass :: AssetClass
}
deriving stock (Show, Eq)

View file

@ -61,7 +61,7 @@ infixr 6 .&
(a :: [PLabeledType])
(b :: [PLabeledType])
(c :: [PLabeledType]).
(RecordMorphism s b c) ->
(RecordMorphism s a b) ->
(RecordMorphism s a c)
RecordMorphism s b c ->
RecordMorphism s a b ->
RecordMorphism s a c
(.&) = (.)

View file

@ -415,7 +415,8 @@ ptokenSpent =
plam $ \tokenClass inputs ->
0
#< pfoldr @PBuiltinList
# ( plam $ \txInInfo' acc -> P.do
# plam
( \txInInfo' acc -> P.do
PTxInInfo txInInfo <- pmatch (pfromData txInInfo')
PTxOut txOut' <- pmatch $ pfromData $ pfield @"resolved" # txInInfo
txOut <- pletFields @'["value"] txOut'