vault.mass_buyer
Documentation for eth_defi.vault.mass_buyer Python module.
Create token buy lists for testing.
Functions
|
Buy bunch of tokens on the wish list. |
|
Create a portfolio of tokens to buy based on given Python. |
Classes
BuyResult(needed_transactions: list[web3.contract.contract.ContractFunction], taken_routes: dict[eth_defi.token.TokenDetails, eth_defi.vault.valuation.Route]) |
- class BuyResult
Bases:
objectBuyResult(needed_transactions: list[web3.contract.contract.ContractFunction], taken_routes: dict[eth_defi.token.TokenDetails, eth_defi.vault.valuation.Route])
- __init__(needed_transactions, taken_routes)
- Parameters
needed_transactions (list[web3.contract.contract.ContractFunction]) –
taken_routes (dict[eth_defi.token.TokenDetails, eth_defi.vault.valuation.Route]) –
- Return type
None
- create_buy_portfolio(tokens, amount_denomination_token)
Create a portfolio of tokens to buy based on given Python.
- Parameters
- Return type
- buy_tokens(web3, user, portfolio, denomination_token, intermediary_tokens, quoters, multicall=None, block_identifier=None, multicall_gas_limit=10000000, buy_func=<function _default_buy_function>, uniswap_v2=None, uniswap_v3=None, multicall_batch_size=5)
Buy bunch of tokens on the wish list.
User for testing
Automatically resolve the routes with the best quote
- Parameters
web3 (web3.main.Web3) –
user (eth_typing.evm.HexAddress) –
portfolio (eth_defi.vault.base.VaultPortfolio) –
denomination_token (Union[eth_typing.evm.HexAddress, eth_defi.token.TokenDetails]) –
intermediary_tokens (set[Union[eth_typing.evm.HexAddress, eth_defi.token.TokenDetails]]) –
quoters (set[eth_defi.vault.valuation.ValuationQuoter]) –
multicall (bool | None) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) –
uniswap_v2 (eth_defi.uniswap_v2.deployment.UniswapV2Deployment | None) –
uniswap_v3 (eth_defi.uniswap_v3.deployment.UniswapV3Deployment | None) –
multicall_batch_size (int) –
- Return type