This guide presents a possible path to quickly learn Solidity targeted at web2 engineers that may be familiar with back-end, front-end, mobile, scientific or other general types of development. By the end of this guide you will have built a complete smart contract, deployed and tested it and will be ready to develop on Ethereum or study more advanced topics.
First, why do we even need a guide? Why can't we just jump in and learn Solidity just like any other programming language? For example, if you already knew Python, you could learn some Node.js pretty quickly by working on a real project and referring to https://hyperpolyglot.org/scripting. It turns out that Ethereum presents its own unique challenges:
This is inevitably going to be a very opinionated approach, but there are a few principles we have tried to adopt to overcome the above challenges:
Lastly, I have not focused on tutorial curation and it is encouraged that the reader looks for other beginner tutorials that they enjoy and that guide through the different steps.
Follow our guide on How to Get Unstuck with Ethereum if you run into any issues. Be OK with getting stuck for longer than doing web2 development. web3 has a high barrier to entry but is very rewarding when you learn it.
Use it (~2 days)
First priority is to use some simple smart contracts: make a trade on Matcha, lend some money on Compound, etc. You can refer to https://newsletter.banklesshq.com/ for some interesting things to do. Learn how to use Metamask.
Get your hands dirty (~1 day)
Start by doing crypto zombies. This is still the most interactive tutorial available: https://cryptozombies.io/.
Read about Ethereum’s implementation in the Whitepaper (~1 day)
One way to look at Ethereum is as a shared database for programs and their data. You don't need to understand the details at this stage but the whitepaper will help by building some intuition on what a smart contract is and how it is stored. https://ethereum.org/en/whitepaper/
You can also refer to the first section of this guide for a more visual explanation: https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf.
Remix IDE: Write your first smart contract (~1-3 days)
Find any good smart contract tutorial and start learning using the Remix IDE. https://remix.ethereum.org/. Learn to use all the additional functions like debugging. You can start by doing smaller functions and moving to more complex functions. Here is an example sequence of tasks:
While slightly outdated, you can use our syntax reference to quickly pick up relevant syntax (https://reference.auditless.com/cheatsheet/).
Learn to use Etherscan and ethtxinfo (< 1 day)
Remember the first task of using Ethereum? Go to Etherscan (https://etherscan.io/) and learn how to look at contracts, study their source code and understand transactions. Similarly, explore some transactions in https://ethtx.info/. This will be useful for on-chain debugging. Finally learn to use Metamask + Etherscan in conjunction to directly interact with some real contracts. For example, can you buy some Wrapped Ether: https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2#writeContract?
Deploy your contract to testnet (1-3 days)
Using Remix IDE, you should be able to deploy your contract to an Ethereum Testnet. Learn about Etherscan verification and verify the source code of your contract. Then, use Etherscan to interact with it then use all the tools you learned (Etherscan, Ethtx.info) to inspect transactions. Note: you can interact with contracts that you have not verified using My Ether Wallet or lower-level tooling on your own computer.
Get access to a smart contract node (<1 day)
Look at Alchemy or Infura and get a node account. This will be useful for local development later on.
Learn a smart contract framework and move everything you did in Remix (1-2 weeks)
If you are comfortable with Javascript, set up a GitHub repo in Hardhat. If you are much more comfortable with Python, set up Ape (https://github.com/ApeWorX/ape). If you are working in a team, it may make sense to make a holistic decision on the framework; in that case it’s worth taking a look at Foundry as well (https://github.com/gakonst/foundry).
Learn how to compile your contracts. Write some tests and run them. Figure out how to deploy your contract to testnet again and run Etherscan verification. Try to break your code and experiment with debugging both locally and on the network.
Develop a contract that uses another contract (1-2 weeks)
Ethereum’s key feature is composability. The next challenge is learning to read and incorporate other smart contracts into your design. If you don't have any ideas, you could create a “vault” contract, which basically allows users to deposit a token and then invests it in another protocol for lending, liquidity provision or another type of yield generating activity). In practice this will mean:
Hopefully by this stage you would understand how to deploy this contract while referencing another contract on mainnet – you can deploy your contract to mainnet if you would like to try it (but note that it will cost Ether).
Congratulations - at this stage, you will have completed a full development workflow in about a month. Depending on what you are trying to do, it may make sense to learn how to build a simple dapp (front-end for your smart contract), dive deeper into security topics, learn the inner workings of the EVM or build more complex smart contracts.
Some areas to focus on as you continue your journey: