No contracts found for version 1.3.0 chain

Hey guys, Im having this issue trying to use smart accounts with web3auth and pimlico paymaster. I succcesfully logged in but, after that, this error comes to the console

Uncaught (in promise) Error: No contracts found for version 1.3.0 chain 421614
at $h (index-C8IxXRWJ.js:50:632518)
at e8 (index-C8IxXRWJ.js:50:646941)
at Nv.getSmartAccount (index-C8IxXRWJ.js:50:657499)
at async iu.setupProvider (index-C8IxXRWJ.js:49:25953)
at async gk.setupSmartAccountForNewNetwork (EthereumController-9oaGq9RI.js:23:224124)
at async Gv. (EthereumController-9oaGq9RI.js:23:223794)

const init = async () => {
     try {
       setIsLoading(true);
       const clientId = envParsed.WEB3AUTH_CLIENT_ID;
       // Validate client ID
       if (!clientId || clientId.trim() === "") {
         throw new Error("Web3Auth client ID is missing or empty");
       }

       console.debug("Initializing Web3Auth with client ID:", clientId.substring(0, 10) + "...");
       console.debug("Chain configuration:", {
         chainId: chain.id,
         chainName: chain.name,
         rpcUrl: chain.rpcUrls.default.http[0],
       });

       // Check if Account Abstraction is supported for this chain
       const supportsAccountAbstraction = isAccountAbstractionSupported(chain.id);

       console.debug("Web3Auth configuration:", {
         chainId: chain.id,
         chainName: chain.name,
         supportsAccountAbstraction,
         environment: envParsed.NODE_ENV,
       });

       // Create base configuration
       const baseConfig = {
         modalConfig: {
           connectors: {
             metamask: {
               label: "metamask",
               showOnModal: false,
             },
             auth: {
               label: "auth",
               showOnModal: true,
             },
           },
         },
         clientId,
         web3AuthNetwork: "sapphire_devnet" as const,
         defaultChainId: `0x${chain.id.toString(16)}`,
         chains: [
           {
             chainNamespace: "eip155" as const,
             chainId: `0x${chain.id.toString(16)}`,
             rpcTarget: chain.rpcUrls.default.http[0],
             blockExplorerUrl: chain?.blockExplorers?.default.url ?? "",
             ticker: chain.nativeCurrency.symbol,
             logo: "",
             tickerName: chain.nativeCurrency.name,
             displayName: chain.name,
           },
         ],
       };

       // Create different configs based on Account Abstraction support
       let web3authConfig;

       if (supportsAccountAbstraction) {
         web3authConfig = {
           ...baseConfig,
           accountAbstractionConfig: {
             smartAccountType: "metamask" as const,
             chains: [
               {
                 chainId: `0x${chain.id.toString(16)}`,
                 bundlerConfig: {
                   url: envParsed.BUNDLER_URL,
                 },
                 paymasterConfig: {
                   url: envParsed.PAYMASTER_URL,
                 },
               },
             ],
           },
         };
       } else {
         // For unsupported chains, use a minimal config without any Account Abstraction
         // This should prevent Web3Auth from trying to use Account Abstraction
         web3authConfig = {
           modalConfig: {
             connectors: {
               metamask: {
                 label: "metamask",
                 showOnModal: false,
               },
               auth: {
                 label: "auth",
                 showOnModal: true,
               },
             },
           },
           clientId,
           web3AuthNetwork: "sapphire_devnet" as const,

           // Explicitly set to undefined to disable Account Abstraction
           accountAbstractionConfig: undefined,
         };
       }

       console.debug("Final Web3Auth config:", {
         hasAccountAbstraction: !!web3authConfig.accountAbstractionConfig,
         configKeys: Object.keys(web3authConfig),
         chainId: chain.id,
         chainName: chain.name,
         supportsAccountAbstraction,
       });

       const web3authInstance = new Web3Auth(web3authConfig);

       console.debug("Web3Auth instance created, initializing...");
       await web3authInstance.init();
       console.debug("Web3Auth initialized successfully");
       setWeb3auth(web3authInstance);
       setIsInitialized(true);
       setInitError(null);

       // Use the retry helper to check for an existing session
       await retry(() => checkAndUpdateAuthState(web3authInstance), {
         retries: 5,
         delayMs: 2000,
       });
     } catch (error) {
       console.error("Error initializing Web3Auth:", error);
       setInitError(error instanceof Error ? error.message : "Unknown error");

       // Provide more specific error information
       if (error instanceof Error) {
         if (error.message.includes("Failed to fetch")) {
           console.error(
             "Network error: Unable to connect to Web3Auth servers. Check your internet connection."
           );
         } else if (error.message.includes("client ID")) {
           console.error(
             "Configuration error: Check your VITE_WEB3AUTH_CLIENT_ID environment variable."
           );
         } else if (error.message.includes("CORS")) {
           console.error("CORS error: Check your domain configuration in Web3Auth dashboard.");
         } else if (error.message.includes("No contracts found")) {
           console.error(
             "Account Abstraction error: The current chain does not support Account Abstraction v1.3.0. " +
               "This is expected for Arbitrum Sepolia. Account Abstraction is only supported on Arbitrum mainnet."
           );
         }
       }
     } finally {
       setIsLoading(false);
     }
   };

Thanks for the detailed context and code snippet! Here’s a summary of your issue for the support team, along with some initial guidance:


Issue Summary

  • SDK & Platform:

    • Using Web3Auth Plug and Play (PnP) Web SDK
    • @web3auth/base v9.7.0
    • @web3auth/modal v10.0.5
    • React (Vite app)
  • Integration:

    • Smart Accounts with Web3Auth
    • Pimlico Paymaster for gas abstraction
  • Chain:

    • Chain ID: 421614 (Arbitrum Sepolia)
  • Error Message:

    Uncaught (in promise) Error: No contracts found for version 1.3.0 chain 421614
    
  • When:

    • After successful login, during smart account setup
  • Web3Auth Initialization (relevant snippet):

    const web3authConfig = {
      ...baseConfig,
      accountAbstractionConfig: {
        smartAccountType: "metamask",
        chains: [
          {
            chainId: `0x${chain.id.toString(16)}`,
            bundlerConfig: { url: envParsed.BUNDLER_URL },
            paymasterConfig: { url: envParsed.PAYMASTER_URL },
          },
        ],
      },
    };
    

Diagnosis & Guidance

1. Chain Support for Smart Accounts

  • The error indicates that no smart account contracts are deployed for version 1.3.0 on Arbitrum Sepolia (421614).
  • According to Web3Auth Smart Accounts documentation, currently, Account Abstraction (Smart Accounts) is only supported on Arbitrum Mainnet.
  • Arbitrum Sepolia (421614) is not supported for Smart Accounts yet, which matches your error and the console warning in your code.

2. What You Can Do

  • For development/testing: Use the Web3Auth Sapphire Devnet or Arbitrum Mainnet for Smart Account features.
  • For Arbitrum Sepolia:
    • Smart Accounts are not available.
    • You should disable or skip the accountAbstractionConfig for this chain in your config.

3. Reference Docs


Next Steps

  • If you want to use Smart Accounts, please switch to a supported chain (like Arbitrum Mainnet or Sapphire Devnet).
  • If you need to support Arbitrum Sepolia, ensure your app conditionally disables Smart Accounts for unsupported chains.

Let us know if you have further questions or need help with conditional configuration! If you believe Arbitrum Sepolia support should be available, please let us know and we can escalate as a feature request.

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours