-
Notifications
You must be signed in to change notification settings - Fork 10
/
expected_keepers.go
38 lines (31 loc) · 1.08 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
package types
import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)
type SmartQuerier interface {
QuerySmart(ctx sdk.Context, contractAddr sdk.AccAddress, req []byte) ([]byte, error)
}
// Sudoer with access to sudo method
type Sudoer interface {
Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
}
// Executor with access to execute method
type Executor interface {
Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error)
}
// TWasmKeeper is a subset of x/twasm keeper
type TWasmKeeper interface {
SmartQuerier
Sudoer
GetContractKeeper() wasmtypes.ContractOpsKeeper
}
// BankKeeper is a subset of the SDK bank keeper
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}
// AccountKeeper is a subset of the SDK account keeper
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}