pub enum ExecuteMsg {
Show 19 variants
UpdateConfig {
keeper_addr: Option<Addr>,
unbond_config: Option<UnbondConfig>,
},
SetCustomUnbondConfig {
lp_token: Addr,
unbond_config: UnbondConfig,
},
UnsetCustomUnbondConfig {
lp_token: Addr,
},
CreateRewardSchedule {
lp_token: Addr,
title: String,
actual_creator: Option<Addr>,
start_block_time: u64,
end_block_time: u64,
},
AllowLpToken {
lp_token: Addr,
},
RemoveLpToken {
lp_token: Addr,
},
AllowRewardCw20Token {
addr: Addr,
},
RemoveRewardCw20Token {
addr: Addr,
},
Receive(Cw20ReceiveMsg),
Bond {
lp_token: Addr,
amount: Uint128,
},
Unbond {
lp_token: Addr,
amount: Option<Uint128>,
},
InstantUnbond {
lp_token: Addr,
amount: Uint128,
},
Unlock {
lp_token: Addr,
},
InstantUnlock {
lp_token: Addr,
token_locks: Vec<TokenLock>,
},
Withdraw {
lp_token: Addr,
},
ClaimUnallocatedReward {
reward_schedule_id: u64,
},
ProposeNewOwner {
owner: Addr,
expires_in: u64,
},
ClaimOwnership {},
DropOwnershipProposal {},
}Variants§
UpdateConfig
Allows an admin to update config params
SetCustomUnbondConfig
Add custom unbdond config for a given LP token
UnsetCustomUnbondConfig
Unset custom unbdond config for a given LP token
CreateRewardSchedule
Creates a new reward schedule for rewarding LP token holders a specific asset. Asset is distributed linearly over the duration of the reward schedule. This entry point is strictly meant for proposing reward schedules with native tokens. For proposing reward schedules with CW20 tokens, CW20 transfer with CreateRewardSchedule HookMsg is used. Only owner can create a reward schedule proposal.
Fields
AllowLpToken
Allows an admin to allow a new LP token to be rewarded This is needed to prevent spam related to adding new reward schedules for random LP tokens
RemoveLpToken
. Allows an admin to remove an LP token from being rewarded. Existing reward schedules for the LP token will still be valid.
AllowRewardCw20Token
Add reward CW20 token to the list of allowed reward tokens
RemoveRewardCw20Token
Remove reward CW20 token from the list of allowed reward tokens
Receive(Cw20ReceiveMsg)
Allows the contract to receive CW20 tokens. The contract can receive CW20 tokens from LP tokens for staking and CW20 assets to be used as rewards.
Bond
Allows to bond LP tokens to the contract. Bonded tokens are eligible to receive rewards.
Unbond
Allows to unbond LP tokens from the contract. After unbonding, the tokens are still locked for a locking period. During this period, the tokens are not eligible to receive rewards. After the locking period, the tokens can be withdrawn.
InstantUnbond
Instantly unbonds LP tokens from the contract. No locking period is applied. The tokens are withdrawn from the contract and sent to the user. An Instant Unbonding fee is applicable to the amount being unbonded. The fee is calculated as a percentage of the amount being unbonded and sent to the protocol treasury.
Unlock
Unlocks the tokens which are locked for a locking period. After unlocking, the tokens are withdrawn from the contract and sent to the user.
InstantUnlock
Instant unlock is a extension of instant unbonding feature which allows to insantly unbond tokens which are in a locked state post normal unbonding. This is useful when a user mistakenly unbonded the tokens instead of instant unbonding or if a black swan event occurs and the user has the LP tokens in a locked state after unbonding.
Fields
Withdraw
Allows to withdraw unbonded rewards for a specific LP token. The rewards are sent to the user’s address.
ClaimUnallocatedReward
Allows a reward schedule creator to claim back amount that was not allocated to anyone since no token were bonded. This can only be claimed after reward schedule expiry
ProposeNewOwner
Allows the owner to transfer ownership to a new address. Ownership transfer is done in two steps:
- The owner proposes a new owner.
- The new owner accepts the ownership. The proposal expires after a certain period of time within which the new owner must accept the ownership.
ClaimOwnership
Allows the new owner to accept ownership.
DropOwnershipProposal
Allows the owner to drop the ownership transfer proposal.
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 moreSource§impl PartialEq for ExecuteMsg
impl PartialEq for ExecuteMsg
Source§impl Serialize for ExecuteMsg
impl Serialize for ExecuteMsg
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