25 September 2024
    22 minutes

    20 Common Solidity Beginner Mistakes

    20 Common Solidity Beginner Mistakes Our intent is not to be patronizing towards developers early in their journey with this article. Having reviewed code from numerous Solidity developers, we’ve seen…

    Read Article
    24 September 2024
    24 minutes

    Smart Contract Foundry Upgrades with the OpenZeppelin Plugin

    Smart Contract Foundry Upgrades with the OpenZeppelin Plugin Upgrading a smart contract is a multistep and error-prone process, so to minimize the chances of human error, it is desirable to…

    Read Article
    24 September 2024
    14 minutes

    UUPS: Universal Upgradeable Proxy Standard (ERC-1822)

    UUPS: Universal Upgradeable Proxy Standard (ERC-1822) The UUPS pattern is a proxy pattern where the upgrade function resides in the implementation contract, but changes the implementation address stored in the…

    Read Article
    25 July 2024
    22 minutes

    Try Catch and all the ways Solidity can revert

    Try Catch and all the ways Solidity can revert This article describes all the kinds of errors that can happen when a smart contract is called, and how the Solidity…

    Read Article
    20 July 2024
    13 minutes

    The Beacon Proxy Pattern Explained

    The Beacon Proxy Pattern Explained A Beacon Proxy is a smart contract upgrade pattern where multiple proxies use the same implementation contract, and all the proxies can be upgraded in…

    Read Article
    15 July 2024
    13 minutes

    Storage Slots in Solidity: Storage Allocation and Low-level assembly storage operations

    Storage Slots in Solidity: Storage Allocation and Low-level assembly storage operations This article examines the storage architecture of the Ethereum Smart Contracts. It explains how variables are kept in the…

    Read Article
    08 July 2024
    26 minutes

    Invariant Testing in Foundry

    Invariant Testing in Foundry Introduction In this article, we will discuss invariants and how to perform an invariant test on solidity smart contracts using foundry test suites. Invariant testing is…

    Read Article
    10 June 2024
    11 minutes

    Fixed Point Arithmetic in Solidity (Using Solady, Solmate, and ABDK as Examples)

    Fixed Point Arithmetic in Solidity (Using Solady, Solmate, and ABDK as Examples) A fixed-point number is an integer that stores only the numerator of a fraction — while the denominator…

    Read Article
    04 June 2024
    11 minutes

    transparent-upgradeable-proxy

    The Transparent Upgradeable Proxy Pattern Explained in Detail The Transparent Upgradeable Proxy is a design pattern for upgrading a proxy while eliminating the possibility of a function selector clash. A…

    Read Article
    29 May 2024
    21 minutes

    Understanding ABI encoding for function calls

    Understanding ABI encoding for function calls ABI encoding is the data format used for making function calls to smart contracts. It is also how smart contracts encode data when making…

    Read Article
    11 May 2024
    2 minutes

    Nodelegatecall Explained

    Nodelegatecall Explained The nodelegatecall modifier prevents delegatecalls from being sent to a contract. We will first show the mechanism for how to accomplish this then later discuss the motivation for…

    Read Article
    03 May 2024
    22 minutes

    Delegatecall: The Detailed and Animated Guide

    Delegatecall: The Detailed and Animated Guide This article explains how delegatecall works in detail. The Ethereum Virtual Machine (EVM) offers four opcodes for making calls between contracts: CALL (F1) CALLCODE…

    Read Article
    01 May 2024
    4 minutes

    Low Level Call vs High Level Call in Solidity

    Low Level Call vs High Level Call in Solidity A contract in Solidity can call other contracts via two methods: through the contract interface, which is considered a high-level call,…

    Read Article
    05 April 2024
    7 minutes

    Three ways to detect if an address is a smart contract

    Three ways to detect if an address is a smart contract This article describes three methods in Solidity for determining if an address is a smart contract: Check if msg.sender…

    Read Article
    04 April 2024
    12 minutes

    ERC-1363 Standard Explained

    ERC-1363 Standard Explained ERC-1363 enables a smart contract to detect and respond to an incoming transfer of tokens. What problem does ERC-1363 Solve? Suppose a user transfers an ERC-20 token…

    Read Article
    30 March 2024
    6 minutes

    Understanding the Function Selector in Solidity

    Understanding the Function Selector in Solidity The function selector is a 4 byte id that Solidity uses to identify functions under the hood. The function selector is how a Solidity…

    Read Article
    27 March 2024
    11 minutes

    How ERC721 Enumerable Works

    How ERC721 Enumerable Works An Enumerable ERC721 is an ERC721 with added functionality that enables a smart contract to list all the NFTs an address owns. This article describes how…

    Read Article
    23 February 2024
    6 minutes

    ERC20 Votes: ERC5805 and ERC6372

    ERC20 Votes: ERC5805 and ERC6372 ERC20 Votes Knowledge of ERC20 Snapshot is assumed, please refer to our article on ERC20 Snapshot for an introduction to the subject. ERC20 Votes does…

    Read Article
    28 December 2023
    3 minutes

    The Fallback Extension Pattern

    The Fallback Extension Pattern The fallback-extension pattern is a simple way to circumvent the 24kb smart contract size limit. Suppose we have functions foo() and bar() in our primary contract…

    Read Article
    20 December 2023
    6 minutes

    EIP 1967 Storage Slots for Proxies

    EIP 1967 Storage Slots for Proxies EIP 1967 is a standard for where to store information that proxy contracts need to execute. Both the UUPS (Universal Upgradeable Proxy Standard) and…

    Read Article
    24 November 2023
    5 minutes

    The second preimage attack for Merkle Trees in Solidity

    The second preimage attack for Merkle Trees in Solidity The second preimage attack in Merkle trees can happen when an intermediate node in a merkle tree is presented as a…

    Read Article
    08 November 2023
    15 minutes

    A comprehensive guide to the ERC 721 standard and related security issues

    A comprehensive guide to the ERC 721 standard and related security issues ERC721 (or ERC-721) is the most widely used Ethereum standard for nonfungible tokens. It associates a unique number…

    Read Article
    10 September 2023
    7 minutes

    Ten beginner project ideas after you learn Solidity

    Ten beginner project ideas after you learn Solidity Now that you”ve completed our solidity tutorial, what”s next? You now have enough knowledge to build any of the following projects. Knowledge…

    Read Article
    07 September 2023
    65 minutes

    The RareSkills Book of Solidity Gas Optimization: 80+ Tips

    The RareSkills Book of Solidity Gas Optimization: 80+ Tips TABLE OF CONTENTS The RareSkills Book of Gas Optimization Gas optimization tricks do not always work Beware of complexity and readability…

    Read Article
    12 August 2023
    7 minutes

    Solidity Coding Standards

    Solidity Coding Standards The purpose of this article is not to rehash the official Solidity Style Guide, which you should read. Rather, it is to document the common deviations from…

    Read Article