The Balance pallet operates as a decentralized system for managing balances within the peaq network. It provides users the ability to store their PEAQ tokens and to transfer these tokens to other users.
forceTransfer(source, dest, value): a forced transfer of a specified value of tokens from the source to the destination address.
forceUnreserve(who, amount): allows for the forced unreservation of a specified amount of tokens from a particular account.
setBalance(who, newFree, newReserved): allows for the modification of an account's balance by directly setting the new values for free and reserved balances.
transfer(dest, value): enables the transfer of a specified amount of tokens to a designated destination account.
transferAll(dest, keepAlive): allows for the transfer of all available tokens from the sender's account to a specified destination account.
transferKeepAlive(dest, value): It facilitates the transfer of a specified amount of tokens from the sender's account to a designated destination account while keeping the sender's account active.
The possible inputs for interacting with this pallet are below:
source: The source account or address from which the tokens will be transferred.
dest: The recipient account to which the tokens will be transferred.
value: The amount of tokens to transfer.
who: user account.
amount: The amount of tokens.
keepAlive: A boolean parameter that determines whether the sender account should remain active (keepAlive = true) or be deactivated (keepAlive = false) after the transfer.