Skip to content

Instantly share code, notes, and snippets.

@shanev
Created October 16, 2020 00:31
Show Gist options
  • Save shanev/a6180c48ac132bccc48ea37536e8ebcb to your computer and use it in GitHub Desktop.
Save shanev/a6180c48ac132bccc48ea37536e8ebcb to your computer and use it in GitHub Desktop.
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