📃Solidity arrays can have a compile-time fixed size or a dynamic size.


📃Solidity arrays can have a compile-time fixed size or a dynamic size.

Share Dialog

First Contract App
Here we have a simple contract, increment and decrement the count store in this contract.// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; contract Counter { uint public count; // Function to get the current count function get() public view returns (uint) { return count; } // Function to increment count by 1 function inc() public { count += 1; } // Function to decrement count by 1 function dec() public { // This function will fail if count = 0 count -= 1; } } There are some points we s...

Ether & Wei
🚀Transactions are paid with ether. 🚀Similar to how one dollar is equal to 100 cent, one ether is equal to 10^18 wei. 🚀There's a useful page to visualize eth-wei conversion: https://eth-converter.com/

Primitive Data Types
Here I introduce you to some primitive data types available in Solidity.Line 6, we have a bool variable, this type of variable only can have two possible values, true or false. Lines 8-10, we have uint type, uint stands for unsigned integer, meaning non negative integers. We can declare uint8 where the possible values goes from 0 to 2 ** 8-1, uint16 (0 to 2 ** 16-1), uint32 …. uint256, by declaring “uint” is an alias for uint256. The same applies for int type, lines 12-14, but it works with n...
Subscribe to CryptoVincent
<100 subscribers