Module zapping.move
Function: batch_claim_zapping_script
This function is used by external users to claim expired zapping
stakes in a batch.
Inputs
Full prototype: public entry fun batch_claim_zapping_script( account: &signer, zids: vector<u64>, ) acquires ModuleStore, LSStore
account: &signer
Validation: Must be a
signer
.Impact: This is the account from which the
zapping
s are unlocked.
zids: vector<u64>
Validation: Checks that the
zid
s are present under the account.Impact: These
zid
s are unlocked.
Function: batch_claim_reward_script
This function is used by external users to claim the rewards on the staked zapping
s in a batch.
Inputs
Full prototype: public entry fun batch_claim_reward_script( account: &signer, zids: vector<u64>, ) acquires ModuleStore, LSStore
account: &signer
Validation: Must be a
signer
.Impact: This is the account from which the
zapping
rewards are claimed.
zids: vector<u64>
Validation: Checks that the
zid
s are present under the account.Impact: These
zid
s will have their staking reward claimed.
Function: claim_zapping_script
This function is used by external users to claim expired zapping
stakes.
Inputs
Full prototype: public entry fun claim_zapping_script( account: &signer, zid: u64, ) acquires ModuleStore, LSStore
account: &signer
Validation: Must be a
signer
.Impact: This is the account from which the
zapping
is unlocked.
zid: u64
Validation: Checks that the
zid
is present under the account.Impact: This
zid
is unlocked.
Function: claim_reward_script
This function is used by external users to claim the rewards on the staked zapping
.
Inputs
Full prototype: public entry fun claim_reward_script(account: &signer, zid: u64) acquires ModuleStore, LSStore
account: &signer
Validation: Must be a
signer
.Impact: This is the account from which the
zapping
reward is claimed.
zid: u64
Validation: Checks that the
zid
is present under the account.Impact: This
zid
will have its staking reward claimed.
Function: update_lock_period_script
This function is used by the chain
special signer to update the lock period on zapping
s. It does not affect existing zapping
s.
Inputs
Full prototype: public entry fun update_lock_period_script( chain: &signer, lock_period: u64, ) acquires ModuleStore
chain: &signer
Validation: Must be
chain
.Impact: None, used for validation only.
lock_period: u64
Validation: None necessary as this function will only be called by trusted users.
Impact: The new lock period is this value.
Function: claim
Claims an unlocked zapping
and returns the inner Delegation
and accrued rewards.
Inputs
Full prototype: public fun claim(zapping: Zapping, zid: u64): (Delegation, FungibleAsset)
zapping: Zapping
Validation: None, but this type can only be created in this module.
Impact: This
zapping
is claimed.
zid: u64
Validation: None, but this function is only callable by callers with a
Zapping
, all of which are trusted.Impact: The
id
is emitted in an event.