pub struct Proposal {Show 14 fields
pub id: u64,
pub group_policy_address: String,
pub metadata: String,
pub proposers: Vec<String>,
pub submit_time: Option<Timestamp>,
pub group_version: u64,
pub group_policy_version: u64,
pub status: i32,
pub final_tally_result: Option<TallyResult>,
pub voting_period_end: Option<Timestamp>,
pub executor_result: i32,
pub messages: Vec<Any>,
pub title: String,
pub summary: String,
}
Expand description
Proposal defines a group proposal. Any member of a group can submit a proposal
for a group policy to decide upon.
A proposal consists of a set of sdk.Msg
s that will be executed if the proposal
passes as well as some optional metadata associated with the proposal.
Fields§
§id: u64
id is the unique id of the proposal.
group_policy_address: String
group_policy_address is the account address of group policy.
metadata: String
metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#proposal-4
proposers: Vec<String>
proposers are the account addresses of the proposers.
submit_time: Option<Timestamp>
submit_time is a timestamp specifying when a proposal was submitted.
group_version: u64
group_version tracks the version of the group at proposal submission. This field is here for informational purposes only.
group_policy_version: u64
group_policy_version tracks the version of the group policy at proposal submission.
When a decision policy is changed, existing proposals from previous policy
versions will become invalid with the ABORTED
status.
This field is here for informational purposes only.
status: i32
status represents the high level position in the life cycle of the proposal. Initial value is Submitted.
final_tally_result: Option<TallyResult>
final_tally_result contains the sums of all weighted votes for this proposal for each vote option. It is empty at submission, and only populated after tallying, at voting period end or at proposal execution, whichever happens first.
voting_period_end: Option<Timestamp>
voting_period_end is the timestamp before which voting must be done.
Unless a successful MsgExec is called before (to execute a proposal whose
tally is successful before the voting period ends), tallying will be done
at this point, and the final_tally_result
and status
fields will be
accordingly updated.
executor_result: i32
executor_result is the final result of the proposal execution. Initial value is NotRun.
messages: Vec<Any>
messages is a list of sdk.Msg
s that will be executed if the proposal passes.
title: String
title is the title of the proposal
Since: cosmos-sdk 0.47
summary: String
summary is a short summary of the proposal
Since: cosmos-sdk 0.47
Implementations§
Source§impl Proposal
impl Proposal
Sourcepub fn status(&self) -> ProposalStatus
pub fn status(&self) -> ProposalStatus
Returns the enum value of status
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: ProposalStatus)
pub fn set_status(&mut self, value: ProposalStatus)
Sets status
to the provided enum value.
Sourcepub fn executor_result(&self) -> ProposalExecutorResult
pub fn executor_result(&self) -> ProposalExecutorResult
Returns the enum value of executor_result
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_executor_result(&mut self, value: ProposalExecutorResult)
pub fn set_executor_result(&mut self, value: ProposalExecutorResult)
Sets executor_result
to the provided enum value.
Trait Implementations§
Source§impl Message for Proposal
impl Message for Proposal
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.impl StructuralPartialEq for Proposal
Auto Trait Implementations§
impl Freeze for Proposal
impl RefUnwindSafe for Proposal
impl Send for Proposal
impl Sync for Proposal
impl Unpin for Proposal
impl UnwindSafe for Proposal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.