Solidity Contract Types, Byte Arrays, and {Address, Int, Rational} Literals

With this article, we continue our journey through the realm of Solidity data types following today’s topics: contract types, fixed-size byte arrays, dynamically-sized byte arrays, address literals, rational, and integer literals. It’s part of our long-standing tradition to make this (and other) articles a faithful companion or a supplement to the official Solidity documentation. πŸ‘‡ … Read more

Solidity Fixed Point Numbers and Address Types (Howto)

With this article, we continue our journey through the realm of Solidity data types. πŸ‘‰ Recommended Tutorial: Solidity Basic Data Types This time, we will focus on fixed point numbers, address types and address type members, and investigate when, how, and why they are used. Traditionally, our articles are running alongside the official Solidity documentation … Read more

Solidity Boolean and Integer Types – A Helpful Guide with Video

Types are among the most important building blocks of a statically-typed programming language, and since Solidity falls into that category, we finally have the opportunity to entertain ourselves with this crucial topic. By learning about types, we’ll get more closely familiar with the Solidity features that are based on idiosyncrasies of a particular data type. … Read more

Seven Simple Solidity Blocks to Build Your dApp

In this article, we’ll take a detailed look at the structure of a smart contract (docs). πŸ’‘ We’ll learn about state variables, functions, function modifiers, events, errors, struct types, and enum types. We have recognized most of these elements in action in the previous articles, especially in the ones where we had real examples of … Read more

How to Check If a List of ENS (.eth) Domains are Available? (Python)

You can check programmatically in Python whether a certain ENS ‘.eth‘ domain name is available by using the urlopen() function from urllib.request module to access the URL ‘https://etherscan.io/enslookup-search?search=example.eth’, replacing the URL suffix ‘example.eth’ with your desired domain. In the following example code snippet, I show how you could check a list of names, one domain … Read more

Solidity File Layout – SPDX License ID and Version Pragmas

In the previous articles, we looked at some of the representative examples of smart contracts representing possible real-world scenarios. Our main focus was on capturing the essence of each case, without particular attention given to the general structure, i.e. layout of the respective source files. However, in this mini-series starting with this article, we will … Read more

Solidity by Example – Understanding Modular Contracts

This article continues on the Solidity Smart Contract Examples series and implements an example of a modular contract checking that the balances being sent between the addresses comply with the requirements (docs). We’ll first lay out the entire smart contract example without the comments for readability and development purposes. Then we’ll dissect it part by … Read more

Solidity Example – Safe Remote Purchase

This article continues on the Solidity Smart Contract Examples series, which implements a simple, but the useful process of safe remote purchase. Here, we’re walking through an example of a blind auction (docs). We’ll first lay out the entire smart contract example without the comments for readability and development purposes. Then we’ll dissect it part … Read more

Compound for Developers: Yield Farming, Borrowing, Lending

This tutorial is in continuation of the first part of our DeFi series. In this part, let’s discuss the DeFi lending protocol Compound. πŸͺ™ Full DeFi Course: Click the link to access our free full DeFi course that’ll show you the ins and outs of decentralized finance (DeFi). Compound Operated by Compound, it is a … Read more