James Bachini

Development

  • Understanding The Fallback & Receive Functions In Solidity

    Understanding The Fallback & Receive Functions In Solidity

    Among Solidity’s essential features are the fallback and receive functions, which play crucial roles in handling Ether transactions and contract interactions. A thorough understanding of these functions is vital for developers aiming to create robust and secure smart contracts. The Fallback Function In Solidity, the fallback function is a unique, unnamed function that executes under…

  • Programmatic Stellar Transfers

    Programmatic Stellar Transfers

    In this tutorial we will be setting up scripts to send and monitor transfers on the Stellar network. James On YouTube Watch On YouTube: https://youtu.be/gVC5ijif2-0 | Subscribe I’ll be using Node.js and the Stellar-SDK library. All the code is open source and you can fork the repository here: https://github.com/jamesbachini/Stellar-Cross-Border-Test There are two scripts, send.js and receive.js, created to…

  • Optimizing Smart Contracts For Layer 2 Chains

    Optimizing Smart Contracts For Layer 2 Chains

    Layer 2 solutions have emerged as a crucial component in addressing scalability issues. Optimising smart contracts for these Layer 2 chains is essential to harness their full potential. This article explores key considerations for developers working with Layer 2 solutions, focusing on cross-chain interoperability, gas fees, and frontend considerations. Cross-Chain Interoperability When optimising smart contracts…

  • How Often Should I Rebalance My Portfolio

    How Often Should I Rebalance My Portfolio

    In this tutorial I modelled the optimal rebalancing frequency for a digital asset portfolio holding: This is a 60/40 crypto portfolio which I’ve discussed before. You can run the code with different assets (anything with a historical price feed). Starting with a $10,000 initial investment, the code allocates the funds accordingly and tracks performance over…

  • Creating Custom Solidity Libraries For Reusable Code

    Creating Custom Solidity Libraries For Reusable Code

    Solidity libraries enable blockchain developers to create modular reusable code. This shared usage avoids duplicating code, saves gas during deployment and promotes consistency within a code base. Let’s create a basic library that demonstrates how this works: This code defines a simple smart contract that utilises a library for basic arithmetic operations. The MyMath library…

  • Building Smart Contract Event Filtering Systems for DApps

    Building Smart Contract Event Filtering Systems for DApps

    How events work in web3 Events in Web3 act as logs of significant occurrences within a smart contract. When a specific function is executed, the smart contract can “emit” an event, signalling to external systems that something has happened. These emitted events are stored on the blockchain, but they do not modify the contract’s state.…

  • Automating Web3 Interactions In Rust | Minting Ethereum NFT’s With Ethers-rs

    Automating Web3 Interactions In Rust | Minting Ethereum NFT’s With Ethers-rs

    In this tutorial we are going to be deploying a simple NFT contract to Ethereum and then minting new NFT’s using a bot built with Rust and ethers-rs Let’s start by heading to Remix and deploying this contract to Ethereum’s Sepolia testnet. It has already been deployed here if you want to skip this step:…

  • Building A Cross Chain Token Bridge With LayerZero v2

    Building A Cross Chain Token Bridge With LayerZero v2

    This tutorial will guide you through the process of building a token bridge using LayerZero v2, specifically employing the OFTAdapter on mainnet and the OFT.sol contract on all other chains. We’ll cover the setup and deployment workflow, ensuring you have a comprehensive understanding of the process. Before we delve into the deployment process, it’s crucial…

  • Practical Applications Of Merkle Trees

    Practical Applications Of Merkle Trees

    Merkle trees are a useful tool for blockchain developers offering a myriad of benefits, chief among them being the efficient verification of large data sets and proof of inclusion. By leveraging Merkle trees developers can significantly optimise gas costs and enhance the overall performance of their decentralised applications. In this article we will look at…

  • How To Connect An Arduino To A Soroban Smart Contract

    How To Connect An Arduino To A Soroban Smart Contract

    This tutorial will guide you through the process of connecting an Arduino to a Soroban smart contract on the Stellar blockchain. We’ll create a system where blockchain events can trigger physical actions through an Arduino. James On YouTube Watch On YouTube: https://youtu.be/C4a9O7AFAVc | Subscribe All the code for this project is open source at: https://github.com/jamesbachini/Arduino-Soroban-Controller…

  • Implementing RBAC Patterns in Solidity

    Implementing RBAC Patterns in Solidity

    We can implement role based access control or RBAC patterns in Solidity using OpenZeppelin’s AccessControl.sol library. This allows developers to manage different roles and assign permissions dynamically. Here’s a step by step guide based on the information provided. Understanding Roles in Access Control The essence of RBAC in Solidity involves defining roles, where each role…

  • Marketing Psychology in Web3

    Marketing Psychology in Web3

    This article delves into the key aspects of marketing psychology that are unique or particularly relevant to the Web3 ecosystem, exploring how trust, community engagement, scarcity, fear of missing out, attention economy, and behavioural economics intersect with this innovative space. Trust and Credibility The blockchain sector has been plagued by numerous fraud & scams, making…

  • Creating MultiSig Wallets with Solidity

    Creating MultiSig Wallets with Solidity

    MultiSig wallets have become increasingly popular due to their enhanced security features. In this article, we will delve into the key components of a MultiSig wallet, how to write a MultiSig wallet contract using Solidity, deploying the wallet, and handling deposits and withdrawals. Note that the code provided here is for educational purposes only. If…

  • Simple Example Of Rust Struct & Importing Modules

    Simple Example Of Rust Struct & Importing Modules

    One powerful feature in Rust is how it organizes code into modules and allows the reuse of code with structs and methods. In this tutorial, we’ll walk through a simple example to illustrate how to define and use a struct in Rust and how to import modules for organization. Step 1: Define the Module and…

  • Prediction Markets Solidity

    Prediction Markets Solidity

    Prediction markets are decentralized platforms where participants can bet on the outcome of future events. For example, people could bet on the outcome of a presidential election or a sports game. In this tutorial, we will walk through a smart contract built on Ethereum, which allows users to create and participate in prediction markets. The…

  • A Simple Browser Resource Monitor

    A Simple Browser Resource Monitor

    This single index.html file can be uploaded to any web server, run locally, or accessed here: https://jamesbachini.com/misc/browser-resources.html It enables web developers to monitor browser resources over time and test different devices processing abilities. The dashboard first collects and presents fundamental system information, providing context about the environment in which the application operates. This data includes:…

  • Stellar Soroban Boilerplate

    Stellar Soroban Boilerplate

    In this tutorial I’m going to go through the code for a boilerplate which connects a Soroban smart contract to a React dApp. Note that for a more full featured demo app you can check out the excellent Scaffold Soroban at: https://developers.stellar.org/docs/learn/interactive/dapps/scaffold-soroban There is also this from the guys at Palta Labs:https://create-soroban-dapp.paltalabs.io/ James On YouTube…

  • Decentralized Lending Pools | Blend Capital

    Decentralized Lending Pools | Blend Capital

    Overcollateralized lending has emerged as a cornerstone in the decentralised finance ecosystem, providing a secure and efficient way for users to borrow and lend digital assets. Blend Capital leverages this mechanism on Stellar’s Soroban smart contract platform, introducing a robust protocol for overcollateralized lending and borrowing. This article delves into how overcollateralized lending works, explores…

  • Encrypting Private Keys in .env

    Encrypting Private Keys in .env

    It has become very normalised to store Ethereum private keys in plain text within .env files. While this is convenient, it’s a disaster waiting to happen when working in production with wallets that contain real funds. Today, I’ll show you a better way to manage your hot wallet keys using AES encryption. Full code for…

  • Balancer v3 Hooks

    Balancer v3 Hooks

    For the Balancer v3 Hookathon (yep it’s a hackathon to create DeX hooks) I had the idea to try and create a fair launch memecoin platform. It’s the kind of thing that could bring utility to the ecosystem as we’ve seen recently with the wave of memecoin trading on Solana. The target is to create…

  • Creating WASM Files Using Rust and Running Them in the Browser

    Creating WASM Files Using Rust and Running Them in the Browser

    In this tutorial we will be writing some code in Rust, compiling to web assembly (WASM) and then running that code in a browser. This enables high performance applications to be run within a web dev setting. In this tutorial I’ll be using windows subsystem for Linux. Let’s first install Rust and wasm-pack (more instructions…

  • Understanding ABI Encoding: A Guide to abi.encodeCall and encodeWithSelector

    Understanding ABI Encoding: A Guide to abi.encodeCall and encodeWithSelector

    What Is ABI Encoding Application Binary Interface (ABI) encoding is a crucial concept in Ethereum smart contract development. It serves as a standardised method for encoding function calls and data, enabling seamless communication between different components of the Ethereum ecosystem. ABI encoding ensures that data is consistently formatted and interpreted across various platforms and programming…

  • Enums In Solidity

    Enums In Solidity

    Enums are one of the most useful and underused data types in Solidity. I think because they aren’t widely used in Javascript and web dev, they often get overlooked in contract development. In this article I’ll make my case for why enums deserve a place in your tool kit and smart contracts. Enums in Solidity…

  • WebAuthn PassKey Smart Wallets

    WebAuthn PassKey Smart Wallets

    In this article we will take a glimpse into the future of account abstraction where web3 can offer walletless, passwordless authentication to web applications. I’ll be connecting a Stellar Soroban smart contract to a web3 frontend and verifying signatures from biometrics on your phone. Welcome to the future. The full source code used in this…

  • React Hooks Tutorial | The 7 Most Important React Hooks

    React Hooks Tutorial | The 7 Most Important React Hooks

    React Hooks provide a way to manage state, side effects, references and more in functional components. In this tutorial, we’ll look at the seven most commonly used React hooks When You Would Use These React Hooks useStateImagine you have a piece of data in your component that might change, like a number for a counter…

  • 3 Ways AI Will Change Software Development by 2030

    3 Ways AI Will Change Software Development by 2030

    As a developer who wrote his first computer program on a Commodore64, I’ve seen my fair share of technological shifts. But nothing quite compares to the seismic changes I anticipate large language models will bring to software development in the coming years. Let me take you on a journey through my vision of the future,…

  • Building Rust Smart Contracts On Stellar Soroban

    Building Rust Smart Contracts On Stellar Soroban

    Soroban is the smart contract platform that allows developers to write and deploy smart contracts on the Stellar network. This tutorial will guide you through the process of building a simple smart contract using Rust and deploying it to Soroban. I recently took on the role of Developer in Residence with Stellar and this is…

  • Pump.fun Clone In Solidity

    Pump.fun Clone In Solidity

    Pump.fun is a token factory that lets users create and trade memecoins on Solana with dynamic pricing along a bonding curve. In this article I’ll show how I went about converting this concept to Solidity and deploying it on Ethereum. Full code for this is open source at: https://github.com/jamesbachini/Pump.sol Token Factory Contract At the core…

  • Creating Your Own Oracle Solidity & NodeJS

    Creating Your Own Oracle Solidity & NodeJS

    In this tutorial I’m going to go through the steps to setting up your own oracle service to bring data on-chain. We are going to be deploying a simple smart contract, then setting up a NodeJS client to fetch the price of Bitcoin, then uploading this to the contract. Full code for this is open…

  • Format JSON Tool

    Format JSON Tool

    A simple tool to lint and format JSON because I was fed up of using the ones covered in ads. Format JSON The Javascript code that makes this work is quite simple: It can be used to format outputs prior to displaying the results of API queries or any other JSON found wild around the…

  • What Are Blockchains Good For?

    What Are Blockchains Good For?

    This article explores the strengths, limitations, and potential applications for blockchain technology. I will delve into six primary areas where blockchain technology shows promise: Transparency Blockchains are inherently transparent, making it a powerful tool for enhancing trust, accountability, and security in various applications. This transparency is evident in how transactions are recorded on a publicly…

  • How To Calculate Gas Costs For Solidity Contracts

    How To Calculate Gas Costs For Solidity Contracts

    Deploying Solidity smart contracts can be expensive because the code needs to be stored on the shared storage of a decentralized peer to peer blockchain network. The dollar cost of deploying Solidity smart contracts is dependent on a number of variables: I’ve previously provided code to analyze the bytecode size of contracts, you can also…

  • NFT Token Vault Solidity

    NFT Token Vault Solidity

    This was inspired by the CryptoKitties WG0 token vault which accepts gen zero CryptoKitty deposits and mints 1 ERC20 token for each. Users can then buy tokens on exchange and claim NFT’s from the vault. The code is open source and available at: https://github.com/jamesbachini/NFTvault How The NFTvault Contract Works When you deposit your NFTs into…

  • Creating an UpOnly ERC20 Token

    Creating an UpOnly ERC20 Token

    In this tutorial we are going to create a ponzi game in the form of an ERC20 token that has an internal marketplace function. The idea is to increase the price over time so that early buyers get to dump on late buyers at a higher price. The last buyer will have no liquidity to…

  • Solidity Encrypted Messaging dApp

    Solidity Encrypted Messaging dApp

    This morning Pavel Durov, founder of Telegram, was arrested at a French airport for refusing to provide backdoor access to the messaging application. This tutorial will demonstrate how to use Elliptic Curve Diffie Hellman (ECDH) cryptography to establish a shared secret and encrypted messaging across a insecure communication channel, in this case a public blockchain.…

  • Script To Analyze Bytecode Size Of Smart Contracts

    Script To Analyze Bytecode Size Of Smart Contracts

    I was having trouble with the hardhat bytecode plugin so I wrote a little nodejs script which will print off the size of my compiled Solidity contracts. You’ll need nodejs installed and can then run it like this. You should get an ouput like this: Here’s the code to save to analyze_bytecode.js file in the…

  • Solidity Virtual Pet

    Solidity Virtual Pet

    Let’s create a virtual pet in Solidity and deploy it to the blockchain. Full frontend and contract code for this tutorial can be found here: https://github.com/jamesbachini/Solidity-Virtual-Pet Demo here: https://jamesbachini.com/misc/SolidityPet/index.html Smart Contract Our pet is going to have two attributes for hunger and happiness. Hunger should increase over time and happiness should have a mechanism where…

  • How To Scrape Twitter/X Without API Access

    How To Scrape Twitter/X Without API Access

    Scraping Twitter/X without direct API access can be accomplished by leveraging third-party services like RapidAPI, which provides a streamlined way to interact with Twitter data. In this tutorial, we’ll walk through the process of using RapidAPI to scrape tweets from a specified user. I’m going to provide code snippets in Python and NodeJS for this…

  • Calculating Bitcoin Fair Value With Rust

    Calculating Bitcoin Fair Value With Rust

    In this tutorial, we will create a Rust script that: Instructions Rust Code The code is open source and available on Github: https://github.com/jamesbachini/Bitcoin-Fair-Value We’ll start with the async fetch_klines function to fetch Bitcoin price data from the Binance API. The Binance API provides various endpoints for accessing market data, and we’ll use the /api/v3/klines endpoint…

  • Can ChatGPT & Keras Predict The Price Of Bitcoin

    Can ChatGPT & Keras Predict The Price Of Bitcoin

    I get asked a lot if ChatGPT can be used for trading and I normally say “no, it’s a language model which isn’t designed to find market patterns in numerical price data”. ChatGPT works more like predictive text in a search engine or on your phone but what it is good at is writing code…

  • Calculating CAGR in Python & JavaScript

    Calculating CAGR in Python & JavaScript

    The Compound Annual Growth Rate (CAGR) is a useful measure for assessing the mean annual growth rate of an investment or business metric over a specified period longer than one year. Unlike other growth metrics, CAGR smooths out the volatility, providing a clearer picture of how investments grow over time. In this guide, I’ll show…

  • Web3 Social Network

    Web3 Social Network

    Today I’m going to explore what a web3 social network could look like and try to figure out what we want from social networks and where they might be going in the future. Let’s first look at some existing social networks and what makes them popular The thing that all these products have is targeted…

  • How To Check Token Balances Using Python

    How To Check Token Balances Using Python

    To check a wallet token balance on the Ethereum blockchain using Python you will need the following: Once we have our API key ready and Python installed we can install web3.py using the following command Now let’s create a file called balance.py and add the following code. Note the code is also available in the…

  • DeFi Analysis With Rust

    DeFi Analysis With Rust

    In this tutorial I’m going to provide some code and show you how to monitor the number of depositors to Eigenlayer over the last 24 hours. We will be using Rust with the Tokio and Ethers libraries along with the Infura API which you can get a free key from here. The first thing we…

  • Web3 vs Cloud Computing

    Web3 vs Cloud Computing

    Have you ever wondered if decentralised data storage can truly rival the convenience and efficiency of traditional cloud services like AWS? Web3 devs today face several significant challenges. On-chain data is currently slow, expensive, and often comes with a poor user experience. However, with the rapid advancements in technology, the future could look very different.…

  • How To Lookup An ENS Name In Python

    How To Lookup An ENS Name In Python

    To check a wallet token balance on the Ethereum blockchain using Python you will need the following: Once we have our API key ready and Python installed we can install web3.py using the following command Now let’s create a file called enslookup.py and add the following code. Enter your Infura API key on line 5.…

  • Building A Portfolio Tracker In Python

    Building A Portfolio Tracker In Python

    In this tutorial we will be building a digital asset portfolio tracking tool using python and the Coinbase API. You’ll need to install python and the following library to make requests. The code for this is open source on Github at: https://github.com/jamesbachini/Python-Portfolio-Tracker Put this in a file called portfolio.py or fork the repo above. Then…

  • Building a Career in Web3

    Building a Career in Web3

    Web3 represents the future of the internet, where developers can deploy permissionless code on a decentralized network. Building a career in this space requires a combination of technical skills, practical experience, and a strategic approach. This article outlines the key steps for anyone looking to forge a career in Web3, from learning Solidity to launching…

  • Creating A Solidity Escrow Smart Contract

    Creating A Solidity Escrow Smart Contract

    In this tutorial, we will create an Escrow contract using Solidity and deploy it to an Ethereum testnet. An Escrow contract is a financial agreement where a third party (the arbitrator) holds and regulates payment of the funds required for two parties involved in a given transaction. It helps make transactions more secure as it…

  • How To Create ERC404 Tokens Solidity Tutorial

    How To Create ERC404 Tokens Solidity Tutorial

    An ERC404 token is a digital asset that combines the characteristics of ERC20 fungible tokens and ERC721 non-fungible tokens (aka NFT’s) to enable fractional ownership of an NFT. In essence, ERC404 tokens represent divisible parts of an NFT, allowing multiple individuals to own shares of a single NFT. This approach is designed to enhance the…

  • Adversarial Simulation Testing For Smart Contract Developers

    Adversarial Simulation Testing For Smart Contract Developers

    I recently read Gene Kranz’s first hand account of the Gemini and Apollo Nasa missions. He talks about the rigorous simulation testing that flight directors had to partake in prior to a mission. Simulation testing plays a crucial role in ensuring the preparedness of astronauts and flight controllers for spaceflight. This process is managed by…

  • Javascript Smart Contracts

    Javascript Smart Contracts

    As an experiment I converted this Vyper token contract to a Javascript/Typescript syntax to see if we could make it easier for web developers to get up to speed with smart contract development. Solidity is the most popular smart contract language and it is already based losely on Javascript but there are plenty of syntax…

  • Vyper Tutorial | Learn Vyper In 24 Hours

    Vyper Tutorial | Learn Vyper In 24 Hours

    Vyper is a pythonesque smart contract language that can be compiled and deployed on Ethereum and other EVM blockchains. 90%+ of blockchain devs use Solidity but there are some big projects such as Curve using Vyper and it’s growing in popularity and tooling compatibility. The best way to get started with Vyper is to head…

  • Using Vyper With Remix

    Using Vyper With Remix

    You can now use Vyper (a smart contract programming language similar to python) with remix to build and deploy contracts on Ethereum and other EVM blockchains. The first step is installing the Vyper plugin at https://remix.ethereum.org/ where you’ll find a list of plugins using the icon in the bottom left. You’ll then get an extra…

  • Sell Me This Pen.sol

    Sell Me This Pen.sol

    What happens when you ask a blockchain developer to sell you a pen? Etch your words permanently on the Ethereum blockchain where they will outlive you & create an everlasting record of your thoughts, contemplations & predictions. This is your chance to leave an eternal mark and express your presence in the digital age while…

  • How To Deploy A Website Or dApp To IPFS | Fleek Tutorial

    How To Deploy A Website Or dApp To IPFS | Fleek Tutorial

    Gm, in this tutorial we are going to be deploying a website to IPFS to create a decentralized frontend. To do this I’ll be using Fleek which has a free tier and which suits our needs. James On YouTube Watch On YouTube: https://youtu.be/https://youtu.be/DmpXbmjnpec |Subscribe We will start by getting our site on Github. We can…

  • TradingView Pine Script Examples | Master Pine Script With 6 Real World Examples

    TradingView Pine Script Examples | Master Pine Script With 6 Real World Examples

    TradingView’s Pine Script coding language has emerged as the leading tool for traders looking to craft custom indicators and strategies with accuracy and ease. In this Pine Script tutorial I’ll provide a practical gateway into the intricacies of this coding language, tailored with useful examples to get you started. Whether you’re a novice coder or…

  • Solidity Proxy Contract Tutorial With Example Code

    Solidity Proxy Contract Tutorial With Example Code

    This Solidity proxy contract tutorial delves into the concept of upgradeable proxy contracts in Solidity, specifically utilizing OpenZeppelin’s proxy contract template. We’ll start with an understanding of how these contracts work, the compromise of immutable decentralization vs upgradeability and then dive into practical code examples. Proxy Contract Video Tutorial In this video I provide an…

  • LLM vs AGI | Limiting Reality of Language Models in AGI

    LLM vs AGI | Limiting Reality of Language Models in AGI

    Artificial Intelligence has made remarkable progress in recent years, with large language models like ChatGPT demonstrating capabilities that seemed impossible just a decade ago. However, these achievements, impressive as they are, still fall far short of Artificial General Intelligence – the holy grail of AI development that would match or exceed human-level cognition across many…

  • Web3 Session Keys

    Web3 Session Keys

    We are going on a journey to seamlessly integrate session keys into a web3 dApp, striking a balance between autonomy and ease of use that your users are yearning for. The goal is to enable users to authenticate with a digital wallet and store a session key on their device. This session key will provide…

  • Ethers-rs Tutorial | The Rust Web3 Library

    Ethers-rs Tutorial | The Rust Web3 Library

    In this tutorial we will be setting up a Rust script to connect to a smart contract on a blockchain network to display on-chain data using the ethers-rs library. James On YouTube Watch On YouTube: https://youtu.be/FA7WFGtyri8 |Subscribe Let’s start by setting up a new Rust project (you’ll need rust installed on your device and I’ll…

  • ChatGPT Plus vs Free | Is The Paid Version Of ChatGPT Worth It?

    ChatGPT Plus vs Free | Is The Paid Version Of ChatGPT Worth It?

    ChatGPT Plus vs Free [Video] James On YouTube Watch On YouTube: https://youtu.be/U3xXd3vV4iU |Subscribe Why Upgrade To ChatGPT Plus? ChatGPT Plus is the paid version of ChatGPT, it currently costs $20/month + VAT and there are 3 main reasons why the average user would want to upgrade to the premium version: On top of this paid…

  • Asymmetry Finance | DeFi Analysis Report

    Asymmetry Finance | DeFi Analysis Report

    Asymmetry Finance has emerged as a significant player in the liquid staking wars, offering an aggregated liquid staking token. This article explores the core functionalities of Asymmetry Finance and its core product safETH. This is a write up of my internal research notes, this is not a sponsored post and I do not hold any exposure…

  • WAGMI Tutorial | The Web3 React Framework

    WAGMI Tutorial | The Web3 React Framework

    WAGMI is a set of Typescript React hooks for web3 which enables developers to connect to smart contracts on blockchain networks. In this tutorial we will look at how to install and setup a boilerplate in WAGMI and then build a simple read query. WAGMI in 3 Mins [Video] James On YouTube Watch On YouTube:…

  • How I Track Developer Activity For Crypto Projects

    How I Track Developer Activity For Crypto Projects

    In this article I’m going to share how to track developer activity for crypto projects for fundamental analysis. James On YouTube Watch On YouTube: https://youtu.be/DTI7ELSA6CA |Subscribe Understanding the Crypto Development Ecosystem Cryptocurrencies like Bitcoin and Ethereum as well as the majority of blockchain projects are fundamentally software. They are applications that run on a decentralized…

  • How I Built A Smart Money List On Twitter

    How I Built A Smart Money List On Twitter

    X formerly known as Twitter includes two features which allows us to create a list of accounts from people that frontrun narratives and successful trades. tl;dr if you just want to see the final list it is here: https://twitter.com/i/lists/1712044491618545903 James On YouTube Watch On YouTube: https://youtu.be/4qYraarbsYs |Subscribe Step 1. Collecting Project Data My main focus…

  • OpenZeppelin 5 Solidity Common Errors

    OpenZeppelin 5 Solidity Common Errors

    OpenZeppelin have just released version 5 of their Solidity smart contract libraries and there are some breaking changes that are going to cause errors. The two main ones are the Ownable.sol import which allows devs to create onlyOwner functions and the token hooks on ERC20, ERC721 & ERC1155 contracts. Ownable Constructor If you are getting…

  • Hardhat Solidity Tutorial

    Hardhat Solidity Tutorial

    Hardhat is an extensive framework for developing, testing and deploying solidity smart contracts. In this Hardhat Solidity tutorial you will learn how to set it up, how to create hardhat unit test tricks, working with hardhat scripts and finally some Hardhat tips and tricks for Solidity developers. Hardhat Easy Setup Hardhat is built on NodeJS…

  • NEAR BOS | Blockchain Operating System

    NEAR BOS | Blockchain Operating System

    Near BOS is a complete framework designed for creating, testing, deploying and distributing decentralized application frontends. Developers can create Javascript based dApps with the frontend code stored and distributed from a blockchain. It is blockchain agnostic so you can store data on Near and EVM chains. BOS is a collection of components, blockchains & gateways.…

  • Celestia | Modular AppChains

    Celestia | Modular AppChains

    Celestia is one of the most widely used scaling solutions for projects that need high throughput, cheap transactions on a dedicated decentralized public blockchain. The aim is for “developers to deploy their own blockchain as easy as deploying a new smart contract” This is a write up of my internal research notes, this is not…

  • Smol dApp | MultiSafe MultiChain MultiSig Wallets

    Smol dApp | MultiSafe MultiChain MultiSig Wallets

    Smol dApp is like a swiss army knife of useful tools for DeFi. Their main offerings are: The product we are going to look at todays is their flagship MultiSafe wallets. This is a GnosisSafeProxy contract which requires a set number of wallets to sign off on a transaction before it goes through. For example…

  • Hardhat vs Foundry

    Hardhat vs Foundry

    I started developing solidity with Truffle, then moved to Hardhat, then moved to Foundry, then moved back to Hardhat before eventually settling using both on a regular basis. In this article I’ll talk about the benefits and disadvantages of Hardhat and Foundry so you can make an informed decision about which framework is better for…

  • Calculating The Intrinsic Value Of Bitcoin & Ethereum

    Calculating The Intrinsic Value Of Bitcoin & Ethereum

    Calculating the intrinsic value of Bitcoin, Ethereum and other digital assets is challenging due to its intangible nature. In this analysis I’m going to discuss common methods of calculating intrinsic value and then create a model using a combination of the methods. tl;dr based on the models described below: Methods Of Calculating Intrinsic Value Store…

  • The Essential Checklist For Deploying A New Token

    The Essential Checklist For Deploying A New Token

    In this article we are going to look at all the things that need doing when launching a new token to create a token deployment checklist for developers and founders. At the end there is a big list of all the token listing sites that you can submit your new token to. Unit Tests &…

  • Solidity Tutorial | Gas Paying NFT

    Solidity Tutorial | Gas Paying NFT

    The challenge is to create a NFT contract that charges 1 ETH to mint but then stores the entire amount as collateral in a liquid staking token. As staking rewards come in they get distributed to the holders of the NFTs. At any time a user can burn the NFT to reclaim the 1 ETH.…

  • Web3 PWA Boilerplate | How To Create Next Generation dApps

    Web3 PWA Boilerplate | How To Create Next Generation dApps

    One of Web3’s biggest issues is getting around the centralization of app stores and their stringent terms on the commission requirements for digital asset payments and transfers. Progressive Web Apps (PWAs) in my opinion are the best solution as it allows you to install dApps directly on to a mobile device without using the app…

  • Chainlink CCIP | Cross-Chain Interoperability Protocol

    Chainlink CCIP | Cross-Chain Interoperability Protocol

    From all the announcements at ETHcc, the release of Chainlink CCIP as a direct competitor to LayerZero for cross-chain communications and bridging technology, is perhaps the most interesting. The inherent security risks associated with bridging technology means that Chainlink are in a good position to leverage their brand and security record to gain traction in…

  • Using Ethereum To Offset Bitcoin’s Carbon Footprint

    Using Ethereum To Offset Bitcoin’s Carbon Footprint

    Never have I sounded more like an Ethereum maxi, but there is a point beyond the provocative title. In this post I’m going to explore the potential for investors to use carbon credit tokens on Ethereum to offset the electrical consumption of BTC mining on their Bitcoin holdings. This novel idea provides the opportunity to…

  • Friend.Tech Trading Bot

    Friend.Tech Trading Bot

    I made a few hundred dollars with this trading bot when Friend.Tech launched. In this tutorial I’m going to show you how to take advantage of system trading web3 opportunities. James On YouTube Watch On YouTube: https://youtu.be/SLh8SN5DRc4 |Subscribe tl;dr Takeaways Trading On Friend.Tech Friend.Tech is a web3 social trading game. You can buy shares in…

  • A Close Look at PYUSD | Implications Of The PayPal Stablecoin

    A Close Look at PYUSD | Implications Of The PayPal Stablecoin

    In August 2023 Paypal unveiled their new stablecoin, an ERC20 token built on Ethereum. The code is open source, the contract is verified on Etherscan, it’s a real token which is going to be available to Paypal’s 435m users. What Is pyUSD & How Does It Work The Paypal stablecoin was developed in partnership with…

  • How To Shuffle A Deck Of Cards In Solidity

    How To Shuffle A Deck Of Cards In Solidity

    In this post I explore how to simulate the shuffling of a deck of cards, addressing the challenges of randomness and predictability in a solidity smart contract environment where every input and output is part of the public record. Whether you’re looking to create an on-chain poker game, a collectible card game, or you’re simply…

  • The Secrets Web3 Marketers Use To Launch New Crypto Projects

    The Secrets Web3 Marketers Use To Launch New Crypto Projects

    My previous background in digital marketing and now having worked in the blockchain sector for 6 years provides unique vantage point on the differences between conventional and web3 marketing. Successful crypto projects create communities of advocates who act as micro-influencers championing the cause. In this article I’ll discuss why “build it and they will come”…

  • Card Payments For Crypto With Wert

    Card Payments For Crypto With Wert

    One of the challenges cryptocurrency projects face is the seamless integration of traditional payment systems, such as credit/debit card payments, into their crypto based ecosystems. The issue derives from the potential for fraud because card payments can be reversed long after the transaction has taken place, while crypto transactions are immutable. This is a write…

  • Automate Solidity With MEV

    Automate Solidity With MEV

    There are no cron jobs in Solidity or native to the Ethereum blockchain. To automate Solidity code we can either use an external service/oracle or we can incentivise MEV searchers to complete tasks efficiently on our behalf. This type of Solidity automation is very common and used widely across liquidation systems which require reliable, fast,…

  • Solana SoLang Tutorial | How To Deploy Solidity On Solana

    Solana SoLang Tutorial | How To Deploy Solidity On Solana

    In this SoLang tutorial I’ll show you how to deploy Solidity code on Solana. We will start by setting up a dev environment before looking at some of the nuances in writing SoLang contracts. I’ll end on a few security considerations and a comparison to developing on Solana with SoLang vs Rust. Setting Up A…

  • Infura vs Alchemy

    Infura vs Alchemy

    Most users connect to blockchains using RPC node services. This is sometimes taken care of in the background, for example Metamask uses Infura nodes to send and receive transactions. Web3 developers use custom RPC nodes for their deployment scripts and transactions. Operating the nodes requires a reliable infrastructure service, and two of the most popular…

  • Building LayerZero OFT Tokens In Solidity

    Building LayerZero OFT Tokens In Solidity

    LayerZero OFT tokens are a new standard for cross-chain assets. OFT’s (Omnichain Fungible Tokens) are not actually tokens themselves, but rather a set of instructions that tell LayerZero how to transfer tokens between different blockchains. In this tutorial we will be building a LayerZero OFT ERC20 token using Solidity and Remix. How LayerZero OFT Tokens…

  • XRP Legal Case | What It Means For Developers

    XRP Legal Case | What It Means For Developers

    In this article I’m going to be breaking down the document filed by judge Torres yesterday and consider what it means to developers working in the blockchain and web3 space. Highlights From The Ruling The full document is available here:https://www.nysd.uscourts.gov/sites/default/files/2023-07/SEC%20vs%20Ripple%207-13-23.pdf I’ve picked out some highlights Programmatic SalesHaving considered the economic reality of the Programmatic Sales,…

  • Uniswap v4 Hooks

    Uniswap v4 Hooks

    Hooks in Uniswap v4 are external contracts that execute specific actions at certain points during the execution of a liquidity pool. These hooks provide flexibility and customization options for developers to create additional features for liquidity pools. Uniswap v4 hooks can be used to: A 3rd party developer can write a solidity hook contract with…

  • 3 Ways To Raise Web3 Funding

    3 Ways To Raise Web3 Funding

    In this article I’ll explore 3 ways in which you can raise funds for your project with web3 products. Membership NFT A NFT is a non-fungible token, they are often represented as a unique image which can contain additional rights such as: To execute a NFT drop, the following steps can be taken: If any…

  • Solidity Error Codes | Not Always What They Seem

    Solidity Error Codes | Not Always What They Seem

    I get a lot of comments from Solidity tutorial videos and in Github issues asking how to resolve common solidity error codes. In this article I’ll go through some of the most frequent solidity issues, what they mean and how to resolve them. UNPREDICTABLE_GAS_LIMIT This is the most common and confusing error in Solidity The…

  • Lybra Finance | DeFi Analysis Report

    Lybra Finance | DeFi Analysis Report

    Lybra Finance allows stETH stakers to mint the eUSD stablecoin which has a 7.2% APY. This is a write up of my internal research notes, this is not a sponsored post however I have purchased an allocation of LBR Lybra Finance’s governance token in my personal portfolio. Do your own research, not investment advice. Update…

  • Assessing Smart Contract Security Auditors

    Assessing Smart Contract Security Auditors

    A smart contract audit can cost anything from $5,000-$250,000 USD. Within this range there is a wide range of services, some offer better value for money than others. In this article I will go through the options for founders looking to hire an auditor and some of the checks you can do to ensure you…

  • Gnosis Safe | The Most Secure Multisig Wallet For Your Crypto

    Gnosis Safe | The Most Secure Multisig Wallet For Your Crypto

    Gnosis Safe multisig wallets are used by institutions and individuals to hold some of the largest quantities of funds on the Ethereum network. The free to use wallet includes multisignature functionality for enhanced security and control over digital assets. It is developed by Gnosis, a blockchain technology company based out of Switzerland and Germany, known…

  • Ethereum Improvement Proposal |  How To Submit An EIP

    Ethereum Improvement Proposal | How To Submit An EIP

    Submitting an Ethereum Improvement Proposal (EIP) is a straightforward process that allows you to contribute your ideas and suggestions to the Ethereum community. Here’s a step-by-step guide on how to submit an EIP: What Is An Ethereum Improvement Proposal An Ethereum Improvement Proposal (EIP) is a formal document that provides technical specifications and rationales for…

  • Ultimate Guide To Hire A Solidity/Web3 Developer

    Ultimate Guide To Hire A Solidity/Web3 Developer

    In this comprehensive guide, I will explore how to hire a Solidity/Web3 developer. Contractor, Partner or Employee The first thing you need to decide is whether you want to hire someone on a permanent basis or not. With Solidity development the contracts don’t tend to get updated once they are deployed so the bulk of…

  • How Wrapped Tokens Like wETH & wBTC Work

    How Wrapped Tokens Like wETH & wBTC Work

    In this article we will look at how different wrapped tokens work and where the underlying collateral is stored. What Are Wrapped Tokens? Wrapped tokens are generally ERC20 tokens that represents another underlying asset, typically a cryptocurrency or real world asset. The purpose of wrapping a token is to enable its use within the DeFi…

  • 3 Tips For Gas Efficient Solidity Smart Contracts

    3 Tips For Gas Efficient Solidity Smart Contracts

    Here are 3 tips which could be considered the low hanging fruit of gas efficient solidity smart contracts. James On YouTube Watch On YouTube: https://youtu.be/xfNHzqkMWEQ |Subscribe Use Correct Modifiers & Declarations This is the simplest way to get some small wins with gas optimisation. Go through your contract and define anything that shouldn’t change as…

  • Snapshot | Gasless Voting for Decentralized Communities

    Snapshot | Gasless Voting for Decentralized Communities

    In decentralized communities voting plays a crucial role in governance and development of roadmaps. Snapshot is disrupting the traditional DAO voting model with a gas free voting platform. This is not a sponsored post and I have no stake in Snapshot, I do however like to use and promote open source tools which enable decentralized…