mirror of
https://github.com/blockchain-etl/ethereum-etl.git
synced 2026-01-09 13:57:54 -05:00
Dencun transaction and transaction receipt fields
This commit is contained in:
@@ -38,4 +38,5 @@ class EthReceipt(object):
|
||||
self.l1_gas_used = None
|
||||
self.l1_gas_price = None
|
||||
self.l1_fee_scalar = None
|
||||
|
||||
self.blob_gas_price = None
|
||||
self.blob_gas_used = None
|
||||
|
||||
@@ -37,3 +37,5 @@ class EthTransaction(object):
|
||||
self.max_fee_per_gas = None
|
||||
self.max_priority_fee_per_gas = None
|
||||
self.transaction_type = None
|
||||
self.max_fee_per_blob_gas = None
|
||||
self.blob_versioned_hashes = []
|
||||
|
||||
@@ -62,7 +62,9 @@ TRANSACTION_FIELDS_TO_EXPORT = [
|
||||
'block_timestamp',
|
||||
'max_fee_per_gas',
|
||||
'max_priority_fee_per_gas',
|
||||
'transaction_type'
|
||||
'transaction_type',
|
||||
'max_fee_per_blob_gas',
|
||||
'blob_versioned_hashes'
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ RECEIPT_FIELDS_TO_EXPORT = [
|
||||
'l1_gas_used',
|
||||
'l1_gas_price',
|
||||
'l1_fee_scalar'
|
||||
|
||||
'blob_gas_price',
|
||||
'blob_gas_used'
|
||||
]
|
||||
|
||||
LOG_FIELDS_TO_EXPORT = [
|
||||
|
||||
@@ -54,7 +54,8 @@ class EthReceiptMapper(object):
|
||||
receipt.l1_gas_used = hex_to_dec(json_dict.get('l1GasUsed'))
|
||||
receipt.l1_gas_price = hex_to_dec(json_dict.get('l1GasPrice'))
|
||||
receipt.l1_fee_scalar = to_float_or_none(json_dict.get('l1FeeScalar'))
|
||||
|
||||
receipt.blob_gas_price = hex_to_dec(json_dict.get('blobGasPrice'))
|
||||
receipt.blob_gas_used = hex_to_dec(json_dict.get('blobGasUsed'))
|
||||
|
||||
if 'logs' in json_dict:
|
||||
receipt.logs = [
|
||||
@@ -79,6 +80,7 @@ class EthReceiptMapper(object):
|
||||
'l1_fee': receipt.l1_fee,
|
||||
'l1_gas_used': receipt.l1_gas_used,
|
||||
'l1_gas_price': receipt.l1_gas_price,
|
||||
'l1_fee_scalar': receipt.l1_fee_scalar
|
||||
|
||||
'l1_fee_scalar': receipt.l1_fee_scalar,
|
||||
'blob_gas_price': receipt.blob_gas_price,
|
||||
'blob_gas_used': receipt.blob_gas_used
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ class EthTransactionMapper(object):
|
||||
transaction.max_fee_per_gas = hex_to_dec(json_dict.get('maxFeePerGas'))
|
||||
transaction.max_priority_fee_per_gas = hex_to_dec(json_dict.get('maxPriorityFeePerGas'))
|
||||
transaction.transaction_type = hex_to_dec(json_dict.get('type'))
|
||||
transaction.max_fee_per_blob_gas = hex_to_dec(json_dict.get('maxFeePerBlobGas'))
|
||||
transaction.blob_versioned_hashes += json_dict.get('blobVersionedHashes', [])
|
||||
return transaction
|
||||
|
||||
def transaction_to_dict(self, transaction):
|
||||
@@ -62,5 +64,7 @@ class EthTransactionMapper(object):
|
||||
'input': transaction.input,
|
||||
'max_fee_per_gas': transaction.max_fee_per_gas,
|
||||
'max_priority_fee_per_gas': transaction.max_priority_fee_per_gas,
|
||||
'transaction_type': transaction.transaction_type
|
||||
'transaction_type': transaction.transaction_type,
|
||||
"max_fee_per_blob_gas": transaction.max_fee_per_blob_gas,
|
||||
"blob_versioned_hashes": transaction.blob_versioned_hashes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user