You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/trezor/messages/EthereumSignTx.py

55 lines
1.7 KiB

# Automatically generated by pb2py
# fmt: off
import protobuf as p
if __debug__:
try:
from typing import Dict, List, Optional # noqa: F401
from typing_extensions import Literal # noqa: F401
except ImportError:
pass
class EthereumSignTx(p.MessageType):
MESSAGE_WIRE_TYPE = 58
def __init__(
self,
*,
address_n: Optional[List[int]] = None,
nonce: Optional[bytes] = None,
gas_price: Optional[bytes] = None,
gas_limit: Optional[bytes] = None,
to: Optional[str] = None,
value: Optional[bytes] = None,
data_initial_chunk: Optional[bytes] = None,
data_length: Optional[int] = None,
chain_id: Optional[int] = None,
tx_type: Optional[int] = None,
) -> None:
self.address_n = address_n if address_n is not None else []
self.nonce = nonce
self.gas_price = gas_price
self.gas_limit = gas_limit
self.to = to
self.value = value
self.data_initial_chunk = data_initial_chunk
self.data_length = data_length
self.chain_id = chain_id
self.tx_type = tx_type
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('address_n', p.UVarintType, p.FLAG_REPEATED),
2: ('nonce', p.BytesType, None),
3: ('gas_price', p.BytesType, None),
4: ('gas_limit', p.BytesType, None),
11: ('to', p.UnicodeType, None),
6: ('value', p.BytesType, None),
7: ('data_initial_chunk', p.BytesType, None),
8: ('data_length', p.UVarintType, None),
9: ('chain_id', p.UVarintType, None),
10: ('tx_type', p.UVarintType, None),
}