enzyme.blue_discovery
Documentation for eth_defi.enzyme.blue_discovery Python module.
Enzyme Blue vault discovery through persistent Dispatcher events.
An Enzyme Blue fund has two proxy contracts: the ERC-20 VaultProxy and
its ComptrollerProxy accessor. Dispatcher.VaultProxyDeployed is the
canonical, release-independent event that records both addresses. Querying
the persistent Dispatcher, rather than each historic FundDeployer, discovers
all Blue releases with one HyperSync stream per chain.
See https://docs.enzyme.finance/enzyme-blue-protocol/architecture/persistent and https://docs.enzyme.finance/enzyme-blue-protocol/architecture/release.
Module Attributes
Deployment constants from Enzyme's chain contract pages. |
Functions
|
Create a Blue scanner candidate from a reviewed Dispatcher event. |
Decode vault, accessor, and name from a Dispatcher deployment event. |
|
|
Return reviewed Blue Dispatcher deployments for |
|
Return persistent Blue Dispatcher addresses for |
|
Return the first supported Blue discovery block for |
Return the Blue |
|
|
Check whether a log is an official configured Blue deployment event. |
Classes
Reviewed persistent Dispatcher deployment for a Blue chain. |
|
A Blue fund decoded from |
- class EnzymeBlueDeployment
Bases:
objectReviewed persistent Dispatcher deployment for a Blue chain.
- dispatcher: eth_typing.evm.HexAddress
Persistent Dispatcher address.
- __init__(chain_id, dispatcher, first_block)
- Parameters
chain_id (int) –
dispatcher (eth_typing.evm.HexAddress) –
first_block (int) –
- Return type
None
- ENZYME_BLUE_DEPLOYMENTS: dict[int, eth_defi.enzyme.blue_discovery.EnzymeBlueDeployment] = {1: EnzymeBlueDeployment(chain_id=1, dispatcher='0xC3DC853dD716bd5754f421ef94fdCbac3902ab32', first_block=11632494), 137: EnzymeBlueDeployment(chain_id=137, dispatcher='0x2e25271297537B8124b8f883a92fFd95C4032733', first_block=25825795), 8453: EnzymeBlueDeployment(chain_id=8453, dispatcher='0xD79FCD6eb56115f9757EC4C90fc2C5D143f83C16', first_block=23178791), 42161: EnzymeBlueDeployment(chain_id=42161, dispatcher='0x8da28441a4c594fD2fac72726C1412d8Cf9E4A19', first_block=230330758)}
Deployment constants from Enzyme’s chain contract pages. The starting blocks are the first supported Blue release blocks in our existing Enzyme deployment registry; scanning begins there, but a single persistent Dispatcher yields every later release and migration.
- class EnzymeBlueVaultFactoryCandidate
Bases:
objectA Blue fund decoded from
Dispatcher.VaultProxyDeployed.- address: eth_typing.evm.HexAddress
Canonical VaultProxy/share-token address.
- dispatcher_address: eth_typing.evm.HexAddress
Persistent Dispatcher which emitted the authoritative event.
- fund_deployer: eth_typing.evm.HexAddress
Release’s FundDeployer, useful for protocol-fee configuration.
- vault_accessor: eth_typing.evm.HexAddress
Paired ComptrollerProxy at fund creation.
- __init__(chain, address, dispatcher_address, fund_deployer, vault_accessor, fund_name, created_block, created_at, transaction_hash, log_index)
- Parameters
chain (int) –
address (eth_typing.evm.HexAddress) –
dispatcher_address (eth_typing.evm.HexAddress) –
fund_deployer (eth_typing.evm.HexAddress) –
vault_accessor (eth_typing.evm.HexAddress) –
fund_name (str) –
created_block (int) –
created_at (datetime.datetime) –
transaction_hash (str) –
log_index (int) –
- Return type
None
- fetch_enzyme_blue_vault_deployed_event_topic()
Return the Blue
Dispatcher.VaultProxyDeployedtopic0.- Return type
- fetch_enzyme_blue_deployments_for_chain(chain_id)
Return reviewed Blue Dispatcher deployments for
chain_id.- Parameters
chain_id (int) –
- Return type
- fetch_enzyme_blue_dispatchers_for_chain(chain_id)
Return persistent Blue Dispatcher addresses for
chain_id.- Parameters
chain_id (int) –
- Return type
- fetch_enzyme_blue_first_block(chain_id)
Return the first supported Blue discovery block for
chain_id.
- decode_enzyme_blue_vault_deployed_event(log)
Decode vault, accessor, and name from a Dispatcher deployment event.
- Parameters
log (Any) –
- Return type
tuple[eth_typing.evm.HexAddress, eth_typing.evm.HexAddress, str]
- create_enzyme_blue_factory_candidate(web3, chain_id, log, timestamp)
Create a Blue scanner candidate from a reviewed Dispatcher event.
- Parameters
web3 (web3.main.Web3) –
chain_id (int) –
log (Any) –
timestamp (datetime.datetime) –
- Return type
eth_defi.enzyme.blue_discovery.EnzymeBlueVaultFactoryCandidate