Last active
September 28, 2022 11:28
-
-
Save ashwinYardi/c8962db6da225717b82496e98d3b3886 to your computer and use it in GitHub Desktop.
Sample contract with privare variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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