Skip to content

Commit

Permalink
Add v3 package versioning to stride module (#350)
Browse files Browse the repository at this point in the history
Co-authored-by: Son Trinh <[email protected]>
  • Loading branch information
hieuvubk and Son Trinh authored Nov 18, 2022
1 parent 78fd819 commit 0dbbbd8
Show file tree
Hide file tree
Showing 324 changed files with 688 additions and 621 deletions.
54 changes: 27 additions & 27 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"

"github.com/Stride-Labs/stride/utils"
"github.com/Stride-Labs/stride/v3/utils"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -57,12 +57,12 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

claimvesting "github.com/Stride-Labs/stride/x/claim/vesting"
claimvestingtypes "github.com/Stride-Labs/stride/x/claim/vesting/types"
claimvesting "github.com/Stride-Labs/stride/v3/x/claim/vesting"
claimvestingtypes "github.com/Stride-Labs/stride/v3/x/claim/vesting/types"

"github.com/Stride-Labs/stride/x/mint"
mintkeeper "github.com/Stride-Labs/stride/x/mint/keeper"
minttypes "github.com/Stride-Labs/stride/x/mint/types"
"github.com/Stride-Labs/stride/v3/x/mint"
mintkeeper "github.com/Stride-Labs/stride/v3/x/mint/keeper"
minttypes "github.com/Stride-Labs/stride/v3/x/mint/types"

"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
Expand Down Expand Up @@ -109,27 +109,27 @@ import (
// monitoringp "github.com/tendermint/spn/x/monitoringp"
// monitoringpkeeper "github.com/tendermint/spn/x/monitoringp/keeper"

epochsmodule "github.com/Stride-Labs/stride/x/epochs"
epochsmodulekeeper "github.com/Stride-Labs/stride/x/epochs/keeper"
epochsmoduletypes "github.com/Stride-Labs/stride/x/epochs/types"

"github.com/Stride-Labs/stride/x/interchainquery"
interchainquerykeeper "github.com/Stride-Labs/stride/x/interchainquery/keeper"
interchainquerytypes "github.com/Stride-Labs/stride/x/interchainquery/types"

"github.com/Stride-Labs/stride/x/claim"
claimkeeper "github.com/Stride-Labs/stride/x/claim/keeper"
claimtypes "github.com/Stride-Labs/stride/x/claim/types"
icacallbacksmodule "github.com/Stride-Labs/stride/x/icacallbacks"
icacallbacksmodulekeeper "github.com/Stride-Labs/stride/x/icacallbacks/keeper"
icacallbacksmoduletypes "github.com/Stride-Labs/stride/x/icacallbacks/types"
recordsmodule "github.com/Stride-Labs/stride/x/records"
recordsmodulekeeper "github.com/Stride-Labs/stride/x/records/keeper"
recordsmoduletypes "github.com/Stride-Labs/stride/x/records/types"
stakeibcmodule "github.com/Stride-Labs/stride/x/stakeibc"
stakeibcclient "github.com/Stride-Labs/stride/x/stakeibc/client"
stakeibcmodulekeeper "github.com/Stride-Labs/stride/x/stakeibc/keeper"
stakeibcmoduletypes "github.com/Stride-Labs/stride/x/stakeibc/types"
epochsmodule "github.com/Stride-Labs/stride/v3/x/epochs"
epochsmodulekeeper "github.com/Stride-Labs/stride/v3/x/epochs/keeper"
epochsmoduletypes "github.com/Stride-Labs/stride/v3/x/epochs/types"

"github.com/Stride-Labs/stride/v3/x/interchainquery"
interchainquerykeeper "github.com/Stride-Labs/stride/v3/x/interchainquery/keeper"
interchainquerytypes "github.com/Stride-Labs/stride/v3/x/interchainquery/types"

"github.com/Stride-Labs/stride/v3/x/claim"
claimkeeper "github.com/Stride-Labs/stride/v3/x/claim/keeper"
claimtypes "github.com/Stride-Labs/stride/v3/x/claim/types"
icacallbacksmodule "github.com/Stride-Labs/stride/v3/x/icacallbacks"
icacallbacksmodulekeeper "github.com/Stride-Labs/stride/v3/x/icacallbacks/keeper"
icacallbacksmoduletypes "github.com/Stride-Labs/stride/v3/x/icacallbacks/types"
recordsmodule "github.com/Stride-Labs/stride/v3/x/records"
recordsmodulekeeper "github.com/Stride-Labs/stride/v3/x/records/keeper"
recordsmoduletypes "github.com/Stride-Labs/stride/v3/x/records/types"
stakeibcmodule "github.com/Stride-Labs/stride/v3/x/stakeibc"
stakeibcclient "github.com/Stride-Labs/stride/v3/x/stakeibc/client"
stakeibcmodulekeeper "github.com/Stride-Labs/stride/v3/x/stakeibc/keeper"
stakeibcmoduletypes "github.com/Stride-Labs/stride/v3/x/stakeibc/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

Expand Down
2 changes: 1 addition & 1 deletion app/apptesting/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
tmtypes "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/Stride-Labs/stride/app"
"github.com/Stride-Labs/stride/v3/app"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

v2 "github.com/Stride-Labs/stride/app/upgrades/v2"
v3 "github.com/Stride-Labs/stride/app/upgrades/v3"
claimtypes "github.com/Stride-Labs/stride/x/claim/types"
v2 "github.com/Stride-Labs/stride/v3/app/upgrades/v2"
v3 "github.com/Stride-Labs/stride/v3/app/upgrades/v3"
claimtypes "github.com/Stride-Labs/stride/v3/x/claim/types"
)

func (app *StrideApp) setupUpgradeHandlers() {
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"

{upgradeVersion} "github.com/Stride-Labs/stride/x/records/migrations/{upgradeVersion}"
{upgradeVersion} "github.com/Stride-Labs/stride/v3/x/records/migrations/{upgradeVersion}"
)

type Migrator struct {
Expand All @@ -128,7 +128,7 @@ package {upgradeVersion}

import (
sdk "github.com/cosmos/cosmos-sdk/types"
{oldVersion} "github.com/Stride-Labs/stride/x/records/migrations/{oldVersion}"
{oldVersion} "github.com/Stride-Labs/stride/v3/x/records/migrations/{oldVersion}"
)

// TODO: Add migration logic to deserialize with old protos and re-serialize with new ones
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

claimkeeper "github.com/Stride-Labs/stride/x/claim/keeper"
claimtypes "github.com/Stride-Labs/stride/x/claim/types"
claimkeeper "github.com/Stride-Labs/stride/v3/x/claim/keeper"
claimtypes "github.com/Stride-Labs/stride/v3/x/claim/types"
)

// Note: ensure these values are properly set before running upgrade
Expand Down
4 changes: 2 additions & 2 deletions cmd/strided/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

"github.com/Stride-Labs/stride/app"
"github.com/Stride-Labs/stride/v3/app"

cmdcfg "github.com/Stride-Labs/stride/cmd/strided/config"
cmdcfg "github.com/Stride-Labs/stride/v3/cmd/strided/config"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/strided/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

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

"github.com/Stride-Labs/stride/utils"
"github.com/Stride-Labs/stride/v3/utils"

"github.com/spf13/cast"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -36,8 +36,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"

"github.com/Stride-Labs/stride/app"
// "github.com/Stride-labs/stride/app/params"
"github.com/Stride-Labs/stride/v3/app"
// "github.com/Stride-Labs/stride/v3/app/params"
// this line is used by starport scaffolding # stargate/root/import
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/Stride-Labs/stride
module github.com/Stride-Labs/stride/v3

go 1.18

Expand Down
2 changes: 1 addition & 1 deletion proto/claim/v1beta1/claim.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 "cosmos/bank/v1beta1/genesis.proto";

option go_package = "github.com/Stride-Labs/stride/x/claim/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/claim/types";

enum Action {
option (gogoproto.goproto_enum_prefix) = false;
Expand Down
2 changes: 1 addition & 1 deletion proto/claim/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "google/protobuf/timestamp.proto";
import "claim/v1beta1/claim.proto";
import "claim/v1beta1/params.proto";

option go_package = "github.com/Stride-Labs/stride/x/claim/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/claim/types";

// GenesisState defines the claim module's genesis state.
message GenesisState {
Expand Down
2 changes: 1 addition & 1 deletion proto/claim/v1beta1/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/Stride-Labs/stride/x/claim/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/claim/types";

// Params defines the claim module's parameters.
message Params {
Expand Down
2 changes: 1 addition & 1 deletion proto/claim/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos/base/v1beta1/coin.proto";
import "claim/v1beta1/claim.proto";
import "claim/v1beta1/params.proto";

option go_package = "github.com/Stride-Labs/stride/x/claim/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/claim/types";

// Query defines the gRPC querier service.
service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/claim/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package Stridelabs.stride.claim.v1beta1;
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/Stride-Labs/stride/x/claim/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/claim/types";

// Msg defines the Msg service.
service Msg {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/epochs/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/Stride-Labs/stride/x/epochs/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/epochs/types";

message EpochInfo {
string identifier = 1;
Expand Down
4 changes: 2 additions & 2 deletions proto/stride/epochs/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "stride/epochs/genesis.proto";

option go_package = "github.com/Stride-Labs/stride/x/epochs/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/epochs/types";

// Query defines the gRPC querier service.
service Query {
Expand Down Expand Up @@ -51,7 +51,7 @@ message QueryEpochInfoResponse {
// import "epochs/params.proto";
// // this line is used by starport scaffolding # 1

// option go_package = "github.com/Stride-Labs/stride/x/epochs/types";
// option go_package = "github.com/Stride-Labs/stride/v3/x/epochs/types";

// // Query defines the gRPC querier service.
// service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/callback_data.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package stride.icacallbacks;

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

message CallbackData {
string callback_key = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "stride/icacallbacks/params.proto";
import "stride/icacallbacks/callback_data.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

// GenesisState defines the icacallbacks module's genesis state.
message GenesisState {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/packet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stride.icacallbacks;

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

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

message IcacallbacksPacketData {
oneof packet {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stride.icacallbacks;

import "gogoproto/gogo.proto";

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

// Params defines the parameters for the module.
message Params { option (gogoproto.goproto_stringer) = false; }
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "stride/icacallbacks/params.proto";
import "stride/icacallbacks/callback_data.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

// Query defines the gRPC querier service.
service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/icacallbacks/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stride.icacallbacks;

// this line is used by starport scaffolding # proto/tx/import

option go_package = "github.com/Stride-Labs/stride/x/icacallbacks/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/icacallbacks/types";

// Msg defines the Msg service.
service Msg {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/interchainquery/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package stride.interchainquery.v1;
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/Stride-Labs/stride/x/interchainquery/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/interchainquery/types";

message Query {
string id = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/interchainquery/v1/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "cosmos_proto/cosmos.proto";
import "google/api/annotations.proto";
import "tendermint/crypto/proof.proto";

option go_package = "github.com/Stride-Labs/stride/x/interchainquery/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/interchainquery/types";

// Msg defines the interchainquery Msg service.
service Msg {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/mint/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package stride.mint.v1beta1;
import "gogoproto/gogo.proto";
import "stride/mint/v1beta1/mint.proto";

option go_package = "github.com/Stride-Labs/stride/x/mint/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/mint/types";

// GenesisState defines the mint module's genesis state.
message GenesisState {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/mint/v1beta1/mint.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package stride.mint.v1beta1;

option go_package = "github.com/Stride-Labs/stride/x/mint/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/mint/types";

import "gogoproto/gogo.proto";

Expand Down
2 changes: 1 addition & 1 deletion proto/stride/mint/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "stride/mint/v1beta1/mint.proto";

option go_package = "github.com/Stride-Labs/stride/x/mint/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/mint/types";

// Query provides defines the gRPC querier service.
service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/records/callbacks.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package stride.records;
option go_package = "github.com/Stride-Labs/stride/x/records/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/records/types";

// ---------------------- Transfer Callback ---------------------- //
message TransferCallback { uint64 deposit_record_id = 1; }
2 changes: 1 addition & 1 deletion proto/stride/records/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";

// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/Stride-Labs/stride/x/records/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/records/types";

message UserRedemptionRecord {
string id = 1; // {chain_id}.{epoch}.{sender}
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/records/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto";
import "stride/records/genesis.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/Stride-Labs/stride/x/records/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/records/types";

// Query defines the gRPC querier service.
service Query {
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/stakeibc/callbacks.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";
package stride.stakeibc;
option go_package = "github.com/Stride-Labs/stride/x/stakeibc/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/stakeibc/types";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

Expand Down
2 changes: 1 addition & 1 deletion proto/stride/stakeibc/delegation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stride.stakeibc;

import "stride/stakeibc/validator.proto";

option go_package = "github.com/Stride-Labs/stride/x/stakeibc/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/stakeibc/types";

message Delegation {
string delegate_acct_address = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/stakeibc/epoch_tracker.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package stride.stakeibc;

option go_package = "github.com/Stride-Labs/stride/x/stakeibc/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/stakeibc/types";

message EpochTracker {
string epoch_identifier = 1;
Expand Down
2 changes: 1 addition & 1 deletion proto/stride/stakeibc/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "stride/stakeibc/host_zone.proto";
import "stride/stakeibc/epoch_tracker.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/Stride-Labs/stride/x/stakeibc/types";
option go_package = "github.com/Stride-Labs/stride/v3/x/stakeibc/types";

// GenesisState defines the stakeibc module's genesis state.
message GenesisState {
Expand Down
Loading

0 comments on commit 0dbbbd8

Please sign in to comment.