Description
Why is my account balance equal to 0 while the examples available on the internet, the account balance is different from 0
**==== Unprotected Selfdestruct ====
SWC ID: 106
Severity: High
Contract: Donation
Function name: destroy()
PC address: 882
Estimated Gas Usage: 188 - 283
Any sender can cause the contract to self-destruct.
Any sender can trigger execution of the SELFDESTRUCT instruction to destroy this contract account and withdraw its balance to an arbitrary address. Review the transaction trace generated for this issue and make sure that appropriate security controls are in place to prevent unrestricted access.
In file: vul.sol:30
selfdestruct(payable(msg.sender))
Initial State:
Account: [CREATOR], balance: 0x0, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , decoded_data: , value: 0x0
Caller: [ATTACKER], function: destroy(), txdata: 0x83197ef0, value: 0x0**