Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion types/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ package module

import (
"encoding/json"
"fmt"
"time"

abci "github.com/tendermint/tendermint/abci/types"

"github.com/pokt-network/pocket-core/codec"
sdk "github.com/pokt-network/pocket-core/types"
abci "github.com/tendermint/tendermint/abci/types"
)

// __________________________________________________________________________________________
Expand Down Expand Up @@ -264,7 +266,14 @@ func (m *Manager) InitGenesis(ctx sdk.Ctx, genesisData map[string]json.RawMessag
func (m *Manager) ExportGenesis(ctx sdk.Ctx) map[string]json.RawMessage {
genesisData := make(map[string]json.RawMessage)
for _, moduleName := range m.OrderExportGenesis {
if moduleName == "auth" {
continue
}
fmt.Println("OLSH HERE")
fmt.Println(moduleName)
// fmt.Println(m.Modules[moduleName])
genesisData[moduleName] = m.Modules[moduleName].ExportGenesis(ctx)
fmt.Println("AFTER")
}
return genesisData
}
Expand Down
6 changes: 5 additions & 1 deletion x/auth/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ package auth

import (
"fmt"
"log"

sdk "github.com/pokt-network/pocket-core/types"
"github.com/pokt-network/pocket-core/x/auth/keeper"
"github.com/pokt-network/pocket-core/x/auth/types"
"log"
)

// ExportGenesis returns a GenesisState for a given context and keeper
func ExportGenesis(ctx sdk.Ctx, k keeper.Keeper) types.GenesisState {
params := k.GetParams(ctx)
accounts := k.GetAllAccountsExport(ctx)
supply := k.GetSupply(ctx)
fmt.Println("~~~")
fmt.Println(params, "---", accounts, "---", supply)
fmt.Println("~~~")
return types.NewGenesisState(params, accounts, supply.GetTotal())
}

Expand Down