Ernesto García
ca822213f2
Make AccessControlDefaultAdminRules delay configurable ( #4079 )
...
Co-authored-by: Francisco <fg@frang.io>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2 years ago
Ernesto García
dad73159df
Add AccessControlDefaultAdminRules ( #4009 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Francisco
a28aafdc85
Use Prettier for JS files ( #3913 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2 years ago
Hadrien Croubois
c1d9da4052
Use hardhat-exposed to reduce the need for mocks ( #3666 )
...
Co-authored-by: Francisco <fg@frang.io>
2 years ago
Francisco
2336bd3e8e
Simplify ESLint config ( #3903 )
2 years ago
Helder Sepulveda
1f0e7cdf04
Add Ownable2Step extension with 2-step transfer ( #3620 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco <frangio.1@gmail.com>
2 years ago
Hadrien Croubois
668a648bc6
Add utilities for CrossChain messaging ( #3183 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 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
Francisco Giordano
f06738828b
Migrate to Hardhat ( #2397 )
4 years ago
Hadrien Croubois
7f3eee750a
Add TimelockController ( #2354 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Francisco Giordano
ace35fdeda
Update all dependencies transitively ( #2363 )
4 years ago
dibi91
0b489f4d79
Improve test descriptions #1157 ( #2334 )
...
Co-authored-by: Paolo Dibitonto <p.dibitonto@almaviva.it>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Francisco Giordano
ccfd370b89
Update Test Helpers to 0.5.6 ( #2261 )
...
* update test-helpers to 0.5.6-rc.0
* remove comment that no longer applies
* fix uses of expectEvent.notEmitted
* remove mocha only
* update to final version
* Update test/token/ERC777/ERC777.test.js
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Nicolás Venturo
4cbcaf35e4
Fix linter errors
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
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
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
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
Nicolás Venturo
5f92adc2e7
Migrate from truffle to test-environment ( #2007 )
...
* Sketch
* Migrate all tests to test-env
* Finish migration to test-env
* Add config
* Work on GSN tests
* Migrate to newer test-env version and loader syntax
* Add GSN setup
* Finish test-env migration
* Setup coverage using test-env
* Migrate to npm package
* Fix package.json
* Add compile step to CI
* Add comment on coverage setup
* Remove dependency on @truffle/contract
* Fix package-lock merge
* Fix linter errors
* Upgrade test-environment, depend locally on ganche-coverage
* Improve coverage script
* Improve sign.js API
* Move accounts destructuring to describe block
* Switch to prebuilt ethereumjs-vm package
* Upgrade test-enviroment version
* use workspace in circleci config
* remove unnecessary npx
5 years ago
Nicolás Venturo
3274d9db00
Upgrade to @openzeppelin/test-helpers@0.5.1 ( #1942 )
5 years ago
Yohann Pereira
489d2e85f1
Replace chai.should with chai.expect ( #1780 )
...
* changed exxpect to expect wherever applicable
* Merged with latest branch
* Updated merkleTree helper to latest master branch
* Made linting fixes
* Fix for test build
* updated for Coverage
* Updated Address.test.js
* Undo package-lock changes.
6 years ago
Nicolás Venturo
a71c3bce32
Update test-helpers to v0.4.0. ( #1770 )
6 years ago
Balaji Pachai
3682c6575c
Added message string for require() ( #1704 )
...
* Error handling in ERC20 and ERC721
* Added message string for require.
* Fixed solhint errors.
* Updated PR as per issue #1709
* changes as per #1709 and openzeppelin forum.
* Changes in require statement
* Changes in require statement
* build pipeline fix
* Changes as per @nventuro's comment.
* Update revert reason strings.
* Fianal update of revert reason strings.
* WIP: Updating reason strings in test cases
* WIP: Added changes to ERC20 and ERC721
* Fixes linting errors in *.tes.js files
* Achieved 100% code coverage
* Updated the test cases with shouldFail.reverting.withMessage()
* Fix package-lock.
* address review comments
* fix linter issues
* fix remaining revert reasons
6 years ago
ckshei
19c705d928
Fix/rename anyone account #1357 ( #1718 )
...
* replacing all instances of from: anyone with from: other
* replacing all instances of from: anyone with from: other
* replacing all instances of from: anyone with from: other
* changing anyone to other
* changing anyone to other
6 years ago
Nicolás Venturo
1ebeef7ffd
Remove unnecessary SLOAD. ( #1715 )
6 years ago
Nicolás Venturo
96432bf28e
Renamed test/behavior to test/behaviors.
6 years ago
Nicolás Venturo
6a658f2ac8
Move PublicRole.behavior to behavior directory.
6 years ago
Nicolás Venturo
3e82db2f6f
Migration to truffle 5 (and web3 1.0 (and BN)) ( #1601 )
...
* Now compiling using truffle 5.
* Migrated some test files, missing BN scientific notation usage.
* Now using BN time values.
* Migrate ERC20 tests.
* Migrate all ERC20 tests.
* Migrate utils, payment and ownership tests.
* All tests save ERC721 migrated.
* Migrated ERC721 tests.
* Fix lint errors.
* Delete old test helpers.
* Fix remaining crowdsale tests.
* Fix signature bouncer tests.
* Update how constants is used.
* Compile script pre-removes the build dir.
* Fix SafeMath tests.
* Revert "Compile script pre-removes the build dir."
This reverts commit 247e745113
.
* Fix linter errors.
* Upgrade openzeppelin-test-helpers dependency.
* Update openzeppelin-test-helpers dependency.
* Define math constants globally.
* Remove unnecessary ether unit.
* Roll back reduced ether amounts in tests.
* Remove unnecessary toNumber conversions.
* Delete compile script.
* Fixed failing test.
6 years ago
Nicolás Venturo
35d70397b6
Rename WhitelisterRole to WhitelistAdminRole. ( #1589 )
...
* Rename WhitelisterRole to WhitelistAdminRole.
* Update WhitelistAdmin changelog entry.
6 years ago
Nicolás Venturo
7142e25e78
Add back WhitelistedCrowdsale ( #1525 )
...
* Added WhitelisterRole.
* Added WhitelisteeRole and WhitelistedCrowdsale.
* Added WhitelistedCrowdsale tests.
* Whitelisters can now remove Whitelistees.
* PublicRole.behavior now supports a manager account, added Whitelistee tests.
* Rephrased tests, added test for whitelistees doing invalid purchases.
* Fixed linter error.
* Fixed typos
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Working around JS quirks
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Update PublicRole.behavior.js
* Renamed WhitelisteeRole to WhitelistedRole.
* Renamed WhitelistedCrowdsale to WhitelistCrowdsale.
* Now using the new test helper.
* Added basic documentation.
6 years ago
Aniket
70fd243e3b
Test setup helper added ( #1482 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* updates
* fixes #1404
* approve failing test
* suggested changes done
* ISafeERC20 removed
* conflict fixes
* fixes #1205
* minor change
* suggested changes
* reviewed changes
* final update
6 years ago
Nicolás Venturo
c2de8ffd14
Now testing events in constructors! ( #1511 )
...
* Added inTransaction tests.
* Added expectEvent.inConstructor.
* Changed inTransaction, removed decodeLogs.
* Flipped comparison to improve the error message.
* Improved expectEvent tests.
* Migrated tests to use expectEvent.
* Added roles constructor tests.
* Fixed linter errors.
* Made lodash a dev dependency.
* Added more inLogs tests.
* Update expectEvent.test.js
* Removed lodash.
* Moved role constructor tests to public role behavior.
* Revert "Flipped comparison to improve the error message."
This reverts commit 438c57833d
.
* Replaced chai-as-promised with shouldFail.
6 years ago
Nicolás Venturo
1b79b536cd
Roles.add and remove now require pre-conditions on the account. ( #1421 )
...
(cherry picked from commit 3bd30f7382
)
6 years ago
Nicolás Venturo
7cd0d5a452
Replaced assertJump, assertRevert and expectThrow with shouldFail. ( #1363 )
...
* Replaced assertJump, assertRevert and expectThrow with shouldFail.
* Fixed linter errors.
* Fixed typo.
* Made the helpers async.
(cherry picked from commit b0da0fded0
)
6 years ago
Aniket
9f5b73df37
added a test helper with common constants ( #1400 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* updates
* fixes #1206
(cherry picked from commit 58a42443df
)
6 years ago
Nicolás Venturo
3bd30f7382
Roles.add and remove now require pre-conditions on the account. ( #1421 )
6 years ago
Nicolás Venturo
b0da0fded0
Replaced assertJump, assertRevert and expectThrow with shouldFail. ( #1363 )
...
* Replaced assertJump, assertRevert and expectThrow with shouldFail.
* Fixed linter errors.
* Fixed typo.
* Made the helpers async.
6 years ago
Aniket
58a42443df
added a test helper with common constants ( #1400 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* updates
* fixes #1206
6 years ago
Nicolás Venturo
e7c99dd7dd
Roles now emit events in construction and when renouncing. ( #1329 )
...
* release candidate v2.0.0-rc.1
* fix linter error
(cherry picked from commit c12a1c6898
)
* Roles now emit events in construction and when renouncing.
(cherry picked from commit 21198bf1c1
)
6 years ago
Nicolás Venturo
21198bf1c1
Roles now emit events in construction and when renouncing. ( #1329 )
...
* release candidate v2.0.0-rc.1
* fix linter error
(cherry picked from commit c12a1c6898
)
* Roles now emit events in construction and when renouncing.
6 years ago
Nicolás Venturo
6cae0f458d
Role library now requires non-zero addresses. ( #1303 )
...
* The role library now requires non-zero addresses.
* Fixed SignatureBouncer checks with null address.
* change ternary operator for or operator
* adapt to new variable name convention
* Update Roles.sol
6 years ago
Nicolás Venturo
254210f699
Improve role behavior tests ( #1300 )
...
* The public role behavior now also tests the modifer.
* Fixed linter error.
6 years ago