The ability to pause the contract - should it act incorrectly or become compromised - is implemented through importing the 'Pausable' OpenZeppelin contract, of which the Pledgeo contract is derived, and using the 'whenNotPaused' modifier for all of the external functions in the contract.
The ability to renounce ownership as well as to transfer ownership of a contract to another account is implemented through importing the 'Ownable' OpenZeppelin contract and deriving the Pledgeo contract from it.
- Mortality: the ability to destroy the contract for development purposes is implemented through the 'destroyContract' function (it may be removed in the future).
- Gradual deployment: not chosen to implement at the moment.
The pragma version is locked to 0.5.0 to prevent future compiler changes from causing incompatibilites with the Pledgeo contract.
The visibility of functions and state variables was explicitly labelled to avoid confusion.
State variables and calculations were moved out of the loops.
'Require' statements that were used repeatedly were turned into modifiers.
'external' was chosen over 'public' for functions that are not called from within the contract itself.
When the operators '||' and '&&' were used, the condition with the lower cost to calcuate was written first over the most expensive one to save gas if short circuited.