Connect to Astar Network Faild

Hello,
I am trying to connect to the Astar Network using web3auth on vue.js.
I am modifying the “vue-evm-modal-example” of web3auth and trying to run it, but the value of the provider becomes null, and I cannot get the Wallet address.
The settings for web3auth are as follows:
Is there any mistake in this content when connecting via EVM?
By the way, you can check the contents of the Wallet by clicking the WEB3AUTH icon displayed in the lower left.

   const web3auth = new Web3Auth({
      clientId,
      chainConfig: {
        chainNamespace: CHAIN_NAMESPACES.EIP155,
        chainId: "0x250",

        rpcTarget: "https://evm.astar.network", // This is the public RPC we have added, please pass on your own endpoint while creating an app
        displayName: "Aster EVM",
        blockExplorer: "https://astar.subscan.io/",
        ticker: "ASTR",
        tickerName: "ASTAR",
      },
      uiConfig: {
        defaultLanguage: "en",
        appLogo: "https://community/images.web3auth.io/web3auth-logo-w.svg",
        theme: "dark",
        loginMethodsOrder: ["facebook", "google" ,"twitter"],

      },
      web3AuthNetwork: "cyan",
    });

Hey @sysplex.jack

I am able to connect and get the wallet address with the following chainConfig:

          chainConfig: {
            chainNamespace: CHAIN_NAMESPACES.EIP155,
            chainId: "0x250",
            rpcTarget: "https://evm.astar.network",
          },

Thank you for Reply.

i try change to this code.
But Can’t get accounts value. set to null.
“web3auth.provider” Debug write set null.
i want get wallet address.

const torusProvider = web3auth.provider;
const torusWeb3 = new Web3(torusProvider);
const accounts = await torusWeb3.eth.getAccounts();
const address = accounts[0];

Hey @sysplex.jack

Can you share a screenshot like below? Also, share the browser console error.


Nothing Browser Console Error.

i set to Get Account this code.

const getAccounts = async () => {
if (!provider) {
uiConsole(“provider not initialized yet”);
return;
}
//const rpc = new RPC(provider);
//const address = await rpc.getAccounts();
const torusProvider = web3auth.provider;
const torusWeb3 = new Web3(torusProvider);
const accounts = await torusWeb3.eth.getAccounts();
const address = accounts;
uiConsole(address);
//uiConsole(torusProvider);
};

i use network “Cyan”

web3AuthNetwork: “cyan”,

Can you share your browser console?


my PC’s Console Log

Just to confirm, you cloned this example?

And changed these two lines?

Yes. i use this sample source.

This is very strange, as it works for me.

Can you test it with any other sample evm app?

Thank you for your help.
I cloned the sample again from scratch and only changed the clientId and ChainID, and as a result, I was able to successfully obtain the WalletID.
Thank you very much indeed.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.