call_flags.sol 419 B

12345678910111213141516
  1. library CallFlags {
  2. uint32 constant FORWARD_INPUT = 1;
  3. uint32 constant CLONE_INPUT = 2;
  4. uint32 constant TAIL_CALL = 4;
  5. uint32 constant ALLOW_REENTRY = 8;
  6. }
  7. contract Reentrant {
  8. function reentrant_call(
  9. address _address,
  10. bytes4 selector
  11. ) public returns (bytes ret) {
  12. (bool ok, ret) = _address.call{flags: CallFlags.ALLOW_REENTRY}(selector);
  13. require(ok);
  14. }
  15. }