Skip to content

How to set creator account balance #1886

Open
@funfun648

Description

@funfun648

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**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions