You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Data that can be customized by the external party, Title, Description and ProposalType
Data used internally by gov logic, all the other fields
In prior to apply #3565, we have to split the current interface to move minimal parts without moving definitions related to the internal logic. It is not safe to let the third party modules to implement the method related to internal logic, such as GetDepositEndTime() and GetTotalDeposit(), as it can return arbitrary value to skip(or somehow manipulate) the governance process. Those fields should be accessible only by the governance module.
Implementation
type ProposalProcess struct is replacing current type Proposal interface, as it is now stored in the state while the proposal is processed.
New method SubmitProposal is introduced where the other modules can call to submit a new proposal. When it is called, the keeper internally wraps it with ProposalProcess, thus no access to the internal parameters from the other modules.
Summary
type TextProposal
ingov
consists of two parts:Title
,Description
andProposalType
In prior to apply #3565, we have to split the current interface to move minimal parts without moving definitions related to the internal logic. It is not safe to let the third party modules to implement the method related to internal logic, such as
GetDepositEndTime()
andGetTotalDeposit()
, as it can return arbitrary value to skip(or somehow manipulate) the governance process. Those fields should be accessible only by the governance module.Implementation
type ProposalProcess struct
is replacing currenttype Proposal interface
, as it is now stored in the state while the proposal is processed.type Proposal interface
is the part which the other custom proposal type can implement, and will be moved intotypes/
New method
SubmitProposal
is introduced where the other modules can call to submit a new proposal. When it is called, the keeper internally wraps it withProposalProcess
, thus no access to the internal parameters from the other modules.The text was updated successfully, but these errors were encountered: