Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

Commit c5c86c9

Browse files
committed
add fee to account tx
1 parent 5ea6e11 commit c5c86c9

File tree

17 files changed

+241
-11
lines changed

17 files changed

+241
-11
lines changed

clients/python/docs/AddressTx.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**tx_type** | **str** | | defaults to "account"
88
**token_tx_id** | **int** | identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction | [optional]
9+
**fee** | [**Values**](Values.md) | | [optional]
910
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
1011
**is_external** | **bool** | Indicates if this transaction is an external transaction for an eth like currency. | [optional]
1112
**tx_hash** | **str** | Transaction hash | [optional]

clients/python/docs/Link.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**tx_type** | **str** | | defaults to "account"
88
**token_tx_id** | **int** | identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction | [optional]
9+
**fee** | [**Values**](Values.md) | | [optional]
910
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
1011
**is_external** | **bool** | Indicates if this transaction is an external transaction for an eth like currency. | [optional]
1112
**tx_hash** | **str** | Transaction hash | [optional]

clients/python/docs/Tx.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**inputs** | [**TxValues**](TxValues.md) | | [optional]
99
**outputs** | [**TxValues**](TxValues.md) | | [optional]
1010
**token_tx_id** | **int** | identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction | [optional]
11+
**fee** | [**Values**](Values.md) | | [optional]
1112
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
1213
**is_external** | **bool** | Indicates if this transaction is an external transaction for an eth like currency. | [optional]
1314
**currency** | **str** | crypto currency code | [optional]

clients/python/docs/TxAccount.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**to_address** | **str** | Address |
1616
**tx_type** | **str** | | defaults to "account"
1717
**token_tx_id** | **int** | identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction | [optional]
18+
**fee** | [**Values**](Values.md) | | [optional]
1819
**contract_creation** | **bool** | Indicates if this transaction created a new contract. Recipient address is the address of the new contract. | [optional]
1920
**is_external** | **bool** | Indicates if this transaction is an external transaction for an eth like currency. | [optional]
2021
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

