Skip to content

Instantly share code, notes, and snippets.

@ashwinYardi
Last active September 28, 2022 11: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 ashwinYardi/c8962db6da225717b82496e98d3b3886 to your computer and use it in GitHub Desktop.
Save ashwinYardi/c8962db6da225717b82496e98d3b3886 to your computer and use it in GitHub Desktop.
Sample contract with privare variables
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
contract PrivateAccessDemo {
uint256 private privateVariable;
uint256 public publicVariable;
constructor(uint256 privateValue, uint256 publicValue) {
privateVariable = privateValue;
publicVariable = publicValue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment