Skip to content

Instantly share code, notes, and snippets.

@shingonu
Created December 11, 2018 12:39
Show Gist options
  • Select an option

  • Save shingonu/0deea0f2ec0dfb30c7c36c705e20004e to your computer and use it in GitHub Desktop.

Select an option

Save shingonu/0deea0f2ec0dfb30c7c36c705e20004e to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.24;
contract A {
uint256 public n = 1;
function setN(uint256 _n) public {
n = _n;
}
}
contract B {
A public a;
constructor(address _a) public {
a = A(_a);
}
function setN(uint256 _n) public {
a.setN(_n);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment