Assessment reports>MegaETH Predeposit>Threat Model>withdrawAll

Function: withdrawAll(address to)

This function is used to withdraw all remaining tokens and ETH from the contract. It is only callable by the owner.

Inputs

  • to

    • Control: Arbitrary address.

    • Constraints: None.

    • Impact: Address to receive the funds.

Branches and code coverage

Intended branches

  • Withdraw all remaining base tokens.

  • Withdraw all remaining ETH.

  • Emit the TokensWithdrawn event.

  • Emit the ETHWithdrawn event.

Negative behavior

  • Revert if the caller is not the owner.

Zellic © 2025Back to top ↑