diff --git a/packages/contracts-account-abstraction/src/actions/bundler/sendUserOperation.test.ts b/packages/contracts-account-abstraction/src/actions/bundler/sendUserOperation.test.ts index 4251d386..4d4522b5 100644 --- a/packages/contracts-account-abstraction/src/actions/bundler/sendUserOperation.test.ts +++ b/packages/contracts-account-abstraction/src/actions/bundler/sendUserOperation.test.ts @@ -88,7 +88,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { } else { chain = optimismSepolia as unknown as Chain; account = getUtilityAccount({ nonceManager }); - transport = http(optimismSepolia.rpcUrls.drpc!.http[0]); + transport = http(optimismSepolia.rpcUrls.ankr!.http[0]); } const publicClient = createPublicClient({ @@ -109,8 +109,6 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { transport, }); - // const testClient = createTestClient({ mode: "anvil", chain, transport }); - // Contracts const entryPointSimulationsAddress = erc4337Contracts.pimlicoEntrypointSimulations; const factoryAddress = erc4337Contracts.simpleAccountFactory; @@ -183,6 +181,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { expect(paymasterVerificationGasLimit).toBeUndefined(); expect(paymasterPostOpGasLimit).toBeUndefined(); + // Construct UserOp const userOp: UserOperation<"0.7"> = { ...userOpData, signature: dummySignature, @@ -211,7 +210,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { //Pre-fund wallet const prefundHash = await walletClient.sendTransaction({ to: smartAccountAddress, - value: getUserOperationTotalGas(userOp), + value: (getUserOperationTotalGas(userOp) * 110n) / 100n, }); console.log({ prefundHash }); await publicClient.waitForTransactionReceipt({ hash: prefundHash }); @@ -309,7 +308,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { //Pre-fund wallet const prefundHash = await walletClient.sendTransaction({ to: smartAccountAddress, - value: getUserOperationTotalGas(userOp), + value: (getUserOperationTotalGas(userOp) * 110n) / 100n, }); await publicClient.waitForTransactionReceipt({ hash: prefundHash }); @@ -489,7 +488,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { address: paymasterAddress, abi: [depositAbi], functionName: "deposit", - value: getUserOperationTotalGas(userOp), + value: (getUserOperationTotalGas(userOp) * 115n) / 100n, args: [], }); const paymasterDepositHash = await walletClient.writeContract(paymasterDeposit.request); @@ -606,7 +605,7 @@ describe("actions/bundler/sendUserOperation.test.ts", function () { address: paymasterAddress, abi: [depositAbi], functionName: "deposit", - value: getUserOperationTotalGas(userOp), + value: (getUserOperationTotalGas(userOp) * 110n) / 100n, args: [], }); const paymasterDepositHash = await walletClient.writeContract(paymasterDeposit.request); diff --git a/packages/contracts-account-abstraction/src/eip1193/createPaymasterEIP1193.test.ts b/packages/contracts-account-abstraction/src/eip1193/createPaymasterEIP1193.test.ts index 655e0f25..32d23f88 100644 --- a/packages/contracts-account-abstraction/src/eip1193/createPaymasterEIP1193.test.ts +++ b/packages/contracts-account-abstraction/src/eip1193/createPaymasterEIP1193.test.ts @@ -18,7 +18,7 @@ import { HttpTransport, } from "viem"; import { localhost } from "viem/chains"; -import { sepolia } from "@owlprotocol/chains"; +import { optimismSepolia } from "@owlprotocol/chains"; import { entryPoint07Address, createPaymasterClient, @@ -72,9 +72,9 @@ describe("eip1993/createPaymasterEIP1193.test.ts", function () { account = getLocalAccount(0, { nonceManager }); transport = http(chain.rpcUrls.default.http[0]); } else { - chain = sepolia as unknown as Chain; + chain = optimismSepolia as unknown as Chain; account = getUtilityAccount({ nonceManager }); - transport = http(sepolia.rpcUrls.drpc!.http[0]); + transport = http(optimismSepolia.rpcUrls.ankr!.http[0]); } const publicClient = createPublicClient({