gas-diff-action
gas-diff-action copied to clipboard
Compares gas usage in Solidity projects using Foundry and comments the changes on the PR
Gas Diff Action
Gas Diff Action is a GitHub Action that compares gas usage in Solidity projects using Foundry and comments the changes on the PR.
Preview

Usage
To integrate Gas Diff Action into your project, follow these steps:
- Create a
.github/workflowsdirectory in your repository if it doesn't already exist. - Inside the
workflowsdirectory, create a new file calledgas_comparison.yml. - Add the following content to the
gas_comparison.ymlfile:
name: Gas Comparison
on:
pull_request:
types:
- opened
- synchronize
jobs:
gas_comparison:
runs-on: ubuntu-latest
steps:
- name: Run Gas Comparison
uses: antoncoding/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
base_ref: ${{ github.base_ref }}
head_ref: ${{ github.head_ref }}
Commit and push your changes to the repository. Now, Gas Diff Action will automatically compare gas usage for Solidity contracts in your repository and comment the changes on the PR whenever a pull request is opened or updated.
Contributing
Contributions to Gas Diff Action are welcome! Please submit issues for bug reports or feature requests and create pull requests for any improvements or bug fixes.
License
Gas Diff Action is released under the MIT License.