Skip to content

Commit 4fa751d

Browse files
committed
fix: gov module queries and ADR
1 parent d4cf59a commit 4fa751d

File tree

5 files changed

+11541
-0
lines changed

5 files changed

+11541
-0
lines changed

app/encoding.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
"github.com/cosmos/cosmos-sdk/types/module"
1212
"github.com/cosmos/cosmos-sdk/x/auth/tx"
1313
"github.com/cosmos/gogoproto/proto"
14+
15+
"github.com/Nolus-Protocol/nolus-core/app/legacycodec"
1416
)
1517

1618
// EncodingConfig specifies the concrete encoding types to use for a given app.
@@ -40,6 +42,17 @@ func makeEncodingConfig() EncodingConfig {
4042
panic(err)
4143
}
4244

45+
interfaceRegistry.RegisterImplementations(
46+
(*sdk.Msg)(nil),
47+
&legacycodec.MsgChannelUpgradeInit{},
48+
&legacycodec.MsgChannelUpgradeTry{},
49+
&legacycodec.MsgChannelUpgradeAck{},
50+
&legacycodec.MsgChannelUpgradeConfirm{},
51+
&legacycodec.MsgChannelUpgradeOpen{},
52+
&legacycodec.MsgChannelUpgradeTimeout{},
53+
&legacycodec.MsgChannelUpgradeCancel{},
54+
)
55+
4356
if err := interfaceRegistry.SigningContext().Validate(); err != nil {
4457
panic(err)
4558
}

app/legacycodec/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
In this folder are hosted older proto generated files from ibc-go v8. We need those since we have published governance proposals in the past that used message types
2+
from this very proto files. Those message types are not available in ibc-go v10 and our cosmos-sdk/x/gov module is not happy when you ask it to query past proposals.
3+
We will host those cropped down proto files and customly register the message types that we require just for querying proposals. Once there is a more reliable solution directly implemented in the cosmos-sdk/x/gov module (to support querying proposals of past message types that are no longer available), we can use that and delete those legacy codec files

0 commit comments

Comments
 (0)