Hadrien Croubois
c5a6cae898
Add a _spendAllowance function to ERC20 & ERC777 ( #3170 )
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
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
Hadrien Croubois
783ac759a9
upgrade solidity-coverage to 0.7.18 to support ERC165 coverage ( #3117 )
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
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
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
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
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
Hadrien Croubois
10c8fcd3b8
Use invalid opcode to consume all gas in MinimalForwarder ( #3035 )
3 years ago
JulissaDantes
b42b05311b
Add ERC721Votes for NFT-based governance ( #2944 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien@openzeppelin.com>
3 years ago
Francisco Giordano
553c8fdec7
Update initializer modifier to prevent reentrancy during initialization ( #3006 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
(cherry picked from commit 08840b9f8c
)
3 years ago
Hadrien Croubois
08840b9f8c
Update initializer modifier to prevent reentrancy during initialization ( #3006 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
robriks
0c858e2071
Improve revert reason in ERC721 ( #2975 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
abf6024faf
Add a governor module to protect against late quorum ( #2973 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
6089f11c2f
Add a relay mechanism in the governor ( #2926 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
barakman
f6db5c1f30
A function which returns the absolute value of a signed value ( #2984 )
...
* Add a function which returns the absolute (and obviously unsigned) value of a signed value.
* add changelog entry and fix lint
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Hadrien Croubois
a57e638f57
Improve GovernorTimelockControl.state() to detect direct cancel ( #2977 )
3 years ago
Hadrien Croubois
b12af48a7d
Add Governor module for governance-settable parameters ( #2904 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
88e4b69bfb
Add a VestingWallet ( #2748 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Alex Beregszaszi
7006e4e3e6
Remove invalid parameters in MerkleProof tests ( #2912 )
3 years ago
td-bn
5b28259dac
#890 : Add ECDSA.toEthSignedMessageHash(bytes) for abritrary length message hashing ( #2865 )
...
* #890 : Add ECDSA#toEthSignedMessage for bytes type
* refactor
* add test, refactor
* select overloaded function explicitly
* use short test message string
* add changelog entry
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
3 years ago
Hadrien Croubois
efb5b0a28f
Extend PaymentSplitter to support ERC20 tokens ( #2858 )
...
* Add MultiPaymentSplitter
with ERC20 support on top of the existing PaymentSplitter
* consistency and linting
* Add MultiPaymentSplitter tests
* fix lint
* add changelog entry
* add MultiPaymentSplitter to documentation
* rework PaymentSplitter to include ERC20 support by default
* remove test file for MultiPaymentSplitter
* fix lint
* completelly split erc20 and token tracking
* address some PR comments
* add notice about rebasing tokens
* fix minor error in tests
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Hadrien Croubois
abeb0fbf5c
Delay the Pending state until strictly after proposal.voteStart ( #2892 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
3 years ago
Francisco Giordano
494cc6d3a5
Fix typo casted -> cast
...
(cherry picked from commit b174f067df
)
4 years ago
Francisco Giordano
b174f067df
Fix typo casted -> cast
4 years ago
renovate[bot]
73425c22d8
Update lockfile ( #2787 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
4 years ago
Anton Bukov
541e82144f
Optimize EOA signature verification ( #2661 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
7279273ebb
Fix inconsistencies in contract/test hierachy ( #2814 )
...
* Fix inconsistencies in contract/test hierachy
* changelog entry
4 years ago
William Entriken
d89f2a4ac6
Update ERC721.behavior.js ( #2801 )
4 years ago
Francisco Giordano
4b152bd8ce
Improve Governor ( #2794 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
4 years ago
William Entriken
f782943099
Move variable declaration to top of test file ( #2806 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
William Entriken
3da0cf698f
Uncomment assertion in ERC2771Context.test.js ( #2796 )
4 years ago
William Entriken
e1c0f3eaef
Update tests for RFC 2606 ( #2802 )
4 years ago
William Entriken
0500c9e53e
Use "OpenZeppelin Contracts" where appropriate ( #2778 )
4 years ago
Hadrien Croubois
6c1a634053
Add Governor contracts ( #2672 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
f88e555234
Add values() functions to EnumerableSets ( #2768 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
rotcivegaf
6d97f09195
Gas optimization on average function of Math.sol ( #2757 )
...
* change implementation to save gas
* add average test with two max uni256 number
4 years ago
Hadrien Croubois
15b92e4097
Add missing "await" in tests ( #2749 )
...
* add missing await in tests
* fix test description
4 years ago
Hadrien Croubois
6842518b1b
Wrapper extension for ERC20 token ( #2633 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
8a775cd8d4
Emit DelegateVotesChanged events after Transfer ( #2733 )
4 years ago
Hadrien Croubois
f7da53cebd
Add a BitMap struct ( #2710 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
e3661abe84
Split ERC20Votes and ERC20VotesComp ( #2706 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
1488d4f678
Improve ECDSA tests and docs ( #2619 )
4 years ago
Francisco Giordano
adc50d465c
Tweak ERC20Votes revert reasons and documentation ( #2696 )
...
* adapt revert reason convention
* add whitespace
* tweak documentation
* fix tests
4 years ago
Hadrien Croubois
f6efd8aced
Add totalSupply checkpoints to ER20Votes ( #2695 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Hadrien Croubois
406c83649b
Introduce ERC1155 totalSupply() and exists() functions ( #2593 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago