* clear

* feat: Add everything

* fix: Commenht
This commit is contained in:
Prad Nukala
2025-10-03 14:45:52 -04:00
committed by GitHub
parent 43b4a11c06
commit 13e6c3e84d
1935 changed files with 655061 additions and 40058 deletions
Regular → Executable
+35 -6
View File
@@ -3,6 +3,7 @@ package module
import (
"os"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
@@ -15,18 +16,24 @@ import (
"cosmossdk.io/core/store"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
modulev1 "github.com/sonr-io/snrd/api/dwn/module/v1"
"github.com/sonr-io/snrd/x/dwn/keeper"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
modulev1 "github.com/sonr-io/sonr/api/dwn/module/v1"
didkeeper "github.com/sonr-io/sonr/x/did/keeper"
"github.com/sonr-io/sonr/x/dwn/keeper"
svckeeper "github.com/sonr-io/sonr/x/svc/keeper"
)
var _ appmodule.AppModule = AppModule{}
// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (am AppModule) IsOnePerModuleType() {}
func (a AppModule) IsOnePerModuleType() {}
// IsAppModule implements the appmodule.AppModule interface.
func (am AppModule) IsAppModule() {}
func (a AppModule) IsAppModule() {}
func init() {
appmodule.Register(
@@ -42,8 +49,13 @@ type ModuleInputs struct {
StoreService store.KVStoreService
AddressCodec address.Codec
StakingKeeper stakingkeeper.Keeper
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
FeegrantKeeper feegrantkeeper.Keeper
DIDKeeper didkeeper.Keeper
ServiceKeeper svckeeper.Keeper
}
type ModuleOutputs struct {
@@ -56,7 +68,24 @@ type ModuleOutputs struct {
func ProvideModule(in ModuleInputs) ModuleOutputs {
govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String()
k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr)
// Create a default client context for transaction building
// Note: TxConfig will need to be set when available in the app initialization
clientCtx := client.Context{}
clientCtx = clientCtx.WithCodec(in.Cdc)
k := keeper.NewKeeper(
in.Cdc,
in.StoreService,
log.NewLogger(os.Stderr),
govAddr,
in.AccountKeeper,
in.BankKeeper,
in.FeegrantKeeper,
in.StakingKeeper,
in.DIDKeeper,
in.ServiceKeeper,
clientCtx,
)
m := NewAppModule(in.Cdc, k)
return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}}