-
Notifications
You must be signed in to change notification settings - Fork 18
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
smart contract #638
smart contract #638
Conversation
|
||
function withhold(address token, address owner, uint256 amount) external onlyOperator { | ||
require(token != address(0), "reward token not set"); | ||
require(balances[token][owner] - withholdings[token][owner] >= amount, "insufficient balance"); |
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.
“- withholdings[token][owner] ”Is it necessary
} | ||
|
||
function setRewardToken(uint256 _id, address _rewardToken) external { | ||
require(IProject(project).ownerOf(_id) != msg.sender, "invalid project"); |
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.
==
emit Redeemed(token, _owner, _amount); | ||
} | ||
|
||
function withdraw(address _token, uint256 _amount) 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.
does the withdrawal operation require certain permissions?
Smart contracts for miner, dao, task assignment, and etc