Merge pull request #129 from propeller-heads/router/tnl/cyclical-swap-doc
docs: Clarify validation criteria for cyclical swaps
This commit is contained in:
@@ -54,6 +54,8 @@ impl EVMTychoEncoder {
|
|||||||
/// swap's input is the chain's wrapped token.
|
/// swap's input is the chain's wrapped token.
|
||||||
/// * If the solution is unwrapping, the checked token is the chain's native token and the last
|
/// * If the solution is unwrapping, the checked token is the chain's native token and the last
|
||||||
/// swap's output is the chain's wrapped token.
|
/// swap's output is the chain's wrapped token.
|
||||||
|
/// * The token cannot appear more than once in the solution unless it is the first and last
|
||||||
|
/// token (i.e. a true cyclical swap).
|
||||||
fn validate_solution(&self, solution: &Solution) -> Result<(), EncodingError> {
|
fn validate_solution(&self, solution: &Solution) -> Result<(), EncodingError> {
|
||||||
if solution.exact_out {
|
if solution.exact_out {
|
||||||
return Err(EncodingError::FatalError(
|
return Err(EncodingError::FatalError(
|
||||||
|
|||||||
Reference in New Issue
Block a user