This is a short introduction to Solidity, the programming language used to create smart contracts on the Ethereum VM.

πŸ§΅πŸ‘‡πŸ»
1️⃣ What Is Solidity?

Solidity is an object-oriented, high-level programming language designed to implement smart contracts on the Ethereum Virtual Machine.

It is statically typed, supports inheritance, libraries, and complex user-defined types.
Solidity is a domain-specific language. Besides Python or JavaScript, which are general-purpose languages, Solidity is only meant to be used for smart contract development.
The language was initially proposed in 2014 and later released as the primary language of smart contract development on Ethereum by the Ethereum foundation.

It is inspired by languages like C/C++, JavaScript, as well as Python.
2️⃣ What Is Solidity Used For?

As already stated, Solidity is used to create smart contracts. You can imagine the latter to be like specific objects, in this case, contracts.
A smart contract is a program that runs on a blockchain. Within this contract, any interaction between contracts of the same kind, contracts of another kind, and its users are programmed into.
Stable coins, as long as they are not the native currency of their own blockchain, are implemented as smart contracts, and so are NFTs or other tokens.

You could also implement a full election process within a smart contract, for example, or a vending machine.
3️⃣ About Its Syntax

Solidity is a curly brace language inspired by C, C++, JavaScript, and some Python. However, it still looks pretty different from those languages and has a unique touch to it.
You can see an example of a basic Solidity contract below. πŸ‘‡πŸ»
Perhaps you have noticed that modifiers on functions are actually placed behind the parameter list of a function. This is one example of Solidity's different syntax.

Those modifiers have some pretty special meaning and are very important.
As writing to blockchains is transaction-based, you need to mark functions that alter the state of a contract and thus require a transaction accordingly. Functions that don't alter the state of a contract and thus don't require a transaction have to be marked, as well.
Other than the aforementioned, Solidity follows the C-standard of declaring variables with a leading type and the identifier after. It has loops, arrays, and anything else other languages also have.

You can see an example of a simple for-loop, below. πŸ‘‡πŸ» for (uint256 loopVariable = 0; loopVariable < exclusiveLoopE
4️⃣ How To Get Started?

The easiest answer is sometimes the best: Start hacking!

Remix is an online Solidity IDE that allows you to get started without the need to install anything.

remix.ethereum.org
If you want to get deeper into Solidity and learn the language, I already compiled a list of resources that I found pretty valuable. Perhaps they are to you, as well!

And if you think about how you could set up your Solidity development environment, look no further. I also wrote a thread about this!

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Oliver Jumpertz

Oliver Jumpertz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @oliverjumpertz

8 May
You did some Solidity tutorials, and now you're stuck because you don't know what else to build?

Let me help you out by giving you three simple ideas for dApps, perfect for beginners!

πŸ§΅πŸ‘‡πŸ»
1️⃣ A Voting dApp

Build a dApp that lets users create elections. Any user can start an election and choose a registration period, a voting period, and an ending time.

During the registration period, users can sign up as a candidate.
Once the registration period closes, no one should be able to register anymore. Instead, the voting period starts where anyone can vote for their favorite candidate.

Your frontend should show open elections, the current period, the time remaining, and the candidates.
Read 11 tweets
8 May
Unsure how to set up your first Solidity project? I got you covered!

Here is a list of important tools that make up an awesome Solidity coding environment.

πŸ§΅πŸ‘‡πŸ»
1️⃣ Visual Studio Code

For some, this choice of editor might be obvious. For some, it might not.

However, VS Code will serve you pretty well, as you'll work a lot with JavaScript and, of course, Solidity.

code.visualstudio.com
2️⃣ Solidity Plugin

There is a plugin for (nearly?) every programming language out there, and so there is for Solidity.

This plugin will give you syntax highlighting, snippets, compilation, and more. You'll somehow want to write Solidity, don't you?

marketplace.visualstudio.com/items?itemName…
Read 7 tweets
7 May
Do you know what many dApp developers struggle with?

Which data to put on-chain. More data on the chain can drive the cost up. Too much data might render your app unusable. Storing fewer data might not be an option.

Here are some ideas for you to fix this. πŸ§΅πŸ‘‡πŸ»
1️⃣ Use A Dedicated Database

This approach will make your dApp into an app. If you bring in central data storage, you can circumvent the limits of some blockchains but it doesn't keep the promise of being decentralized.
You can store anything that you can't store on-chain in your database and associate it with a user. Whenever you need that type of data, you fetch it from your database.
Read 12 tweets
7 May
Want to get into smart contract development and learn Solidity? Want to get into an area of software development where salaries currently rise through the roof?

Here are 5 awesome resources that help you to get into the language of the Ethereum VM!

πŸ§΅πŸ‘‡πŸ»
1️⃣ CryptoZombies

CryptoZombies is an awesome approach to teaching Solidity. You learn Solidity by basically playing a game, and it's free!

Learning through CryptoZombies definitely isn't as dry as the zombies are themselves!

cryptozombies.io
2️⃣ EthereumDev

EthereumDev gives you a full free course that covers everything you need to know in the beginning. It also covers interacting with the blockchain through JavaScript, which definitely helps you to build your own dApps!

ethereumdev.io
Read 6 tweets
3 May
I got asked why people get no engagement on their tweets, no new followers, and how to fix this about 10 times in the last 24 hours.

Here is a thread of possible reasons and how to fix them for all of you, based on my own experience!

πŸ§΅πŸ‘‡πŸ»
1️⃣ You Shout Into The Void

When you have a low follower count and no one replies, likes, or retweets your tweets, it might be that people simply don't see you.
How tweets are represented to users roughly works as follows:

Tweets are either represented in a curated feed (the top tweets) or another version that is sorted by latest.

The curated feed is the default, and this is where the algorithm reigns.
Read 35 tweets
2 May
Code Reviews are an awesome way to use the experience and knowledge of a team to create good software. Not all review processes are enjoyable, though.

Here are 6 tips to make your review process better and more enjoyable for everyone!

πŸ§΅πŸ”½
1️⃣ Make Expectations Clear

A good review process should both be standardized and individual. The terms of the process should be written down and transparent for everyone on the team. Each team member should know what is expected of them and all team members should agree ...
... on the terms. Changing the terms should always be a democratic process within the team. If the team disagrees on changes or terms, it should discuss the issues until there is consent.

On the other hand, the process should be flexible enough to allow for individuality.
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(