combi
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Token Factory Tutorial Welcome to the Token Factory tutorial! In this guide, you'll learn how to create and manage custom tokens on the Cosmos blockchain using the Ignite CLI. ## Objective By the end of this tutorial, you'll have a fully functional Token Factory module that allows you to create, mint, and transfer tokens within your blockchain. ## Prerequisites Before diving in, ensure you have the following: 1. **A computer** with a compatible operating system (Linux, macOS, or Windows). 2. **Basic knowledge** of blockchain concepts and the Go programming language. 3. **An active internet connection** to download and install necessary tools. ## Tools and Technologies - **Go**: The programming language for developing Cosmos SDK modules. - **Ignite CLI**: A powerful tool for scaffolding and managing Cosmos SDK-based blockchains. - **Cosmos SDK**: A framework for building custom blockchains on the Cosmos network. ## Steps Overview 1. **Setting up Your Development Environment**: Install Go and Ignite CLI. 2. **Scaffolding Your Blockchain**: Use Ignite CLI to create a new blockchain project. 3. **Implementing the Token Factory Module**: Define data structures, messages, and keeper logic for the Token Factory. 4. **Expand Token Factory Functionalities**: Add mint and transfer logic. 5. **Building and Serving Your Blockchain**: Build the blockchain and run a local server to test the Token Factory module. 6. **Interact with Token Factory Blockchain**: Use CLI commands to create, mint, and transfer tokens. Ready to build your very own Token Factory? Let's get started and dive into the world of custom tokens on the Cosmos blockchain! ## 1. Setting up Your Development Environment ### Install Go - **Download Go** - Visit the [Go download page](https://go.dev/doc/install) and select the appropriate version for your operating system (Linux, macOS, or Windows). - Follow the installation instructions provided on the page. - **Verify Installation** - Open your terminal or command prompt and type: ```sh go version ``` - You should see the installed version of Go. ### Install Ignite CLI - **Download and Install** - Open your terminal and run the following command to download and install Ignite CLI: ```sh curl https://get.ignite.com/cli | bash ``` - This will install the Ignite CLI binary in `/usr/local/bin`. - **Verify Installation** - To verify the installation, run: ```sh ignite version ``` - You should see the version of Ignite CLI that was installed. ## 2. Scaffolding Your Blockchain To scaffold your blockchain using Ignite CLI, follow these steps: - **Open Your Terminal** Make sure you have your terminal open and navigate to the directory where you want to create your project. - **Scaffold a New Blockchain** - Run the following command to create a new blockchain project: ```sh ignite scaffold chain tokenfactory --no-module ``` - **Navigate to Your Project Directory** - Change directory to your newly created project: ```sh cd tokenfactory ``` ## 3. Implementing the Token Factory Module Next, we'll scaffold a new module for your token factory. This module will depend on the Cosmos SDK's `bank` and `auth` modules, which provide essential functionalities like account access and token management. - **Scaffold the Token Factory Module** - Run the following command to create a token module: ```sh ignite scaffold module tokenModule --dep account,bank ``` The successful execution of this command will be confirmed with a message indicating that the tokenModule has been created. - **Defining Denom Data Structure** To manage denoms within your token factory, define their structure using an Ignite map. This will store the data as key-value pairs. - Run the following command to create the denom data structure: ```sh ignite scaffold map Denom description:string ticker:string precision:int url:string maxSupply:int supply:int canChangeMaxSupply:bool --signer owner --index denom --module tokenModule ``` Review the `proto/tokenfactory/tokenModule/denom.proto` file to see the scaffolding results, which include modifications to various files indicating successful creation of the denom structure. - **Proto Definition Updates** Start by updating the structure of a new token denom in `proto/tokenfactory/tokenModule/tx.proto`. - For `MsgCreateDenom`: - Remove int32 supply = 8; and adjust the field order so canChangeMaxSupply becomes the 8th field. - Resulting `MsgCreateDenom` message: ```go message MsgCreateDenom { option (cosmos.msg.v1.signer) = "owner"; string owner = 1; string denom = 2; string description = 3; string ticker = 4; int32 precision = 5; string url = 6; int32 maxSupply = 7; bool canChangeMaxSupply = 8; // <---- supply was removed } ``` - For `MsgUpdateDenom`: - Omit `string ticker = 4;`, `int32 precision = 5;`, and `int32 supply = 8;`, and reorder the remaining fields. - Resulting `MsgUpdateDenom` message: ```go message MsgUpdateDenom { option (cosmos.msg.v1.signer) = "owner"; string owner = 1; string denom = 2; string description = 3; string url = 4; int32 maxSupply = 5; bool canChangeMaxSupply = 6; } ``` - **Types Updates** When creating new denoms, they initially have no supply. The supply is determined only when tokens are minted. - Navigate to `x/tokenmodule/types/messages_denom.go` and do the following: - Remove the `supply` parameter from `NewMsgCreateDenom`. - Update `NewMsgUpdateDenom` to exclude unchangeable parameters like `ticker`, `precision`, and `supply`. - Implement basic input validation in `x/tokenmodule/types/messages_denom.go` like so: ```go func (msg *MsgCreateDenom) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Owner) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid owner address (%s)", err) } // Ensure tiker is between 3-10 characters. tickerLength := len(msg.Ticker) if tickerLength < 3 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Ticker length must be at least 3 chars long") } if tickerLength > 10 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Ticker length must be less than 11 chars long maximum") } // Ensure max supply is greater than zero. if msg.MaxSupply == 0 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Max Supply must be greater than 0") } return nil } ``` ```go func (msg *MsgUpdateDenom) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Owner) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid owner address (%s)", err) } if msg.MaxSupply == 0 { return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "Max Supply must be greater than 0") } return nil } ``` - **Keeper Logic** The keeper is where you define the business logic for manipulating the database and writing to the key-value store. - Navigate to `x/tokenmodule/keeper/msg_server_denom.go` and do the following: - Update `CreateDenom()` to include logic for creating unique denoms. - Modify the error message to point to existing denoms. - Set `Supply` to 0. - Modify `UpdateDenom()` to verify ownership and manage `max supply`: - `x/tokenmodule/keeper/msg_server_denom.go` should look like so: ```go func (k msgServer) CreateDenom(goCtx context.Context, msg *types.MsgCreateDenom) (*types.MsgCreateDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Check if the denom already exists _, isFound := k.GetDenom( ctx, msg.Denom, ) if isFound { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Denom already exist") } // update state var zero int32 = 0 var denom = types.Denom{ Owner: msg.Owner, Denom: msg.Denom, Description: msg.Description, Ticker: msg.Ticker, Precision: msg.Precision, Url: msg.Url, MaxSupply: msg.MaxSupply, Supply: zero, CanChangeMaxSupply: msg.CanChangeMaxSupply, } k.SetDenom( ctx, denom, ) return &types.MsgCreateDenomResponse{}, nil } func (k msgServer) UpdateDenom(goCtx context.Context, msg *types.MsgUpdateDenom) (*types.MsgUpdateDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Check if the value exists valFound, isFound := k.GetDenom( ctx, msg.Denom, ) if !isFound { return nil, errorsmod.Wrap(sdkerrors.ErrKeyNotFound, "Denom to update not found") } // Checks if the msg owner is the same as the current owner if msg.Owner != valFound.Owner { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Incorrect owner") } if !valFound.CanChangeMaxSupply { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Cannot change maxsupply") } if valFound.MaxSupply >= msg.MaxSupply { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Max supply already reached") } if !valFound.CanChangeMaxSupply && msg.CanChangeMaxSupply { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Cannot revert change maxsupply flag") } // Update state var denom = types.Denom{ Owner: msg.Owner, Denom: msg.Denom, Description: msg.Description, Ticker: valFound.Ticker, Precision: valFound.Precision, Url: msg.Url, MaxSupply: msg.MaxSupply, Supply: valFound.Supply, CanChangeMaxSupply: msg.CanChangeMaxSupply, } k.SetDenom(ctx, denom) return &types.MsgUpdateDenomResponse{}, nil } ``` - **Bank and Auth Expected Keeper Interface** Since your module relies on the `auth` and `bank` modules, specify which of their functions your module can access. - Navigate to `x/tokenmodule/types/expected_keepers.go` and update the file like so: ```go package types import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" ) // AccountKeeper defines the expected interface for the Account module. type AccountKeeper interface { GetModuleAddress(moduleName string) sdk.AccAddress GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI } type BankKeeper interface { SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins } // ParamSubspace defines the expected Subspace interface for parameters. type ParamSubspace interface { Get(context.Context, []byte, interface{}) Set(context.Context, []byte, interface{}) } ``` ## 4. Expand Token Factory Functionalities Now we can focus on enhancing the token factory module by adding two critical messages: `MintTokens` and `TransferTokens`. These functionalities are key to managing tokens within your blockchain. - **Scaffolding New Messages** - **MintTokens:**: This message allows the minting of new tokens and their allocation to a specified recipient. The necessary inputs are the `denom`, the `amount` to mint, and the `recipient`'s address. Scaffold this message with: ```sh ignite scaffold message MintTokens denom:string amount:int recipient:string --module tokenModule --signer owner ``` - **TransferTokens**: This message facilitates the transfer of a denom from sender's address to recipient's address. It requires the denom name, sender's address, recipient's address, and amount. Scaffold this message with: ```sh ignite scaffold message TransferTokens denom:string from:string to:string amount:int --module tokenModule --signer owner ``` - **Implementing Logic for New Messages** - **In the MintTokens Functionality**: Locate `x/tokenmodule/keeper/msg_server_mint_tokens.go` and do the following: - Verifying the existence and ownership of the denom. - Ensuring minting does not exceed the maximum supply. - Minting the specified amount and sending it to the recipient. `x/tokenmodule/keeper/msg_server_mint_tokens.go` should look like so: ```go package keeper import ( "context" "tokenfactory/x/tokenmodule/types" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (k msgServer) MintTokens(goCtx context.Context, msg *types.MsgMintTokens) (*types.MsgMintTokensResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Check if the value exists valFound, isFound := k.GetDenom( ctx, msg.Denom, ) if !isFound { return nil, errorsmod.Wrap(sdkerrors.ErrKeyNotFound, "Denom not found") } // Checks if the msg owner is the same as the current owner if msg.Owner != valFound.Owner { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Incorrect owner") } // Ensure max supply is not exceeded var newSupply int32 = valFound.Supply + msg.Amount if newSupply > valFound.MaxSupply { return nil, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Can not mint more than total supply into circulation") } // Get module address moduleAcct := k.accountKeeper.GetModuleAddress(types.ModuleName) // Validate recipient address recipientAddress, err := sdk.AccAddressFromBech32(msg.Recipient) if err != nil { return nil, err } // Mint new denoms var mintCoins sdk.Coins mintCoins = mintCoins.Add(sdk.NewCoin(msg.Denom, math.NewInt(int64(msg.Amount)))) if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, mintCoins); err != nil { return nil, err } if err := k.bankKeeper.SendCoins(ctx, moduleAcct, recipientAddress, mintCoins); err != nil { return nil, err } // Update state var denom = types.Denom{ Owner: valFound.Owner, Denom: valFound.Denom, Description: valFound.Description, MaxSupply: valFound.MaxSupply, Supply: valFound.Supply + msg.Amount, Precision: valFound.Precision, Ticker: valFound.Ticker, Url: valFound.Url, CanChangeMaxSupply: valFound.CanChangeMaxSupply, } k.SetDenom( ctx, denom, ) return &types.MsgMintTokensResponse{}, nil } ``` - **In the TransferTokens Functionality**: Locate `x/tokenmodule/keeper/msg_server_transfer_tokens.go` and do the following: - Checking if the denom exists. - Ensuring that the request comes from the current owner. - Transfer denom from sender's address to recipient's address. `x/tokenmodule/keeper/msg_server_transfer_tokens.go` should look like so: ```go package keeper import ( "context" "tokenfactory/x/tokenmodule/types" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (k msgServer) TransferTokens(goCtx context.Context, msg *types.MsgTransferTokens) (*types.MsgTransferTokensResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // Check if the value exists valFound, isFound := k.GetDenom( ctx, msg.Denom, ) if !isFound { return nil, errorsmod.Wrap(sdkerrors.ErrKeyNotFound, "denom does not exist") } // Checks if the the msg owner is the same as the current owner if msg.Owner != valFound.Owner { return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") } // Ensure reciever address is valid _, err := sdk.AccAddressFromBech32(msg.To) if err != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid From address (%s)", err) } // Convert From address fromAddr, err := sdk.AccAddressFromBech32(msg.From) if err != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid From address: %v", err) } // Convert To address toAddr, err := sdk.AccAddressFromBech32(msg.To) if err != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid To address: %v", err) } // Parse amount var coins sdk.Coins coins = coins.Add(sdk.NewCoin(msg.Denom, math.NewInt(int64(msg.Amount)))) // Transfer coins err = k.bankKeeper.SendCoins(ctx, fromAddr, toAddr, coins) if err != nil { return nil, err } return &types.MsgTransferTokensResponse{}, nil } ``` - **Update CLI** Navigate to `x/tokenmodule/module/autocli.go` and do the following: - Remove `supply` from `CreateDenom` RPC method. - Remove `ticker`, `precision`, and `supply` from `UpdateDenom` RPC method. `x/tokenmodule/module/autocli.go` should look like so: ```go package tokenmodule import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" modulev1 "tokenfactory/api/tokenfactory/tokenmodule" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", Use: "params", Short: "Shows the parameters of the module", }, { RpcMethod: "DenomAll", Use: "list-denom", Short: "List all Denom", }, { RpcMethod: "Denom", Use: "show-denom [id]", Short: "Shows a Denom", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}}, }, // this line is used by ignite scaffolding # autocli/query }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Msg_ServiceDesc.ServiceName, EnhanceCustomCommand: true, // only required if you want to use the custom command RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "UpdateParams", Skip: true, // skipped because authority gated }, { RpcMethod: "CreateDenom", Use: "create-denom [denom] [description] [ticker] [precision] [url] [maxSupply] [canChangeMaxSupply]", Short: "Create a new Denom", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}, {ProtoField: "description"}, {ProtoField: "ticker"}, {ProtoField: "precision"}, {ProtoField: "url"}, {ProtoField: "maxSupply"}, {ProtoField: "canChangeMaxSupply"}}, }, { RpcMethod: "UpdateDenom", Use: "update-denom [denom] [description] [url] [maxSupply] [canChangeMaxSupply]", Short: "Update Denom", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}, {ProtoField: "description"}, {ProtoField: "url"}, {ProtoField: "maxSupply"}, {ProtoField: "canChangeMaxSupply"}}, }, { RpcMethod: "DeleteDenom", Use: "delete-denom [denom]", Short: "Delete Denom", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}}, }, { RpcMethod: "MintTokens", Use: "mint-tokens [denom] [amount] [recipient]", Short: "Send a MintTokens tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}, {ProtoField: "amount"}, {ProtoField: "recipient"}}, }, { RpcMethod: "TransferTokens", Use: "transfer-tokens [denom] [from] [to] [amount]", Short: "Send a TransferTokens tx", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "denom"}, {ProtoField: "from"}, {ProtoField: "to"}, {ProtoField: "amount"}}, }, // this line is used by ignite scaffolding # autocli/tx }, }, } } ``` ## 5. Building and Serving Your Blockchain - **Compile chain**: Compile your blockchain code by running: ```sh ignite chain build ``` The successful execution of this command will be confirmed with a message indicating that the tokenfactory chain binary was built. - **Serve chain**: To start your blockchain locally, use the following command: ```sh ignite chain serve ``` This command launches a local blockchain node, compiles your code, and initializes its configuration. It also supports live reloading, so any changes you make to the code will be automatically applied without restarting the node. *Keep this terminal running as you proceed with the tests.* ## 6. Interact with Token Factory Blockchain Congratulations on reaching the final stage! It's time to put your token factory module to the test - **Creating a New Denom**: In a new terminal, create a denom named uignite with the command: ```sh tokenfactoryd tx tokenmodule create-denom uignite "My denom" IGNITE 6 "some/url" 1000000000 true --from alice ``` - **Querying the Denom**: Check the list of denoms to see your new creation: ```sh tokenfactoryd query tokenmodule list-denom ``` - **Updating the Denom**: - Modify the uignite denom: ```sh tokenfactoryd tx tokenmodule update-denom uignite "Ignite" "newurl" 2000000000 false --from alice ``` - Query the denoms again to observe the changes: ```sh tokenfactoryd query tokenmodule list-denom ``` - **Minting and Sending Tokens**: - Mint uignite tokens and send them to a recipient: ```sh tokenfactoryd tx tokenmodule mint-tokens uignite 1200 <ALICE_ADDRESS> --from alice ``` - Check the recipient’s balance: ```sh tokenfactoryd query bank balances <ALICE_ADDRESS> ``` - Verify the updated supply in denom list: ```sh tokenfactoryd query tokenmodule list-denom ``` - **Transferring Tokens**: - Transfer some uignite tokens: ```sh tokenfactoryd tx tokenmodule transfer-tokens uignite <ALICE_ADDRESS> <BOB_ADDRESS> 100 --from alice ``` - Check the recipient’s balance: ```sh tokenfactoryd query bank balances <BOB_ADDRESS> ``` - **Query transactions** - You can query transactions like so: ```sh tokenfactoryd query tx <TRANSACTION_HASH> ``` ## Congratulations! You've successfully built and tested a token factory module. This tutorial has equipped you with the skills to: - Integrate Cosmos SDK modules and utilize their functionalities. - Customize CRUD operations to fit your blockchain's needs. - Scaffold modules and messages effectively. ## Resources - [Go documentation](https://go.dev/doc/install). - [Ignite CLI documentation](https://docs.ignite.com/nightly/welcome/install). - [Code repository](github.com/cenwadike/cosmos-guides)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully