Expand description
sov-bank
module
The sov-bank
module is responsible for managing tokens on the rollup.
The sov-bank
module offers the following functionality:
Calls:
-
The
CallMessage::CreateToken
message creates a newtoken
with an initial balance allocated to the minter. Conceptually a token is a mapping from users addresses to balances. Each token has a name and a unique address created automatically by thesov-bank
module during the creation phase. -
The
CallMessage::Transfer
message facilitates the transfer of tokens between two accounts. To initiate the transfer, the sender must provide the beneficiary’s account, the amount of tokens to be transferred, and the token address. It is important to note that the sender’s account balance must be greater than the amount being transferred. -
The
CallMessage::Burn
message burns the specified amount of tokens.
Re-exports
pub use utils::get_genesis_token_address;
pub use utils::get_token_address;
Modules
- Util functions for bank
Structs
- The sov-bank module manages user balances. It provides functionality for:
- Initial configuration for sov-bank module.
- Specifies an interface to interact with tokens. Structure that stores information specifying a given
amount
(typeAmount
) of coins stored at atoken_address
(typesov_modules_api::Spec::Address
). TokenConfig
specifies a configuration used when generating a token for the bank module.
Enums
- Specifies the call methods using in that module. This enumeration represents the available call messages for interacting with the sov-bank module.
Type Aliases
- Specifies an interface to interact with tokens. Type alias to store an amount of token.