Skip to content

Commit

Permalink
Merge pull request #137 from e-money/136-inflation
Browse files Browse the repository at this point in the history
136 Stop using internal package
  • Loading branch information
haasted authored Sep 21, 2021
2 parents 5fc1176 + 77e5bac commit e8c9f57
Show file tree
Hide file tree
Showing 33 changed files with 159 additions and 110 deletions.
2 changes: 1 addition & 1 deletion proto/em/inflation/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "em/inflation/v1/inflation.proto";

option go_package = "github.com/e-money/em-ledger/x/inflation/internal/types";
option go_package = "github.com/e-money/em-ledger/x/inflation/types";

message GenesisState {
// todo (reviewer): yaml naming is a bit inconsistent. state contains assets
Expand Down
2 changes: 1 addition & 1 deletion proto/em/inflation/v1/inflation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/e-money/em-ledger/x/inflation/internal/types";
option go_package = "github.com/e-money/em-ledger/x/inflation/types";

message InflationAsset {
string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ];
Expand Down
2 changes: 1 addition & 1 deletion proto/em/inflation/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "cosmos/base/v1beta1/coin.proto";
import "google/api/annotations.proto";
import "em/inflation/v1/inflation.proto";

option go_package = "github.com/e-money/em-ledger/x/inflation/internal/types";
option go_package = "github.com/e-money/em-ledger/x/inflation/types";

service Query {
rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) {
Expand Down
10 changes: 9 additions & 1 deletion x/authority/types/query.pb.gw.go

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

10 changes: 9 additions & 1 deletion x/buyback/internal/types/query.pb.gw.go

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

6 changes: 2 additions & 4 deletions x/inflation/accrual.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ package inflation
import (
"time"

"github.com/e-money/em-ledger/util"

"github.com/e-money/em-ledger/x/inflation/internal/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/util"
"github.com/e-money/em-ledger/x/inflation/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions x/inflation/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package inflation

import (
"github.com/e-money/em-ledger/x/inflation/internal/keeper"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/keeper"
"github.com/e-money/em-ledger/x/inflation/types"
)

const (
Expand Down
4 changes: 1 addition & 3 deletions x/inflation/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ package cli
import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"

"github.com/e-money/em-ledger/x/inflation/internal/types"

"github.com/e-money/em-ledger/x/inflation/types"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion x/inflation/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/types"
"net/http"
)

Expand Down
2 changes: 1 addition & 1 deletion x/inflation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package inflation

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/types"
)

// NewGenesisState creates a new GenesisState object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package keeper

import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package keeper

import (
"testing"
"time"

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
"time"
)

func TestQueryInflation(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ package keeper

import (
"fmt"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/tendermint/tendermint/libs/log"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/e-money/em-ledger/x/inflation/types"
"github.com/tendermint/tendermint/libs/log"
)

type Keeper struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ package keeper

import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/e-money/em-ledger/x/inflation/types"
abci "github.com/tendermint/tendermint/abci/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
)

// NewQuerier returns an inflation Querier handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ package keeper
import (
"testing"

"github.com/e-money/em-ledger/x/inflation/types"
"github.com/stretchr/testify/require"

"github.com/e-money/em-ledger/x/inflation/internal/types"
abci "github.com/tendermint/tendermint/abci/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
package keeper

import (
"testing"
"time"

"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
Expand All @@ -22,13 +25,11 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/types"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"
"testing"
"time"
)

type testInput struct {
Expand Down
5 changes: 3 additions & 2 deletions x/inflation/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import (
"context"
"encoding/json"
"fmt"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/e-money/em-ledger/x/inflation/client/cli"
"github.com/e-money/em-ledger/x/inflation/client/rest"
"github.com/e-money/em-ledger/x/inflation/internal/keeper"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/keeper"
"github.com/e-money/em-ledger/x/inflation/types"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
Expand Down
4 changes: 2 additions & 2 deletions x/inflation/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/e-money/em-ledger/x/inflation/internal/keeper"
"github.com/e-money/em-ledger/x/inflation/internal/types"
"github.com/e-money/em-ledger/x/inflation/keeper"
"github.com/e-money/em-ledger/x/inflation/types"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

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

Loading

0 comments on commit e8c9f57

Please sign in to comment.