Staking Related Modules
Overview
Entry Functions
Register an Account Delegation Store
public entry fun register(
account: &signer // account to register
){
...
}Delegate Coin and Deposit Rewards
public entry fun delegate_script(
account: &signer,
metadata: Object<Metadata>, // metadata of the coin/lp token to delegate
validator: String, // validator address in bech32 format
amount: u64, // amount to delegate
) acquires DelegationStore, ModuleStore {
...
}Undelegate
Claim unbonding_coin from Expired Unbonding
unbonding_coin from Expired UnbondingClaim Rewards
View Functions
Get Delegation Info of an Address and a Validator Address
Get All Delegation Info of an Address
Example Response of get_delegation and get_delegations
get_delegation and get_delegationsGet Unbonding Info
Get All Unbondings of an Address
Example Response of get_unbondings
get_unbondingsLast updated