website logo
Join the CommunityContact Us
Navigate through spaces
⌘K
Palm Network Developer Portal
The Palm Network
Submit an Article
Network Details
Validators
Network Update
Transition runbook
Testing
JSON-RPC API changes
Validators
Self-hosted nodes
Developer updates
FAQs
Support
Get Started
Get PALM Tokens
Gas Fees
Connect to Palm network
Run a Transaction Node
How To Tutorials
MetaMask Wallet Setup
Deploy NFT Contracts
Verifying NFT Contracts
Mint NFTs with Hardhat
Bridge
Use the Bridge
Integrate With the Bridge
Bridge Component Addresses
Deprecated
Use Supported Tools
Block Explorer
Moralis
Palm Safe
The Graph
Covalent API
Docs powered by
Archbee
How To Tutorials
Deploy NFT Contracts

Using Hardhat

17min

Overview

This guide walks you through using Hardhat to deploy an ERC-721 or ERC-1155 smart contract to the Palm network.

🏁 Prerequisites

  1. Get PALM Tokens to pay the deployment transaction fees.
  2. Connect to Palm network
  3. MetaMask Wallet Setup to get your private key.
  4. Install Node.js.

Tutorial

1. Initialize Your NPM Project

Shell
|
npm init



2. Install Hardhat

Shell
|
npm install --save-dev hardhat



3. Create a HardHat Project

a) Inside your npm project run:

Shell
|
npx hardhat


b) Select Create an empty hardhat.config.js

Document image



4. Add project folders

In the root directory of your project:

Shell
|
mkdir contracts && mkdir scripts



5. Writing your contract

ERC-721 and ERC-1155 present different ways to leverage Ethereum's blockchain for smart contract implementation. Each standard offers its own pros and cons and it comes down to a careful evaluation of the project requirements when deciding which one would be best for your needs.

ERC-721

Pros

  • Well-established standard with broad support from Ethereum wallets and exchanges
  • Allows for the creation of unique, non-fungible tokens
  • Suitable for creating digital collectibles and representing unique assets

Cons

  • Only allows for the creation of a single type of token
  • Inefficient for creating multiple types of NFTs





ERC-1155

Pros

  • Allows for the creation of multiple types of tokens within a single contract
  • Supports both fungible and non-fungible tokens
  • More efficient and cost-effective for creating a wide range of NFTs

Cons

  • Relatively new and complex standard
  • Limited support from Ethereum wallets and exchanges
  • Requires advanced development skills to implement



Updated 13 Sep 2023
Did this page help you?
PREVIOUS
Deploy NFT Contracts
NEXT
ERC-721
Docs powered by
Archbee
TABLE OF CONTENTS
Overview
🏁 Prerequisites
Tutorial
1. Initialize Your NPM Project
2. Install Hardhat
3. Create a HardHat Project
4. Add project folders
5. Writing your contract
ERC-721
ERC-1155
Docs powered by
Archbee