caelum0x 4fca2d3ccd feat(app): add production infrastructure — params, keepers, genesis, tests
Expands app/ layer to match production Cosmos chains (Xion pattern):
- app/params/: EncodingConfig, proto setup, simulation weights for all 10 modules
- app/keepers/: keeper init order docs, module account perms, wasm config
- app/genesis/: default genesis state, validation, WASM contract importer
- app/test_helpers.go: Setup(), SetupWithGenesisAccounts(), test context
- app/app_test.go: 6 app-level integration tests
- app/vulnerability_test.go: 5 security validation tests
- app/encoding.go: convenience wrapper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 23:45:14 +03:00

30 lines
894 B
Go

package params
import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/std"
"github.com/cosmos/cosmos-sdk/x/auth/tx"
)
// MakeEncodingConfig creates an EncodingConfig for ClawChain.
// This is used for testing and CLI bootstrapping before the full
// depinject-based app is constructed.
func MakeEncodingConfig() EncodingConfig {
amino := codec.NewLegacyAmino()
interfaceRegistry := codectypes.NewInterfaceRegistry()
cdc := codec.NewProtoCodec(interfaceRegistry)
txCfg := tx.NewTxConfig(cdc, tx.DefaultSignModes)
// Register the standard Cosmos SDK types (crypto, auth, etc.)
std.RegisterLegacyAminoCodec(amino)
std.RegisterInterfaces(interfaceRegistry)
return EncodingConfig{
InterfaceRegistry: interfaceRegistry,
Codec: cdc,
TxConfig: txCfg,
Amino: amino,
}
}