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 >
2022-02-01 17:37:32 +01:00
3eb2d43b06
Move abs(int256) from Math to SafeMath ( #3110 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2022-01-14 22:27:04 +00:00
e192fac276
Simplify UUPSUpgradeable along the lines of ERC1822 ( #3021 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2022-01-13 15:46:55 -03:00
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 >
2022-01-12 20:08:59 +01:00
c366de3626
Fix encoding of signature+calldata in GovernorCompatibilityBravo ( #3100 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2022-01-11 15:45:06 -03:00
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 >
2022-01-06 19:34:57 -03:00
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 >
2021-12-29 20:41:20 +01:00
e9e177f53b
Fix ERC2771ContextMock for upgradeable contracts
2021-12-27 21:26:47 -03:00
fe38eae6cd
Re-enable immutable forwarder in ERC2771Context ( #2917 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-12-27 21:21:56 -03:00
bda61cd5e5
Fix typo ( #3016 )
2021-12-12 22:55:19 +01:00
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 >
2021-12-10 18:58:45 -03:00
08840b9f8c
Update initializer modifier to prevent reentrancy during initialization ( #3006 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-12-10 13:02:35 -03:00
abf6024faf
Add a governor module to protect against late quorum ( #2973 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-12-01 13:56:31 -03:00
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 >
2021-11-24 14:09:05 +01:00
4088540aef
Fix ERC1155 supply tracking ( #2956 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-11-08 18:47:21 -03:00
b12af48a7d
Add Governor module for governance-settable parameters ( #2904 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-10-19 15:33:02 -03:00
d244b81972
Add a MerkleProof.processProof utility function ( #2841 )
...
* Add a MerkleProof.processProof utility function
* Add changelog entry
* fix lint
* return index when processingProof
* fix lint
* fix test
* Apply suggestions from code review
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* improve documentation
* Apply suggestions from code review
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
* remove index - see discussion in the PR
* update changelog
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-10-14 11:50:35 +02:00
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 >
2021-10-11 14:59:30 +02:00
01f2ff1ba1
Allow Governor + CompoundTimelock to manage native tokens (eth) in and out of the timelock contract. ( #2849 )
...
* Change GovernorTimelockCompound to support ETH in Timelock
* refactor compound timelock module
* Allow governor to receive ETH is executor == address(this)
2021-09-17 16:57:00 +02:00
541e82144f
Optimize EOA signature verification ( #2661 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-08-06 10:47:52 -03:00
4b152bd8ce
Improve Governor ( #2794 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
2021-08-04 18:29:13 -03:00
6c1a634053
Add Governor contracts ( #2672 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-07-16 12:44:01 -03:00
f88e555234
Add values() functions to EnumerableSets ( #2768 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-07-16 12:06:47 -03:00
6842518b1b
Wrapper extension for ERC20 token ( #2633 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-06-22 19:27:33 -03:00
4d0f8c1da8
Check inheritance tree consistency ( #2727 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-06-18 15:08:13 +00:00
f7da53cebd
Add a BitMap struct ( #2710 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-06-11 15:24:00 -03:00
b0cf6fbb7a
Add Prettier for linting and fix Solhint config ( #2697 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-06-07 12:33:03 -03:00
e3661abe84
Split ERC20Votes and ERC20VotesComp ( #2706 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-06-04 12:52:19 -03:00
f6efd8aced
Add totalSupply checkpoints to ER20Votes ( #2695 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-27 15:13:18 +00:00
406c83649b
Introduce ERC1155 totalSupply() and exists() functions ( #2593 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-20 21:46:21 +00:00
f31bb101ad
Move ERC20Votes and ERC20FlashMint out of draft ( #2673 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-20 11:00:22 -03:00
7c754d0665
Add ceiling division operation to the Math.sol library ( #2681 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com >
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-20 13:53:31 +00:00
8ea06b75aa
Add a Counter.reset function ( #2678 )
2021-05-19 15:52:43 -03:00
100ca0b8a2
ERC20 extension for governance tokens (vote delegation and snapshots) ( #2632 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-05-12 10:13:59 -03:00
b9125001f0
Move UUPSUpgradeable to proxy/utils
2021-04-19 20:44:10 +02:00
e0a2b195e4
Add modifier & internal function with standard revert message in AccessControl ( #2609 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-04-16 12:15:09 -03:00
1c676ac0ec
Implement UUPS proxy (ERC1822) ( #2542 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-04-16 11:41:47 -03:00
7f6a1666fa
Add Multicall module ( #2608 )
2021-04-07 17:26:40 +00:00
0c621246d3
Add tooling to verify signatures with support for ERC1271 ( #2532 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-04-07 13:09:17 +00:00
5bd798c6e1
Add ERC3156 extension of ERC20 (flash minting and lending) ( #2543 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-04-06 03:13:10 +00:00
cd443f0d5b
Add tests to extend code coverage ( #2586 )
2021-03-15 13:01:47 -03:00
f076ff5dbd
Further reorganisation of the repo ( #2575 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-03-08 17:06:54 -03:00
78a9821129
Mint ERC777 without reception ack ( #2552 )
2021-03-08 19:44:31 +00:00
1705067e65
Add ERC721URIStorage extension ( #2555 )
2021-03-03 12:13:09 -03:00
103ff8e23d
Rename variable master to implementation #2 ( #2553 )
2021-03-03 12:31:33 +01:00
24a0bc23cf
Reorganize the repo structure ( #2503 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-22 16:44:16 +00:00
f8cc8b844a
Minimal support for ERC2771 (GSNv2) ( #2508 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-19 15:36:48 -03:00
e341bdc1b7
Remove enumerable from AccessControl and add AccessControlEnumerable extension ( #2512 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com >
2021-02-19 17:36:56 +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
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