EnzymeContracts
Documentation for eth_defi.enzyme.deployment.EnzymeContracts Python class.
- class EnzymeContracts
Bases:
objectManage the registry of Enzyme contracts.
See Enzyme specification documentation for overview of different contracts.
Mimics Deployer.sol from Enzyme unit tests.
Attributes summary
web3deployerdispatcherexternal_position_factoryprotocol_fee_reserve_libprotocol_fee_reserve_proxyEnzyme Council maintained address list.
fund_deployervalue_interpreterpolicy_managerexternal_position_managerfee_managerintegration_managercomptroller_libprotocol_fee_trackervault_libgas_relay_paymaster_libgas_relay_paymaster_factoryfund_value_calculatorcumulative_slippage_tolerance_policyallowed_adapters_policyonly_remove_dust_external_position_policyonly_untrack_dust_or_priceless_assets_policyallowed_external_position_types_policyMethods summary
__init__(web3, deployer[, dispatcher, ...])deploy(contract_name, *args)Deploys a contract and stores its reference.
Return all labeled addresses as a dict.
get_deployed_contract(contract_name, address)Helper access for IVault and IComptroller
Helper access for IVault and IComptroller
- address_list_registry: web3.contract.contract.Contract
Enzyme Council maintained address list.
Audited adapters.
- deploy(contract_name, *args)
Deploys a contract and stores its reference.
Pick ABI JSON file from our precompiled package.
- Parameters
contract_name (str) –
- get_deployed_contract(contract_name, address)
Helper access for IVault and IComptroller
- Parameters
contract_name (str) –
address (eth_typing.evm.HexAddress) –
- Return type
web3.contract.contract.Contract
- get_optionally_deployed_contract(contract_name, address)
Helper access for IVault and IComptroller
- Parameters
contract_name (str) –
address (Optional[eth_typing.evm.HexAddress]) –
- Return type
web3.contract.contract.Contract | None
- get_all_addresses()
Return all labeled addresses as a dict.
- __init__(web3, deployer, dispatcher=None, external_position_factory=None, protocol_fee_reserve_lib=None, protocol_fee_reserve_proxy=None, address_list_registry=None, fund_deployer=None, value_interpreter=None, policy_manager=None, external_position_manager=None, fee_manager=None, integration_manager=None, comptroller_lib=None, protocol_fee_tracker=None, vault_lib=None, gas_relay_paymaster_lib=None, gas_relay_paymaster_factory=None, fund_value_calculator=None, cumulative_slippage_tolerance_policy=None, allowed_adapters_policy=None, only_remove_dust_external_position_policy=None, only_untrack_dust_or_priceless_assets_policy=None, allowed_external_position_types_policy=None)
- Parameters
web3 (web3.main.Web3) –
deployer (Optional[eth_typing.evm.HexAddress]) –
dispatcher (web3.contract.contract.Contract) –
external_position_factory (web3.contract.contract.Contract) –
protocol_fee_reserve_lib (web3.contract.contract.Contract) –
protocol_fee_reserve_proxy (web3.contract.contract.Contract) –
address_list_registry (web3.contract.contract.Contract) –
fund_deployer (web3.contract.contract.Contract) –
value_interpreter (web3.contract.contract.Contract) –
policy_manager (web3.contract.contract.Contract) –
external_position_manager (web3.contract.contract.Contract) –
fee_manager (web3.contract.contract.Contract) –
integration_manager (web3.contract.contract.Contract) –
comptroller_lib (web3.contract.contract.Contract) –
protocol_fee_tracker (web3.contract.contract.Contract) –
vault_lib (web3.contract.contract.Contract) –
gas_relay_paymaster_lib (web3.contract.contract.Contract) –
gas_relay_paymaster_factory (web3.contract.contract.Contract) –
fund_value_calculator (web3.contract.contract.Contract) –
cumulative_slippage_tolerance_policy (web3.contract.contract.Contract) –
allowed_adapters_policy (web3.contract.contract.Contract) –
only_remove_dust_external_position_policy (web3.contract.contract.Contract) –
only_untrack_dust_or_priceless_assets_policy (web3.contract.contract.Contract) –
allowed_external_position_types_policy (web3.contract.contract.Contract) –
- Return type
None