forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR cosmos#5600: Migrate x/staking to Protobuf
- Loading branch information
1 parent
b0c6c75
commit 53bf227
Showing
57 changed files
with
8,796 additions
and
850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ ignore: | |
- "docs" | ||
- "*.md" | ||
- "*.rst" | ||
- "*.pb.go" | ||
- "x/**/test_common.go" | ||
- "scripts/" | ||
- "contrib" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package simapp | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/x/auth/vesting" | ||
"github.com/cosmos/cosmos-sdk/x/staking" | ||
) | ||
|
||
// AppCodec defines the application-level codec. This codec contains all the | ||
// required module-specific codecs that are to be provided upon initialization. | ||
type AppCodec struct { | ||
amino *codec.Codec | ||
|
||
Staking *staking.Codec | ||
} | ||
|
||
func NewAppCodec() *AppCodec { | ||
amino := MakeCodec() | ||
|
||
return &AppCodec{ | ||
amino: amino, | ||
Staking: staking.NewCodec(amino), | ||
} | ||
} | ||
|
||
// MakeCodec creates and returns a reference to an Amino codec that has all the | ||
// 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() *codec.Codec { | ||
var cdc = codec.New() | ||
ModuleBasics.RegisterCodec(cdc) | ||
vesting.RegisterCodec(cdc) | ||
sdk.RegisterCodec(cdc) | ||
codec.RegisterCrypto(cdc) | ||
return cdc | ||
} |
Oops, something went wrong.