Skip to content

Create and manage NFT LootBoxes and Items with a key mechanism. Built using Hardhat🥡

License

Notifications You must be signed in to change notification settings

3engine/LootboxContract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LootBox and Item Contracts

With this project, you can create and manage LootBoxes and Items, which are NFTs (Non-Fungible Tokens). Additionally, a key mechanism is implemented to facilitate unlocking these LootBoxes.

This solution is built using Hardhat.

Deployment Instructions

To deploy the contracts locally, follow these steps:

  1. Install the dependencies:
npm install
  1. Compile the contracts:
npx hardhat compile
  1. Deploy using:
npx hardhat run scripts/deploy.js

Deploying to Remote Networks

If you wish to deploy the contracts to remote networks, such as mainnet or any testnets, you'll need to update your hardhat.config.js.

For demonstration, let's consider deploying to the Polygon Network:

Add the following network configuration to hardhat.config.js:

module.exports = {
  networks: {
    polygon: {
      url: 'https://polygon-rpc.com/',
      accounts: [
        `${PRIVATE_KEY}`,
      ],
    }
  }
};

Now, deploy to the specified network:

npx hardhat run scripts/deploy.js --network polygon

Running Tests

To ensure the robustness of your smart contracts, always test them. Execute tests using:

npx hardhat test

About

Create and manage NFT LootBoxes and Items with a key mechanism. Built using Hardhat🥡

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published