Enum tg_bindings::TgradeMsg
source · [−]pub enum TgradeMsg {
Privilege(PrivilegeMsg),
MintTokens {
denom: String,
amount: Uint128,
recipient: String,
},
ConsensusParams(ConsensusParams),
WasmSudo {
contract_addr: String,
msg: Binary,
},
ExecuteGovProposal {
title: String,
description: String,
proposal: GovProposal,
},
Delegate {
funds: Coin,
staker: String,
},
Undelegate {
funds: Coin,
recipient: String,
},
}Expand description
A number of Custom messages that can be returned by ‘privileged’ contracts. Returning them from any other contract will return an error and abort the transaction.
Variants
Privilege(PrivilegeMsg)
request or release some privileges, such as BeginBlocker or TokenMinter
MintTokens
privileged contracts can mint arbitrary native tokens (extends BankMsg)
ConsensusParams(ConsensusParams)
as well as adjust tendermint consensus params
WasmSudo
Fields
contract_addr: Stringmsg: Binarymsg is the json-encoded SudoMsg struct (as raw Binary). Note the contract may support different variants than the base TgradeSudoMsg, which defines the base chain->contract interface
Run another contract in “sudo” mode (extends WasmMsg)
ExecuteGovProposal
This will execute an approved proposal in the Cosmos SDK “Gov Router”. That allows access to many of the system internals, like sdk params or x/upgrade, as well as privileged access to the wasm module (eg. mark module privileged)
Delegate
This will stake funds from the sender’s vesting account. Requires Delegator privilege.
Undelegate
This will unstake funds to the recipient’s vesting account. Requires Delegator privilege.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for TgradeMsg
impl<'de> Deserialize<'de> for TgradeMsg
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<PrivilegeMsg> for TgradeMsg
impl From<PrivilegeMsg> for TgradeMsg
sourcefn from(msg: PrivilegeMsg) -> TgradeMsg
fn from(msg: PrivilegeMsg) -> TgradeMsg
Converts to this type from the input type.
sourceimpl JsonSchema for TgradeMsg
impl JsonSchema for TgradeMsg
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
impl CustomMsg for TgradeMsg
impl StructuralPartialEq for TgradeMsg
Auto Trait Implementations
impl RefUnwindSafe for TgradeMsg
impl Send for TgradeMsg
impl Sync for TgradeMsg
impl Unpin for TgradeMsg
impl UnwindSafe for TgradeMsg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more