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 Delegated {
function greet(address to) public {
to.delegatecall(abi.encodeWithSelector(Greeter(to).greet.selector));
}
}
contract Greeter {
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.
On Goerli testnet:
delegateCall is working fine as expected (emitting the caller contract address in the logs). For more info please refer to solidity docs
Reproducing the issue
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:On Aurora testnet:
By calling
Caller.greet()
, it returns the caller contract address in the transaction logs.On Goerli testnet:
delegateCall
is working fine as expected (emitting the caller contract address in the logs). For more info please refer to solidity docsRelated issues #118 and https://github.com/aurora-is-near/aurora-engine/issues/336