-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ClientConn to TxBuilder to support ADR 031 #7541
Comments
@amaurymartiny an alternative (or complentary approach) would be a method which takes a bankMsgClient := bank.NewMsgClient(ClientTxConn(clientCtx))
// this broadcasts the transaction, return value will depend on broadcast mode
// for block broadcast mode the return value is the actual return value
// for other modes the return value is empty because it's basically asycn
_, err := bankMsgClient.Send(...) |
Nice. I see it as a complentary approach, as we still need to allow txs with multiple msgs. Also not sure who signs the tx in this case, I'll focus on |
Well we general pull that stuff from the cmd line like this: return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) So maybe |
Adding ClientConn to TxBuilder might not be the best UX (see #7630 (comment)). I propose to revisit this hand-in-hand with #8270. |
is this still on pause ? |
makes sense wasn't sure if it was still relevant |
we will be reevaluating all client based things and potentially housing it all in clientv2. Ideally all client based things like this are moved out of the state machine. Secondly most of the client stuff here is used for cli, we shouldnt spend too much time on this as most users are using frontends. |
Summary
This is a follow-up to #7500 to enable creating transactions using the new
ServiceMsg
approach.Details
client.TxBuilder
implementgrpc.ClientConn
. This will allow golang clients to build transactions using the generatedMsgClient
types. Note that this client methods will need to returnnil
as the response as the method cannot be executed synchronously Extend ClientConn on TxBuilder #7630ServiceMsg
ServiceMsg
concrete type andMsgRequest
interface with amino codecMsgRequest
concrete time if an amino codec is optionally provided toMsgServiceRouter
x/bank
Msg/Send
to confirm that transaction submission is working with this method, using bothSIGN_MODE_DIRECT
andSIGN_MODE_LEGACY_AMINO_JSON
ClientTxConn(client.Context, *pflag.FlagSet)
, and convert all CLI tx endpoints to use ServiceMsgs.The text was updated successfully, but these errors were encountered: