I am new to solidity and I have written some functions by referring to blogs and documentation. In one function, I must pass an address to send tokens to it. I have written the code for it but when I run it, I get the following error:
Invalid type for argument in a function call. Invalid implicit conversion from address to address payable request
Here is my code:
address admin;
function endSale() public {
require(msg.sender == admin);
selfdestruct(admin);
}
How to solve this?