Is there any way to have an abstract base contract with an abstract function which gets implemented in a derived contract by a property (and not a function)?
e.g. the following attempts failed:
contract Base {
//function f() public returns (uint256);
function f() external view returns (uint256); // also not working
}
contract Derived is Base {
uint256 public f;
}
In all cases Derived
is still abstract because it does not implement f
from the Base
contract although the ABI is identical. A typical scenario is e.g. a tokens which implements the ERC20 interface an totalSupply
might just be implemented with a property and not a getter and a property (in most simple cases that would suffice).