Hadrien Croubois
07b1b472c0
Improve wording consistency in code/doc ( #3365 )
3 years ago
Hadrien Croubois
a035b235b4
Release v4.6 ( #3358 )
...
* 4.6.0-rc.0
* Fix release script to only release @openzeppelin/contracts
(cherry picked from commit 2bd75a44bb
)
* make ERC2981:royaltyInfo public (#3305 )
(cherry picked from commit d2832ca7a9
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* add transpilation guards to the crosschain mocks (#3306 )
(cherry picked from commit 9af5af8fff
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Fix tests on upgradeable contracts after transpilation
(cherry picked from commit 0762479dd5
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Remove unused constructor argument
(cherry picked from commit 69c3781043
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* Bump minimum Solidity version for Initializable.sol to 0.8.2 (#3328 )
(cherry picked from commit cb14ea3c5c
)
* Fix update-comment script to ignore invalid tags
(cherry picked from commit 848fef5b6c
)
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
* 4.6.0
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Eric Lau
c12076fb7e
Fix ERC777 link ( #3351 )
3 years ago
Jean Cvllr
3f49408fb6
Move event definition at the top of IERC20, IERC777 and IERC1820 ( #3228 )
3 years ago
Alexander
be3c5ca504
clarify _spendAllowance natspec ( #3188 )
3 years ago
Francisco Giordano
afb20119b3
Release v4.5
3 years ago
Hadrien Croubois
c5a6cae898
Add a _spendAllowance function to ERC20 & ERC777 ( #3170 )
3 years ago
Kevin Upton
e298476a90
Simplification of ERC777's transfer & transferFrom by using _send ( #3128 )
...
* Update ERC777.sol
* Update ERC777.sol
* Update ERC777.sol
* Update ERC777.sol
* fix revert reasons
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Hadrien Croubois
ecae978cb5
Make more functions virtual ( #3078 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
0xclaudeshannon
80d8da0564
Do not reduce approval on transferFrom if current allowance is type(uint256).max ( #3085 )
...
* add feature request #3084
* Update contracts/token/ERC20/ERC20.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* Add changelog note
* add documentation
* test unlimitted allowance and add ERC777 unlimitted allowance
* reference PR in changelog
* documentation IERC20 -> ERC20
* use asciidoc note syntax
* use asciidoc note syntax
* typo
* typos
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Francisco Giordano
a9f994f063
Reduce ERC20 allowance before triggering transfer ( #3056 )
...
* Reduce ERC20 allowance before triggering transfer
* adapt ERC777 to reduce allowance before transfer
* fix test for ERC777
* use smaller number to reduce balance
* simplify test description
* don't use deprecated expectEvents.inLogs
* fix test
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Francisco Giordano
6bd6b76d11
4.4.1
3 years ago
Francisco Giordano
4961a51cc7
4.4.0
3 years ago
Francisco Giordano
65ef662a2b
4.4.0-rc.1
3 years ago
Francisco Giordano
0a87a4e75b
4.4.0-rc.0
3 years ago
Francisco Giordano
c9bdb1f0ae
Add a comment documenting the package version being used ( #2918 )
3 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
1b37c21da5
reserve unchecked for when guarded by explicit require ( #2685 )
4 years ago
Iskander
7144ec8db4
Fix whitespace in ERC777 ( #2667 )
4 years ago
Vladislav
5f7eda1f98
Tokens: wrap safe substractions in uchecked block ( #2669 )
...
* Tokens: wrap definitely safe subs in unchecked
* Add change in changelog
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
4 years ago
Hadrien Croubois
78a9821129
Mint ERC777 without reception ack ( #2552 )
4 years ago
Francisco Giordano
93d990c653
Optimize constructor of ERC777 ( #2551 )
...
(cherry picked from commit 62af16b9f2
)
4 years ago
Francisco Giordano
62af16b9f2
Optimize constructor of ERC777 ( #2551 )
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
a44303c373
Remove double sload when doing math checks in tokens ( #2506 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
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
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
Francisco Giordano
3b4c951838
Fix ERC777 potential reentrancy issues ( #2483 )
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
faec973e09
Make non-view functions virtual ( #2468 )
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
Francisco Giordano
90ed1af972
Support compiling with solc 0.7 ( #2408 )
4 years ago
soham
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.
4 years ago
Andrew B Coathup
ded2b0a55c
Fix minor typos and grammar in docs ( #2338 )
...
* Fix typos and formatting
* Add Solidity release dates: releases-stability
4 years ago
soham
48072e439d
Fix function state mutability warning ( #2327 )
...
Changes state mutability of granularity function from view to pure.
5 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
fac773ac99
Add SPX license identifier ( #2235 )
...
(cherry picked from commit 56de324afe
)
5 years ago
Nicolás Venturo
394987f365
Fix ERC777 hook docs, fixes #2256
5 years ago
Nicolás Venturo
56de324afe
Add SPX license identifier ( #2235 )
5 years ago
Nicolás Venturo
c75b016919
Add missing requirements to ERC777 ( #2212 )
...
* Restore _approve check for zero sender
* Add non-zero operator check to _send
5 years ago
Nicolás Venturo
5bb8d0245b
Improve Hooks documentation ( #2199 )
...
* Improve Hooks docs
* Improve Utils docs
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Add enumerable code samples
* Remove import statement from example
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Nicolás Venturo
3e139baa50
Add missing hook to ERC777, fix relevant documentation ( #2191 )
...
* Improve ERC20/721 Pausable docs
* Add ERC20Pausable mint and burn tests
* Add ERC721Pausable mint and burn tests
* Add _beforeTransfer hook in ERC777 to mint and burn
5 years ago
Nicolás Venturo
d2ab599bd3
Update IERC777.sol ( #2184 )
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
402c6ab4cc
Update docs ( #2168 )
...
* Update docs for ERC20 and ERC721
* Add EnumerableMap to docs
* Update misc guides
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
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
e7b22483af
Make ERC777 operator the caller ( #2134 )
...
* Make the sender the operator
* Make hook methods private
* Add changelog entry
5 years ago