Migrate x/auth cmd's to TxGenerator marshaling (#6391)
* Migrate encode, decode, and broadcast cmd's to use TxGenerator marshal methods * Fix tests, add EncodingConfig * Add simapp/encoding.go and wire up with simcli * add godocs * fix tests * Debugging CLI Tests * Fix integration test * 6391 - lint issues and code coverage (#6414) * fixed lint issue of "txEncodeRespStr" * added tests for encode.go * WIP: added tests for decode.go * added txEncoder at bytes * updated decode test * updated txBytes to use TxEncoder in decoder test * added a require after TxEncoder * removed file save * debug decode command * fixed decode tests * added decode cli * updated encode and decode in a single file * separated decode test from encode test * review changes * removed register interface * review change * Fix tests * WIP add test for tx sign * removed commented code * Fix flags * WIP add test for sign * Address review suggestions * fixed command issue * Add tests for TxEncoder * Revert sign changes * Fix TxEncoder tests * Fix GetSign Cmd * Add tx test * Remove duplicate validation * Add tests for TxDecoder * Fix tests * Fix tests * Output to clientCtx.Output * Fix cli_tests Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com> Co-authored-by: atheesh <atheesh@vitwit.com> Co-authored-by: anilCSE <anil@vitwit.com> Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
atheeshp
atheesh
anilCSE
sahith-narahari
mergify[bot]
parent
5040ff87c4
commit
712d23740f
+6
-18
@@ -9,22 +9,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
||||
)
|
||||
|
||||
// Codec defines the application-level codec. This codec contains all the
|
||||
// required module-specific codecs that are to be provided upon initialization.
|
||||
type Codec struct {
|
||||
codec.Marshaler
|
||||
|
||||
// Keep reference to the amino codec to allow backwards compatibility along
|
||||
// with type, and interface registration.
|
||||
amino *codec.Codec
|
||||
|
||||
anyUnpacker types.AnyUnpacker
|
||||
}
|
||||
|
||||
func NewAppCodec(amino *codec.Codec, anyUnpacker types.AnyUnpacker) *Codec {
|
||||
return &Codec{Marshaler: codec.NewHybridCodec(amino, anyUnpacker), amino: amino, anyUnpacker: anyUnpacker}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// necessary types and interfaces registered. This codec is provided to all the
|
||||
// modules the application depends on.
|
||||
@@ -35,11 +19,15 @@ func MakeCodec(bm module.BasicManager) *codec.Codec {
|
||||
cdc := codec.New()
|
||||
|
||||
bm.RegisterCodec(cdc)
|
||||
RegisterCodec(cdc)
|
||||
|
||||
return cdc
|
||||
}
|
||||
|
||||
func RegisterCodec(cdc *codec.Codec) {
|
||||
vesting.RegisterCodec(cdc)
|
||||
sdk.RegisterCodec(cdc)
|
||||
cryptocodec.RegisterCrypto(cdc)
|
||||
|
||||
return cdc
|
||||
}
|
||||
|
||||
// RegisterInterfaces registers Interfaces from sdk/types and vesting
|
||||
|
||||
Reference in New Issue
Block a user