SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity 0.5.10;
  2.  
  3. contract SimpleProxy {
  4.  
  5.     address delegate;
  6.     address owner = msg.sender;
  7.  
  8.     function upgradeDelegate(address _delegate) public {
  9.         require(msg.sender == owner);
  10.         delegate = _delegate;
  11.     }
  12.  
  13.     function() external payable {
  14.         assembly {
  15.             let _target := sload(0)
  16.             calldatacopy(0x0, 0x0, calldatasize)
  17.             let result := delegatecall(gas, _target, 0x0, calldatasize, 0x0, 0)
  18.             returndatacopy(0x0, 0x0, returndatasize)
  19.             switch result case 0 {revert(0, 0)} default {return (0, returndatasize)}
  20.         }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top