Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Aug 5, 2024
1 parent d7fa396 commit 0894cda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/apis/src/ibc/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ pub enum ConsumerPacket {
/// This has precedence over all other events in the same packet.
slashed: Vec<ValidatorSlashInfo>,
},
/// This is a part of zero max cap process
/// The consumer chain will send this packet to provider, force user to unbond token
InternalUnstake {
delegator: String,
validator: String,
Expand Down
5 changes: 3 additions & 2 deletions packages/apis/src/virtual_staking_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ pub trait VirtualStakingApi {
amount: Coin,
) -> Result<Response<Self::ExecC>, Self::Error>;

/// TODO: docs for this function
///
/// Immediately unbond the given amount due to zero max cap
/// When the consumer chain receives ack packet from provider - which means the unbond process from provider is success,
/// consumer chain will trigger this function to unbond this contract actor staking base on the delegate amount.
#[sv::msg(exec)]
fn internal_unbond(
&self,
Expand Down
4 changes: 2 additions & 2 deletions packages/bindings/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub enum VirtualStakeMsg {
/// It will then burn those tokens from the caller's account,
/// and update the currently minted amount.
Unbond { amount: Coin, validator: String },
/// TODO: Add docs for this msg
///
/// After each bonding or unbond process, a msg will be sent to the chain
/// Consumer chain will save the data - represent each delegator's stake amount
UpdateDelegation {
amount: Coin,
is_deduct: bool,
Expand Down

0 comments on commit 0894cda

Please sign in to comment.