Skip to content

Support viem@^2.23.12 in @alchemy/aa-accounts for Berachain compatibility #1461

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

Open
nguyennhukhanh opened this issue Mar 18, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@nguyennhukhanh
Copy link

[REQUIRED] Environment

  • AA SDK version: ^3.19.0
  • Package: @alchemy/aa-accounts

[REQUIRED] Describe the problem
The current version of @alchemy/aa-accounts does not support Berachain from viem@^2.23.12, causing a TypeScript error when attempting to use it in an aa-wallet module.

** How to reproduce:**

  1. Install the latest @alchemy/aa-accounts and viem@^2.23.12.
  2. Import Berachain from viem/chains:
    import { berachain } from 'viem/chains';
  3. Attempt to create a light account using createLightAccount with Berachain:
    const account = await createLightAccount({
        transport: transport,
        chain: berachain,
        signer,
    });
  4. This results in a TypeScript error related to the chain property.

** Relevant code or sample repro:**

import { createLightAccount } from '@alchemy/aa-accounts';
import { createAlchemySmartAccountClient } from '@alchemy/aa-alchemy';
import { LocalAccountSigner } from '@alchemy/aa-core';
import { berachain } from 'viem/chains';

const account = await createLightAccount({
    transport: transport,
    chain: berachain,
    signer,
});

** Expected Behavior**
The package should support Berachain from viem@^2.23.12 without type conflicts.

** Actual Behavior**
The following TypeScript error occurs:

Type '{ blockExplorers: { readonly default: { readonly name: "Berascan"; readonly url: "https://berascan.com"; }; }; contracts: { readonly multicall3: { readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11"; readonly blockCreated: 0; }; readonly ensRegistry: { ...; }; readonly ensUniversalResolver: { ...; }; }; ....' is not assignable to type 'Chain'.

** Suggested Fix**
Please update @alchemy/aa-accounts to support viem@^2.23.12 and ensure compatibility with Berachain.

@nguyennhukhanh nguyennhukhanh added the bug Something isn't working label Mar 18, 2025
@nguyennhukhanh
Copy link
Author

And please support the document: https://accountkit.alchemy.com/packages/aa-accounts

@lippytm
Copy link

lippytm commented Apr 2, 2025

Please solve these issues and implement the solutions.

@lippytm
Copy link

lippytm commented Apr 2, 2025

Issues that need attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants