Skip to content

Added AuthorizedMintRep scheme #704

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

Merged
merged 4 commits into from
Jan 8, 2020
Merged

Added AuthorizedMintRep scheme #704

merged 4 commits into from
Jan 8, 2020

Conversation

ben-kaufman
Copy link
Contributor

Fix #703

/**
* @dev Throws if called by an unauthorized account.
*/
modifier onlyAuthorized() {
Copy link
Contributor

Choose a reason for hiding this comment

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

how about use ownable ?

Copy link
Contributor

Choose a reason for hiding this comment

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

and onlyOwner

activationEndTime = _activationEndTime;
repRewardLeft = _maxRepReward;
authorizedAddress = _authorizedAddress;
limitRepReward = _maxRepReward != 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

what does it means != 0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it is not 0 I want to skip the check of the limit of reputation

Copy link
Contributor

@orenyodfat orenyodfat Jan 7, 2020

Choose a reason for hiding this comment

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

this is strange syntax .
do we have a test which cover this case ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, what's weird about this syntax?


/**
* @dev reputationMint function
* @param _beneficiary the beneficiary address to redeem for
Copy link
Contributor

Choose a reason for hiding this comment

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

redeem ?

/**
* @dev reputationMint function
* @param _beneficiary the beneficiary address to redeem for
* @param _amount the agreementHash hash
Copy link
Contributor

Choose a reason for hiding this comment

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

_agreementHash ?

* @param _beneficiary the beneficiary address to redeem for
* @param _amount the agreementHash hash
*/
function reputationMint(address _beneficiary, uint256 _amount) external onlyAuthorized {
Copy link
Contributor

Choose a reason for hiding this comment

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

does this function should return bool same as the reputation mint ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but it can if we want it to.

Copy link
Contributor

@orenyodfat orenyodfat left a comment

Choose a reason for hiding this comment

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

Why package-lock changed ?

@orenyodfat orenyodfat merged commit 2825e16 into master Jan 8, 2020
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.

add AuthorizedMintRep scheme
2 participants