EnzymeContracts
Documentation for eth_defi.enzyme.deployment.EnzymeContracts Python class.
- class EnzymeContracts[source]
Manage the registry of Enzyme contracts.
See Enzyme specification documentation for overview of different contracts.
Mimics Deployer.sol from Enzyme unit tests.
Attributes summary
web3
deployer
dispatcher
external_position_factory
protocol_fee_reserve_lib
protocol_fee_reserve_proxy
Enzyme Council maintained address list.
fund_deployer
value_interpreter
policy_manager
external_position_manager
fee_manager
integration_manager
comptroller_lib
protocol_fee_tracker
vault_lib
gas_relay_paymaster_lib
gas_relay_paymaster_factory
fund_value_calculator
cumulative_slippage_tolerance_policy
allowed_adapters_policy
only_remove_dust_external_position_policy
only_untrack_dust_or_priceless_assets_policy
allowed_external_position_types_policy
Methods 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)[source]
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)[source]
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)[source]
Helper access for IVault and IComptroller
- Parameters
contract_name (str) –
address (Optional[eth_typing.evm.HexAddress]) –
- Return type
web3.contract.contract.Contract | None
- __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 (Optional[web3.contract.contract.Contract]) –
external_position_factory (Optional[web3.contract.contract.Contract]) –
protocol_fee_reserve_lib (Optional[web3.contract.contract.Contract]) –
protocol_fee_reserve_proxy (Optional[web3.contract.contract.Contract]) –
address_list_registry (Optional[web3.contract.contract.Contract]) –
fund_deployer (Optional[web3.contract.contract.Contract]) –
value_interpreter (Optional[web3.contract.contract.Contract]) –
policy_manager (Optional[web3.contract.contract.Contract]) –
external_position_manager (Optional[web3.contract.contract.Contract]) –
fee_manager (Optional[web3.contract.contract.Contract]) –
integration_manager (Optional[web3.contract.contract.Contract]) –
comptroller_lib (Optional[web3.contract.contract.Contract]) –
protocol_fee_tracker (Optional[web3.contract.contract.Contract]) –
vault_lib (Optional[web3.contract.contract.Contract]) –
gas_relay_paymaster_lib (Optional[web3.contract.contract.Contract]) –
gas_relay_paymaster_factory (Optional[web3.contract.contract.Contract]) –
fund_value_calculator (Optional[web3.contract.contract.Contract]) –
cumulative_slippage_tolerance_policy (Optional[web3.contract.contract.Contract]) –
allowed_adapters_policy (Optional[web3.contract.contract.Contract]) –
only_remove_dust_external_position_policy (Optional[web3.contract.contract.Contract]) –
only_untrack_dust_or_priceless_assets_policy (Optional[web3.contract.contract.Contract]) –
allowed_external_position_types_policy (Optional[web3.contract.contract.Contract]) –
- Return type
None