How to Build the Perfect Custom useEffect HookI'll get straight to the point of this tutorial. We want our useEffect to fetch async data and store it, with two important safety standards: If a dependency updates before the async call in useEffect is completed, a new async call will be made. If ...Jun 27, 2024 · 3 min readblog.benjaminazoulay.com
Get Uniswap V3 position amounts & unclaimed fees from NFT IDHello guys! This tutorial will explain how to get a snapshot of a liquidity position (amounts and unclaimed fee) from a Uniswap V3 NFT ID. That could come in handy for an airdrop, to reward liquidity providers. Let's get started! Dependencies we'll u...Sep 4, 2023 · 3 min readblog.benjaminazoulay.com
Web3.js Batch Requests: a complete exampleToo often, examples given in documentations are very crude and minimal. Such is the case with the Web3.js documentation, which gives this example for batch requests: var contract = new web3.eth.Contract(abi, address); var batch = new web3.BatchReque...Sep 14, 2022 · 3 min readblog.benjaminazoulay.com
How to run Truffle tests in Gitlab CIIf you are building a blockchain-based application (dApp) using continuous integration, you'll want to run tests for your smart contracts in the CI pipeline. In this tutorial, we will use the Truffle Suite for testing on the Ropsten test network (or ...Jan 8, 2022 · 4 min readblog.benjaminazoulay.com
Get the ENS name from an Ethereum address in your web3 dAppIn my previous tutorial, I explained how you can allow users to connect to your web3 dApp with their Ethereum address using Metamask. Now, let's take a little step further! You might have heard of Ethereum Name Service (ENS). That's all the .eth doma...Nov 15, 2021 · 3 min readblog.benjaminazoulay.com