A Quick Overview of NFT Token Transfer and Approval

From my last post about NFT staking contracts, I received a message on Twitter from a developer. That developer was creating a staking contract for an NFT project but was getting the following error: “ERC721: transfer caller is not owner nor approved”. I immediately recognized the error due to stumbling into this myself previously. So […]

How to Implement an NFT Staking Contract

Many NFT projects are looking for ways to bring utility to users and incentivize long-term holding or participation. In essence, a staking contract holds tokens and tracks a few different variables to their respective owners. Here, I’ll go over a simple implementation for staking NFTs. For this demo, I’ve created three different contracts. One is […]

Journey into Generative Art: Follow the Algorithm

“Creativity itself doesn’t care at all about results — the only thing it craves is the process.” — Elizabeth Gilbert Creating generative art is a tango between the rough boundaries you’ve established and the decisions of the algorithm. At the onset, I rarely have a rigid plan for what I’m going to make. I may […]

Journey into Generative Art: Why I’m Using p5.js and You Should Too

“Creative people are curious, flexible, persistent, and independent, with a tremendous spirit of adventure and a love of play.” – Henri Matisse Journey into Generative Art As a kid, I always excelled in STEM courses and instinctually knew that I wanted to become an engineer. I rarely ever doodled in my notes anything more than […]

NFT Contract Factory with Off-Chain Metadata

When it comes to layer-1 blockchains, storing metadata on-chain is very expensive and doesn’t make sense for most people. The preferred way is to leverage IPFS while keeping a reference to each token’s attributes on the blockchain. Let’s discuss the simplest way to create an NFT contract factory and store its metadata off-chain. Prerequisites Truffle/Ganache […]

You Should Be Using a Reentrancy Guard in Your Smart Contracts

A reentrancy attack capitalizes on unprotected external calls and can be a particularly devastating exploit that drains all of the funds in your contract if not handled properly. At its simplest, reentrancy is: contract B uses a callback to recursively call contract A while it is still executing and before the balance is updated. Let’s […]

Create and Deploy a React Dapp to an Ethereum Test Network

This guide will show you how to quickly create and deploy a React decentralized application (dapp). What You’ll need: Node.js React Truffle/Ganache Infura Api Key Prerequisites: Truffle is a Node.js framework for Ethereum that allows you to build, test, and deploy smart contracts. The Truffle Suite provides developers with many useful tools for quickly building […]

Not Your Keys, Not Your Crypto

So, you’re seriously thinking about buying some cryptocurrency. Great! Maybe you haven’t pulled the trigger yet because you have security concerns due to events like Mt. Gox. This post will explain everything you need to know about securing your funds for years to come. First, let’s start with the basics. What’s a Crypto Wallet? Much like […]

Byzantine Failure: The Importance of Consensus Protocols in Distributed & Blockchain Networks

A consensus is a general agreement on value. When you have only two parties, it can be pretty straightforward: Bob: What should we eat? Sam: How about pizza? Bob: I had pizza for lunch; how about tacos instead? Sam: Sounds good! Bob and Sam have agreed on a value that was suggested by one of them, and they […]