Hello,
Thanks for all the help so far.
I am trying to troubleshoot an override error.
Can someone explain how the override system works in the openzepplin framework in this case?
The error is
“expected { but got override
”
derived from passing 21 of this source code:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Testing_overrides is ERC20, ERC20Burnable, Pausable, Ownable {
constructor() ERC20("testing_overrides", "TEST") {}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal whenNotPaused override {
![bandicam 2021-07-07 18-46-45-941|554x500](upload://tUiNbSHKuVrHt1EMhvRgdC89fzo.jpeg)
super._beforeTokenTransfer(from, to, amount);
}
}