This repository contains a Solidity project, LuksoCloneX, a digital asset based on the LSP8 Identifiable Digital Asset standard and implements reentrancy security measures.
This project uses:
- @lukso/lsp-smart-contracts
- @nomiclabs/hardhat-ethers
- @nomiclabs/hardhat-etherscan
- @openzeppelin/contracts
- dotenv
- hardhat
-
Clone this repository.
-
Install the dependencies by running
npm install
. -
Create a
.env
file at the root of your project and insert your Ethereum private key asPRIVATEKEY=<your-private-key>
.
The deployment script is located in scripts/deploy.js
.
Replace 'YOUR OWNER ADDRESS'
in const owner = 'YOUR OWNER ADDRESS';
with the Ethereum address that will own the contract.
Run the deployment script by executing npx hardhat run scripts/deploy.js
.
The Hardhat configuration is located in hardhat.config.js
.
It currently includes three networks:
hardhat
: for local development and testing.testnet
: for deployment on the LUKSO test network.mainnet
: for deployment on the LUKSO main network.
Ensure the PRIVATEKEY
environment variable is correctly set for the respective network before deploying.
The contract features:
- A public and private mint function with specific prices and supply limits.
- Whitelisting of addresses for the private mint function.
- A predefined merkle root for verification of the minting address.
- Specific token ID type and base URI for LSP8 metadata.
- Assignment of the creator for LSP4 digital asset metadata.
For more information on LSP8 and LSP4 standards, please refer to LUKSO standards.
This contract is not audited. Use at your own risk. Always make sure to test on a testnet before deploying to a mainnet.