avoid #>>>
This commit is contained in:
parent
e9ad834b6e
commit
1b3ec260a3
2 changed files with 9 additions and 8 deletions
|
|
@ -52,7 +52,7 @@ import Plutarch.Api.V2 (
|
||||||
PValidator,
|
PValidator,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
import Plutarch.Extra.AssetClass (passetClass, passetClassValueOf)
|
||||||
import Plutarch.Extra.Category (PCategory (pidentity), PSemigroupoid ((#>>>)))
|
import Plutarch.Extra.Category (PCategory (pidentity))
|
||||||
import Plutarch.Extra.Comonad (pextract)
|
import Plutarch.Extra.Comonad (pextract)
|
||||||
import Plutarch.Extra.Field (pletAll, pletAllC)
|
import Plutarch.Extra.Field (pletAll, pletAllC)
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
||||||
|
|
@ -324,7 +324,7 @@ proposalValidator as maximumCosigners =
|
||||||
plam $
|
plam $
|
||||||
let stakeInputs =
|
let stakeInputs =
|
||||||
pmapMaybe
|
pmapMaybe
|
||||||
# (pfield @"resolved" #>>> getStakeDatum)
|
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
||||||
# pfromData txInfoF.inputs
|
# pfromData txInfoF.inputs
|
||||||
|
|
||||||
ctx = pcon $ PStakeInputsContext stakeInputs
|
ctx = pcon $ PStakeInputsContext stakeInputs
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ import Plutarch.Extra.AssetClass (
|
||||||
passetClassValueOf,
|
passetClassValueOf,
|
||||||
pvalueOf,
|
pvalueOf,
|
||||||
)
|
)
|
||||||
import Plutarch.Extra.Category (PSemigroupoid ((#>>>)))
|
|
||||||
import Plutarch.Extra.Field (pletAll)
|
import Plutarch.Extra.Field (pletAll)
|
||||||
import Plutarch.Extra.Functor (PFunctor (pfmap))
|
import Plutarch.Extra.Functor (PFunctor (pfmap))
|
||||||
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
import "liqwid-plutarch-extra" Plutarch.Extra.List (pfindJust)
|
||||||
|
|
@ -319,7 +318,7 @@ mkStakeValidator
|
||||||
stakeInputDatums <-
|
stakeInputDatums <-
|
||||||
pletC $
|
pletC $
|
||||||
pmapMaybe
|
pmapMaybe
|
||||||
# ((pfield @"resolved") #>>> getStakeDatum)
|
# plam ((getStakeDatum #) . (pfield @"resolved" #))
|
||||||
# pfromData txInfoF.inputs
|
# pfromData txInfoF.inputs
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
|
|
@ -335,14 +334,16 @@ mkStakeValidator
|
||||||
pguardC "All input stakes have the same owner or delegate" $
|
pguardC "All input stakes have the same owner or delegate" $
|
||||||
let allHaveSameOwner =
|
let allHaveSameOwner =
|
||||||
pall
|
pall
|
||||||
# ( (pfield @"owner")
|
# plam
|
||||||
#>>> plam (#== firstStakeInputDatumF.owner)
|
( (#== firstStakeInputDatumF.owner)
|
||||||
|
. (pfield @"owner" #)
|
||||||
)
|
)
|
||||||
# restOfStakeInputDatums
|
# restOfStakeInputDatums
|
||||||
allHaveSameDelegate =
|
allHaveSameDelegate =
|
||||||
pall
|
pall
|
||||||
# ( (pfield @"delegatedTo")
|
# plam
|
||||||
#>>> plam (#== firstStakeInputDatumF.delegatedTo)
|
( (#== firstStakeInputDatumF.delegatedTo)
|
||||||
|
. (pfield @"delegatedTo" #)
|
||||||
)
|
)
|
||||||
# restOfStakeInputDatums
|
# restOfStakeInputDatums
|
||||||
in allHaveSameOwner #|| allHaveSameDelegate
|
in allHaveSameOwner #|| allHaveSameDelegate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue