Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web3modal update #192

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/build/smart-contracts/verify/hardhat.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
},
etherscan: {
apiKey: {
klaytn: "unnecessary",
kairos: "unnecessary",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youngancient Thanks for your contribution.
Did you test it with explorer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did. My first step was to deploy a contract on kaia testnet (kairos) and then verify.
My hardhat config at first looked like this:

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

require('dotenv').config();

const config: HardhatUserConfig = {
  solidity: "0.8.20",
  networks: {
    // for testnet
    kairos: {
      url: process.env.VITE_KAIA_TESTNET_RPC_URL!,
      accounts: [process.env.PRIVATE_KEY!],
      // gasPrice: 100000000000,
    },
  },
  etherscan: {
    apiKey: {
      klaytn: "unnecessary",
    },
    customChains: [
      {
        network: "kairos",
        chainId: 1001,
        urls: {
          apiURL: "https://api-baobab.klaytnscope.com/api",
          browserURL: "https://kairos.kaiascope.com",
        },
      },
    ],
  },
};

export default config;

In the network object, the network name is "kairos" but in the etherscan apiKey obj, "klaytn" was there, so I had the bug which was fixed by changing klaytn to kairos.

The verified contract

},
customChains: [
{
Expand Down
14 changes: 7 additions & 7 deletions docs/build/tutorials/kaia-wallet-dapp-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ UI Libraries provide components for user interactions, like `ConnectWallet` comp

While most UI libraries have built-in support for Metamask, integrating Kaia Wallet is also easy since its [API](https://docs.kaia.io/references/json-rpc/kaia/account-created/) is built on [Metamask's](https://docs.metamask.io/wallet/reference/json-rpc-api). Even if a library doesn't natively support Kaia Wallet, extending it for Kaia Wallet integration is straightforward. For example, these are 2 popular libraries for [React](https://react.dev) or [Next.js](https://nextjs.org):

* [Web3Modal](#1.1-web3modal-example)
* [Appkit](#1.1-appkit-example)
* [Web3-Onboard](#1.2-web3-onboard-example)

### 1.1. Web3Modal example
### 1.1. Appkit example

![Web3Modal Hero Banner](https://web3modal.com/images/hero-banner.png)
![Appkit Hero Banner](https://docs.reown.com/assets/images/appkit-18fbf6d4ddb8756740540b7adad92494.png)

By [WalletConnect](https://walletconnect.com), [Web3Modal](https://web3modal.com) offers the following **Features:**
By [Reown](https://reown.com/), [Appkit](https://docs.reown.com/appkit/overview) offers the following **Features:**

* Buttons + Modals for Connect Wallet, Account information, & Network information
* Support for [Email Wallets](https://walletconnect.com/blog/web3modal-web3-email-login-wallets), [Coinbase](https://www.coinbase.com) accounts, & [EIP-4361](https://docs.login.xyz/general-information/siwe-overview/eip-4361)
* Support for [Email Wallets](https://docs.reown.com/appkit/authentication/socials), [Coinbase](https://www.coinbase.com) accounts, & [EIP-4361](https://docs.reown.com/appkit/authentication/one-click-auth)

**Considerations:**

* Using [@web3modal/wagmi](https://www.npmjs.com/package/@web3modal/wagmi), you have to commit to their frontend stack of [Wagmi](https://wagmi.sh) & [Tanstack Query](https://tanstack.com/query)
* Requires a `projectId` [signup w/ WalletConnect](https://cloud.walletconnect.com/sign-in)
* Using [@reown/appkit](https://www.npmjs.com/package/@reown/appkit), you have an option to commit to either the frontend stack of [Wagmi](https://wagmi.sh) & [Tanstack Query](https://tanstack.com/query) or simply [Ethers](https://docs.ethers.org/v6/)
* Requires a `projectId` [signup w/ Reown](https://cloud.walletconnect.com/sign-in)

:::note

Expand Down
Loading