What's new?
Product
Who uses Directual?
What can be built on Directual
Learn Directual
Why Directual?
Resources
Legal
Company

Execute operations with NFTs using no-code on Directual

Full-on web3 functionality is now at the tip of your fingers. Discover all about smart contracts, NFTs, and how to build complete blockchain projects yourself leveraging Directual no-code (sometimes – low-code) approach.

Lo and behold, the moment has come, and not a moment too soon. Now that you know how Directual can help you create dApps with no-code, let’s take a look at how Directual can now process smart contracts—using NFTs as an example. 

What are smart contracts?

Imagine smart contracts to be real-world paper contracts for a moment. Now think of said papers bearing legitimacy without any enforcing party. That’s smart contracts. 

Basically, it’s a program with a set of procedures that cannot be altered once deployed. Any instructions within the smart contract will be executed without any third party enforcing any of the clauses or room for disputes.

Speaking of Ethereum smart contracts, there is a couple of tokens with a notable difference: ERC-20 (Ethereum Request-for-Comments #20) and ERC-721 (Ethereum Request-for-Comments #721). ERC-20 is a fungible token (more on that below), which is a common token used for cryptocurrency as well. ERC-721, on the other hand, is non-fungible - an NFT, so it’s unique.

Smart contracts can be incredibly complex—entire programs can be written as one. They can be run continuously as the logic for an entire platform. For instance, the OasisDEX cryptocurrency exchange is just one big smart contract. You can trust that if you pay for something, you will get it. 

On top of that, they are a fundamental part of decentralized finance and NFTs.

Bored Ape Yacht Club (BAYC) managed to strike it big by minting NFTs, and guess how? Smart contracts and hype.

Speaking of which. 

What are NFTs?

NFT is a non-fungible token. What does “fungible” even mean? In short, fungibility means something you can replace with something equivalent without any problem. You drop a can of coke and it explodes – you get another one just like it and it costs the same. It’s fungible!

Not-fungible is something you cannot replace. There’s this wool hat your grandma made for you a long time ago. There’s no other hat like it, and there won’t be ever again. It carries memories of someone very important in your life. Sure you can buy a hat that may look similar, but it won’t be the same. 

But how does it work with digital media? 

Technically digital media is all infinitely fungible unless it’s a JPEG image that will age due to compression creep anyway. Hence the memes: just screenshot an NFT, and you’ve got the goods! It is pretty funny but fails to capture the real point behind NFTs.

This here is the first tweet ever. Sold as an NFT at a charity auction for $2.5 million. 

Ownership. That’s why blockchain is needed here: it helps to keep track of who owns what. You can have a limited edition of 200 e-books, and having them minted as NFTs will provide all the owners with true ownership of the originals. You can copy a digital item, but you can’t copy its value. Thus, the copy you own is special and unique. 

NFTs can be created by anyone, and it’s an incredibly interesting technology not just for arts, but soon for many other things. Your movie ticket can be an NFT, for instance.

Anyway, that’s enough education. Let’s get to buildin’.

Example: NFT gift airdrop for the first 10 subscribers!

In case you’d like to see the whole thing in action, we’ve prepared a handy video for you that goes over the process of creating an NFT gift airdrop for the first 10 subscribers.

If you prefer to read, go ahead:

Step-by-step instruction

We’ll need to create our own NFT collection to get started. This can easily be achieved with the help of various services, such as:

  • Rarible (the interface is lovely, own opinion)
  • Appypie (wouldn’t work for me personally somehow)
  • Autominter (simple but gets the job done)

Step 1: Generating the NFT collection

Let’s use Autominter for the sake of simplicity. Generate the NFTs and don’t forget to mint them to your own wallet. Then, press on the View on Etherscan button and select Token Tracker—we need to know the address of our NFT after all.

What we can see here is that the NFTs we’ve minted just now are all in our wallet. 

The tokenID ranges from 0 to 9 here, and the contract address is 0xf6cb5BDaD75356D65E57060EF56bB79aE2806c1F.

Step 2: Transferring the data into Directual

Now this data should be a part of your database in Directual. That’s how we will be able to automate the token distribution logic. To get started with this, we’ll create a table called nft_airdrop with fields contract_address, token_id, and is_owner.

…and fill it out!

Then, we can create a page with user authorization via MetaMask. To do this, let’s connect the MetaMask module:

And configure access for authorized users only at our home page:

Step 3: It’s raining NFTs!

Finally, we need to configure a scenario that will distribute NFTs upon user registration. To do so, we need to connect the NFT plugin. Then, we assemble this simple scenario that will trigger during any new events appearing in the AppUser table.

Now, all new users registering on our platform will be a part of this scenario and receive the goodies — until we run out of NFTs.

Here’s how the scenario works:

  1. Searches the nft_airdrop structure entries with condition is_owner == true (so we know whom to gift the stuff)
  2. Checks if all parameters are met
  3. Take the first element of the array to send out after the search is done
  4. Transfer NFT to WebUser user (duh), to their wallet ID
  5. Mark this NFT in nft_airdrop is_owner = false (the NFT is gifted, so we won’t be looking for it again)

And that really is it!

How Directual interacts with smart contracts

You may skip this part, if you don't want to deal with any coding :)

Directual was already a great choice for dApp developers, and now, you can call any blockchain function (on Ethereum or Polygon, for instance) by using the SDK module. 

Here is a short example of transferring a USDT token from one wallet to another. That’s basically a transfer function execution based on the ERC-20 standard:

Afterword

Our beloved community has been requesting smart contracts for a while, and we are so happy to finally deliver. Make the best out of Web3 functionality with your dApp! In case of questions, send us a message at hello@directual.com. Always happy to hear from fellow no-coders!

FAQ

What are NFTs and how are they used?
What are NFTs and how are they used?

NFTs (non-fungible tokens) are unique digital assets that cannot be exchanged for something else but can be sold for crypto. They typically represent art, collectibles, and other types of digital assets.

How can NFTs be used with Directual's no-code platform?
How can NFTs be used with Directual's no-code platform?

Directual's no-code platform can help you execute operations with NFTs, such as the generation, management, and distribution of tokens. With Directual, you can create all sorts of dApps that feature NFTs.

What are the benefits of using Directual's no-code platform for NFTs?
What are the benefits of using Directual's no-code platform for NFTs?

First, you can build absolutely anything on Directual with just your own skills. Second, you can integrate and manage NFTs really fast. Third, learning is not hard at all, since Directual has a ton of learning materials you can use to get started.

Featured blog posts

The Ultimate Guide to No-Code Developer Productivity

Bye-bye, pointless productivity metrics! Hello, developer happiness and real results. 🚀 Uncover the secrets to supercharging your engineering team's output without the drama.

October 25, 2024
by
Pavel Ershov

A Full Guide to No-Code Incident Management Systems

Things break all the time, and without an IMS, tracking issues is hell. This guide will show you how to deal with it the right way.

October 16, 2024
by
Eugene Doronin

Low-code vs No-code: Who's the Winner?

Ditch the code and join the low-code/no-code revolution! Get the power of rapid app development, process automation, and innovation without breaking a sweat (or your budget). Get ready to drag, drop, and amaze with the easy way to build custom apps.

October 9, 2024
by
Nikita Navalikhin

Introducing Directual Certification and Hire an Expert

Hire devs to build stuff! Offer your own stuff-building services! All of this, right in Directual’s interface. Jump in to learn more.

September 21, 2024
by
Pavel Ershov

WhatsApp Chatbots for Business: No-Nonsense Guide for 2024

WhatsApp is the ultimate customer engagement battlefield. Explore real-world success stories, learn the ropes of building your own chatbot, and stay ahead with insights into future trends.

September 5, 2024
by
Eugene Doronin

Top 20 AI Chatbot Tools to Supercharge Your No-Coding Journey

AI chatbot showdown! Get the scoop on who's hot, who's not, and how to spin up your own AI sidekick to ultimate no-code productivity.

August 28, 2024
by
Eugene Doronin

Ready to build your dream app?

Join 22,000+ no-coders using Directual and create something you can be proud of—both faster and cheaper than ever before. It’s easy to start thanks to the visual development UI, and just as easy to scale with powerful, enterprise-grade databases and backend.