Skip to content

Commit

Permalink
chore: cleanup legacy annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Nov 21, 2023
1 parent db6f3f0 commit db8b570
Show file tree
Hide file tree
Showing 55 changed files with 5 additions and 152 deletions.
4 changes: 2 additions & 2 deletions cmd/gnfd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import (
)

var (
appConfig *app.AppConfig = app.NewDefaultAppConfig()
appConfig = app.NewDefaultAppConfig()
)

// NewRootCmd creates a new root command for a Cosmos SDK application
Expand All @@ -64,7 +64,7 @@ func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) {

rootCmd := &cobra.Command{
Use: app.ShortName,
Short: "Stargate CosmosHub App",
Short: "Greenfield Daemon(server)",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
cmd.SetOut(cmd.OutOrStdout())
Expand Down
2 changes: 0 additions & 2 deletions proto/greenfield/virtualgroup/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import "greenfield/virtualgroup/params.proto";

option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types";

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

// GenesisState defines the virtualgroup module's genesis state.
// GenesisState defines the raw genesis transaction in JSON.
message GenesisState {
Expand Down
5 changes: 0 additions & 5 deletions proto/greenfield/virtualgroup/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import "google/api/annotations.proto";
import "greenfield/virtualgroup/params.proto";
import "greenfield/virtualgroup/types.proto";

// this line is used by starport scaffolding # 1

option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types";

// Query defines the gRPC query service.
Expand All @@ -34,8 +32,6 @@ service Query {
option (google.api.http).get = "/greenfield/virtualgroup/global_virtual_group_family";
}

// this line is used by starport scaffolding # 2

// Queries a list of GlobalVirtualGroupFamilies items.
rpc GlobalVirtualGroupFamilies(QueryGlobalVirtualGroupFamiliesRequest) returns (QueryGlobalVirtualGroupFamiliesResponse) {
option (google.api.http).get = "/greenfield/virtualgroup/global_virtual_group_families";
Expand Down Expand Up @@ -80,7 +76,6 @@ message QueryGlobalVirtualGroupFamilyResponse {
GlobalVirtualGroupFamily global_virtual_group_family = 1;
}

// this line is used by starport scaffolding # 3
message QueryGlobalVirtualGroupFamiliesRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
Expand Down
3 changes: 0 additions & 3 deletions proto/greenfield/virtualgroup/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package greenfield.virtualgroup;

import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
// this line is used by starport scaffolding # proto/tx/import
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "greenfield/common/approval.proto";
Expand All @@ -14,7 +13,6 @@ option go_package = "github.com/bnb-chain/greenfield/x/virtualgroup/types";

// Msg defines the Msg service.
service Msg {
// this line is used by starport scaffolding # proto/tx/import
rpc CreateGlobalVirtualGroup(MsgCreateGlobalVirtualGroup) returns (MsgCreateGlobalVirtualGroupResponse);
rpc DeleteGlobalVirtualGroup(MsgDeleteGlobalVirtualGroup) returns (MsgDeleteGlobalVirtualGroupResponse);
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
Expand Down Expand Up @@ -172,7 +170,6 @@ message MsgSettle {

message MsgSettleResponse {}

// this line is used by starport scaffolding # proto/tx/message
message MsgStorageProviderExit {
option (cosmos.msg.v1.signer) = "storage_provider";

Expand Down
1 change: 0 additions & 1 deletion x/bridge/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func GetQueryCmd() *cobra.Command {
}

cmd.AddCommand(CmdQueryParams())
// this line is used by starport scaffolding # 1

return cmd
}
1 change: 0 additions & 1 deletion x/bridge/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func GetTxCmd() *cobra.Command {
}

cmd.AddCommand(CmdTransferOut())
// this line is used by starport scaffolding # 1

return cmd
}
5 changes: 0 additions & 5 deletions x/bridge/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ const (
opWeightMsgTransferOut = "op_weight_msg_transfer_out"
// TODO: Determine the simulation weight value
defaultWeightMsgTransferOut int = 100

// this line is used by starport scaffolding # simapp/module/const
)

// GenerateGenesisState creates a randomized GenState of the module
Expand All @@ -38,7 +36,6 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
}
bridgeGenesis := types.GenesisState{
Params: types.DefaultParams(),
// this line is used by starport scaffolding # simapp/module/genesisState
}
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&bridgeGenesis)
}
Expand Down Expand Up @@ -66,7 +63,5 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
bridgesimulation.SimulateMsgTransferOut(am.accountKeeper, am.bankKeeper, am.keeper),
))

