Blog Home
How to Mint an NFT on Base
How to Mint an NFT on Base

How to Mint an NFT on Base

Min read
How to Mint an NFT on Base
Your step-by-step guide to minting NFTs on Base. (Testnet and Mainnet compatible)

If you’ve been in the crypto space for any amount of time, you likely know Coinbase as one of the leading crypto exchanges. Beyond their work as a crypto exchange, they have done immense work on the front of NFTs, wallets, and now blockchains!

Base is a new Layer 2 blockchain built on Ethereum with the goal of being fast, secure, and open source. Their testnet has been running for several months and just this past month they have released Mainnet, so in this tutorial we’ll show you how to mint an NFT on Base using Pinata.

Upload Content and Metadata to Pinata

The first thing you’ll need to do is have something to turn into an NFT! As we have always said before, “If you can upload it to Pinata, it can be an NFT.”

We’ll keep it simple and use this image of Pinnie. Feel free to use it yourself :)

Next you’ll want to sign up for a Pinata account if you don't have one already.

A free account works fine for this tutorial, but if you’re already thinking bigger, you might want to look into our other plans.

Once you’re signed in, you can simply upload the image of Pinnie by clicking on “Add Files” in the top right.

After it’s been uploaded, click on the CID to copy it and save it for the next step.

In order to create our NFT we have to put all the information about the NFT into a metadata JSON file. That might sound complicated, but it’s actually quite easy!

You can use this template on Replit (an online code editor) to edit the info for your NFT.

Once it’s edited you can save the file by clicking on the “metadata.json” tab and selecting “download.”

Then upload that metadata file to Pinata just like you uploaded the photo, then copy the CID down for later.

Setup Coinbase Wallet

You can use any kind of crypto wallet to complete this tutorial but we would recommend Coinbase for a few reasons.

First, it has a lot of handy stuff baked in, such as the network information for Base and built in testnet faucet. Second, if you happen to have a Coinbase account, it’s super easy to move money back and forth between your account and your wallet.

To setup your wallet visit the Coinbase Wallet page. Once you have a wallet created we’ll need to do a few things before minting the NFT. First you will need to load it up with 0.002 ETH which at the time of this article is about $5. This is necessary since the Base Göerli testnet faucets have a balance requirement of real money to prevent bot spam which would drain the pools.

After you have some funds added you will need to go to Settings > Developer Settings, and make sure the Testnet toggle is switched on.

To get some testnet funds from the faucet, on that same page you will see Testnet Faucets, then just click on Base Görli. You can only request every 24 hours but we will only need it once for this tutorial.

Deploy Smart Contract and Mint NFT

There are a lot of ways to mint an NFT, but for this tutorial we’ll keep it simple by using OpenZeppelin and Remix. Visit OpenZeppelin’s contract page to use their smart contract builder, give it a name and symbol, and select the following:

Of course if you are doing a mainnet contract please do more research on what options to select and make sure you know what you’re putting into your contract.

Once you have those options selected you will want to hit the “Open in Remix” button.

First thing we need to do in Remix is compile the smart contract which will make sure everything is setup correctly and running smoothly. You can do that by clicking the “Compile” button.

If successful, the icon on the right side should gain a green checkmark.

Next we will need to deploy the smart contract. To start this click on the “Deploy & Run Transactions” button on the left side.

In order to deploy it to Base Görli we will need to change the environment to “injected.” This should prompt a screen from Coinbase wallet asking which wallet we want to use. After we select Coinbase Wallet, it will give us another prompt to connect our wallet.

connect wallet

After the wallet is connected, go back into Coinbase Wallet and click on the network button in the top right.

You’ll see that by default it selects Ethereum, and we will want to switch that to Base Görli instead.

Now we’re ready to deploy the contract, so just hit that “Deploy” button and confirm the transaction. If the network is busy it might take a second attempt.

If the contract is successfully deployed you will see a log in the bottom saying it worked, and on the left side we will have a new dropdown menu for our deployed contract. Go ahead an click on that to see all the different functions.

From this list we will use a function called safeMint which takes two arguments. First it will need the wallet address the NFT will be minted to, and second it will need the “URI” or “Uniform Resource Identifier.”

The URI will be that metadata CID we uploaded to Pinata earlier, so altogether your input for that function will look something like this:


After putting that data in, click the safeMint button and confirm the transaction. Once it’s gone through you should see a confirmation at the bottom.

Now you can visit, connect the wallet the NFT was minted to, and you should be able to see it now!

Check out the one we minted with this link and enjoy it in all it’s based glory ;)

We’re excited to see the possibilities of a L2 chain backed by one of the largest crypto exchanges to create an affordable and secure experience for developers. What will you build with Base and Pinata?

Grab your account below, start building, and hit me up on Twitter and let me know how it went for you!



H2 - Enabling Widespread Adoption for Music NFTs

paragraph — The first thing the music industry needs is more exposure. For artists, listeners and yeah, the labels. Even with the use cases mentioned above, the majority of the music industry still sees NFTs as a novelty rather than a legitimate way to run a business. We see a future where the experience is built and monetized on the blockchain, with labels taking part of the experience, as well.

Second, there needs to be a big jump in user experience. Listeners know what to expect with Spotify and Apple Music: a smooth, intuitive experience that lets them listen to Lil Nas X with just a few clicks. Web3 platforms aren’t quite there. Music NFTs and related premium content require extra steps that most people don’t yet have an appetite for.

H3 - How Could Music NFTs Save Artists?

paragraph — Musician Daniel Allan spent months building a relationship with the NFT community and raised 50 ETH to fund his new album, Overstimulated. Companies like Audius and artists like Vérité's, who raised $90,000 in an NFT launch, are at the forefront of exploring new ways to get paid. Avenged Sevenfold launched an NFT collection called "Deathbats Club" with 10,000 items that grants holders access to benefits such as meet and greets at shows, lifetime free tickets, limited edition merchandise, and more.

Photo of ETHDenver 2022 with Pinata employees
This can also be styled!! Image caption.

H4 - Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

H5 — How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

LINK — This is how a link looks like. Please provide normal & hover state (if different than this)

  • This will be bullet points
  • Numbered list is the same but with numbers
  • It has a margin-left applied
  1. Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.
  2. Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.
  3. Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.
QUOTE — Everyone is obsessed with making money and seeking alpha, which does a disservice to what [NFTs] can actually do. We have been instructing many bands that NFTs are a ticket for access to an exclusive club.” - M. Shadows, Avenged Sevenfold’s lead singer.