Simon Perriard
6af4ed6169
revokeRole spec mismatch ( #2872 )
...
revokeRole emits {RoleRevoked} event if `account` has been revoked `role`
Greetings from ChainSecurity!
3 years ago
Hadrien Croubois
7237b1672e
Make some private functions internal to allow the developpement of "withSignature" functions (like permit) ( #2568 )
...
* add internal _setOwner in Ownable
* address issues raised in #2567
* updte changelog entry
* improve changelog and documentation
* rephrasing doc
* add cahngelog improvement lost in merge
* notify deprecation of _setupRole in changelog
* Demote caution to note
* Update CHANGELOG.md
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
18668870fd
Add an interface folder that lists common interfaces ( #2517 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Francisco Giordano
eea376911b
Reorder AccessControl event to emit after assignment ( #2738 )
4 years ago
Hadrien Croubois
1db3037808
Fix misleading comments ( #2737 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
27e09007cc
Reorder state changes and event emission for consistency ( #2719 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
b0cf6fbb7a
Add Prettier for linting and fix Solhint config ( #2697 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Francisco Giordano
df8a0fe8dc
Complete documentation of UUPSUpgradeable
4 years ago
Hadrien Croubois
df7996b671
add Available since 4.1 comments
...
(cherry picked from commit 9a698e6b7b
)
4 years ago
Hadrien Croubois
9a698e6b7b
add Available since 4.1 comments
4 years ago
Hadrien Croubois
e0a2b195e4
Add modifier & internal function with standard revert message in AccessControl ( #2609 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Brandon Valosek
b1e0aa487d
Fix AccessControlEnumerable not tracking renounceRole ( #2572 )
...
* Fix AccessControlEnumerable not tracking renounceRole
* Updated changelog
(cherry picked from commit 7adf0d88a0
)
4 years ago
Brandon Valosek
7adf0d88a0
Fix AccessControlEnumerable not tracking renounceRole ( #2572 )
...
* Fix AccessControlEnumerable not tracking renounceRole
* Updated changelog
4 years ago
Francisco Giordano
f07c39be8a
Add ERC165 interface detection to AccessControl ( #2562 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
(cherry picked from commit 29ffe6f426
)
4 years ago
Francisco Giordano
29ffe6f426
Add ERC165 interface detection to AccessControl ( #2562 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
4 years ago
Hadrien Croubois
24a0bc23cf
Reorganize the repo structure ( #2503 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
e341bdc1b7
Remove enumerable from AccessControl and add AccessControlEnumerable extension ( #2512 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
60205944bb
Adopt new Solidity features interfaceId, try/catch, keccak constants ( #2487 )
...
* Clean code
- using type().interfaceId to improve readeability of ERC165 registration
- hardcoding some keccak256 that are otherwise computed at construction.
* hardcode keccak256 result
* Improve code readeability using try/catch
* Remove hardcoded hash
tests show that solc 0.8.0 does the optimization as expected
* Use try/catch to improve readability
* ERC165Checker: Do not revert when returndata is empty + new test
* Address PR comments
* improve testing of ERC721Receiver errors
* put back comment about invalid interface id
* coverage does not support 0.8.1. Reverting back to 0.8.0
* bubble all data with length > 0 if onERC721Receive fails.
* Fix test: revert without message trigger is bubble with the default message
* using enum object to improve readability
4 years ago
Hadrien Croubois
18c7efe800
Make view and pure functions virtual ( #2473 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Andre Korol
974c534210
Update contracts to support Solidity 0.8.x ( #2442 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
318c4b44ea
Move Context from GSN to utils directory ( #2453 )
...
Co-authored-by: Hadrien Croubois <hadrien@openzeppelin.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Nicolás Venturo
ceb7324657
Update TimelockController.sol ( #2446 )
4 years ago
Nicolás Venturo
fa2b204535
Update TimelockController docs ( #2415 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Francisco Giordano
4297be6ac1
Use custom ids for timelock docs section titles
...
(cherry picked from commit 7d02933da3
)
4 years ago
Francisco Giordano
7d02933da3
Use custom ids for timelock docs section titles
4 years ago
Francisco Giordano
d2003a6fff
Fix NatSpec comment syntax
...
(cherry picked from commit ef0483b4be
)
4 years ago
Francisco Giordano
ef0483b4be
Fix NatSpec comment syntax
4 years ago
Francisco Giordano
1d1d2ba661
Add mention of TimelockController in intro to access docs
...
(cherry picked from commit 520bf7ac61
)
4 years ago
Francisco Giordano
520bf7ac61
Add mention of TimelockController in intro to access docs
4 years ago
Francisco Giordano
90ed1af972
Support compiling with solc 0.7 ( #2408 )
4 years ago
Francisco Giordano
3f2a2b5f62
Configure compilation with solc 0.7.4
4 years ago
psykeeper
7650210ad6
Make contracts abstract if they had internal constructors ( #2383 )
4 years ago
Hadrien Croubois
7f3eee750a
Add TimelockController ( #2354 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Elena Gesheva
04fc35707d
Migrate contracts to Solidity 0.7 ( #2319 )
...
* Update contract pragmas to solidity 0.7
* Remove internal declaration on constructors
* Reference SafeMath explicitely
* Remove public constructor declaration from abstract contracts
* Remove public constructor declaration from non-abstract contracts
5 years ago
Francisco Giordano
ef3bbbcf40
Add readme notices with link to docs site ( #2300 )
...
* add readme notices
* remove period after url
5 years ago
Nicolás Venturo
b72088a90a
Add 'available since' notices
5 years ago
Nicolás Venturo
fac773ac99
Add SPX license identifier ( #2235 )
...
(cherry picked from commit 56de324afe
)
5 years ago
Nicolás Venturo
56de324afe
Add SPX license identifier ( #2235 )
5 years ago
Julian M. Rodriguez
73baf0b635
Feature/Adding RoleAdminChanged event in AccessControl ( #2214 )
...
* Emit new event RoleAdminChanged
* Adding new RoleAdminChanged event in Tests
* Update suggested comments on new Event
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
* Adding PreviousAdminRole to event
* Update AccessControl.test.js
* Update CHANGELOG.md
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Francisco Giordano
ad290e7181
Use msg.sender in docs
5 years ago
Nicolás Venturo
364da52a49
Add note about default admin role security ( #2211 )
...
* Add note about default admin security
* Update contracts/access/AccessControl.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Nicolás Venturo
c7705712ba
Remove in-constructor requirements ( #2195 )
...
* Remove isConstructor requirement from _setupRole
* Remove isConstructor requirement from _setupDecimals
* Update contracts/access/AccessControl.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Francisco Giordano
885378e421
Fix some of the code formatting in docs
5 years ago
Nicolás Venturo
96a7113a16
Fix broken links
5 years ago
Nicolás Venturo
5b5d91c9d4
Remove 'external' functions ( #2162 )
...
* Remove _grantRole and _revokeRole, replace with _setupRole
* Make all external AccessControl functions public
* Remove Ownable._transferOwnership
* Rename ERC721's _safeTransferFrom and _transferFrom to _safeTransfer and _transfer
* Make all ERC721 external functions public
* Make all miscelaneous external functions public instead
* Add changelog entry
* Move calldata arguments to memory
* Update contracts/access/AccessControl.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Restrict setupRole to the constructor
* Replace isConstructor for !isContract
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Nicolás Venturo
7415ebe8bc
API improvements for EnumerableSet ( #2151 )
...
* Add revert reason to EnumerableSet.get.
* Rename EnumerableSet values to keys
* Rename get to at
* Add changelog entry
* Rename keys to values
* Add leading underscore to struct members
5 years ago
Nicolás Venturo
90058040f0
Make AccessControl GSN compatible ( #2135 )
5 years ago
Nicolás Venturo
c173392e15
Revamped Access Control ( #2112 )
...
* Remove Roles
* Add AccessControl and tests
* Removed IAccessControl
* Add RoleGranted and RoleRevoked events
* Make roles grantable and revokable regardless of their previous status
* Fix typo
* Add documentation
* Cleanup tests
* Add enumeration tests
* Add _setRoleAdmin tests
* Fix lint error
* Fix AccessControl link in docs
* WIP on access control guide
* Rename getRoleMembersCount
* Add tests for new role admin
* Make AccessControl GSN compatible
* Update access control guide
* Rename admin to adminRole
* Rename roleIds to roles
* Add 'operator' to RoleGranted and RoleRevoked events.
* Only emit events if the roles were not previously granted/revoked
* Uncomment expectEvent.not tests
* Rename operator to sender
* Add changelog entry
5 years ago
Nicolás Venturo
8176a901a9
Cleanup of Ownership directory ( #2120 )
...
* Remove Ownable.isOwner.
* Remove ownable behavior from tests
* Make Escrow use Ownable instead of Secondary
* Migrate GSNRecipientERC20Fee to Ownable
* Remove Secondary
* Move Ownable to access directory
* Remove mentions of Secondary
* Add changelog entry
* Move Ownable tests to access
* Remove unused mock
5 years ago
Nicolás Venturo
5dfe7215a9
Migrate Contracts to Solidity v0.6 ( #2080 )
...
* Initial migration to Solidity 0.6.x - v3.0 first steps (#2063 )
* Initial migration, missing GSN, 721, 777 and Crowdsales.
* Add _beforeTokenOperation and _afterTokenOperation.
* Add documentation for hooks.
* Add hooks doc
* Add missing drafts
* Add back ERC721 with hooks
* Bring back ERC777
* Notes on hooks
* Bring back GSN
* Make functions virtual
* Make GSN overrides explicit
* Fix ERC20Pausable tests
* Remove virtual from some view functions
* Update linter
* Delete examples
* Remove unnecessary virtual
* Remove roles from Pausable
* Remove roles
* Remove users of roles
* Adapt ERC20 tests
* Fix ERC721 tests
* Add all ERC721 hooks
* Add ERC777 hooks
* Fix remaining tests
* Bump compiler version
* Move 721BurnableMock into mocks directory
* Remove _before hooks
* Fix tests
* Upgrade linter
* Put modifiers last
* Remove _beforeTokenApproval and _beforeOperatorApproval hooks
5 years ago