Created
August 29, 2022 18:27
-
-
Save sampathkumarspace/0242a6a7b86cd29c90e2daef5395dbab to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
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:MIT | |
//This Program is about to understand datatypes in solidity | |
pragma solidity ^0.8.7; | |
contract Simple{ | |
//int, uint, string, address, bool | |
int public num = 369; | |
uint private unum = 7; //no -ve value or 0 allowed | |
string public nam = "sam"; | |
address public add = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; //we have to put ethe address only , here i used my account address | |
bool public bol = true; | |
//minimum and maximum value of int and uint | |
int public minV = type(int).min; | |
int public maxV = type(int).max; | |
uint public uminV = type(uint).min; | |
uint public umaxV = type(uint).max; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment