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

Introducing approve summary from bind to return on dAIMock #56

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

Robertorosmaninho
Copy link
Contributor

@Robertorosmaninho Robertorosmaninho commented Oct 4, 2024

This PR adds the summarized rules regarding the body of program execution. The rule presented in this PR summarizes the body of approve function starting on the bind function.

By summarizing the body of this function, we save 308 steps.
(Without it, the program took 19933 steps, and after implementing it, the program took 19625 steps)

Wall Time to execute 1000 testSwapSingleHopExactAmountIn summarized:

  • On main branch: 0.179s
  • On this branch: 0.176s

Wall Time to execute 1000 testSwapSingleHopExactAmountIn without any summarization: 0.263s

@Robertorosmaninho Robertorosmaninho self-assigned this Oct 4, 2024
@Robertorosmaninho Robertorosmaninho marked this pull request as ready for review October 4, 2024 21:44
src/uniswap-summaries.md Outdated Show resolved Hide resolved
src/uniswap-summaries.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mariaKt mariaKt left a comment

Choose a reason for hiding this comment

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

Before you merge, do either one of the following: (1 - preferred) match the <contract-state> cell, and make sure it includes allowance |-> mapping ... or (2) replace TYPE with dAIMock, so that we are sure that this is within the dAIMock contract, therefore we are indirectly sure that the allowance variable is the one we want.

@Robertorosmaninho Robertorosmaninho enabled auto-merge (squash) October 8, 2024 17:36
@Robertorosmaninho Robertorosmaninho merged commit eb2acdc into main Oct 8, 2024
1 check passed
@Robertorosmaninho Robertorosmaninho deleted the approve-dAIMock-summary branch October 8, 2024 17:38
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