Skip to content

Commit

Permalink
Module Import Paths (#304)
Browse files Browse the repository at this point in the history
* Update go.mod to reflect actual import path

* Reconfigure imports

* Regenerate proto files
  • Loading branch information
jackzampolin authored Mar 24, 2021
1 parent 4b4c996 commit b5e1582
Show file tree
Hide file tree
Showing 50 changed files with 511 additions and 847 deletions.
8 changes: 4 additions & 4 deletions module/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

peggyparams "github.com/althea-net/peggy/module/app/params"
"github.com/althea-net/peggy/module/x/peggy"
"github.com/althea-net/peggy/module/x/peggy/keeper"
peggytypes "github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/rpc"
Expand Down Expand Up @@ -89,6 +85,10 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
peggyparams "github.com/cosmos/gravity-bridge/module/app/params"
"github.com/cosmos/gravity-bridge/module/x/peggy"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
peggytypes "github.com/cosmos/gravity-bridge/module/x/peggy/types"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand Down
2 changes: 1 addition & 1 deletion module/app/encoding.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package app

import (
peggyparams "github.com/althea-net/peggy/module/app/params"
"github.com/cosmos/cosmos-sdk/std"
peggyparams "github.com/cosmos/gravity-bridge/module/app/params"
)

// MakeEncodingConfig creates an EncodingConfig for peggy.
Expand Down
4 changes: 2 additions & 2 deletions module/cmd/peggy/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

"github.com/althea-net/peggy/module/app"
"github.com/althea-net/peggy/module/app/params"
"github.com/cosmos/gravity-bridge/module/app"
"github.com/cosmos/gravity-bridge/module/app/params"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down
2 changes: 1 addition & 1 deletion module/cmd/peggy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/althea-net/peggy/module/cmd/peggy/cmd"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/gravity-bridge/module/cmd/peggy/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion module/contrib/local/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
done

# move proto files to the right places
cp -r github.com/althea-net/peggy/module/* ./
cp -r github.com/cosmos/gravity-bridge/module/* ./
rm -rf github.com
2 changes: 1 addition & 1 deletion module/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/althea-net/peggy/module
module github.com/cosmos/gravity-bridge/module

go 1.15

Expand Down
3 changes: 3 additions & 0 deletions module/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/cosmos/gravity-bridge/module v0.0.0-20210322173118-25d77b5f9b46 h1:XXCzKCfiWWnn6sjNISC/pv+GbfEd03bCpu0IXCnS9TA=
github.com/cosmos/gravity-bridge/module v0.0.0-20210322173118-25d77b5f9b46/go.mod h1:jEI1pLV70xW9prKdBnKroKWIpYXjcVyn4BQQcwXHs40=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
Expand Down Expand Up @@ -97,6 +99,7 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/attestation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package peggy.v1;
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";

option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// ClaimType is the cosmos type of an event from the counterpart chain that can
// be handled
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/batch.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package peggy.v1;
import "peggy/v1/attestation.proto";
// import "peggy/v1/types.proto";

option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// OutgoingTxBatch represents a batch of transactions going from Peggy to ETH
message OutgoingTxBatch {
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/ethereum_signer.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package peggy.v1;
import "gogoproto/gogo.proto";
option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// SignType defines messages that have been signed by an orchestrator
enum SignType {
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "peggy/v1/msgs.proto";
import "peggy/v1/batch.proto";
import "peggy/v1/attestation.proto";

option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// Params represent the peggy genesis and store parameters
// peggy_id:
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/msgs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package peggy.v1;
import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// Msg defines the state transitions possible within gravity
service Msg {
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/pool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package peggy.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// IDSet represents a set of IDs
message IDSet {
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "peggy/v1/batch.proto";
import "google/api/annotations.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// Query defines the gRPC querier service
service Query {
Expand Down
2 changes: 1 addition & 1 deletion module/proto/peggy/v1/types.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package peggy.v1;
option go_package = "github.com/althea-net/peggy/module/x/peggy/types";
option go_package = "github.com/cosmos/gravity-bridge/module/x/peggy/types";

// BridgeValidator represents a validator's ETH address and its power
message BridgeValidator {
Expand Down
4 changes: 2 additions & 2 deletions module/x/peggy/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package peggy
import (
"sort"

"github.com/althea-net/peggy/module/x/peggy/keeper"
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// EndBlocker is called at the end of every block
Expand Down
4 changes: 2 additions & 2 deletions module/x/peggy/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/althea-net/peggy/module/x/peggy/keeper"
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

func TestValsetCreationIfNotAvailable(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package cli
import (
"strconv"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
ethCrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/spf13/cobra"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

func GetTxCmd(storeKey string) *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"net/http"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/gorilla/mux"
)

Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/client/rest/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"net/http"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"

ethCrypto "github.com/ethereum/go-ethereum/crypto"

Expand Down
4 changes: 2 additions & 2 deletions module/x/peggy/cosmos-originated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package peggy
import (
"testing"

"github.com/althea-net/peggy/module/x/peggy/keeper"
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions module/x/peggy/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package peggy
import (
"fmt"

"github.com/althea-net/peggy/module/x/peggy/keeper"
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// NewHandler returns a handler for "Peggy" type messages.
Expand Down
4 changes: 2 additions & 2 deletions module/x/peggy/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

"github.com/althea-net/peggy/module/x/peggy/keeper"
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/keeper"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strconv"

"github.com/althea-net/peggy/module/x/peggy/types"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// TODO-JT: carefully look at atomicity of this function
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/attestation_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package keeper
import (
"fmt"

"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// AttestationHandler processes `observed` Attestations
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"strconv"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

const OutgoingTxBatchSize = 100
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/cosmos-originated.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package keeper
import (
"fmt"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

func (k Keeper) GetCosmosOriginatedDenom(ctx sdk.Context, tokenContract string) (string, bool) {
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/genesis.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package keeper

import (
"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// InitGenesis starts a chain from a genesis state
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package keeper
import (
"context"

"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

var _ types.QueryServer = Keeper{}
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"sort"
"strconv"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/tendermint/tendermint/libs/log"
)

Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"testing"

"github.com/althea-net/peggy/module/x/peggy/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"encoding/hex"
"fmt"

"github.com/althea-net/peggy/module/x/peggy/types"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

type msgServer struct {
Expand Down
2 changes: 1 addition & 1 deletion module/x/peggy/keeper/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"math/big"
"strconv"

"github.com/althea-net/peggy/module/x/peggy/types"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/gravity-bridge/module/x/peggy/types"
)

// AddToOutgoingPool
Expand Down
Loading

0 comments on commit b5e1582

Please sign in to comment.