Skip to content

Commit

Permalink
move package
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamer committed Mar 7, 2024
1 parent 2671d64 commit eeffcc6
Show file tree
Hide file tree
Showing 28 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ check-evm-chain-id:
@echo "note: EVM_CHAIN_ID is $(EVM_CHAIN_ID)"

update-swagger-docs: statik proto-swagger-gen
$(BINDIR)/statik -src=lite/swagger-ui -dest=lite -f -m
$(BINDIR)/statik -src=client/lite/swagger-ui -dest=lite -f -m
@if [ -n "$(git status --porcelain)" ]; then \
echo "\033[91mSwagger docs are out of sync!!!\033[0m";\
exit 1;\
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ import (

srvflags "github.com/evmos/ethermint/server/flags"

irishubante "github.com/irisnet/irishub/v2/ante"
irishubante "github.com/irisnet/irishub/v2/app/ante"
"github.com/irisnet/irishub/v2/app/keepers"
"github.com/irisnet/irishub/v2/app/params"
"github.com/irisnet/irishub/v2/lite"
"github.com/irisnet/irishub/v2/rpc"
"github.com/irisnet/irishub/v2/app/rpc"
"github.com/irisnet/irishub/v2/client/lite"
iristypes "github.com/irisnet/irishub/v2/types"
)

Expand Down Expand Up @@ -326,7 +326,7 @@ func (app *IrisApp) RegisterServices() {
}

