Skip to content

Instantly share code, notes, and snippets.

@andreafspeziale
Created July 2, 2019 19:23
Show Gist options
  • Select an option

  • Save andreafspeziale/0f8812c2619fefb7f4bf7311c0ebf758 to your computer and use it in GitHub Desktop.

Select an option

Save andreafspeziale/0f8812c2619fefb7f4bf7311c0ebf758 to your computer and use it in GitHub Desktop.
function executeCall(
    address _to,
    uint256 _value,
    bytes memory _data
  )
    internal
    returns (bool success)
  {
    // solium-disable-next-line security/no-inline-assembly
    assembly {
       success := call(gas, _to, _value, add(_data, 0x20), mload(_data), 0, 0)
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment