Short Description: A decentralized platform for artist pop-up events, enabling artists to mint NFTs for their physical artwork and attendees to collect digital assets with exclusive content
The Artist Pop-Up NFT Platform is an innovative decentralized application that connects artists, attendees, and event organizers by combining physical pop-up art events with digital NFT technology. This platform allows artists to showcase their artwork and create NFTs that represent their pieces, giving collectors and attendees the opportunity to own unique digital collectibles linked to exclusive content. Using MetaMask, users can securely connect and interact with the platform, including minting new NFTs, transferring ownership, and accessing special content.
Revised Replit Instructions for Artist Pop-Up Event with NFT Integration
We’re simplifying the process for developing your artist pop-up event application, focusing on security, user experience, and reducing complexity by leveraging MetaMask for all user interactions—including admins, artists, and attendees. Here’s a comprehensive guide to set up and deploy your app on Replit, incorporating what we’ve learned so far.
Step 1: Set Up the Replit Project
Create a New Replit Project:
artist-popup-nft
.Install Required Dependencies:
npm install @openzeppelin/contracts ethers dotenv hardhat web3 @walletconnect/client lit-js-sdk
Add Environment Variables:
SKALE_ENDPOINT
: Endpoint URL for SKALE network (e.g., https://testnet.skalenodes.com/v1/giant-half-dual-testnet
).NFT_CONTRACT_ADDRESS
: The address of the deployed NFT contract.Step 2: Hardhat Local Deployment for Smart Contract
Write the NFT Smart Contract:
ArtistPopupNFT.sol
that uses OpenZeppelin's ERC721 standards.Deploy the Contract Using Hardhat:
hardhat.config.js
to point to the SKALE testnet.npx hardhat run scripts/deploy.js --network skale
NFT_CONTRACT_ADDRESS
).Step 3: Implement MetaMask Wallet Interactions
Add MetaMask Login Functionality:
main.js
to connect to MetaMask for all blockchain interactions.connectWallet()
function to prompt users to connect their MetaMask wallet:
async function connectWallet() {
if (typeof window.ethereum !== 'undefined') {
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
console.log("Connected account:", accounts[0]);
} else {
alert("MetaMask is not installed. Please install it to continue.");
}
}
Use MetaMask for Admin and User Actions:
Step 4: Build a Unified Dashboard
Create a Role-Based Dashboard (dashboard.html
):
Show/Hide Features Based on Role:
main.js
to determine the user role based on wallet address.async function checkAdminStatus() {
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
const userAddress = accounts[0];
// Assuming you have a smart contract method to verify admin status
const isAdmin = await adminContract.methods.isAdmin(userAddress).call();
if (isAdmin) {
document.getElementById("admin-controls").style.display = "block";
}
}
Step 5: Exclusive Content Using Lit Protocol
Set Up Exclusive Content Encryption:
Front-End Interaction:
exclusive_content.html
, provide an “Unlock Exclusive Content” button that connects to MetaMask for verification.Step 6: Testing and Deployment on Replit
Test the Interaction Flow:
Deploy on Replit:
Step 7: No API Required for Sign Protocol
Key Security Practices
Summary The entire app—including Admin, Artist, and Attendee roles—operates securely using MetaMask for authentication and blockchain transactions. Hosting on Replit is focused on the front-end, while smart contracts are managed securely using Hardhat and MetaMask to ensure a consistent, user-friendly experience without compromising security.