Hey I'm trying to use selfdestruct in solidity but I'm getting this error when I'm trying to run selfdestruct(address*) :
TypeError: Invalid type for argument in function call. Invalid implicit conversion from int_const 0 to address payable requested. --> contracts/Hello_World.sol:9:22: | 9 | selfdestruct(0x0); | ^^^
*address- my Ethereum address
The code :
pragma solidity >=0.7.0 <0.9.0;
contract HelloWorld {
string public message;
function setMessage(string memory newMessage) public {
message = newMessage;
}
function remove() public {
selfdestruct(0x0);
}
}
selfdestruct
.