pub enum StakeConfig<T: AddressLike> {
Default,
Astroport {
contract: T,
reward_infos: Vec<AssetInfoBase<T>>,
},
Ve3 {
contract: T,
reward_infos: Vec<AssetInfoBase<T>>,
},
}Variants§
Implementations§
Source§impl StakeConfig<String>
impl StakeConfig<String>
pub fn check(self, api: &dyn Api) -> Result<StakeConfig<Addr>, AssetError>
Source§impl StakeConfig<Addr>
impl StakeConfig<Addr>
pub fn stake_check_received_msg( &self, deps: &DepsMut<'_>, env: &Env, asset: Asset, ) -> Result<Vec<CosmosMsg>, SharedError>
pub fn unstake_check_received_msg( &self, deps: &DepsMut<'_>, env: &Env, asset: Asset, ) -> Result<Vec<CosmosMsg>, SharedError>
pub fn claim_check_received_msg( &self, deps: &DepsMut<'_>, env: &Env, asset: AssetInfo, ) -> Result<Vec<CosmosMsg>, SharedError>
Trait Implementations§
Source§impl<T: Clone + AddressLike> Clone for StakeConfig<T>
impl<T: Clone + AddressLike> Clone for StakeConfig<T>
Source§fn clone(&self) -> StakeConfig<T>
fn clone(&self) -> StakeConfig<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug + AddressLike> Debug for StakeConfig<T>
impl<T: Debug + AddressLike> Debug for StakeConfig<T>
Source§impl<T: AddressLike> Default for StakeConfig<T>
impl<T: AddressLike> Default for StakeConfig<T>
Source§fn default() -> StakeConfig<T>
fn default() -> StakeConfig<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for StakeConfig<T>where
T: Deserialize<'de> + AddressLike,
impl<'de, T> Deserialize<'de> for StakeConfig<T>where
T: Deserialize<'de> + AddressLike,
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: AddressLike + JsonSchema> JsonSchema for StakeConfig<T>
impl<T: AddressLike + JsonSchema> JsonSchema for StakeConfig<T>
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl<T: PartialEq + AddressLike> PartialEq for StakeConfig<T>
impl<T: PartialEq + AddressLike> PartialEq for StakeConfig<T>
Source§impl<T> Serialize for StakeConfig<T>where
T: Serialize + AddressLike,
impl<T> Serialize for StakeConfig<T>where
T: Serialize + AddressLike,
impl<T: PartialEq + AddressLike> StructuralPartialEq for StakeConfig<T>
Auto Trait Implementations§
impl<T> Freeze for StakeConfig<T>
impl<T> RefUnwindSafe for StakeConfig<T>
impl<T> Send for StakeConfig<T>
impl<T> Sync for StakeConfig<T>
impl<T> Unpin for StakeConfig<T>
impl<T> UnsafeUnpin for StakeConfig<T>
impl<T> UnwindSafe for StakeConfig<T>
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
Mutably borrows from an owned value. Read more