Categorygithub.com/kaifei-bianjie/msg-parser
modulepackage
0.0.0-20220929054643-f148bc3491d6
Repository: https://github.com/kaifei-bianjie/msg-parser.git
Documentation: pkg.go.dev

# README

msg-parser

Tx msg parser for block chain which built with cosmos-sdk

install

Requirement

Go version above 1.15

Use Go Mod

require (
    github.com/kaifei-bianjie/msg-parser latest
)

Usage

Init Client

The initialization SDK code is as follows:


client := msg_parser.NewMsgClient()

parse Bank Msg of Tx

bankDoc, ok := client.Bank.HandleTxMsg(&msg)
if ok {
		//db save bank msg
	}

use in sync


var (
	docTx models.Tx
	docTxMsgs []msg_parser.DocTxMsg
    	)
	authTx := Tx.(signing.Tx)
	......
	msgs := authTx.GetMsgs()
	for _, msg := range msgs {
        if bankDoc, ok := client.Bank.HandleTxMsg(&msg);ok {
            docTxMsgs = append(docTxMsgs, bankDoc.DocTxMsg)
            continue
        }
        .....
    }
 docTx.DocTxMsgs = docTxMsgs

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author

# Structs

No description provided by the author