Remove ServiceMsgs from ADR-031 (#9139)
* wip * wip * wip * wip on refactoring adr 031 type URLs * Fix msg_service_router * Fix gov client queries * Fix some modules tests * Remove all instances of "*.Msg/*" * Uncomment code * Remove commented code * // simulation.NewWeightedOperation( * Fix CopyTx * Fix more tests * Fix x/gov test * proto.MessageName->sdk.MsgName * Fix authz tests * Use MsgRoute in feegrant and staking/authz * Fix more tests * Fix sims? * Add norace tag * Add CL * rebuild rosetta api test data * Update ADR * Rename MsgRoute -> MsgTypeURL * Fix codec registration * Remove sdk.GetLegacySignBytes * Update types/tx_msg.go * Update x/authz/simulation/operations.go * Move LegacyMsg to legacytx * Update CHANGELOG.md Co-authored-by: Aaron Craelius <aaron@regen.network> * Remove NewAnyWithCustomTypeURL * Keep support for ServiceMsgs * Fix TxBody UnpackInterfaces * Fix test * Address review * Remove support for ServiceMsg typeURLs * Fix lint * Update changelog * Fix tests * Use sdk.MsgTypeURL everywhere * Fix tests * Fix rosetta, run make rosetta-data * Fix rosetta thanks to froydi * Address reviews * Fix test * Remove stray log * Update CL Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
co-authored by
Aaron Craelius
Aaron Craelius
Alessio Treglia
parent
6fbded9664
commit
dfe3e7a8d7
@@ -60,7 +60,7 @@ func NewCmdGrantAuthorization() *cobra.Command {
|
||||
|
||||
Examples:
|
||||
$ %s tx %s grant cosmos1skjw.. send %s --spend-limit=1000stake --from=cosmos1skl..
|
||||
$ %s tx %s grant cosmos1skjw.. generic --msg-type=/cosmos.gov.v1beta1.Msg/Vote --from=cosmos1sk..
|
||||
$ %s tx %s grant cosmos1skjw.. generic --msg-type=/cosmos.gov.v1beta1.MsgVote --from=cosmos1sk..
|
||||
`, version.AppName, types.ModuleName, bank.SendAuthorization{}.MethodName(), version.AppName, types.ModuleName),
|
||||
),
|
||||
Args: cobra.ExactArgs(2),
|
||||
@@ -254,17 +254,7 @@ Example:
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
msgs := theTx.GetMsgs()
|
||||
serviceMsgs := make([]sdk.ServiceMsg, len(msgs))
|
||||
for i, msg := range msgs {
|
||||
srvMsg, ok := msg.(sdk.ServiceMsg)
|
||||
if !ok {
|
||||
return fmt.Errorf("tx contains %T which is not a sdk.ServiceMsg", msg)
|
||||
}
|
||||
serviceMsgs[i] = srvMsg
|
||||
}
|
||||
|
||||
msg := types.NewMsgExecAuthorized(grantee, serviceMsgs)
|
||||
msg := types.NewMsgExecAuthorized(grantee, theTx.GetMsgs())
|
||||
svcMsgClientConn := &msgservice.ServiceMsgClientConn{}
|
||||
msgClient := types.NewMsgClient(svcMsgClientConn)
|
||||
_, err = msgClient.ExecAuthorized(context.Background(), &msg)
|
||||
|
||||
Reference in New Issue
Block a user