Description: Implement a Router contract capable of chaining multiple swaps together in a single transaction (e.g., swapping Token A -> Token B -> Token C).
Context / Motivation: Users shouldn't need to perform multiple manual transactions if a direct pair (A to C) doesn't exist or lacks liquidity. The Router is essential for seamless UX.
Acceptance Criteria: - [ ] Create a swap_exact_tokens_for_tokens function that takes a Vec<Address> representing the path.
Description: Implement a Router contract capable of chaining multiple swaps together in a single transaction (e.g., swapping Token A -> Token B -> Token C).
Context / Motivation: Users shouldn't need to perform multiple manual transactions if a direct pair (A to C) doesn't exist or lacks liquidity. The Router is essential for seamless UX.
Acceptance Criteria: - [ ] Create a
swap_exact_tokens_for_tokensfunction that takes aVec<Address>representing the path.amount_out_minslippage parameter.Technical Pointers: The router shouldn't hold funds; it should act as an intermediary. Rely heavily on
env.authorize_as_client()to allow the router to pull the initial token from the user, then handle subsequent cross-contract calls.