Skip to content

authz MsgExec should emit the executed msg events #9501

Closed
@yun-yeo

Description

Summary of Problem

When we use authz module's MsgExec, we cannot get the executed msg events like tranfer or coin_received. It seems critical for the deposit checker which are using event listening.

We just get

{
   "height":"101373",
   "txhash":"D2497B19FBDB27DCBE9F7D7C9AA57F78A56D0BC47FD9C773B7E687602E69B8EA",
   "data":"0ADA030A1D2F636F736D6F732E617574687A2E763162657461312E4D73674578656312B8030AB5031A5C0A0A636F696E5F7370656E7412370A077370656E646572122C746572726131743834396678773765386E657933356D78656D6834683361796561347A66373764736C776E6112150A06616D6F756E74120B31303030303030756B72771A600A0D636F696E5F726563656976656412380A087265636569766572122C746572726131756370333639797279366E37307171337A617879743835636E7567373572376C6E386C36736512150A06616D6F756E74120B31303030303030756B72771A94010A087472616E7366657212390A09726563697069656E74122C746572726131756370333639797279366E37307171337A617879743835636E7567373572376C6E386C36736512360A0673656E646572122C746572726131743834396678773765386E657933356D78656D6834683361796561347A66373764736C776E6112150A06616D6F756E74120B31303030303030756B72771A410A076D65737361676512360A0673656E646572122C746572726131743834396678773765386E657933356D78656D6834683361796561347A66373764736C776E611A190A076D657373616765120E0A066D6F64756C65120462616E6B",
   "raw_log":"[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/cosmos.authz.v1beta1.MsgExec\"}]}]}]",
   "logs":[
      {
         "events":[
            {
               "type":"message",
               "attributes":[
                  {
                     "key":"action",
                     "value":"/cosmos.authz.v1beta1.MsgExec"
                  }
               ]
            }
         ]
      }
   ],
   "gas_wanted":"200000",
   "gas_used":"82846",
   "tx":{
      "type":"core/StdTx",
      "value":{
         "msg":[
            {
               "type":"msgauth/MsgExecAuthorized",
               "value":{
                  "grantee":"terra1ucp369yry6n70qq3zaxyt85cnug75r7ln8l6se",
                  "msgs":[
                     {
                        "type":"bank/MsgSend",
                        "value":{
                           "from_address":"terra1t849fxw7e8ney35mxemh4h3ayea4zf77dslwna",
                           "to_address":"terra1ucp369yry6n70qq3zaxyt85cnug75r7ln8l6se",
                           "amount":[
                              {
                                 "denom":"ukrw",
                                 "amount":"1000000"
                              }
                           ]
                        }
                     }
                  ]
               }
            }
         ],
         "fee":{
            "amount":[
               {
                  "denom":"ukrw",
                  "amount":"1000"
               }
            ],
            "gas":"200000"
         },
         "signatures":[
            
         ],
         "memo":"",
         "timeout_height":"0"
      }
   },
   "timestamp":"2021-06-11T08:38:34Z"
}

Events part is

[{"events":[{"type":"message","attributes":[{"key":"action","value":"/cosmos.authz.v1beta1.MsgExec"}]}]}]

Feature Request

so recommend to emit the inner msg event, not just return the result as data.

return &authz.MsgExecResponse{Result: result}, nil

Version

v0.43.0-beta1

Steps to Reproduce

Grant the SendAuthorization and send MsgExec


For Admin Use

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

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions