Fix unbounded recursion in ERC20WithAutoMinerReward example

pull/2931/head
Francisco Giordano 3 years ago
parent 2b046d79e1
commit a51e181e3b
  1. 4
      docs/modules/ROOT/pages/erc20-supply.adoc

@ -99,7 +99,9 @@ contract ERC20WithAutoMinerReward is ERC20 {
}
function _beforeTokenTransfer(address from, address to, uint256 value) internal virtual override {
_mintMinerReward();
if (!(from == address(0) && to == block.coinbase)) {
_mintMinerReward();
}
super._beforeTokenTransfer(from, to, value);
}
}

Loading…
Cancel
Save