Lotto App - pick the 3 winning numbers and win the jackpot
Developed by @pcashpeso
Contracts can be viewed at https://polygonscan.com/address/0x83fd9423A512356C9234227c650AF5040AedF126#code
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
To learn more about this stack, take a look at the following resources:
- RainbowKit Documentation - Learn how to customize your wallet connection flow.
- wagmi Documentation - Learn how to interact with Ethereum.
- Next.js Documentation - Learn how to build a Next.js application.
You can check out the RainbowKit GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.
import '../styles/globals.css'; import '@rainbow-me/rainbowkit/styles.css'; import { getDefaultWallets, RainbowKitProvider } from '@rainbow-me/rainbowkit'; import type { AppProps } from 'next/app'; import { configureChains, createConfig, WagmiConfig } from 'wagmi'; import {arbitrum,polygon,polygonMumbai, sepolia, localhost, baseGoerli} from 'wagmi/chains'; import { publicProvider } from 'wagmi/providers/public'; import { baseMainnet } from './baseMainnet'; // Import the baseMainnet chain object
const { chains, publicClient, webSocketPublicClient } = configureChains( [ polygon,sepolia,baseGoerli,baseMainnet, ...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true' ? [localhost] : []), ], [publicProvider()] );
const { connectors } = getDefaultWallets({ appName: 'lotto', projectId: '344e3a85b8be6680d32e6277a07df8ef', chains, });
const wagmiConfig = createConfig({ autoConnect: true, connectors, publicClient, webSocketPublicClient, });
function MyApp({ Component, pageProps }: AppProps) { return ( <Component {...pageProps} /> ); }
export default MyApp;