Skip to content

Commit

Permalink
feat(epochs): revert epoch module (#198)
Browse files Browse the repository at this point in the history
* feat(api): revert add epochs api

* feat(epochs): revert porting epochs module
  • Loading branch information
0xHansLee authored and leeren committed Oct 16, 2024
1 parent 27445e8 commit c68f430
Show file tree
Hide file tree
Showing 35 changed files with 1 addition and 4,490 deletions.
6 changes: 0 additions & 6 deletions client/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (

"github.com/piplabs/story/client/app/keepers"
"github.com/piplabs/story/client/comet"
epochskeeper "github.com/piplabs/story/client/x/epochs/keeper"
evmstakingkeeper "github.com/piplabs/story/client/x/evmstaking/keeper"
mintkeeper "github.com/piplabs/story/client/x/mint/keeper"
"github.com/piplabs/story/lib/errors"
Expand Down Expand Up @@ -93,7 +92,6 @@ func newApp(
&app.Keepers.ConsensusParamsKeeper,
&app.Keepers.GovKeeper,
&app.Keepers.UpgradeKeeper,
&app.Keepers.EpochsKeeper,
&app.Keepers.EvmStakingKeeper,
&app.Keepers.EVMEngKeeper,
&app.Keepers.MintKeeper,
Expand Down Expand Up @@ -213,7 +211,3 @@ func (a App) GetUpgradeKeeper() *upgradekeeper.Keeper {
func (a App) GetMintKeeper() mintkeeper.Keeper {
return a.Keepers.MintKeeper
}

func (a App) GetEpochsKeeper() *epochskeeper.Keeper {
return a.Keepers.EpochsKeeper
}
9 changes: 0 additions & 9 deletions client/app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import (
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

epochsmodule "github.com/piplabs/story/client/x/epochs/module"
epochstypes "github.com/piplabs/story/client/x/epochs/types"
evmenginemodule "github.com/piplabs/story/client/x/evmengine/module"
evmenginetypes "github.com/piplabs/story/client/x/evmengine/types"
evmstakingmodule "github.com/piplabs/story/client/x/evmstaking/module"
Expand Down Expand Up @@ -86,7 +84,6 @@ var (
genutiltypes.ModuleName,
upgradetypes.ModuleName,
// Story modules
epochstypes.ModuleName,
evmenginetypes.ModuleName,
evmstakingtypes.ModuleName,
}
Expand All @@ -101,7 +98,6 @@ var (
// CanWithdrawInvariant invariant.
// NOTE: staking module is required if HistoricalEntries param > 0.
beginBlockers = []string{
epochstypes.ModuleName,
minttypes.ModuleName,
distrtypes.ModuleName, // Note: slashing happens after distr.BeginBlocker
slashingtypes.ModuleName,
Expand All @@ -121,7 +117,6 @@ var (
stakingtypes.BondedPoolName,
stakingtypes.NotBondedPoolName,
evmstakingtypes.ModuleName,
epochstypes.ModuleName,
}

moduleAccPerms = []*authmodulev1.ModuleAccountPermission{
Expand Down Expand Up @@ -201,10 +196,6 @@ var (
Name: upgradetypes.ModuleName,
Config: appconfig.WrapAny(&upgrademodulev1.Module{}),
},
{
Name: epochstypes.ModuleName,
Config: appconfig.WrapAny(&epochsmodule.Module{}),
},
{
Name: evmstakingtypes.ModuleName,
Config: appconfig.WrapAny(&evmstakingmodule.Module{}),
Expand Down
2 changes: 0 additions & 2 deletions client/app/keepers/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

epochskeeper "github.com/piplabs/story/client/x/epochs/keeper"
evmengkeeper "github.com/piplabs/story/client/x/evmengine/keeper"
evmstakingkeeper "github.com/piplabs/story/client/x/evmstaking/keeper"
mintkeeper "github.com/piplabs/story/client/x/mint/keeper"
Expand All @@ -36,6 +35,5 @@ type Keepers struct {
// Story
EvmStakingKeeper *evmstakingkeeper.Keeper
EVMEngKeeper *evmengkeeper.Keeper
EpochsKeeper *epochskeeper.Keeper
MintKeeper mintkeeper.Keeper
}
48 changes: 0 additions & 48 deletions client/server/epochs.go

This file was deleted.

3 changes: 0 additions & 3 deletions client/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"

epochskeeper "github.com/piplabs/story/client/x/epochs/keeper"
evmstakingkeeper "github.com/piplabs/story/client/x/evmstaking/keeper"
mintkeeper "github.com/piplabs/story/client/x/mint/keeper"
)
Expand All @@ -42,7 +41,6 @@ type Store interface {
GetDistrKeeper() distrkeeper.Keeper
GetUpgradeKeeper() *upgradekeeper.Keeper
GetMintKeeper() mintkeeper.Keeper
GetEpochsKeeper() *epochskeeper.Keeper
}

type Server struct {
Expand Down Expand Up @@ -126,7 +124,6 @@ func (s *Server) registerHandle() {
s.initStakingRoute()
s.initUpgradeRoute()
s.initMintRoute()
s.initEpochsRoute()
}

func (s *Server) createQueryContextByHeader(r *http.Request) (sdk.Context, error) {
Expand Down
195 changes: 0 additions & 195 deletions client/x/epochs/README.md

This file was deleted.

Loading

0 comments on commit c68f430

Please sign in to comment.