pub enum ExecuteMsg {
Show 13 variants
Receive(Cw20ReceiveMsg),
UpdateConfig {
config: CreateOrUpdateConfig,
},
InitAsset {
asset: Asset,
asset_params: InitOrUpdateAssetParams,
asset_symbol: Option<String>,
},
InitAssetTokenCallback {
reference: Vec<u8>,
},
UpdateAsset {
asset: Asset,
asset_params: InitOrUpdateAssetParams,
},
UpdateUncollateralizedLoanLimit {
user_address: String,
asset: Asset,
new_limit: Uint128,
},
DepositNative {
denom: String,
on_behalf_of: Option<String>,
},
Withdraw {
asset: Asset,
amount: Option<Uint128>,
recipient: Option<String>,
},
Borrow {
asset: Asset,
amount: Uint128,
recipient: Option<String>,
},
RepayNative {
denom: String,
on_behalf_of: Option<String>,
},
LiquidateNative {
collateral_asset: Asset,
debt_asset_denom: String,
user_address: String,
receive_ma_token: bool,
},
UpdateAssetCollateralStatus {
asset: Asset,
enable: bool,
},
FinalizeLiquidityTokenTransfer {
sender_address: Addr,
recipient_address: Addr,
sender_previous_balance: Uint128,
recipient_previous_balance: Uint128,
amount: Uint128,
},
}
Variants§
Receive(Cw20ReceiveMsg)
Implementation of cw20 receive msg
UpdateConfig
Update contract config (only owner can call)
Fields
config: CreateOrUpdateConfig
InitAsset
Initialize an asset on the money market (only owner can call)
Fields
asset_params: InitOrUpdateAssetParams
Asset parameters
asset_symbol: Option<String>
Asset symbol to be used in maToken name and description. If non is provided, denom will be used for native and token symbol will be used for cw20. Mostly useful for native assets since it’s denom (e.g.: uluna, uusd) does not match it’s user facing symbol (LUNA, UST) which should be used in maToken’s attributes for the sake of consistency
InitAssetTokenCallback
Callback sent from maToken contract after instantiated
Fields
UpdateAsset
Update an asset on the money market (only owner can call)
UpdateUncollateralizedLoanLimit
Update uncollateralized loan limit for a given user and asset. Overrides previous value if any. A limit of zero means no uncollateralized limit and the debt in that asset needs to be collateralized (only owner can call)
Fields
DepositNative
Deposit Terra native coins. Deposited coins must be sent in the transaction this call is made
Fields
Withdraw
Withdraw an amount of the asset burning an equivalent amount of maTokens. If asset is a Terra native token, the amount sent to the user is selected so that the sum of the transfered amount plus the stability tax payed is equal to the withdrawn amount.
Fields
Borrow
Borrow Terra native coins. If borrow allowed, amount is added to caller’s debt and sent to the address. If asset is a Terra native token, the amount sent is selected so that the sum of the transfered amount plus the stability tax payed is equal to the borrowed amount.
Fields
RepayNative
Repay Terra native coins loan. Coins used to repay must be sent in the transaction this call is made.
Fields
LiquidateNative
Liquidate under-collateralized native loans. Coins used to repay must be sent in the transaction this call is made.
Fields
UpdateAssetCollateralStatus
Update (enable / disable) asset as collateral for the caller
Fields
FinalizeLiquidityTokenTransfer
Called by liquidity token (maToken). Validate liquidity token transfer is valid and update collateral status
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