Commit a51e181e by Francisco Giordano

Fix unbounded recursion in ERC20WithAutoMinerReward example

parent 2b046d79
...@@ -99,7 +99,9 @@ contract ERC20WithAutoMinerReward is ERC20 { ...@@ -99,7 +99,9 @@ contract ERC20WithAutoMinerReward is ERC20 {
} }
function _beforeTokenTransfer(address from, address to, uint256 value) internal virtual override { function _beforeTokenTransfer(address from, address to, uint256 value) internal virtual override {
if (!(from == address(0) && to == block.coinbase)) {
_mintMinerReward(); _mintMinerReward();
}
super._beforeTokenTransfer(from, to, value); super._beforeTokenTransfer(from, to, value);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment