James Bachini

Rust

  • Creating A Web3 Chat Room

    Creating A Web3 Chat Room

    Did you know that Chrome and other browsers have a built in speech-to-text API? I thought I could use this to create an online chat room using web3 serverless technology. The result… https://jamesbachini.github.io/Talking-Smart-Contracts The frontend is hosted on Github pages and the backend is just a permissionless, immutable smart contract hosted on Stellar, a decentralized…

  • How To Use Smart Contracts & Passkeys To Set Up Auth On A Web App

    How To Use Smart Contracts & Passkeys To Set Up Auth On A Web App

    This tutorial dives into the creation of smart contract accounts and how this can be used as an identity platform also capable of payments James On YouTube Watch On YouTube: https://youtu.be/V2DwDzp43E8 | Subscribe The first step is to setup the passkey-kit demo which we will be using as a boilerplate. You can clone the repo…

  • Lessons From Building A Stellar Options Contract

    Lessons From Building A Stellar Options Contract

    In this tutorial I’ll be going through everything I learned while creating a Soroban smart contract for a call option. There are some interesting code snippets and gotcha’s for Soroban developers below but let’s start with the basics, Options 101. James On YouTube Watch On YouTube: https://youtu.be/Z8FHVllP_D0 | Subscribe What Are DeFi Options? Financial options…

  • Your First Rust Smart Contract Using Stellar

    Your First Rust Smart Contract Using Stellar

    In this tutorial we are going to deploy your first rust based smart contract using Stellar Soroban. James On YouTube Watch On YouTube: https://youtu.be/P8RuX7Ymu5Q | Subscribe ✨ Hello World Rust Smart Contract Let’s start by heading over to soropg.com Copy and paste this code into the editor Replace James with whatever you want to write…

  • Storing User Data with Rust Structs and Enums

    Storing User Data with Rust Structs and Enums

    In Soroban we model contract state with Rust types. For example, the SoroMarket contract defines a Rust struct for each user’s bets and an enum for the market outcome. Here is a simplified version of the code: Here Outcome holds the global state of the contract as a single enum variable and Bets is a…

  • NFT Royalties | New OpenZeppelin Library For Stellar

    NFT Royalties | New OpenZeppelin Library For Stellar

    In this tutorial we are going to dive into the new NFT token extension for royalties on Stellar. James On YouTube Watch On YouTube: https://youtu.be/17AGbMMBEz8 | Subscribe NFT royalties provide a mechanism for ensuring that creators continue to benefit from secondary sales of their work. With the latest release of OpenZeppelin’s NFT extensions for Soroban…

  • Scaffold Stellar | A Boilerplate For Stellar Developers

    Scaffold Stellar | A Boilerplate For Stellar Developers

    If a single command could spin up a Stellar contract, connect it to a React front end, hot reload every edit, and hand you push button deployment to Stellar testnet, would you finally ship that web3 idea? Scaffold Stellar from Aha Labs promises exactly that. James On YouTube Watch On YouTube: https://youtu.be/7wKD3d9w5d0 | Subscribe Stellar’s…

  • Creating A Wrapped Stablecoin

    Creating A Wrapped Stablecoin

    In this tutorial I will be creating a SEP41 wrapped stablecoin using a Stellar smart contract. James On YouTube Watch On YouTube: https://youtu.be/jfjKg86GEwY | Subscribe I’ll be using the soropg.com online IDE along with the latest libraries from OpenZeppelin. Note that all code in this tutorial is open source on github here: https://github.com/jamesbachini/Soroban-Stablecoin/ Let’s dive…

  • 5 Tips For Migrating Solidity Code To Rust Soroban

    5 Tips For Migrating Solidity Code To Rust Soroban

    Here are five tips for developers migrating from Solidity to Soroban. 1. Embrace .env In Solidity, global variables like msg.sender, msg.value, and msg.data provide transaction context. Soroban replaces these with the Env object, a powerful interface to the contract’s execution environment. Env gives you access to contract data, ledger details, authentication, and more, making it…

  • Stellar Soroban Alerts With OpenZeppelin Monitor

    Stellar Soroban Alerts With OpenZeppelin Monitor

    In this tutorial we will be setting up the OpenZeppelin monitor and creating a custom monitor to get alerts on large USDC transfers and send them to a Telegram chat. James On YouTube Watch On YouTube: https://youtu.be/9ebmeGu1LmE | Subscribe To follow along you’ll need Rust installed. Let’s start by forking and building the repository: The…

  • Creating OpenZeppelin Soroban NFT’s

    Creating OpenZeppelin Soroban NFT’s

    In this tutorial we will be creating a NFT contract on Stellar Soroban using the libraries from OpenZeppelin James On YouTube Watch On YouTube: https://youtu.be/xA1HfckPqFs | Subscribe To follow along you’ll need a couple of pieces of software:- The full source code for this project is available on Github:https://github.com/jamesbachini/OZ-Stellar-NFT The code is based on the…

  • Creating Landing Pages Using Web3 Backends

    Creating Landing Pages Using Web3 Backends

    In this tutorial we will be demonstrating how web3 technology can be used to store data on-chain rather than in a database when building a landing page. James On YouTube Watch On YouTube: https://youtu.be/3iPqLtjL_9k | Subscribe We will be using a simple Soroban smart contract to store a counter which increases each time a transaction…

  • Stellar Anchor Platform Tutorial

    Stellar Anchor Platform Tutorial

    Anchors serve as bridges between traditional finance and blockchain technology. James On YouTube Watch On YouTube: https://youtu.be/57iZMxAr_1Y | Subscribe They enable users to move money seamlessly between their bank accounts and the Stellar network. Without Anchors, integrating traditional financial systems with blockchain would be significantly more complex. Anchors make decentralized finance more accessible by providing…

  • Building a SEP41 Token on Stellar Soroban with OpenZeppelin

    Building a SEP41 Token on Stellar Soroban with OpenZeppelin

    OpenZeppelin has just launched the first few contract libraries for the Soroban ecosystem. Let’s take a look and build out a token using their fungible token module. James On YouTube Watch On YouTube: https://youtu.be/2Ak_nHyfrEU | Subscribe Deploying a Fungible Token on Soroban Prerequisites Ensure you have the following installed: You’ll also need some testnet tokens…

  • Deploying An NFT Using Stellar Soroban

    Deploying An NFT Using Stellar Soroban

    Today I’m going to show you how I deployed a simple NFT contract to Soroban, Stellar’s smart contract platform. Whether you’re an artist, a developer, or just curious about blockchain, this tutorial will guide you through the process step-by-step. Let’s get started. You’ll need a few things to get started:- James On YouTube Watch On…

  • Soroban Token Deployment + React dApp Tutorial (Stellar SDK)

    Soroban Token Deployment + React dApp Tutorial (Stellar SDK)

    In this tutorial, we’ll walk through the process of deploying a fungible token on the Stellar network using Soroban smart contracts, and then build a decentralized application to interact with it. We’ll cover everything from setting up your development environment to creating a user interface for token transfers. James On YouTube Watch On YouTube: https://youtu.be/oF624m5b384…

  • Soroban Data Locations & State Management

    Soroban Data Locations & State Management

    In this tutorial, we’ll explore how data is stored on Stellar’s Soroban smart contract platform, focusing on Soroban’s state management and the types of storage available. Understanding these concepts will allow you to manage data optimally and keep your decentralized applications efficient. James On YouTube Watch On YouTube: https://youtu.be/cw-TPSCqtSU | Subscribe Introduction to Soroban 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:…

  • 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…

  • 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…

  • 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…