fetch_deployment

Documentation for eth_defi.one_delta.deployment.fetch_deployment function.

fetch_deployment(web3, flash_aggregator_address, broker_proxy_address, quoter_address)[source]

Construct 1delta deployment based on on-chain data.

  • We need associated Aave instance to be able to construct transactions to open and close positions

Polygon forked mainnet example:

@pytest.fixture
def aave_v3_deployment(web3):
    return fetch_aave_deployment(
        web3,
        pool_address="0x794a61358D6845594F94dc1DB02A252b5b4814aD",
        data_provider_address="0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654",
        oracle_address="0xb023e699F5a33916Ea823A16485e259257cA8Bd1",
    )


@pytest.fixture
def one_delta_deployment(web3, aave_v3_deployment) -> OneDeltaDeployment:
    return fetch_1delta_deployment(
        web3,
        aave_v3_deployment,
        # flash_aggregator_address="0x168B4C2Cc2df4635D521Aa1F8961DD7218f0f427",
        flash_aggregator_address="0x74E95F3Ec71372756a01eB9317864e3fdde1AC53",
        broker_proxy_address="0x74E95F3Ec71372756a01eB9317864e3fdde1AC53",
    )
Returns

Data class representing 1delta deployment

Parameters
  • web3 (web3.main.Web3) –

  • flash_aggregator_address (Union[eth_typing.evm.HexAddress, str]) –

  • broker_proxy_address (Union[eth_typing.evm.HexAddress, str]) –

  • quoter_address (Union[eth_typing.evm.HexAddress, str]) –

Return type

eth_defi.one_delta.deployment.OneDeltaDeployment