2727 Integer ,
2828 LargeBinary ,
2929 MetaData ,
30+ Numeric ,
3031 Text ,
3132)
3233from sqlalchemy .dialects .postgresql import JSONB , UUID
@@ -124,6 +125,35 @@ class EvmBasedLabel(Base): # type: ignore
124125 )
125126
126127
128+ # class EthereumTransaction(Base): # type: ignore
129+ # __tablename__ = "ethereum_transactions"
130+
131+ # hash = Column(
132+ # VARCHAR(256), primary_key=True, unique=True, nullable=False, index=True
133+ # )
134+ # block_number = Column(
135+ # BigInteger,
136+ # ForeignKey("ethereum_blocks.block_number", ondelete="CASCADE"),
137+ # nullable=False,
138+ # index=True,
139+ # )
140+ # from_address = Column(VARCHAR(256), index=True)
141+ # to_address = Column(VARCHAR(256), index=True)
142+ # gas = Column(Numeric(precision=78, scale=0), index=True)
143+ # gas_price = Column(Numeric(precision=78, scale=0), index=True)
144+ # max_fee_per_gas = Column(Numeric(precision=78, scale=0), nullable=True)
145+ # max_priority_fee_per_gas = Column(Numeric(precision=78, scale=0), nullable=True)
146+ # input = Column(Text)
147+ # nonce = Column(VARCHAR(256))
148+ # transaction_index = Column(BigInteger)
149+ # transaction_type = Column(Integer, nullable=True)
150+ # value = Column(Numeric(precision=78, scale=0), index=True)
151+
152+ # indexed_at = Column(
153+ # DateTime(timezone=True), server_default=utcnow(), nullable=False
154+ # )
155+
156+
127157class EvmBasedTransaction (Base ): # type: ignore
128158 __abstract__ = True
129159
@@ -141,15 +171,15 @@ class EvmBasedTransaction(Base): # type: ignore
141171 block_hash = Column (VARCHAR (256 ), nullable = False , index = True )
142172 from_address = Column (LargeBinary , index = True )
143173 to_address = Column (LargeBinary , index = True )
144- gas = Column (BigInteger , index = True )
145- gas_price = Column (BigInteger , index = True )
146- max_fee_per_gas = Column (BigInteger , nullable = True )
147- max_priority_fee_per_gas = Column (BigInteger , nullable = True )
174+ gas = Column (Numeric ( precision = 78 , scale = 0 ) , index = True )
175+ gas_price = Column (Numeric ( precision = 78 , scale = 0 ) , index = True )
176+ max_fee_per_gas = Column (Numeric ( precision = 78 , scale = 0 ) , nullable = True )
177+ max_priority_fee_per_gas = Column (Numeric ( precision = 78 , scale = 0 ) , nullable = True )
148178 input = Column (Text )
149- nonce = Column (BigInteger )
179+ nonce = Column (VARCHAR ( 256 ) )
150180 transaction_index = Column (BigInteger )
151181 transaction_type = Column (Integer , nullable = True )
152- value = Column (BigInteger , index = True )
182+ value = Column (Numeric ( precision = 78 , scale = 0 ) , index = True )
153183
154184 indexed_at = Column (
155185 DateTime (timezone = True ), server_default = utcnow (), nullable = False
0 commit comments