Struct cw_controllers::Claims
source · pub struct Claims<'a>(/* private fields */);
Implementations§
source§impl<'a> Claims<'a>
impl<'a> Claims<'a>
pub const fn new(storage_key: &'a str) -> Self
sourcepub fn create_claim(
&self,
storage: &mut dyn Storage,
addr: &Addr,
amount: Uint128,
release_at: Expiration
) -> StdResult<()>
pub fn create_claim( &self, storage: &mut dyn Storage, addr: &Addr, amount: Uint128, release_at: Expiration ) -> StdResult<()>
This creates a claim, such that the given address can claim an amount of tokens after the release date.
sourcepub fn claim_tokens(
&self,
storage: &mut dyn Storage,
addr: &Addr,
block: &BlockInfo,
cap: Option<Uint128>
) -> StdResult<Uint128>
pub fn claim_tokens( &self, storage: &mut dyn Storage, addr: &Addr, block: &BlockInfo, cap: Option<Uint128> ) -> StdResult<Uint128>
This iterates over all mature claims for the address, and removes them, up to an optional cap. it removes the finished claims and returns the total amount of tokens to be released.
pub fn query_claims<Q: CustomQuery>( &self, deps: Deps<'_, Q>, address: &Addr ) -> StdResult<ClaimsResponse>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Claims<'a>
impl<'a> Send for Claims<'a>
impl<'a> Sync for Claims<'a>
impl<'a> Unpin for Claims<'a>
impl<'a> UnwindSafe for Claims<'a>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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