Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Update DssSpell.t.base.sol:Enhanced Readability and 'for' loops #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xScratch
Copy link

Description

Enhanced the 'for' loops by changing i++ to ++i, usage of unchecked blocks and uint256 i = 0; -> uint256 i;
These changes makes the contract cost less gas and are well explained here -> https://gist.github.com/grGred/9bab8b9bad0cd42fc23d4e31e7347144#for-loops-improvement

Also, code readability was improved by correction on line 216 (Take a view of the codebase after this line for a better understanding)

Some typos!

Contribution Checklist

  • PR title starts with (PE-<TICKET_NUMBER>)
  • Code approved
  • Tests approved
  • CI Tests pass

Checklist

  • Every contract variable/method declared as public/external private/internal
  • Consider if this PR needs the officeHours modifier override
  • Verify expiration (30 days unless otherwise specified)
  • Verify hash in the description matches here
  • Validate all addresses used are in Goerli changelog or known
  • Notify any external teams affected by the spell so they have the opportunity to review
  • Deploy spell to Goerli ETH_GAS_LIMIT="XXX" ETH_GAS_PRICE="YYY" make deploy
  • Ensure contract is verified on Goerli etherscan
  • Change test to use Goerli spell address and deploy timestamp
  • Cast spell on Goerli make spell="0x-deployed-spell-address" cast-spell
  • Run make archive-spell or make date="YYYY-MM-DD" archive-spell to make an archive directory and copy DssSpell.sol, DssSpell.t.sol and DssSpell.t.base.sol
  • squash and merge this PR

@DaiFoundation-DevOps
Copy link

DaiFoundation-DevOps commented Oct 31, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants