pub enum VaultExecuteMsg {
DepositFor(RecipientAmount),
WithdrawTo(RecipientAmount),
QueueWithdrawalTo(RecipientAmount),
RedeemWithdrawalTo(Recipient),
SlashLocked(Amount),
}Expand description
Vault ExecuteMsg, to be implemented by the vault contract.
Callable by any sender, redeemable by any recipient.
The sender can be the same as the recipient in some cases.
Variants§
DepositFor(RecipientAmount)
ExecuteMsg DepositFor assets into the vault.
Sender must transfer the assets to the vault contract (this is implementation agnostic).
The vault contract must mint shares to the recipient.
Vault must be whitelisted in the vault-router to accept deposits.
WithdrawTo(RecipientAmount)
ExecuteMsg WithdrawTo assets from the vault.
Sender must have enough shares to withdraw the requested amount to the recipient.
If the Vault is delegated to an operator, withdrawals must be queued.
Operator must not be validating any services for instant withdrawals.
QueueWithdrawalTo(RecipientAmount)
ExecuteMsg QueueWithdrawalTo assets from the vault.
Sender must have enough shares to queue the requested amount to the recipient.
Once the withdrawal is queued,
the recipient can redeem the withdrawal after the lock period.
Once the withdrawal is locked,
the sender cannot cancel the withdrawal.
The time-lock is enforced by the vault and cannot be changed retroactively.
§Lock Period Extension
New withdrawals will extend the lock period of any existing withdrawals.
You can queue the withdrawal to a different recipient than the sender to avoid this.
RedeemWithdrawalTo(Recipient)
ExecuteMsg RedeemWithdrawalTo all queued shares into assets from the vault for withdrawal.
After the lock period, the sender (must be the recipient of the original withdrawal)
can redeem the withdrawal.
SlashLocked(Amount)
ExecuteMsg SlashLocked moves the assets from the vault to the vault-router contract for custody.
Part of the [https://build.satlayer.xyz/getting-started/slashing](Programmable Slashing) lifecycle.
This function can only be called by vault-router, and takes an absolute amount of assets to be moved.
The amount is calculated and enforced by the router.
Further utility of the assets, post-locked, is implemented and enforced on the router level.
Trait Implementations§
Source§impl Clone for VaultExecuteMsg
impl Clone for VaultExecuteMsg
Source§fn clone(&self) -> VaultExecuteMsg
fn clone(&self) -> VaultExecuteMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VaultExecuteMsg
impl Debug for VaultExecuteMsg
Source§impl<'de> Deserialize<'de> for VaultExecuteMsg
impl<'de> Deserialize<'de> for VaultExecuteMsg
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 Display for VaultExecuteMsg
impl Display for VaultExecuteMsg
Source§impl JsonSchema for VaultExecuteMsg
impl JsonSchema for VaultExecuteMsg
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 VaultExecuteMsg
impl PartialEq for VaultExecuteMsg
Source§impl Serialize for VaultExecuteMsg
impl Serialize for VaultExecuteMsg
impl StructuralPartialEq for VaultExecuteMsg
Auto Trait Implementations§
impl Freeze for VaultExecuteMsg
impl RefUnwindSafe for VaultExecuteMsg
impl Send for VaultExecuteMsg
impl Sync for VaultExecuteMsg
impl Unpin for VaultExecuteMsg
impl UnwindSafe for VaultExecuteMsg
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<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