Luca Daniel
08cea10aa7
Fix `operatorBurn` description typo. ( #2091 )
5 years ago
Anton Bukov
19417c7cd5
Rename CREATE2 argument from bytecodeHash to bytecode and add new method for precomputed bytecode hash ( #2087 )
...
* Rename CREATE2 argument from bytecodeHash to bytecode and add new method for precomputed bytecode hash
* Remove only from test
* Fix linter error
5 years ago
Nicolás Venturo
5dfe7215a9
Migrate Contracts to Solidity v0.6 ( #2080 )
...
* Initial migration to Solidity 0.6.x - v3.0 first steps (#2063 )
* Initial migration, missing GSN, 721, 777 and Crowdsales.
* Add _beforeTokenOperation and _afterTokenOperation.
* Add documentation for hooks.
* Add hooks doc
* Add missing drafts
* Add back ERC721 with hooks
* Bring back ERC777
* Notes on hooks
* Bring back GSN
* Make functions virtual
* Make GSN overrides explicit
* Fix ERC20Pausable tests
* Remove virtual from some view functions
* Update linter
* Delete examples
* Remove unnecessary virtual
* Remove roles from Pausable
* Remove roles
* Remove users of roles
* Adapt ERC20 tests
* Fix ERC721 tests
* Add all ERC721 hooks
* Add ERC777 hooks
* Fix remaining tests
* Bump compiler version
* Move 721BurnableMock into mocks directory
* Remove _before hooks
* Fix tests
* Upgrade linter
* Put modifiers last
* Remove _beforeTokenApproval and _beforeOperatorApproval hooks
5 years ago
Nicolás Venturo
f905a14f5f
Fix docsite link
5 years ago
Nicolás Venturo
58a3368215
2.5.0
5 years ago
Nicolás Venturo
941d305044
Update docs
5 years ago
Nicolás Venturo
1b938e39a8
EnumerableSet improvements ( #2077 )
...
* Remove newAddressSet
* Add count and get functions.
* Fix lint
(cherry picked from commit 7988c044e0
)
5 years ago
Nicolás Venturo
7988c044e0
EnumerableSet improvements ( #2077 )
...
* Remove newAddressSet
* Add count and get functions.
* Fix lint
5 years ago
Alberto Cuesta Cañada
0ac83ce289
Fix EnumerableSetMock for 2.5.rc1 ( #2069 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
* Simplified mock.
* Fixed comment.
* Revert "Fixed comment."
This reverts commit 39627f9a6f
.
* Revert "Simplified mock."
This reverts commit 67468e464b
.
* Simplified mock.
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
(cherry picked from commit 8975289c6b
)
5 years ago
Alberto Cuesta Cañada
8975289c6b
Fix EnumerableSetMock for 2.5.rc1 ( #2069 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
* Simplified mock.
* Fixed comment.
* Revert "Fixed comment."
This reverts commit 39627f9a6f
.
* Revert "Simplified mock."
This reverts commit 67468e464b
.
* Simplified mock.
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Nicolás Venturo
d775e315cc
Update package homepage.
5 years ago
Nicolás Venturo
e4a8a5533e
2.5.0-rc.0
5 years ago
Nicolás Venturo
88dc1ca6fc
Reorder functions to prevent shadowing warning
5 years ago
Alberto Cuesta Cañada
1e0f07751e
Implementation of an address Enumerable Set ( #2061 )
...
* Drafted Enumerable.sol.
* Drafted test framework.
* Tweaked the tests to follow oz structure.
* Coded EnumerableSet.
* Moved EnumerableSet to `utils`.
* Fixed linting.
* Improved comments.
* Tweaked contract description.
* Renamed struct to AddressSet.
* Relaxed version pragma to 0.5.0
* Removed events.
* Revert on useless operations.
* Small comment.
* Created AddressSet factory method.
* Failed transactions return false.
* Transactions now return false on failure.
* Remove comments from mock
* Rename mock functions
* Adapt tests to code style, use test-helpers
* Fix bug in remove, improve tests.
* Add changelog entry
* Add entry on Utils doc
* Add optimization for removal of last slot
* Update docs
* Fix headings of utilities documentation
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Mick de Graaf
73abd54cbe
Made private methods internal to allow for overriding ( #2027 )
...
* Made private methods internal to allow for overriding
* Revert package.lock changes.
* Make _move private again
* Expose the ERC1820 registry address
* Add changelog entry
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Hao (Alan) Tang
7d7cbcad14
Fix/improve revert reason #1727 ( #2018 )
...
* adding mock contacts, test code
* adding changes to ERC721.sol per @frangio's comments on original PR #1943
* fix solhint warnings
* Update contracts/token/ERC721/ERC721.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* same revert wording per @frangio's review suggestion
* per @frangio's feedback, changing the inline assembly to accomplish: we want to ignore the first 4 bytes of content, so we should read the length and decrease it by 4, then take the memory location and add 4 to it, then store the new length at the new memory location, then that is the new byte array that we want.
* change revert msg assembly per PR comment by @frangio
* unify revert msg in test code
* fix some failed tests, wording change
* Update contracts/token/ERC721/ERC721.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Update contracts/token/ERC721/ERC721.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* fix test case, revert without reason
* fix 'ERC721ReceiverRevertsMock: Transaction rejected by receiver'
* style change per review by @frangio
* fix revert reason forwarding
* remove duplicate contracts/mocks/ERC721ReceiverRevertsMock.sol per review https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2018\#issuecomment-574381034
* Add changelog entry
* Fix tests
* Make tests more clear
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
5 years ago
Nicolás Venturo
e493fb3e95
Add 'available since' notes. Fixes #2054
5 years ago
Francisco Giordano
8c40a5b275
Create2 feature pending tasks ( #2013 )
...
* Add Create2 library (#1744 )
* feat(contracts): Add Create2 library to use create2 evm opcode
* Upgrade sol-coverage
* Add changelog entry
* Update comments and code style
* Remove create2 helper
* Fix linter error
* Fix truffle dependency
* Fix linter error
* refactor(Create2): Remove _deploy internal function
* test(Create2): test Create2 with inline assembly code
* fix(Create2): Check address returned form create2 instead of codesize of created contract
* refactor(Create2):Add revert reason when Create2 deploy fails (#2062 )
* fix merge with master
* fix test
Co-authored-by: Augusto Lemble <me@augustol.com>
5 years ago
Francisco Giordano
06983a2075
add note suggesting reentrancy post ( #2059 )
5 years ago
Nicolás Venturo
410e4f8ab9
Fix link to GSN overview ( #2053 )
...
* Fix link to GSN overview
* Update contracts/GSN/README.adoc
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Peter
54d2aec232
issue#1980 ( #2038 )
...
* issue#1980
* fix public to external
5 years ago
Gabriel Cardona
f9650b4cb8
Remove .gitkeep as it's not needed. ( #2046 )
5 years ago
William Entriken
fbddf5ba5b
Test common case first ( #2023 )
5 years ago
Nicolás Venturo
73a5903789
Update README.adoc
5 years ago
William Entriken
5d47aa85bc
Correct documentation for isContract check ( #2017 )
...
* Correct documentation for isContract check
* Update Address.sol
* Update Address.sol
* add missing newline before asciidoc list
5 years ago
Arindam Ghosh
ca6a5dc8a2
Changes ERC777 external functions to public for allowing overrides #1994 ( #2001 )
...
* Changes ERC777 external functions to public for allowing overrides #1994
* Changes ERC777 external functions to public for allowing overrides (#1994 )
5 years ago
Nicolás Venturo
28b95ef5be
ReentrancyGuard gas optimization ( #1996 )
...
* Improve gas efficiency of reentrancyGuard
* Add changelog entry
* Fix ReentrancyGuard test
5 years ago
William Entriken
95e54173e9
Update MerkleProof.sol ( #1997 )
5 years ago
Francisco Giordano
8e980480aa
Fix broken crossreference links ( #2005 )
...
* Bump solidity-docgen from 0.3.11 to 0.3.13
Bumps solidity-docgen from 0.3.11 to 0.3.13.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* fix broken crossreference links
5 years ago
Ignacio Mazzara
49042f2b1a
feat: add baseTokenURI to ERC721Metadata ( #1970 )
...
* feat: add baseTokenURI
* fix: tests
* chore: dev notation
* chore: changelog
* chore: typo
* Remove extra getters, return empty URI by default
* Update docs
* Rename baseTokenURI to baseURI
* Roll back visibility change of tokenURI
* Update changelog entry
* Version setBaseURI docs
* Improve internal names and comments
* Fix compilation errors
* Add an external getter for baseURI
5 years ago
ericDeCourcy
33047ffddc
Update ReentrancyGuard for Istanbul Hard Fork ( #1992 )
...
* Update ReentrancyGuard for Istanbul Hard Fork
Changes:
Added L37, `_guardCounter = 1;`
Rationale:
The planned _Istanbul Hard Fork_ will implement [EIP 2200](e4d4ea348e/EIPS/eip-2200.md
), which implements "net gas metering" for `sstore` operations. If the final value of `_guardCounter` is unchanged relative to the original value of it, a gas refund will be applied and charges for changing the value of `_guardCounter` will effectively not exist. This ends up being cheaper than the current implementation ONLY AFTER Istanbul. Before Istanbul, the added line actually ends up costing more gas.
Note that if `_guardCounter` is `0` initially, the initial cost and subsequent refund will both be larger than if `_guardCounter` is `1` initially. Although in both cases, the net gas cost (`gasCost - gasRefund`) are equal, it's better in terms of cost to have both the gas cost and refund smaller, as there is some limit to the percentage of a gas refund that can actually be realized.
* Update CHANGELOG.md
Added note for change to ReentrancyGuard.sol
* Update ReentrancyGuard.sol
* Update CHANGELOG.md
5 years ago
Francisco Giordano
f90700f3f1
add detail to deprecation notice
5 years ago
Mick de Graaf
5b2de262fd
Made _burn internal instead of private ( #1908 )
5 years ago
Francisco Giordano
8e3563968f
add explanation of drafts category
5 years ago
Francisco Giordano
cdf655f770
2.4.0
5 years ago
Francisco Giordano
c4bb7b7bb9
remove beta notice
5 years ago
Francisco Giordano
feaf051fef
added feature availability info to documentation
...
(cherry picked from commit 9113335cb3
)
5 years ago
Francisco Giordano
4c997ea09e
make PullPayment.withdrawPaymentsWithGas external
...
(cherry picked from commit 76a1d7a3cd
)
5 years ago
Nicolás Venturo
1c220e175d
Forward all gas on PullPayment withdrawal ( #1976 )
...
* Add withdrawWithGas
* Improve docs
* Add changelog entry
* Update contracts/payment/PullPayment.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Remove repeated comment
* Update changelog entry
* Fix inline docs
* Fix changelog formatting
(cherry picked from commit d6e10ab786
)
5 years ago
Francisco Giordano
ab4d43ce14
fix script for preparing contracts package
...
(cherry picked from commit eaee98f227
)
5 years ago
Nicolás Venturo
b0dbe0fc59
Transfer replacement ( #1962 )
...
* Add Address.sendEther
* Add documentation to sendEther
* Add changelog entry
* Rename sendEther to sendValue
(cherry picked from commit 8d166f3e35
)
5 years ago
Nicolás Venturo
6efbee609e
GSN renaming ( #1963 )
...
* Merge GSNBouncerBase into GSNRecipient
* Remove emtpy implementations for _pre and _post
* Rename bouncers to recipients
* Rename bouncers documentation to strategies
* Rewrite guides and docstrings to use the strategy naming scheme
* Address review comments
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* change wording of docs
(cherry picked from commit aae95db4e0
)
5 years ago
Nicolás Venturo
21d014d481
Improve PullPayment docs ( #1965 )
...
* Improve PullPayment docs
* Reword escrow note
* Update contracts/payment/PullPayment.sol
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
(cherry picked from commit 9e19d90cd9
)
5 years ago
Nicolás Venturo
7c31b98e6c
Remove SignatureBouncer from draft docs ( #1964 )
...
(cherry picked from commit 53f1b11668
)
5 years ago
Francisco Giordano
4f4d305784
Fix the GSNBouncerERC20Fee token decimals to 18 ( #1929 )
...
* fix erc20 fee token decimals to 18
* lint
* Update contracts/GSN/bouncers/GSNBouncerERC20Fee.sol
Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>
* change location of hardcoded decimals for clarity
* remove mention of decimals from docs
* remove trailing whitespace from guide
(cherry picked from commit b8ccf8e0f1
)
5 years ago
Dennison Bertram
8026a8ae2e
GSNSignatureBouncer fix ( #1920 )
...
* GSNSignatureBoucer does not accept zero address
* Linting code.
* Update contracts/GSN/bouncers/GSNBouncerSignature.sol
Makes sense!
Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>
* Update test/GSN/GSNBouncerSignature.test.js
ok!
Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>
* Add zero address constant from OZ test Helpers
* revert prettier formatting
(cherry picked from commit f9a94788fb
)
5 years ago
Dmitry
53edc70ab6
Remove extra parenthesis ( #1919 )
...
(cherry picked from commit 54182bf31c
)
5 years ago
Nicolás Venturo
dd2094b86e
Make _msgSender() payable ( #1913 )
...
(cherry picked from commit 52dc14c368
)
5 years ago
Nicolás Venturo
c247a21cb5
Make ERC1820 address constant ( #1912 )
...
(cherry picked from commit 6148abb1b1
)
5 years ago
Nicolás Venturo
a3603b9098
Remove SignatureBouncer contract
...
(cherry picked from commit c876254457
)
5 years ago