daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. contract DelegateCaller {
  2.   uint public n;
  3.   address public sender;
  4.  
  5.   function delegatecallSetN(address _e, uint _n) {
  6.     _e.delegatecall(bytes4(keccak256("setN(uint256)")), _n); // D's storage is set, E is not modified
  7.   }
  8. }
  9.  
  10. contract OuterContract {
  11.   uint public n;
  12.   address public sender;
  13.  
  14.   function setN(uint _n) {
  15.     n = _n;
  16.     sender = msg.sender;
  17.   }
  18. }
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
 
Top