-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/#13 erc20 timed mint #18
Feature/#13 erc20 timed mint #18
Conversation
Hey Sorry for the long list of yet to do items. The code is looking good and it makes me so happy to see you work on this. If you want to split the work and only do part we can turn any comment into their own ticket. Two main areas that I would love to see before I merge this:
|
By the way, this might be good to make into another ticket, let's just focus on the other comments first. |
contracts/ERC20TimedMint.sol
Outdated
|
||
constructor( | ||
uint256 public timeUntilNextMint; | ||
uint256 private mintCap; |
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.
I think that we should also have a 'setter' for this function (only needs to be called internally) that way we can set to 0 if there will be no new tokens issued.
contracts/ERC20TimedMint.sol
Outdated
@@ -48,6 +46,14 @@ contract ERC20TimedMint is ERC20 { | |||
require(amount <= mintCap, "ERC20: Mint exceeds maximum amount"); | |||
super._mint(to, amount); | |||
} | |||
|
|||
function _setTimeUntilNextMint(uint256 _timeDelay) external { |
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.
Just set this and _setMintCap()
to internal and it will be called on the child contract.
contracts/ERC20TimedMint.sol
Outdated
) | ||
ERC20(name, symbol) | ||
{ | ||
timeUntilNextMint = block.timestamp + _timeDelay; | ||
mintCap = _mintCap; | ||
timeUntilNextMint = block.timestamp + timeDelay; | ||
} | ||
|
||
function claimTokens ( |
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.
Remove claimTokens from this contract.
looks good, merging now! |
No description provided.