// this line is used by starport scaffolding # simapp/module/operation

return operations
}
2 changes: 0 additions & 2 deletions x/bridge/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgTransferOut{}, "bridge/TransferOut", nil)
// this line is used by starport scaffolding # 2
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
Expand All @@ -19,7 +18,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgUpdateParams{},
)
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down
1 change: 0 additions & 1 deletion x/bridge/types/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func TestGenesisState_Validate(t *testing.T) {
BscTransferOutRelayerFee: sdkmath.NewInt(1),
BscTransferOutAckRelayerFee: sdkmath.NewInt(0),
},
// this line is used by starport scaffolding # types/genesis/validField
},
valid: true,
},
Expand Down
2 changes: 0 additions & 2 deletions x/challenge/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ func GetQueryCmd() *cobra.Command {
cmd.AddCommand(CmdAttestedChallenge())
cmd.AddCommand(CmdInturnChallenger())

// this line is used by starport scaffolding # 1

return cmd
}

Expand Down
1 change: 0 additions & 1 deletion x/challenge/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func GetTxCmd() *cobra.Command {

cmd.AddCommand(CmdSubmit())
cmd.AddCommand(CmdAttest())
// this line is used by starport scaffolding # 1

return cmd
}
4 changes: 0 additions & 4 deletions x/challenge/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

// InitGenesis initializes the module's state from a provided genesis state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) {
// this line is used by starport scaffolding # genesis/module/init
err := k.SetParams(ctx, genState.Params)
if err != nil {
panic(err)
Expand All @@ -20,8 +19,5 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(ctx)

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

return genesis
}
4 changes: 0 additions & 4 deletions x/challenge/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
func TestGenesis(t *testing.T) {
genesisState := types.GenesisState{
Params: types.DefaultParams(),

// this line is used by starport scaffolding # genesis/test/state
}

k, ctx := makeKeeper(t)
Expand All @@ -31,8 +29,6 @@ func TestGenesis(t *testing.T) {

nullify.Fill(&genesisState)
nullify.Fill(got)

// this line is used by starport scaffolding # genesis/test/assert
}

func makeKeeper(t *testing.T) (*keeper.Keeper, sdk.Context) {
Expand Down
5 changes: 0 additions & 5 deletions x/challenge/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const (
opWeightMsgAttest = "op_weight_msg_attest"
// TODO: Determine the simulation weight value
defaultWeightMsgAttest int = 100

// this line is used by starport scaffolding # simapp/module/const
)

// GenerateGenesisState creates a randomized GenState of the module
Expand All @@ -42,7 +40,6 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
}
challengeGenesis := types.GenesisState{
Params: types.DefaultParams(),
// this line is used by starport scaffolding # simapp/module/genesisState
}
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&challengeGenesis)
}
Expand Down Expand Up @@ -81,7 +78,5 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp
challengesimulation.SimulateMsgAttest(am.accountKeeper, am.bankKeeper, am.keeper),
))

// this line is used by starport scaffolding # simapp/module/operation

return operations
}
2 changes: 0 additions & 2 deletions x/challenge/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgSubmit{}, "challenge/Submit", nil)
cdc.RegisterConcrete(&MsgAttest{}, "challenge/Attest", nil)
// this line is used by starport scaffolding # 2
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
Expand All @@ -23,7 +22,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgUpdateParams{},
)
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down
3 changes: 0 additions & 3 deletions x/challenge/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ const DefaultIndex uint64 = 1
// DefaultGenesis returns the default genesis state
func DefaultGenesis() *GenesisState {
return &GenesisState{
// this line is used by starport scaffolding # genesis/types/default
Params: DefaultParams(),
}
}

// Validate performs basic genesis state validation returning an error upon any
// failure.
func (gs GenesisState) Validate() error {
// this line is used by starport scaffolding # genesis/types/validate

return gs.Params.Validate()
}
3 changes: 0 additions & 3 deletions x/challenge/types/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ func TestGenesisState_Validate(t *testing.T) {
desc: "valid genesis state",
genState: &types.GenesisState{
Params: types.DefaultParams(),

// this line is used by starport scaffolding # types/genesis/validField
},
valid: true,
},
// this line is used by starport scaffolding # types/genesis/testcase
} {
t.Run(tc.desc, func(t *testing.T) {
err := tc.genState.Validate()
Expand Down
1 change: 0 additions & 1 deletion x/gensp/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ func InitGenesis(ctx sdk.Context, stakingKeeper types.StakingKeeper,
deliverTx deliverTxfn, genesisState types.GenesisState,
txEncodingConfig client.TxEncodingConfig,
) (validators []abci.ValidatorUpdate, err error) {
// this line is used by starport scaffolding # genesis/module/init
if len(genesisState.GenspTxs) > 0 {
validators, err = DeliverGenTxs(ctx, genesisState.GenspTxs, stakingKeeper, deliverTx, txEncodingConfig)
}
Expand Down
6 changes: 1 addition & 5 deletions x/gensp/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/msgservice"
)

func RegisterCodec(cdc *codec.LegacyAmino) {
// this line is used by starport scaffolding # 2
}
func RegisterCodec(cdc *codec.LegacyAmino) {}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}

Expand Down
1 change: 0 additions & 1 deletion x/payment/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func GetQueryCmd() *cobra.Command {
cmd.AddCommand(CmdDynamicBalance())
cmd.AddCommand(CmdGetPaymentAccountsByOwner())
cmd.AddCommand(CmdListAutoSettleRecord())
// this line is used by starport scaffolding # 1

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

return cmd
}
1 change: 0 additions & 1 deletion x/payment/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis.PaymentAccountCountList = k.GetAllPaymentAccountCount(ctx)
genesis.PaymentAccountList = k.GetAllPaymentAccount(ctx)
genesis.AutoSettleRecordList = k.GetAllAutoSettleRecord(ctx)
// this line is used by starport scaffolding # genesis/module/export

return genesis
}
6 changes: 0 additions & 6 deletions x/payment/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ var (
_ = baseapp.Paramspace
)

const (
// this line is used by starport scaffolding # simapp/module/const
)

// GenerateGenesisState creates a randomized GenState of the module
func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
accs := make([]string, len(simState.Accounts))
Expand All @@ -33,7 +29,6 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {
}
paymentGenesis := types.GenesisState{
Params: types.DefaultParams(),
// this line is used by starport scaffolding # simapp/module/genesisState
}
simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&paymentGenesis)
}
Expand All @@ -49,6 +44,5 @@ func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {}
// WeightedOperations returns the all the gov module operations with their respective weights.
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
operations := make([]simtypes.WeightedOperation, 0)
// this line is used by starport scaffolding # simapp/module/operation
return operations
}
2 changes: 0 additions & 2 deletions x/payment/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgDeposit{}, "payment/Deposit", nil)
cdc.RegisterConcrete(&MsgWithdraw{}, "payment/Withdraw", nil)
cdc.RegisterConcrete(&MsgDisableRefund{}, "payment/DisableRefund", nil)
// this line is used by starport scaffolding # 2
}

func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
Expand All @@ -31,7 +30,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgUpdateParams{},
)
// this line is used by starport scaffolding # 3

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down
4 changes: 1 addition & 3 deletions x/payment/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ func DefaultGenesis() *GenesisState {
PaymentAccountCountList: []PaymentAccountCount{},
PaymentAccountList: []PaymentAccount{},
AutoSettleRecordList: []AutoSettleRecord{},
// this line is used by starport scaffolding # genesis/types/default
Params: DefaultParams(),
Params: DefaultParams(),
}
}

Expand Down Expand Up @@ -65,7 +64,6 @@ func (gs GenesisState) Validate() error {
}
autoSettleRecordIndexMap[index] = struct{}{}
}
// this line is used by starport scaffolding # genesis/types/validate

return gs.Params.Validate()
}
4 changes: 0 additions & 4 deletions x/permission/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

// InitGenesis initializes the module's state from a provided genesis state.
func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) {
// this line is used by starport scaffolding # genesis/module/init
err := k.SetParams(ctx, genState.Params)
if err != nil {
panic(err)
Expand All @@ -20,8 +19,5 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(ctx)

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

return genesis
}
Loading

0 comments on commit db8b570

Please sign in to comment.