renovate[bot]
32b4eee9a3
Update dependency follow-redirects to 1.14.7 [SECURITY] ( #3175 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
3 years ago
Hadrien Croubois
c5a6cae898
Add a _spendAllowance function to ERC20 & ERC777 ( #3170 )
3 years ago
Micah Zoltu
63b466901f
Rename some ERC20 parameters to match the standard document. ( #3167 )
...
* Renames `sender` to `source`.
The naming variable was incorrect. The source of the funds is *not* necessarily (and in most cases isn't) the sender of the transaction. Also, this code has a `msgSender` which further adds confusion.
* Changes to `from/to` instead of `source`.
* Function documentation matches new names
* Changed other instances of sender/recipient to from/to.
Also changed `msgSender` to `owner` in the approval related methods.
* apply changes to IERC20.sol + minor renaming in ERC20.sol
Co-authored-by: Daniel Von Fange <daniel@leancoder.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Alexander
defcf20042
Simplify ERC721 example ( #3115 )
3 years ago
Francisco Giordano
b119b564df
Improve wording for forum link in new issue templates
3 years ago
Tim Daubenschütz
28986d2f2e
Start tokenId at zero in docs ( #3162 )
...
- Fixes #3123
3 years ago
Francisco Giordano
85566faeb2
Improve documentation of various governance aspects ( #3161 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Francisco Giordano
bfd05d9646
Add "available since" on Base64.sol
3 years ago
Hadrien Croubois
574f3b89e1
Add proper revert message on overflow of totalSupply during burn ( #3144 )
3 years ago
Gaspar Dip
ca755ce799
Add AddressToUintMap ( #3150 )
...
* add AddressToUintMap
* Update contracts/utils/structs/EnumerableMap.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* address comments
* lint code
* merge mocks into a single file
* add PR link to changelog entry
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Francisco Giordano
fc01c51c13
Simplify inheritance to avoid overrides
3 years ago
Francisco Giordano
21c5d623d6
Update Copyright notice and include contributors
3 years ago
Doug Hoyte
4f8af2dceb
Add test and docs describing a misuse of MerkleProof ( #3090 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Harsh Vakharia
a81b07ce91
Fix typo in retrieval of onERC721Received selector ( #3151 )
3 years ago
Francisco Giordano
f55d2716a8
Add function documentation for SignatureChecker.
3 years ago
GitHubPang
ae54e6de1d
Fix typo in CHANGELOG ( #3138 )
...
Remove repeated word "the".
3 years ago
Hadrien Croubois
fb950c6166
Add a virtual `_checkRole(bytes32)` internal function to `AccessControl` ( #3137 )
...
* add a virtual _onlyRole(bytes32) modifier
* _onlyRole(role) → _checkRole(role)
* update doc
3 years ago
Hadrien Croubois
6fb1e843cf
Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual ( #3133 )
...
* Make royaltyInfo(uint256 _tokenId, uint256 _salePrice) virtual
Should be cherrypicked in release 4.5
* fix lint
3 years ago
GitHubPang
78deae5a76
Fix typo in CHANGELOG ( #3135 )
...
Change `ERC2891` > `ERC2981`.
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
a5e042cedf
Fix use of ^ (xor) instead of ** (power) ( #3130 )
3 years ago
Francisco Giordano
d57593c148
Lint
3 years ago
Francisco Giordano
7c47ac7193
Add workflow to generate and update docs branches
3 years ago
Muhammad Anas Baig
8f70c8867e
Fix typo in ERC721.sol ( #3127 )
3 years ago
JulissaDantes
b3b83b558e
Add Slither reentrancy check in CI ( #3047 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
783ac759a9
upgrade solidity-coverage to 0.7.18 to support ERC165 coverage ( #3117 )
3 years ago
Hadrien Croubois
25eeb80b18
Fix broken pull request links in change log ( #3114 )
...
Co-authored-by: Han Lin Yap <codler@users.noreply.github.com>
3 years ago
Hadrien Croubois
3eb2d43b06
Move abs(int256) from Math to SafeMath ( #3110 )
...
Co-authored-by: Francisco Giordano <frangio.1@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
Hadrien Croubois
e192fac276
Simplify UUPSUpgradeable along the lines of ERC1822 ( #3021 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
rotcivegaf
3458c1e854
Add SignedMath with math utilities for signed integers ( #2686 )
...
* add contract and tests
* avoid implicit cast
* add test cases
* fix test names
* modify avarage and add tests
* improve signed average formula
* fix lint
* better average formula
* refactor signed average testing
* add doc and changelog entry
* Update contracts/utils/math/SignedMath.sol
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
* remove ceilDiv
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Francisco Giordano
dee772a55f
Add documentation to TokenTimelock
3 years ago
Francisco Giordano
1051db3802
Use abi.encodePacked instead of bytes.concat
3 years ago
Francisco Giordano
a8f35b6c25
Make script executable
3 years ago
Hadrien Croubois
c366de3626
Fix encoding of signature+calldata in GovernorCompatibilityBravo ( #3100 )
...
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
Hadrien Croubois
fd7c4ba8f0
Update pragma in utils/Address.sol to 0.8.1 ( #3098 )
3 years ago
Hadrien Croubois
8dd744fc18
Add missing reference to PR in changelog
3 years ago
Martín Triay
828fe365ee
Normalize return variable names in IERC721Enumerable ( #3079 )
...
* Name missing return variable in IERC721Enumerable
For consistency among all functions.
* remove return variable names
3 years ago
JulissaDantes
a65c03bc0d
Implement Non Fungible Token Royalty (EIP2981) ( #3012 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Francisco Giordano
1e815f3308
Restructure intro to ERC721 contract docs
3 years ago
GitHubPang
d74605641c
Fix typos ( #3075 )
...
Correct a couple of misspellings.
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
Ernesto García
ef0273fde1
Add Base64 library to utils ( #2884 )
...
* Add Base64 library to utils
* Fix typo on Base64 padding
* Added documentation for Base64 and references from ERC1155 and ERC721
* Updated Changelog
* Fix typo in utilities doc
* use mstore8 to improve memory accesses
* use shorter strings with encodePacked
* do not use using-for syntax, for clarity
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Anton Bukov
da3a9ae18b
Avoid assembly in signature V and S decomposition ( #3060 )
...
* Avoid assembly in signature V and S decomposition
* Update ECDSA.sol
3 years ago
Drew Beller
e3391cd65f
Fix typo ( #3058 )
3 years ago
Francisco Giordano
e9e177f53b
Fix ERC2771ContextMock for upgradeable contracts
3 years ago
Hadrien Croubois
fe38eae6cd
Re-enable immutable forwarder in ERC2771Context ( #2917 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Michael D. George
915ca181ba
Add Certora's Governance verification rules ( #2997 )
...
Co-authored-by: Shelly Grossman <shelly@certora.com>
Co-authored-by: Aleksander Kryukov <58052996+RedLikeRosesss@users.noreply.github.com>
Co-authored-by: Michael M <91594326+MichaelMorami@users.noreply.github.com>
Co-authored-by: Aleksander Kryukov <firealexkryukov@gmail.com>
3 years ago
Francisco Giordano
a0a8bbb57f
Remove note about enabling self-delegation
3 years ago