Technical note TN-06 Spec sheet
Salahdine Parnasse
An NFT collection for a top-level international athlete
- Issued
- Reading
- 4 min read
- Class
- Freelance
- Keywords
- Format
- Raw Markdown
On this page
Links
| Label | Link |
|---|---|
| Mint | Salahdine NFT (salahdineparnasse.art) |
| OpenSea | Salahdine Parnasse collection on OpenSea |
| Etherscan | Contract address 0xa0103f2764cc81425ff7fb3273903dd2efebb423 on Etherscan |
| @SalahdineP on Twitter | |
| LinkedIn post | Post on LinkedIn |
Project summary
In March, following the successful launch of an MMA athlete’s NFT collection, Salahdine Parnasse’s agent wanted to launch a collection for his champion.
Several proposals were made to determine the best approach for the specifics of the smart contract. A streamlined solution was chosen: no whitelist and no transaction limit. A reveal system was put in place, along with a few free mints offered to the community.
Three distinct types of NFTs can be obtained randomly:
- 600 classic cards, with a chance to win a private training session with the champion
- 200 rare cards, to win training sessions depending on the “finish”
- 5 legendary cards, to win the fighter’s equipment or an all-expenses-paid day to watch a fight from backstage
At launch, the project recorded 28 sales in a few hours. This may not have been the expected result, but Salahdine’s manager saw it as an opportunity to continue the project in the long term.
Key points of the project
The mint contract
This is the foundation of any NFT project: a smart contract capable of issuing non-fungible tokens. Several standards exist, each with its advantages and disadvantages. The most well-known are ERC721, ERC721A, and ERC1155. For this project, we chose the Azuki ERC721A standard.
This implementation has the advantage of offering low-cost multiple mints, like ERC1155, while keeping the basic ERC721 implementation.
The implementation of the ERC721A contract for the Salahdine project differs in two ways:
URL management
An override of the functions used to retrieve the URLs pointing to the metadata of the NFTs.
function tokenURI(uint256 tokenId) public view override returns (string memory)
function _baseURI() internal view override returns (string memory)
The goal of this change is to display a placeholder image before revealing the real designs to users.
Adding a signlist
Many NFT projects use a whitelist system to favor and reward certain members of their community. There are several ways to set up whitelists in Solidity, but the most optimized technique I have found to date is based on signing addresses.
- An account A is used to sign the address of the buyer B.
- The signature is sent as an argument when calling the mint function.
- The smart contract uses the
recovermethod to prove the authenticity of the signature based on the sender.
Here is an example of the function used to verify the validity of the signature:
/**
* @dev Does the user is whitelisted.
* Return 1 for yes else 0.
*/
function isWhiteList(bytes calldata _signature, address _targetSigner) view internal returns (uint8) {
if (_targetSigner == keccak256(abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
bytes32(uint256(uint160(msg.sender)))
)).recover(_signature)) {
return 1;
}
return 0;
}
For more information, I talk about it on my Instagram.
The resolver
When a third-party service wants to display the visual representation of an NFT, it must call the tokenURI(uint256 tokenId) function to obtain a URL where the NFT information is located, in JSON format most of the time.
Several services, such as Pinata, let you easily upload your metadata online. However, I am not a fan of these solutions because you are no longer in control of your data, some of these services are paid, and you depend on their resilience.
That’s why I set up a Python application using FastAPI and the Alchemy API to create my own metadata resolver.
The tokenURI method of my smart contract redirects to this microservice running on one of my servers. I then use Alchemy’s services to determine whether the requested NFT has already been minted or not. If it has, I return the corresponding metadata.

Alchemy dashboard used to measure the usage of the API that validates metadata management.
And what about data decentralization?
This system has a flaw: the NFT metadata is stored on a conventional server. However, this is not a deal-breaker for this type of project.
- Images are stored on IPFS; only metadata such as the name, description and attributes is stored on the server.
- To ensure data integrity, the hashes of all the metadata are made public at the beginning of the sale, and a way to verify their validity is provided.
- The user always has the option to freeze their data via OpenSea.
- Most NFT projects wish to make some adjustments shortly after their release. This gives them a little more flexibility while staying in line with their community.
Integration on a website
A Next.js application was deployed for the project. It serves as a showcase website presenting the project and its designs. It also allows buyers to acquire their NFTs.
A web3 module allows wallet connection through MetaMask only. For this project, MetaMask was the only provider selected, as it was sufficient for the scope of the project. Moreover, this allowed for a manual implementation, with no need to rely on a third-party service to ensure the security or maintainability of the project.

Deployment automation
To allow for maximum responsiveness during the deployment or development phases, many tasks are automated.
For the deployment of the smart contracts, scripted deployment pipelines were created to avoid paying high gas fees.
Numerous unit and functional tests cover all the project’s features, and modules also make it possible to predict the amount of gas that will be consumed by the different methods. Security audits are also carried out using tools such as Slither.

For deploying the web applications, database, reverse proxy, and resolver, Docker and Docker Compose are of great help. They make it possible to quickly launch, rebuild, modify, and stop the entire application stack or just a part of it. This is very useful, for example, for quickly scaling server power down or up depending on the situation.

Cloudflare is also used as a proxy for the production servers. This enables caching, which reduces server load times, and brings more security to the project.
Media



