fc004c0ad2
removes invalid character in comments ( #2571 )
2021-03-08 13:42:35 +01:00
29ffe6f426
Add ERC165 interface detection to AccessControl ( #2562 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2021-03-04 18:50:12 -03:00
1705067e65
Add ERC721URIStorage extension ( #2555 )
2021-03-03 12:13:09 -03:00
62af16b9f2
Optimize constructor of ERC777 ( #2551 )
2021-03-02 21:29:05 +01:00
36b855972b
Optimize implementation of ERC20Capped ( #2524 )
2021-02-24 22:07:03 +00:00
24a0bc23cf
Reorganize the repo structure ( #2503 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-22 16:44:16 +00:00
09734e8028
Remove enumerable from ERC721 and add an ERC721Enumerable extension ( #2511 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-19 13:24:39 -03:00
7d20d0e2d2
Use immutable variables where possible ( #2528 )
...
Co-authored-by: rotciv <victorfage@gmail.com >
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2021-02-19 11:11:54 -03:00
e733b24dfe
Refactor ERC165 to use function overriding instead of storage ( #2505 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-18 19:02:28 +00:00
a44303c373
Remove double sload when doing math checks in tokens ( #2506 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-09 12:58:23 -03:00
b840341a77
Remove the storage associated with decimals ( #2502 )
...
* Removing the storage associated with decimals
* changelog entry
* changelog link to new issue number
* Update contracts/token/ERC20/ERC20.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* Update contracts/token/ERC20/ERC20.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* Update CHANGELOG.md
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-04 20:06:00 +01:00
5db7413827
re-enabling safemath revert reasons in ERC20, ERC777 and ERC1155 ( #2491 )
...
* re-enabling safemath revert reasons in ERC20 and ERC1155
* adding revert messages to ERC777
* removing uncheck block
2021-02-01 11:00:16 +01:00
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
2021-01-29 22:20:49 +01:00
5609cd4c74
Fix merge errors
2021-01-27 18:04:52 -03:00
0db76e98f9
Merge branch 'solc-0.7' into solc-0.8
2021-01-27 11:28:23 +01:00
6d202894b6
Merge branch 'master'
2021-01-26 18:58:15 +01:00
18c7efe800
Make view and pure functions virtual ( #2473 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-01-26 13:23:23 -03:00
3b4c951838
Fix ERC777 potential reentrancy issues ( #2483 )
2021-01-26 10:57:18 -03:00
974c534210
Update contracts to support Solidity 0.8.x ( #2442 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-01-14 19:38:53 -03:00
faec973e09
Make non-view functions virtual ( #2468 )
2021-01-13 18:25:39 -03:00
65b7e515a2
Align comments ( #2458 )
2021-01-11 16:43:45 -03:00
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 >
2021-01-07 13:04:13 -03:00
6be0b410dc
Use explicit conversions between addresses and numbers ( #2439 )
...
Co-authored-by: hrkrshnn <webmail.hari@gmail.com >
Co-authored-by: cameel <cameel2@gmail.com >
2020-12-17 22:51:48 -03:00
ecc66719bd
Add ERC20 Permit (EIP-2612) ( #2237 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
Co-authored-by: Santiago Palladino <spalladino@gmail.com >
2020-12-11 13:34:02 -03:00
268c6ab36c
Edit ERC20 API index to make it clearer
2020-12-09 20:04:08 -03:00
42da4d6867
Fix name of argument in docstring
...
Fixes #2410
2020-11-18 18:54:09 -03:00
90ed1af972
Support compiling with solc 0.7 ( #2408 )
2020-11-17 21:29:39 -03:00
4972bf4f23
Merge branch 'master' into solc-0.7
2020-11-16 14:11:46 -03:00
0f55c18595
Fix/solc 0.7.4 warnings #2391 ( #2396 )
...
* Fix unnamed return variable warning
This commit fixes warnings thrown by the solc 0.7.4 compiler:
"Warning: Unnamed return variable can remain unassigned. Add an explicit
return with value to all non-reverting code paths or name the variable."
* Fix function state mutability warning
This commit fixes warnings thrown by the solc 0.7.4 compiler:
"Warning: Function state mutability can be restricted to pure"
* Fix shadows an existing declaration warning
This commit fixes warnings thrown by the solc 0.7.4 compiler:
"Warning: This declaration shadows an existing declaration."
1. Arguments by default are not underscored.
2. If the name isn't available due to shadowing, use prefix underscore.
3. If prefix underscore isn't available due to shadowing, use suffix underscore.
2020-10-28 13:42:38 -03:00
e98b187e64
Fix typos in ERC20 docs ( #2364 )
2020-09-17 19:45:12 -03:00
ca7ee098ca
Fix whitespace in IERC721Receiver ( #2359 )
...
Slight nit on spacing to reduce # of lines // conform to other OZ function syntax
2020-09-15 19:30:09 -03:00
0d7bf01ac1
Merge branch 'solc-0.7' into release-v3.2.0-solc-0.7
2020-09-15 17:48:27 -03:00
1229c28ce0
Update ERC20.sol ( #2357 )
...
Remove unused `Address` library import, references.
2020-09-14 13:35:46 -03:00
22de765f3c
Merge branch 'release-v3.2.0' into release-v3.2.0-solc-0.7
2020-09-08 20:14:42 -03:00
ded2b0a55c
Fix minor typos and grammar in docs ( #2338 )
...
* Fix typos and formatting
* Add Solidity release dates: releases-stability
2020-09-01 15:19:17 -03:00
aaa5ef81cf
Fix typos ( #2343 )
2020-09-01 14:57:40 -03:00
89e2b7424b
Merge branch 'master' into solc-0.7
2020-08-24 18:14:25 -03:00
6d5a73815d
Fix ERC20Snapshot#_beforeTokenTransfer ( #2328 )
2020-08-14 11:59:20 -03:00
48072e439d
Fix function state mutability warning ( #2327 )
...
Changes state mutability of granularity function from view to pure.
2020-08-12 16:06:21 -03:00
9700e6b4bd
Use beforeTokenTransfer hook in ERC20Snapshot ( #2312 )
2020-08-11 16:51:58 -03:00
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
2020-07-29 18:11:32 -03:00
0c667ca32a
docs: add note explaining opinionated presets ( #2313 )
...
* docs: add notes explaining presets
* fix links for mint function
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2020-07-21 19:04:21 -03:00
7c4a2a0a29
Fix comment reference for function hash ( #2307 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2020-07-21 17:06:36 -03:00
ef3bbbcf40
Add readme notices with link to docs site ( #2300 )
...
* add readme notices
* remove period after url
2020-06-29 17:23:53 -03:00
3f4420527b
Separate mapping keyword by whitespace ( #2287 )
...
Co-authored-by: pm_468 <oleg.kuzmenko@lindenvalley.de >
2020-06-19 11:00:05 -03:00
e2876b947d
Fix docs link
2020-06-11 16:49:14 -03:00
ed3a513f86
Fix broken links
2020-06-11 16:48:00 -03:00
b72088a90a
Add 'available since' notices
2020-06-11 16:46:33 -03:00
8b58fc7191
feat: add wrapper function for low level calls ( #2264 )
...
* feat: add wrapper function for low level calls
* add error message parameter
* adding unit tests and required mocks
* implement error message on SafeERC20
* fixed variable name in tests
* Add missing tests
* Improve docs.
* Add functionCallWithValue
* Add functionCallWithValue
* Skip balance check on non-value functionCall variants
* Increase out of gas test timeout
* Fix compile errors
* Apply suggestions from code review
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* Add missing tests
* Add changelog entry
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2020-06-11 16:25:46 -03:00
d9fa59f30a
Address ERC1155 changes ( #2267 )
...
* Make holder fns public
* Add context, remove msg.sender from check
* Fix location of Holder arguments
* Add beforeTransfer hook
* Minor test improvements
* Add ERC1155Burnable and tests
* Add ERC1155Pausable
* Add ERC1155PresetMinterPauser.sol
* Add uri constructors
* Improved revert reasons
* Initial docs improvements
* Add missing docs
* Improve acceptance checks revert reasons
* Apply suggestions from code review
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* Remove note about 1155 preset uri in mint
* Add rquirements to balanceOfBatch
* Add note about URI and uri
* Fix list in docs
* Fix lint errors
* Use natural sorting for API titles
* Fix doc references
* Escape {id} references to remove docgen warnings
* Added intro docs, fixed links
* Apply suggestions from code review
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* Add changelog entry
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2020-06-09 14:47:51 -03:00