NFT Gas – Do Gas Prices for NFTs Depend on File Size?

gasgas-pricenft

If I am minting NFT does the file size and type affect gas price, i.e. if that's 5 GB video or just a small 15 digits number?

Thanks,
Yury

Best Answer

In most NFT implementations I guess you wouldn't want to upload your data to the blockchain because of the gas price, so you have alternatives:

  1. Upload an URL to the location of your data.
  2. Upload your file's hash (SHA256).

In "EIP-721 Non-Fungible Token Standard" there is an example of the "ERC721 Metadata JSON Schema" or tokenURI that looks like this:

{
    "title": "Asset Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset to which this NFT represents"
        },
        "description": {
            "type": "string",
            "description": "Describes the asset to which this NFT represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
        }
    }
}

As you can see, it shows examples of metadata that you'll use.

In summary, NFT is a concept which can be implemented in multiple ways. But for now to it's not practical to upload 5GB of data so file-size probably wouldn't matter (Maybe only if you pay storage cost to third party storage).

Related Topic