Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

3engine/LootboxContract

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

AltStyle によって変換されたページ (->オリジナル) /