diff --git a/check_monad_nfts.js b/check_monad_nfts.js new file mode 100644 index 0000000..a915812 --- /dev/null +++ b/check_monad_nfts.js @@ -0,0 +1,69 @@ +const { ethers } = require('ethers'); + +async function checkMonadNFTs() { + const provider = new ethers.JsonRpcProvider('https://testnet-rpc.monad.xyz'); + const address = '0x99bd4bdd7a9c22e2a35f09a6bd17f038d5e5eb87'; + + console.log('Checking Monad address:', address); + + // Basic ERC721 ABI for checking + const erc721Abi = [ + 'function balanceOf(address owner) view returns (uint256)', + 'function tokenOfOwnerByIndex(address owner, uint256 index) view returns (uint256)', + 'function tokenURI(uint256 tokenId) view returns (string)', + 'function name() view returns (string)', + 'function symbol() view returns (string)', + 'function ownerOf(uint256 tokenId) view returns (address)' + ]; + + // Test contracts from SocialScan - let's try some common NFT contract addresses + const testContracts = [ + '0x35ec701d9d99c34417378742ba0aa568c65ec016', // Your original contract + '0x5FbDB2315678afecb367f032d93F642f64180aa3', // Common test contract + '0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0', // Common test contract + '0xe7f1725e7734ce288f8367e1bb143e90bb3f0512', // Common test contract + ]; + + for (const contractAddr of testContracts) { + try { + console.log(`\nChecking contract: ${contractAddr}`); + const contract = new ethers.Contract(contractAddr, erc721Abi, provider); + + const balance = await contract.balanceOf(address); + console.log(`Balance: ${balance.toString()}`); + + if (balance.toString() !== '0') { + console.log(`✅ Found ${balance} NFTs in contract ${contractAddr}`); + + try { + const name = await contract.name(); + const symbol = await contract.symbol(); + console.log(`Contract: ${name} (${symbol})`); + } catch (e) { + console.log('Could not get contract name/symbol'); + } + + // Try to get first few tokens + for (let i = 0; i < Math.min(parseInt(balance.toString()), 3); i++) { + try { + const tokenId = await contract.tokenOfOwnerByIndex(address, i); + console.log(`Token ${i}: ID ${tokenId.toString()}`); + + try { + const tokenURI = await contract.tokenURI(tokenId); + console.log(`Token URI: ${tokenURI}`); + } catch (e) { + console.log(`Could not get tokenURI for token ${tokenId}`); + } + } catch (e) { + console.log(`Could not get token at index ${i}: ${e.message}`); + } + } + } + } catch (error) { + console.log(`❌ Error checking contract ${contractAddr}: ${error.message}`); + } + } +} + +checkMonadNFTs().catch(console.error); diff --git a/misc.txt b/misc.txt new file mode 100644 index 0000000..c4ebaca --- /dev/null +++ b/misc.txt @@ -0,0 +1,229 @@ + {/* */} + {/* + */} + + {/*
*/} + {/*
*/} + {/*

+ Decentralized for Speed and Privacy +

*/} + + {/*
*/} + {/* Left side: Lock animation */} + {/*
+
+
+
*/} + + {/* Right side: Text content */} + {/*
+

+ Protected & Private +

+

+ Erebrus DVPN encrypts your connection, hides your activity, + and keeps speeds lightning fast. +

+
*/} + {/*
*/} + {/*
*/} + {/*
*/} + + {/* */} + + {/*
+ +
*/} \ No newline at end of file diff --git a/next.config.ts b/next.config.ts index 9490434..f25788e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,7 +2,14 @@ const nextConfig = { output: "standalone", images: { - domains: ["assets.aceternity.com"], + remotePatterns: [ + { + protocol: "https", + hostname: "assets.aceternity.com", + pathname: '/**', + } + ], + }, webpack: (config: { externals: string[] }) => { config.externals = config.externals || []; diff --git a/public/background-blur-1.png b/public/background-blur-1.png new file mode 100644 index 0000000..0972142 Binary files /dev/null and b/public/background-blur-1.png differ diff --git a/public/background-blur-2.png b/public/background-blur-2.png new file mode 100644 index 0000000..04314f5 Binary files /dev/null and b/public/background-blur-2.png differ diff --git a/public/background-blur-3.png b/public/background-blur-3.png new file mode 100644 index 0000000..a61c4e5 Binary files /dev/null and b/public/background-blur-3.png differ diff --git a/public/background.png b/public/background.png new file mode 100644 index 0000000..a7e53ef Binary files /dev/null and b/public/background.png differ diff --git a/public/carousel-bg.png b/public/carousel-bg.png new file mode 100644 index 0000000..0ee2083 Binary files /dev/null and b/public/carousel-bg.png differ diff --git a/public/decen.png b/public/decen.png new file mode 100644 index 0000000..4fed716 Binary files /dev/null and b/public/decen.png differ diff --git a/public/devices.png b/public/devices.png new file mode 100644 index 0000000..925e1ab Binary files /dev/null and b/public/devices.png differ diff --git a/public/dotter.png b/public/dotter.png new file mode 100644 index 0000000..ac2224a Binary files /dev/null and b/public/dotter.png differ diff --git a/public/fonts/Another-Xanadu.ttf b/public/fonts/Another-Xanadu.ttf new file mode 100644 index 0000000..3c62afc Binary files /dev/null and b/public/fonts/Another-Xanadu.ttf differ diff --git a/public/images/diamond.png b/public/images/diamond.png new file mode 100644 index 0000000..a2d9492 Binary files /dev/null and b/public/images/diamond.png differ diff --git a/public/images/flag-hover.png b/public/images/flag-hover.png new file mode 100644 index 0000000..3cfea5a Binary files /dev/null and b/public/images/flag-hover.png differ diff --git a/public/images/flag-shadow.png b/public/images/flag-shadow.png new file mode 100644 index 0000000..3279b76 Binary files /dev/null and b/public/images/flag-shadow.png differ diff --git a/public/images/flag.png b/public/images/flag.png new file mode 100644 index 0000000..5db1c91 Binary files /dev/null and b/public/images/flag.png differ diff --git a/public/images/flash-hover.png b/public/images/flash-hover.png new file mode 100644 index 0000000..c9c1a26 Binary files /dev/null and b/public/images/flash-hover.png differ diff --git a/public/images/flash-shadow.png b/public/images/flash-shadow.png new file mode 100644 index 0000000..5fe8dc0 Binary files /dev/null and b/public/images/flash-shadow.png differ diff --git a/public/images/flash.png b/public/images/flash.png new file mode 100644 index 0000000..a9ae138 Binary files /dev/null and b/public/images/flash.png differ diff --git a/public/images/lock-hover.png b/public/images/lock-hover.png new file mode 100644 index 0000000..d2a6828 Binary files /dev/null and b/public/images/lock-hover.png differ diff --git a/public/images/lock-shadow.png b/public/images/lock-shadow.png new file mode 100644 index 0000000..934b474 Binary files /dev/null and b/public/images/lock-shadow.png differ diff --git a/public/images/lock.png b/public/images/lock.png new file mode 100644 index 0000000..45fb8db Binary files /dev/null and b/public/images/lock.png differ diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000..f27b7a1 Binary files /dev/null and b/public/images/logo.png differ diff --git a/public/images/map-pin-hover.png b/public/images/map-pin-hover.png new file mode 100644 index 0000000..75ac0a2 Binary files /dev/null and b/public/images/map-pin-hover.png differ diff --git a/public/images/map-pin-shadow.png b/public/images/map-pin-shadow.png new file mode 100644 index 0000000..081a841 Binary files /dev/null and b/public/images/map-pin-shadow.png differ diff --git a/public/images/map-pin.png b/public/images/map-pin.png new file mode 100644 index 0000000..c2dd363 Binary files /dev/null and b/public/images/map-pin.png differ diff --git a/public/images/shield-hover.png b/public/images/shield-hover.png new file mode 100644 index 0000000..a115e60 Binary files /dev/null and b/public/images/shield-hover.png differ diff --git a/public/images/shield-shadow.png b/public/images/shield-shadow.png new file mode 100644 index 0000000..46a6a9b Binary files /dev/null and b/public/images/shield-shadow.png differ diff --git a/public/images/shield.png b/public/images/shield.png new file mode 100644 index 0000000..16d1895 Binary files /dev/null and b/public/images/shield.png differ diff --git a/public/images/world-background.png b/public/images/world-background.png new file mode 100644 index 0000000..559d1e2 Binary files /dev/null and b/public/images/world-background.png differ diff --git a/public/images/world.png b/public/images/world.png new file mode 100644 index 0000000..91899dd Binary files /dev/null and b/public/images/world.png differ diff --git a/public/mid-background-blur.png b/public/mid-background-blur.png new file mode 100644 index 0000000..8920d42 Binary files /dev/null and b/public/mid-background-blur.png differ diff --git a/public/recognition/eth-sea.png b/public/recognition/eth-sea.png new file mode 100644 index 0000000..89af59d Binary files /dev/null and b/public/recognition/eth-sea.png differ diff --git a/public/recognition/ivs.png b/public/recognition/ivs.png new file mode 100644 index 0000000..d5aa35a Binary files /dev/null and b/public/recognition/ivs.png differ diff --git a/public/recognition/radar-hack.png b/public/recognition/radar-hack.png new file mode 100644 index 0000000..95e2b9e Binary files /dev/null and b/public/recognition/radar-hack.png differ diff --git a/public/tralized.png b/public/tralized.png new file mode 100644 index 0000000..de69dd6 Binary files /dev/null and b/public/tralized.png differ diff --git a/src/app/api/monad-nfts/route.ts b/src/app/api/monad-nfts/route.ts new file mode 100644 index 0000000..f00d1d9 --- /dev/null +++ b/src/app/api/monad-nfts/route.ts @@ -0,0 +1,268 @@ +import { NextRequest, NextResponse } from "next/server"; +import { ethers } from "ethers"; +import axios from "axios"; +import { monadNftAbi } from "@/contracts/monadNftAbi"; + +// Use the complete Monad NFT ABI for proper contract interaction +const ERC721_ABI = monadNftAbi; + +// Known Monad NFT contracts - add real Monad testnet contract addresses here +const KNOWN_CONTRACTS = [ + "0x35ec701d9d99c34417378742ba0aa568c65ec016", // Your Erebrus NFT contract + // Add more actual Monad testnet contract addresses here as needed +]; + +interface NFTMetadata { + name?: string; + description?: string; + image?: string; + attributes?: Array<{ + trait_type: string; + value: string | number; + }>; +} + +interface NFTToken { + contractAddress: string; + tokenId: string; + name: string; + description: string; + image: string; + attributes: Array<{ + trait_type: string; + value: string | number; + }>; + type: string; +} + +async function fetchMetadata(uri: string): Promise { + try { + // Handle IPFS URLs + if (uri.startsWith("ipfs://")) { + uri = uri.replace("ipfs://", "https://ipfs.erebrus.io/ipfs/"); + } + + // Handle data URLs + if (uri.startsWith("data:application/json")) { + const jsonString = uri.split(",")[1]; + const decoded = Buffer.from(jsonString, "base64").toString(); + return JSON.parse(decoded); + } + + const response = await axios.get(uri, { + timeout: 10000, + headers: { + "User-Agent": "Erebrus-NFT-Fetcher/1.0", + }, + }); + + return response.data; + } catch (error) { + console.error("Failed to fetch metadata from:", uri, error); + return null; + } +} + +async function fetchNFTsFromContract( + provider: ethers.JsonRpcProvider, + contractAddress: string, + ownerAddress: string +): Promise { + try { + const contract = new ethers.Contract(contractAddress, ERC721_ABI, provider); + const nfts: NFTToken[] = []; + + // Get the balance of NFTs for this owner + const balance = await contract.balanceOf(ownerAddress); + const balanceNum = Number(balance); + + if (balanceNum === 0) { + return []; + } + + // Get contract name + let contractName = "Unknown Collection"; + try { + contractName = await contract.name(); + } catch (e) { + console.warn("Could not fetch contract name for", contractAddress); + } + + console.log( + `Contract ${contractAddress} has balance ${balanceNum} for owner ${ownerAddress}` + ); + + let nftsFetched = false; + + // Method 1: Try tokenOfOwnerByIndex (ERC721Enumerable) + try { + for (let i = 0; i < Math.min(balanceNum, 50); i++) { + const tokenId = await contract.tokenOfOwnerByIndex(ownerAddress, i); + const tokenIdStr = tokenId.toString(); + console.log(`Found token ID: ${tokenIdStr} at index ${i}`); + + let tokenURI = ""; + try { + tokenURI = await contract.tokenURI(tokenId); + console.log(`Token URI for ${tokenIdStr}: ${tokenURI}`); + } catch (e) { + console.warn(`Could not fetch tokenURI for token ${tokenIdStr}`); + continue; + } + + const metadata = await fetchMetadata(tokenURI); + const nft: NFTToken = { + contractAddress, + tokenId: tokenIdStr, + name: metadata?.name || `${contractName} #${tokenIdStr}`, + description: metadata?.description || "", + image: metadata?.image || "", + attributes: metadata?.attributes || [], + type: "MONAD-NFT", + }; + + nfts.push(nft); + nftsFetched = true; + } + } catch (enumerableError) { + console.log( + `Contract doesn't support tokenOfOwnerByIndex, using alternative method` + ); + + // Method 2: Check token IDs sequentially + console.log(`Checking token IDs 0-2000 for ${balanceNum} expected NFTs`); + + for ( + let tokenId = 0; + tokenId <= 2000 && nfts.length < balanceNum; + tokenId++ + ) { + try { + const owner = await contract.ownerOf(tokenId); + if (owner.toLowerCase() === ownerAddress.toLowerCase()) { + console.log(`Found owned token ID: ${tokenId}`); + + let tokenURI = ""; + let metadata = null; + + try { + tokenURI = await contract.tokenURI(tokenId); + if (tokenURI) { + metadata = await fetchMetadata(tokenURI); + } + } catch (e) { + console.warn(`Could not fetch metadata for token ${tokenId}`); + } + + const nft: NFTToken = { + contractAddress, + tokenId: tokenId.toString(), + name: metadata?.name || `${contractName} #${tokenId}`, + description: metadata?.description || `NFT from ${contractName}`, + image: metadata?.image || "/NFT_Icon.png", + attributes: metadata?.attributes || [], + type: "MONAD-NFT", + }; + + nfts.push(nft); + nftsFetched = true; + console.log(`Added NFT: ${nft.name}`); + } + } catch (ownerError) { + // Token doesn't exist, continue + if (tokenId % 500 === 0) { + console.log(`Checked up to token ID ${tokenId}...`); + } + continue; + } + } + } + + if (!nftsFetched && balanceNum > 0) { + console.warn( + `Could not fetch any NFTs from contract ${contractAddress} despite balance of ${balanceNum}` + ); + } + + return nfts; + } catch (error) { + console.error( + `Error fetching NFTs from contract ${contractAddress}:`, + error + ); + return []; + } +} + +export async function GET(request: NextRequest) { + try { + const { searchParams } = new URL(request.url); + const address = searchParams.get("address"); + + if (!address) { + return NextResponse.json( + { error: "Address parameter is required" }, + { status: 400 } + ); + } + + // Validate Ethereum address format + if (!ethers.isAddress(address)) { + return NextResponse.json( + { error: "Invalid Ethereum address format" }, + { status: 400 } + ); + } + + // Connect to Monad testnet + const provider = new ethers.JsonRpcProvider( + "https://testnet-rpc.monad.xyz" + ); + + const allNFTs: NFTToken[] = []; + + console.log( + `Checking ${KNOWN_CONTRACTS.length} contracts for address: ${address}` + ); + + // Fetch NFTs from each known contract + for (const contractAddress of KNOWN_CONTRACTS) { + try { + console.log(`Checking contract: ${contractAddress}`); + const contractNFTs = await fetchNFTsFromContract( + provider, + contractAddress, + address + ); + console.log( + `Found ${contractNFTs.length} NFTs in contract ${contractAddress}` + ); + allNFTs.push(...contractNFTs); + } catch (error) { + console.error( + `Failed to fetch NFTs from contract ${contractAddress}:`, + error + ); + continue; + } + } + + console.log(`Total NFTs found: ${allNFTs.length}`); + + return NextResponse.json({ + nfts: allNFTs, + total: allNFTs.length, + address: address, + network: "monad-testnet", + }); + } catch (error) { + console.error("Error in Monad NFT API:", error); + return NextResponse.json( + { + error: "Failed to fetch Monad NFTs", + details: error instanceof Error ? error.message : "Unknown error", + }, + { status: 500 } + ); + } +} diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx index 1df40f1..a3e05f6 100644 --- a/src/app/contact/page.tsx +++ b/src/app/contact/page.tsx @@ -42,13 +42,13 @@ const Contact = () => { /> -
-
-

+
+
+

Support Request Form

-
+