Skip to content
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

Pioneer-related features #17

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open

Pioneer-related features #17

wants to merge 61 commits into from

Conversation

Roger-Wu
Copy link
Member

@Roger-Wu Roger-Wu commented Sep 2, 2018

DO NOT MERGE

uint public totalStages = 10;

/// @notice After this moment, users are not becoming pioneers anymore.
uint public pioneerTimeEnd; // 2018/9/17 24:00 (UTC+8)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

忘記在 constructor 裡 initialize


uint priceInWei; // how many weis for one token
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

為什麼有些是uint有些是uint256? 因為uint=uint256 你這裡應該是想用uint8? range是0-255

Copy link
Member Author

@Roger-Wu Roger-Wu Sep 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我習慣寫 uint ,飛虎他們有人習慣寫 uint256 所以還沒整合好而已
看要全部改成哪一種

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我偏好explicitly寫成uint256 對別人來說也避免誤會

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

uint _tokensPurchased = _weiPaid.mul(rate);

// Check if buying enough tokens
require(_tokensPurchased >= minTokensPurchased, "Purchasing not enough amount of tokens.");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

應改成
require(tokensPurchased[msg.sender].add(_tokensPurchased) >= minTokensPurchased, "Purchasing not enough amount of tokens.");
如此可以買 200 token 然後買 1 tokens

Ting Ting Lee and others added 30 commits September 3, 2018 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants