Skip to content

Conversation

@Primata
Copy link
Contributor

@Primata Primata commented Oct 4, 2025

Summary

  • RFCs: Link to RFC, Link to RFC, or $\emptyset$.
  • Categories: any of protocol-units, networks, scripts, util, cicd, or misc.

modifies tests so it handles uniswap swaps, univ4 does not have enough liquidity at the moment.

Changelog

Uniswapv3 test

Testing

forge test --match-test testUniswap -s --rpc-url $RPC_URL -vvv

Outstanding issues

Adding Uniswapv4

Copilot AI review requested due to automatic review settings October 4, 2025 01:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds test functionality for Uniswap V3 swaps to the MOVETokenV2 test suite. The changes focus on implementing quote and swap functionality for testing token exchanges on Uniswap V3, with placeholder code for Uniswap V4 integration.

  • Adds Uniswap V3 interfaces for quoter and swap router functionality
  • Implements a test function that demonstrates MOVE token to WETH swaps
  • Includes commented-out Uniswap V4 code for future implementation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

address uniswapv3Quoter = 0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6;
address uniswapv4Quoter = 0x61fFE014bA17989E743c5F6cB21bF9697530B21e;

uint256 amount = 100;
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded value '100' is a magic number. Consider defining it as a named constant or making it configurable to improve test maintainability.

Copilot uses AI. Check for mistakes.
Comment on lines +646 to +647
uint256 snapshotId = vm.snapshot();

Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snapshot is created but never used effectively. Either remove this unused variable or implement the snapshot/revert pattern properly.

Suggested change
uint256 snapshotId = vm.snapshot();

Copilot uses AI. Check for mistakes.
Comment on lines +666 to +667
vm.prank(anchorage);
move2.approve(uniswapv4Router, amount);
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approval for uniswapv4Router serves no purpose since the V4 swap code is commented out. Remove this unused approval or implement the V4 swap functionality.

Suggested change
vm.prank(anchorage);
move2.approve(uniswapv4Router, amount);
// vm.prank(anchorage);
// move2.approve(uniswapv4Router, amount);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants