Secret Network: Create an NFT on Secret Network with Data Stored on IPFS
Learn how to create a Secret Network NFT with assets stored on IPFS.
What is Secret Network?
1. We’ll start by uploading an image to Filebase for us to use as an NFT.
2. Select ‘Buckets’ from the left side bar menu, or navigate to console.filebase.com/buckets.

3. Enter a bucket name and choose the IPFS storage network to create the bucket.

4. Next, select the bucket from your list of buckets, then select ‘Upload’ in the top right corner to upload your image file.

5. Select your image to be uploaded.

6. You can view the object’s IPFS CID in the CID column, or you can click on your uploaded object to display the metadata for the object, which includes the IPFS CID.

7. For this tutorial, we’ll be using a private metadata.json file and a public metadata.json file. An example of each can be found below:
private metadata.json file and a public metadata.json file. An example of each can be found below:8. Next, clone the following Github repository:
9. Then, start a Docker container to run a local testnet network:
10. Next, open a new terminal and navigate into the running Docker container to obtain the secret key pair for using the Secret Network node running in that Docker container:
11. Next, download and install Rust, then set up the wasm32 Rust package:
12. Then, generate a smart contract project with the command:
13. Next, open the src folder, then open the contract.rs file. Replace the existing contents with the following src folder:
src folder, then open the contract.rs file. Replace the existing contents with the following src folder:14. Then compile the smart contract with the command:
15. To mint an NFT, open the schema folder, then replace the execute_msg.json file’s existing content with the following:
execute_msg.json file’s existing content with the following:16. Then, deploy the smart contract to the testnet with the command:
Last updated