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

Fields

recipient: String
amount: Uint128

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

Fields

contract: String
amount: Uint128
msg: Binary

Implements CW20. Send is a base message to transfer tokens to a contract and trigger an action on the receiving contract.

IncreaseAllowance

Fields

spender: String
amount: Uint128
expires: Option<Expiration>

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

Fields

spender: String
amount: Uint128
expires: Option<Expiration>

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

Fields

owner: String
recipient: String
amount: Uint128

Implements CW20 “approval” extension. Transfers amount tokens from owner -> recipient if env.sender has sufficient pre-approval.

SendFrom

Fields

owner: String
contract: String
amount: Uint128
msg: Binary

Implements CW20 “approval” extension. Sends amount tokens from owner -> contract if env.sender has sufficient pre-approval.

BurnFrom

Fields

owner: String
amount: Uint128

Implements CW20 “approval” extension. Destroys tokens forever

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The name of the generated JSON Schema. Read more

Generates a JSON Schema for this type. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.