Download script.js from penguza/web3-minting-platform-with-rainbowkit: direct link, hf CLI and curl.
- Browser
- Download file 2.09 kB
-
https://huggingface.co/spaces/penguza/web3-minting-platform-with-rainbowkit/resolve/main/script.js
- Command line
-
hf download hf://spaces/penguza/web3-minting-platform-with-rainbowkit/script.js
-
curl -L -o script.js https://huggingface.co/spaces/penguza/web3-minting-platform-with-rainbowkit/resolve/main/script.js
2.09 kB
| import { ConnectButton } from "@rainbow-me/rainbowkit"; | |
| import { WagmiConfig, createConfig, configureChains } from 'wagmi'; | |
| import { publicProvider } from 'wagmi/providers/public'; | |
| import { RainbowKitProvider, getDefaultWallets } from '@rainbow-me/rainbowkit'; | |
| import { mainnet, polygon } from 'wagmi/chains'; | |
| import { createRoot } from 'react-dom/client'; | |
| // Configure chains and providers | |
| const { chains, publicClient, webSocketPublicClient } = configureChains( | |
| [mainnet, polygon], | |
| [publicProvider()] | |
| ); | |
| // Set up connectors | |
| const { connectors } = getDefaultWallets({ | |
| appName: '430x Minting App', | |
| projectId: 'YOUR_WALLETCONNECT_PROJECT_ID', | |
| chains | |
| }); | |
| // Create wagmi client | |
| const config = createConfig({ | |
| autoConnect: true, | |
| connectors, | |
| publicClient, | |
| webSocketPublicClient, | |
| }); | |
| // Main App component | |
| function App() { | |
| return ( | |
| <div className="min-h-screen bg-gradient-to-br from-indigo-950 via-purple-900 to-indigo-800 text-white flex flex-col"> | |
| <header className="flex justify-between items-center p-6"> | |
| <h1 className="text-2xl font-bold tracking-wide">430x</h1> | |
| <ConnectButton showBalance={false} accountStatus="address" /> | |
| </header> | |
| <main className="flex flex-col items-center justify-center flex-grow text-center px-6"> | |
| <h2 className="text-5xl font-bold mb-4">Mint Your Future with 430x</h2> | |
| <p className="text-lg opacity-80 mb-8"> | |
| Secure. Fast. Transparent. The next generation of crypto minting. | |
| </p> | |
| <button className="px-8 py-3 rounded-full bg-gradient-to-r from-indigo-500 to-purple-500 font-semibold hover:opacity-90 transition"> | |
| Mint Now | |
| </button> | |
| </main> | |
| <footer className="text-center py-4 opacity-70"> | |
| © 2025 430x — Built with ❤️ on Web3 | |
| </footer> | |
| </div> | |
| ); | |
| } | |
| // Render the app | |
| const container = document.getElementById('root'); | |
| const root = createRoot(container); | |
| root.render( | |
| <WagmiConfig config={config}> | |
| <RainbowKitProvider chains={chains}> | |
| <App /> | |
| </RainbowKitProvider> | |
| </WagmiConfig> | |
| ); | |