Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import "Owned.sol";
  2.  
  3. contract A is Owned {
  4.  
  5. B private b;
  6.  
  7. function A(address B) {
  8. b = B(b);
  9. }
  10.  
  11. function myInterface() public onlyOwner {
  12. a.doStuff({from: msg.sender});
  13. }
  14. }
  15.  
  16. contract B is Owned {
  17.  
  18. C private c;
  19.  
  20. function B(address c) {
  21. c = C(c);
  22. }
  23.  
  24. function doStuff() public onlyOwner {
  25. c.store(42,{from: msg.sender});
  26. }
  27. }
  28.  
  29. contract C is Owned {
  30.  
  31. int private theAnswer;
  32.  
  33. function store(int value) public onlyOwner {
  34. theAnswer = value
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement