From d8412cf90a3cd975064c124f7377b154c27b9832 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 13 Jun 2023 14:55:15 +0200 Subject: [PATCH] Remove not_supported_by_chain for authz and feegrant messages --- packages/stargate/src/modules/authz/aminomessages.ts | 10 +++++++--- .../stargate/src/modules/feegrant/aminomessages.ts | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/stargate/src/modules/authz/aminomessages.ts b/packages/stargate/src/modules/authz/aminomessages.ts index f5d706a8..b4857884 100644 --- a/packages/stargate/src/modules/authz/aminomessages.ts +++ b/packages/stargate/src/modules/authz/aminomessages.ts @@ -2,8 +2,12 @@ import { AminoConverters } from "../../aminotypes"; export function createAuthzAminoConverters(): AminoConverters { return { - "/cosmos.authz.v1beta1.MsgGrant": "not_supported_by_chain", - "/cosmos.authz.v1beta1.MsgExec": "not_supported_by_chain", - "/cosmos.authz.v1beta1.MsgRevoke": "not_supported_by_chain", + // For Cosmos SDK < 0.46 the Amino JSON codec was broken on chain and thus inaccessible. + // Now this can be implemented for 0.46+ chains, see + // https://github.com/cosmos/cosmjs/issues/1092 + // + // "/cosmos.authz.v1beta1.MsgGrant": IMPLEMENT ME, + // "/cosmos.authz.v1beta1.MsgExec": IMPLEMENT ME, + // "/cosmos.authz.v1beta1.MsgRevoke": IMPLEMENT ME, }; } diff --git a/packages/stargate/src/modules/feegrant/aminomessages.ts b/packages/stargate/src/modules/feegrant/aminomessages.ts index 5b61109e..c36bc9a9 100644 --- a/packages/stargate/src/modules/feegrant/aminomessages.ts +++ b/packages/stargate/src/modules/feegrant/aminomessages.ts @@ -2,7 +2,11 @@ import { AminoConverters } from "../../aminotypes"; export function createFeegrantAminoConverters(): AminoConverters { return { - "/cosmos.feegrant.v1beta1.MsgGrantAllowance": "not_supported_by_chain", - "/cosmos.feegrant.v1beta1.MsgRevokeAllowance": "not_supported_by_chain", + // For Cosmos SDK < 0.46 the Amino JSON codec was broken on chain and thus inaccessible. + // Now this can be implemented for 0.46+ chains, see + // https://github.com/cosmos/cosmjs/issues/1092 + // + // "/cosmos.feegrant.v1beta1.MsgGrantAllowance": IMPLEMENT_ME, + // "/cosmos.feegrant.v1beta1.MsgRevokeAllowance": IMPLEMENT_ME, }; }