blank Skip to main content

Developing Smart Contracts for Creating and Selling NFT Images

An EU-based startup was working on an art project that involved the use of non-fungible tokens (NFTs). They were looking for an expert team with vast experience in blockchain and web development as well as testing to work alongside their in-house team to develop an efficient NFT project.

As Apriorit specialists know how to create smart contracts for NFTs, we successfully fulfilled all client requests and overcame challenges we faced during project development.

The client

Our client is a European startup whose project was about developing and selling NFTs of already created images using smart contracts.

The challenge

The client planned to launch a blockchain-based platform for selling NFTs and was looking for a development team with relevant experience that could help to implement such a solution. They approached Apriorit with the following tasks:

  • Write smart contracts for minting and selling NFTs
  • Prepare NFT metadata based on existing images
  • Ensure that users can resell purchased NFTs via OpenSea
  • Automatically reveal an NFT image on a certain date

In the course of development, the client added a few additional tasks:

  • Create a website for selling NFTs
  • Make a video guide for users

The client was looking for a team with strong knowledge of Solidity and JavaScript as well as experience developing smart contracts for creating NFTs and working with OpenSea. They also needed a developer and designer who could create the UI of a WordPress website.

Read also:
Does Your Business Need NFTs? Use Cases, Benefits, and Nuances to Consider

Our approach

After analyzing the client’s request and discussing details, we came up with a plan of work that was slightly modified during the development process as a few additional tasks were added. Overall, our approach to this project consisted of five stages:

  1. Build the solution architecture.
  2. Develop smart contracts for minting and selling NFTs.
  3. Create scripts for generating, storing, and uploading metadata.
  4. Help the client with website development.
  5. Assist the client with solution deployment.

This project required profound knowledge of various languages, tools, and technologies, including Solidity, JavaScript, MongoDB, IPFS, and WordPress. We put together a team of specialists with relevant expertise and experience.

Project details

To ensure a smooth and transparent development process with our client and their team, we had regular meetings in Google Meet. We also communicated through email and messengers to make sure we were on the same page regarding project details.

Case study:
Evaluating Smart Contract Security for Decentralized Finance (DeFi)


The client received the desired solution, with project requirements implemented within the established deadlines. All solution elements — smart contracts, NFTs, and the website — were delivered just in time to start the NFT sale.

Initially, the client came to us with a limited scope of tasks only related to NFT smart contract development. But in the course of our work, the client asked for consultations with our experts and ended up delegating other tasks to our team including web development, web design, and video guide creation.

Project results

How we did it

To help the client finish all preparations and release the solution on time, we had to do thorough work and make sure the solution ran flawlessly. To do this, we broke the development process into five main steps:

Fulfilling client’s requests in 5 steps

Step 1: Conduct preliminary research

Before creating NFT smart contracts, we conducted preliminary research. During this step, our team prepared and reviewed the solution architecture and approved it with the client. Planning how solution components would interact with each other helped us prepare for smart contract development for NFT, foresee possible issues, and minimize the cost of changes.

Apriorit’s developers defined the main components of the solution, interaction between them, and security measures for common smart contract vulnerabilities. Meanwhile, our QA started preparing a test plan and test cases so that we could start the testing process as soon as developers finished certain parts of the solution.

Read also:
Convert WordPress to PWA: How to Turn a WordPress Website into a Progressive Web Application

Step 2: Enable NFT minting and selling

At this point, developers implemented the following:

  • Random minting
  • Minting limitations: limits on the number of tokens available for minting during and after the presale stage, pre-sale listing, sale period, and more
  • Mechanism for two-stage NFT sales

We also decided to develop two different types of smart contracts for NFTs and their sale instead of a single complex one. This helped us to save development time and effort later because after the presale, the client introduced new requirements to the sale logic. To implement them, we only had to replace the smart contract for selling NFTs with a new one and change the link in the NFT contract. The smart contract for NFT minting didn’t require any changes.

Step 3: Enable metadata generation, storage, and uploading

To enable work with metadata, our developers implemented two crucial scripts:

  • A script that generates metadata for existing images
  • A script that uploads this metadata to the InterPlanetary File System (IPFS)

We also did a lot of infrastructure work, including setting our own IPFS nodes for image hosting. Our developers offered to store metadata on a dedicated server in MongoDB. This allowed us to edit the metadata quickly without any impact on the solution after the client found a mistake in their initial requirements and urgent changes were needed.

Step 4: Create a website and user guide

These tasks were out of our initial scope of work. But once the client asked us to help, we added a WordPress developer, a business analyst, and a designer to the team.

During this step, we implemented all components of the website that allow users to interact with smart contracts and purchase minted tokens. Our designer prepared UI prototypes to make the website user-friendly, providing access to all available functionality and making this design aesthetically pleasant for users.

Then, we started working on the user guide. Our business analyst with experience in creating user guides prepared a step-by-step tutorial with detailed voice-over instructions that allowed users to get a smooth start with the solution.

Step 5: Deploy the solution

Once we finished all the implementations and properly tested the solution, it was time to deploy it on the Ethereum mainnet.

At this point, the client could start the NFT sale, which they held in two iterations:

  1. Presale for limited number of users who joined the project early and made it to the presale list
  2. Public sale for all other users

At this step, our specialists also helped the client with configuring the AWS infrastructure.

Read also:
NFTs for Real Estate: Exploring the Concept and Creating Tokens in Python, JavaScript, and Solidity

Challenges and solutions

During project development, we faced a few challenges. But we were able to handle them thanks to transparent and efficient communication with the client and the professionalism of our developers.

The main issues that arose were the following:

Main project challenges
  • Unplanned consulting activities and workload. Although the client’s in-house team was handling solution deployment, they requested several consultations with us. Then they delegated tasks to our team including generating metadata, creating the website, and preparing a video guide. Thanks to efficient project management skills, we were able to find time and resources to help the client with those tasks and deployment.
  • Additional web development tasks. Due to some obstacles, the client’s web developer couldn’t finish their job, so we took on some additional activities. For instance, we worked on the visual part for the token minting page and introduced changes to the main page.
  • Pending transactions. When running blockchain operations, we noticed that some transactions were stuck in pending status. The reason was a suddenly increased gas price. Our developers fixed this issue by using the algorithm of transaction update and creating a new transaction with the same nonce value and a higher gas price.
  • Absence of business analysts at the project start. Since there was no BA during the discovery stage, we had an incomplete list of the client’s requirements. This led to issues such as an inaccurate number of addresses in the pre-sale list and an incorrectly specified metadata structure. Thus, our team had to introduce several changes to parts of the finished solution.

Read also:
Enhancing Financial Data and Operational Security with a Tezos Wallet and dApp Audit

The impact

Our team helped the client to release their solution on time and start the NFT sale. According to the client’s feedback, the project is successfully running, and the NFT minting process functions flawlessly.

We delivered all parts of the project that we were assigned to develop and test. Our technical specialists also assisted the client’s in-house team with extra activities whenever they needed advice or needed to delegate some tasks.

Are you starting an NFT project or considering improving an existing one? Contact Apriorit to leverage our blockchain development skills!

Have a question?

Ask our expert!

Tell us about your project

Send us a request for proposal! We’ll get back to you with details and estimations.

By clicking Send you give consent to processing your data

Book an Exploratory Call

Do not have any specific task for us in mind but our skills seem interesting?

Get a quick Apriorit intro to better understand our team capabilities.

Book time slot

Contact us