Skip to content

Commit

Permalink
refactor: remove Starport placeholders and module handlers (#906)
Browse files Browse the repository at this point in the history
* remove sp placeholders

* remove handlers
  • Loading branch information
lumtis authored Aug 4, 2023
1 parent 487a54b commit da2ead6
Show file tree
Hide file tree
Showing 47 changed files with 8 additions and 211 deletions.
4 changes: 0 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ import (
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
tmjson "github.com/tendermint/tendermint/libs/json"

// this line is used by starport scaffolding # stargate/app/moduleImport
zetaCoreModule "github.com/zeta-chain/zetacore/x/crosschain"
zetaCoreModuleTypes "github.com/zeta-chain/zetacore/x/crosschain/types"

Expand Down Expand Up @@ -151,8 +150,6 @@ var (
Bech32PrefixConsPub = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals

func getGovProposalHandlers() []govclient.ProposalHandler {
var govProposalHandlers []govclient.ProposalHandler
govProposalHandlers = append(govProposalHandlers,
Expand Down Expand Up @@ -759,7 +756,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(evmtypes.ModuleName)
paramsKeeper.Subspace(feemarkettypes.ModuleName)
paramsKeeper.Subspace(group.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
paramsKeeper.Subspace(zetaCoreModuleTypes.ModuleName)
paramsKeeper.Subspace(zetaObserverModuleTypes.ModuleName)
paramsKeeper.Subspace(fungibleModuleTypes.ModuleName)
Expand Down
2 changes: 0 additions & 2 deletions cmd/zetacored/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ func (ac appCreator) appExport(
homePath,
uint(1),
ac.encCfg,
// this line is used by starport scaffolding # stargate/root/exportArgument
appOpts,
)

Expand All @@ -299,7 +298,6 @@ func (ac appCreator) appExport(
homePath,
uint(1),
ac.encCfg,
// this line is used by starport scaffolding # stargate/root/noHeightExportArgument
appOpts,
)
}
Expand Down
3 changes: 0 additions & 3 deletions proto/crosschain/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "crosschain/last_block_height.proto";
import "crosschain/out_tx_tracker.proto";
import "crosschain/params.proto";
import "crosschain/tss.proto";
// this line is used by starport scaffolding # genesis/proto/import
import "gogoproto/gogo.proto";

option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types";
Expand All @@ -25,6 +24,4 @@ message GenesisState {

repeated LastBlockHeight lastBlockHeightList = 8;
repeated InTxHashToCctx inTxHashToCctxList = 9 [(gogoproto.nullable) = false];

// this line is used by starport scaffolding # genesis/proto/state
}
5 changes: 0 additions & 5 deletions proto/crosschain/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import "crosschain/nonce_to_cctx.proto";
import "crosschain/out_tx_tracker.proto";
import "crosschain/params.proto";
import "crosschain/tss.proto";
// this line is used by starport scaffolding # 1
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";

Expand Down Expand Up @@ -53,8 +52,6 @@ service Query {
option (google.api.http).get = "/zeta-chain/crosschain/get_tss_address";
}

// this line is used by starport scaffolding # 2

// Queries a tSS by index.
rpc TSS(QueryGetTSSRequest) returns (QueryGetTSSResponse) {
option (google.api.http).get = "/zeta-chain/crosschain/TSS";
Expand Down Expand Up @@ -183,8 +180,6 @@ message QueryGetTssAddressResponse {
string btc = 2;
}

// this line is used by starport scaffolding # 3

message QueryGetTSSRequest {}

message QueryGetTSSResponse {
Expand Down
3 changes: 0 additions & 3 deletions proto/crosschain/tx.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
syntax = "proto3";
package zetachain.zetacore.crosschain;

// this line is used by starport scaffolding # proto/tx/import
import "common/common.proto";
import "gogoproto/gogo.proto";

Expand All @@ -16,7 +15,6 @@ service Msg {
rpc NonceVoter(MsgNonceVoter) returns (MsgNonceVoterResponse);
rpc VoteOnObservedOutboundTx(MsgVoteOnObservedOutboundTx) returns (MsgVoteOnObservedOutboundTxResponse);
rpc VoteOnObservedInboundTx(MsgVoteOnObservedInboundTx) returns (MsgVoteOnObservedInboundTxResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}

message MsgAddToOutTxTracker {
Expand All @@ -36,7 +34,6 @@ message MsgRemoveFromOutTxTracker {

message MsgRemoveFromOutTxTrackerResponse {}

// this line is used by starport scaffolding # proto/tx/message
message MsgCreateTSSVoter {
string creator = 1;
string tss_pubkey = 2;
Expand Down
2 changes: 0 additions & 2 deletions proto/emissions/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package zetachain.zetacore.emissions;

import "emissions/params.proto";
import "gogoproto/gogo.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/zeta-chain/zetacore/x/emissions/types";

// GenesisState defines the emissions module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
// this line is used by starport scaffolding # genesis/proto/state
}
5 changes: 0 additions & 5 deletions proto/emissions/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import "cosmos/base/query/v1beta1/pagination.proto";
import "emissions/params.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/zeta-chain/zetacore/x/emissions/types";

Expand All @@ -19,8 +18,6 @@ service Query {
rpc ListPoolAddresses(QueryListPoolAddressesRequest) returns (QueryListPoolAddressesResponse) {
option (google.api.http).get = "/zeta-chain/zetacore/emissions/list_addresses";
}

// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand All @@ -39,5 +36,3 @@ message QueryListPoolAddressesResponse {
string undistributed_tss_balances_address = 2;
string emission_module_address = 3;
}

// this line is used by starport scaffolding # 3
5 changes: 0 additions & 5 deletions proto/emissions/tx.proto
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
syntax = "proto3";
package zetachain.zetacore.emissions;

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

import "gogoproto/gogo.proto";

option go_package = "github.com/zeta-chain/zetacore/x/emissions/types";

// Msg defines the Msg service.
service Msg {
// this line is used by starport scaffolding # proto/tx/rpc
}

// this line is used by starport scaffolding # proto/tx/message
2 changes: 0 additions & 2 deletions proto/fungible/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import "fungible/foreign_coins.proto";
import "fungible/params.proto";
import "fungible/system_contract.proto";
import "gogoproto/gogo.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/zeta-chain/zetacore/x/fungible/types";

Expand All @@ -14,5 +13,4 @@ message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated ForeignCoins foreignCoinsList = 2 [(gogoproto.nullable) = false];
SystemContract systemContract = 3;
// this line is used by starport scaffolding # genesis/proto/state
}
3 changes: 0 additions & 3 deletions proto/fungible/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import "fungible/params.proto";
import "fungible/system_contract.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/zeta-chain/zetacore/x/fungible/types";

Expand All @@ -31,7 +30,6 @@ service Query {
rpc SystemContract(QueryGetSystemContractRequest) returns (QueryGetSystemContractResponse) {
option (google.api.http).get = "/zeta-chain/zetacore/fungible/system_contract";
}
// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand Down Expand Up @@ -65,4 +63,3 @@ message QueryGetSystemContractRequest {}
message QueryGetSystemContractResponse {
SystemContract SystemContract = 1 [(gogoproto.nullable) = false];
}
// this line is used by starport scaffolding # 3
5 changes: 0 additions & 5 deletions proto/fungible/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ package zetachain.zetacore.fungible;

import "common/common.proto";

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

option go_package = "github.com/zeta-chain/zetacore/x/fungible/types";

// Msg defines the Msg service.
service Msg {
rpc DeployFungibleCoinZRC20(MsgDeployFungibleCoinZRC20) returns (MsgDeployFungibleCoinZRC20Response);
rpc RemoveForeignCoin(MsgRemoveForeignCoin) returns (MsgRemoveForeignCoinResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}

message MsgDeployFungibleCoinZRC20 {
Expand All @@ -33,5 +30,3 @@ message MsgRemoveForeignCoin {
}

message MsgRemoveForeignCoinResponse {}

// this line is used by starport scaffolding # proto/tx/message
5 changes: 0 additions & 5 deletions proto/observer/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package zetachain.zetacore.observer;

import "common/common.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
// this line is used by starport scaffolding # 1
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "observer/ballot.proto";
Expand Down Expand Up @@ -80,8 +79,6 @@ service Query {
rpc GetAllBlameRecords(QueryAllBlameRecordsRequest) returns (QueryAllBlameRecordsResponse) {
option (google.api.http).get = "/zeta-chain/observer/get_all_blame_records";
}

// this line is used by starport scaffolding # 2
}

message QueryParamsRequest {}
Expand Down Expand Up @@ -188,5 +185,3 @@ message QueryAllBlameRecordsRequest {}
message QueryAllBlameRecordsResponse {
repeated Blame blameInfo = 1;
}

// this line is used by starport scaffolding # 3
5 changes: 0 additions & 5 deletions proto/observer/tx.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
syntax = "proto3";
package zetachain.zetacore.observer;

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

import "common/common.proto";
import "gogoproto/gogo.proto";
import "observer/blame.proto";
Expand All @@ -18,7 +16,6 @@ service Msg {
rpc AddBlameVote(MsgAddBlameVote) returns (MsgAddBlameVoteResponse);
rpc UpdatePermissionFlags(MsgUpdatePermissionFlags) returns (MsgUpdatePermissionFlagsResponse);
rpc UpdateKeygen(MsgUpdateKeygen) returns (MsgUpdateKeygenResponse);
// this line is used by starport scaffolding # proto/tx/rpc
}

message MsgUpdateCoreParams {
Expand Down Expand Up @@ -55,5 +52,3 @@ message MsgUpdateKeygen {
}

message MsgUpdateKeygenResponse {}

// this line is used by starport scaffolding # proto/tx/message
2 changes: 0 additions & 2 deletions x/crosschain/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ func GetQueryCmd(queryRoute string) *cobra.Command {
CmdGetTssAddress(),
)

// this line is used by starport scaffolding # 1

return cmd
}
1 change: 0 additions & 1 deletion x/crosschain/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func GetTxCmd() *cobra.Command {
cli.CmdUpdatePermissionFlags(),
cli.CmdUpdateKeygen(),
)
// this line is used by starport scaffolding # 1

return cmd
}
3 changes: 0 additions & 3 deletions x/crosschain/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
k.SetInTxHashToCctx(ctx, elem)
}

// this line is used by starport scaffolding # genesis/module/init

// Set all the gasPrice
for _, elem := range genState.GasPriceList {
k.SetGasPrice(ctx, *elem)
Expand Down Expand Up @@ -53,7 +51,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis.OutTxTrackerList = k.GetAllOutTxTracker(ctx)
genesis.InTxHashToCctxList = k.GetAllInTxHashToCctx(ctx)

// this line is used by starport scaffolding # genesis/module/export
// Get all keygen

// Get all tSSVoter
Expand Down
2 changes: 0 additions & 2 deletions x/crosschain/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestGenesis(t *testing.T) {
//PermissionFlags: &types.PermissionFlags{
// IsInboundEnabled: true,
//},
// this line is used by starport scaffolding # genesis/test/state
}

k, ctx := keepertest.ZetacoreKeeper(t)
Expand All @@ -45,5 +44,4 @@ func TestGenesis(t *testing.T) {
require.ElementsMatch(t, genesisState.OutTxTrackerList, got.OutTxTrackerList)
require.ElementsMatch(t, genesisState.InTxHashToCctxList, got.InTxHashToCctxList)
//require.Equal(t, genesisState.PermissionFlags, got.PermissionFlags)
// this line is used by starport scaffolding # genesis/test/assert
}
24 changes: 0 additions & 24 deletions x/crosschain/handler.go

This file was deleted.

6 changes: 0 additions & 6 deletions x/crosschain/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/zeta-chain/zetacore/x/crosschain/types"
// this line is used by starport scaffolding # ibc/keeper/import
)

type (
Expand All @@ -26,8 +25,6 @@ type (
bankKeeper types.BankKeeper
zetaObserverKeeper types.ZetaObserverKeeper
fungibleKeeper fungibleModuleKeeper.Keeper
// this line is used by starport scaffolding # ibc/keeper/attribute

}
)

Expand All @@ -41,8 +38,6 @@ func NewKeeper(
bankKeeper types.BankKeeper,
zetaObserverKeeper types.ZetaObserverKeeper,
fungibleKeeper fungibleModuleKeeper.Keeper,
// this line is used by starport scaffolding # ibc/keeper/parameter

) *Keeper {
// ensure governance module account is set
// FIXME: enable this check! (disabled for now to avoid unit test panic)
Expand All @@ -60,7 +55,6 @@ func NewKeeper(
bankKeeper: bankKeeper,
zetaObserverKeeper: zetaObserverKeeper,
fungibleKeeper: fungibleKeeper,
// this line is used by starport scaffolding # ibc/keeper/return
}
}

Expand Down
2 changes: 0 additions & 2 deletions x/crosschain/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/zeta-chain/zetacore/x/crosschain/client/cli"
"github.com/zeta-chain/zetacore/x/crosschain/types"
// this line is used by starport scaffolding # ibc/module/import
)

var (
_ module.AppModule = AppModule{}
_ module.AppModuleBasic = AppModuleBasic{}
// this line is used by starport scaffolding # ibc/module/interface
)

// ----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit da2ead6

Please sign in to comment.