I have created two Contract to separate out storage and validation rules.
ValidationService.sol
pragma solidity ^0.4.16;
import "./Storage.sol";
contract ValidationService {
Storage public store;
constructor(address add) public{
store=Storage(add);
}
function getMyNumber() public constant returns (uint) {
return store.getNumber();
}
}
Storage.sol
pragma solidity ^0.4.16;
contract Storage {
uint public mynum = 5;
function getNumber() public constant returns (uint) {
return mynum;
}
}
I have called getMyNumber method which called getNumber method of Storage contract and it should return 5 as a output.
validationservice.getMyNumber.call()
The above code is working fine in remix and truffle development environment but it is not working in private blockhain network using Geth.
If i call getNumber method of Storage contract directly from geth console, It's working fine.
Can anyone please guide where is my mistake