Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set creator account balance #1886

Open
funfun648 opened this issue Oct 14, 2024 · 0 comments
Open

How to set creator account balance #1886

funfun648 opened this issue Oct 14, 2024 · 0 comments

Comments

@funfun648
Copy link

funfun648 commented Oct 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant