Skip to content

Should EVMC_DELEGATED propagate through DELEGATECALL / CALLCODE? #1306

@Haxatron

Description

@Haxatron

When a delegated EOA performs DELEGATECALL / CALLCODE, the EVMC_DELEGATED flag is lost -

if (dst != code_addr)
msg.flags |= EVMC_DELEGATED;
else
msg.flags &= ~std::underlying_type_t<evmc_flags>{EVMC_DELEGATED};

Should this be the case? Technically the DELEGATECALL / CALLCODE is called within the context of the delegated EOA, so it would make sense that DELEGATECALL / CALLCODE should inherit the EVMC_DELEGATED flag from its parent call frame.

Also another case - If a call frame without EVMC_DELEGATED flag executes a DELEGATECALL to a delegated EOA, should the DELEGATECALL call frame have the EVMC_DELEGATED flag?

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