This Substrate-based pallet provides functionality for managing and interacting with tokens on the blockchain. It implements token creation, ownership, transfers, burning, and buying.
- Create unique tokens with a unique identifier.
- Manage ownership of tokens.
- Transfer tokens between accounts.
- Set and update token prices.
- Burn tokens to remove them from circulation.
- Buy tokens from other users based on the set price.
-
Create a Token: Call the
create_token
function to create a new unique token. -
Burn a Token: Call the
burn_token
function to burn (remove from circulation) an existing token. -
Transfer a Token: Call the
transfer
function to transfer a token from one account to another. -
Set Token Price: Call the
set_price
function to set or update the price of a token. -
Buy a Token: Call the
buy_token
function to buy a token from another account based on the set price.
-
Add the pallet as a dependency in your runtime's
Cargo.toml
:[dependencies] my_token_pallet = { path = "path/to/your/pallet" }
-
Add the pallet as a dependency in your runtime's
Cargo.toml
:pub use my_token_pallet;
-
Configure the pallet in your runtime by implementing the Config trait:
License This pallet is licensed under the Apache License, Version 2.0. See the LICENSE file for details.