SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity ^0.4.1;
  2.  
  3. contract C1 {
  4.    
  5.     uint x;
  6.    
  7.     constructor() public {
  8.         x = 10;
  9.     }
  10.    
  11.     function setX(uint _x) public returns(bool) {
  12.         x = _x;
  13.         return true;
  14.     }
  15.    
  16.     function getX() public view returns(uint) {
  17.         return x;
  18.     }
  19. }
  20.  
  21. contract C2 {
  22.    
  23.     function f2(address addrC1) public view returns(uint) {
  24.         C1 c1 = C1(addrC1);
  25.         return c1.getX();
  26.     }
  27.    
  28. }
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