Skip to content

Commit a6df901

Browse files
authored
prepare pstake-v2 (#406)
1 parent b34c8b6 commit a6df901

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+431
-430
lines changed

ante/ante_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
tmrand "github.com/tendermint/tendermint/libs/rand"
1717
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
1818

19-
pstakeapp "github.com/persistenceOne/pstake-native/app"
20-
pstakehelpers "github.com/persistenceOne/pstake-native/app/helpers"
19+
pstakeapp "github.com/persistenceOne/pstake-native/v2/app"
20+
pstakehelpers "github.com/persistenceOne/pstake-native/v2/app/helpers"
2121
)
2222

2323
type IntegrationTestSuite struct {

app/app.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ import (
115115
tmos "github.com/tendermint/tendermint/libs/os"
116116
dbm "github.com/tendermint/tm-db"
117117

118-
pstakeante "github.com/persistenceOne/pstake-native/ante"
119-
pstakeappparams "github.com/persistenceOne/pstake-native/app/params"
120-
"github.com/persistenceOne/pstake-native/x/lscosmos"
121-
lscosmosclient "github.com/persistenceOne/pstake-native/x/lscosmos/client"
122-
lscosmoskeeper "github.com/persistenceOne/pstake-native/x/lscosmos/keeper"
123-
lscosmostypes "github.com/persistenceOne/pstake-native/x/lscosmos/types"
118+
pstakeante "github.com/persistenceOne/pstake-native/v2/ante"
119+
pstakeappparams "github.com/persistenceOne/pstake-native/v2/app/params"
120+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos"
121+
lscosmosclient "github.com/persistenceOne/pstake-native/v2/x/lscosmos/client"
122+
lscosmoskeeper "github.com/persistenceOne/pstake-native/v2/x/lscosmos/keeper"
123+
lscosmostypes "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
124124
)
125125

126126
var (

app/encoding.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package app
22

33
import (
4-
"github.com/persistenceOne/pstake-native/app/params"
4+
"github.com/persistenceOne/pstake-native/v2/app/params"
55

66
"github.com/cosmos/cosmos-sdk/std"
77
)

app/helpers/test_helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
tmtypes "github.com/tendermint/tendermint/types"
1717
tmdb "github.com/tendermint/tm-db"
1818

19-
"github.com/persistenceOne/pstake-native/app"
19+
"github.com/persistenceOne/pstake-native/v2/app"
2020
)
2121

2222
// SimAppChainID hardcoded chainID for simulation

app/sim_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"os"
77
"testing"
88

9-
pstake "github.com/persistenceOne/pstake-native/app"
9+
pstake "github.com/persistenceOne/pstake-native/v2/app"
1010

11-
"github.com/persistenceOne/pstake-native/app/helpers"
11+
"github.com/persistenceOne/pstake-native/v2/app/helpers"
1212
"github.com/stretchr/testify/require"
1313
"github.com/tendermint/tendermint/libs/log"
1414
"github.com/tendermint/tendermint/libs/rand"

cmd/pstaked/cmd/root.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import (
3232
"github.com/tendermint/tendermint/libs/log"
3333
dbm "github.com/tendermint/tm-db"
3434

35-
pstakeApp "github.com/persistenceOne/pstake-native/app"
36-
"github.com/persistenceOne/pstake-native/app/params"
35+
pstakeApp "github.com/persistenceOne/pstake-native/v2/app"
36+
"github.com/persistenceOne/pstake-native/v2/app/params"
3737
)
3838

3939
// NewRootCmd creates a new root command for simd. It is called once in the

cmd/pstaked/cmd/root_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
77
"github.com/stretchr/testify/require"
88

9-
app "github.com/persistenceOne/pstake-native/app"
10-
"github.com/persistenceOne/pstake-native/cmd/pstaked/cmd"
9+
app "github.com/persistenceOne/pstake-native/v2/app"
10+
"github.com/persistenceOne/pstake-native/v2/cmd/pstaked/cmd"
1111
)
1212

1313
func TestRootCmdConfig(t *testing.T) {

cmd/pstaked/cmd/testnet.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"
3737
ibcchanneltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"
3838

39-
"github.com/persistenceOne/pstake-native/app/params"
39+
"github.com/persistenceOne/pstake-native/v2/app/params"
4040
)
4141

4242
var (

cmd/pstaked/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"github.com/cosmos/cosmos-sdk/server"
77
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
88
sdkTypes "github.com/cosmos/cosmos-sdk/types"
9-
"github.com/persistenceOne/pstake-native/app"
10-
"github.com/persistenceOne/pstake-native/cmd/pstaked/cmd"
9+
"github.com/persistenceOne/pstake-native/v2/app"
10+
"github.com/persistenceOne/pstake-native/v2/cmd/pstaked/cmd"
1111
)
1212

1313
func main() {

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/persistenceOne/pstake-native
1+
module github.com/persistenceOne/pstake-native/v2
22

33
go 1.19
44

proto/pstake/lscosmos/v1beta1/genesis.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "pstake/lscosmos/v1beta1/lscosmos.proto";
77
import "pstake/lscosmos/v1beta1/governance_proposal.proto";
88
// this line is used by starport scaffolding # genesis/proto/import
99

10-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
10+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
1111

1212
// GenesisState defines the lscosmos module's genesis state.
1313
message GenesisState {

proto/pstake/lscosmos/v1beta1/governance_proposal.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
55
import "cosmos/base/v1beta1/coin.proto";
66
import "pstake/lscosmos/v1beta1/lscosmos.proto";
77

8-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
8+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
99

1010
option (gogoproto.equal_all) = true;
1111
option (gogoproto.stringer_all) = false;

proto/pstake/lscosmos/v1beta1/lscosmos.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
55
import "cosmos/base/v1beta1/coin.proto";
66
import "google/protobuf/timestamp.proto";
77

8-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
8+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
99

1010
option (gogoproto.equal_all) = true;
1111
option (gogoproto.stringer_all) = false;

proto/pstake/lscosmos/v1beta1/msgs.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "cosmos/base/v1beta1/coin.proto";
88
import "pstake/lscosmos/v1beta1/lscosmos.proto";
99

1010

11-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
11+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
1212

1313
//Msg defines the lsCosmos services.
1414
service Msg{

proto/pstake/lscosmos/v1beta1/packet.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package pstake.lscosmos.v1beta1;
33

44
// this line is used by starport scaffolding # proto/packet/import
55

6-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
6+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
77

88
message LscosmosPacketData {
99
oneof packet {

proto/pstake/lscosmos/v1beta1/params.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package pstake.lscosmos.v1beta1;
33

44
import "gogoproto/gogo.proto";
55

6-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
6+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
77

88
// Params defines the parameters for the module.
99
message Params {

proto/pstake/lscosmos/v1beta1/query.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import "cosmos/base/v1beta1/coin.proto";
1111
import "google/protobuf/timestamp.proto";
1212
// this line is used by starport scaffolding # 1
1313

14-
option go_package = "github.com/persistenceOne/pstake-native/x/lscosmos/types";
14+
option go_package = "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types";
1515

1616
// Query defines the gRPC querier service.
1717
service Query {

scripts/protocgen.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
2626
done
2727

2828
# move proto files to the right places
29-
cp -r github.com/persistenceOne/pstake-native/* ./
29+
cp -r github.com/persistenceOne/pstake-native/v2/* ./
3030
rm -rf github.com

tests/e2e/chain.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
1313
tmrand "github.com/tendermint/tendermint/libs/rand"
1414

15-
pstakeApp "github.com/persistenceOne/pstake-native/app"
16-
"github.com/persistenceOne/pstake-native/app/params"
15+
pstakeApp "github.com/persistenceOne/pstake-native/v2/app"
16+
"github.com/persistenceOne/pstake-native/v2/app/params"
1717
)
1818

1919
const (

tests/e2e/validator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/tendermint/tendermint/p2p"
2525
"github.com/tendermint/tendermint/privval"
2626

27-
pstake "github.com/persistenceOne/pstake-native/app"
27+
pstake "github.com/persistenceOne/pstake-native/v2/app"
2828
)
2929

3030
type validator struct {

x/lscosmos/client/cli/query.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
sdk "github.com/cosmos/cosmos-sdk/types"
1111
"github.com/spf13/cobra"
1212

13-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
13+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1414
)
1515

1616
// GetQueryCmd returns the cli query commands for this module

x/lscosmos/client/cli/query_params.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/cosmos/cosmos-sdk/client"
77
"github.com/cosmos/cosmos-sdk/client/flags"
8-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
8+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
99
"github.com/spf13/cobra"
1010
)
1111

x/lscosmos/client/cli/tx.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
1313
"github.com/spf13/cobra"
1414

15-
"github.com/persistenceOne/pstake-native/x/lscosmos/client/utils"
16-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
15+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/client/utils"
16+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1717
)
1818

1919
// GetTxCmd returns the transaction commands for this module

x/lscosmos/client/proposal_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
99
govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest"
1010

11-
"github.com/persistenceOne/pstake-native/x/lscosmos/client/cli"
11+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/client/cli"
1212
)
1313

1414
var (

x/lscosmos/client/utils/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/cosmos/cosmos-sdk/codec"
77

8-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
8+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
99
)
1010

1111
// RegisterHostChainProposalJSON defines a RegisterHostChainParamsProposal JSON input to be parsed

x/lscosmos/client/utils/utils_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
sdk "github.com/cosmos/cosmos-sdk/types"
77
"github.com/stretchr/testify/require"
88

9-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
9+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1010
)
1111

1212
func TestNewRegisterChainJSON(t *testing.T) {

x/lscosmos/genesis.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package lscosmos
33
import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55
host "github.com/cosmos/ibc-go/v4/modules/core/24-host"
6-
"github.com/persistenceOne/pstake-native/x/lscosmos/keeper"
7-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
6+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/keeper"
7+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
88
)
99

1010
// InitGenesis initializes the capability module's state from a provided genesis

x/lscosmos/genesis_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55

66
"github.com/stretchr/testify/require"
77

8-
"github.com/persistenceOne/pstake-native/app/helpers"
9-
"github.com/persistenceOne/pstake-native/x/lscosmos"
10-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
8+
"github.com/persistenceOne/pstake-native/v2/app/helpers"
9+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos"
10+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1111
)
1212

1313
func TestGenesis(t *testing.T) {

x/lscosmos/handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
sdk "github.com/cosmos/cosmos-sdk/types"
77
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
88

9-
"github.com/persistenceOne/pstake-native/x/lscosmos/keeper"
10-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
9+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/keeper"
10+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1111
)
1212

1313
func NewHandler(k keeper.Keeper) sdk.Handler {

x/lscosmos/keeper/abci.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"
99
"github.com/persistenceOne/persistence-sdk/v2/utils"
1010

11-
lscosmostypes "github.com/persistenceOne/pstake-native/x/lscosmos/types"
11+
lscosmostypes "github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1212
)
1313

1414
// BeginBlock will use utils.ApplyFuncIfNoError to apply the changes made by the functions

x/lscosmos/keeper/allowlisted_validators.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper
33
import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55

6-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
6+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
77
)
88

99
// SetAllowListedValidators sets allowlisted validator set

x/lscosmos/keeper/allowlisted_validators_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package keeper_test
22

33
import (
4-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
4+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
55
)
66

77
func (suite *IntegrationTestSuite) TestAllowListedValidators() {

x/lscosmos/keeper/c_value.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
66

7-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
7+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
88
)
99

1010
// GetMintedAmount gets minted amount

x/lscosmos/keeper/c_value_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
66

7-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
7+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
88
)
99

1010
func (suite *IntegrationTestSuite) TestCValue() {

x/lscosmos/keeper/delegation_state.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
sdk "github.com/cosmos/cosmos-sdk/types"
77
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
88

9-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
9+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1010
)
1111

1212
// SetDelegationState sets the delegation state in store

x/lscosmos/keeper/delegation_state_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper_test
33
import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55

6-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
6+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
77
)
88

99
func (suite *IntegrationTestSuite) TestDelegationState() {

x/lscosmos/keeper/delegation_strategy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
88
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
99

10-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
10+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1111
)
1212

1313
// DelegateMsgs gives the list of Delegate Txs to be executed based on the current state and params.

x/lscosmos/keeper/delegation_strategy_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/cosmos/cosmos-sdk/types/bech32"
1212
"github.com/stretchr/testify/assert"
1313

14-
"github.com/persistenceOne/pstake-native/x/lscosmos/keeper"
15-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
14+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/keeper"
15+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1616
)
1717

1818
var HostStakingDenom = "uatom"

x/lscosmos/keeper/delegator_unbonding_epoch_entry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package keeper
22

33
import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
5-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
5+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
66
)
77

88
// SetDelegatorUnbondingEpochEntry sets delegator entry for unbondign stkatom for an unbonding epoch

x/lscosmos/keeper/delegator_unbonding_epoch_entry_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper_test
33
import (
44
sdk "github.com/cosmos/cosmos-sdk/types"
55

6-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
6+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
77
)
88

99
func (suite *IntegrationTestSuite) TestKVStore() {

x/lscosmos/keeper/governance_proposal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
ibcporttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types"
1111
host "github.com/cosmos/ibc-go/v4/modules/core/24-host"
1212

13-
"github.com/persistenceOne/pstake-native/x/lscosmos/types"
13+
"github.com/persistenceOne/pstake-native/v2/x/lscosmos/types"
1414
)
1515

1616
// HandleRegisterHostChainProposal performs the writes host chain params.

0 commit comments

Comments
 (0)