pub enum NeutronMsg {
Show 18 variants
RegisterInterchainAccount {
connection_id: String,
interchain_account_id: String,
register_fee: Option<Vec<Coin>>,
},
SubmitTx {
connection_id: String,
interchain_account_id: String,
msgs: Vec<ProtobufAny>,
memo: String,
timeout: u64,
fee: IbcFee,
},
RegisterInterchainQuery {
query_type: String,
keys: Vec<KVKey>,
transactions_filter: String,
connection_id: String,
update_period: u64,
},
UpdateInterchainQuery {
query_id: u64,
new_keys: Option<Vec<KVKey>>,
new_update_period: Option<u64>,
new_transactions_filter: Option<String>,
},
RemoveInterchainQuery {
query_id: u64,
},
IbcTransfer {
source_port: String,
source_channel: String,
token: Coin,
sender: String,
receiver: String,
timeout_height: RequestPacketTimeoutHeight,
timeout_timestamp: u64,
memo: String,
fee: IbcFee,
},
SubmitAdminProposal {
admin_proposal: AdminProposal,
},
CreateDenom {
subdenom: String,
},
ChangeAdmin {
denom: String,
new_admin_address: String,
},
MintTokens {
denom: String,
amount: Uint128,
mint_to_address: String,
},
BurnTokens {
denom: String,
amount: Uint128,
burn_from_address: String,
},
SetBeforeSendHook {
denom: String,
contract_addr: String,
},
ForceTransfer {
denom: String,
amount: Uint128,
transfer_from_address: String,
transfer_to_address: String,
},
SetDenomMetadata {
description: String,
denom_units: Vec<DenomUnit>,
base: String,
display: String,
name: String,
symbol: String,
uri: String,
uri_hash: String,
},
AddSchedule {
name: String,
period: u64,
msgs: Vec<MsgExecuteContract>,
},
RemoveSchedule {
name: String,
},
ResubmitFailure {
failure_id: u64,
},
Dex(DexMsg),
}Expand description
A number of Custom messages that can call into the Neutron bindings.
Variants§
RegisterInterchainAccount
RegisterInterchainAccount registers an interchain account on remote chain.
Fields
connection_id: Stringconnection_id is an IBC connection identifier between Neutron and remote chain.
SubmitTx
SubmitTx starts the process of executing any Cosmos-SDK msgs on remote chain.
Fields
connection_id: Stringconnection_id is an IBC connection identifier between Neutron and remote chain.
interchain_account_id: Stringinterchain_account_id is an identifier of your interchain account from which you want to execute msgs.
msgs: Vec<ProtobufAny>msgs is a list of protobuf encoded Cosmos-SDK messages you want to execute on remote chain.
RegisterInterchainQuery
RegisterInterchainQuery registers an interchain query.
Fields
UpdateInterchainQuery
RegisterInterchainQuery updates an interchain query.
Fields
RemoveInterchainQuery
RemoveInterchainQuery removes as interchain query.
IbcTransfer
IbcTransfer sends a fungible token packet over IBC.
Fields
timeout_height: RequestPacketTimeoutHeightSubmitAdminProposal
SubmitAdminProposal sends a proposal to neutron’s Admin module. This type of messages can be only executed by Neutron DAO.
Fields
admin_proposal: AdminProposalCreateDenom
TokenFactory message. Contracts can create denoms, namespaced under the contract’s address. A contract may create any number of independent sub-denoms.
ChangeAdmin
TokenFactory message. Contracts can change the admin of a denom that they are the admin of.
MintTokens
TokenFactory message. Contracts can mint native tokens for an existing factory denom that they are the admin of.
BurnTokens
TokenFactory message. Contracts can burn native tokens for an existing factory denom that they are the admin of. Currently, the burn from address must be the admin contract.
SetBeforeSendHook
TokenFactory message. Contracts can set before send hooks for denoms, namespaced under the contract’s address.
ForceTransfer
TokenFactoryMessage
Contracts can force specified amount of an existing factory denom
that they are admin of to a transfer_to_address from a transfer_from_address.
SetDenomMetadata
TokenFactoryMessage Contracts can set a metadata for of an existing factory denom that they are admin of.
Fields
AddSchedule
AddSchedule adds new schedule with a given name.
Until schedule is removed it will execute all msgs every period blocks.
First execution is at least on current_block + period block.
[Permissioned - DAO Only]
Fields
name: StringName of a new schedule.
Needed to be able to RemoveSchedule and to log information about it
msgs: Vec<MsgExecuteContract>list of cosmwasm messages to be executed
RemoveSchedule
RemoveSchedule removes the schedule with a given name.
[Permissioned - DAO or Security DAO only]
ResubmitFailure
Contractmanager message Resubmits failed acknowledgement. Acknowledgement failure is created when contract returns error or acknowledgement is out of gas. [Permissioned - only from contract that is initial caller of IBC transaction]
Dex(DexMsg)
Dex messages
Implementations§
Source§impl NeutronMsg
impl NeutronMsg
Sourcepub fn register_interchain_account(
connection_id: String,
interchain_account_id: String,
register_fee: Option<Vec<Coin>>,
) -> Self
pub fn register_interchain_account( connection_id: String, interchain_account_id: String, register_fee: Option<Vec<Coin>>, ) -> Self
Basic helper to define a register interchain account message:
- connection_id is an IBC connection identifier between Neutron and remote chain;
- interchain_account_id is an identifier of your new interchain account. Can be any string.
Sourcepub fn submit_tx(
connection_id: String,
interchain_account_id: String,
msgs: Vec<ProtobufAny>,
memo: String,
timeout: u64,
fee: IbcFee,
) -> Self
pub fn submit_tx( connection_id: String, interchain_account_id: String, msgs: Vec<ProtobufAny>, memo: String, timeout: u64, fee: IbcFee, ) -> Self
Basic helper to define a submit tx message:
- connection_id is an IBC connection identifier between Neutron and remote chain;
- interchain_account_id is an identifier of your interchain account from which you want to execute msgs;
- msgs is a list of protobuf encoded Cosmos-SDK messages you want to execute on remote chain;
- memo is a memo you want to attach to your interchain transaction. It behaves like a memo in usual Cosmos transaction;
- timeout is a timeout in seconds after which the packet times out.
- fee is a fee that is used for different kinds of callbacks. Unused fee types will be returned to msg sender.
Sourcepub fn register_interchain_query(
query: QueryPayload,
connection_id: String,
update_period: u64,
) -> NeutronResult<Self>
pub fn register_interchain_query( query: QueryPayload, connection_id: String, update_period: u64, ) -> NeutronResult<Self>
Basic helper to define a register interchain query message:
- query is a query type identifier (‘tx’ or ‘kv’ for now) with a payload:
- when the query enum is ‘kv’ then payload is the KV-storage keys for which we want to get values from remote chain;
- when the query enum is ‘tx’ then payload is the filters for transaction search ICQ, maximum allowed number of filters is 32.
- connection_id is an IBC connection identifier between Neutron and remote chain;
- update_period is used to say how often (in neutron blocks) the query must be updated.
Sourcepub fn update_interchain_query(
query_id: u64,
new_keys: Option<Vec<KVKey>>,
new_update_period: Option<u64>,
new_transactions_filter: Option<Vec<TransactionFilterItem>>,
) -> NeutronResult<Self>
pub fn update_interchain_query( query_id: u64, new_keys: Option<Vec<KVKey>>, new_update_period: Option<u64>, new_transactions_filter: Option<Vec<TransactionFilterItem>>, ) -> NeutronResult<Self>
Basic helper to define a update interchain query message:
- query_id is ID of the query we want to update;
- new_keys is encoded keys to query;
- new_update_period is used to say how often (in neutron blocks) the query must be updated.
Sourcepub fn remove_interchain_query(query_id: u64) -> Self
pub fn remove_interchain_query(query_id: u64) -> Self
Basic helper to define a remove interchain query message:
- query_id is ID of the query we want to remove.
Sourcepub fn submit_param_change_proposal(proposal: ParamChangeProposal) -> Self
pub fn submit_param_change_proposal(proposal: ParamChangeProposal) -> Self
Basic helper to define a parameter change proposal passed to AdminModule:
- proposal is struct which contains proposal that should change network parameter.
Sourcepub fn submit_upgrade_proposal(proposal: UpgradeProposal) -> Self
👎Deprecated since 0.11.0: Used only for querying old proposals. Will fail if executed in a new proposal. Use submit_proposal_execute_message instead
pub fn submit_upgrade_proposal(proposal: UpgradeProposal) -> Self
Basic helper to define an ibc upgrade proposal passed to AdminModule:
- proposal is struct which contains proposal that upgrades network.
Sourcepub fn submit_client_update_proposal(proposal: ClientUpdateProposal) -> Self
👎Deprecated since 0.11.0: Used only for querying old proposals. Will fail if executed in a new proposal. Use submit_proposal_execute_message instead
pub fn submit_client_update_proposal(proposal: ClientUpdateProposal) -> Self
Basic helper to define an ibc update client change proposal passed to AdminModule:
- proposal is struct which contains proposal updates cliient.
Sourcepub fn submit_proposal_execute_message(proposal: ProposalExecuteMessage) -> Self
pub fn submit_proposal_execute_message(proposal: ProposalExecuteMessage) -> Self
Basic helper to define sdk47 compatible proposal passed to AdminModule:
- proposal is struct which contains JSON encoded sdk message.
Sourcepub fn submit_create_denom(subdenom: impl Into<String>) -> Self
pub fn submit_create_denom(subdenom: impl Into<String>) -> Self
Basic helper to build create denom message passed to TokenFactory module:
- subdenom is a subdenom name for denom to be created.
Sourcepub fn submit_change_admin(
denom: impl Into<String>,
new_admin_address: impl Into<String>,
) -> Self
pub fn submit_change_admin( denom: impl Into<String>, new_admin_address: impl Into<String>, ) -> Self
Basic helper to define change of admin for a token passed to TokenFactory module:
- denom is a name of the denom to change an admin for;
- new_admin_address is a new admin address for a denom.
Sourcepub fn submit_mint_tokens(
denom: impl Into<String>,
amount: Uint128,
mint_to_address: impl Into<String>,
) -> Self
pub fn submit_mint_tokens( denom: impl Into<String>, amount: Uint128, mint_to_address: impl Into<String>, ) -> Self
Basic helper to define mint tokens passed to TokenFactory module:
- denom is a name of the denom;
- amount is an amount of tokens to mint;
- mint_to_address is an address that will receive minted tokens.
Sourcepub fn submit_burn_tokens(denom: impl Into<String>, amount: Uint128) -> Self
pub fn submit_burn_tokens(denom: impl Into<String>, amount: Uint128) -> Self
Basic helper to define burn tokens passed to TokenFactory module:
- denom is a name of the denom;
- amount is an amount of tokens to burn.
Sourcepub fn submit_set_before_send_hook(
denom: impl Into<String>,
contract_addr: impl Into<String>,
) -> Self
pub fn submit_set_before_send_hook( denom: impl Into<String>, contract_addr: impl Into<String>, ) -> Self
Basic helper to create set before send hook message passed to TokenFactory module:
- denom is a name for denom for hook to be created.
Sourcepub fn submit_force_transfer(
denom: impl Into<String>,
amount: Uint128,
from_address: impl Into<String>,
to_address: impl Into<String>,
) -> Self
pub fn submit_force_transfer( denom: impl Into<String>, amount: Uint128, from_address: impl Into<String>, to_address: impl Into<String>, ) -> Self
Basic helper to create force transfer message passed to TokenFactory module:
- denom is a name for a denom to transfer;
- amount is an amount of denom tokens to transfer;
- from_address is from which address to transfer tokens;
- to_address is where to transfer tokens.
Sourcepub fn submit_set_denom_metadata(
description: String,
denom_units: Vec<DenomUnit>,
base: String,
display: String,
name: String,
symbol: String,
uri: String,
uri_hash: String,
) -> Self
pub fn submit_set_denom_metadata( description: String, denom_units: Vec<DenomUnit>, base: String, display: String, name: String, symbol: String, uri: String, uri_hash: String, ) -> Self
Basic helper to create a set denom metadata message passed to TokenFactory module:
- description description of a token;
- denom_units represents the list of DenomUnit’s for a given coin;
- base represents the base denom (should be the DenomUnit with exponent = 0);
- display indicates the suggested denom that should be displayed in clients;
- name defines the name of the token (eg: Cosmos Atom);
- symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display;
- uri to a document (on or off-chain) that contains additional information. Optional;
- uri_hash is a sha256 hash of a document pointed by URI. It’s used to verify that the document didn’t change. Optional.
Sourcepub fn submit_add_schedule(
name: String,
period: u64,
msgs: Vec<MsgExecuteContract>,
) -> Self
pub fn submit_add_schedule( name: String, period: u64, msgs: Vec<MsgExecuteContract>, ) -> Self
Basic helper to define add schedule passed to Cron module:
- name is a name of the schedule;
- period is a period of schedule execution in blocks;
- msgs is the messages that will be executed.
Sourcepub fn submit_remove_schedule(name: String) -> Self
pub fn submit_remove_schedule(name: String) -> Self
Basic helper to define remove schedule passed to Cron module:
- name is a name of the schedule to be removed.
Sourcepub fn submit_resubmit_failure(failure_id: u64) -> Self
pub fn submit_resubmit_failure(failure_id: u64) -> Self
Basic helper to define resubmit failure passed to Contractmanager module:
- failure_id is an id of the failure to be resubmitted.
Trait Implementations§
Source§impl Clone for NeutronMsg
impl Clone for NeutronMsg
Source§fn clone(&self) -> NeutronMsg
fn clone(&self) -> NeutronMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NeutronMsg
impl Debug for NeutronMsg
Source§impl<'de> Deserialize<'de> for NeutronMsg
impl<'de> Deserialize<'de> for NeutronMsg
Source§fn 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>,
Source§impl From<NeutronMsg> for CosmosMsg<NeutronMsg>
impl From<NeutronMsg> for CosmosMsg<NeutronMsg>
Source§fn from(msg: NeutronMsg) -> CosmosMsg<NeutronMsg>
fn from(msg: NeutronMsg) -> CosmosMsg<NeutronMsg>
Source§impl JsonSchema for NeutronMsg
impl JsonSchema for NeutronMsg
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for NeutronMsg
impl PartialEq for NeutronMsg
Source§impl Serialize for NeutronMsg
impl Serialize for NeutronMsg
impl CustomMsg for NeutronMsg
impl Eq for NeutronMsg
impl StructuralPartialEq for NeutronMsg
Auto Trait Implementations§
impl Freeze for NeutronMsg
impl RefUnwindSafe for NeutronMsg
impl Send for NeutronMsg
impl Sync for NeutronMsg
impl Unpin for NeutronMsg
impl UnwindSafe for NeutronMsg
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more