function withdraw() external isOwner() {
    address payable owner = address(uint160(getOwner()));//**this is the line I get err

owner contract:

function getOwner() external view returns (address) {
    return owner;

1 Answer 1


Your function getOwner() is marked external, and you're calling it internally. If you instead mark getOwner() as public, it will both be callable from outside and inside your contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.