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: &signerValidation: Must be a
signer.Impact: This is the account from which the
zappings are unlocked.
zids: vector<u64>Validation: Checks that the
zids are present under the account.Impact: These
zids are unlocked.
Function: batch_claim_reward_script
This function is used by external users to claim the rewards on the staked zappings in a batch.
Inputs
Full prototype: public entry fun batch_claim_reward_script( account: &signer, zids: vector<u64>, ) acquires ModuleStore, LSStore
account: &signerValidation: Must be a
signer.Impact: This is the account from which the
zappingrewards are claimed.
zids: vector<u64>Validation: Checks that the
zids are present under the account.Impact: These
zids 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: &signerValidation: Must be a
signer.Impact: This is the account from which the
zappingis unlocked.
zid: u64Validation: Checks that the
zidis present under the account.Impact: This
zidis 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: &signerValidation: Must be a
signer.Impact: This is the account from which the
zappingreward is claimed.
zid: u64Validation: Checks that the
zidis present under the account.Impact: This
zidwill 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 zappings. It does not affect existing zappings.
Inputs
Full prototype: public entry fun update_lock_period_script( chain: &signer, lock_period: u64, ) acquires ModuleStore
chain: &signerValidation: Must be
chain.Impact: None, used for validation only.
lock_period: u64Validation: 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: ZappingValidation: None, but this type can only be created in this module.
Impact: This
zappingis claimed.
zid: u64Validation: None, but this function is only callable by callers with a
Zapping, all of which are trusted.Impact: The
idis emitted in an event.