# Deploy ERC721 Contract

### Before you begin

Before you begin, make sure to do the following:

* [\*\*\*\**InfraEVM* Parachain](https://docs.infrablockchain.net/infrablockchain-docs/infrablockchain/service-chains/infra-evm-parachain)
* [Moving Assets with EVM](https://docs.infrablockchain.net/infrablockchain-docs/infrablockchain/tutorials/service-chains/infra-evm-parachain/deposit-and-withdraw-token)

### Deploying an ERC721 Token Contract Using Remix

1. Visit [Remix](https://remix.ethereum.org).

   ![remix-main](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-4ee267524fe031a6c66e085b0d4e421159c3defe%2Ferc721-remix-main.png?alt=media)
2. Create a workspace. Choose the ERC721 token contract template.

   ![erc721-create-workspace](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-f59f604e7c3a0ab982badde5d79a34e2ae5d4526%2Ferc721-create-workspace.png?alt=media)
3. Confirm the created workspace.

   ![erc721-check-code](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-f85271397fc755c63bb1b4948e0c5efa901dc507%2Ferc721-check-code.png?alt=media)
4. Compile the generated code.

   ![erc721-compile](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-cec592ce33b2b2e2f03f2da04ccbea31ec0bdce1%2Ferc721-compile.png?alt=media)
5. Select the network to deploy as `Injected Provider - MetaMask` and connect MetaMask to Remix.

   ![erc721-change-network](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-ce5a6e46439da9200f73c119c2b6b2acd06c2655%2Ferc721-change-network.png?alt=media)
6. Before deployment, set variable values such as the owner, and deploy the contract.

   ![erc721-set-owner-and-deploy](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-4c311592fddf262ecb6144f3549e6750823b33e1%2Ferc721-set-owner-and-deploy.png?alt=media)
7. If a confirmation window appears in MetaMask, double-check and proceed with contract deployment.

   ![erc721-deploy-check](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-22ea7a17c6d12db4625e5c95524067d83fb075fb%2Ferc721-deploy-check.png?alt=media)
8. Once deployment is complete, you can verify it in MetaMask as shown below.

   ![erc721-deploy-complete](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-beb78ddc2fbf2c58122e011be8e5e7e2b6d0bba5%2Ferc721-deploy-complete.png?alt=media)

### Minting NFTs with the Deployed ERC721 Token Contract

This continues from the previous tutorial.

1. As shown below in "Deployed Contracts," you can see the `safeMint` function. You can use this function to mint NFTs by filling in appropriate values for 'to' and 'tokenId'.

   ![erc721-mint](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-6b3f5b41103a02731343ac5bc807fd29d10fc4c1%2Ferc721-mint.png?alt=media)
2. Press the "transact" button, and a confirmation window for the transaction will appear.

   ![erc721-mint-check](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-3525608ea043d64f27266425475ba1f451eaefd7%2Ferc721-mint-check.png?alt=media)
3. If the transaction is executed successfully, the NFT will be minted, and you can confirm it in wallets like MetaMask under NFT token views.

   ![erc721-metamask-nft-check](https://3394686052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FcHUSDzEQOuSRhER7FQ%2Fuploads%2Fgit-blob-03149f1f72fc75c4710617af907ecaa149fe2eeb%2Ferc721-metamask-nft-check.png?alt=media)

### Moving on to the Next Step

* [Deploying an ERC1155 Token Contract](https://docs.infrablockchain.net/infrablockchain-docs/infrablockchain/tutorials/service-chains/infra-evm-parachain/deploy-erc1155-contract)
