-
Notifications
You must be signed in to change notification settings - Fork 12
/
expected_keepers.go
62 lines (53 loc) · 2.28 KB
/
expected_keepers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/types"
clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"
"github.com/cosmos/cosmos-sdk/x/ibc/core/exported"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/ethereum/go-ethereum/common"
tranfsertypes "github.com/functionx/fx-core/x/ibc/applications/transfer/types"
)
// BankKeeper defines the expected bank keeper methods
type BankKeeper interface {
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
GetDenomMetaData(ctx sdk.Context, denom string) bank.Metadata
SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error
}
type SlashingKeeper interface {
GetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress) (info slashingtypes.ValidatorSigningInfo, found bool)
}
// AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
GetModuleAddress(name string) sdk.AccAddress
GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI
SetModuleAccount(sdk.Context, types.ModuleAccountI)
}
type Erc20Keeper interface {
RelayConvertCoin(ctx sdk.Context, sender sdk.AccAddress, receiver common.Address, coin sdk.Coin) error
}
type IBCChannelKeeper interface {
GetChannelClientState(ctx sdk.Context, portID, channelID string) (string, exported.ClientState, error)
GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
}
type IBCTransferKeeper interface {
SendTransfer(
ctx sdk.Context,
sourcePort,
sourceChannel string,
token sdk.Coin,
sender sdk.AccAddress,
receiver string,
timeoutHeight clienttypes.Height,
timeoutTimestamp uint64,
router string,
fee sdk.Coin,
) error
SetDenomTrace(ctx sdk.Context, denomTrace tranfsertypes.DenomTrace)
}