Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.24;
- import "./Second.sol";
- contract First {
- Second private _oSecond;
- int32 public _nRes1;
- constructor(address oSecond) public payable {
- _oSecond = Second(oSecond);
- _nRes1 = 3;
- }
- function TestError() public {
- _oSecond.State();
- //_oSecond._nRes2(); // the problem call is here
- _nRes1 = 5;
- }
- }
- pragma solidity ^0.4.24;
- contract Second {
- int32 public _nRes2;
- constructor() public {
- _nRes2 = 15;
- }
- function State() public {
- _nRes2 = 17;
- }
- }
- (async () => {
- await first.methods.TestError().send({from: accounts[0]});
- var nRes = await first.methods._nRes1().call({from: accounts[0]});
- console.log(nRes);
- var nRes = await second.methods._nRes2().call({from: accounts[0]});
- console.log(nRes);
- })();
Add Comment
Please, Sign In to add comment