Assessment reports>MegaETH Predeposit>Threat Model>setTreasury

Function: setTreasury(address newTreasury)

This function is used to set the new treasury address. It is only callable by the owner.

Inputs

  • newTreasury

    • Control: Arbitrary address.

    • Constraints: Must not be zero.

    • Impact: New treasury address.

Branches and code coverage

Intended branches

  • Emit the TreasuryUpdated event.

  • Update treasury.

Negative behavior

  • Revert if the caller is not the owner.

  • Revert if the new treasury is zero.

Zellic © 2025Back to top ↑