codec

package
v0.50.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 0 Imported by: 65

Documentation

Overview

Package codec provides a singleton instance of Amino codec that should be used to register any concrete type that can later be referenced inside a MsgSubmitProposal instance so that they can be (de)serialized properly.

Amino types should be ideally registered inside this codec within the init function of each module's codec.go file as follows:

func init() {
	// ...

	RegisterLegacyAminoCodec(govcodec.Amino)
RegisterLegacyAminoCodec(groupcodec.Amino)

}

The codec instance is put inside this package and not the x/gov/types package in order to avoid any dependency cycle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL