Nicolás Venturo
ad18098d65
Disallow ERC20._transfer from the zero address. ( #1752 )
...
* Add requirement of non-zero from to ERC20 transfer.
* Add test for transferFrom zero address to behavior.
* Create ERC20.transfer behavior.
* Add tests for _transfer.
* Add changelog entry.
* Fix linter error.
* Delete repeated test.
* Fix hardcoded error prefix.
* Update CHANGELOG.md
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Address review comments.
6 years ago
Nicolás Venturo
1292b6abab
Move ERC1820 and ERC777 out of drafts ( #1742 )
...
* Moved ERC1820 related contracts out of drafts and into introspection.
* Moved ERC777 related contracts out of drafts and into token.
(cherry picked from commit c794c96617
)
6 years ago
Nicolás Venturo
835c23d6f7
Hardcode ERC777 granularity to 1, remove tests. ( #1739 )
...
* Hardcode ERC777 granularity to 1, remove tests.
* Add clarifying title comment.
(cherry picked from commit 376820d55c
)
6 years ago
Nicolás Venturo
c794c96617
Move ERC1820 and ERC777 out of drafts ( #1742 )
...
* Moved ERC1820 related contracts out of drafts and into introspection.
* Moved ERC777 related contracts out of drafts and into token.
6 years ago
Nicolás Venturo
376820d55c
Hardcode ERC777 granularity to 1, remove tests. ( #1739 )
...
* Hardcode ERC777 granularity to 1, remove tests.
* Add clarifying title comment.
6 years ago
Nicolás Venturo
ae919629cd
Revert Solidity version bump. ( #1729 )
...
(cherry picked from commit 67bca857ee
)
6 years ago
Nicolás Venturo
67bca857ee
Revert Solidity version bump. ( #1729 )
6 years ago
Balaji Pachai
3682c6575c
Added message string for require() ( #1704 )
...
* Error handling in ERC20 and ERC721
* Added message string for require.
* Fixed solhint errors.
* Updated PR as per issue #1709
* changes as per #1709 and openzeppelin forum.
* Changes in require statement
* Changes in require statement
* build pipeline fix
* Changes as per @nventuro's comment.
* Update revert reason strings.
* Fianal update of revert reason strings.
* WIP: Updating reason strings in test cases
* WIP: Added changes to ERC20 and ERC721
* Fixes linting errors in *.tes.js files
* Achieved 100% code coverage
* Updated the test cases with shouldFail.reverting.withMessage()
* Fix package-lock.
* address review comments
* fix linter issues
* fix remaining revert reasons
6 years ago
Nicolás Venturo
19c7414052
Bump minimum Solidity version to 0.5.7 ( #1724 )
...
* Bump Solidity version to 0.5.7
* Add changelog entry.
6 years ago
Balaji Pachai
0df0e1b250
Fixes/Improves constants inline documentation. ( #1707 )
...
* Fixes/Improves constants inline documentation.
* Fixed solhint error.
* Moved the comment before the variable
6 years ago
Bertrand Masius
5a2b349992
Feature/erc777 #1159 ( #1684 )
...
* IERC777 from specs, constants returned, up to defaultOperators. (#1159 )
* IERC777 oprarator approvals (#1159 )
* ERC777 oprarator approvals fixes and tests
* IERC777 send and receive with ERC820 (#1159 )
* ERC777 Add burn functions and fix send functions (#1159 )
* ERC777 Make expectEvent compatible with web3.js 1.0 (#1159 )
* ERC777 Add ERC820 deploy script (#1159 )
* ERC777 Complete implementation of ERC777 (#1159 )
This implementation conforms to the current EIP
* ERC777 Update ERC820 Registry contract to final version (#1159 )
* ERC777 Move contracts to 'drafts' folder (#1159 )
* ERC777: Update to ERC1820 registry and linter error fix (#1159 )
* ERC777: implement recent changes of EIP777 (#1159 )
* ERC777 Fix formatting (#1159 )
* ERC777 Update to solc 0.5.2 (#1159 )
* ERC777 Fix travis CI errors (#1159 )
* ERC777 Fix linter errors again... (#1159 )
* ERC777 Fix unit test (#1159 )
* ERC777 Fix unit test again (#1159 )
* Remove extra newlines.
* Rename ERC777Base to ERC777.
* Remove 'Token' from contract names.
* Replace ops for operators.
* Move operator check out of _send.
* Remove ERC777Burnable.
* Remove ERC1820Client, now using the interface directly.
* Minor internal refactors in contracts.
* Delete extra test helpers.
* Simplified tests.
* Add basic 777 tests.
* Add granularity send test.
* Add first operator send tests.
* Add burn tests.
* Refactor send and burn tests.
* Improve send burn refactor.
* Greatly improve test module.
* Burn instead of send removed tokens.
* Add operator tests.
* Improve send tests under changing operators.
* Refactor and merge send and burn tests.
* Add missing and not-implemented tests.
* Make _burn private.
* Fix typo.
* Greatly improve tokensToSend tests.
* Refactor hook tests.
* Fix hook tests.
* Update openzeppelin-test-helpers and ERC1820 address.
* Fix natspec indentation.
* Make interface functions external.
* Remove redundant private revoke and authorize functions.
* Improved readability of if statement.
* Remove unnecessary asserts.
* Add non-one granularity test.
* Fix hook call order in _mint.
* Fix _mint not reverting on failure to implement tokensReceived.
* Remove special case in operatorFn when from is 0.
* Refactor ERC777SenderMock.
* Add tokensReceived tests.
* switch to updated ganache-cli-coverage fork
* Fix linter errors.
* Add mint tests.
* Fix linter errors.
* Fix tests.
* Update test/drafts/ERC777/ERC777.test.js
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Add changelog entry.
6 years ago
Nicolás Venturo
35d8e860ad
Remove unused files ( #1698 )
...
* Remove unused dependencies.
* Remove unused mock contracts.
6 years ago
J Quinn
3cb4a00fce
Added basic punctuation to @dev docs ( #1697 ) ( #1700 )
...
* Added basic punctuation to @dev docs (#1697 )
* add missing uppercase
6 years ago
Nicolás Venturo
308a4c9907
Draft EIP 1820 ( #1677 )
...
* Add barebones EIP1820 support.
* Update openzeppelin-test-helpers dependency to have ERC1820 support.
* Add tests for ERC1820.
* Improve inline documentation.
* Add changelog entry.
* Update test-helpers, refactor tests to use new helpers.
* Rename ERC1820 to ERC1820Implementer.
* Improve implementer docstring.
* Remove _implementsInterfaceForAddress.
* update openzeppelin-test-helpers to 0.2.0
* Update contracts/drafts/ERC1820Implementer.sol
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Fix how solidity coverage is run to allow for free events.
* Fix coverage testing script.
6 years ago
Anton Bukov
352ec94579
Add TimedCrowdsale::_extendTime ( #1636 )
...
* Add TimedCrowdsale::_extendTime
* Add tests for TimedCrowdsale extending method
* Reverse event arguments order
* Rename method argument
* Refactor TimedCrowdsale test
* Simplify TimedCrowdsaleImpl
* Fix extendTime method behaviour to deny TimedCrowdsale re-opening after it was ended
* Append chengelog
* Update CHANGELOG.md
Co-Authored-By: k06a <k06aaa@gmail.com>
* Update contracts/crowdsale/validation/TimedCrowdsale.sol
Co-Authored-By: k06a <k06aaa@gmail.com>
* Improve tests
6 years ago
Nicolás Venturo
41aa39afbc
Add no-return-data ERC20 support to SafeERC20. ( #1655 )
...
* Add no-return-data ERC20 support to SafeERC20.
* Add changelog entry.
* Replace abi.encodeWithSignature for encodeWithSelector.
* Remove SafeERC20 test code duplication.
* Replace assembly for abi.decode.
* Fix linter errors.
6 years ago
Nicolás Venturo
2648206394
Merge pull request #1647 from nventuro/safeerc20-bugfix
...
Fix SafeERC20.safeApprove bug
(cherry picked from commit 3111291b4a
)
6 years ago
Nicolás Venturo
de90f4458a
Merge pull request #1647 from nventuro/safeerc20-bugfix
...
Fix SafeERC20.safeApprove bug
(cherry picked from commit 3111291b4a
)
6 years ago
Nicolás Venturo
b14c9f4b68
Fix SafeERC20.safeApprove bug, improve test coverage.
6 years ago
William Entriken
2fc0aaabb3
Use canonical EIP reference format
6 years ago
Matt Swezey
40d15146c4
ERC20 Snapshot Impl #2 ( #1617 )
...
* ✏️ Refactor code & Refork OZ Repo
* Refactor ERC20Snapshot to use on-demand snapshots.
* Add ERC20Snapshot changelog entry.
* Move ERC20Snapshot to drafts.
* Improve changelog entry.
* Make snapshot tests clearer.
* Refactor ERC20Snapshots to use Counters.
* Refactor snapshot arrays into a struct.
* Remove .DS_Store files.
* Delete yarn.lock
* Fix linter error.
* simplify gitignore entry
6 years ago
Nicolás Venturo
8dd92fd6ca
Add ERC20 _setTokenURI ( #1618 )
...
* Add _setTokenURI internal.
* Rename TokenMetadata to ERC20Metadata.
* Add changelog entry for ERC20Metadata.
* Fix linter error.
* Add breaking change changelog notice.
6 years ago
skyge
1fd993bc01
Unify code comments style. ( #1603 )
...
* Updated code style to no more than120 characters per line.
* Unify code comments style with Doxygen-style tags.
6 years ago
Nicolás Venturo
07603d5875
Remove unnecessary SafeMath call ( #1610 )
...
* Refactor Counter to support increment and decrement.
* Move Counter out of drafts.
* Refactor ERC721 to use Counter.
* Rollback Counter returning the current value in increment and decrement.
* Update test/drafts/Counter.test.js
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Improve Counter documentation.
* Move Counter.test to utils.
* Move back Counter to drafts.
6 years ago
Nicolás Venturo
3a5da75876
ERC20._approve ( #1609 )
...
* Add ERC20._approve.
* Add ERC20._approve tests.
* Fix linter error.
* Require owner in _approve to be non-zero.
6 years ago
Nicolás Venturo
b7d60f2f9a
Fix warnings ( #1606 )
...
* Bump required compiler version to 0.5.2.
* Fix shadowed variable warning in ERC20Migrator.
* Rename Counter to Counters.
* Add dummy state variable to SafeERC20Helper.
* Update changelog entry.
* Fix CountersImpl name.
* Improve changelog entry.
6 years ago
Nicolás Venturo
76abd1a41e
Replaced Solium in favor of Solhint ( #1575 )
...
* Adding solhint, working on style fixes.
* Upgraded to solhint 1.5.0.
* Removed all references to Solium
* Updated mocks to make the pass the new linter rules.
* Reformatted the .solhint.json file a bit.
* Removed Solium configuration files.
* Remove Solium dependency.
* Add comment explaing disabled time rule in TokenVesting.
* Revert to the old (ugly?) style.
* Revert SignatureBouncerMock style.
* Fix ERC165InterfacesSupported interface.
6 years ago
Nicolás Venturo
35d70397b6
Rename WhitelisterRole to WhitelistAdminRole. ( #1589 )
...
* Rename WhitelisterRole to WhitelistAdminRole.
* Update WhitelistAdmin changelog entry.
6 years ago
Francisco Giordano
a5b14f262e
Separate unsigned and signed safemath libraries ( #1588 )
...
* separate unsigned and signed safemath libraries
* update changelog entry for SignedSafeMath
6 years ago
Alejo Salles
63ce358f30
Renamed DetailedERC20Mock.sol to ERC20DetailedMock.sol ( #1578 )
6 years ago
Nicolás Venturo
13eff70112
Updated PausableCrowdsale to require solc ^0.4.24 ( #1567 )
...
(cherry picked from commit 73cbad2f78
)
6 years ago
Nicolás Venturo
be5ed7364b
Release v2.1.0 solc 0.5.x ( #1568 )
...
* Now compiling in a separate directory using truffle 5.
* Ported to 0.5.1, now compiling using 0.5.1.
* test now also compiles using the truffle 5 hack.
* Downgraded to 0.5.0.
* Sorted scripts.
* Cleaned up the compile script a bit.
6 years ago
Nicolás Venturo
73cbad2f78
Updated PausableCrowdsale to require solc ^0.4.24 ( #1567 )
6 years ago
Francisco Giordano
d17ae0b806
Signed SafeMath ( #1559 )
...
* signed safe math
* fix lint errors
* refactor overflow checks and add descriptions
* remove incorrect description
* add test for reversed arguments in multiplication test
* fix power operator
* improve multiplication test descriptions
* Update SafeMath.test.js
* add feature to changelog
6 years ago
Tal Ater
8056433c44
Added PausableCrowdsale contract ( #832 )
...
* Added PausableCrowdsale contract
* Changed inheritance order to prevent "Linearization of inheritance graph impossible" error
* Updated mock PausableCrowdsaleImpl to new constructor syntax
* Broke function definition to multiple lines
Comply with new max line length
* Rename events to past-tense in PausableCrowdsale test
* Removed should.be.fullfilled from PausableCrowdsale tests
* Change import assertRevert to require in PausableCrowdsale tests
* Remove dependency on chai-as-promised and added BigNumber support in PausableCrowdsale tests
* reindent solidity with 4 spaces
* add missing view modifier in _preValidatePurchase
* convert assertRevert to new shoulFail helper
* add new setup helper
* use expectEvent
* convert to assert to chai should style
* add description to beforeEach blocks
* extract common step to beforeEach
* improve documentation
* revert inheritance error
* move PausableCrowdsale into crowdsale/validation
* make documentation more specific
* put whitespace in line with convention
* improve test suite account names
* undo beforeEach descriptions
* simplify tests
* fix transaction senders to be the anyone account
* make transaction senders more explicit
* remove mocha only
6 years ago
Nicolás Venturo
12533bcb2b
ERC721 bugfix + gas optimizations ( #1549 )
...
* Now only swapping when needed.
* Removed _addTokenTo and _removeTokenFrom
* Removed removeTokenFrom test.
* Added tests for ERC721 _mint and _burn
* _burn now uses the same swap and pop mechanism as _removeFromOwner
* Gas optimization on burn
6 years ago
Nicolás Venturo
7142e25e78
Add back WhitelistedCrowdsale ( #1525 )
...
* Added WhitelisterRole.
* Added WhitelisteeRole and WhitelistedCrowdsale.
* Added WhitelistedCrowdsale tests.
* Whitelisters can now remove Whitelistees.
* PublicRole.behavior now supports a manager account, added Whitelistee tests.
* Rephrased tests, added test for whitelistees doing invalid purchases.
* Fixed linter error.
* Fixed typos
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Working around JS quirks
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Update PublicRole.behavior.js
* Renamed WhitelisteeRole to WhitelistedRole.
* Renamed WhitelistedCrowdsale to WhitelistCrowdsale.
* Now using the new test helper.
* Added basic documentation.
6 years ago
Nicolás Venturo
dd2e947976
Deprecated ERC721._burn(address, uint256) ( #1550 )
...
* Deprecated ERC721._burn(address, uint256)
* Added missing natspec comment.
6 years ago
Nicolás Venturo
357fded2b5
Refundable post delivery crowdsale ( #1543 )
...
* Fixed unnecessary dependency of RefundableCrowdsaleImpl on ERC20Mintable.
* Added PostDeliveryRefundableCrowdsale.
* Renamed to RefundablePostDeliveryCrowdsale.
* Added deprecation warning.
6 years ago
Aniket
5caecf548c
getter added for an array of tokens held by an owner ( #1522 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* updates
* fixes #1404
* approve failing test
* suggested changes done
* ISafeERC20 removed
* conflict fixes
* fixes #1512
* Update test/token/ERC721/ERC721Full.test.js
Co-Authored-By: Aniket-Engg <30843294+Aniket-Engg@users.noreply.github.com>
6 years ago
Nicolás Venturo
c0bda4db88
Updated sendTransaction, added tests. ( #1528 )
...
* Renamed sendTransaction to send, improved API.
* Added send tests.
* Now using promisified web3
6 years ago
Nicolás Venturo
9faebb5365
Added makeInterfaceId tests. ( #1530 )
6 years ago
Nicolás Venturo
c2de8ffd14
Now testing events in constructors! ( #1511 )
...
* Added inTransaction tests.
* Added expectEvent.inConstructor.
* Changed inTransaction, removed decodeLogs.
* Flipped comparison to improve the error message.
* Improved expectEvent tests.
* Migrated tests to use expectEvent.
* Added roles constructor tests.
* Fixed linter errors.
* Made lodash a dev dependency.
* Added more inLogs tests.
* Update expectEvent.test.js
* Removed lodash.
* Moved role constructor tests to public role behavior.
* Revert "Flipped comparison to improve the error message."
This reverts commit 438c57833d
.
* Replaced chai-as-promised with shouldFail.
6 years ago
Nicolás Venturo
f0e12d5301
ether and shouldFail tests ( #1513 )
...
* Added ether tests.
* Added shouldFail base function and tests.
* Updated test descriptions.
* Reduced gas limit on out-of-gas tests.
6 years ago
Nicolás Venturo
5471fc808a
Updated code style to 4 space indentation and 120 characters per line. ( #1508 )
...
* Updated code style to 4 spaces and 120 max characters per line.
* Update contracts/token/ERC721/ERC721Pausable.sol
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Update contracts/token/ERC721/IERC721.sol
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
6 years ago
Nicolás Venturo
5ee55c4af3
Internal crowdsales ( #1439 )
...
* Made some internal crowdsale methods internal.
* Made all Crowdsale constructors internal.
(cherry picked from commit d9fdffe88e
)
6 years ago
Aniket
1b27b4bb34
Improved SafeERC20 allowance handling ( #1407 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* updates
* fixes #1404
* approve failing test
* suggested changes done
* ISafeERC20 removed
* allowance methods in library
* Improved SafeERC20 tests.
* Fixed test coverage.
(cherry picked from commit 315f426f5c
)
6 years ago
Nicolás Venturo
ab932e1873
Added leading underscore to internal functions, renamed supportsInterfaces. ( #1435 )
...
(cherry picked from commit 0231fac514
)
6 years ago
Nicolás Venturo
422b42bb6a
Made some inherit-only contracts internal. ( #1433 )
...
* Made some inherit-only contracts internal.
* Added OwnableMock.
(cherry picked from commit 96d6103e0b
)
6 years ago
Nicolás Venturo
c5a8680a9c
Moved Escrows into an escrow subdirectory, improved docs. ( #1430 )
...
* Moved Escrows into an escrow subdirectory, improved docs.
* Fixed escrow mock.
* Fixed some more imports.
(cherry picked from commit f3df2dab3d
)
6 years ago