-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Feature/crowdsale refactor #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
49b16cf
fc7af3c
d54f799
f48c150
3f5680b
a8a14df
469a999
90f0973
3ffe518
a5aaf94
8a3cfb9
6343246
2c22337
8c8fed1
962b5bc
bbb2dfa
3fdb6da
53ec3cc
2be5806
b814a05
dd05925
120d277
e677e33
5873f8e
2fe239c
bf5e9dd
cd0ba80
0487d25
c4a2f9c
3ef55bc
c1a41ae
b455000
a841691
3d4d41a
8b6b342
1a2a5ec
1680a18
344bec6
7d4035a
bcd0464
51c0954
cd15b41
e716a22
7134f0d
f56116e
2a6dd9f
8e8e8cc
fa055a6
56e83b9
1bf30f9
a70e3ed
5f4fc83
47ce79f
5dab495
dd338f1
8376baa
8ad6a10
107fdc4
530d85d
9fe61b8
de8e88f
6c38f46
33839c1
df03099
c6def0e
c177f01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ contract TimedCrowdsale is Crowdsale { | |
| uint256 public endTime; | ||
|
|
||
| /** | ||
| * @dev Constructor, takes crowdsale opening and closing times. | ||
| * @param _startTime Crowdsale opening time | ||
| * @param _endTime Crowdsale closing time | ||
| */ | ||
|
|
@@ -27,6 +28,7 @@ contract TimedCrowdsale is Crowdsale { | |
| } | ||
|
|
||
| /** | ||
| * @dev Checks whether the period in which the crowdsale is open has already elapsed. | ||
| * @return Whether crowdsale period has elapsed | ||
| */ | ||
| function hasExpired() public view returns (bool) { | ||
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,20 +13,23 @@ contract WhitelistedCrowdsale is Crowdsale, Ownable { | |
| mapping(address => bool) public whitelist; | ||
|
|
||
| /** | ||
| * @dev Adds address to whitelist. | ||
| * @param _beneficiary Address to be added to the whitelist | ||
| */ | ||
| function addToWhitelist(address _beneficiary) external onlyOwner { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Considering this is a crowd sale, we should provide an
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or a constructor |
||
| whitelist[_beneficiary] = true; | ||
| } | ||
|
|
||
| /** | ||
| * @dev Removes address from whitelist. | ||
| * @param _beneficiary Address to be removed to the whitelist | ||
| */ | ||
| function removeFromWhitelist(address _beneficiary) external onlyOwner { | ||
| whitelist[_beneficiary] = false; | ||
| } | ||
|
|
||
| /** | ||
| * @dev Checks whether a specific user is whitelisted. | ||
| * @param _beneficiary Address to check whether already in the whitelist | ||
| * @return Whether the address is whitelisted | ||
| */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to enforce that the linear function here must make the tokens increase in price? I expect a crowdsale that gets cheaper over time could be desired as well. I'm not sure there's a benefit to requiring an increase. We should let the creator make a linear function of their own slope. (and in that case this contract could be
LinearlyScaledRateCrowdsaleThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of restricting the price to be increasing was to be able to use unsigned ints throughout.. Plus I didn't see much use for a decreasing price crowdsale, but we could add this more general crowdsale flavor later if you think it might be useful!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'm happy with that logic π