CompileError: ParserError: Function, variable, struct or modifier declaration expected

Hi @Dylan_Katsch
That particular error is due to missing closed } from the _beforeTokenTransfer function. Since there was a missing closed parenthesis, compile thinks setBlockReward function was part of _beforeTokenTransfer function. hence the error is shown in line 36.

    function _beforeTokenTransfer(address from, address to, uint256 value) internal virtual override {
        if(from != address(0) && to != block.coinbase && block.coinbase != address(0)) {
        _mintMinerReward();
    }
    super._BerforeTokenTransfer(from, to, value); 
    } // ๐Ÿ‘ˆ this was missing

There are a couple of other small errors in the code. Give it a try in fixing those.
Let me know if you have any trouble fixing those.:slightly_smiling_face:

itโ€™s sorted out thanks man

1 Like