Nicolás Venturo
0408e51ae6
Bundle ERC20Detailed ( #2161 )
...
* Merge ERC20Detailed into ERC20, make derived contracts abstract
* Fix Create2 tests
* Fix failing test
* Default decimals to 18
* Add tests for setupDecimals
* Add changelog entry
* Update CHANGELOG.md
* Update CHANGELOG.md
* Replace isConstructor for !isContract
* Update CHANGELOG.md
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Nicolás Venturo
c9630526e2
Draft and lifecycles directories cleanup ( #2122 )
...
* Move Pausable into utils
* Move Strings into utils
* Move Counters into utils
* Move SignedSafeMath into math
* Remove ERC1046
* Make ERC20Snapshot.snapshot internal
* Move ERC20Snapshot into ERC20
* Add drafts deprecation notice
* Remove drafts directory
* Add changelog entry
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
5 years ago
Nicolás Venturo
baaadde3c5
Remove ERC20._burnFrom ( #2119 )
...
* Remove ERC20._burnFrom
* Add changelog entry
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
5f92adc2e7
Migrate from truffle to test-environment ( #2007 )
...
* Sketch
* Migrate all tests to test-env
* Finish migration to test-env
* Add config
* Work on GSN tests
* Migrate to newer test-env version and loader syntax
* Add GSN setup
* Finish test-env migration
* Setup coverage using test-env
* Migrate to npm package
* Fix package.json
* Add compile step to CI
* Add comment on coverage setup
* Remove dependency on @truffle/contract
* Fix package-lock merge
* Fix linter errors
* Upgrade test-environment, depend locally on ganche-coverage
* Improve coverage script
* Improve sign.js API
* Move accounts destructuring to describe block
* Switch to prebuilt ethereumjs-vm package
* Upgrade test-enviroment version
* use workspace in circleci config
* remove unnecessary npx
5 years ago
Nicolás Venturo
3274d9db00
Upgrade to @openzeppelin/test-helpers@0.5.1 ( #1942 )
5 years ago
Aram Elchyan
5d34dbecea
Functions in SafeMath contract overloaded to accept custom error messages ( #1828 )
...
* Imporvement: functions in SafeMath contract overloaded to accept custom error messages.
* CHANGELOG updated, custom error messages added to ERC20, ERC721 and ERC777 for subtraction related exceptions.
* SafeMath overloads for 'add' and 'mul' removed.
* Error messages modified.
* Update CHANGELOG.md
6 years ago
Yohann Pereira
489d2e85f1
Replace chai.should with chai.expect ( #1780 )
...
* changed exxpect to expect wherever applicable
* Merged with latest branch
* Updated merkleTree helper to latest master branch
* Made linting fixes
* Fix for test build
* updated for Coverage
* Updated Address.test.js
* Undo package-lock changes.
6 years ago
Nicolás Venturo
a71c3bce32
Update test-helpers to v0.4.0. ( #1770 )
6 years ago
Nicolás Venturo
f7ff3e7e67
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.
(cherry picked from commit ad18098d65
)
6 years ago
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
6c2b7c260d
Add ERC20 compatibility to ERC777. ( #1735 )
...
* Add ERC20 compatibility.
* Reusing ERC20 tests for ERC777.
* Improve documentation.
* Add changelog entry.
* Improved ERC20 behavior tests.
* Add revert reasons to ERC777.
* ERC20 methods allow sending tokens to contracts with no interface.
* Register ERC20 interface.
* Add comment about avoidLockingTokens.
* Improve revert reason string.
* Make ERC777 implement IERC20.
* Fix test revert string.
* Remove unnecesary require.
* Add private _transfer.
* Update contracts/drafts/ERC777/ERC777.sol
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Update private helper names.
(cherry picked from commit aa4c9feabd
)
6 years ago
Nicolás Venturo
aa4c9feabd
Add ERC20 compatibility to ERC777. ( #1735 )
...
* Add ERC20 compatibility.
* Reusing ERC20 tests for ERC777.
* Improve documentation.
* Add changelog entry.
* Improved ERC20 behavior tests.
* Add revert reasons to ERC777.
* ERC20 methods allow sending tokens to contracts with no interface.
* Register ERC20 interface.
* Add comment about avoidLockingTokens.
* Improve revert reason string.
* Make ERC777 implement IERC20.
* Fix test revert string.
* Remove unnecesary require.
* Add private _transfer.
* Update contracts/drafts/ERC777/ERC777.sol
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
* Update private helper names.
6 years ago
Nicolás Venturo
2f8e844514
Fix remaining revert reasons.
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
Prince Sinha
963f1eb35b
removed unnecessary require and renaming of null to zero ( #1717 )
...
* removed unnecessary require
* build pipeline fix
* kept as it is
* Added require
6 years ago
ckshei
19c705d928
Fix/rename anyone account #1357 ( #1718 )
...
* replacing all instances of from: anyone with from: other
* replacing all instances of from: anyone with from: other
* replacing all instances of from: anyone with from: other
* changing anyone to other
* changing anyone to other
6 years ago
Nicolás Venturo
547a5f242a
Add extcodesize check to SafeERC20. ( #1662 )
...
* Add extcodesize check to SafeERC20.
* Clarify some comments.
* Replace inline assembly with Address.sol.
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
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
96432bf28e
Renamed test/behavior to test/behaviors.
6 years ago
Nicolás Venturo
6a658f2ac8
Move PublicRole.behavior to behavior directory.
6 years ago
Nicolás Venturo
3e82db2f6f
Migration to truffle 5 (and web3 1.0 (and BN)) ( #1601 )
...
* Now compiling using truffle 5.
* Migrated some test files, missing BN scientific notation usage.
* Now using BN time values.
* Migrate ERC20 tests.
* Migrate all ERC20 tests.
* Migrate utils, payment and ownership tests.
* All tests save ERC721 migrated.
* Migrated ERC721 tests.
* Fix lint errors.
* Delete old test helpers.
* Fix remaining crowdsale tests.
* Fix signature bouncer tests.
* Update how constants is used.
* Compile script pre-removes the build dir.
* Fix SafeMath tests.
* Revert "Compile script pre-removes the build dir."
This reverts commit 247e745113
.
* Fix linter errors.
* Upgrade openzeppelin-test-helpers dependency.
* Update openzeppelin-test-helpers dependency.
* Define math constants globally.
* Remove unnecessary ether unit.
* Roll back reduced ether amounts in tests.
* Remove unnecessary toNumber conversions.
* Delete compile script.
* Fixed failing test.
6 years ago
Aniket
70fd243e3b
Test setup helper added ( #1482 )
...
* 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 #1205
* minor change
* suggested changes
* reviewed changes
* final update
6 years ago
Nicolás Venturo
7ef2730506
Approval events on transferFrom and burnFrom ( #1524 )
...
* transferFrom now emits an Approval event, indicating the updated allowance.
* Updated burnFrom to also emit Approval.
* Added notices about the extra Approval events.
6 years ago
Alexander Kochetkov
281338409b
Test description fix in ERC20Pausable.test.js ( #1501 )
...
Small change in test description, should be "allows to approve..." instead of "allow to transfer..." in approve section, where test actualy try to approve, not to transfer.
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
26f9cc8e74
Moved some test files around to better reflect the directory layout. ( #1428 )
...
(cherry picked from commit d8ab8a00f2
)
6 years ago
Nicolás Venturo
7cd0d5a452
Replaced assertJump, assertRevert and expectThrow with shouldFail. ( #1363 )
...
* Replaced assertJump, assertRevert and expectThrow with shouldFail.
* Fixed linter errors.
* Fixed typo.
* Made the helpers async.
(cherry picked from commit b0da0fded0
)
6 years ago
Aniket
eae40c93b6
`this` is used in tests ( #1380 )
...
* 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 #1200
* suggested change
(cherry picked from commit b41b125c15
)
6 years ago
Nicolás Venturo
0678f67289
Merged latestTime, increaseTime and duration into a time helper. ( #1364 )
...
(cherry picked from commit 34bc709bc2
)
6 years ago
Nicolás Venturo
598a0358fc
Dangling commas are now required. ( #1359 )
...
(cherry picked from commit a6889776f4
)
6 years ago
Jakub Bogacz
39db4b4b05
Feature/use expect event in test logs assertions #1232 ( #1343 )
...
* Add BigNumber support to expectEvent/inLogs (#1026 )
* switched direct logs array check to expectEvent method in AllowanceCrowdsale.test.js
* Refactor expectEvent.inLogs function to use simple value number check
* Introduced should.be.bignumber method to compare BigNumber values
* Use expectEvent to test logs (#1232 )
* Removed trailing space
(cherry picked from commit 536262f2ec
)
6 years ago
Martín
49d2dd9e08
Add Mock suffix to variable names #1172 ( #1324 )
...
* Add Mock suffix to variable names #1172
* Add Impl suffix to variable names
(cherry picked from commit 4b21fcf5af
)
6 years ago
Aniket
9f5b73df37
added a test helper with common constants ( #1400 )
...
* 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 #1206
(cherry picked from commit 58a42443df
)
6 years ago
Aniket
315f426f5c
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.
6 years ago
Nicolás Venturo
d8ab8a00f2
Moved some test files around to better reflect the directory layout. ( #1428 )
6 years ago
Nicolás Venturo
b0da0fded0
Replaced assertJump, assertRevert and expectThrow with shouldFail. ( #1363 )
...
* Replaced assertJump, assertRevert and expectThrow with shouldFail.
* Fixed linter errors.
* Fixed typo.
* Made the helpers async.
6 years ago
Aniket
58a42443df
added a test helper with common constants ( #1400 )
...
* 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 #1206
6 years ago
Aniket
b41b125c15
`this` is used in tests ( #1380 )
...
* 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 #1200
* suggested change
6 years ago
Nicolás Venturo
34bc709bc2
Merged latestTime, increaseTime and duration into a time helper. ( #1364 )
6 years ago
Nicolás Venturo
a6889776f4
Dangling commas are now required. ( #1359 )
6 years ago
Jakub Bogacz
536262f2ec
Feature/use expect event in test logs assertions #1232 ( #1343 )
...
* Add BigNumber support to expectEvent/inLogs (#1026 )
* switched direct logs array check to expectEvent method in AllowanceCrowdsale.test.js
* Refactor expectEvent.inLogs function to use simple value number check
* Introduced should.be.bignumber method to compare BigNumber values
* Use expectEvent to test logs (#1232 )
* Removed trailing space
6 years ago
Nicolás Venturo
1b0c6b94b9
Removed mintingFinished. ( #1351 )
...
* Removed mintingFinished from ERC20Mintable.
* Removed MintingFinished from ERC721Mintable.
* Removed MintingFinished event.
(cherry picked from commit 5fdeaa81d5
)
6 years ago
Nicolás Venturo
5fdeaa81d5
Removed mintingFinished. ( #1351 )
...
* Removed mintingFinished from ERC20Mintable.
* Removed MintingFinished from ERC721Mintable.
* Removed MintingFinished event.
6 years ago
Martín
4b21fcf5af
Add Mock suffix to variable names #1172 ( #1324 )
...
* Add Mock suffix to variable names #1172
* Add Impl suffix to variable names
6 years ago
Francisco Giordano
ed84f3fcf3
fix linter error
...
(cherry picked from commit c12a1c6898
)
6 years ago
Francisco Giordano
c12a1c6898
fix linter error
6 years ago
Facundo Spagnuolo
92133be7ea
Add ERC20 opt-in migration contract ( #1054 )
...
* Extract standard token behaviuor to reuse it in other tests
* Add opt in ERC20 migration contract
* Make migration contract not to depend from standard token
* Changes based on feedback
* Improve MigratableERC20 inline documentation
* move behaviors to behaviors directory
* refactor MigratableERC20 into ERC20Migrator
* fix errors
* change expectEvent to support multiple events with same name
* fix tests
* update documentation
* rename MigratableERC20 files to ERC20Migrator
* move to drafts
* test beginMigration
* rename to ERC20Migrator
* missing semicolon (╯°□°)╯︵ ┻━┻
* add non-zero check
* improve documentation based on review comments
* improve test descriptions
* improve docs
* add getters
* fix contract
* improve tests
6 years ago
Leo Arias
fa49e5189d
Remove Minted and TokensBurned events ( #1305 )
...
* Remove the Minted event
* Remove the TokensBurned event
* Remove unused
6 years ago