statechannels / SCBridge-Wallet

MIT License
2 stars 3 forks source link

Update SCBridgeWallet.sol #186

Open 0xScratch opened 1 year ago

0xScratch commented 1 year ago

This PR is based on gas optimizations by enhancing the usage of 'for' loops. It's well explained here: https://gist.github.com/grGred/9bab8b9bad0cd42fc23d4e31e7347144#for-loops-improvement

Also, some variables which are like uint256 xyz = 0; changed to uint256 xyz;, cuz unsigned integers have a default value of 0...thus assigning them to 0 itself leads to wasting some gas Some typo errors got fixed