Gas Optimization Tips

  1. Minimize on-chain data

  2. Use libraries

  3. Use ERC1167

  4. Turn on the Solidity optimizer

  5. Use events

  6. Use literal instead of computed values

  7. Avoid to copy arrays in memory

  8. Avoid for-loop over dynamic ranges

  9. Optimize order of variable declaration

  10. Use eth-gas-reporter

post image
post image
post image