pub enum ExecuteMsg {
Receive(Cw20ReceiveMsg),
Distribute {
amount: Option<Uint128>,
},
Cancel {},
Delegate {
validator: String,
amount: Uint128,
},
Redelegate {
src_validator: String,
dst_validator: String,
amount: Uint128,
},
Undelegate {
validator: String,
amount: Uint128,
},
SetWithdrawAddress {
address: String,
},
WithdrawDelegatorReward {
validator: String,
},
WithdrawCanceledPayment {
amount: Option<Uint128>,
},
RegisterSlash {
validator: String,
time: Timestamp,
amount: Uint128,
during_unbonding: bool,
},
UpdateOwnership(Action),
}Variants§
Receive(Cw20ReceiveMsg)
Fund the contract with a cw20 token. The msg field must have
the shape {"fund":{}}, and the amount sent must be the same
as the amount to be vested (as set during instantiation).
Anyone may call this method so long as the contract has not
yet been funded.
Distribute
Distribute vested tokens to the vest receiver. Anyone may call this method.
Fields
Cancel
Cancels the vesting payment. The current amount vested becomes the total amount that will ever vest, and all pending and future staking rewards from tokens staked by this contract will be sent to the owner. Tote that canceling does not impact already vested tokens.
Upon canceling, the contract will use any liquid tokens in the contract to settle pending payments to the vestee, and then returns the rest to the owner. Staked tokens are then split between the owner and the vestee according to the number of tokens that the vestee is entitled to.
The vestee will no longer receive staking rewards after cancelation, and may unbond and distribute (vested - claimed) tokens at their leisure. the owner will receive staking rewards and may unbond and withdraw (staked - (vested - claimed)) tokens at their leisure.
Delegate
This is translated to a
MsgDelegate.
delegator_address is automatically filled with the current
contract’s address. Note: this only works with the native
staking denom of a Cosmos chain. Only callable by Vesting
Payment Recipient.
Redelegate
This is translated to a
MsgBeginRedelegate.
delegator_address is automatically filled with the current
contract’s address. Only callable by Vesting Payment
Recipient.
Undelegate
This is translated to a
MsgUndelegate.
delegator_address is automatically filled with the current
contract’s address. Only callable by Vesting Payment
Recipient.
SetWithdrawAddress
This is translated to a
MsgSetWithdrawAddress.
delegator_address is automatically filled with the current
contract’s address. Only callable by Vesting Payment
Recipient.
WithdrawDelegatorReward
This is translated to a
MsgWithdrawDelegatorReward.
delegator_address is automatically filled with the current
contract’s address.
WithdrawCanceledPayment
If the owner cancels a payment and there are not enough liquid tokens to settle the owner may become entitled to some number of staked tokens. They may then unbond those tokens and then call this method to return them.
RegisterSlash
Registers a slash event bonded or unbonding tokens with the contract. Only callable by the owner as the contract is unable to verify that the slash actually occured. The owner is assumed to be honest.
A future version of this contract may be able to permissionlessly take slashing evidence: https://github.com/CosmWasm/mesh-security/issues/35
Fields
time: TimestampThe time the slash event occured. Note that this is not validated beyond validating that it is < now. This means that if two slash events occur for a single validator, and then this method is called, a dishonest sender could register those two slashes as a single larger one at the time of the first slash.
The result of this is that the staked balances tracked in this contract can not be relied on for accurate values in the past. Staked balances will be correct at time=now.
UpdateOwnership(Action)
Update the contract’s ownership. The action to be provided
can be either to propose transferring ownership to an account,
accept a pending ownership transfer, or renounce the ownership
permanently.
Trait Implementations§
Source§impl Clone for ExecuteMsg
impl Clone for ExecuteMsg
Source§fn clone(&self) -> ExecuteMsg
fn clone(&self) -> ExecuteMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecuteMsg
impl Debug for ExecuteMsg
Source§impl<'de> Deserialize<'de> for ExecuteMsg
impl<'de> Deserialize<'de> for ExecuteMsg
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 JsonSchema for ExecuteMsg
impl JsonSchema for ExecuteMsg
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 more