Add swap model
This commit is contained in:
parent
ed23024bfd
commit
55b162ab88
20
mev_inspect/models/swaps.py
Normal file
20
mev_inspect/models/swaps.py
Normal file
@ -0,0 +1,20 @@
|
||||
from sqlalchemy import Column, Numeric, String
|
||||
|
||||
from .base import Base
|
||||
|
||||
|
||||
class SwapModel(Base):
|
||||
__tablename__ = "swaps"
|
||||
|
||||
abi_name = Column(String, nullable=False)
|
||||
transaction_hash = Column(String, primary_key=True)
|
||||
block_number = Column(Numeric, nullable=False)
|
||||
trace_address = Column(String, primary_key=True)
|
||||
protocol = Column(String, nullable=True)
|
||||
pool_address = Column(String, nullable=False)
|
||||
from_address = Column(String, nullable=False)
|
||||
to_address = Column(String, nullable=False)
|
||||
token_in_address = Column(String, nullable=False)
|
||||
token_in_amount = Column(Numeric, nullable=False)
|
||||
token_out_address = Column(String, nullable=False)
|
||||
token_out_amount = Column(Numeric, nullable=False)
|
Loading…
x
Reference in New Issue
Block a user