2024-05-10 16:30:28 +00:00
|
|
|
package keeper
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
|
|
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
2024-05-24 19:03:09 +00:00
|
|
|
|
2024-05-21 21:11:13 +00:00
|
|
|
evmtypes "github.com/evmos/ethermint/x/evm/types"
|
|
|
|
|
2024-09-25 15:31:20 +00:00
|
|
|
"github.com/0glabs/0g-chain/x/precisebank/types"
|
2024-05-10 16:30:28 +00:00
|
|
|
)
|
|
|
|
|
2024-05-21 21:11:13 +00:00
|
|
|
// Enforce that Keeper implements the expected keeper interfaces
|
|
|
|
var _ evmtypes.BankKeeper = Keeper{}
|
2024-05-10 16:30:28 +00:00
|
|
|
|
|
|
|
// Keeper defines the precisebank module's keeper
|
|
|
|
type Keeper struct {
|
|
|
|
cdc codec.BinaryCodec
|
|
|
|
storeKey storetypes.StoreKey
|
2024-05-21 21:11:13 +00:00
|
|
|
|
|
|
|
bk types.BankKeeper
|
|
|
|
ak types.AccountKeeper
|
2024-05-10 16:30:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewKeeper creates a new keeper
|
2024-05-21 21:11:13 +00:00
|
|
|
func NewKeeper(
|
|
|
|
cdc codec.BinaryCodec,
|
|
|
|
storeKey storetypes.StoreKey,
|
|
|
|
bk types.BankKeeper,
|
|
|
|
ak types.AccountKeeper,
|
|
|
|
) Keeper {
|
2024-05-10 16:30:28 +00:00
|
|
|
return Keeper{
|
|
|
|
cdc: cdc,
|
|
|
|
storeKey: storeKey,
|
2024-05-21 21:11:13 +00:00
|
|
|
bk: bk,
|
|
|
|
ak: ak,
|
2024-05-10 16:30:28 +00:00
|
|
|
}
|
|
|
|
}
|