Skip to content

authz MsgExec ignores all responses but the last one. #9536

Closed
@robert-zaremba

Description

Summary of Bug

authz/MsgExec takes multiple messages to execute:

type MsgExec struct {
	Grantee string
	// Authorization Msg requests to execute. Each msg must implement Authorization interface
	// The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
	// triple and validate it.
	Msgs []*types1.Any
}

When dispatching the messages we fail if one of the sub messages fails. However when all succeed, we only return a response from the last message:

msgResult, err = handler(ctx, msg)
if err != nil {
return nil, sdkerrors.Wrapf(err, "failed to execute message; message %v", msg)
}
}
return msgResult, nil

Version

master, 0.43-beta

Solution proposal

Update MsgExecResponse to get an array of responses.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions