VaultSettlement

Documentation for eth_defi.vault.settlement_data.VaultSettlement Python class.

class VaultSettlement

Bases: object

One asynchronous vault settlement transaction.

Parameters
  • chain_id – EVM chain id.

  • address – Vault address.

  • block_number – Settlement block number.

  • protocol – Protocol name, e.g. "Lagoon Finance".

  • block_hash – Settlement block hash.

  • timestamp – Naive UTC block timestamp.

  • tx_hash – Settlement transaction hash.

  • event_name – Protocol event name, e.g. "SettleDeposit".

  • inserted_at – Naive UTC timestamp when this row was inserted. None uses current time during database insert.

Attributes summary

chain_id

address

block_number

protocol

block_hash

timestamp

tx_hash

event_name

inserted_at

Methods summary

__init__(chain_id, address, block_number, ...)

as_db_tuple(inserted_at)

Convert to a DuckDB insert tuple.

as_db_tuple(inserted_at)

Convert to a DuckDB insert tuple.

Parameters

inserted_at (datetime.datetime) – Insert timestamp to use when this event does not already specify one.

Returns

Tuple matching the vault_settlements table schema.

Return type

tuple

__init__(chain_id, address, block_number, protocol, block_hash, timestamp, tx_hash, event_name='', inserted_at=None)
Parameters
Return type

None