Create a Non-Fungible Token (NFT) on Ethereum and Arweave

This describes how to create an NFT by uploading an image and a metadata file to Arweave and deploying an NFT smart contract to Ethereum, all in just 1 line of code.

To use this method, you need an idexo API key.

Assuming you have installed the SDK, you can use the following code in your file (instructions on modifying it follows):

const ido = require('idexo-sdk')
const image = ('./pathtoyourimage.imgfiletype')
ido.Multi.deployERC721ArEth('NFToken Name', 'SYMBOL', 'FirstEditionName', 'FirstEditionDescription', image, apiKey, attributes)
.then(res => console.log(res.data)

To customize the above code you need:

  1. An image that you want to upload, with the path to it. For example if you had an image someimage.png in the same directory as your index.js file, then image path would be './someimage.png'

  2. The name of the token for the NFT Minter. Replace 'NFToken Name' with that. For example you could call it 'Awesome NFT'.

  3. The symbol of the token. Replace 'SYMBOL' with that. For example you could call it 'ANFT'.

  4. The name of the first NFT you want to mint. Replace 'FirstEditionName' wit that. For example you could call it 'First'.

  5. The description of the first NFT you want to to mint. Replace 'FirstEditionDescription' with that. For example you could use 'My First Awesome NFT'.

  6. Your idexo API key.

  7. Optional attributes.

Using the above examples, your code would become:

const ido = require('idexo-sdk')
const image = ('./sampleimage.png')
ido.Multi.deployERC721ArEth('Awesome NFT', 'ANFT', 'First', 'My First Awesome NFT', image, apiKey)
.then(res => console.log(res.data)

The method in summary is:

ido.Multi.deployERC721ArEth(name, symbol, firstEditionName, firstEditionDescription, imagePath, apiKey, attributes)