liumin

How to see gas costs with foundry/forge
liumin
Mar 3
When working with contracts I sometimes want to optimize the gas spent to complete common transactions. Forge has the capability to do this. https://github.com/xliumin/payable-gas-optimization/tree/main/src Here’s an example github repo. The concept behind this repo is that it demonstrates that functions marked as payable actually use less gas than functions that are not marked as payable. (Note that this doesn’t necessarily mean you should do this, it has security tradeoffs.) You can runforg...
ParagraphParagraph

liumin

Written by
liumin
Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K
Subscribe