Chris-Kag / Rainbow-kit-SE

A Rainbow๐ŸŒˆ x Scaffold-Eth๐Ÿ—๏ธ branch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rainbow๐ŸŒˆ x Scaffold-Eth๐Ÿ—๏ธ

๐ŸŒˆ๐Ÿ—๏ธโœจ

ezgif-2-72444e1982

Typescript

This is the typescript repo of scaffold-eth and it uses hardhat and vite. The directories that you'll use are:

packages/vite-app-ts/
packages/hardhat-ts/

Quick Start

Running the app

  1. install your dependencies

    yarn install
  2. start a hardhat node

    yarn chain
  3. run the app, open a new command prompt

    # build hardhat & external contracts types
    yarn contracts:build 
    # deploy your hardhat contracts
    yarn deploy
    # start the app
    yarn start 
  4. other commands

    # rebuild all contracts, incase of inconsistent state
    yarn contracts:rebuild
    # run hardhat commands for the workspace, or see all tasks
    yarn hardhat 'xxx'
    # run subgraph commands for the workspace
    yarn subgraph 'xxx'

Install rainbow-kit

  1. Add the dependencies

    yarn add @rainbow-me/rainbowkit@^0.2.0 wagmi@^0.4.2
  2. Configure in App.tsx

    import "@rainbow-me/rainbowkit/styles.css";
    import { configureChains } from 'wagmi';

    ////

    import { alchemyProvider } from 'wagmi/providers/alchemy';
    const { chains, provider } = configureChains(
    [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
    [alchemyProvider({ alchemyId: process.env.ALCHEMY_ID })]

    OR

    import { infuraProvider } from 'wagmi/providers/infura';
    const { chains, provider } = configureChains(
    [chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum],
    [infuraProvider({ infuraId: process.env.INFURA_ID })]

    OR

    import { publicProvider } from 'wagmi/providers/public';
    const { chains, provider } = configureChains(
    [chain.mainnet, chain.polygon],
    [publicProvider()]

    //////

    import {
    getDefaultWallets,
    RainbowKitProvider,
    darkTheme
    } from "@rainbow-me/rainbowkit";
    import { chain, createClient, WagmiConfig } from "wagmi";
    
    const { connectors } = getDefaultWallets({
      appName: "My RainbowKit App",
      chains
    });
    
    const wagmiClient = createClient({
      autoConnect: true,
      connectors,
      provider
    });
  3. Wrap your app

const App = () => {
   return (
      <WagmiConfig client={wagmiClient}>...</WagmiConfig>
  );
};

And you're good to go!

Screenshot_6

Overview

Everything you need to build on Ethereum! ๐Ÿš€ Quickly experiment with Solidity using a frontend that adapts to your smart contract:

image

  • ๐Ÿ” Edit your smart contract YourContract.sol in packages/hardhat-ts/contracts
  • ๐Ÿ“ Edit your frontend MainPage.tsx in packages/vite-app-ts/src
  • ๐Ÿ’ผ Edit your deployment scripts in packages/hardhat-ts/deploy
  • ๐Ÿ“ฑ Open http://localhost:3000 to see the app
  • ๐Ÿ‘ท๐Ÿฝโ€โ™‚๏ธ run yarn hardhat to get a list of all the tasks. Run yarn hardhat taskname to run the task.





Guides

Documentation

๐Ÿƒ๐Ÿ’จ Speedrun Ethereum

Register as a builder here and start on some of the challenges and build a portfolio.

๐Ÿ Make sure to click on the typescript tab!





More Information!

๐Ÿ“š Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

Eth-hooks documentation is here. Learn how to use the contexts here.

๐Ÿ”ญ Learning Solidity

Read the docs: https://docs.soliditylang.org

Go through each topic from solidity by example editing YourContract.sol in ๐Ÿ— scaffold-eth

๐Ÿ›  Buidl

Check out all the active branches, open issues, and join/fund the ๐Ÿฐ BuidlGuidl!

Follow the full Ethereum Speed Run

๐Ÿ’ฌ Support Chat

Join the telegram support chat ๐Ÿ’ฌ to ask questions and find others building with ๐Ÿ— scaffold-eth!

๐Ÿ™๐Ÿฝ Support us!

Please check out our Gitcoin grant too!

๐Ÿ” P.S.About keys

You need an RPC and API keys for testnets and production deployments, create an Alchemy account and replace the value of ALCHEMY_KEY = xxx in packages/vite-app-ts/.env with your new keys.

About

A Rainbow๐ŸŒˆ x Scaffold-Eth๐Ÿ—๏ธ branch

License:MIT License


Languages

Language:TypeScript 83.0%Language:Shell 6.3%Language:JavaScript 4.9%Language:Solidity 1.9%Language:Dockerfile 1.6%Language:HTML 1.2%Language:CSS 0.8%Language:Less 0.4%