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
Showing
contracts/mocks/EnumerableMapMock.sol
0 → 100644
This diff is collapsed.
Click to expand it.
contracts/utils/EnumerableMap.sol
0 → 100644
| ... | @@ -61,6 +61,7 @@ | ... | @@ -61,6 +61,7 @@ |
| "ethereumjs-util": "^6.2.0", | "ethereumjs-util": "^6.2.0", | ||
| "ganache-core-coverage": "https://github.com/OpenZeppelin/ganache-core-coverage/releases/download/2.5.3-coverage/ganache-core-coverage-2.5.3.tgz", | "ganache-core-coverage": "https://github.com/OpenZeppelin/ganache-core-coverage/releases/download/2.5.3-coverage/ganache-core-coverage-2.5.3.tgz", | ||
| "lodash.startcase": "^4.4.0", | "lodash.startcase": "^4.4.0", | ||
| "lodash.zip": "^4.2.0", | |||
| "micromatch": "^4.0.2", | "micromatch": "^4.0.2", | ||
| "mocha": "^7.1.1", | "mocha": "^7.1.1", | ||
| "solhint": "^3.0.0-rc.6", | "solhint": "^3.0.0-rc.6", | ||
| ... | ... |
test/utils/EnumerableMap.test.js
0 → 100644
Please
register
or
sign in
to comment