Skip to content

Commit

Permalink
remove unused staking apis
Browse files Browse the repository at this point in the history
  • Loading branch information
neitdung committed Jul 12, 2024
1 parent 62974d3 commit fb0c152
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 2 additions & 0 deletions demo/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ func NewMeshApp(
keys[meshsecprovtypes.StoreKey],
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.BankKeeper,
app.WasmKeeper,
app.StakingKeeper,
)

app.SlashingKeeper = slashingkeeper.NewKeeper(
Expand Down
12 changes: 0 additions & 12 deletions x/meshsecurityprovider/types/expected_keeper.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package types

import (
"time"

"cosmossdk.io/math"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -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)
}

0 comments on commit fb0c152

Please sign in to comment.