Versions in this module Expand all Collapse all v0 v0.19.9 Oct 25, 2021 Changes in this version + const AttributeKeyContractAddress + const AttributeKeyRecipient + const AttributeValueCategory + const BloomBitsBlocks + const BloomFilterThreads + const BloomRetrievalBatch + const BloomRetrievalWait + const BloomServiceThreads + const DefaultCodespace + const DefaultMaxGasLimitPerTx + const DefaultParamspace + const EventTypeEthereumTx + const EventTypeEthermint + const FlagEnableBloomFilter + const ModuleName + const QueryAccount + const QueryBalance + const QueryBlockNumber + const QueryBloom + const QueryCode + const QueryCodeByHash + const QueryContractBlockedList + const QueryContractDeploymentWhitelist + const QueryExportAccount + const QueryHashToHeight + const QueryHeightToHash + const QueryNonce + const QueryParameters + const QuerySection + const QueryStorage + const QueryStorageByKey + const RouterKey + const StoreKey + const TypeMsgEthereumTx + const TypeMsgEthermint + var CodeSpaceEvmCallFailed = uint32(7) + var ErrCallDisabled = sdkerrors.Register(ModuleName, 6, "EVM Call operation is disabled") + var ErrChainConfigNotFound = sdkerrors.Register(ModuleName, 3, "chain configuration not found") + var ErrCreateDisabled = sdkerrors.Register(ModuleName, 5, "EVM Create operation is disabled") + var ErrDuplicatedAddr = sdkerrors.Register(ModuleName, 12, "Duplicated address in address list") + var ErrEmptyAddressList = sdkerrors.Register(ModuleName, 11, "Empty account address list") + var ErrInvalidChainConfig = sdkerrors.Register(ModuleName, 4, "invalid chain configuration") + var ErrInvalidState = sdkerrors.Register(ModuleName, 2, "invalid storage state") + var ErrKeyNotFound = sdkerrors.Register(ModuleName, 8, "Key not found in database") + var ErrStrConvertFailed = sdkerrors.Register(ModuleName, 9, "Failed to convert string") + var ErrUnexpectedProposalType = sdkerrors.Register(ModuleName, 10, "Unsupported proposal type of evm module") + var ErrorHexData = "HexData" + var KeyPrefixBlockHash = []byte + var KeyPrefixBloom = []byte + var KeyPrefixChainConfig = []byte + var KeyPrefixCode = []byte + var KeyPrefixContractBlockedList = []byte + var KeyPrefixContractDeploymentWhitelist = []byte + var KeyPrefixHeightHash = []byte + var KeyPrefixStorage = []byte + var ModuleCdc = codec.New() + var ParamStoreKeyContractBlockedList = []byte("EnableContractBlockedList") + var ParamStoreKeyContractDeploymentWhitelist = []byte("EnableContractDeploymentWhitelist") + var ParamStoreKeyEnableCall = []byte("EnableCall") + var ParamStoreKeyEnableCreate = []byte("EnableCreate") + var ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs") + var ParamStoreKeyMaxGasLimitPerTx = []byte("MaxGasLimitPerTx") + func AddressStoragePrefix(address ethcmn.Address) []byte + func BloomDb() dbm.DB + func BloomKey(height int64) []byte + func EncodeResultData(data ResultData) ([]byte, error) + func ErrCallBlockedContract(contractAddr ethcmn.Address) sdk.EnvelopedErr + func ErrOversizeAddrList(length int) sdk.EnvelopedErr + func ErrUnauthorizedAccount(distributorAddr sdk.AccAddress) sdk.EnvelopedErr + func GenerateEthAddress() ethcmn.Address + func GetContractBlockedListMemberKey(contractAddr sdk.AccAddress) []byte + func GetContractDeploymentWhitelistMemberKey(distributorAddr sdk.AccAddress) []byte + func GetEnableBloomFilter() bool + func GetHashFn(ctx sdk.Context, csdb *CommitStateDB) vm.GetHashFunc + func HeightHashKey(height uint64) []byte + func InitIndexer(db dbm.DB) + func MarshalLogs(logs []*ethtypes.Log) ([]byte, error) + func ParamKeyTable() params.KeyTable + func ReadBloomBits(db ethdb.KeyValueReader, bit uint, section uint64, head common.Hash) ([]byte, error) + func RegisterCodec(cdc *codec.Codec) + func TxDecoder(cdc *codec.Codec) sdk.TxDecoder + func UnmarshalLogs(in []byte) ([]*ethtypes.Log, error) + func ValidateLog(log *ethtypes.Log) error + func ValidateSigner(signBytes, sig []byte, signer ethcmn.Address) error + func WriteBloomBits(batch dbm.Batch, bit uint, section uint64, head common.Hash, bits []byte) + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) authexported.Account + GetAllAccounts func(ctx sdk.Context) (accounts []authexported.Account) + IterateAccounts func(ctx sdk.Context, cb func(account authexported.Account) bool) + NewAccountWithAddress func(ctx sdk.Context, addr sdk.AccAddress) authexported.Account + RemoveAccount func(ctx sdk.Context, account authexported.Account) + SetAccount func(ctx sdk.Context, account authexported.Account) + SetObserverKeeper func(observer auth.ObserverI) + type AddressList []sdk.AccAddress + func (al AddressList) String() string + type BankKeeper interface + BlacklistedAddr func(addr sdk.AccAddress) bool + type CacheCode struct + Code []byte + CodeHash []byte + type ChainConfig struct + ByzantiumBlock sdk.Int + ConstantinopleBlock sdk.Int + DAOForkBlock sdk.Int + DAOForkSupport bool + EIP150Block sdk.Int + EIP150Hash string + EIP155Block sdk.Int + EIP158Block sdk.Int + EWASMBlock sdk.Int + HomesteadBlock sdk.Int + IstanbulBlock sdk.Int + MuirGlacierBlock sdk.Int + PetersburgBlock sdk.Int + YoloV2Block sdk.Int + func DefaultChainConfig() ChainConfig + func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig + func (cc ChainConfig) IsHomestead() bool + func (cc ChainConfig) IsIstanbul() bool + func (cc ChainConfig) String() string + func (cc ChainConfig) Validate() error + type CommitStateDB struct + Watcher Watcher + func CreateEmptyCommitStateDB(csdbParams CommitStateDBParams, ctx sdk.Context) *CommitStateDB + func (csdb *CommitStateDB) AddAddressToAccessList(addr ethcmn.Address) + func (csdb *CommitStateDB) AddBalance(addr ethcmn.Address, amount *big.Int) + func (csdb *CommitStateDB) AddLog(log *ethtypes.Log) + func (csdb *CommitStateDB) AddPreimage(hash ethcmn.Hash, preimage []byte) + func (csdb *CommitStateDB) AddRefund(gas uint64) + func (csdb *CommitStateDB) AddSlotToAccessList(addr ethcmn.Address, slot ethcmn.Hash) + func (csdb *CommitStateDB) AddressInAccessList(addr ethcmn.Address) bool + func (csdb *CommitStateDB) BlockHash() ethcmn.Hash + func (csdb *CommitStateDB) ClearStateObjects() + func (csdb *CommitStateDB) Commit(deleteEmptyObjects bool) (ethcmn.Hash, error) + func (csdb *CommitStateDB) CreateAccount(addr ethcmn.Address) + func (csdb *CommitStateDB) Database() ethstate.Database + func (csdb *CommitStateDB) DeleteContractBlockedList(addrList AddressList) + func (csdb *CommitStateDB) DeleteContractDeploymentWhitelist(addrList AddressList) + func (csdb *CommitStateDB) DeleteLogs(hash ethcmn.Hash) + func (csdb *CommitStateDB) Empty(addr ethcmn.Address) bool + func (csdb *CommitStateDB) Error() error + func (csdb *CommitStateDB) Exist(addr ethcmn.Address) bool + func (csdb *CommitStateDB) Finalise(deleteEmptyObjects bool) error + func (csdb *CommitStateDB) ForEachStorage(addr ethcmn.Address, cb func(key, value ethcmn.Hash) (stop bool)) error + func (csdb *CommitStateDB) GetBalance(addr ethcmn.Address) *big.Int + func (csdb *CommitStateDB) GetCacheCode(addr ethcmn.Address) *CacheCode + func (csdb *CommitStateDB) GetCode(addr ethcmn.Address) []byte + func (csdb *CommitStateDB) GetCodeByHash(hash ethcmn.Hash) []byte + func (csdb *CommitStateDB) GetCodeHash(addr ethcmn.Address) ethcmn.Hash + func (csdb *CommitStateDB) GetCodeSize(addr ethcmn.Address) int + func (csdb *CommitStateDB) GetCommittedState(addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash + func (csdb *CommitStateDB) GetContractBlockedList() (blockedList AddressList) + func (csdb *CommitStateDB) GetContractDeploymentWhitelist() (whitelist AddressList) + func (csdb *CommitStateDB) GetHeightHash(height uint64) ethcmn.Hash + func (csdb *CommitStateDB) GetLogSize() uint + func (csdb *CommitStateDB) GetLogs(hash ethcmn.Hash) ([]*ethtypes.Log, error) + func (csdb *CommitStateDB) GetNonce(addr ethcmn.Address) uint64 + func (csdb *CommitStateDB) GetOrNewStateObject(addr ethcmn.Address) StateObject + func (csdb *CommitStateDB) GetParams() Params + func (csdb *CommitStateDB) GetRefund() uint64 + func (csdb *CommitStateDB) GetState(addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash + func (csdb *CommitStateDB) GetStateByKey(addr ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash + func (csdb *CommitStateDB) HasSuicided(addr ethcmn.Address) bool + func (csdb *CommitStateDB) IntermediateRoot(deleteEmptyObjects bool) (ethcmn.Hash, error) + func (csdb *CommitStateDB) IsContractInBlockedList(contractAddr sdk.AccAddress) bool + func (csdb *CommitStateDB) IsDeployerInWhitelist(deployerAddr sdk.AccAddress) bool + func (csdb *CommitStateDB) IteratorCode(cb func(addr ethcmn.Address, c CacheCode) bool) + func (csdb *CommitStateDB) Preimages() map[ethcmn.Hash][]byte + func (csdb *CommitStateDB) Prepare(thash, bhash ethcmn.Hash, txi int) + func (csdb *CommitStateDB) PrepareAccessList(sender ethcmn.Address, dest *ethcmn.Address, precompiles []ethcmn.Address, ...) + func (csdb *CommitStateDB) RawDump() ethstate.Dump + func (csdb *CommitStateDB) Reset(_ ethcmn.Hash) error + func (csdb *CommitStateDB) RevertToSnapshot(revID int) + func (csdb *CommitStateDB) SetBalance(addr ethcmn.Address, amount *big.Int) + func (csdb *CommitStateDB) SetBlockHash(hash ethcmn.Hash) + func (csdb *CommitStateDB) SetCode(addr ethcmn.Address, code []byte) + func (csdb *CommitStateDB) SetContractBlockedList(addrList AddressList) + func (csdb *CommitStateDB) SetContractDeploymentWhitelist(addrList AddressList) + func (csdb *CommitStateDB) SetHeightHash(height uint64, hash ethcmn.Hash) + func (csdb *CommitStateDB) SetInternalDb(dba DbAdapter) + func (csdb *CommitStateDB) SetLogSize(logSize uint) + func (csdb *CommitStateDB) SetLogs(hash ethcmn.Hash, logs []*ethtypes.Log) error + func (csdb *CommitStateDB) SetNonce(addr ethcmn.Address, nonce uint64) + func (csdb *CommitStateDB) SetParams(params Params) + func (csdb *CommitStateDB) SetState(addr ethcmn.Address, key, value ethcmn.Hash) + func (csdb *CommitStateDB) SlotInAccessList(addr ethcmn.Address, slot ethcmn.Hash) (bool, bool) + func (csdb *CommitStateDB) Snapshot() int + func (csdb *CommitStateDB) StorageTrie(addr ethcmn.Address) ethstate.Trie + func (csdb *CommitStateDB) SubBalance(addr ethcmn.Address, amount *big.Int) + func (csdb *CommitStateDB) SubRefund(gas uint64) + func (csdb *CommitStateDB) Suicide(addr ethcmn.Address) bool + func (csdb *CommitStateDB) TxIndex() int + func (csdb *CommitStateDB) UpdateAccounts() + func (csdb *CommitStateDB) WithContext(ctx sdk.Context) *CommitStateDB + type CommitStateDBParams struct + AccountKeeper AccountKeeper + Ada DbAdapter + BankKeeper BankKeeper + ParamSpace Subspace + StoreKey sdk.StoreKey + SupplyKeeper SupplyKeeper + Watcher Watcher + type DbAdapter interface + NewStore func(parent types.KVStore, prefix []byte) StoreProxy + type DefaultPrefixDb struct + func (d DefaultPrefixDb) NewStore(parent types.KVStore, Prefix []byte) StoreProxy + type ExecutionResult struct + Bloom *big.Int + GasInfo GasInfo + Logs []*ethtypes.Log + Result *sdk.Result + type GasInfo struct + GasConsumed uint64 + GasLimit uint64 + GasRefunded uint64 + type GenesisAccount struct + Address string + Code hexutil.Bytes + Storage Storage + func (ga *GenesisAccount) UnmarshalJSON(input []byte) error + func (ga GenesisAccount) MarshalJSON() ([]byte, error) + func (ga GenesisAccount) Validate() error + type GenesisState struct + Accounts []GenesisAccount + ChainConfig ChainConfig + ContractBlockedList AddressList + ContractDeploymentWhitelist AddressList + Params Params + TxsLogs []TransactionLogs + func DefaultGenesisState() GenesisState + func (gs GenesisState) Validate() error + type Indexer struct + func GetIndexer() *Indexer + func (b *Indexer) GetDB() dbm.DB + func (i *Indexer) GetValidSections() uint64 + func (i *Indexer) IsProcessing() bool + func (i *Indexer) NotifyNewHeight(ctx sdk.Context) + func (i *Indexer) ProcessSection(ctx sdk.Context, k Keeper, interval uint64) + func (i *Indexer) StoredSection() uint64 + type Keeper interface + GetBlockBloom func(ctx sdk.Context, height int64) ethtypes.Bloom + GetHeightHash func(ctx sdk.Context, height uint64) common.Hash + type ManageContractBlockedListProposal struct + ContractAddrs AddressList + Description string + IsAdded bool + Title string + func NewManageContractBlockedListProposal(title, description string, contractAddrs AddressList, isAdded bool) ManageContractBlockedListProposal + func (mp ManageContractBlockedListProposal) GetDescription() string + func (mp ManageContractBlockedListProposal) GetTitle() string + func (mp ManageContractBlockedListProposal) ProposalRoute() string + func (mp ManageContractBlockedListProposal) ProposalType() string + func (mp ManageContractBlockedListProposal) String() string + func (mp ManageContractBlockedListProposal) ValidateBasic() sdk.Error + type ManageContractDeploymentWhitelistProposal struct + Description string + DistributorAddrs AddressList + IsAdded bool + Title string + func NewManageContractDeploymentWhitelistProposal(title, description string, distributorAddrs []sdk.AccAddress, isAdded bool) ManageContractDeploymentWhitelistProposal + func (mp ManageContractDeploymentWhitelistProposal) GetDescription() string + func (mp ManageContractDeploymentWhitelistProposal) GetTitle() string + func (mp ManageContractDeploymentWhitelistProposal) ProposalRoute() string + func (mp ManageContractDeploymentWhitelistProposal) ProposalType() string + func (mp ManageContractDeploymentWhitelistProposal) String() string + func (mp ManageContractDeploymentWhitelistProposal) ValidateBasic() sdk.Error + type MsgEthereumTx struct + Data TxData + func NewMsgEthereumTx(nonce uint64, to *ethcmn.Address, amount *big.Int, gasLimit uint64, ...) MsgEthereumTx + func NewMsgEthereumTxContract(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, ...) MsgEthereumTx + func (msg *MsgEthereumTx) ChainID() *big.Int + func (msg *MsgEthereumTx) DecodeRLP(s *rlp.Stream) error + func (msg *MsgEthereumTx) EncodeRLP(w io.Writer) error + func (msg *MsgEthereumTx) From() sdk.AccAddress + func (msg *MsgEthereumTx) Sign(chainID *big.Int, priv *ecdsa.PrivateKey) error + func (msg *MsgEthereumTx) VerifySig(chainID *big.Int, height int64) (ethcmn.Address, error) + func (msg MsgEthereumTx) Cost() *big.Int + func (msg MsgEthereumTx) Fee() *big.Int + func (msg MsgEthereumTx) FeePayer(ctx sdk.Context) sdk.AccAddress + func (msg MsgEthereumTx) GetFee() sdk.Coins + func (msg MsgEthereumTx) GetGas() uint64 + func (msg MsgEthereumTx) GetMsgs() []sdk.Msg + func (msg MsgEthereumTx) GetSignBytes() []byte + func (msg MsgEthereumTx) GetSigners() []sdk.AccAddress + func (msg MsgEthereumTx) GetTxInfo(ctx sdk.Context) mempool.ExTxInfo + func (msg MsgEthereumTx) HomesteadSignHash() ethcmn.Hash + func (msg MsgEthereumTx) RLPSignBytes(chainID *big.Int) ethcmn.Hash + func (msg MsgEthereumTx) RawSignatureValues() (v, r, s *big.Int) + func (msg MsgEthereumTx) Route() string + func (msg MsgEthereumTx) String() string + func (msg MsgEthereumTx) To() *ethcmn.Address + func (msg MsgEthereumTx) Type() string + func (msg MsgEthereumTx) ValidateBasic() error + type MsgEthermint struct + AccountNonce uint64 + Amount sdk.Int + From sdk.AccAddress + GasLimit uint64 + Payload []byte + Price sdk.Int + Recipient *sdk.AccAddress + func NewMsgEthermint(nonce uint64, to *sdk.AccAddress, amount sdk.Int, gasLimit uint64, ...) MsgEthermint + func (msg MsgEthermint) GetSignBytes() []byte + func (msg MsgEthermint) GetSigners() []sdk.AccAddress + func (msg MsgEthermint) Route() string + func (msg MsgEthermint) String() string + func (msg MsgEthermint) To() *ethcmn.Address + func (msg MsgEthermint) Type() string + func (msg MsgEthermint) ValidateBasic() error + type Params struct + EnableCall bool + EnableContractBlockedList bool + EnableContractDeploymentWhitelist bool + EnableCreate bool + ExtraEIPs []int + MaxGasLimitPerTx uint64 + func DefaultParams() Params + func NewParams(enableCreate, enableCall, enableContractDeploymentWhitelist, ... bool, ...) Params + func (p *Params) ParamSetPairs() params.ParamSetPairs + func (p Params) String() string + func (p Params) Validate() error + type QueryBloomFilter struct + Bloom ethtypes.Bloom + func (q QueryBloomFilter) String() string + type QueryETHLogs struct + Logs []*ethtypes.Log + func (q QueryETHLogs) String() string + type QueryResAccount struct + Balance string + CodeHash []byte + Nonce uint64 + type QueryResBalance struct + Balance string + func (q QueryResBalance) String() string + type QueryResBlockNumber struct + Number int64 + func (q QueryResBlockNumber) String() string + type QueryResCode struct + Code []byte + func (q QueryResCode) String() string + type QueryResExportAccount = GenesisAccount + type QueryResNonce struct + Nonce uint64 + func (q QueryResNonce) String() string + type QueryResStorage struct + Value []byte + func (q QueryResStorage) String() string + type ResultData struct + Bloom ethtypes.Bloom + ContractAddress ethcmn.Address + Logs []*ethtypes.Log + Ret []byte + TxHash ethcmn.Hash + func DecodeResultData(in []byte) (ResultData, error) + func (rd ResultData) String() string + type State struct + Key ethcmn.Hash + Value ethcmn.Hash + func NewState(key, value ethcmn.Hash) State + func (s *State) UnmarshalJSON(input []byte) error + func (s State) MarshalJSON() ([]byte, error) + func (s State) Validate() error + type StateObject interface + AddBalance func(amount *big.Int) + Address func() ethcmn.Address + Balance func() *big.Int + Code func(db ethstate.Database) []byte + CodeHash func() []byte + GetCommittedState func(db ethstate.Database, key ethcmn.Hash) ethcmn.Hash + GetState func(db ethstate.Database, key ethcmn.Hash) ethcmn.Hash + Nonce func() uint64 + ReturnGas func(gas *big.Int) + SetBalance func(amount *big.Int) + SetCode func(codeHash ethcmn.Hash, code []byte) + SetNonce func(nonce uint64) + SetState func(db ethstate.Database, key, value ethcmn.Hash) + SubBalance func(amount *big.Int) + type StateTransition struct + AccountNonce uint64 + Amount *big.Int + ChainID *big.Int + Csdb *CommitStateDB + GasLimit uint64 + Payload []byte + Price *big.Int + Recipient *common.Address + Sender common.Address + Simulate bool + TxHash *common.Hash + func (st StateTransition) TransitionDb(ctx sdk.Context, config ChainConfig) (exeRes *ExecutionResult, resData *ResultData, err error) + type Storage []State + func (s Storage) Copy() Storage + func (s Storage) String() string + func (s Storage) Validate() error + type StoreProxy interface + Delete func(key []byte) + Get func(key []byte) []byte + Has func(key []byte) bool + Set func(key, value []byte) + type Subspace interface + GetParamSet func(ctx sdk.Context, ps params.ParamSet) + SetParamSet func(ctx sdk.Context, ps params.ParamSet) + type SupplyKeeper interface + SendCoinsFromModuleToAccount func(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error + type TransactionLogs struct + Hash ethcmn.Hash + Logs []*ethtypes.Log + func NewTransactionLogs(hash ethcmn.Hash, logs []*ethtypes.Log) TransactionLogs + func (tx TransactionLogs) Validate() error + type TxData struct + AccountNonce uint64 + Amount *big.Int + GasLimit uint64 + Hash *ethcmn.Hash + Payload []byte + Price *big.Int + R *big.Int + Recipient *ethcmn.Address + S *big.Int + V *big.Int + func (td *TxData) UnmarshalAmino(data []byte) error + func (td TxData) MarshalAmino() ([]byte, error) + func (td TxData) String() string + type Watcher interface + DeleteContractBlockedList func(addr sdk.AccAddress) + DeleteContractDeploymentWhitelist func(addr sdk.AccAddress) + Enabled func() bool + SaveAccount func(account auth.Account, isDirectly bool) + SaveContractBlockedListItem func(addr sdk.AccAddress) + SaveContractDeploymentWhitelistItem func(addr sdk.AccAddress) + SaveState func(addr ethcmn.Address, key, value []byte)