-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from aljo242/chore/remove-ignite-dependency
refactor: remove ignite dependency
- Loading branch information
Showing
13 changed files
with
790 additions
and
826 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
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 cmd | ||
|
||
import ( | ||
abci "github.com/tendermint/tendermint/abci/types" | ||
|
||
"github.com/cosmos/cosmos-sdk/codec" | ||
"github.com/cosmos/cosmos-sdk/server/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// CosmosApp implements the common methods for a Cosmos SDK-based application | ||
// specific blockchain. | ||
type CosmosApp interface { | ||
// Name is the assigned name of the app. | ||
Name() string | ||
|
||
// The application types codec. | ||
// NOTE: This should be sealed before being returned. | ||
LegacyAmino() *codec.LegacyAmino | ||
|
||
// BeginBlocker updates every begin block. | ||
BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock | ||
|
||
// EndBlocker updates every end block. | ||
EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock | ||
|
||
// InitChainer updates at chain (i.e app) initialization. | ||
InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain | ||
|
||
// LoadHeight loads the app at a given height. | ||
LoadHeight(height int64) error | ||
|
||
// ExportAppStateAndValidators exports the state of the application for a genesis file. | ||
ExportAppStateAndValidators( | ||
forZeroHeight bool, jailAllowedAddrs []string, | ||
) (types.ExportedApp, error) | ||
|
||
// ModuleAccountAddrs are registered module account addreses. | ||
ModuleAccountAddrs() map[string]bool | ||
} |
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,44 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
"github.com/cosmos/cosmos-sdk/codec/types" | ||
"github.com/cosmos/cosmos-sdk/std" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
"github.com/cosmos/cosmos-sdk/x/auth/tx" | ||
) | ||
|
||
// EncodingConfig specifies the concrete encoding types to use for a given app. | ||
// This is provided for compatibility between protobuf and amino implementations. | ||
type EncodingConfig struct { | ||
InterfaceRegistry types.InterfaceRegistry | ||
Marshaler codec.Codec | ||
TxConfig client.TxConfig | ||
Amino *codec.LegacyAmino | ||
} | ||
|
||
// makeEncodingConfig creates an EncodingConfig for an amino based test configuration. | ||
func makeEncodingConfig() EncodingConfig { | ||
amino := codec.NewLegacyAmino() | ||
interfaceRegistry := types.NewInterfaceRegistry() | ||
marshaler := codec.NewProtoCodec(interfaceRegistry) | ||
txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) | ||
|
||
return EncodingConfig{ | ||
InterfaceRegistry: interfaceRegistry, | ||
Marshaler: marshaler, | ||
TxConfig: txCfg, | ||
Amino: amino, | ||
} | ||
} | ||
|
||
// MakeEncodingConfig creates an EncodingConfig for testing | ||
func MakeEncodingConfig(moduleBasics module.BasicManager) EncodingConfig { | ||
encodingConfig := makeEncodingConfig() | ||
std.RegisterLegacyAminoCodec(encodingConfig.Amino) | ||
std.RegisterInterfaces(encodingConfig.InterfaceRegistry) | ||
moduleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) | ||
moduleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) | ||
return encodingConfig | ||
} |
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
Oops, something went wrong.