hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
266 stars 119 forks source link

`CustomSelfDestructOperation` does not check for static frame #14037

Open lukelee-sl opened 5 days ago

lukelee-sl commented 5 days ago

Problem

The CustomSelfDestructOperation does not descend from or use the Besu implementation of SelfDestructOperation.
We are missing a check for static frames

        if (frame.isStatic()) {
            return new Operation.OperationResult(cost, ExceptionalHaltReason.ILLEGAL_STATE_CHANGE);

Solution

Add the check above to ensure the user gets the appropriate status code returned. Consider descending from the Besu implementation of SelfDestructOperation for reference.

Alternatives

No response