Skip to content

Instantly share code, notes, and snippets.

@pavoltravnik
Last active January 25, 2020 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavoltravnik/a6400a2964e6ed3068f7e695699d0035 to your computer and use it in GitHub Desktop.
Save pavoltravnik/a6400a2964e6ed3068f7e695699d0035 to your computer and use it in GitHub Desktop.
// soljson-v0.6.1+commit.e6f7d5a4.js
// https://solidity.readthedocs.io/en/v0.6.1/contracts.html#getter-functions
pragma solidity >=0.4.0 <0.7.0;
contract C {
uint public data;
function edit() public {
data = 3; // internal change
}
function returnData() public view returns (uint) {
return this.data(); // external access
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment