I am quite new to solidity, and I have not managed to find a solution for this problem.

I am passing the function an address but it says the following: "Invalid type for argument in function call. Invalid implicit conversion from address to address payable request."

address admin;

function endSale() public {
 require(msg.sender == admin);

3 Answers 3


Elsewhere in the contract, find address admin; and declare it as address payable admin;.

Alternatively, selfdestruct(msg.sender); because require(msg.sender == admin); ensures they are the same and msg.sender should be payable.


As of Solidity 0.5.0, there are two different address types in solidity: address and address payable.

You can only transfer funds to an address payable.

Therefore, your problem will be fixed by making admin an address payable:

address payable admin;

You can cast to address payable with this code:


Solidity 0.6.x update:


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.