# ERC721 minting cost

**URL:** <https://forum.openzeppelin.com/t/erc721-minting-cost/818>\
**Category:** Contracts\
**Tags:** erc721\
**Created:** [June 10, 2019, 6:14am UTC](https://forum.openzeppelin.com/t/erc721-minting-cost/818 "2019-06-10T06:14:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [June 10, 2019, 6:33am UTC](https://forum.openzeppelin.com/t/erc721-minting-cost/818/2 "2019-06-10T06:33:44Z")

</div>

Deploying the sample ERC721 from the [work in progress ERC721 token guide](https://new-guides--openzeppelin-docs.netlify.com/v2.3.0/tokens#erc721)

```auto
pragma solidity ^0.5.0;

import "openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol";

contract GameItem is ERC721Full {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    constructor() ERC721Full("GameItem", "ITM") public {
    }

    function awardItem(address player, string memory tokenURI) public returns (uint256) {
        _tokenIds.increment();

        uint256 newItemId = _tokenIds.current();
        _mint(player, newItemId);
        _setTokenURI(newItemId, tokenURI);

        return newItemId;
    }
}

```

Minting the first token used 242,796 gas.  
`await gameItem.awardItem('0x77737a65c296012c67f8c7f656d1df81827c9541', 'https://game.com/item-id-8u5h2m.json')`  
Transaction: [0x6db656953f0ad03f5b25acb707424792df19317865d7fd34d1a0bb5c14df26ae](https://rinkeby.etherscan.io/tx/0x6db656953f0ad03f5b25acb707424792df19317865d7fd34d1a0bb5c14df26ae)

Minting a token to a new address used 227,796 gas.  
`await gameItem.awardItem('0x13ebd3443fa5575F0Eb173e323D8419F7452CfB1', 'https://game.com/item-id-8u5h2m.json')`  
Transaction: [0x60de1dcfa4549cf0cffbb375aa006f9600cfd4b7b5730bd3150edb41e30a002a](https://rinkeby.etherscan.io/tx/0x60de1dcfa4549cf0cffbb375aa006f9600cfd4b7b5730bd3150edb41e30a002a)

Minting gas will vary depending on the length of the tokenURI string in this implementation.

---

_[View the full topic](https://forum.openzeppelin.com/t/erc721-minting-cost/818)._
