* 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>
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package std
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
"github.com/cosmos/cosmos-sdk/codec/types"
|
|
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
|
)
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// necessary types and interfaces registered. This codec is provided to all the
|
|
// modules the application depends on.
|
|
//
|
|
// NOTE: This codec will be deprecated in favor of AppCodec once all modules are
|
|
// migrated.
|
|
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)
|
|
}
|
|
|
|
// RegisterInterfaces registers Interfaces from sdk/types and vesting
|
|
func RegisterInterfaces(interfaceRegistry types.InterfaceRegistry) {
|
|
sdk.RegisterInterfaces(interfaceRegistry)
|
|
vesting.RegisterInterfaces(interfaceRegistry)
|
|
}
|