Browse all Solidity articles.
20 min read
Events in Starknet Events emit data from contract execution into the transaction receipt. The receipt holds metadata about what happened during the execution, which can be queried or indexed by...
3 min read
Access Control in Cairo Access control defines who can call specific functions or modify contract behavior. This article explains how Cairo implements access control using the macro. A Review of...
11 min read
Integers in Cairo Cairo doesn’t offer the full range of integer sizes found in Solidity. While Solidity provides integer types for every multiple of 8 bits up to 256, Cairo supports only the...
8 min read
Cairo Components Part 1 Components in Cairo behave like abstract contracts in Solidity. They can define and work with storage, events, and functions, but they can’t be deployed on their own. The...
11 min read
Structure of a Basic Contract This article shows how to build a deployable Cairo contract for Starknet. Starting from a simple sketch, we will gradually add features to build a working contract...
7 min read
Function Visibility in Cairo Cairo does not have "internal" and "pure" modifiers (or any other modifiers for that matter) like Solidity does. Recall that marking an block with tells Cairo to include...
9 min read
Cairo for Solidity Developers Cairo is a Rust-inspired language that compiles to bytecode, which runs on the Cairo Virtual Machine. The Cairo virtual machine is a zero-knowledge virtual machine...
10 min read
Type Casting Type casting in Cairo is the process of converting values from one data type to another. This becomes necessary when working with Cairo's strict type system, where explicit type matching...
11 min read
How Ethereum address are derived (EOAs, CREATE, and CREATE2) On Ethereum, smart contracts can be deployed in one of three ways: An Externally Owned Account (EOA) initiates the transaction where the...
8 min read
Tickmath getSqrtRatioAtTick This article explains how the function in Uniswap V3 TickMath library works. The function takes a tick index and returns the square root price at that exact tick as a...
4 min read
MD5 Hash In Circom In this tutorial, we will implement the MD5 hash in Circom both to compute the hash and to constrain in Circom that it was computed correctly. Although the MD5 hash function is not...
11 min read
Introduction to ZK Circuits with Circom Circom is a programming language for creating Rank 1 Constraint Systems (R1CS) and populating the witness vector of the R1CS. The R1CS format is of interest...