We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The proposed solution fails to work when the exercise is made a little harder, using the following contract:
contract Coin{ address owner = msg.sender; mapping(address => uint) balances; // _mint must not be overriden function _mint(address dst, uint val) internal{ require(msg.sender == owner); balances[dst] += val; } function mint(address dst, uint val) public{ _mint(dst, val); } } contract MyCoin is Coin{ event Mint(address, uint); function _mint(address dst, uint val) internal{ balances[dst] += val; emit Mint(dst, val); } } contract MyCoin2 is MyCoin{ function set(address dst, uint val) internal{ balances[dst] = val; } } contract MyCoin3 is Coin{ function set(address dst, uint val) internal{ balances[dst] = val; } } contract MyCoin4 { function _mint(address dst, int val) public{} } contract NotCoin { address notowner; function _mint(address dst, uint val) internal{} }
Running the solution results in this output:
$ python3 solution.py Error, MyCoin overrides _mint Error, MyCoin2 overrides _mint Error, MyCoin3 overrides _mint
However, MyCoin3 should not be detected as overriding the _mint function.
MyCoin3
_mint
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The proposed solution fails to work when the exercise is made a little harder, using the following contract:
Running the solution results in this output:
However,
MyCoin3
should not be detected as overriding the_mint
function.The text was updated successfully, but these errors were encountered: