Francisco Giordano
90ed1af972
Support compiling with solc 0.7 ( #2408 )
4 years ago
Nicolás Venturo
fcdf8f4618
Add BytesSet ( #2395 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Nicolás Venturo
fac773ac99
Add SPX license identifier ( #2235 )
...
(cherry picked from commit 56de324afe
)
5 years ago
Julian M. Rodriguez
d7a6e7be2e
Feature/uint enumerable set tests #2253 ( #2254 )
...
* feature: setting sublevel test scenario for AddressSet
* feat: adding tests for EnumerableSet.UintSet
* feat: adding Behavior and AddressSet and UintSet tests
5 years ago
Nicolás Venturo
56de324afe
Add SPX license identifier ( #2235 )
5 years ago
Nicolás Venturo
bd0778461d
Add EnumerableMap, refactor ERC721 ( #2160 )
...
* Implement AddressSet in terms of a generic Set
* Add Uint256Set
* Add EnumerableMap
* Fix wording on EnumerableSet docs and tests
* Refactor ERC721 using EnumerableSet and EnumerableMap
* Fix tests
* Fix linter error
* Gas optimization for EnumerableMap
* Gas optimization for EnumerableSet
* Remove often not-taken if from Enumerable data structures
* Fix failing test
* Gas optimization for EnumerableMap
* Fix linter errors
* Add comment for clarification
* Improve test naming
* Rename EnumerableMap.add to set
* Add overload for EnumerableMap.get with custom error message
* Improve Enumerable docs
* Rename Uint256Set to UintSet
* Add changelog entry
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
97894a140d
Adhere to naming convention ( #2150 )
...
* Upgrade to latest solhint rc
* Add private-vars-leading-underscore linter rule
* Add leading underscore to GSNRecipient constants
* Remove leading underscore from ERC165Checker functions
* Add leading underscore to multiple private constants
* Fix linter errors in mocks
* Add leading underscore to ERC777's ERC1820 registry
* Add changelog entry
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
1b938e39a8
EnumerableSet improvements ( #2077 )
...
* Remove newAddressSet
* Add count and get functions.
* Fix lint
(cherry picked from commit 7988c044e0
)
5 years ago
Nicolás Venturo
7988c044e0
EnumerableSet improvements ( #2077 )
...
* Remove newAddressSet
* Add count and get functions.
* Fix lint
5 years ago
Alberto Cuesta Cañada
0ac83ce289
Fix EnumerableSetMock for 2.5.rc1 ( #2069 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
* Simplified mock.
* Fixed comment.
* Revert "Fixed comment."
This reverts commit 39627f9a6f
.
* Revert "Simplified mock."
This reverts commit 67468e464b
.
* Simplified mock.
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
(cherry picked from commit 8975289c6b
)
5 years ago
Alberto Cuesta Cañada
8975289c6b
Fix EnumerableSetMock for 2.5.rc1 ( #2069 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
* Simplified mock.
* Fixed comment.
* Revert "Fixed comment."
This reverts commit 39627f9a6f
.
* Revert "Simplified mock."
This reverts commit 67468e464b
.
* Simplified mock.
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Alberto Cuesta Cañada
1e0f07751e
Implementation of an address Enumerable Set ( #2061 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago