Documentation ¶
Index ¶
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k *Keeper) AddBalance(ctx sdk.Context, addr ethcmn.Address, amount *big.Int)
- func (k *Keeper) AddLog(ctx sdk.Context, log *ethtypes.Log)
- func (k *Keeper) AddPreimage(ctx sdk.Context, hash ethcmn.Hash, preimage []byte)
- func (k *Keeper) AddRefund(ctx sdk.Context, gas uint64)
- func (k *Keeper) AllLogs(ctx sdk.Context) []*ethtypes.Log
- func (k *Keeper) BlockHash(ctx sdk.Context) ethcmn.Hash
- func (k *Keeper) ClearStateObjects(ctx sdk.Context)
- func (k *Keeper) Commit(ctx sdk.Context, deleteEmptyObjects bool) (root ethcmn.Hash, err error)
- func (k *Keeper) Copy(ctx sdk.Context) ethvm.StateDB
- func (k *Keeper) CreateAccount(ctx sdk.Context, addr ethcmn.Address)
- func (k *Keeper) Database(ctx sdk.Context) ethstate.Database
- func (k *Keeper) DeleteLogs(ctx sdk.Context, hash ethcmn.Hash)
- func (k *Keeper) Empty(ctx sdk.Context, addr ethcmn.Address) bool
- func (k *Keeper) Error(ctx sdk.Context) error
- func (k *Keeper) Exist(ctx sdk.Context, addr ethcmn.Address) bool
- func (k *Keeper) Finalise(ctx sdk.Context, deleteEmptyObjects bool) error
- func (k *Keeper) ForEachStorage(ctx sdk.Context, addr ethcmn.Address, cb func(key, value ethcmn.Hash) bool) error
- func (k Keeper) GetAccountStorage(ctx sdk.Context, address common.Address) (types.Storage, error)
- func (k Keeper) GetAllTxLogs(ctx sdk.Context) []types.TransactionLogs
- func (k *Keeper) GetBalance(ctx sdk.Context, addr ethcmn.Address) *big.Int
- func (k Keeper) GetBlockBloom(ctx sdk.Context, height int64) (ethtypes.Bloom, bool)
- func (k Keeper) GetBlockHash(ctx sdk.Context, hash []byte) (int64, bool)
- func (k Keeper) GetChainConfig(ctx sdk.Context) (types.ChainConfig, bool)
- func (k *Keeper) GetCode(ctx sdk.Context, addr ethcmn.Address) []byte
- func (k *Keeper) GetCodeHash(ctx sdk.Context, addr ethcmn.Address) ethcmn.Hash
- func (k *Keeper) GetCodeSize(ctx sdk.Context, addr ethcmn.Address) int
- func (k *Keeper) GetCommittedState(ctx sdk.Context, addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash
- func (k *Keeper) GetLogs(ctx sdk.Context, hash ethcmn.Hash) ([]*ethtypes.Log, error)
- func (k *Keeper) GetNonce(ctx sdk.Context, addr ethcmn.Address) uint64
- func (k *Keeper) GetOrNewStateObject(ctx sdk.Context, addr ethcmn.Address) types.StateObject
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k *Keeper) GetRefund(ctx sdk.Context) uint64
- func (k *Keeper) GetState(ctx sdk.Context, addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash
- func (k *Keeper) HasSuicided(ctx sdk.Context, addr ethcmn.Address) bool
- func (k *Keeper) IntermediateRoot(ctx sdk.Context, deleteEmptyObjects bool) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) Preimages(ctx sdk.Context) map[ethcmn.Hash][]byte
- func (k *Keeper) Prepare(ctx sdk.Context, thash, bhash ethcmn.Hash, txi int)
- func (k *Keeper) Reset(ctx sdk.Context, root ethcmn.Hash) error
- func (k *Keeper) RevertToSnapshot(ctx sdk.Context, revID int)
- func (k *Keeper) SetBalance(ctx sdk.Context, addr ethcmn.Address, amount *big.Int)
- func (k Keeper) SetBlockBloom(ctx sdk.Context, height int64, bloom ethtypes.Bloom)
- func (k Keeper) SetBlockHash(ctx sdk.Context, hash []byte, height int64)
- func (k Keeper) SetChainConfig(ctx sdk.Context, config types.ChainConfig)
- func (k *Keeper) SetCode(ctx sdk.Context, addr ethcmn.Address, code []byte)
- func (k *Keeper) SetLogs(ctx sdk.Context, hash ethcmn.Hash, logs []*ethtypes.Log) error
- func (k *Keeper) SetNonce(ctx sdk.Context, addr ethcmn.Address, nonce uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k *Keeper) SetState(ctx sdk.Context, addr ethcmn.Address, key, value ethcmn.Hash)
- func (k *Keeper) Snapshot(ctx sdk.Context) int
- func (k *Keeper) StorageTrie(ctx sdk.Context, addr ethcmn.Address) ethstate.Trie
- func (k *Keeper) SubBalance(ctx sdk.Context, addr ethcmn.Address, amount *big.Int)
- func (k *Keeper) SubRefund(ctx sdk.Context, gas uint64)
- func (k *Keeper) Suicide(ctx sdk.Context, addr ethcmn.Address) bool
- func (k *Keeper) TxIndex(ctx sdk.Context) int
- func (k *Keeper) UpdateAccounts(ctx sdk.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier is the module level router for state queries
Types ¶
type Keeper ¶
type Keeper struct { // Ethermint concrete implementation on the EVM StateDB interface CommitStateDB *types.CommitStateDB // Transaction counter in a block. Used on StateSB's Prepare function. // It is reset to 0 every block on BeginBlock so there's no point in storing the counter // on the KVStore or adding it as a field on the EVM genesis state. TxCount int Bloom *big.Int // contains filtered or unexported fields }
Keeper wraps the CommitStateDB, allowing us to pass in SDK context while adhering to the StateDB interface.
func NewKeeper ¶
func NewKeeper( cdc *codec.Codec, storeKey sdk.StoreKey, paramSpace params.Subspace, ak types.AccountKeeper, ) Keeper
NewKeeper generates new evm module keeper
func (*Keeper) AddBalance ¶
AddBalance calls CommitStateDB.AddBalance using the passed in context
func (*Keeper) AddPreimage ¶
AddPreimage calls CommitStateDB.AddPreimage using the passed in context
func (*Keeper) ClearStateObjects ¶
ClearStateObjects calls CommitStateDB.ClearStateObjects using the passed in context
func (*Keeper) CreateAccount ¶
CreateAccount calls CommitStateDB.CreateAccount using the passed in context
func (*Keeper) DeleteLogs ¶ added in v0.1.0
DeleteLogs calls CommitStateDB.DeleteLogs using the passed in context
func (*Keeper) ForEachStorage ¶
func (k *Keeper) ForEachStorage(ctx sdk.Context, addr ethcmn.Address, cb func(key, value ethcmn.Hash) bool) error
ForEachStorage calls CommitStateDB.ForEachStorage using passed in context
func (Keeper) GetAccountStorage ¶ added in v0.1.0
GetAccountStorage return state storage associated with an account
func (Keeper) GetAllTxLogs ¶
func (k Keeper) GetAllTxLogs(ctx sdk.Context) []types.TransactionLogs
GetAllTxLogs return all the transaction logs from the store.
func (*Keeper) GetBalance ¶
GetBalance calls CommitStateDB.GetBalance using the passed in context
func (Keeper) GetBlockBloom ¶
GetBlockBloom gets bloombits from block height
func (Keeper) GetBlockHash ¶
GetBlockHash gets block height from block consensus hash
func (Keeper) GetChainConfig ¶ added in v0.2.0
GetChainConfig gets block height from block consensus hash
func (*Keeper) GetCodeHash ¶
GetCodeHash calls CommitStateDB.GetCodeHash using the passed in context
func (*Keeper) GetCodeSize ¶
GetCodeSize calls CommitStateDB.GetCodeSize using the passed in context
func (*Keeper) GetCommittedState ¶
func (k *Keeper) GetCommittedState(ctx sdk.Context, addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash
GetCommittedState calls CommitStateDB.GetCommittedState using the passed in context
func (*Keeper) GetOrNewStateObject ¶
GetOrNewStateObject calls CommitStateDB.GetOrNetStateObject using the passed in context
func (*Keeper) HasSuicided ¶
HasSuicided calls CommitStateDB.HasSuicided using the passed in context
func (*Keeper) IntermediateRoot ¶
IntermediateRoot calls CommitStateDB.IntermediateRoot using the passed in context
func (*Keeper) RevertToSnapshot ¶
RevertToSnapshot calls CommitStateDB.RevertToSnapshot using the passed in context
func (*Keeper) SetBalance ¶
SetBalance calls CommitStateDB.SetBalance using the passed in context
func (Keeper) SetBlockBloom ¶
SetBlockBloom sets the mapping from block height to bloom bits
func (Keeper) SetBlockHash ¶
SetBlockHash sets the mapping from block consensus hash to block height
func (Keeper) SetChainConfig ¶ added in v0.2.0
func (k Keeper) SetChainConfig(ctx sdk.Context, config types.ChainConfig)
SetChainConfig sets the mapping from block consensus hash to block height
func (*Keeper) StorageTrie ¶
StorageTrie calls CommitStateDB.StorageTrie using the passed in context
func (*Keeper) SubBalance ¶
SubBalance calls CommitStateDB.SubBalance using the passed in context
func (*Keeper) UpdateAccounts ¶
UpdateAccounts calls CommitStateDB.UpdateAccounts using the passed in context