2024-05-29 12:29:55 +00:00
|
|
|
pragma solidity ^0.8.25;
|
|
|
|
|
2021-04-19 08:32:36 +00:00
|
|
|
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
2023-04-14 06:26:46 +00:00
|
|
|
|
2021-04-19 08:32:36 +00:00
|
|
|
contract GLDToken is ERC20 {
|
|
|
|
constructor() ERC20("Gold", "GLD") {
|
|
|
|
_mint(msg.sender, 1000000000000000000000);
|
|
|
|
}
|
2024-05-29 12:29:55 +00:00
|
|
|
|
2021-09-06 14:44:06 +00:00
|
|
|
function destroy() public {
|
2024-05-29 12:29:55 +00:00
|
|
|
(bool ok, ) = payable(msg.sender).call{value: address(this).balance}("");
|
|
|
|
require(ok, "ETH transfer failed");
|
|
|
|
|
|
|
|
_burn(msg.sender, balanceOf(msg.sender));
|
2021-09-06 14:44:06 +00:00
|
|
|
}
|
2021-04-19 08:32:36 +00:00
|
|
|
}
|