Lock
The Lock contract is responsible for locking up UST returned from shorting a mAsset through Mirror Mint operation.
InitMsg
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InitMsg {
pub owner: HumanAddr,
pub mint_contract: HumanAddr,
pub base_denom: String,
pub lockup_period: u64,
}owner
HumanAddr
Owner address of Mirror Lock
mint_contract
HumanAddr
Address of Mirror Mint
base_denom
String
Native token denomination for stablecoin (TerraUSD)
lockup_period
u64
Length of time in seconds which the UST from shorting will be locked for
HandleMsg
UpdateConfig
UpdateConfigUpdates the configuration of Lock contract. Can only be issued by the owner of the Mirror Lock.
owner*
HumanAddr
Owner address of Mirror Lock
mint_contract*
HumanAddr
Address of Mirror Mint
base_denom*
String
Native token denomination for stablecoin (TerraUSD)
lockup_period*
u64
Length of time in seconds which the UST from shorting witll be locked for
*= optional
LockPositionFundsHook
LockPositionFundsHookLocks the UST from shorting mAsset when short CDP is successfully created on Mirror Mint.
position_idx
Uint128
ID number of CDP from Mirror Mint
receiver
HumanAddr
Creator of CDP, who will receive unlocked funds
UnlockPositionFunds
UnlockPositionFundsLocked UST fromLockPositionFundsHookis unlocked by sending this message afterlockup_periodhas passed. Can only be issued by the owner of the position (receiver).
position_idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
ReleasePositionFunds
ReleasePositionFundsLocked funds will be released and sent to the CDP creator upon closing of the position. This message unlocks funds even whenlock_periodhas not ended yet. Can only be issued by the mint contract when the position is being closed.
position_idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
QueryMsg
Config
ConfigReturns the configuration of Mirror Lock.
Response
owner
HumanAddr
Owner address of Mirror Lock
mint_contract
HumanAddr
Address of Mirror Mint
base_denom
String
Native token denomination for stablecoin (TerraUSD)
lockup_period
u64
Length of time in seconds which the UST from shorting will be locked for
Response
owner
HumanAddr
Owner address of Mirror Lock
mint_contract
HumanAddr
Address of Mirror Mint
base_denom
String
Native token denomination for stablecoin (TerraUSD)
lockup_period
u64
Number of blocks which the UST from shorting will be locked for
PositionLockInfo
PositionLockInfoReturns information about locked funds of a specific CDP.
position_idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
Response
idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
receiver
HumanAddr
Creator of CDP, who will receive unlocked funds
locked_amount
Uint128
Amount of base_denom locked from creating a Short CDP
unlock_time
u64
Time when user is allowed to claim the locked_amount
position_idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
Response
idx
Uint128
ID number of CDP from Mirror Mint to unlock funds from
receiver
HumanAddr
Creator of CDP, who will receive unlocked funds
locked_funds
Vec<(u64, Uint128)>
Description about
1. Block height which the fund was locked at
2. Amount of base_denom locked
from creating a Short CDP
Last updated