tokenised_fund.theo.backfill
Documentation for eth_defi.tokenised_fund.theo.backfill Python module.
Register canonical Ethereum thBILL without rewriting price history.
thBILL has no reviewed scalar NAV/share source: Theo’s iToken accounting uses a basket of assets. This address-scoped migration therefore upserts only the thBILL discovery lead and scan metadata. It intentionally leaves raw and cleaned price Parquet files plus reader-state data untouched, and restores the existing Ethereum discovery watermark after the metadata write.
Run with source .local-test.env && PROTOCOLS=theo poetry run python scripts/backfill-tokenised-funds.py.
Set DRY_RUN=true to inspect the plan. VAULT_DB_PATH and END_BLOCK
are optional overrides.
Functions
|
Upsert thBILL metadata while preserving all unrelated state. |
|
Parse a conventional boolean environment value. |
|
Read existing metadata or create an empty database. |
- parse_bool_env(name, *, default=False)
Parse a conventional boolean environment value.
- read_vault_database(path)
Read existing metadata or create an empty database.
- Parameters
path (pathlib.Path) – Metadata database path.
- Returns
Existing or new vault database.
- Return type
- main()
Upsert thBILL metadata while preserving all unrelated state.
- Return type
None