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

Invalid low level EVM function call behaviour #336

Closed
0x3bfc opened this issue Nov 9, 2021 · 1 comment · Fixed by #341
Closed

Invalid low level EVM function call behaviour #336

0x3bfc opened this issue Nov 9, 2021 · 1 comment · Fixed by #341
Assignees
Labels
A-evm-compatibility Area: EVM compatibility changes or fixes. C-bug Category: Something isn't working. P-high Pririoty: high

Comments

@0x3bfc
Copy link
Contributor

0x3bfc commented Nov 9, 2021

The call (low level EVM function) should emit the callee contract address in the transaction logs, however it emits the caller contract address. The following example reproduces the issue:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Caller {
    function greet(address to) public {
        to.call(abi.encodeWithSelector(Greeter(to).greet.selector));
    }
}


contract Greeter { // callee contract
    event Logger(address sender);

    function greet() public {
        emit Logger(msg.sender);
    }
}

On Aurora testnet:

By calling Caller.greet(), it returns the caller contract address in the transaction logs.

image

image (1)

On Goerli testnet:

image
image

delegateCall is working fine as expected (emitting the caller contract address in the logs). For more info please refer to solidity docs

@joshuajbouw
Copy link
Contributor

Thanks for finding this. We will look into determining if this is an issue with the engine or rust-blockchain EVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-evm-compatibility Area: EVM compatibility changes or fixes. C-bug Category: Something isn't working. P-high Pririoty: high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants