PageSourceSearch

https://elastos-wiki.netlify.app/assets/js/99857d0f.12a60948.js

js elastos-wiki.netlify.app collected 2026-10-03 10:44:38 UTC 22,896 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7054],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),h=o,m=d["".concat(s,".").concat(h)]||d[h]||u[h]||r;return n?a.createElement(m,i(i({ref:t},p),{},{components:n})):a.createElement(m,i({ref:t},p))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c<r;c++)i[c]=n[c];return a.createElement.apply(null,i)}return a.createElement.apply(null,n)}h.displayName="MDXCreateElement"},5530:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var a=n(7462),o=n(3366),r=(n(7294),n(3905)),i=["components"],l={title:"Deploying an NFT Contract on ESC"},s=void 0,c={unversionedId:"tutorials/nfts/create-nft",id:"tutorials/nfts/create-nft",title:"Deploying an NFT Contract on ESC",description:"In this tutorial, we will guide you on how to write and deploy a smart contract for a Non-Fungible Token (NFT) using Ethereum and Inter Planetary File System (IPFS).",source:"@site/../docs/4.tutorials/nfts/create-nft.md",sourceDirName:"4.tutorials/nfts",slug:"/tutorials/nfts/create-nft",permalink:"/tutorials/nfts/create-nft",draft:!1,editUrl:"https://github.com/elastos/Elastos.Wiki/edit/master/website/../docs/4.tutorials/nfts/create-nft.md",tags:[],version:"current",lastUpdatedBy:"racollette",lastUpdatedAt:1677707016,formattedLastUpdatedAt:"Mar 1, 2023",frontMatter:{title:"Deploying an NFT Contract on ESC"},sidebar:"tutorialSidebar",previous:{title:"How to Create an ERC-20 Token",permalink:"/tutorials/fts/create-erc20"},next:{title:"How to Mint an NFT",permalink:"/tutorials/nfts/mint-nft"}},p={},d=[{value:"Creating an NFT",id:"creating-an-nft",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Step 1: Create a Metamask Wallet",id:"step-1-create-a-metamask-wallet",level:3},{value:"Step 2: Get some tELA from the Faucet",id:"step-2-get-some-tela-from-the-faucet",level:3},{value:"Step 3: Create a Node Project",id:"step-3-create-a-node-project",level:3},{value:"Step 4: Create a Hardhat Project",id:"step-4-create-a-hardhat-project",level:3},{value:"Step 5: Write the Smart Contract",id:"step-5-write-the-smart-contract",level:3},{value:"Step 6: Connect Metamask &amp; Elastos to your Project",id:"step-6-connect-metamask--elastos-to-your-project",level:3},{value:"Step 7: Update hardhat.config.js",id:"step-7-update-hardhatconfigjs",level:3},{value:"Step 8: Write the Deployment Script",id:"step-8-write-the-deployment-script",level:3},{value:"Step 9: Deploy the Contract",id:"step-9-deploy-the-contract",level:3}],u={toc:d},h="wrapper";function m(e){var t=e.components,l=(0,o.Z)(e,i);return(0,r.kt)(h,(0,a.Z)({},u,l,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"In this tutorial, we will guide you on how to write and deploy a smart contract for a Non-Fungible Token (NFT) using Ethereum and Inter Planetary File System (IPFS)."),(0,r.kt)("p",null,"You may have heard about the growing popularity of NFTs, which have brought blockchain technology into the mainstream. This presents an excellent opportunity for you to explore by creating and publishing your own NFT (ERC-721 Token) on the Elastos blockchain."),(0,r.kt)("p",null,"Our tutorial will c
1over the process of developing and deploying an ERC-721 smart contract on the ",(0,r.kt)("a",{parentName:"p",href:"/learn/sidechains/esc"},"Elastos Smart Chain")," testnet. We will use various tools such as Metamask, Solidity, Hardhat, and Pinata. Don't worry if these terms are unfamiliar to you; we will provide explanations."),(0,r.kt)("p",null,"Then in a follow up tutorial, we will demonstrate how to use the smart contract to mint an NFT with the smart contract."),(0,r.kt)("h2",{id:"creating-an-nft"},"Creating an NFT"),(0,r.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"Before you begin the steps in this tutorial, ensure you complete the following steps:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Install both ",(0,r.kt)("a",{parentName:"li",href:"https://nodejs.org/en/"},"Node.js")," (>14) and ",(0,r.kt)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npm")," on your local machine. To check your Node version, run the following command in your terminal:\nShell")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"node -v\n")),(0,r.kt)("h3",{id:"step-1-create-a-metamask-wallet"},"Step 1: Create a Metamask Wallet"),(0,r.kt)("p",null,"We need an ESC wallet to send and receive transactions. For this tutorial, we\u2019ll use Metamask, a virtual wallet in the browser."),(0,r.kt)("p",null,"You can download and create a Metamask account for free ",(0,r.kt)("a",{parentName:"p",href:"https://metamask.io/download/"},"here"),". Once you have an account, you'll need to configure the network to use the ESC testnet. This can be accomplished in MetaMask by navigating to ",(0,r.kt)("inlineCode",{parentName:"p"},"Settings")," -> ",(0,r.kt)("inlineCode",{parentName:"p"},"Network"),"-> ",(0,r.kt)("inlineCode",{parentName:"p"},"Add Network")," -> ",(0,r.kt)("inlineCode",{parentName:"p"},"Add a Network Manually")," and entering the following information:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Network name:")," ESC Testnet"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"New RPC URL:")," ",(0,r.kt)("inlineCode",{parentName:"li"},"https://api-testnet.elastos.io/esc")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Chain ID:")," 21"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Currency symbol:")," tELA"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Block explorer URL:")," ",(0,r.kt)("inlineCode",{parentName:"li"},"https://esc-testnet.elastos.io/"))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"image",src:n(5344).Z,width:"667",height:"688"})),(0,r.kt)("h3",{id:"step-2-get-some-tela-from-the-faucet"},"Step 2: Get some tELA from the Faucet"),(0,r.kt)("p",null,"In order to deploy our smart contract to the test network, we\u2019ll need some fake ELA. You can acquire some by visiting the ",(0,r.kt)("a",{parentName:"p",href:"https://esc-faucet.elastos.io/"},"faucet"),"."),(0,r.kt)("p",null,"Simply enter your address, verify your humanity and press the 'Request 1 ESC' button."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"image",src:n(4055).Z,width:"447",height:"439"})),(0,r.kt)("p",null,"If all goes well, you should see your tELA balance updated on Metamask."),(0,r.kt)("h3",{id:"step-3-create-a-node-project"},"Step 3: Create a Node Project"),(0,r.kt)("p",null,"Let's create an empty node project. Navigate to your command line and type:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"mkdir my-nft && cd my-nft\nnpm init -y\n")),(0,r.kt)("p",null,"We are now in a good position to set up and install Hardhat, the industry standard development environment for Ethereum Virutal Machine (EVM) compatible blockchains (which ESC is)."),(0,r.kt)("h3",{id:"step-4-create-a-hardhat-project"},"Step 4: Create a Hardhat Project"),(0,r.kt)("p",null,"Hardhat is a development environment to compile, deploy, test, and debug smart contracts. It helps developers create dApps locally before deploying them to a live chain."),(0,r.kt)("p",null,"In your terminal, run the following commands:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install --save-dev hardhat\nnpx hardhat\n")),(0,r.kt)("p",null,"You should then see a welcome message and options on what you can do. Select Create a JavaScript project:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sql"},'888    888                      888 888               888\n888    888                      888 888               888\n888    888                      888 888               888\n8888888888  8888b.  888d888 .d88888 88888b.   8888b.  888888\n888    888     "88b 888P"  d88" 888 888 "88b     "88b 888\n888    888 .d888888 888    888  888 888  888 .d888888 888\n888    888 888  888 888    Y88b 888 888  888 888  888 Y88b.\n888    888 "Y888888 888     "Y88888 888  888 "Y888888  "Y888\n\n\n\ud83d\udc77 Welcome to Hardhat v2.12.2 \ud83d\udc77\u200d\n\n? What do you want to do? \u2026\n\u276f Create a JavaScript project\n  Create a TypeScript project\n  Create an empty hardhat.config.js\n  Quit\n')),(0,r.kt)("p",null,"Agree to all the defaults (project root, adding a .gitignore, and installing all sample project dependencies)."),(0,r.kt)("p",null,"To check if everything works properly, run:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx hardhat test\n")),(0,r.kt)("p",null,"We now have our hardhat development environment successfully configured. Let us now install the OpenZeppelin contracts package. This will give us access to ERC721 implementations (the standard for NFTs) on top of which we will build our contract."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"npm install @openzeppelin/contracts\n")),(0,r.kt)("h3",{id:"step-5-write-the-smart-contract"},"Step 5: Write the Smart Contract"),(0,r.kt)("p",null,"Open the project in your favorite editor (e.g. ",(0,r.kt)("a",{parentName:"p",href:"https://code.visualstudio.com/"},"VSCode"),"). We will use a language called Solidity to write our contract."),(0,r.kt)("p",null,"Navigate to the ",(0,r.kt)("inlineCode",{parentName:"p"},"contracts")," folder and create a new file called ",(0,r.kt)("inlineCode",{parentName:"p"},"MyNFT.sol"),". Add the following code to the file."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="MyNFT.sol"',title:'"MyNFT.sol"'},'// SPDX-License-Identifier: MIT\npragma solidity ^0.8.9;
1\n\nimport "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";\nimport "@openzeppelin/contracts/utils/Counters.sol";\nimport "@openzeppelin/contracts/access/Ownable.sol";\n\ncontract MyNFT is ERC721URIStorage, Ownable {\n    using Counters for Counters.Counter;\n    Counters.Counter private _tokenIds;\n\n    constructor() ERC721("MyNFT", "NFT") {}\n\n    function mintNFT(address recipient, string memory tokenURI)\n        public\n        onlyOwner\n        returns (uint256)\n    {\n        _tokenIds.increment();\n\n        uint256 newItemId = _tokenIds.current();\n        _mint(recipient, newItemId);\n        _setTokenURI(newItemId, tokenURI);\n\n        return newItemId;\n    }\n}\n')),(0,r.kt)("p",null,"Ensure that the version specified above (^0.8.9) is the same as the version specified in your ",(0,r.kt)("inlineCode",{parentName:"p"},"hardhat.config.js")," file. Now let's break down the code line by line."),(0,r.kt)("p",null,"In lines 5-7, our code inherits three OpenZeppelin smart contract classes:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol")," contains the implementation of the ERC721 standard, which our NFT smart contract will inherit. To be a valid NFT, your smart contract must implement all the methods of the ERC721 standard. Refer to the interface definition here."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"@openzeppelin/contracts/utils/Counters.sol"),' provides counters that can only be incremented or decremented by one. Our smart contract uses a counter to keep track of the total number of NFTs minted and set the unique ID to our new NFT. Each NFT minted using a smart contract must be assigned a unique ID, and here our unique ID is determined by the total number of NFTs in existence. For example, the first NFT we mint with our smart contract has an ID of "1," the second has an ID of "2," and so on.'),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"@openzeppelin/contracts/access/Ownable.sol")," sets up access control on our smart contract, so only the owner of the smart contract (you) can mint NFTs.")),(0,r.kt)("p",null,"Note that including access control is entirely a preference. If you want anyone to be able to mint an NFT using your smart contract, remove the word ",(0,r.kt)("inlineCode",{parentName:"p"},"Ownable")," on line 9 and ",(0,r.kt)("inlineCode",{parentName:"p"},"onlyOwner")," on line 16."),(0,r.kt)("p",null,"In lines 9-27, we define our custom NFT smart contract, which is surprisingly short \u2013 it only contains a counter, a constructor, and a single function! This is thanks to our inherited OpenZeppelin contracts, which implement most of the methods needed to create an NFT, such as ownerOf (which returns the owner of the NFT) and transferFrom (which transfers ownership of the NFT)."),(0,r.kt)("p",null,'On line 13, we pass two strings, "MyNFT" and "NFT," into the ERC721 constructor. The first variable is the smart contract\'s ',(0,r.kt)("inlineCode",{parentName:"p"},"name"),", and the second is its ",(0,r.kt)("inlineCode",{parentName:"p"},"symbol"),". You can name each of these variables whatever you want."),(0,r.kt)("p",null,"Finally, starting on line 15, we have our ",(0,r.kt)("inlineCode",{parentName:"p"},"mintNFT()")," function that allows us to mint an NFT! This function takes two variables:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"address")," recipient specifies the ",(0,r.kt)("inlineCode",{parentName:"li"},"address")," that will receive your freshly minted NFT."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"string")," memory tokenURI is a ",(0,r.kt)("inlineCode",{parentName:"li"},"string")," that should resolve to a JSON document describing the NFT's metadata.")),(0,r.kt)("p",null,"An NFT's metadata is what brings it to life, allowing it to have additional properties such as a name, description, image, and other attributes. In part 2 of this tutorial, we will explain how to configure this metadata."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"mintNFT()")," calls some methods from the inherited ERC721 library and ultimately returns a number that represents the ID of the freshly minted NFT.")),(0,r.kt)("h3",{id:"step-6-connect-metamask--elastos-to-your-project"},"Step 6: Connect Metamask & Elastos to your Project"),(0,r.kt)("p",null,"Now that we've created a Metamask wallet and a smart contract, it\u2019s time to connect them."),(0,r.kt)("p",null,"Every transaction sent from your virtual wallet requires a signature using your unique private key. To provide our program with this permission, we can safely store our private key in an environment file."),(0,r.kt)("p",null,"Install the dotenv package in y
1our project directory by running:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install dotenv --save\n")),(0,r.kt)("p",null,"Then, create a ",(0,r.kt)("inlineCode",{parentName:"p"},".env")," file in the root directory of our project, and add your Metamask private key and HTTP Alchemy API Key (from Step 1) to it."),(0,r.kt)("admonition",{title:"NOTE:",type:"warning"},(0,r.kt)("p",{parentName:"admonition"},"Your ",(0,r.kt)("inlineCode",{parentName:"p"},".env")," file must be named ",(0,r.kt)("inlineCode",{parentName:"p"},".env"),"! Do not change the file name.")),(0,r.kt)("p",null,"Follow ",(0,r.kt)("a",{parentName:"p",href:"https://support.metamask.io/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key"},"these")," instructions to export your private key from Metamask"),(0,r.kt)("p",null,"Your .env should look like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"API_URL = https://api-testnet.elastos.io/esc\nPRIVATE_KEY = your-metamask-private-key\n")),(0,r.kt)("h3",{id:"step-7-update-hardhatconfigjs"},"Step 7: Update hardhat.config.js"),(0,r.kt)("p",null,"We\u2019ve added several dependencies and plugins so far, now we need to update ",(0,r.kt)("inlineCode",{parentName:"p"},"hardhat.config.js")," so that our project knows about all of them."),(0,r.kt)("p",null,"Replace the contents of ",(0,r.kt)("inlineCode",{parentName:"p"},"hardhat.config.js")," with the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="hardhat.config.js"',title:'"hardhat.config.js"'},'require("dotenv").config();\nrequire("@nomiclabs/hardhat-ethers");\nconst { API_URL, PRIVATE_KEY } = process.env;\n\nmodule.exports = {\n  solidity: "0.8.9",\n  defaultNetwork: "esc_testnet",\n  networks: {\n    hardhat: {},\n    esc_testnet: {\n      url: API_URL,\n      accounts: [`0x${PRIVATE_KEY}`],\n    },\n  },\n};\n')),(0,r.kt)("h3",{id:"step-8-write-the-deployment-script"},"Step 8: Write the Deployment Script"),(0,r.kt)("p",null,"Now that our contract is written and our configuration file is good to go, it\u2019s time to write the contract deploy script."),(0,r.kt)("p",null,"Navigate to the ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/")," folder and replace the contents in the file ",(0,r.kt)("inlineCode",{parentName:"p"},"deploy.js")," with the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js",metastring:'title="deploy.js"',title:'"deploy.js"'},'async function main() {\n  // Grab the contract factory\n  const MyNFT = await ethers.getContractFactory("MyNFT");\n\n  // Start deployment, returning a promise that resolves to a contract object\n  const myNFT = await MyNFT.deploy(); // Instance of the contract\n  console.log("Contract deployed to address:", myNFT.address);\n}\n\nmain()\n  .then(() => process.exit(0))\n  .catch((error) => {\n    console.error(error);\n    process.exit(1);\n  });\n')),(0,r.kt)("p",null,"Hardhat does a great job of explaining what each of these lines of code does in their ",(0,r.kt)("a",{parentName:"p",href:"https://hardhat.org/tutorial/testing-contracts.html#writing-tests"},"Contracts tutorial"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},'const MyNFT = await ethers.getContractFactory("MyNFT");\n')),(0,r.kt)("p",null,"A ContractFactory in ethers.js is an abstraction used to deploy new smart contracts, so MyNFT here is a factory for instances of our NFT contract. When using the hardhat-ethers plugin ContractFactory and Contract instances are connected to the first signer by default."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"const myNFT = await MyNFT.deploy();\n")),(0,r.kt)("p",null,"Calling ",(0,r.kt)("inlineCode",{parentName:"p"},"deploy()")," on a ContractFactory will start the deployment, and return a Promise that resolves to a Contract. This is the object that has a method for each of our smart contract functions."),(0,r.kt)("h3",{id:"step-9-deploy-the-contract"},"Step 9: Deploy the Contract"),(0,r.kt)("p",null,"We\u2019re finally ready to deploy our smart contract! Navigate back to the root of your project directory, and in the command line run:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npx hardhat run scripts/deploy.js --network esc_testnet\n")),(0,r.kt)("p",null,"You should then see something like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"Contract deployed to address: 0xA4766Ceb9E84a71D282A4CED9fB8Fe93C49b2Ff7\n")),(0,r.kt)("p",null,"If we go to the ",(0,r.kt)("a",{parentName:"p",href:"https://esc-testnet.elastos.io/"},"ESC testnet explorer")," and search for our contract address we should be able to see that it has been deployed successfully. The transaction will look something like this:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"image",src:n(4812).Z,width:"1820",height:"834"})),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"From")," address should match your Metamask account address and the ",(0,r.kt)("inlineCode",{parentName:"p"},"To")," address will say ",(0,r.kt)("inlineCode",{parentName:"p"},"Contract created"),". If we click into the transaction, we\u2019ll see our contract address in the To field:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"image",src:n(2818).Z,width:"1818",height:"862"})),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Congrats! You just deployed your NFT smart contract to Elastos!")),(0,r.kt)("p",null,"That\u2019s all for this tutorial. In the next one, we\u2019ll actually interact with our smart contract by minting an NFT."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"To deploy an NFT contract on the ESC mainnet, simply switch the testnet network details to the live versions which can be found ",(0,r.kt)("a",{parentName:"p",href:"/api/providers"},"here"),".")))}m.isMDXComponent=!0},5344:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/add-esc-testnet-metamask-b6770c6f054866df4857ee014ca1d7fb.png"},2818:(e,t,n)=>{n.d(t,{Z:()=>a});
1const a=n.p+"assets/images/contract-creation-details-b60171a267ec803d2eec51c0d968332f.png"},4812:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/contract-creation-0a96a443d79f48fb6323bd8e498f1ddf.png"},4055:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/esc-testnet-faucet-4b2fabef019e0bc102cb52a24735ac72.png"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.