From fb0c152fd7565b4d1f7c7d0372328a7c026c4c16 Mon Sep 17 00:00:00 2001 From: Dzung Do Date: Fri, 12 Jul 2024 16:29:21 +0700 Subject: [PATCH] remove unused staking apis --- demo/app/app.go | 2 ++ x/meshsecurityprovider/types/expected_keeper.go | 12 ------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/demo/app/app.go b/demo/app/app.go index f372108f..44baf39d 100644 --- a/demo/app/app.go +++ b/demo/app/app.go @@ -428,6 +428,8 @@ func NewMeshApp( keys[meshsecprovtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.BankKeeper, + app.WasmKeeper, + app.StakingKeeper, ) app.SlashingKeeper = slashingkeeper.NewKeeper( diff --git a/x/meshsecurityprovider/types/expected_keeper.go b/x/meshsecurityprovider/types/expected_keeper.go index e2b82a61..013514f9 100644 --- a/x/meshsecurityprovider/types/expected_keeper.go +++ b/x/meshsecurityprovider/types/expected_keeper.go @@ -1,8 +1,6 @@ package types import ( - "time" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,18 +20,8 @@ type WasmKeeper interface { } type StakingKeeper interface { - QuerySmart(ctx sdk.Context, contractAddress sdk.AccAddress, queryMsg []byte) ([]byte, error) BondDenom(ctx sdk.Context) string - GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) ValidateUnbondAmount(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int) (shares sdk.Dec, err error) - Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool) (newShares sdk.Dec, err error) - GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) - UnbondingTime(ctx sdk.Context) time.Duration - GetParams(ctx sdk.Context) stakingtypes.Params Unbond(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec) (amount math.Int, err error) - IterateBondedValidatorsByPower(ctx sdk.Context, fn func(int64, stakingtypes.ValidatorI) bool) - TotalBondedTokens(ctx sdk.Context) math.Int - IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, fn func(int64, stakingtypes.DelegationI) bool) - GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (stakingtypes.Validator, bool) } \ No newline at end of file