-
Notifications
You must be signed in to change notification settings - Fork 92
/
expected_keepers.go
37 lines (28 loc) · 1.26 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
package types
import (
"context"
sdk "github.com/cosmos/cosmos-sdk/types"
intenttypes "github.com/warden-protocol/wardenprotocol/warden/x/intent/types"
)
// AccountKeeper defines the expected interface for the Account module.
type AccountKeeper interface {
GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation
// Methods imported from account should be defined here
}
// BankKeeper defines the expected interface for the Bank module.
type BankKeeper interface {
SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
// Methods imported from bank should be defined here
}
// IntentKeeper defined the expected interface for the Intent module.
type IntentKeeper interface {
AddAction(ctx sdk.Context, creator string, msg sdk.Msg, intent intenttypes.Intent, btl uint64) (*intenttypes.Action, error)
CheckActionReady(ctx sdk.Context, act intenttypes.Action) (bool, error)
GetIntent(ctx sdk.Context, id uint64) (intenttypes.Intent, error)
RegisterActionHandler(actionType string, handlerFn intenttypes.ActionHandler)
}
// ParamSubspace defines the expected Subspace interface for parameters.
type ParamSubspace interface {
Get(context.Context, []byte, interface{})
Set(context.Context, []byte, interface{})
}