pub enum ExecuteMsg {
SetVault {
vault: String,
whitelisted: bool,
},
SetWithdrawalLockPeriod(Uint64),
TransferOwnership {
new_owner: String,
},
RequestSlashing(RequestSlashingPayload),
LockSlashing(SlashingRequestId),
CancelSlashing(SlashingRequestId),
FinalizeSlashing(SlashingRequestId),
}Variants§
SetVault
ExecuteMsg SetVault the vault contract in the router and whitelist (true/false) it.
Only the owner can call this message.
SetWithdrawalLockPeriod(Uint64)
ExecuteMsg SetWithdrawalLockPeriod the lock period for withdrawal.
Only the owner can call this message.
TransferOwnership
ExecuteMsg TransferOwnership
See bvs_library::ownership::transfer_ownership for more information on this field
RequestSlashing(RequestSlashingPayload)
ExecuteMsg RequestSlashing initiates a slashing request against an active operator of the service (info.sender).
This ExecuteMsg allows a registered service to request a slash of an operator’s staked tokens as a penalty for violations or non-compliance. The slashing request must meet several criteria:
- The service must be actively registered with the operator at the specified timestamp
- The slashing amount (in bips) must not exceed the max_slashing_bips set by the service
- The operator must have opted in to slashing at the specified timestamp
- The timestamp must be within the allowable slashing window (not too old or in the future)
- The service must not have another active slashing request against the same operator
- The reason provided in metadata must not exceed the maximum allowed length
When successful, this creates a slashing request with an expiry time based on the resolution_window parameter and returns a unique slashing request ID.
§Returns
On success, returns events with a data field set as RequestSlashingResponse containing the generated slashing request ID.
LockSlashing(SlashingRequestId)
ExecuteMsg LockSlashing initiates the movement of slashed collateral from vaults to the router which will later be finalized and handle according to the service slashing rules.
CancelSlashing(SlashingRequestId)
ExecuteMsg CancelSlashing cancels a resolved slashing request.
The service (slash initiator) should cancel the slashing process if the operator has resolved the issue. The definition of “resolved” is up to the service to define.
FinalizeSlashing(SlashingRequestId)
ExecuteMsg FinalizeSlashing moves the slashed collateral from the router to the destination specified in the slashing parameters that were agreed upon by the service and operator.
This is the final step in the slashing process and should only be called after the request has been locked, and the guardrail proposal has been voted on and passed.
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 Display for ExecuteMsg
impl Display for ExecuteMsg
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 moreSource§impl PartialEq for ExecuteMsg
impl PartialEq for ExecuteMsg
Source§impl Serialize for ExecuteMsg
impl Serialize for ExecuteMsg
Source§impl TestingContract<InstantiateMsg, ExecuteMsg, QueryMsg> for VaultRouterContract
impl TestingContract<InstantiateMsg, ExecuteMsg, QueryMsg> for VaultRouterContract
fn wrapper() -> Box<dyn Contract<Empty>>
fn default_init(app: &mut App, _env: &Env) -> InstantiateMsg
fn new(app: &mut App, env: &Env, msg: Option<InstantiateMsg>) -> Self
fn addr(&self) -> &Addr
fn store_code(app: &mut App) -> u64
fn instantiate(app: &mut App, code_id: u64, label: &str, msg: &IM) -> Addr
Source§fn set_contract_addr(app: &mut App, label: &str, addr: &Addr)
fn set_contract_addr(app: &mut App, label: &str, addr: &Addr)
Source§fn get_contract_addr(app: &App, label: &str) -> Addr
fn get_contract_addr(app: &App, label: &str) -> Addr
fn execute( &self, app: &mut App, sender: &Addr, msg: &EM, ) -> Result<AppResponse, Error>
fn execute_with_funds( &self, app: &mut App, sender: &Addr, msg: &EM, funds: Vec<Coin>, ) -> Result<AppResponse, Error>
fn query<T>(&self, app: &App, msg: &QM) -> Result<T, StdError>where
T: DeserializeOwned,
fn migrate( &self, app: &mut App, sender: &Addr, msg: &MM, ) -> Result<AppResponse, Error>
impl StructuralPartialEq for ExecuteMsg
Auto Trait Implementations§
impl Freeze for ExecuteMsg
impl RefUnwindSafe for ExecuteMsg
impl Send for ExecuteMsg
impl Sync for ExecuteMsg
impl Unpin for ExecuteMsg
impl UnwindSafe for ExecuteMsg
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