-
Notifications
You must be signed in to change notification settings - Fork 1
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
Dev #17
Conversation
Cleanup of old files
Removed reward tokens
…ock and deployedContracts.ts
New feature branch
Tournament updated
* @notice Allows the players to stake their LP token to register for the tournament | ||
*/ | ||
function stakeLPToken() public { | ||
require(!isPlayer(msg.sender), "You have already staked"); |
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.
Consider of changing to modifier.
More gas efficient is using if statement and revert with some predefined error like:
error AlreadyStaked();
..
..
if({condition}
{
revert AlreadyStaked();
}
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.
Ok, good to know
* @param _storedMove The move the stored player made | ||
*/ | ||
function resolveGame(address _senderAddr, uint8 _senderMove, address _storedAddr, uint8 _storedMove) internal { | ||
if(_senderMove == _storedMove) { |
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.
Could be just counting the score
* @param _points 0 = lost, 1 = draw, 2 = won | ||
*/ | ||
function updateScore(address _player, uint8 _points) internal { | ||
if(_player == address(0)) return; // We don't update VRF score |
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.
Most code could be done in a front end
Description
Concise description of proposed changes, We recommend using screenshots and videos for better description
Additional Information
Related Issues
Closes #{issue number}
Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request.
Your ENS/address: