Created
October 16, 2020 00:31
-
-
Save shanev/a6180c48ac132bccc48ea37536e8ebcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msg := curating.NewMsgPost(c.VendorID, postID, creator, creator, body) | |
account, err := c.GetAccount(creator) | |
if err != nil { | |
return err | |
} | |
txBytes, err := c.TxBuilder. | |
WithAccountNumber(account.GetAccountNumber()). | |
WithSequence(account.GetSequence()). | |
BuildAndSign(keyName(creatorID), "", []sdk.Msg{msg}) | |
if err != nil { | |
return err | |
} | |
res, err := c.Ctx.BroadcastTx(txBytes) | |
if err != nil { | |
return err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment