Francisco
a28aafdc85
Use Prettier for JS files ( #3913 )
...
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
2 years ago
Hadrien Croubois
c1d9da4052
Use hardhat-exposed to reduce the need for mocks ( #3666 )
...
Co-authored-by: Francisco <fg@frang.io>
2 years ago
alonbg
6766b2de3b
Add getters for number of unclaimed tokens in PaymentSplitter ( #3350 )
3 years ago
Niccolò Petti
d4e6236b2b
Fix deprecated expectEvent.inLogs #3332 ( #3333 )
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
renovate[bot]
73425c22d8
Update lockfile ( #2787 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.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
Hadrien Croubois
24a0bc23cf
Reorganize the repo structure ( #2503 )
...
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
4 years ago
Francisco Giordano
f06738828b
Migrate to Hardhat ( #2397 )
4 years ago
Francisco Giordano
ace35fdeda
Update all dependencies transitively ( #2363 )
4 years ago
dibi91
0b489f4d79
Improve test descriptions #1157 ( #2334 )
...
Co-authored-by: Paolo Dibitonto <p.dibitonto@almaviva.it>
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
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
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
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
nikeshnazareth
0dded493a0
Nonfunctional typos #1643 ( #1652 )
...
* Add IntelliJ IDE config to .gitignore
* Fix variable name in ERC20 function comments
* Fix typos in Arrays function comment
* Fix typos in ownership test names
* Fix typo in Pausable test name
* Fix grammar in Ownable function comment
* Fix grammar in Crowdsale contract comment
* Fix typo in Counters contract comment
* Fix typo in ERC721Enumerable comment
* Fix typo in ERC721PausedToken test name
* Fix typo in Crowdsale function comment
* Fix typo in IncreasingPriceCrowdsale function comment
* Fix grammar in IncreasingPriceCrowdsale test name
* Fix typo in AllowanceCrowdsale test name
* Fix typo in RefundEscrow function comment
* Fix typo in ERC20Migrator contract comment
* Fix typos in SignatureBouncer comments
* Fix typo in SignedSafeMath test name
* Fix typo in TokenVesting contract comment
* Move Ownable comment from @notice section to @dev
The Ownable contract has a comment explaining that renouncing
ownership will prevent execution of functions with the onlyOwner
modifier.
This commit moves that comment to the @dev section and replaces it
with a description suitable for a generic user.
* Clarify purpose of ERC20 transfer function
* Clarify registration of ERC721Enumerable interface
* Clarify purpose of AllowanceCrowdsale test
* Increase specificity of inheritance comments
FinalizableCrowdsale and RefundableCrowsale both have comments
indicating that they are extensions of the Crowdsale contract.
This commit refines those comments to the most immediate ancestor
( TimedCrowdsale and RefundableCrowdsale respectively )
* Remove unused parameter in PaymentSplitter test
* Rename parameter in SignatureBouncer functions
The SignatureBouncer contract has modifiers to validate the
message sender is authorised to perform an action. They pass
msg.sender to internal functions as the variable `account`, but
the function comments refer to the variable as `sender`
This commit changes the variable name to `sender`
* Clarify comments in SignatureBouncer functions
The SignatureBouncer has comments that use the description
`sender` to refer to the variable `account`.
This commit updates the comments for consistency.
Maintainer Note: this reverts changes in the previous commit,
which renamed the variable `account` instead.
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
c0bda4db88
Updated sendTransaction, added tests. ( #1528 )
...
* Renamed sendTransaction to send, improved API.
* Added send tests.
* Now using promisified web3
6 years ago
cardmaniac992
6db4f0bc8f
SplitPayment improvements ( #1417 )
...
* Renamed file, added events and set _addPayee to private
* unwanted file
* adjusted test
* adjusted test
* PaymentReceived event added
* Added event testing.
* Fix static tests
(cherry picked from commit a07499796a
)
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
c25a1e366f
Fix #1358 Test helper to send funds ( #1367 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* fixes #1358
* linting done
* suggested changes
(cherry picked from commit fa1dfbd113
)
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
cardmaniac992
a07499796a
SplitPayment improvements ( #1417 )
...
* Renamed file, added events and set _addPayee to private
* unwanted file
* adjusted test
* adjusted test
* PaymentReceived event added
* Added event testing.
* Fix static tests
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
fa1dfbd113
Fix #1358 Test helper to send funds ( #1367 )
...
* signing prefix added
* Minor improvement
* Tests changed
* Successfully tested
* Minor improvements
* Minor improvements
* Revert "Dangling commas are now required. (#1359 )"
This reverts commit a6889776f4
.
* fixes #1358
* linting done
* suggested changes
6 years ago
dwardu
76169cda40
Fixed a broken payment test (+ another small fix) ( #1318 )
...
* Fixed a broken payment test
* In PR template, npm run lint:fix, not lint:all:fix
* In SplitPayment test, replaced an await-in-loop with Promise.all
(cherry picked from commit b79196f911
)
6 years ago
dwardu
b79196f911
Fixed a broken payment test (+ another small fix) ( #1318 )
...
* Fixed a broken payment test
* In PR template, npm run lint:fix, not lint:all:fix
* In SplitPayment test, replaced an await-in-loop with Promise.all
6 years ago
Leo Arias
45c0c072d1
Improve encapsulation on lifecycle, ownership and payments ( #1269 )
...
* Improve encapsulation on Pausable
* add the underscore
* Improve encapsulation on ownership
* fix rebase
* fix ownership
* Improve encapsulation on payments
* Add missing tests
* add missing test
* Do not prefix getters
* Fix tests.
* revert pending owner reset
* add missing underscore
* Add missing underscore
7 years ago
Francisco Giordano
4eb4d7114d
Allow non-beneficiaries to trigger release of their funds ( #1275 )
...
* add address argument to PullPayments#withdrawPayments
* add argument to SplitPayment#claim
* add address argument to PostDeliveryCrowdsale#withdrawTokens
* add address argument to RefundableCrowdsale#claimRefund
* rename SplitPayment#claim to SplitPayment#release
7 years ago
Nicolás Venturo
a9f910d34f
Increase test coverage ( #1237 )
...
* Fixed a SplitPayment test
* Deleted unnecessary function.
* Improved PostDeliveryCrowdsale tests.
* Improved RefundableCrowdsale tests.
* Improved MintedCrowdsale tests.
* Improved IncreasingPriceCrowdsale tests.
* Fixed a CappedCrowdsale test.
* Improved TimedCrowdsale tests.
* Improved descriptions of added tests.
7 years ago
Nicolás Venturo
4fb9bb7020
Minor test style improvements ( #1219 )
...
* Changed .eq to .equal
* Changed equal(bool) to .to.be.bool
* Changed be.bool to equal(bool), disallowed unused expressions.
7 years ago
Nicolás Venturo
20cf885430
No longer assigning awaits to temporary variables. ( #1216 )
7 years ago
Nicolás Venturo
8d11dcc0e5
Increase testing coverage ( #1195 )
...
* Added non-target bounty test
* Increased ERC721 testing coverage.
* Addressed review comments.
* fix linter error
* Fixed linter error
* Removed unnecessary bouncer require
* Improved Crowdsale tests.
* Added missing SuperUser test.
* Improved payment tests.
* Improved token tests.
* Fixed ERC721 test.
* Reviewed phrasing.
7 years ago
Nicolás Venturo
ac91af9a6a
Replace all asserts with chai.should ( #1183 )
...
* Moving towards chai.should.
* Fixed failing tests.
* Fixed linter errors.
* Revert package-lock.json changes.
* Fixed failing tests.
* s/eq/equal
* Addressed review comment
7 years ago
Nicolás Venturo
94797978bb
SplitPayment now requires payees. ( #1131 )
...
* SplitPayment now requires payees.
* Improved test phrasing.
7 years ago
Nicolás Venturo
4544df47da
All tests now use account names, and dont use accounts[0] (except ERC… ( #1137 )
...
* All tests now use account names, and dont use accounts[0] (except ERC721)
* Added account names to some missing contracts.
7 years ago
Justus Perlwitz
e6c15b34da
Remove chai-as-promised ( #1116 )
...
* Test: Remove chai-as-promised calls
* Test/Helpers: expectThrow accepts optional message
* NPM: Remove chai-as-promised
* Contracts/DestructibleMock: Fix lint
7 years ago
Nicolás Venturo
cea2a85a42
Remove Babel ( #1074 )
...
* Test helpers no longer rely on Babel.
* Behaviours are no longer imported.
* Removed Babel dependency.
* Fixed linter errors.
7 years ago
Arun Kumar
40b5594f52
Promisify web3 sync requests in tests ( #1009 )
7 years ago
Matt Condon
f4228f1b49
fix: reference contract name rather than filepath ( #698 )
7 years ago
Facundo Spagnuolo
b925b2dae6
Organize test files following contracts folders structure
7 years ago
Matt Condon
d07bdccc0c
feat: manually fix linting errors across tests
7 years ago
Matt Condon
58abd66969
feat: rename all test files to include .test.js postfix
7 years ago
Matt Condon
8662846838
feat: apply eslint --fix across project
7 years ago
Matt Condon
47585b1117
fix: make SplitPayment payable by default
7 years ago
Ariel Barmat
dc1017c929
Simplify implementation using similar interface as PullPayment contract
8 years ago
Ariel Barmat
8336785a9b
Add a SplitPayment contract to distribute funds among multiple beneficiaries
8 years ago