mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
4cf41d18c2
Implement GetBalance for extended balances which passes through to `x/bank` for non-extended denoms. This diverges from `x/evmutil` behavior which will panic on non-"akava" calls. Add bank / account keeper mocks for testing, with mockery config for [mockery package setup](https://vektra.github.io/mockery/latest/migrating_to_packages/)
46 lines
1.0 KiB
Go
46 lines
1.0 KiB
Go
package keeper
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
evmtypes "github.com/evmos/ethermint/x/evm/types"
|
|
|
|
"github.com/kava-labs/kava/x/precisebank/types"
|
|
)
|
|
|
|
// Enforce that Keeper implements the expected keeper interfaces
|
|
var _ evmtypes.BankKeeper = Keeper{}
|
|
|
|
// Keeper defines the precisebank module's keeper
|
|
type Keeper struct {
|
|
cdc codec.BinaryCodec
|
|
storeKey storetypes.StoreKey
|
|
|
|
bk types.BankKeeper
|
|
ak types.AccountKeeper
|
|
}
|
|
|
|
// NewKeeper creates a new keeper
|
|
func NewKeeper(
|
|
cdc codec.BinaryCodec,
|
|
storeKey storetypes.StoreKey,
|
|
bk types.BankKeeper,
|
|
ak types.AccountKeeper,
|
|
) Keeper {
|
|
return Keeper{
|
|
cdc: cdc,
|
|
storeKey: storeKey,
|
|
bk: bk,
|
|
ak: ak,
|
|
}
|
|
}
|
|
|
|
func (k Keeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error {
|
|
panic("unimplemented")
|
|
}
|
|
|
|
func (k Keeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error {
|
|
panic("unimplemented")
|
|
}
|