> For the complete documentation index, see [llms.txt](https://decanectcoin.gitbook.io/decanect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://decanectcoin.gitbook.io/decanect/readme.md).

# Solidity Fundamentals

**Level: Beginner**\
**Module Title:** *Build Your First Smart Contract with Solidity*

**🧠 What You’ll Learn:**

* The role of Solidity in Ethereum development
* Solidity syntax and data types
* Writing and understanding a basic smart contract
* Deploying a contract using Remix IDE

**📘 Lesson 1: What is Solidity?**

Solidity is the main programming language for writing smart contracts on Ethereum. It’s statically typed, supports inheritance, libraries, and complex custom types. Inspired by JavaScript and C++, Solidity allows you to encode logic that executes directly on the blockchain.

Use cases:

* Token creation (ERC-20, ERC-721)
* Decentralized applications (dApps)
* Voting systems
* Escrow and automated payments

<br>

**📘 Lesson 2: Writing Your First Contract**

```
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract HelloWorld {
    string public message = "Hello, Ethereum!";
}

```

**Explanation:**

* `pragma`: Compiler version
* `contract`: Smart contract declaration
* `string public`: A readable string stored on-chain<br>

**📘 Lesson 3: Understanding Variables & Functions**

```
uint public count;

function increment() public {
    count += 1;
}
```

* `uint`: Unsigned integer
* `public`: Accessible externally
* `function`: Defines callable logic

**📘 Lesson 4: Deploying with Remix IDE**

1. Visit Remix
2. Create a new `.sol` file
3. Paste your Solidity code
4. Compile with the Solidity Compiler plugin
5. Deploy using JavaScript VM or Injected Web3 (MetaMask)
6. Interact with your contract using Remix's UI
