GovProposal

Enum GovProposal 

Source
pub enum GovProposal {
Show 13 variants Text {}, RegisterUpgrade { name: String, height: u64, info: String, }, CancelUpgrade {}, ChangeParams(Vec<ParamChange>), IbcClientUpdate { client_id: String, header: ProtoAny, }, PromoteToPrivilegedContract { contract: String, }, DemotePrivilegedContract { contract: String, }, InstantiateContract { run_as: String, admin: String, code_id: u64, label: String, init_msg: Binary, funds: Vec<Coin>, }, MigrateContract { run_as: String, contract: String, code_id: u64, migrate_msg: Binary, }, SetContractAdmin { contract: String, new_admin: String, }, ClearContractAdmin { contract: String, }, PinCodes { code_ids: Vec<u64>, }, UnpinCodes { code_ids: Vec<u64>, },
}

Variants§

§

Text

Signaling proposal, the text and description field will be recorded

§

RegisterUpgrade

Register an “live upgrade” on the x/upgrade module See https://github.com/cosmos/cosmos-sdk/blob/v0.42.3/proto/cosmos/upgrade/v1beta1/upgrade.proto#L12-L53

Fields

§name: String

Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special “on-upgrade” commands during the first BeginBlock method after the upgrade is applied.

§height: u64

The height at which the upgrade must be performed. (Time-based upgrades are not supported due to instability)

§info: String

Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to

§

CancelUpgrade

There can only be one pending upgrade at a given time. This cancels the pending upgrade, if any. See https://github.com/cosmos/cosmos-sdk/blob/v0.42.3/proto/cosmos/upgrade/v1beta1/upgrade.proto#L57-L62

§

ChangeParams(Vec<ParamChange>)

Defines a proposal to change one or more parameters. See https://github.com/cosmos/cosmos-sdk/blob/v0.42.3/proto/cosmos/params/v1beta1/params.proto#L9-L27

§

IbcClientUpdate

Updates the matching client to set a new trusted header. This can be used by governance to restore a client that has timed out or forked or otherwise broken. See https://github.com/cosmos/cosmos-sdk/blob/v0.42.3/proto/ibc/core/client/v1/client.proto#L36-L49

Fields

§client_id: String
§header: ProtoAny
§

PromoteToPrivilegedContract

See https://github.com/confio/tgrade/blob/privileged_contracts_5/proto/confio/twasm/v1beta1/proposal.proto

Fields

§contract: String
§

DemotePrivilegedContract

See https://github.com/confio/tgrade/blob/privileged_contracts_5/proto/confio/twasm/v1beta1/proposal.proto

Fields

§contract: String
§

InstantiateContract

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L32-L54

Fields

§run_as: String

the address that is passed to the contract’s environment as sender

§admin: String

Admin is an optional address that can execute migrations

§code_id: u64

the reference to the stored WASM code

§label: String

metadata to be stored with a contract instance.

§init_msg: Binary

json encoded message to be passed to the contract on instantiation

§funds: Vec<Coin>

coins that are transferred to the contract on instantiation

§

MigrateContract

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L56-L70

Fields

§run_as: String

the address that is passed to the contract’s environment as sender

§contract: String

the contract address to be migrated

§code_id: u64

a reference to the new WASM code that it should be migrated to

§migrate_msg: Binary

json encoded message to be passed to the new WASM code to perform the migration

§

SetContractAdmin

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L72-L82

Fields

§contract: String

the contract address to be updated

§new_admin: String

the account address to become admin of this contract

§

ClearContractAdmin

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L84-L93

Fields

§contract: String

the contract address to be cleared

§

PinCodes

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L95-L107

Fields

§code_ids: Vec<u64>

all code ideas that should be pinned in cache for high performance

§

UnpinCodes

See https://github.com/CosmWasm/wasmd/blob/master/proto/cosmwasm/wasm/v1beta1/proposal.proto#L109-L121

Fields

§code_ids: Vec<u64>

all code ideas that should be removed from cache to free space

Trait Implementations§

Source§

impl Clone for GovProposal

Source§

fn clone(&self) -> GovProposal

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GovProposal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GovProposal

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for GovProposal

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for GovProposal

Source§

fn eq(&self, other: &GovProposal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GovProposal

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for GovProposal

Source§

impl StructuralPartialEq for GovProposal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,