improve doc string and naming as suggested by auditors
This commit is contained in:
parent
7c3d66f365
commit
ae72d0ae6d
10 changed files with 23 additions and 24 deletions
|
|
@ -87,9 +87,8 @@ data GovernorDatum = GovernorDatum
|
|||
-- Will get copied over upon the creation of proposals.
|
||||
, createProposalTimeRangeMaxWidth :: MaxTimeRangeWidth
|
||||
-- ^ The maximum valid duration of a transaction that creats a proposal.
|
||||
, maximumProposalsPerStake :: Integer
|
||||
-- ^ The maximum number of unfinished proposals that a stake is allowed to be
|
||||
-- associated to.
|
||||
, maximumCreatedProposalsPerStake :: Integer
|
||||
-- ^ The maximum number of proposals created by any given stakes.
|
||||
}
|
||||
deriving stock
|
||||
( -- | @since 0.1.0
|
||||
|
|
@ -183,7 +182,7 @@ newtype PGovernorDatum (s :: S) = PGovernorDatum
|
|||
, "nextProposalId" ':= PProposalId
|
||||
, "proposalTimings" ':= PProposalTimingConfig
|
||||
, "createProposalTimeRangeMaxWidth" ':= PMaxTimeRangeWidth
|
||||
, "maximumProposalsPerStake" ':= PInteger
|
||||
, "maximumCreatedProposalsPerStake" ':= PInteger
|
||||
]
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,8 +380,8 @@ governorValidator =
|
|||
.= governorInputDatumF.proposalTimings
|
||||
.& #createProposalTimeRangeMaxWidth
|
||||
.= governorInputDatumF.createProposalTimeRangeMaxWidth
|
||||
.& #maximumProposalsPerStake
|
||||
.= governorInputDatumF.maximumProposalsPerStake
|
||||
.& #maximumCreatedProposalsPerStake
|
||||
.= governorInputDatumF.maximumCreatedProposalsPerStake
|
||||
)
|
||||
|
||||
pguardC "Only next proposal id gets advanced" $
|
||||
|
|
@ -410,7 +410,7 @@ governorValidator =
|
|||
pguardC "Proposals created by the stake must not exceed the limit" $
|
||||
pnumCreatedProposals
|
||||
# stakeInputDatumF.lockedBy
|
||||
#< governorInputDatumF.maximumProposalsPerStake
|
||||
#< governorInputDatumF.maximumCreatedProposalsPerStake
|
||||
|
||||
let gtThreshold =
|
||||
pfromData $
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ newtype ResultTag = ResultTag {getResultTag :: Integer}
|
|||
data ProposalStatus
|
||||
= -- | A draft proposal represents a proposal that has yet to be realized.
|
||||
--
|
||||
-- In effect, this means one which didn't have enough LQ to be a full
|
||||
-- In effect, this means one which didn't have enough GT to be a full
|
||||
-- proposal, and needs cosigners to enable that to happen. This is
|
||||
-- similar to a "temperature check", but only useful if multiple people
|
||||
-- want to pool governance tokens together. If the proposal doesn't get to
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ data StakeRedeemer
|
|||
= -- | Deposit or withdraw a discrete amount of the staked governance token.
|
||||
-- Stake must be unlocked.
|
||||
DepositWithdraw (Tagged GTTag Integer)
|
||||
| -- | Destroy a stake, retrieving its LQ, the minimum ADA and any other assets.
|
||||
| -- | Destroy a stake, retrieving its GT, the minimum ADA and any other assets.
|
||||
-- Stake must be unlocked.
|
||||
Destroy
|
||||
| -- | Permit a Vote to be added onto a 'Agora.Proposal.Proposal'.
|
||||
|
|
@ -291,7 +291,7 @@ instance PTryFrom PData (PAsData PStakeDatum)
|
|||
data PStakeRedeemer (s :: S)
|
||||
= -- | Deposit or withdraw a discrete amount of the staked governance token.
|
||||
PDepositWithdraw (Term s (PDataRecord '["delta" ':= PTagged GTTag PInteger]))
|
||||
| -- | Destroy a stake, retrieving its LQ, the minimum ADA and any other assets.
|
||||
| -- | Destroy a stake, retrieving its GT, the minimum ADA and any other assets.
|
||||
PDestroy (Term s (PDataRecord '[]))
|
||||
| PPermitVote (Term s (PDataRecord '[]))
|
||||
| PRetractVotes (Term s (PDataRecord '[]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue