Table of Contents
git clone https://github.com/SkyTradeInc/NFTMaker.git
cd NFTMaker
npm i
touch .env
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. It helps developers when building smart contracts and dApps locally before deploying to the live chain.
npm install --save-dev hardhat
Edit the .env
file and add the following
SERVER_PORT=
API_URL=
WEB3_PUBLIC_KEY=
WEB3_PRIVATE_KEY=
CONTRACT_ADDRESS=
IPFS_API_KEY=
IPFS_SECRET_KEY=
SERVER_PORT
(OPTIONAL) Default is4000
API_URL
Alchemy Ropsten API KeyWEB3_PUBLIC_KEY
Ropsten Address Public KeyWEB3_PRIVATE_KEY
Ropsten Address Private KeyCONTRACT_ADDRESS
NFT Creator contract deployed on Ropsten (see below to deploy)IPFS_API_KEY
Pinata.cloud API KeyIPFS_SECRET_KEY
Pinata.cloud Secret Key
Note: The Ropsten address requires a some balance
Run npx hardhat run scripts/deploy.js --network ropsten
to create the NFT Factory contract on Ropsten and add this to the CONTRACT_ADDRESS
environment variable
Run node service.js
to begin the service
/api/ping
Test connectivity to the Rest API.
Parameters: NONE
POST /api/mint
Parameters:
Object Name | Type | Mandatory |
---|---|---|
address | STRING | YES |
tokenURI | STRING | YES |
POST /api/ipfsUpload
Parameters:
Object Name | Type | Mandatory |
---|---|---|
json | STRING | YES |
/api/ipfs/{hash}
Parameters:
Query Param Name | Type | Mandatory |
---|---|---|
hash | STRING | YES |
POST /api/ipfsUploadAndMint
Parameters:
Object Name | Type | Mandatory |
---|---|---|
address | STRING | YES |
json | STRING | YES |