Giter Club home page Giter Club logo

m-jawa-d / wagmi-rainbowkit Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 498 KB

this is react app use metamask and trustwallet buttons from rainbow toolkit and read and write contracts using wagmi react hooks & in rainbow-wagmi-web3.js branch its read and write contracts using web3.js

Home Page: https://rain-wagmi.netlify.app

HTML 10.46% CSS 6.46% JavaScript 83.08%
metamask rainbowkit react reactjs wagmi wagmi-hooks walletconnect web3 web3js

wagmi-rainbowkit's Introduction

Wagmi + RainbowKit + Web3.js Integration

This repository demonstrates the integration of RainbowKit for wallet connection and Wagmi for interacting with Ethereum smart contracts using React hooks. It has two branches:

  1. main: Uses RainbowKit and Wagmi hooks for both reading from and writing to contracts.
  2. rainbow-wagmi-web3.js: Uses RainbowKit for wallet connection and Web3.js for contract interactions, utilizing Wagmi client as a provider.

Branches

main

The main branch uses RainbowKit to connect to wallets such as MetaMask and Trust Wallet and leverages Wagmi React hooks for interacting with smart contracts.

Features

  • Connect wallets using RainbowKit.
  • Read from and write to Ethereum smart contracts using Wagmi hooks.
  • Easy integration with various Ethereum-based wallets.

rainbow-wagmi-web3.js

The rainbow-wagmi-web3.js branch uses RainbowKit to connect to wallets and Web3.js for contract interactions. It uses the Wagmi client as a provider, enabling a streamlined approach to both reading and writing to contracts.

Features

  • Connect wallets using RainbowKit.
  • Use Web3.js for reading from and writing to Ethereum smart contracts.
  • Leverage Wagmi client for enhanced provider management.

Getting Started

To get started with this project, follow these steps:

Prerequisites

  • Node.js and npm installed on your local machine.
  • A modern web browser to view the app.

Installation

Clone the repository and navigate to the desired branch:

git clone https://github.com/m-Jawa-d/wagmi-rainbowkit.git
cd wagmi-rainbowkit
git checkout main # or rainbow-wagmi-web3.js
npm install

Running the App Start the development server:

npm start

Open your web browser and navigate to http://localhost:3000 to see the app in action.

Usage

Connecting Wallet

  1. Click on the "Connect Wallet" button.
  2. Select your preferred wallet (e.g., MetaMask, WalletConnect).
  3. Approve the connection in your wallet.

Interacting with Contracts

main Branch

  • Reading Data: Use Wagmi hooks to read data from contracts.
  • Writing Data: Use Wagmi hooks to send transactions and interact with contracts.

rainbow-wagmi-web3.js Branch

  • Reading Data: Use Web3.js to call contract methods.
  • Writing Data: Use Web3.js to send transactions and interact with contracts, using Wagmi client as a provider.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

Acknowledgments

A star to this repo would be great .

wagmi-rainbowkit's People

Contributors

m-jawa-d avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.