| 41 | |
| 42 | @dataclass |
| 43 | class ProxyManagerMetadata: |
| 44 | # If the user deployed the smart contract the block at which it was mined |
| 45 | # is unknown. |
| 46 | token_network_registry_deployed_at: Optional[BlockNumber] |
| 47 | filters_start_at: BlockNumber |
| 48 | |
| 49 | def __post_init__(self) -> None: |
| 50 | # Having a filter installed before or after the smart contract is |
| 51 | # deployed doesn't make sense. A smaller value will have a negative |
| 52 | # impact on performance (see #3958), a larger value will miss logs. |
| 53 | is_filter_start_valid = ( |
| 54 | self.token_network_registry_deployed_at is None |
| 55 | or self.token_network_registry_deployed_at == self.filters_start_at |
| 56 | ) |
| 57 | if not is_filter_start_valid: |
| 58 | raise ValueError( |
| 59 | "The deployed_at is known, the filters should start at that exact block" |
| 60 | ) |
| 61 | |
| 62 | |
| 63 | class ProxyManager: |
no outgoing calls