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

[Bug-Candidate]: Typo in Wiki #1355

Closed
zarifpour opened this issue Aug 18, 2022 · 0 comments
Closed

[Bug-Candidate]: Typo in Wiki #1355

zarifpour opened this issue Aug 18, 2022 · 0 comments
Labels
bug-candidate Bugs reports that are not yet confirmed

Comments

@zarifpour
Copy link

Describe the issue:

There is a typo in the wiki.

contract C {

    modifier onlyOwner {
        if (msg.sender != owner) throw;
        _;
    }

    function setBuyPrice(uint256 newBuyPrice) onlyOwner public {
        buyPrice = newBuyPrice;
    }

    function buy() external {
     ... // buyPrice is used to determine the number of tokens purchased
    }    
}

updateOwner() setBuyPrice() has no event, so it is difficult to track off-chain changes in the buy price.

  • There is no function named updateOwner(), it seems the function should be setBuyPrice().

See: https://github.com/crytic/slither/wiki/Detector-Documentation#exploit-scenario-82

Code example to reproduce the issue:

https://github.com/crytic/slither/wiki/Detector-Documentation#exploit-scenario-82

Version:

Relevant log output:

No response

@zarifpour zarifpour added the bug-candidate Bugs reports that are not yet confirmed label Aug 18, 2022
0xalpharush added a commit that referenced this issue Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-candidate Bugs reports that are not yet confirmed
Projects
None yet
Development

No branches or pull requests

1 participant