[rosetta] implement balance tracking and redo tx construction (#8729)

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
This commit is contained in:
Frojdi Dymylja
2021-03-11 15:01:29 +00:00
committed by GitHub
co-authored by Alessio Treglia Robert Zaremba
parent 280ee4f15e
commit 288f8dda4b
23 changed files with 1637 additions and 1453 deletions
+9 -2
View File
@@ -5,6 +5,13 @@ import (
"github.com/cosmos/cosmos-sdk/codec/types"
)
const (
// MsgInterfaceProtoName defines the protobuf name of the cosmos Msg interface
MsgInterfaceProtoName = "cosmos.base.v1beta1.Msg"
// ServiceMsgInterfaceProtoName defines the protobuf name of the cosmos MsgRequest interface
ServiceMsgInterfaceProtoName = "cosmos.base.v1beta1.ServiceMsg"
)
// RegisterLegacyAminoCodec registers the sdk message type.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterInterface((*Msg)(nil), nil)
@@ -13,8 +20,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
// RegisterInterfaces registers the sdk message type.
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterInterface("cosmos.base.v1beta1.Msg", (*Msg)(nil))
registry.RegisterInterface(MsgInterfaceProtoName, (*Msg)(nil))
// the interface name for MsgRequest is ServiceMsg because this is most useful for clients
// to understand - it will be the way for clients to introspect on available Msg service methods
registry.RegisterInterface("cosmos.base.v1beta1.ServiceMsg", (*MsgRequest)(nil))
registry.RegisterInterface(ServiceMsgInterfaceProtoName, (*MsgRequest)(nil))
}