Browse all Cairo Smart Contracts articles.
6 min read
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 . This is not a recommended method,...
10 min read
Web3.js Example. Latest version 4.x. Transfer, Mint and Query the Blockchain The newest version of web3.js, 4.x, has just been unveiled. In this guide, we’ll delve into integrating web3.js into HTML...
9 min read
Uniswap V2 Architecture: An Introduction to Automated Market Makers Uniswap is a DeFi app that enables traders to swap one token for another in a trustless manner. It was one of the early automated...
15 min read
Getting a smart contract audit: what you need to know A smart contract audit is a review by blockchain security experts to ensure that users will not lose funds due to a malfunction or security...
2 min read
OpenZeppelin Ownable: Use Ownable2Step Instead The modifier is probably one of the most common patterns in Solidity. In the following example, the function can only be called by the address...
3 min read
Solidity Staticcall EIP 214 Staticcall is like a regular Ethereum call except that it reverts if a state change happens. It cannot be used to transfer Ether. Both the EVM opcode, the Yul assembly...
5 min read
Understanding smart contract metadata When Solidity generates the bytecode for the smart contract to be deployed, it appends metadata about the compilation at the end of the bytecode. We will examine...
4 min read
Solana programs are upgradeable and do not have constructors !Hero image showing Anchor deploy In this tutorial we will peek behind the scenes of anchor to see how a Solana program gets deployed....
6 min read
Solidity Mutation Testing Mutation testing is a method to check the quality of the test suite by intentionally introducing bugs into the code and ensuring the tests catch the bug. The kind of bugs...
6 min read
Ethereum precompiled contracts Ethereum precompiles behave like smart contracts built into the Ethereum protocol. The nine precompiles live in addresses 0x01 to 0x09. The utility of precompiles falls...
11 min read
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 functions and how...
4 min read
How Chainlink Price Feeds Work Chainlink price oracles are smart contracts with public view functions that return the price of a particular asset denominated in USD. Off-chain nodes collect the...