eth_portfolio.protocols.lending package

Submodules

eth_portfolio.protocols.lending.compound module

class eth_portfolio.protocols.lending.compound.Compound[source]

Bases: LendingProtocol

async _debt(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

_markets: List[Contract]
debt = <_ASyncFutureInstanceMethod for <function LendingProtocol.debt> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

markets = <_ASyncFutureInstanceMethod for <function Compound.markets> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

underlyings = <_ASyncFutureInstanceMethod for <async_lru._LRUCacheWrapper object> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

async eth_portfolio.protocols.lending.compound._borrow_balance_stored(market, address, block=None)[source]
Parameters:
Return type:

int | None

eth_portfolio.protocols.lending.compound._get_contract(market)[source]
Parameters:

market (CToken)

Return type:

Contract | None

eth_portfolio.protocols.lending.liquity module

class eth_portfolio.protocols.lending.liquity.Liquity[source]

Bases: LendingProtocolWithLockedCollateral

__init__()[source]
Return type:

None

async _balances(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

async _debt(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

debt = <_ASyncFutureInstanceMethod for <function LendingProtocol.debt> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

get_trove = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
Parameters:
Return type:

dict

networks = [Network.<function Network.name at 0x7efd1bf37be0>]

eth_portfolio.protocols.lending.maker module

class eth_portfolio.protocols.lending.maker.Maker[source]

Bases: LendingProtocolWithLockedCollateral

__init__()[source]
Return type:

None

async _balances(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

async _debt(address, block=None)[source]
Parameters:
Return type:

TokenBalances

async get_ilks(block)[source]

List all ilks (cdp keys of sorts) for MakerDAO

Parameters:

block (int | None)

Return type:

List[HexStr]

_cdp = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
Parameters:

address (str | HexBytes | AnyAddress | EthAddress)

Return type:

str | HexBytes | AnyAddress | EthAddress

_proxy = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
Parameters:

address (str | HexBytes | AnyAddress | EthAddress)

Return type:

str | HexBytes | AnyAddress | EthAddress

_urn = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
Parameters:

address (str | HexBytes | AnyAddress | EthAddress)

Return type:

str | HexBytes | AnyAddress | EthAddress

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

debt = <_ASyncFutureInstanceMethod for <function LendingProtocol.debt> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

get_gem = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
Parameters:

ilk (bytes)

Return type:

str

networks = [Network.<function Network.name at 0x7efd1bf37be0>]
eth_portfolio.protocols.lending.maker.encode_bytes(bytestring)

eth_portfolio.protocols.lending.unit module

class eth_portfolio.protocols.lending.unit.UnitXyz[source]

Bases: LendingProtocolWithLockedCollateral

__init__()[source]
Return type:

None

async _balances(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

async _debt(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

debt = <_ASyncFutureInstanceMethod for <function LendingProtocol.debt> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

networks = [Network.<function Network.name at 0x7efd1bf37be0>]

Module contents

eth_portfolio.protocols.lending.has_collateral(protocol)