Vikash-8090-Yadav / Solidity-Pathshala

One place for the smart contract developer. This repo will have all the smart contract written in the remix ide .It contains all the source code with the screen shot.
MIT License
42 stars 55 forks source link

Update Voting.sol: Enhanced 'Slots' usage #309

Open 0xScratch opened 9 months ago

0xScratch commented 9 months ago

🛠️ Fixes Issue

The contract is using more slots than necessary. Actually, EVM provided every smart contract some slots for storage. The more you use them, the more the gas costs. Thus, finding a way to reduce them is a great way to have some gas optimizations

👨‍💻 Changes proposed

Just changed the order of state variables. For a better explanation, refer this PR -> https://github.com/allo-protocol/allo-v2/pull/237

✔️ Check List (Check all the applicable boxes)

github-actions[bot] commented 9 months ago

Our team will soon review your PR. Thanks @Aryan9592 :)