From a4fc49e624389b87f69215be378ee46dcc7e7fff Mon Sep 17 00:00:00 2001 From: C H Date: Tue, 8 Oct 2024 14:26:23 +0800 Subject: [PATCH] Added tendermint liquidity types for backward compatibility --- go.mod | 2 ++ go.sum | 4 ++-- x/liquidity/types/codec.go | 5 +++++ x/liquidity/types/tx.pb.go | 9 --------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index ca0135a3..962aa092 100644 --- a/go.mod +++ b/go.mod @@ -212,6 +212,8 @@ replace ( github.com/cometbft/cometbft => github.com/cybercongress/cometbft v0.0.0-20240916132818-b1b2957d11a5 + github.com/cosmos/cosmos-sdk => github.com/cybercongress/cosmos-sdk v0.47.13-0.20241008061625-08d0bd3fa2c4 + // support concurrency for iavl github.com/cosmos/iavl => github.com/cosmos/iavl v0.20.1 diff --git a/go.sum b/go.sum index 66a64214..c566af45 100644 --- a/go.sum +++ b/go.sum @@ -342,8 +342,6 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.47.12 h1:KOZHAVWrcilHywBN/FabBaXbDFMzoFmtdX0hqy5Ory8= -github.com/cosmos/cosmos-sdk v0.47.12/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -378,6 +376,8 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cybercongress/cometbft v0.0.0-20240916132818-b1b2957d11a5 h1:ArxyxNeZWGLIJ/UR3k9u2G/+fXJXjp1RPdAF47YjGVQ= github.com/cybercongress/cometbft v0.0.0-20240916132818-b1b2957d11a5/go.mod h1:gFGCFXNGDci6tMLemANPGTfU+j4+oH63PjeLe0iIjJk= +github.com/cybercongress/cosmos-sdk v0.47.13-0.20241008061625-08d0bd3fa2c4 h1:Tv3yYCNqv6zBlzw/+y3ES7AjRXKPdRNnEv6zy8TePJA= +github.com/cybercongress/cosmos-sdk v0.47.13-0.20241008061625-08d0bd3fa2c4/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= diff --git a/x/liquidity/types/codec.go b/x/liquidity/types/codec.go index df9096fb..e27ac1b2 100644 --- a/x/liquidity/types/codec.go +++ b/x/liquidity/types/codec.go @@ -20,6 +20,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterfaces registers the x/liquidity interface types with the // interface registry func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterCustomTypeURL((*sdk.Msg)(nil), "/tendermint.liquidity.v1beta1.MsgCreatePool", &MsgCreatePool{}) + registry.RegisterCustomTypeURL((*sdk.Msg)(nil), "/tendermint.liquidity.v1beta1.MsgDepositWithinBatch", &MsgDepositWithinBatch{}) + registry.RegisterCustomTypeURL((*sdk.Msg)(nil), "/tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch", &MsgWithdrawWithinBatch{}) + registry.RegisterCustomTypeURL((*sdk.Msg)(nil), "/tendermint.liquidity.v1beta1.MsgSwapWithinBatch", &MsgSwapWithinBatch{}) + registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreatePool{}, &MsgDepositWithinBatch{}, diff --git a/x/liquidity/types/tx.pb.go b/x/liquidity/types/tx.pb.go index e680a3c1..76e6d4c6 100644 --- a/x/liquidity/types/tx.pb.go +++ b/x/liquidity/types/tx.pb.go @@ -445,15 +445,6 @@ func init() { proto.RegisterType((*MsgWithdrawWithinBatchResponse)(nil), "cyber.liquidity.v1beta1.MsgWithdrawWithinBatchResponse") proto.RegisterType((*MsgSwapWithinBatch)(nil), "cyber.liquidity.v1beta1.MsgSwapWithinBatch") proto.RegisterType((*MsgSwapWithinBatchResponse)(nil), "cyber.liquidity.v1beta1.MsgSwapWithinBatchResponse") - - proto.RegisterType((*MsgCreatePool)(nil), "tendermint.liquidity.v1beta1.MsgCreatePool") - proto.RegisterType((*MsgCreatePoolResponse)(nil), "tendermint.liquidity.v1beta1.MsgCreatePoolResponse") - proto.RegisterType((*MsgDepositWithinBatch)(nil), "tendermint.liquidity.v1beta1.MsgDepositWithinBatch") - proto.RegisterType((*MsgDepositWithinBatchResponse)(nil), "tendermint.liquidity.v1beta1.MsgDepositWithinBatchResponse") - proto.RegisterType((*MsgWithdrawWithinBatch)(nil), "tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch") - proto.RegisterType((*MsgWithdrawWithinBatchResponse)(nil), "tendermint.liquidity.v1beta1.MsgWithdrawWithinBatchResponse") - proto.RegisterType((*MsgSwapWithinBatch)(nil), "tendermint.liquidity.v1beta1.MsgSwapWithinBatch") - proto.RegisterType((*MsgSwapWithinBatchResponse)(nil), "tendermint.liquidity.v1beta1.MsgSwapWithinBatchResponse") } func init() { proto.RegisterFile("cyber/liquidity/v1beta1/tx.proto", fileDescriptor_d6c6519f5f802cc0) }