Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created November 29, 2019 18:27
Show Gist options
  • Select an option

  • Save vasa-develop/955f460881af95b88c20b462f54622c2 to your computer and use it in GitHub Desktop.

Select an option

Save vasa-develop/955f460881af95b88c20b462f54622c2 to your computer and use it in GitHub Desktop.
pragma solidity ^0.5.11;
import "./Implementation.sol";
contract Caller {
event CallerLog(uint256 gas);
Implementation public implementation;
constructor() public {
implementation = new Implementation();
}
function() external payable {
emit CallerLog(gasleft());
address(implementation).call.gas(gasleft()).value(msg.value)(msg.data);
emit CallerLog(gasleft());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment