Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove fungible params #2004

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ func New(
appCodec,
keys[fungibletypes.StoreKey],
keys[fungibletypes.MemStoreKey],
app.GetSubspace(fungibletypes.ModuleName),
app.AccountKeeper,
app.EvmKeeper,
app.BankKeeper,
Expand All @@ -432,7 +431,6 @@ func New(
keys[crosschaintypes.StoreKey],
keys[crosschaintypes.MemStoreKey],
&stakingKeeper,
app.GetSubspace(crosschaintypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.ObserverKeeper,
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* [1966](https://github.com/zeta-chain/node/pull/1966) - move TSS vote message from crosschain to observer
* [1853](https://github.com/zeta-chain/node/pull/1853) - refactor vote inbound tx and vote outbound tx
* [2001](https://github.com/zeta-chain/node/pull/2001) - replace broadcast mode block with sync
* [2004](https://github.com/zeta-chain/node/pull/2004) - remove fungible params

### Features

Expand Down
1 change: 0 additions & 1 deletion docs/cli/zetacored/zetacored_query_fungible.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ zetacored query fungible [flags]
* [zetacored query fungible gas-stability-pool-balance](zetacored_query_fungible_gas-stability-pool-balance.md) - query the balance of a gas stability pool for a chain
* [zetacored query fungible gas-stability-pool-balances](zetacored_query_fungible_gas-stability-pool-balances.md) - query all gas stability pool balances
* [zetacored query fungible list-foreign-coins](zetacored_query_fungible_list-foreign-coins.md) - list all ForeignCoins
* [zetacored query fungible params](zetacored_query_fungible_params.md) - shows the parameters of the module
* [zetacored query fungible show-foreign-coins](zetacored_query_fungible_show-foreign-coins.md) - shows a ForeignCoins
* [zetacored query fungible system-contract](zetacored_query_fungible_system-contract.md) - query system contract

33 changes: 0 additions & 33 deletions docs/cli/zetacored/zetacored_query_fungible_params.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27401,21 +27401,6 @@ paths:
format: int64
tags:
- Query
/zeta-chain/fungible/params:
get:
summary: Parameters queries the parameters of the module.
operationId: Query_Params
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/zetacorefungibleQueryParamsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/fungible/system_contract:
get:
summary: Queries SystemContract
Expand Down Expand Up @@ -54764,16 +54749,6 @@ definitions:
$ref: '#/definitions/zetacoreemissionsParams'
description: params holds all the parameters of this module.
description: QueryParamsResponse is response type for the Query/Params RPC method.
zetacorefungibleParams:
type: object
description: Params defines the parameters for the module.
zetacorefungibleQueryParamsResponse:
type: object
properties:
params:
$ref: '#/definitions/zetacorefungibleParams'
description: params holds all the parameters of this module.
description: QueryParamsResponse is response type for the Query/Params RPC method.
zetacoreobserverParams:
type: object
properties:
Expand Down
6 changes: 2 additions & 4 deletions proto/fungible/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ syntax = "proto3";
package zetachain.zetacore.fungible;

import "fungible/foreign_coins.proto";
import "fungible/params.proto";
import "fungible/system_contract.proto";
import "gogoproto/gogo.proto";

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

// GenesisState defines the fungible module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated ForeignCoins foreignCoinsList = 2 [(gogoproto.nullable) = false];
SystemContract systemContract = 3;
repeated ForeignCoins foreignCoinsList = 1 [(gogoproto.nullable) = false];
SystemContract systemContract = 2;
}
11 changes: 0 additions & 11 deletions proto/fungible/params.proto

This file was deleted.

15 changes: 0 additions & 15 deletions proto/fungible/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package zetachain.zetacore.fungible;

import "cosmos/base/query/v1beta1/pagination.proto";
import "fungible/foreign_coins.proto";
import "fungible/params.proto";
import "fungible/system_contract.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
Expand All @@ -12,11 +11,6 @@ option go_package = "github.com/zeta-chain/zetacore/x/fungible/types";

// Query defines the gRPC querier service.
service Query {
// Parameters queries the parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/zeta-chain/fungible/params";
}

// Queries a ForeignCoins by index.
rpc ForeignCoins(QueryGetForeignCoinsRequest) returns (QueryGetForeignCoinsResponse) {
option (google.api.http).get = "/zeta-chain/fungible/foreign_coins/{index}";
Expand Down Expand Up @@ -53,15 +47,6 @@ service Query {
}
}

// QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest {}

// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
}

message QueryGetForeignCoinsRequest {
string index = 1;
}
Expand Down
2 changes: 0 additions & 2 deletions testutil/keeper/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func CrosschainKeeperWithMocks(
cdc,
db,
stateStore,
sdkKeepers.ParamsKeeper,
sdkKeepers.AuthKeeper,
sdkKeepers.BankKeeper,
sdkKeepers.EvmKeeper,
Expand Down Expand Up @@ -134,7 +133,6 @@ func CrosschainKeeperWithMocks(
storeKey,
memStoreKey,
stakingKeeper,
sdkKeepers.ParamsKeeper.Subspace(types.ModuleName),
authKeeper,
bankKeeper,
observerKeeper,
Expand Down
4 changes: 0 additions & 4 deletions testutil/keeper/fungible.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
"github.com/evmos/ethermint/x/evm/statedb"
evmtypes "github.com/evmos/ethermint/x/evm/types"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -44,7 +43,6 @@ func initFungibleKeeper(
cdc codec.Codec,
db *tmdb.MemDB,
ss store.CommitMultiStore,
paramKeeper paramskeeper.Keeper,
authKeeper types.AccountKeeper,
bankKeepr types.BankKeeper,
evmKeeper types.EVMKeeper,
Expand All @@ -60,7 +58,6 @@ func initFungibleKeeper(
cdc,
storeKey,
memKey,
paramKeeper.Subspace(types.ModuleName),
authKeeper,
evmKeeper,
bankKeepr,
Expand Down Expand Up @@ -145,7 +142,6 @@ func FungibleKeeperWithMocks(t testing.TB, mockOptions FungibleMockOptions) (*ke
cdc,
storeKey,
memStoreKey,
sdkKeepers.ParamsKeeper.Subspace(types.ModuleName),
authKeeper,
evmKeeper,
bankKeeper,
Expand Down
10 changes: 2 additions & 8 deletions typescript/fungible/genesis_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type { Params } from "./params_pb.js";
import type { ForeignCoins } from "./foreign_coins_pb.js";
import type { SystemContract } from "./system_contract_pb.js";

Expand All @@ -16,17 +15,12 @@ import type { SystemContract } from "./system_contract_pb.js";
*/
export declare class GenesisState extends Message<GenesisState> {
/**
* @generated from field: zetachain.zetacore.fungible.Params params = 1;
*/
params?: Params;

/**
* @generated from field: repeated zetachain.zetacore.fungible.ForeignCoins foreignCoinsList = 2;
* @generated from field: repeated zetachain.zetacore.fungible.ForeignCoins foreignCoinsList = 1;
*/
foreignCoinsList: ForeignCoins[];

/**
* @generated from field: zetachain.zetacore.fungible.SystemContract systemContract = 3;
* @generated from field: zetachain.zetacore.fungible.SystemContract systemContract = 2;
*/
systemContract?: SystemContract;

Expand Down
1 change: 0 additions & 1 deletion typescript/fungible/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from "./events_pb";
export * from "./foreign_coins_pb";
export * from "./genesis_pb";
export * from "./params_pb";
export * from "./query_pb";
export * from "./system_contract_pb";
export * from "./tx_pb";
29 changes: 0 additions & 29 deletions typescript/fungible/params_pb.d.ts

This file was deleted.

50 changes: 0 additions & 50 deletions typescript/fungible/query_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,10 @@

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type { Params } from "./params_pb.js";
import type { ForeignCoins } from "./foreign_coins_pb.js";
import type { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination_pb.js";
import type { SystemContract } from "./system_contract_pb.js";

/**
* QueryParamsRequest is request type for the Query/Params RPC method.
*
* @generated from message zetachain.zetacore.fungible.QueryParamsRequest
*/
export declare class QueryParamsRequest extends Message<QueryParamsRequest> {
constructor(data?: PartialMessage<QueryParamsRequest>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.fungible.QueryParamsRequest";
static readonly fields: FieldList;

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryParamsRequest;

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryParamsRequest;

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryParamsRequest;

static equals(a: QueryParamsRequest | PlainMessage<QueryParamsRequest> | undefined, b: QueryParamsRequest | PlainMessage<QueryParamsRequest> | undefined): boolean;
}

/**
* QueryParamsResponse is response type for the Query/Params RPC method.
*
* @generated from message zetachain.zetacore.fungible.QueryParamsResponse
*/
export declare class QueryParamsResponse extends Message<QueryParamsResponse> {
/**
* params holds all the parameters of this module.
*
* @generated from field: zetachain.zetacore.fungible.Params params = 1;
*/
params?: Params;

constructor(data?: PartialMessage<QueryParamsResponse>);

static readonly runtime: typeof proto3;
static readonly typeName = "zetachain.zetacore.fungible.QueryParamsResponse";
static readonly fields: FieldList;

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryParamsResponse;

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryParamsResponse;

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryParamsResponse;

static equals(a: QueryParamsResponse | PlainMessage<QueryParamsResponse> | undefined, b: QueryParamsResponse | PlainMessage<QueryParamsResponse> | undefined): boolean;
}

/**
* @generated from message zetachain.zetacore.fungible.QueryGetForeignCoinsRequest
*/
Expand Down
4 changes: 0 additions & 4 deletions x/crosschain/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tendermint/tendermint/libs/log"
"github.com/zeta-chain/zetacore/x/crosschain/types"
)
Expand All @@ -18,7 +17,6 @@ type (
memKey storetypes.StoreKey

stakingKeeper types.StakingKeeper
paramstore paramtypes.Subspace
authKeeper types.AccountKeeper
bankKeeper types.BankKeeper
zetaObserverKeeper types.ObserverKeeper
Expand All @@ -32,7 +30,6 @@ func NewKeeper(
storeKey,
memKey storetypes.StoreKey,
stakingKeeper types.StakingKeeper, // custom
paramstore paramtypes.Subspace,
authKeeper types.AccountKeeper,
bankKeeper types.BankKeeper,
zetaObserverKeeper types.ObserverKeeper,
Expand All @@ -50,7 +47,6 @@ func NewKeeper(
storeKey: storeKey,
memKey: memKey,
stakingKeeper: stakingKeeper,
paramstore: paramstore,
authKeeper: authKeeper,
bankKeeper: bankKeeper,
zetaObserverKeeper: zetaObserverKeeper,
Expand Down
1 change: 0 additions & 1 deletion x/fungible/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func GetQueryCmd(_ string) *cobra.Command {
}

cmd.AddCommand(
CmdQueryParams(),
CmdListForeignCoins(),
CmdShowForeignCoins(),
CmdGasStabilityPoolAddress(),
Expand Down
Loading
Loading