Skip to content

Commit

Permalink
Compare gas snapshots in CI with a small tolerance
Browse files Browse the repository at this point in the history
The previous attempt to assert identical gas usage in CI has been
reverted because a snapshot generated in CI was different from a
snapshot generated locally.

The diff still exist as of today, but amounts are minuscule. The amounts
range from 1 to tens. And these diffs exist in fuzz tests only.
This is a known bug in Foundry: foundry-rs/foundry#5689

This commit adds back gas snapshot, and check for a small diff in CI.
By allowing just one percent of diff, forge snapshot diff tool can be
utilized while waiting for the Foundry issue to be fixed.

Resolves issue Uniswap#216
  • Loading branch information
hyunchel committed Oct 16, 2023
1 parent 60de80a commit 8d699dc
Show file tree
Hide file tree
Showing 2 changed files with 314 additions and 0 deletions.
Loading

0 comments on commit 8d699dc

Please sign in to comment.