<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Developers Forum for XinFin XDC Network: jurjees ahamed</title>
    <description>The latest articles on Developers Forum for XinFin XDC Network by jurjees ahamed (@jurjeesahamed).</description>
    <link>https://www.xdc.dev/jurjeesahamed</link>
    <image>
      <url>https://www.xdc.dev/images/RMxcfSqToZyipUn7szgwOXu_v_7onCzOHLawSKnIDc4/rs:fill:90:90/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL3VzZXIvcHJv/ZmlsZV9pbWFnZS8x/NDkvNmUyY2IwODYt/NDQxYi00NDNhLWI3/NDgtNjEyMjZiNDll/MTNlLnBuZw</url>
      <title>Developers Forum for XinFin XDC Network: jurjees ahamed</title>
      <link>https://www.xdc.dev/jurjeesahamed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.xdc.dev/feed/jurjeesahamed"/>
    <language>en</language>
    <item>
      <title>Dapp Boilerplate for XDC COE (Front End Integration)</title>
      <dc:creator>jurjees ahamed</dc:creator>
      <pubDate>Thu, 21 Sep 2023 08:50:06 +0000</pubDate>
      <link>https://www.xdc.dev/jurjeesahamed/dapp-boilerplate-for-xdc-coe-front-end-integration-5ee7</link>
      <guid>https://www.xdc.dev/jurjeesahamed/dapp-boilerplate-for-xdc-coe-front-end-integration-5ee7</guid>
      <description>&lt;h2&gt;
  
  
  What is Frontend and why we need in DAPP ?
&lt;/h2&gt;

&lt;p&gt;Frontend, often referred to as the "front end," is the part of a software application or website that users directly interact with. It's the user interface (UI) and user experience (UX) component of an application, and it encompasses all the elements that users can see, touch, click, and interact with on their screens.&lt;/p&gt;

