zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
166 stars 107 forks source link

Allow MsgWithdrawEmission as an Authz Grant. #3116

Open CharlieMc0 opened 1 day ago

CharlieMc0 commented 1 day ago

Describe the Bug When trying setup a Authz grant for the emissions.MsgWithdrawEmission message type it fails with this error.

Error: no concrete type registered for type URL /zetachain.zetacore.emissions.MsgWithdrawEmission against interface *authz.Authorization

To Reproduce Try to use the /cosmos.authz.v1beta1.MsgGrant to allow another address to submit the MsgWithdrawEmission on behalf of a OS node.


{ 
  "messages": [
        {
          "@type": "/cosmos.authz.v1beta1.MsgGrant",
          "granter": "zeta1c9876",
          "grantee": "zeta1c1234...",
          "grant": {
            "authorization": {
              "@type": "/zetachain.zetacore.emissions.MsgWithdrawEmission"
            },
            "expiration": null
          }
        }
      ]
    }
  ],
}

Expected Behavior This should work correctly without any errors.

lumtis commented 1 day ago

Need to be added in codec.go, should solve the issue. We should also add MsgUpdateParams