Tokengating Audio Files with a DAT

In this project, I wanted to show the end-to-end implementation of using the Selene Network software and a compatible smart contract to tokengate audio files from my server. This sample is fully documented in the zip file download which is, like all other Selene Network examples, free.

Download drmaudiov1.zip from https://amorstyle.com/download.

Interact with the demo: https://amorstyle.com/dsn/?contract=0x44a8e5648334a6685c8425676d7c074e19c9a37f

If you choose to use this software to generate a similar user experience, you’ll need a couple things.

Hosting

All Selene Network projects require that you host the project on your own server. It’s not a WordPress install, but actual file hosting through your hosting service.

Metamask

You and the clients using this code will need Metamask in order to launch the smart contract to the blockchain and to interact with it once it’s there.

Content that you own

You’ll also need something that is valuable enough to make someone want to buy it from you.

The Basic Idea

The idea is, if the visitor buys the DAT, it can be used to unlock the content.

The way this demo does that is the creator places the valuable files on their server in a folder that only they can read. They then create an ‘nfts’ directory where they place the project folder. At this point, you edit the project JSON files (just text) and come up with your own image and then upload it to your server. You use a Selene Network install to validate that it sees your project file correctly.

Then, you launch the already built smart contract to the blockchain using ThetaScan.io. In the process of doing that, you configure it to point to your server and your project.

At this point, you’ll have your own smart contract on chain that you can reference like the link above “?contract=Your_contract_address”.

Now, because this demo contract references my demo content, you’ll need to make sure that you edit the JSON file that describes the content so that it downloads the appropriate files from the correct location on your server. And, the details of all this is contained within the documentation that is included in the ZIP file.

Summary

As with any Selene Network compatible smart contract, you can incentivize sales agents and other installs to feature your product. If they make a sale, their commission is automatically credited to them within the smart contract.

More Info

Even though I’ve made this code – simple – for a developer, most people still see it as if I’m writing Martian or something else completely foreign. Thus, tag me on social media and ask if I can help you get this done.

This project is similar to my custom NFT project, which is linked to here:

https://amorstyle.com/dsn/?contract=0x15433398Fd20b5c88D1A15a24675891c96174155

I’m also giving away some of these projects in my “Where’s the Cheese?” raffle. Pick up a raffle ticket and support this work.

https://amorstyle.com/dsn/?contract=0x9aff5efe24084fb7788472193afe734be775e4e4