Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary for the body of setUp #44

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Summary for the body of setUp #44

merged 2 commits into from
Sep 26, 2024

Conversation

mariaKt
Copy link
Contributor

@mariaKt mariaKt commented Sep 25, 2024

This PR adds a summarized rule for the body of the function setUp of the uniswapV2SwapTest contract.

We do not summarize the call itself, since this is a public function.

The code in setUp contains no branches.
This includes the constructor of uniswapV2Swap

constructor(address vidWeth, address vidDai, address vidUsdc){

which creates a new uniswapV2Router02 and then calls its public function setLocalPair.
function setLocalPair(address tokenA, address tokenB) public{

Because we statically know the address, we can summarize these calls as well.

@mariaKt mariaKt marked this pull request as ready for review September 25, 2024 17:01
Copy link
Contributor

@Robertorosmaninho Robertorosmaninho left a comment

Choose a reason for hiding this comment

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

LGTM

This modification saved us 2785 steps. With it, we go from 27872 steps to 25087 steps!

@mariaKt mariaKt merged commit 0d5b028 into main Sep 26, 2024
1 check passed
@mariaKt mariaKt deleted the setUp-summary branch September 26, 2024 18:56
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