Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reorganize repo structure #19

Merged
merged 1 commit into from
Oct 30, 2024
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build:
@echo "✅ Completed build!"

###############################################################################
### Formatting & Linting ###
### Tooling ###
###############################################################################

gofumpt_cmd=mvdan.cc/gofumpt
Expand Down Expand Up @@ -60,7 +60,7 @@ proto-lint:

local-image:
@echo "🤖 Building image..."
@heighliner build --chain noble-forwarding-simd --file ./chains.yaml --local 1> /dev/null
@heighliner build --chain noble-forwarding-simd --file e2e/chains.yaml --local 1> /dev/null
@echo "✅ Completed build!"

test: test-e2e
Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/ante.go → ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

// SigVerificationGasConsumer is a wrapper around the default provided by the
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 x/forwarding/client/cli/query.go → client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/gogoproto/proto"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/client/cli/tx.go → client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
"github.com/spf13/cobra"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion e2e/forwarding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/cosmos/gogoproto/jsonpb"
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
"github.com/icza/dyno"
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
forwardingtypes "github.com/noble-assets/forwarding/v2/types"
"github.com/strangelove-ventures/interchaintest/v8"
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v8/ibc"
Expand Down
4 changes: 2 additions & 2 deletions x/forwarding/genesis.go → genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/keeper"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/keeper"
"github.com/noble-assets/forwarding/v2/types"
)

func InitGenesis(ctx context.Context, k *keeper.Keeper, genesis types.GenesisState) {
Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/keeper/keeper.go → keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

type Keeper struct {
Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/keeper/migrations.go → keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
"github.com/cosmos/cosmos-sdk/runtime"
sdk "github.com/cosmos/cosmos-sdk/types"
v1 "github.com/noble-assets/forwarding/v2/x/forwarding/migrations/v1"
v1 "github.com/noble-assets/forwarding/v2/migrations/v1"
)

// Migrator is a struct for handling in-place store migrations.
Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/keeper/msg_server.go → keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

var _ types.MsgServer = &Keeper{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
errorstypes "github.com/cosmos/cosmos-sdk/types/errors"
transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

var _ types.QueryServer = &Keeper{}
Expand Down
2 changes: 1 addition & 1 deletion x/forwarding/keeper/state.go → keeper/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

// PERSISTENT STATE
Expand Down
4 changes: 2 additions & 2 deletions x/forwarding/middleware.go → middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
"github.com/cosmos/ibc-go/v8/modules/core/exported"
"github.com/noble-assets/forwarding/v2/x/forwarding/keeper"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/keeper"
"github.com/noble-assets/forwarding/v2/types"
)

var _ porttypes.IBCModule = &Middleware{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"cosmossdk.io/store/prefix"
storetypes "cosmossdk.io/store/types"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2/types"
)

// GetAllNumOfAccounts implements adapted legacy store logic from version 1.
Expand Down
16 changes: 8 additions & 8 deletions x/forwarding/module.go → module.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
modulev1 "github.com/noble-assets/forwarding/v2/api/noble/forwarding/module/v1"
forwardingv1 "github.com/noble-assets/forwarding/v2/api/noble/forwarding/v1"
"github.com/noble-assets/forwarding/v2/x/forwarding/client/cli"
"github.com/noble-assets/forwarding/v2/x/forwarding/keeper"
"github.com/noble-assets/forwarding/v2/x/forwarding/types"
modulev1 "github.com/noble-assets/forwarding/v2/api/module/v1"
forwardingv1 "github.com/noble-assets/forwarding/v2/api/v1"
"github.com/noble-assets/forwarding/v2/client/cli"
"github.com/noble-assets/forwarding/v2/keeper"
"github.com/noble-assets/forwarding/v2/types"
"github.com/spf13/cobra"
)

// ConsensusVersion defines the current x/forwarding module consensus version.
// ConsensusVersion defines the current Forwarding module consensus version.
const ConsensusVersion = 2

var (
Expand Down Expand Up @@ -122,7 +122,7 @@ func (m AppModule) RegisterServices(cfg module.Configurator) {

migrator := keeper.NewMigrator(m.keeper)
if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.Migrate1to2); err != nil {
panic(fmt.Sprintf("failed to migrate x/forwarding from version 1 to 2: %v", err))
panic(fmt.Sprintf("failed to migrate Forwarding from version 1 to 2: %v", err))
}
}

Expand Down Expand Up @@ -242,7 +242,7 @@ type ModuleOutputs struct {

func ProvideModule(in ModuleInputs) ModuleOutputs {
if in.Config.Authority == "" {
panic("authority for x/forwarding module must be set")
panic("authority for Forwarding module must be set")
}

authority := authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
Expand Down
3 changes: 3 additions & 0 deletions proto/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ buf generate --template buf.gen.pulsar.yaml
cd ..

cp -r github.com/noble-assets/forwarding/v2/* ./
cp -r api/noble/forwarding/* api/

rm -rf github.com
rm -rf api/noble
rm -rf noble
2 changes: 1 addition & 1 deletion proto/noble/forwarding/module/v1/module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "cosmos/app/v1alpha1/module.proto";

// Module is the config object of the Forwarding module.
message Module {
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/noble-assets/forwarding/v2/x/forwarding"};
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/noble-assets/forwarding/v2"};

// authority defines the custom module authority.
string authority = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "cosmos/auth/v1beta1/auth.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

message ForwardingAccount {
option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI";
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package noble.forwarding.v1;

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

// AccountRegistered is emitted whenever a new forwarding account is registered.
message AccountRegistered {
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package noble.forwarding.v1;

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

message GenesisState {
repeated string allowed_denoms = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/packet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package noble.forwarding.v1;

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

message RegisterAccountData {
string recipient = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

service Query {
rpc Denoms(QueryDenoms) returns (QueryDenomsResponse) {
Expand Down
2 changes: 1 addition & 1 deletion proto/noble/forwarding/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/noble-assets/forwarding/v2/x/forwarding/types";
option go_package = "github.com/noble-assets/forwarding/v2/types";

service Msg {
option (cosmos.msg.v1.service) = true;
Expand Down
4 changes: 2 additions & 2 deletions simapp/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
errorstypes "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/noble-assets/forwarding/v2/x/forwarding"
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
"github.com/noble-assets/forwarding/v2"
forwardingtypes "github.com/noble-assets/forwarding/v2/types"
)

type BankKeeper interface {
Expand Down
4 changes: 2 additions & 2 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
_ "github.com/cosmos/cosmos-sdk/x/consensus"
_ "github.com/cosmos/cosmos-sdk/x/params"
_ "github.com/cosmos/cosmos-sdk/x/staking"
"github.com/noble-assets/forwarding/v2/x/forwarding"
"github.com/noble-assets/forwarding/v2"

// Cosmos Modules
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
Expand All @@ -44,7 +44,7 @@ import (
transferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
// Custom Modules
forwardingkeeper "github.com/noble-assets/forwarding/v2/x/forwarding/keeper"
forwardingkeeper "github.com/noble-assets/forwarding/v2/keeper"
)

var DefaultNodeHome string
Expand Down
2 changes: 1 addition & 1 deletion simapp/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
"github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
"github.com/noble-assets/forwarding/v2/x/forwarding"
"github.com/noble-assets/forwarding/v2"
)

func (app *SimApp) RegisterLegacyModules() error {
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.
48 changes: 24 additions & 24 deletions x/forwarding/types/account.pb.go → types/account.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading