mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
cf396e3661
This separates the regeneration step from the build/install step. This is to simplify bootstrapping: trezorlib is needed in several build/test steps, and bound to be needed in more. It should be usable and installable straight from the checkout.
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
# Automatically generated by pb2py
|
|
# fmt: off
|
|
from .. import protobuf as p
|
|
|
|
from .OntologyTxAttribute import OntologyTxAttribute
|
|
|
|
if __debug__:
|
|
try:
|
|
from typing import List
|
|
except ImportError:
|
|
List = None # type: ignore
|
|
|
|
|
|
class OntologyTransaction(p.MessageType):
|
|
|
|
def __init__(
|
|
self,
|
|
version: int = None,
|
|
type: int = None,
|
|
nonce: int = None,
|
|
gas_price: int = None,
|
|
gas_limit: int = None,
|
|
payer: str = None,
|
|
tx_attributes: List[OntologyTxAttribute] = None,
|
|
) -> None:
|
|
self.version = version
|
|
self.type = type
|
|
self.nonce = nonce
|
|
self.gas_price = gas_price
|
|
self.gas_limit = gas_limit
|
|
self.payer = payer
|
|
self.tx_attributes = tx_attributes if tx_attributes is not None else []
|
|
|
|
@classmethod
|
|
def get_fields(cls):
|
|
return {
|
|
1: ('version', p.UVarintType, 0),
|
|
2: ('type', p.UVarintType, 0),
|
|
3: ('nonce', p.UVarintType, 0),
|
|
4: ('gas_price', p.UVarintType, 0),
|
|
5: ('gas_limit', p.UVarintType, 0),
|
|
6: ('payer', p.UnicodeType, 0),
|
|
7: ('tx_attributes', OntologyTxAttribute, p.FLAG_REPEATED),
|
|
}
|