Maksym·Oct 27, 2016Bitwise Operations and Bit Manipulation in Solidity, EthereumYes, Ethereum is the world’s computer, though probably the most expensive one. Since storage is the largest gas-consuming operation, occasionally it is reasonable to dig down to the level of bits. Same as Assembly coder would do while programming firmware of a microchip. …Ethereum6 min readEthereum6 min read
Solid Quant·Jul 4How to use Yul in your MEV projectAn A to Z guide of gas cost reduction and using assembly to handle errors, transfer tokens, swap tokens, and more — So, here’s a recurring story for me. I study a bit of Solidity, find a service that I’d like to look into. The code looks like this:Mev21 min readMev21 min read
Alain | Web3hackingLabs·Aug 28, 2022Learn CAIRO (starknet) syntax as a solidity devYou’re a beginner in Cairo language, but you already knows solidity? This article will give you all the basis of Cairo (compared) to solidity in less than 3 minutes. Let’s start! What is Cairo ? Cairo is a new language for programming Starknet smart contracts. Starknet a L2 scaling solution for Ethereum. …Starknet6 min readStarknet6 min read
Divya Preetha Aravindan·Aug 11, 2022Introducing EIP-2771 and BiconomyFree stuff is always a good thing! Even if the web2 products are selling our data without our consent, we are comfortable in using them, because they won’t charge us. Almost every interaction with the dApp involves a transaction which seems pretty complicated and intimidating for beginners because it prompts…Biconomy4 min readBiconomy4 min read
cyborgDennettinBlock Magnates·Oct 30, 2022Ethereum Multicall TutorialMulticall contracts have as function to execute multiple contract calls within one transaction. This is done via batching the inputs of the functions to another function, called Multicall. Reasons to do this are: Lower gas costs when bulk sending Lowering API calls to Infura/ RPC providers. Faster loading of web3…Ethereum3 min readEthereum3 min read
Rishabh Singh JamwalinIntelliconnect Engineering·Aug 22, 2022Fractional NFTs using EthereumFractionalization is the concept of splitting up ownership of an NFT so that many people can receive benefits from it in a proportion to the amount they own. It’s a traditional concept that already exists today. …Blockchain6 min readBlockchain6 min read
John Reynolds·Nov 28, 2022Initializing Upgradeable ContractsMy previous article highlighted a new initialization process used by EIP-2535: Diamonds as “A better way to initialize smart contracts.” This article will cover upgradeable smart contracts in more detail to defend my claim and provide insights. After reviewing upgradeability more generally, the following focus points will be discussed: OpenZeppelin…Smart Contracts9 min readSmart Contracts9 min read
BoominBlock Magnates·Nov 12, 2022Chainlink VRF 2 Oracle Smart ContractSmart Contracts Design Patterns Series! Introduction Oracles are used to connect decentralized systems to the off-chain world. In other words, oracles are bridges between the off-chain and the on-chain systems. Based on the data flow and request directions, oracles can be categorized in four ways: — Pull based inbound oracle: Blockchains…Solidity2 min readSolidity2 min read
Aw Kai Shin·Nov 9, 2022Signing and Verifying Ethereum MessagesOne exciting feature of Ethereum is the ability to prove consent directly between parties. In other words, you can easily validate that someone agreed to something without the need for a third party. …Ethereum5 min readEthereum5 min read
Sir FedosinCoinmonks·Aug 23, 2022How to make your NFTs reveal in SolidityAs NFT area is growing every day, more new mechanics and experiments are coming to the world of priceless pixels. One of the popular approaches during NFT launches is a Reveal toggle functionality. Reveal functionality stands for hiding NFT picture with some placeholder image initially. In this article we will…Cryptocurrency4 min readCryptocurrency4 min read
Aw Kai Shin·Oct 31, 2022Signing and Verifying Ethereum Hashed MessagesOne exciting feature of Ethereum is the ability to prove consent directly between parties. In other words, you can easily validate that someone agreed to something without the need for a third party. …Ethereum6 min readEthereum6 min read
BoominBlock Magnates·Oct 29, 2022Commit Reveal Smart ContractSmart Contracts Design Patterns Series! Introduction Smart contracts and transactions are transparent and verifiable on the Ethereum blockchain. However, in some cases, it could be useful to temporarily keep certain things hidden in the transactional data from the public. For example, in case of an election, displaying users’ choices could influence…Solidity2 min readSolidity2 min read
Parham AlimardanianinBitium Blog·Oct 10, 2022On-chain NFT Metadata Gas AnalysisThere are many options available to choose for storing NFTs’ metadata. But we can categorize all of those options into on-chain and off-chain categories. In this article, we first walk through these two options’ differences and then analyze the gas usage of minting one and multiple NFTs using each type. On-chain Data …Smart Contracts4 min readSmart Contracts4 min read
Harshana SerasingheinCoinmonks·May 7, 2022Blockchain Oracle Design Patterns — ExplainedA Smart Contract provides the security, transparency, efficiency and trust to initiate an agreement inside a blockchain. Since it is executed inside a blockchain, it cannot access any external data such as weather data, or currency rates. Blockchain Oracles are designed to mitigate this issue. An oracle is a program…Blockchain5 min readBlockchain5 min read
Officer's NotesinPessimistic Security·Oct 3, 2022Fuzzing Solidity Smart Contracts with Echidna: Die-Hard Level TipsGreetings dear readers! Today’s essay is the next in a series exploring creative solutions to challenges that an Auditor can encounter. In our previous article, we described Slither and how to use it; but today, we’d like to discuss fuzzing and the tool for it, Echidna. First and foremost, we…Echidna8 min readEchidna8 min read
EszymiinCoinmonks·Sep 29, 2022Proxy — Inherited StorageAs I mentioned in my previous post, the not propriety use of delegatecall function may lead to the gap of security. One of the problem is accidental to overwrite of variable, because delegatcall not use the name of variables, but their position in the storage. Let’s look at these…Solidity4 min readSolidity4 min read
Rob StupayinRemix Project·Sep 27, 2022Solidity Unit Tests via a GitHub ActionThis GitHub action can run Solidity Unit Tests as part of your continuous integration and deployment process. When coding a project, shifting the Solidity Unit Tests (SUT) to the GitHub side of things can optimize your workflow. Every time a push to the repo is made, the SUTs will run…Remix Ide2 min readRemix Ide2 min read
Jean CvllrinBetter Programming·Apr 19, 2022Member-onlySolidity Tutorial: All About Types ConversionImplicit vs explicit conversion in Solidity, and examples to understand conversion between types. — Note: Solidity is under active development. At the time of writing, this article is valid for Solidity v0.8.x. The next v0.9 release might introduce breaking changes in the type conversions. If you find any explanations not compatible with v0.9 (once v0.9 has been released), please feel free to highlight the…Solidity13 min readSolidity13 min read
Alain | Web3hackingLabs·Aug 8, 2022Best Smart contract hacking tool (Round 1)Here is the list of the most known Ethereum hacking tools used for auditing smart contracts: Slither: https://github.com/crytic/slither Mythril: https://mythril-classic.readthedocs.io/en/master/installation.html Mythix: https://mythx.io/ Remix solidity static analysis plugin: https://remix.ethereum.org Are they reliable? Can you REALLY hack a smart contract by pressing a button? We’ll see that. Note: If you’re on Windows…Ethereum4 min readEthereum4 min read
Daniel Yamagata·Aug 25, 2022Understand EVM Opcodes, Write Better Smart ContractsYour good developer habits are leading you to write inefficient smart contracts. For typical programming languages, the only costs associated with state changes and computation are time and the electricity used by the hardware. However, for EVM-compatible languages, such as Solidity and Vyper, these actions explicitly cost money. This cost…Ethereum Virtual Machine10 min readEthereum Virtual Machine10 min read