Guest User

Untitled

a guest
Jun 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. pragma solidity ^0.4.21;
  2.  
  3. contract FirstContract {
  4.  
  5. bool public isTrue = true;
  6.  
  7. function sayHello() public pure returns(bool) {
  8. return true;
  9. }
  10.  
  11. }
  12.  
  13. contract ServiceContract {
  14.  
  15. FirstContract firstContract;
  16.  
  17. function ServiceContract (address _firstContract) public {
  18. firstContract = FirstContract(_firstContract);
  19. }
  20.  
  21. function confirmFirstContract() public view returns(bool) {
  22. bool x = firstContract.isTrue();
  23. return x;
  24. }
  25.  
  26. function sayHi() public view returns(bool) {
  27. bool y = firstContract.sayHello();
  28. return y;
  29. }
  30.  
  31. }
Add Comment
Please, Sign In to add comment