# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: ethermint/types/v1/account.proto, ethermint/types/v1/dynamic_fee.proto, ethermint/types/v1/indexer.proto, ethermint/types/v1/web3.proto
# plugin: python-betterproto
# This file has been @generated
from dataclasses import dataclass

import betterproto

from ....cosmos.auth import v1beta1 as ___cosmos_auth_v1_beta1__


@dataclass(eq=False, repr=False)
class TxResult(betterproto.Message):
    """TxResult is the value stored in eth tx indexer"""

    height: int = betterproto.int64_field(1)
    """the block height"""

    tx_index: int = betterproto.uint32_field(2)
    """cosmos tx index"""

    msg_index: int = betterproto.uint32_field(3)
    """the msg index in a batch tx"""

    eth_tx_index: int = betterproto.int32_field(4)
    """
    eth tx index, the index in the list of valid eth tx in the block,
    aka. the transaction list returned by eth_getBlock api.
    """

    failed: bool = betterproto.bool_field(5)
    """if the eth tx is failed"""

    gas_used: int = betterproto.uint64_field(6)
    """
    gas used by tx, if exceeds block gas limit,
    it's set to gas limit which is what's actually deducted by ante handler.
    """

    cumulative_gas_used: int = betterproto.uint64_field(7)
    """the cumulative gas used within current batch tx"""


@dataclass(eq=False, repr=False)
class ExtensionOptionsWeb3Tx(betterproto.Message):
    typed_data_chain_id: int = betterproto.uint64_field(1)
    """
    typed data chain id used only in EIP712 Domain and should match
    Ethereum network ID in a Web3 provider (e.g. Metamask).
    """

    fee_payer: str = betterproto.string_field(2)
    """
    fee payer is an account address for the fee payer. It will be validated
    during EIP712 signature checking.
    """

    fee_payer_sig: bytes = betterproto.bytes_field(3)
    """
    fee payer sig is a signature data from the fee paying account,
    allows to perform fee delegation when using EIP712 Domain.
    """


@dataclass(eq=False, repr=False)
class ExtensionOptionDynamicFeeTx(betterproto.Message):
    """
    ExtensionOptionDynamicFeeTx is an extension option that specify the maxPrioPrice
    for cosmos tx
    """

    max_priority_price: str = betterproto.string_field(1)
    """the same as `max_priority_fee_per_gas` in eip-1559 spec"""


@dataclass(eq=False, repr=False)
class EthAccount(betterproto.Message):
    """
    EthAccount implements the authtypes.AccountI interface and embeds an
    authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.
    """

    base_account: '___cosmos_auth_v1_beta1__.BaseAccount' = betterproto.message_field(1)
    code_hash: str = betterproto.string_field(2)
