MCPcopy Create free account
hub / github.com/DNAProject/DNA / txStatus

Function txStatus

cmd/info_cmd.go:140–159  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

138}
139
140func txStatus(ctx *cli.Context) error {
141 SetRpcPort(ctx)
142 if ctx.NArg() < 1 {
143 PrintErrorMsg("Missing argument. TxHash expected.")
144 cli.ShowSubcommandHelp(ctx)
145 return nil
146 }
147 txHash := ctx.Args().First()
148 evtInfos, err := utils.GetSmartContractEventInfo(txHash)
149 if err != nil {
150 return fmt.Errorf("GetSmartContractEvent error:%s", err)
151 }
152 if string(evtInfos) == "null" {
153 PrintInfoMsg("Cannot get SmartContractEvent by TxHash:%s.", txHash)
154 return nil
155 }
156 PrintInfoMsg("Transaction states:")
157 PrintJsonData(evtInfos)
158 return nil
159}
160
161func curBlockHeight(ctx *cli.Context) error {
162 SetRpcPort(ctx)

Callers

nothing calls this directly

Calls 7

SetRpcPortFunction · 0.85
PrintErrorMsgFunction · 0.85
PrintInfoMsgFunction · 0.85
PrintJsonDataFunction · 0.85
ErrorfMethod · 0.80
FirstMethod · 0.65

Tested by

no test coverage detected