- Clone the repo and install all dependencies:
git clone https://github.com/QingyangKong/ToyotaNFT.git
cd ToyotaNFT
npm install
- Set envrionment variable:
npx env-enc set-pw
and then input a passwordnpx env-enc set
to set 2 environment variablePRIVATE_KEY
andFUJI_RPC_URL
.
- Compile and deploy on Ethereum Sepolia:
npx hardhat compile
npx hardhat run /scripts/deploy.js
-
Go the Opensea testnet and click profile to check your NFT.
-
Make the NFT as a dynamic NFT Head to automation app.
Create a new upkeep by clicking the button.
Input the contract address and add 5 LINKs into the balance. -
Back to Opensea testnet and check NFT again click the three dots and in the top right
click "refresh metadata"
refresh the page -
Mint a new NFT
0x351d64c79fe3dbbb99762e9864c19f9f5a540953
is the NFT address in the sample and you can mint a nft from this one by runningnpx hardhat run scripts/mint.js
if you created a new NFT instead of using the sample one, please replace the address in the lineconst nftAddr = "0x351d64c79fe3dbbb99762e9864c19f9f5a540953";
with your NFT address.
Please check NFT on Opensea here. Please turn on the upkeep to make it dynamic.