&lt;p&gt;Frontend in a decentralized application (DApp) refers to the user interface and user experience layer of the application that users directly interact with. It's essential in DApps to provide a user-friendly interface for users to access and interact with the blockchain-based smart contracts and decentralized features. The frontend ensures that users, even those without technical expertise, can easily engage with the DApp, view blockchain data, submit transactions, and manage their digital assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  To Create the Front End for a DAPP what  are the knowledge you need before staring frontend for an application.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTML -&amp;gt; Design the layout&lt;/strong&gt; &lt;br&gt;
Tutorial Link :(&lt;a href="https://www.w3schools.com/html/default.asp"&gt;https://www.w3schools.com/html/default.asp&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CSS -&amp;gt; To add style to your application&lt;/strong&gt; &lt;br&gt;
Tutorial Link :(&lt;a href="https://www.w3schools.com/css/default.asp"&gt;https://www.w3schools.com/css/default.asp&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JS (Javascript) -&amp;gt; for the bussiness logic or maniplulation&lt;/strong&gt;&lt;br&gt;
Tutorial Link :(&lt;a href="https://www.w3schools.com/js/default.asp"&gt;https://www.w3schools.com/js/default.asp&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.&lt;strong&gt;Bootstrap - UI Framework easily to develop fast and responsive website.&lt;/strong&gt;&lt;br&gt;
Tutorial Link :(&lt;a href="https://www.w3schools.com/bootstrap5/index.php"&gt;https://www.w3schools.com/bootstrap5/index.php&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Above are basic things to develop the web application,In the real time product companies are prefferd their app to develop by  using the framework. Ex: React,Next JS,Laravel etc...&lt;/p&gt;

&lt;p&gt;Our Boilerplate is developed using &lt;strong&gt;React&lt;/strong&gt; JS framework. &lt;strong&gt;React&lt;/strong&gt; is JS based UI library provides developer easily to create the frontend application with help of reuse the component and pre defined library predefined library from NPM (&lt;a href="https://www.npmjs.com/"&gt;https://www.npmjs.com/&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React Js Tutorial Video : &lt;a href="https://www.youtube.com/watch?v=SqcY0GlETPk"&gt;https://www.youtube.com/watch?v=SqcY0GlETPk&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;INSTALLATION REQUIRED&lt;/strong&gt;&lt;br&gt;
  Before run the boilerplate DAPP you need to install below things your System&lt;br&gt;
  &lt;strong&gt;Node JS&lt;/strong&gt; -&amp;gt; &lt;a href="https://nodejs.org/en/download"&gt;https://nodejs.org/en/download&lt;/a&gt;&lt;br&gt;
  &lt;strong&gt;GIT&lt;/strong&gt; -&amp;gt; &lt;a href="https://kinsta.com/knowledgebase/install-git/"&gt;https://kinsta.com/knowledgebase/install-git/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to install &amp;amp; use React boilerplate DAPP&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  git clone https://github.com/GoPlugin/xdc-coe-boilerplate.git

  cd xdc-coe-boilerplate 

  npm install 

  npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NPM Package used in Boilerplate&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/react-solidity-web3-v2"&gt;https://www.npmjs.com/package/react-solidity-web3-v2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Steps to integrate and intract with the blockchain smart contract *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After successfull deployment of the smart contract you have to get ABI and Contract address from remix will needed later steps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's deep dive in to the code&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Connect Your Wallet&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const instance = await connectWallet(connectOptions);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2.&lt;strong&gt;Create Web3 Provider&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { provider, signer } = await createWeb3Provider(instance);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Provider&lt;/strong&gt; - Act as the bridge between your application to blockchain network&lt;br&gt;
&lt;strong&gt;Signer&lt;/strong&gt; - Send signed transactions to the Ethereum Network to execute state changing operations. (For Write Operation)&lt;br&gt;
3.&lt;strong&gt;Create Contract Instance&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const Contract  = await createContractInstance(&amp;lt;CONTRACT_ADDRESS&amp;gt;, &amp;lt;ABI&amp;gt;, signer);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.&lt;strong&gt;Invoke Contract Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Write the Transaction :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    var delayTxn = await executeTransaction(Contract, provider, 'functionname', [inputa,inputb]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Get the Date from Smart contract :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    let balance = await queryData(contract, provider, 'balanceOf', [input]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>xdc</category>
      <category>coe</category>
      <category>plugin</category>
      <category>dapp</category>
    </item>
    <item>
      <title>XDC Transaction Status Checker NPM Package</title>
      <dc:creator>jurjees ahamed</dc:creator>
      <pubDate>Fri, 27 Jan 2023 19:57:28 +0000</pubDate>
      <link>https://www.xdc.dev/jurjeesahamed/xdc-transaction-status-checker-npm-package-fao</link>
      <guid>https://www.xdc.dev/jurjeesahamed/xdc-transaction-status-checker-npm-package-fao</guid>
      <description>&lt;p&gt;Hello XDC community,today i am come up with the new npm package to check the status of the xdc transaction  with the simple steps.&lt;/p&gt;

&lt;p&gt;For Easy Integration checkout below npm package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/xdc-txn-status-checker"&gt;https://www.npmjs.com/package/xdc-txn-status-checker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check out the list of steps to integrate status checker:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install xdc-txn-status-checker --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Usage&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//For React
import {statusChecker} from 'xdc-txn-status-checker';

//For Nodejs
const {statusChecker} = require('xdc-txn-status-checker');

statusChecker(["0x025f567bbfb962f960a72af418088021f7b8f55b12ba7c3b493188ad4430d267", "0xb511732d5000f5d227994ae69905bca5a833df4a20107b43a7e238dfc75d6f5b"], "apothem")
.then(result=&amp;gt;{
    console.log("output",result)
}).catch(err=&amp;gt;{
    console.log("err",err)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;br&gt;
Status Checker needs two parameter first one is transaction array and another one is network type both of them are mandatory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Type&lt;/strong&gt; - mainnet,apothem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Result&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
{
    "txnHash": "0x025f567bbfb962f960a72af418088021f7b8f55b12ba7c3b493188ad4430d267",
    "Status": true
  },
  {
    "txnHash": "0xb511732d5000f5d227994ae69905bca5a833df4a20107b43a7e238dfc75d6f5b",
    "Status": true
  }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>xdc</category>
      <category>transaction</category>
      <category>npm</category>
      <category>pli</category>
    </item>
    <item>
      <title>Accept XDC and XRC20 based tokens as payment methods in website or web application with Ease</title>
      <dc:creator>jurjees ahamed</dc:creator>
      <pubDate>Tue, 08 Nov 2022 20:59:27 +0000</pubDate>
      <link>https://www.xdc.dev/jurjeesahamed/accept-xdc-and-xrc20-based-tokens-as-payment-methods-in-website-or-web-application-with-ease-3799</link>
      <guid>https://www.xdc.dev/jurjeesahamed/accept-xdc-and-xrc20-based-tokens-as-payment-methods-in-website-or-web-application-with-ease-3799</guid>
      <description>&lt;p&gt;Hello XDC community,today i am come up with the solution to accept &lt;strong&gt;XDC and XRC20&lt;/strong&gt;  based tokens as payment method any website like ecommerce,hotel booking,online payment,... etc  with the simple steps.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/fNdJ67CZNUY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Get your payment instantly in your wallet address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This Pakage Support Web3modal Walletconnect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For Easy Integration checkout below npm package.&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/pli-pay"&gt;https://www.npmjs.com/package/pli-pay&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the package currently supports &lt;strong&gt;XDC and PLI&lt;/strong&gt; token only. In coming up days more tokens will be supported.&lt;/p&gt;

&lt;p&gt;Check out the list of steps to integrate payment method:&lt;/p&gt;

&lt;p&gt;Create sample react app by following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app sample-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install neccessary Dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install pli-pay --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just install one package it takes care all the dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Paypli from 'pli-pay'
import 'pli-pay/dist/index.css'

function App() {
  return &amp;lt;Paypli
    chainId={50}
    paymethod={"XDC"}
    fiatcurrency={"usd"}
    style={`apple_pay_button apple_pay_button_black`}
    receiverAddress={"0x117c691d76c1d9c68e3709a87f7d496097f2b56f"}
    amount={"1"}
    onSuccess={(data) =&amp;gt; console.log("onSuccess", data)}
    onFailure={(data) =&amp;gt; console.log("onFailure", data)}
    onError={(data) =&amp;gt; console.log("onError", data)}
  /&amp;gt;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use Paypli component wherever you want in your application.This package supports  currency conversion  to convert fiat currency to crypto currency.&lt;/p&gt;

&lt;p&gt;No need to do calculate any conversion in your application.Just pass &lt;strong&gt;amount,paymethod and fiatcurrency&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Receiver address must be valid XDC Address but replace xdc to 0x in your application.&lt;/p&gt;

&lt;p&gt;You can easily capture the return response for onSuccess, onFailure and onError functions.&lt;/p&gt;

&lt;p&gt;You can use own custom style class for payment button&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Only coingecko support fiat currencies accepted for conversion.&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Success Response Object :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "hash": "0x6ff4af9d1ed0545f43de7827360385b03b1d8105fa061d96a37e0e361499728f",
    "success": true,
    "fiatcurrency": "usd",
    "amount": "1",
    "paymethod": "XDC",
    "receiverAddress": "0x117c691d76c1d9c68e3709a87f7d496097f2b56f"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Failure Response Object :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "hash": "0x6ff4af9d1ed0545f43de7827360385b03b1d8105fa061d96a37e0e361499728f",
    "success": false,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;You can store it in your application Database for future reference.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding!!!&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>pli</category>
      <category>paymentgateway</category>
      <category>xrc20</category>
    </item>
    <item>
      <title>Wallet Connect RPC URL Issue</title>
      <dc:creator>jurjees ahamed</dc:creator>
      <pubDate>Mon, 10 Oct 2022 07:17:59 +0000</pubDate>
      <link>https://www.xdc.dev/jurjeesahamed/wallet-connect-rpc-url-issue-558l</link>
      <guid>https://www.xdc.dev/jurjeesahamed/wallet-connect-rpc-url-issue-558l</guid>
      <description>&lt;p&gt;Hi Team -&lt;br&gt;
xdcpayrpc.blocksscan.io is resulting "CORS" issue, but when we add "request header" manually, then it is working fine.&lt;/p&gt;

&lt;p&gt;Can you please check to get a permanent fix?&lt;/p&gt;

&lt;p&gt;ERROR : Access to XMLHttpRequest at '&lt;a href="https://xdcpayrpc.blocksscan.io/"&gt;https://xdcpayrpc.blocksscan.io/&lt;/a&gt;' from origin '&lt;a href="https://172.16.116.158:3000"&gt;https://172.16.116.158:3000&lt;/a&gt;' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.&lt;/p&gt;

</description>
      <category>blockscan</category>
      <category>rpcurl</category>
      <category>walletconnect</category>
      <category>xdc</category>
    </item>
    <item>
      <title>How to connect XDC Pay wallet (chrome extension) with Web3Modal</title>
      <dc:creator>jurjees ahamed</dc:creator>
      <pubDate>Tue, 27 Sep 2022 16:47:29 +0000</pubDate>
      <link>https://www.xdc.dev/jurjeesahamed/how-to-connect-xdc-pay-wallet-chrome-extension-with-web3modal-5gfh</link>
      <guid>https://www.xdc.dev/jurjeesahamed/how-to-connect-xdc-pay-wallet-chrome-extension-with-web3modal-5gfh</guid>
      <description>&lt;p&gt;In our recent pliblockathon 2022 (hackathon) lot of people facing the issue to connect xdc pay with Web3modal.so i come up with the solution.&lt;/p&gt;

&lt;p&gt;For Easy Integration checkout below npm package. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/xdcpay-web3modal"&gt;https://www.npmjs.com/package/xdcpay-web3modal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check out the list of steps to manual integration XDC pay in web3modal:&lt;/p&gt;

&lt;p&gt;Create sample react app by following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app xdcpay-web3modal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install neccessary Dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install web3modal @metamask/detect-provider @walletconnect/web3-provider ethers --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import following packages in App.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Web3Modal from 'web3modal';
import WalletConnect from "@walletconnect/web3-provider";
import detectEthereumProvider from '@metamask/detect-provider'
const { ethers } = require('ethers')


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Declare Web3Modal and then add the provider&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const web3Modal = new Web3Modal({
                cacheProvider: true,
                disableInjectedProvider: false,
                providerOptions: {
                    walletconnect: {
                        package: WalletConnect, // required
                        options: {
                            infuraId: "", // Required
                            network: "mainnet",
                            qrcodeModalOptions: {
                                mobileLinks: ["rainbow", "metamask", "argent", "trust", "imtoken", "pillar"]
                            }
                        }
                    },
                },
//Add XDC Pay Custom provider here check in  next step.
            });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add custom provider to connect XDC pay in provider Options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             'custom-xdc': {
                        display: {
                            name: 'XDC Pay',
                            logo: 'https://s2.coinmarketcap.com/static/img/coins/64x64/2634.png',
                            description: 'Connect with XDC Pay'
                        },
                        package: detectEthereumProvider,
                        connector: async (_detectEthereumProvider) =&amp;gt; {
                            const provider = await _detectEthereumProvider();
                            console.log("provider", provider)
                            await provider.enable();
                            return provider;
                        }
                    },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write one function to connect the wallet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      const onConnect = async () =&amp;gt; {
        try {
            const instance = await web3Modal.connect();
            const providerConnect = new ethers.providers.Web3Provider(instance);
            setProvider(providerConnect)

        } catch (err) {
            console.log("err", err)
        }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add one more sample function to send XDC to test web3modal working fine&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   const sendXdc = async () =&amp;gt; {
        const signer = provider.getSigner();
        const address = await signer.getAddress();
        setAddress(address)
        console.log("Address", address)
        // 0xb22E6413893a796714132a309cD7D4eC2aC4587b
        const params = [{
            from: address,
            to: "0x117c691d76c1d9c68e3709a87f7d496097f2b56f",
            value: ethers.utils.parseUnits('1', 'ether').toHexString()
        }];

        const transactionHash = await provider.send('eth_sendTransaction', params)
        console.log('transactionHash is ' + transactionHash);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note : Disable metamask in chrome if enabled.&lt;/p&gt;

&lt;p&gt;Complete App.js Code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react';
import Web3Modal from 'web3modal';
import WalletConnect from "@walletconnect/web3-provider";
import detectEthereumProvider from '@metamask/detect-provider'
import { ethers } from 'ethers';

const App = () =&amp;gt; {

    const [provider, setProvider] = useState(null)
    const [address, setAddress] = useState(null)

    const web3Modal = new Web3Modal({
        cacheProvider: true,
        disableInjectedProvider: true,
        providerOptions: {
            walletconnect: {
                package: WalletConnect, // required
                options: {
                    infuraId: "", // Required
                    network: "mainnet",
                    qrcodeModalOptions: {
                        mobileLinks: ["rainbow", "metamask", "argent", "trust", "imtoken", "pillar"]
                    }
                }
            },
            'custom-xdc': {
                display: {
                    name: 'XDC Pay',
                    logo: 'https://s2.coinmarketcap.com/static/img/coins/64x64/2634.png',
                    description: 'Connect with XDC Pay'
                },
                package: detectEthereumProvider,
                connector: async (_detectEthereumProvider) =&amp;gt; {
                    const provider = await _detectEthereumProvider();
                    console.log("provider", provider)
                    await provider.enable();
                    return provider;
                }
            },
        },
    });

    const onConnect = async () =&amp;gt; {
        try {
            const instance = await web3Modal.connect();
            const providerConnect = new ethers.providers.Web3Provider(instance);
            setProvider(providerConnect)

        } catch (err) {
            console.log("err", err)
        }
    }

    const sendXdc = async () =&amp;gt; {
        const signer = provider.getSigner();
        const address = await signer.getAddress();
        setAddress(address)
        console.log("Address", address)
        // Acccounts now exposed
        const params = [{
            from: address,
            to: "0x117c691d76c1d9c68e3709a87f7d496097f2b56f",
            value: ethers.utils.parseUnits('1', 'ether').toHexString()
        }];

        const transactionHash = await provider.send('eth_sendTransaction', params)
        console.log('transactionHash is ' + transactionHash);
    }
    return (
        &amp;lt;div align="center"&amp;gt;
            &amp;lt;h3&amp;gt;How to connect XDC Pay wallet (chrome extension) with  Web3Modal&amp;lt;/h3&amp;gt;



            {!provider &amp;amp;&amp;amp; &amp;lt;button type='button' onClick={onConnect}&amp;gt;Connect&amp;lt;/button&amp;gt;}
            {provider &amp;amp;&amp;amp; &amp;lt;button type='button' onClick={sendXdc}&amp;gt;Send XDC&amp;lt;/button&amp;gt;}

        &amp;lt;/div&amp;gt;
    );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the demo video link:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qIKFdgdNAe4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Happy Coding!!!&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>web3modal</category>
      <category>web3</category>
      <category>pli</category>
    </item>
  </channel>
</rss>