if m.Name() == authtypes.ModuleName {
rpc.RegisterAuthServices(app.configurator,
rpc.OverrideAuthServices(app.configurator,
app.GetKey(authtypes.StoreKey),
app.AccountKeeper,
app.GetSubspace(authtypes.ModuleName))
Expand Down Expand Up @@ -371,7 +371,6 @@ func (app *IrisApp) DefaultGenesis() map[string]json.RawMessage {
}

// Init initializes the IrisApp.
//
func (app *IrisApp) Init() {
iristypes.Init(app.legacyAmino, app.interfaceRegistry)
}
Expand Down
3 changes: 1 addition & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ import (
tokentypes "github.com/irisnet/irismod/modules/token/types"
tokenv1 "github.com/irisnet/irismod/modules/token/types/v1"

"github.com/irisnet/irishub/v2/address"
guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper"
guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types"
"github.com/irisnet/irishub/v2/modules/internft"
Expand Down Expand Up @@ -240,7 +239,7 @@ func New(
appKeepers.keys[authtypes.StoreKey],
ethermint.ProtoAccount,
maccPerms,
address.Bech32PrefixAccAddr,
iristypes.Bech32PrefixAccAddr,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

Expand Down
6 changes: 4 additions & 2 deletions rpc/auth.go → app/rpc/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ type authQueryServer struct {
k authkeeper.AccountKeeper
}

func RegisterAuthServices(cfg module.Configurator,
// OverrideAuthServices overrides auth query service
func OverrideAuthServices(cfg module.Configurator,
key storetypes.StoreKey,
k authkeeper.AccountKeeper,
ls paramstypes.Subspace) {
ls paramstypes.Subspace,
) {
types.RegisterMsgServer(cfg.MsgServer(), authkeeper.NewMsgServerImpl(k))
types.RegisterQueryServer(cfg.QueryServer(), authQueryServer{key, k})

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lite/swagger.go → client/lite/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/cosmos/cosmos-sdk/client"

_ "github.com/irisnet/irishub/v2/lite/statik"
_ "github.com/irisnet/irishub/v2/client/lite/statik"
)

// RegisterSwaggerAPI registers swagger route with API Server
Expand Down
6 changes: 3 additions & 3 deletions cmd/iris/cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"bufio"
"encoding/json"
"io/ioutil"
"os"

cosmoshd "github.com/cosmos/cosmos-sdk/crypto/hd"
etherminthd "github.com/evmos/ethermint/crypto/hd"
Expand All @@ -18,7 +18,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/input"
"github.com/cosmos/cosmos-sdk/client/keys"

"github.com/irisnet/irishub/v2/keystore"
"github.com/irisnet/irishub/v2/client/keystore"
)

// Commands registers a sub-tree of commands to interact with
Expand Down Expand Up @@ -101,7 +101,7 @@ func importKeyCommand() *cobra.Command {
return err
}

bz, err := ioutil.ReadFile(args[1])
bz, err := os.ReadFile(args[1])
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/iris/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

_ "github.com/irisnet/irishub/v2/client/lite/statik"
"github.com/irisnet/irishub/v2/cmd/iris/cmd"
_ "github.com/irisnet/irishub/v2/lite/statik"
"github.com/irisnet/irishub/v2/types"
)

Expand Down
4 changes: 2 additions & 2 deletions modules/guardian/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/irisnet/irishub/v2/address"
"github.com/irisnet/irishub/v2/types"
)

// nolint: deadcode unused
Expand All @@ -24,7 +24,7 @@ var (
)

func init() {
address.ConfigureBech32Prefix()
types.ConfigureBech32Prefix()
}

// ----------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ import (
tokentypes "github.com/irisnet/irismod/modules/token/types"
tokenv1 "github.com/irisnet/irismod/modules/token/types/v1"

"github.com/irisnet/irishub/v2/address"
"github.com/irisnet/irishub/v2/lite"
"github.com/irisnet/irishub/v2/client/lite"
"github.com/irisnet/irishub/v2/modules/guardian"
guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper"
guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types"
"github.com/irisnet/irishub/v2/modules/mint"
mintkeeper "github.com/irisnet/irishub/v2/modules/mint/keeper"
minttypes "github.com/irisnet/irishub/v2/modules/mint/types"
iristypes "github.com/irisnet/irishub/v2/types"

tibcmttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer"
tibcnfttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer"
Expand Down Expand Up @@ -176,7 +176,7 @@ type SimApp struct {

func init() {
// set bech32 prefix
address.ConfigureBech32Prefix()
iristypes.ConfigureBech32Prefix()

// set coin denom regexs
sdk.SetCoinDenomRegex(DefaultCoinDenomRegex)
Expand Down Expand Up @@ -310,7 +310,7 @@ func NewSimApp(
keys[authtypes.StoreKey],
authtypes.ProtoBaseAccount,
maccPerms,
address.Bech32PrefixAccAddr,
iristypes.Bech32PrefixAccAddr,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

Expand Down Expand Up @@ -662,8 +662,8 @@ func (app *SimApp) TxConfig() client.TxConfig {
}

// DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (a *SimApp) DefaultGenesis() map[string]json.RawMessage {
return ModuleBasics.DefaultGenesis(a.AppCodec())
func (app *SimApp) DefaultGenesis() map[string]json.RawMessage {
return ModuleBasics.DefaultGenesis(app.AppCodec())
}

// AppCodec returns IrisApp's app codec.
Expand Down Expand Up @@ -750,6 +750,7 @@ func (app *SimApp) RegisterTendermintService(clientCtx client.Context) {
)
}

// RegisterNodeService registers the node gRPC service.
func (app *SimApp) RegisterNodeService(clientCtx client.Context) {
nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter())
}
Expand Down
2 changes: 1 addition & 1 deletion address/address.go → types/address.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package address
package types

import sdk "github.com/cosmos/cosmos-sdk/types"

Expand Down
4 changes: 1 addition & 3 deletions types/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (

tokentypes "github.com/irisnet/irismod/modules/token/types"
tokenv1 "github.com/irisnet/irismod/modules/token/types/v1"

"github.com/irisnet/irishub/v2/address"
)

const (
Expand All @@ -43,7 +41,7 @@ func Init(legacyAmino *codec.LegacyAmino, interfaceRegistry types.InterfaceRegis

func initApp() {
// set bech32 prefix
address.ConfigureBech32Prefix()
ConfigureBech32Prefix()

// set coin denom regexs
sdk.SetCoinDenomRegex(func() string {
Expand Down

0 comments on commit eeffcc6

Please sign in to comment.