clients/python/graphsense/model/address_tx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def openapi_types():
9595
return {
9696
'tx_type': (str,), # noqa: E501
9797
'token_tx_id': (int,), # noqa: E501
98+
'fee': (Values,), # noqa: E501
9899
'contract_creation': (bool,), # noqa: E501
99100
'is_external': (bool,), # noqa: E501
100101
'tx_hash': (str,), # noqa: E501
@@ -125,6 +126,7 @@ def discriminator():
125126
attribute_map = {
126127
'tx_type': 'tx_type', # noqa: E501
127128
'token_tx_id': 'token_tx_id', # noqa: E501
129+
'fee': 'fee', # noqa: E501
128130
'contract_creation': 'contract_creation', # noqa: E501
129131
'is_external': 'is_external', # noqa: E501
130132
'tx_hash': 'tx_hash', # noqa: E501
@@ -180,6 +182,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
180182
through its discriminator because we passed in
181183
_visited_composed_classes = (Animal,)
182184
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
185+
fee (Values): [optional] # noqa: E501
183186
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
184187
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
185188
tx_hash (str): Transaction hash. [optional] # noqa: E501
@@ -294,6 +297,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
294297
through its discriminator because we passed in
295298
_visited_composed_classes = (Animal,)
296299
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
300+
fee (Values): [optional] # noqa: E501
297301
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
298302
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
299303
tx_hash (str): Transaction hash. [optional] # noqa: E501

clients/python/graphsense/model/link.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def openapi_types():
9595
return {
9696
'tx_type': (str,), # noqa: E501
9797
'token_tx_id': (int,), # noqa: E501
98+
'fee': (Values,), # noqa: E501
9899
'contract_creation': (bool,), # noqa: E501
99100
'is_external': (bool,), # noqa: E501
100101
'tx_hash': (str,), # noqa: E501
@@ -126,6 +127,7 @@ def discriminator():
126127
attribute_map = {
127128
'tx_type': 'tx_type', # noqa: E501
128129
'token_tx_id': 'token_tx_id', # noqa: E501
130+
'fee': 'fee', # noqa: E501
129131
'contract_creation': 'contract_creation', # noqa: E501
130132
'is_external': 'is_external', # noqa: E501
131133
'tx_hash': 'tx_hash', # noqa: E501
@@ -182,6 +184,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
182184
through its discriminator because we passed in
183185
_visited_composed_classes = (Animal,)
184186
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
187+
fee (Values): [optional] # noqa: E501
185188
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
186189
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
187190
tx_hash (str): Transaction hash. [optional] # noqa: E501
@@ -297,6 +300,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
297300
through its discriminator because we passed in
298301
_visited_composed_classes = (Animal,)
299302
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
303+
fee (Values): [optional] # noqa: E501
300304
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
301305
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
302306
tx_hash (str): Transaction hash. [optional] # noqa: E501

clients/python/graphsense/model/tx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def openapi_types():
9999
'inputs': (TxValues,), # noqa: E501
100100
'outputs': (TxValues,), # noqa: E501
101101
'token_tx_id': (int,), # noqa: E501
102+
'fee': (Values,), # noqa: E501
102103
'contract_creation': (bool,), # noqa: E501
103104
'is_external': (bool,), # noqa: E501
104105
'currency': (str,), # noqa: E501
@@ -135,6 +136,7 @@ def discriminator():
135136
'inputs': 'inputs', # noqa: E501
136137
'outputs': 'outputs', # noqa: E501
137138
'token_tx_id': 'token_tx_id', # noqa: E501
139+
'fee': 'fee', # noqa: E501
138140
'contract_creation': 'contract_creation', # noqa: E501
139141
'is_external': 'is_external', # noqa: E501
140142
'currency': 'currency', # noqa: E501
@@ -196,6 +198,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
196198
inputs (TxValues): [optional] # noqa: E501
197199
outputs (TxValues): [optional] # noqa: E501
198200
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
201+
fee (Values): [optional] # noqa: E501
199202
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
200203
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
201204
currency (str): crypto currency code. [optional] # noqa: E501
@@ -316,6 +319,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
316319
inputs (TxValues): [optional] # noqa: E501
317320
outputs (TxValues): [optional] # noqa: E501
318321
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
322+
fee (Values): [optional] # noqa: E501
319323
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
320324
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
321325
currency (str): crypto currency code. [optional] # noqa: E501

clients/python/graphsense/model/tx_account.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def openapi_types():
100100
'from_address': (str,), # noqa: E501
101101
'to_address': (str,), # noqa: E501
102102
'token_tx_id': (int,), # noqa: E501
103+
'fee': (Values,), # noqa: E501
103104
'contract_creation': (bool,), # noqa: E501
104105
'is_external': (bool,), # noqa: E501
105106
}
@@ -121,6 +122,7 @@ def discriminator():
121122
'from_address': 'from_address', # noqa: E501
122123
'to_address': 'to_address', # noqa: E501
123124
'token_tx_id': 'token_tx_id', # noqa: E501
125+
'fee': 'fee', # noqa: E501
124126
'contract_creation': 'contract_creation', # noqa: E501
125127
'is_external': 'is_external', # noqa: E501
126128
}
@@ -179,6 +181,7 @@ def _from_openapi_data(cls, identifier, currency, network, tx_hash, height, time
179181
through its discriminator because we passed in
180182
_visited_composed_classes = (Animal,)
181183
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
184+
fee (Values): [optional] # noqa: E501
182185
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
183186
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
184187
"""
@@ -286,6 +289,7 @@ def __init__(self, identifier, currency, network, tx_hash, height, timestamp, va
286289
through its discriminator because we passed in
287290
_visited_composed_classes = (Animal,)
288291
token_tx_id (int): identifies a specific token transaction within a tx_hash, (deprecated) use identifier instead in encapsulates all information that uniquely identifies the transaction. [optional] # noqa: E501
292+
fee (Values): [optional] # noqa: E501
289293
contract_creation (bool): Indicates if this transaction created a new contract. Recipient address is the address of the new contract.. [optional] # noqa: E501
290294
is_external (bool): Indicates if this transaction is an external transaction for an eth like currency.. [optional] # noqa: E501
291295
"""

gsrest/translators.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ def pydantic_tx_account_to_openapi(pydantic_tx: PydanticTxAccount) -> TxAccount:
220220
token_tx_id=pydantic_tx.token_tx_id,
221221
contract_creation=pydantic_tx.contract_creation,
222222
value=pydantic_values_to_openapi(pydantic_tx.value),
223+
fee=pydantic_values_to_openapi(pydantic_tx.fee)
224+
if pydantic_tx.fee is not None
225+
else None,
223226
is_external=pydantic_tx.is_external,
224227
)
225228

openapi_server/models/address_tx.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AddressTx(Model):
1717
Do not edit the class manually.
1818
"""
1919

20-
def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None, coinbase: bool=None, height: int=None, timestamp: int=None, value: Values=None, identifier: str=None, token_tx_id: int=None, network: str=None, from_address: str=None, to_address: str=None, contract_creation: bool=None, is_external: bool=None):
20+
def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None, coinbase: bool=None, height: int=None, timestamp: int=None, value: Values=None, identifier: str=None, token_tx_id: int=None, network: str=None, fee: Values=None, from_address: str=None, to_address: str=None, contract_creation: bool=None, is_external: bool=None):
2121
"""AddressTx - a model defined in OpenAPI
2222
2323
:param tx_type: The tx_type of this AddressTx.
@@ -30,6 +30,7 @@ def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None
3030
:param identifier: The identifier of this AddressTx.
3131
:param token_tx_id: The token_tx_id of this AddressTx.
3232
:param network: The network of this AddressTx.
33+
:param fee: The fee of this AddressTx.
3334
:param from_address: The from_address of this AddressTx.
3435
:param to_address: The to_address of this AddressTx.
3536
:param contract_creation: The contract_creation of this AddressTx.
@@ -46,6 +47,7 @@ def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None
4647
'identifier': str,
4748
'token_tx_id': int,
4849
'network': str,
50+
'fee': Values,
4951
'from_address': str,
5052
'to_address': str,
5153
'contract_creation': bool,
@@ -63,6 +65,7 @@ def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None
6365
'identifier': 'identifier',
6466
'token_tx_id': 'token_tx_id',
6567
'network': 'network',
68+
'fee': 'fee',
6669
'from_address': 'from_address',
6770
'to_address': 'to_address',
6871
'contract_creation': 'contract_creation',
@@ -79,6 +82,7 @@ def __init__(self, tx_type: str='account', tx_hash: str=None, currency: str=None
7982
self._identifier = identifier
8083
self._token_tx_id = token_tx_id
8184
self._network = network
85+
self._fee = fee
8286
self._from_address = from_address
8387
self._to_address = to_address
8488
self._contract_creation = contract_creation
@@ -111,6 +115,7 @@ def to_dict(self, shallow=False):
111115
'identifier': self._identifier,
112116
'token_tx_id': self._token_tx_id,
113117
'network': self._network,
118+
'fee': self._fee,
114119
'from_address': self._from_address,
115120
'to_address': self._to_address,
116121
'contract_creation': self._contract_creation,
@@ -363,6 +368,27 @@ def network(self, network):
363368

364369
self._network = network
365370

371+
@property
372+
def fee(self):
373+
"""Gets the fee of this AddressTx.
374+
375+
376+
:return: The fee of this AddressTx.
377+
:rtype: Values
378+
"""
379+
return self._fee
380+
381+
@fee.setter
382+
def fee(self, fee):
383+
"""Sets the fee of this AddressTx.
384+
385+
386+
:param fee: The fee of this AddressTx.
387+
:type fee: Values
388+
"""
389+
390+
self._fee = fee
391+
366392
@property
367393
def from_address(self):
368394
"""Gets the from_address of this AddressTx.

0 commit comments

Comments
 (0)