add NoFieldSelectors flag globally
This commit is contained in:
parent
052f20334d
commit
9e3521dcb4
12 changed files with 54 additions and 57 deletions
|
|
@ -128,7 +128,7 @@ mkProposalOutputDatum ps =
|
|||
mkStakeInputDatums :: Parameters -> [StakeDatum]
|
||||
mkStakeInputDatums =
|
||||
fmap (\pk -> StakeDatum perStakedGTs pk Nothing [])
|
||||
. newCosigners
|
||||
. (.newCosigners)
|
||||
|
||||
-- | Create a 'TxInfo' that tries to cosign a proposal with new cosigners.
|
||||
cosign :: forall b. CombinableBuilder b => Parameters -> b
|
||||
|
|
@ -231,7 +231,7 @@ mkStakeRef idx =
|
|||
|
||||
-- | Create a proposal redeemer which cosigns with the new cosginers.
|
||||
mkProposalRedeemer :: Parameters -> ProposalRedeemer
|
||||
mkProposalRedeemer = Cosign . sort . newCosigners
|
||||
mkProposalRedeemer = Cosign . sort . (.newCosigners)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -245,12 +245,12 @@ mkProposalDatumPair params pid =
|
|||
mkInputVotes Creator _ =
|
||||
ProposalVotes $
|
||||
StrictMap.adjust (const 1000) defVoteFor $
|
||||
getProposalVotes votesTemplate
|
||||
votesTemplate.getProposalVotes
|
||||
mkInputVotes Irrelevant _ = votesTemplate
|
||||
mkInputVotes _ vc =
|
||||
ProposalVotes $
|
||||
StrictMap.adjust (const vc) defVoteFor $
|
||||
getProposalVotes votesTemplate
|
||||
votesTemplate.getProposalVotes
|
||||
|
||||
-- | Create a 'TxInfo' that tries to unlock a stake.
|
||||
unlockStake :: forall b. CombinableBuilder b => Parameters -> b
|
||||
|
|
|
|||
|
|
@ -151,11 +151,11 @@ mkStakeInputDatum params =
|
|||
|
||||
-- | Create the proposal redeemer. In this case @'Vote' _@ will always be used.
|
||||
mkProposalRedeemer :: Parameters -> ProposalRedeemer
|
||||
mkProposalRedeemer = Vote . voteFor
|
||||
mkProposalRedeemer params = Vote params.voteFor
|
||||
|
||||
-- | Place new proposal locks on the stake.
|
||||
mkNewLock :: Parameters -> ProposalLock
|
||||
mkNewLock = Voted proposalInputDatum.proposalId . voteFor
|
||||
mkNewLock params = Voted proposalInputDatum.proposalId params.voteFor
|
||||
|
||||
{- | The stake redeemer that is used in 'mkTestTree'. In this case it'll always be
|
||||
'PermitVote'.
|
||||
|
|
|
|||
|
|
@ -147,10 +147,10 @@ gstUTXORef :: TxOutRef
|
|||
gstUTXORef = TxOutRef "f28cd7145c24e66fd5bcd2796837aeb19a48a2656e7833c88c62a2d0450bd00d" 0
|
||||
|
||||
govPolicy :: MintingPolicy
|
||||
govPolicy = getCompiledMintingPolicy $ agoraScripts.compiledGovernorPolicy
|
||||
govPolicy = agoraScripts.compiledGovernorPolicy.getCompiledMintingPolicy
|
||||
|
||||
govValidator :: Validator
|
||||
govValidator = getCompiledValidator $ agoraScripts.compiledGovernorValidator
|
||||
govValidator = agoraScripts.compiledGovernorValidator.getCompiledValidator
|
||||
|
||||
govSymbol :: CurrencySymbol
|
||||
govSymbol = mintingPolicySymbol govPolicy
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ data Parameters = Parameters
|
|||
|
||||
-- | Select the correct stake redeemer based on the existence of the new delegate.
|
||||
mkStakeRedeemer :: Parameters -> StakeRedeemer
|
||||
mkStakeRedeemer = maybe ClearDelegate (DelegateTo . PubKeyCredential) . newDelegate
|
||||
mkStakeRedeemer params = maybe ClearDelegate (DelegateTo . PubKeyCredential) params.newDelegate
|
||||
|
||||
-- | The owner of the input stake.
|
||||
stakeOwner :: PubKeyHash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue