UniswapV3Quoter
Documentation for eth_defi.vault.valuation.UniswapV3Quoter Python class.
- class UniswapV3Quoter
Bases:
eth_defi.vault.valuation.ValuationQuoterHandle Uniswap v3 quoters using QuoterV2 contract.
Attributes summary
dex_hintsignature_stringMethods summary
__init__(quoter[, debug, fee_hook])create_multicall_wrapper(route, amount_in)format_path(route)Get human-readable route path line.
generate_routes(source_token, target_token, ...)Create routes we need to test on Uniswap v2
get_path_combinations(source_token, ...)Generate Uniswap v3 swap paths and fee with all supported intermediate tokens
handle_onchain_return_value(wrapper, ...)Convert swapExactTokensForTokens() return value to tokens we receive
- __init__(quoter, debug=False, fee_hook=<function _fee_hook>)
- Parameters
quoter (web3.contract.contract.Contract) –
debug (bool) –
- format_path(route)
Get human-readable route path line.
- Return type
- generate_routes(source_token, target_token, intermediate_tokens, amount, debug)
Create routes we need to test on Uniswap v2
- Parameters
source_token (eth_defi.token.TokenDetails) –
target_token (eth_defi.token.TokenDetails) –
intermediate_tokens (set[eth_defi.token.TokenDetails]) –
amount (decimal.Decimal) –
debug (bool) –
- Return type
- get_path_combinations(source_token, target_token, intermediate_tokens)
Generate Uniswap v3 swap paths and fee with all supported intermediate tokens
- Parameters
source_token (eth_defi.token.TokenDetails) –
target_token (eth_defi.token.TokenDetails) –
intermediate_tokens (set[eth_defi.token.TokenDetails]) –
- Return type
- handle_onchain_return_value(wrapper, raw_return_value)
Convert swapExactTokensForTokens() return value to tokens we receive
- Parameters
wrapper (eth_defi.vault.valuation.ValuationMulticallWrapper) –
raw_return_value (any) –
- Return type