Guest User

Untitled

a guest
Jun 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. pragma solidity ^0.4.24;
  2.  
  3. contract A {
  4. address public sender;
  5.  
  6. function dcall(B other, C child) public {
  7. other.dcall(child);
  8. }
  9. }
  10.  
  11. contract B {
  12. address public sender;
  13.  
  14. function cal(address other) public {
  15. other.call(bytes4(keccak256("set()")));
  16. }
  17.  
  18. function ccode(address other) public {
  19. other.callcode(bytes4(keccak256("set()")));
  20. }
  21.  
  22. function dcall(address other) public {
  23. other.delegatecall(bytes4(keccak256("set()")));
  24. }
  25. }
  26.  
  27. contract C {
  28. address public sender;
  29.  
  30. function set() public {
  31. sender = msg.sender;
  32. }
  33. }
Add Comment
Please, Sign In to add comment