farcasterxyz / contracts

Implementation of the Farcaster contracts
https://www.farcaster.xyz/
MIT License
340 stars 122 forks source link

test: add gas tests #250

Closed varunsrin closed 1 year ago

varunsrin commented 1 year ago

Motivation

Require updating snapshots explicitly when gas usage for common functionality changes so that we are aware of regressions and improvements being introduced.

Change Summary

Added snapshot tests for common functions in Bundler, StorageRent

Merge Checklist


PR-Codex overview

Focus of the PR:

This PR focuses on adding gas usage tests for the BundleRegistry and StorageRent contracts.

Detailed summary:

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

github-actions[bot] commented 1 year ago

Coverage after merging varunsrin/gas-price-tests into main will be

96.91%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Bundler.sol100%100%100%100%
   FnameResolver.sol96.30%75%100%100%121
   IdRegistry.sol97.30%100%92.31%97.44%315
   StorageRent.sol98.80%98.33%100%98.86%495, 497
src/lib
   TransferHelper.sol0%0%0%0%15, 15, 15, 25–26, 26, 26