tokenised_fund.centrifuge.backfill
Documentation for eth_defi.tokenised_fund.centrifuge.backfill Python module.
Register the reviewed JTRSY Tranche token without rewriting price history.
The direct JTRSY Tranche token has no authoritative NAV/share-price
accessor. This migration therefore only upserts its lead and scan metadata;
it intentionally does not alter the shared raw/cleaned price Parquet files or
reader-state pickle. Existing unrelated vault records remain untouched.
Run with:
source .local-test.env && PROTOCOLS=centrifuge poetry run python scripts/backfill-tokenised-funds.py
Set DRY_RUN=true to inspect the planned write. Set VAULT_DB_PATH to
use an alternative metadata database, and END_BLOCK to choose the metadata
block instead of the current Ethereum head.
Functions
|
Upsert the JTRSY lead and metadata row only. |
|
Parse a conventional boolean environment setting. |
|
Load an existing vault database or initialise an empty one. |
Upsert JTRSY metadata without changing chain-wide discovery state. |
- parse_bool_env(name, *, default=False)
Parse a conventional boolean environment setting.
- read_vault_database(path)
Load an existing vault database or initialise an empty one.
- Parameters
path (pathlib.Path) – Vault metadata pickle location.
- Returns
Existing or empty database.
- Return type
- upsert_jtrsy_metadata_preserving_discovery_cursor(vault_db, lead, row)
Upsert JTRSY metadata without changing chain-wide discovery state.
A targeted migration must not advance or initialise the Ethereum discovery cursor because unrelated contracts may still need to be discovered below the metadata block used for this repair.
- Parameters
vault_db (eth_defi.vault.vaultdb.VaultDatabase) – Existing vault metadata database.
lead (eth_defi.erc_4626.discovery_base.PotentialVaultMatch) – Reviewed JTRSY hardcoded lead.
row (eth_defi.vault.vaultdb.VaultRow) – Fresh JTRSY scan row.
- Returns
None.
- Return type
None
- main()
Upsert the JTRSY lead and metadata row only.
This deliberately avoids a historical price scan. A price rewrite with no authoritative NAV would add null-valued history and risk replacing useful unrelated Parquet state.
- Return type
None