UNPKG

@alchemy/aa-core

Version:

viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts

28 lines 1.28 kB
import { createPublicClient, custom } from "viem"; import { toSmartContractAccount, } from "../account/smartContractAccount.js"; import { createBundlerClientFromExisting, } from "../client/bundlerClient.js"; import { getEntryPoint } from "../entrypoint/index.js"; export const createDummySmartContractAccount = async (client) => { return toSmartContractAccount({ source: "dummy", accountAddress: "0x1234567890123456789012345678901234567890", entryPoint: getEntryPoint(client.chain), chain: client.chain, transport: custom(client), signMessage: async () => "0xdeadbeef", signTypedData: async () => "0xdeadbeef", getAccountInitCode: async () => "0x1234567890123456789012345678901234567890deadbeef", encodeBatchExecute: async () => "0x", encodeExecute: async () => "0x", getDummySignature: () => "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c", }); }; export const createTestClient = (chain) => { return createBundlerClientFromExisting(createPublicClient({ chain, transport: custom({ request: async () => { }, }), })); }; //# sourceMappingURL=testUtils.js.map