Building on Ethereum with Go and Next
Hefty blockchain nuts and bolts
Last week I took on a big honking learning/portfolio project: to deploy a a smart contract on Ethereum and create a mini-app to go with it.1
But why? What does this accomplish for a client? The idea is that a company or decentralized autonomous organization (DAO) could set up tokens that they want to release to their employees/shareholders/members according to a schedule. These tokens could represent equity in the company/organization, pieces of a shared investment pool or grants from funders.
This is more than cute NFTs. Companies like Coinbase and Kraken vest billions in tokens annually using systems like this. These are real business cases that people are working on at web3 companies. So I fired up Claude to create a proof-of-concept of how it’s done.
Smart Contracts
Smart contracts are a core innovation of blockchain and specifically the Ethereum ecosystem. These are transactions that are automagically executed by the computer system.2
There’s plenty of criticism of this approach. But it enables companies to conduct real business using blockchain tokens. That’s why I believe it merits serious study.
There’s a couple core technologies needed to implement and deploy a smart contract on the Ethereum blockhain: Solidity and Hardhat.
Solidity is the programming language used to implement smart contracts for Ethereum and other blockchains. The demand for smart contract code is small relative to the broader backend software engineering ecosystem as a whole. It’s worth learning the basics if you want to work in the blockchain/web3 space.
Hardhat gives you a programming environment to work with smart contracts using Node.js aka server-side JavaScript. I searched for my previous post about learning JavaScript and realized I never wrote one. So here’s a quick summary:
JavaScript (JS) is an easy language to learn. Here’s a free e-book.3
JS is the most popular programming language out there and worth learning. It’s based on the more robust Java programming language but adapted to the browser.
From a Java background JS code looks absolutely hideous
Full-stack coding bootcamps were popular a few years ago that promised people they would get high-paying jobs using Mongo, Express, React/Angular and Node.js stacks (MEAN or MERN).
This didn’t pan out for many students. If someone tells you to get rich quick by learning to code be skeptical. Study up on computer science if it’s your passion.
What do you do with Hardhat and Solidity in practice? In this case I needed to setup a web3 wallet for my Ethereum tokens. I chose MetaMask as a simple browser extension that gets the job done. 4
Then I signed up for the Base Sepolia testnet, created a corresponding wallet in MetaMask, and got free Ethereum to play with from the faucet. I want to emphasize that this is play money. If you want to use real ETH first consult an experienced professional in the space.
Once you get your addresses together and some play ETH to work with, you can configure the project. Start with the README.md. The main project, backend and frontend each have a .env environment file that needs to be configured for the project to run. This is your private file that is never checked into Git version control.
Then you can get Hardhat installed and start playing around with the scripts. For example, run the tests, deploy it locally and to Base Sepolia. Mint your tokens, create the vesting schedule, release vested tokens, etc.
RESTful API with Go, PostgreSQL and Docker
Getting the smart contract deployed to the blockchain was a great learning experience in itself. Building an application around it requires more parts: an API, a database, and a user interface.
API stands for application programming interface. These allow computer systems to connect and communicate. In this case I built a web API and in particular a RESTful API. REST is a simple protocol that exposes methods for our front-end in the browser to get and send data to the application server.5
APIs have become an entire business category themselves. Some great examples of companies profiting from APIs are Twilio, Google Maps, and X/Twitter.
In this case I implemented the REST API using the Go programming language (aka Golang). There are several types of frameworks to run application servers that I’m more experienced with: Node.js & Express, Java Spring Boot and Python Django. 6
I have a sweet spot for Java as that was my original programming language from high school and college. Go has several advantages that are driving its rapid adoption in the software industry:
1. Concurrency is built-in, not bolted-on: Go’s goroutines and channels make it trivial to handle thousands of concurrent connections or parallel computations with clean, readable code. For APIs handling heavy traffic or blockchain nodes processing transactions simultaneously, you write go functionName() instead of wrestling with Java’s thread pools or Python’s GIL limitations. It gets you simple concurrency.
2. Compiled binaries = deployment simplicity: Go compiles to a single static binary with no runtime dependencies. Deploy your API or blockchain node by copying one file - no Java Virtual Machine (JVM) versioning hell, no Python virtual environment setup, no dependency conflicts in production. This matters for distributed systems where you’re deploying across multiple machines or containers.
3. Performance without the complexity tax: Go gives you great performance, comparable to C and Java and way faster than Python. And with a flatter learning curve than Java. For math-heavy blockchain operations (hashing, cryptography) or high-throughput APIs, you get the speed you need without enterprise Java’s verbosity or Python’s need to drop into C extensions. The standard library is also excellent for networking and crypto primitives right out of the box.
The tl;dr: Go was designed specifically for the “networked systems running at scale” use case, which is exactly what modern APIs and blockchains are.
For the database, I chose PostgreSQL. Postgres was recently adopted by Amazon as their standard database over Oracle. Simply put Postgres gives you a relational database (RDB) that can handle structured data at a low cost.
Docker gives us a way to spin up containerized applications. In this case, I used Docker compose to quickly build and run a small Postgres database on my laptop. Once you have installed and logged into Docker, follow along with the backend/README.md on how to build and run the container.
In production you could use something like DigitalOcean or Amazon Web Services (AWS) Relational Database Service (RDS). Or run a self-hosted Postgres on your server.
I created a backend/setup.sh script to get Go and all the dependent libraries installed. Check out the backend/README.md in this case. I provided a set of unit and integration tests that can be run with /backend/test.sh.
Then you can run the server with “go run cmd/api/main.go” which starts on http://localhost:8080. And use curl at the command-line to make API call operations.
Make It Look Gud: Next.js UI
I used Next.js to build the front-end user interface. Like Hardhat, this is a JavaScript framework, this time adopted towards providing a user interface in the browser. This gives a clean and simple front-end for the smart contract.7
Next.js is built by Vercel on top of the React framework by Meta/Facebook. React is itself a powerful and customizable front-end framework. Next is chosen for its simplicity as a back-end developer. In practice it took a few hours of debugging to get it to work.
So what can you do in the user interface?
Connect to your web3 wallet like MetaMask or Coinbase
See real-time updates of vesting progress automatically over time
Release tokens for beneficiaries
View recent vesting events with filtering
Responsive design that works on desktop and mobile devices and supports light or dark themes
Again check out the frontend/README.md for how to get setup. The magic here comes from the Wagmi React hooks. These provide a simplified interface for interacting with the Ethereum blockchain. It includes automatic caching, re-fetching of block changes, loading of states and error handling.
Wagmi does a lot of the heavy lifting for us in the front-end code. Under the hood, Wagmi uses ethers.js. This is the standard library for Ethereum interactions which handles wallet connections and contract calls.
My robot homeboy Claude recommends to deploy this front-end to Vercel or Netlify. I haven’t gotten around to this yet. And it provides a list of troubleshooting steps in case of errors.
Once you have Node set up, navigate to the frontend directory and run “npm install” to install the dependencies. Follow that with “npm run dev” to run the development server and navigate to “http://localhost:3000” in your browser. On my PC it normally takes a minute for the app to start up.
Then input your Base Sepolia testnet address to connect your wallet. Brave, Coinbase and MetaMask wallets are all supported. Once you’re successfully connected you can view the vesting schedule and release accrued tokens.
I deployed the app to Vercel on the hobby plan. This is a great way to deploy front-end software projects for free like this mini-app. Check out the live demo:




My biggest surprise was that getting the front-end up and running was harder than deploying the Solidity contract. If you want to build something similar, check out the full code and setup instructions on GitHub.
Drop a comment with any questions you have.
Thanks for reading. Keep building my friend!
And if you’re new to the crypto space and want to get started with Ethereum and the Coinbase wallet my invite code is in the footnotes. This gets you $30 in BTC after your first trade totaling $20 or more on Coinbase.8



