To run this project locally, follow these steps.
- Clone the project locally, change into the directory, and install the dependencies:
git clone https://github.com/PozzlePlanet/protocol-development.git
cd rekt-wolf-nft
yarn install- Start the local Hardhat node
npx hardhat node- Deploy the contracts to the EVM chain or local network in a separate terminal window
Copy the .env.example file to a file named .env, and then edit it to fill in the details. Get the relevant network apis keys from https://polygonscan.com/, https://etherscan.io/ etc.
npx hardhat deploy --network mumbai --tags RektWolfNFT
npx hardhat verify --network mumbai --constructor-args "args/mumbai.js" --contract "contracts/RektWolfNFT.sol:RektWolfNFT" [deployed address]
npx hardhat deploy --network rinkeby --tags RektWolfNFT
npx hardhat verify --network rinkeby --constructor-args "args/rinkeby.js" --contract "contracts/RektWolfNFT.sol:RektWolfNFT" [deployed address]
To enable the transfer of NFT's fron one chain to another run below:
npx hardhat --network [from chain] rektWolfSetTrustedRemote --target-network [to chain]
Repeat above command line for all chains each other.
- To test the contract run the test scripts in the test folder
npx hardhat --network rinkeby RektWolfSetLedger --wallet-address [wallet address] --assign-token-list [token list, for example 1,2,3]
npx hardhat --network rinkeby RektWolfMintnpx hardhat --network rinkeby RektWolfOwnerOf --token-id 1
npx hardhat --network rinkeby RektWolfOwnerOf --token-id 2npx hardhat --network rinkeby RektWolfSend --target-network mumbai --token-id 1npx hardhat --network rinkeby RektWolfOwnerOf --token-id 1
npx hardhat --network mumbai RektWolfOwnerOf --token-id 1- set ledger in one-time.
npx hardhat --network rinkeby SetLedgerOneTime