Struct cw_controllers::Claims
source · pub struct Claims(/* private fields */);
Implementations§
source§impl Claims
impl Claims
pub const fn new(storage_key: &'static str) -> Self
pub fn new_dyn(storage_key: impl Into<Namespace>) -> 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 Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnwindSafe for Claims
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