LogoLogo
  • Horizon Network
    • What is Horizon Network?
    • API Document
      • Horizon Network API
      • Quick Start
      • API Reference
        • Assets
        • Collections
        • Orders
        • Offers
        • Events
        • Statistics
        • Categories
        • Chains
        • Request an API key
    • SDKs Document
      • SDKs overview
      • NODE SDK
        • Installation
        • Initialization
        • Basic Example
          • Assets Management
          • Marketplace
        • Reference
          • Assets
          • Collections
          • Offers
          • Orders
          • Categories
          • Events
          • Statistics
          • Blockchain and Layer 2
      • JAVASCRIPT SDK
        • Overview
        • Installation
        • Quickstart
        • Reference
    • Launching NFT Collection
      • Launch A Collection
        • Overview
        • Part 1: Register as a user
        • Part 2: Deploy a smart contract
        • Part 3: Set creator earnings
        • Horizon Example Repository
      • Creating Your NFT Smart Contract
        • Overview
        • Getting Started
        • Setting a basic project
        • Minting from your new contract
        • Add your own NFT contract to Horizon Network
    • Horizon Network's Layer 2 Solution
      • Why Horizon Network?
      • Horizon Network's layer 2 Solutions
      • Basic Concepts
  • Horizon Land Metaverse
    • Feature
      • LAND in the metaverse
      • NFT Avatar
      • Horizon Center
      • Game Center
      • Shopping Center
      • Music Center
      • Play to Earn
      • Social Activities
      • Finance Center
      • Marketplace
      • Experience Mode
      • Zon Token
    • Stake Holder
      • Players
      • Creators
      • Land Owners
      • Partners
      • Investors
    • Economy
      • Revenue Stream
  • Technology
    • Blockchain
    • Product
    • System
    • Wallet
    • Security
    • Token
  • Tokenomic
  • Investor & Partner
  • Roadmap
  • Contact
  • Conclusion
  • Recommendation
  • FAQs
    • Policy
    • Terms of Use
Powered by GitBook
On this page
  • Install Metamask and create an Ethereum account
  • Add some Rinkeby ether from a faucet to your account
  • Initialize a new project
  • Initialize the Hardhat
  1. Horizon Network
  2. Launching NFT Collection
  3. Creating Your NFT Smart Contract

Getting Started

PreviousOverviewNextSetting a basic project

Last updated 2 years ago

Install Metamask and create an Ethereum account

In order to interact with a smart contract on Ethereum, you will need to install a wallet and initialize an account with some ether in it.

MetaMask, one of the most popular wallet apps, has an extension that can be installed directly into your web browser as well as a mobile app that you can use on iOS and Android. and create a new wallet.

Add some Rinkeby ether from a faucet to your account

Once you are finished with setting up your MetaMask account you will see a brand new account with 0 ETH in it ready for you to use. Switch over from the Ethereum mainnet to the Rinkeby testnet by clicking on the network names at the top and selecting Rinkeby

Initialize a new project

Create a new folder and initialize a new project

mkdir nft-contract
cd nft-contract
npm init
# use default values for next steps

Install dependencies

npm install --save-dev hardhat
npm install --save-dev @nomiclabs/hardhat-ethers
npm install --save-dev @nomiclabs/hardhat-etherscan
npm install @openzeppelin/contracts
npm install dotenv --save
npm install --save-dev ethers@^5.0.0
npm install --save-dev node-fetch@2

Initialize the Hardhat

Final step in setting up this project: initializing a (blank) Hardhat project:

> npx hardhat
888    888                      888 888               888
888    888                      888 888               888
888    888                      888 888               888
8888888888  8888b.  888d888 .d88888 88888b.   8888b.  888888
888    888     "88b 888P"  d88" 888 888 "88b     "88b 888
888    888 .d888888 888    888  888 888  888 .d888888 888
888    888 888  888 888    Y88b 888 888  888 888  888 Y88b.
888    888 "Y888888 888     "Y88888 888  888 "Y888888  "Y888

👷 Welcome to Hardhat v2.7.0 👷‍

? What do you want to do? …
  Create a basic sample project
  Create an advanced sample project
  Create an advanced sample project that uses TypeScript
❯ Create an empty hardhat.config.js
  Quit
  
  ...
  
  ✨ Config file created ✨

You're all done! Your project should have 3 files:

  • hardhat.config.js is a hardhat configuration file where we can define our blockchain configuration variables such as which network we want to operate on and which accounts to use.

  • package.json and package-lock.json are npm-created files used to define dependencies we might need

To add some Rinkeby ether to your wallet, you can go to the and request some Rinkeby ether be added to your account. Note that you might have to verify a non-malicious request for ether by posting on social media.

Rinkeby Faucet
Download MetaMask here