2019-06-28 13:11:27 -07:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/exported"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AccountKeeper defines the expected account keeper (noalias)
|
|
|
|
type AccountKeeper interface {
|
|
|
|
IterateAccounts(ctx sdk.Context, process func(exported.Account) (stop bool))
|
|
|
|
GetAccount(sdk.Context, sdk.AccAddress) exported.Account
|
|
|
|
SetAccount(sdk.Context, exported.Account)
|
|
|
|
NewAccount(sdk.Context, exported.Account) exported.Account
|
|
|
|
}
|
|
|
|
|
|
|
|
// BankKeeper defines the expected bank keeper (noalias)
|
|
|
|
type BankKeeper interface {
|
2019-12-27 09:57:54 -08:00
|
|
|
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
|
|
|
|
DelegateCoins(ctx sdk.Context, fromAdd, toAddr sdk.AccAddress, amt sdk.Coins) error
|
|
|
|
UndelegateCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
|
2019-06-28 13:11:27 -07:00
|
|
|
|
2020-01-30 13:31:16 -08:00
|
|
|
GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
|
|
|
|
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
|
|
|
|
|
2019-12-27 09:57:54 -08:00
|
|
|
SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
|
|
|
|
AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
|
2020-01-30 13:31:16 -08:00
|
|
|
|
|
|
|
IterateAllBalances(ctx sdk.Context, cb func(address sdk.AccAddress, balance sdk.Coin) (stop bool))
|
2019-06-28 13:11:27 -07:00
|
|
|
}
|