Enum cw20_staking::msg::ExecuteMsg [−][src]
pub enum ExecuteMsg {
Show 13 variants
Bond {},
Unbond {
amount: Uint128,
},
Claim {},
Reinvest {},
_BondAllTokens {},
Transfer {
recipient: String,
amount: Uint128,
},
Burn {
amount: Uint128,
},
Send {
contract: String,
amount: Uint128,
msg: Binary,
},
IncreaseAllowance {
spender: String,
amount: Uint128,
expires: Option<Expiration>,
},
DecreaseAllowance {
spender: String,
amount: Uint128,
expires: Option<Expiration>,
},
TransferFrom {
owner: String,
recipient: String,
amount: Uint128,
},
SendFrom {
owner: String,
contract: String,
amount: Uint128,
msg: Binary,
},
BurnFrom {
owner: String,
amount: Uint128,
},
}
Variants
Bond
Fields
Bond will bond all staking tokens sent with the message and release derivative tokens
Unbond
Fields
amount: Uint128
Unbond will “burn” the given amount of derivative tokens and send the unbonded staking tokens to the message sender (after exit tax is deducted)
Claim
Fields
Claim is used to claim your native tokens that you previously “unbonded” after the chain-defined waiting period (eg. 3 weeks)
Reinvest
Fields
Reinvest will check for all accumulated rewards, withdraw them, and re-bond them to the same validator. Anyone can call this, which updates the value of the token (how much under custody).
_BondAllTokens
Fields
_BondAllTokens can only be called by the contract itself, after all rewards have been withdrawn. This is an example of using “callbacks” in message flows. This can only be invoked by the contract itself as a return from Reinvest
Transfer
Implements CW20. Transfer is a base message to move tokens to another account without triggering actions
Burn
Fields
amount: Uint128
Implements CW20. Burn is a base message to destroy tokens forever
Send
Implements CW20. Send is a base message to transfer tokens to a contract and trigger an action on the receiving contract.
IncreaseAllowance
Implements CW20 “approval” extension. Allows spender to access an additional amount tokens from the owner’s (env.sender) account. If expires is Some(), overwrites current allowance expiration with this one.
DecreaseAllowance
Implements CW20 “approval” extension. Lowers the spender’s access of tokens from the owner’s (env.sender) account by amount. If expires is Some(), overwrites current allowance expiration with this one.
TransferFrom
Implements CW20 “approval” extension. Transfers amount tokens from owner -> recipient
if env.sender
has sufficient pre-approval.
SendFrom
Implements CW20 “approval” extension. Sends amount tokens from owner -> contract
if env.sender
has sufficient pre-approval.
BurnFrom
Implements CW20 “approval” extension. Destroys tokens forever
Trait Implementations
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>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ExecuteMsg
impl Send for ExecuteMsg
impl Sync for ExecuteMsg
impl Unpin for ExecuteMsg
impl UnwindSafe for ExecuteMsg
Blanket Implementations
Mutably borrows from an owned value. Read more