keeper

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultParamspace = types.ModuleName
)

Variables

View Source
var (
	Addrs = createTestAddrs(500)
	PKs   = createTestPubKeys(500)
)

Functions

func MakeTestCodec

func MakeTestCodec() *codec.Codec

create a codec used only for testing

func NewPubKey

func NewPubKey(pk string) (res crypto.PubKey)

func ParamKeyTable

func ParamKeyTable() params.KeyTable

func TestAddr

func TestAddr(addr string, bech string) sdk.AccAddress

for incode address generation

Types

type Keeper

type Keeper struct {
	Cdc *codec.Codec

	StateDB *types.CommitStateDB
	// contains filtered or unexported fields
}

func CreateTestInput

func CreateTestInput(t *testing.T, isCheckTx bool, initPower int64) (sdk.Context, auth.AccountKeeper, Keeper, supply.Keeper)

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, paramstore params.Subspace, ak auth.AccountKeeper) Keeper

NewKeeper returns vm keeper

func (*Keeper) GetAllHostContractAddresses

func (k *Keeper) GetAllHostContractAddresses(ctx sdk.Context) []sdk.AccAddress

func (*Keeper) GetCode

func (k *Keeper) GetCode(ctx sdk.Context, addr sdk.AccAddress) []byte

func (*Keeper) GetLogs

func (k *Keeper) GetLogs(ctx sdk.Context, hash sdk.Hash) []*types.Log

func (Keeper) GetMaxCallCreateDepth

func (k Keeper) GetMaxCallCreateDepth(ctx sdk.Context) (res uint64)

GetMaxCallCreateDepth return MaxCallCreateDepth from store

func (Keeper) GetMaxCodeSize

func (k Keeper) GetMaxCodeSize(ctx sdk.Context) (res uint64)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (res types.Params)

func (Keeper) GetState

func (k Keeper) GetState(ctx sdk.Context, addr sdk.AccAddress, hash sdk.Hash) sdk.Hash

func (Keeper) GetVMContractCreationGasParams

func (k Keeper) GetVMContractCreationGasParams(ctx sdk.Context) (params types.VMContractCreationGasParams)

GetVMContractCreationGasParams return VMContractCreationGasParams from store

func (Keeper) GetVMOpGasParams

func (k Keeper) GetVMOpGasParams(ctx sdk.Context) (params [256]uint64)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) SetMaxCallCreateDepth

func (k Keeper) SetMaxCallCreateDepth(ctx sdk.Context, maxCallCreateDepth uint64)

SetMaxCallCreateDepth save MaxCallCreateDepth to store

func (Keeper) SetMaxCodeSize

func (k Keeper) SetMaxCodeSize(ctx sdk.Context, maxCodeSize uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

func (Keeper) SetVMContractCreationGasParams

func (k Keeper) SetVMContractCreationGasParams(ctx sdk.Context, params types.VMContractCreationGasParams)

SetVMContractCreationGasParams save VMContractCreationGasParams to store

func (Keeper) SetVMOpGasParams

func (k Keeper) SetVMOpGasParams(ctx sdk.Context, params [256]uint64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL