encode_path
Documentation for eth_defi.one_delta.utils.encode_path function.
- encode_path(*, path, fees, operation, exchanges, interest_mode, trade_type=TradeType.EXACT_INPUT)[source]
Encode the routing path and other info for 1delta flash swap.
Note: we don’t yet support all 1delta operations to keep this function simple.
- Parameters
path (list[eth_typing.evm.HexAddress]) – List of token addresses how to route the trade
fees (list) – List of trading fees of the pools in the route
operation (eth_defi.one_delta.constants.TradeOperation) – Trade operation, e.g: open, trim, close
exchanges (list[eth_defi.one_delta.constants.Exchange]) – List of exchanges to use for each hop
interest_mode (eth_defi.aave_v3.constants.AaveV3InterestRateMode) – Aave v3 interest rate mode to use
trade_type (eth_defi.one_delta.constants.TradeType) – Trade type, e.g: exact input, exact output
- Returns
Encoded bytes to be used with 1delta flash aggregator
- Return type