I have a contract that inherits from Open Zeppelin's Ownable contract. There is a method payFees() in my contract that is expected to transfer funds to the owner of the contract. The definition of payFees is as follows
function payFees() public payable {
require(students.has(msg.sender), "DOES NOT HAVE STUDENT ROLE");
if(this.areFeesEnough(msg.value))
{
super.owner().transfer(msg.value);
studentFees[msg.sender] = true;
}
}
I expect that a call to super.owner() returns the contract owner given that owner()
is a public view function in the parent Ownable
contract that returns the owner. Unfortunately, the code fails with the error.
TypeError: Member "transfer" not found or not visible after argument-dependent lookup in address.
super.owner().transfer(msg.value);
Any help is appreciated.Thank you.