* allow re-initialization of contracts
* fix lint
* use a private function to avoid code duplication
* use oz-retyped-from syntax
* add documentation
* rephrase
* documentation
* Update contracts/proxy/utils/Initializable.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* reinitialize test
* lint
* typos and style
* add note about relation between initializer and reinitializer
* lint
* set _initializing in the modifier
* remove unnecessary variable set
* rename _preventInitialize -> _disableInitializers
* rename preventInitialize -> disableInitializers
* test nested reinitializers in reverse order
* docs typos and style
* edit docs for consistency between initializer and reinitializer
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* replace `immutable` with `constant` for _PERMIT_TYPEHASH
This commit is related to the following issue discussion: https://github.com/OpenZeppelin/contracts-wizard/issues/89#issuecomment-1042391318
Since Solidity version `0.6.12` the `keccak256` of string literals is treated specially and the hash is evaluated at compile time. Since the OpenZeppelin Wizard also uses `constant` for OpenZeppelin's AccessControl's roles declarations, it's good practice to make this consistent.
* Update CHANGELOG
* fix: ensure transpiler compatibility
* fix: fixing var-name-mixedcase
* prettier & lint check
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* add a protection mechanism to prevent relaying transaction that are not
part of an execute operation
* more accurate relay authorization
* force reset the relay authorizations after executions
* refactor of the onlyGovernor modifier
* only whitelist when executor is not governor itself
* fix lint
* add private function for call permission management
* use deque
* fix lint
* remove unecessary dependency
* remove unecessary dependency
* comment rephrasing
* Update contracts/governance/Governor.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* cache keccak256(_msgData())
* use Context
* lint
* conditionnal clear
* add test to cover queue.clear()
* lint
* write more extended docs for onlyGovernance
* add changelog entry
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* add vector, lifo and fifo structures
* fix lint
* need more memory for coverage
* remove Vector wrappers and gas optimization
* refactor Vector testing
* revert package.json changes
* rename to DoubleEndedQueue
* rename and refactor
* refactor tests and expand coverage
* test for custom errors
* add changelog entry
* add docs
* add sample code and note about storage vs. memory
* add available since
* lint
* use underscore for struct members
* add struct documentation
* remove SafeCast in length
* rename i -> index and improve docs
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* Renames `sender` to `source`.
The naming variable was incorrect. The source of the funds is *not* necessarily (and in most cases isn't) the sender of the transaction. Also, this code has a `msgSender` which further adds confusion.
* Changes to `from/to` instead of `source`.
* Function documentation matches new names
* Changed other instances of sender/recipient to from/to.
Also changed `msgSender` to `owner` in the approval related methods.
* apply changes to IERC20.sol + minor renaming in ERC20.sol
Co-authored-by: Daniel Von Fange <daniel@leancoder.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>