Guest User

Untitled

a guest
Mar 22nd, 2019
60
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