diff --git a/examples/4337-gas-metering/pimlico/pimlico.ts b/examples/4337-gas-metering/pimlico/pimlico.ts index 287bbff58..2e5ba0ef8 100644 --- a/examples/4337-gas-metering/pimlico/pimlico.ts +++ b/examples/4337-gas-metering/pimlico/pimlico.ts @@ -180,8 +180,8 @@ const sponsoredUserOperation: UserOperation = { callGasLimit: 0n, // All Gas Values will be filled by Estimation Response Data. verificationGasLimit: 0n, preVerificationGas: 0n, - maxFeePerGas: 0n, - maxPriorityFeePerGas: 0n, + maxFeePerGas: 1n, + maxPriorityFeePerGas: 1n, paymaster: erc20PaymasterAddress, paymasterVerificationGasLimit: 0n, paymasterPostOpGasLimit: 0n, @@ -253,7 +253,13 @@ if (usePaymaster) { } // Sign the User Operation. -sponsoredUserOperation.signature = await signUserOperation(sponsoredUserOperation, signer, chainID, ENTRYPOINT_ADDRESS_V07, chainAddresses.SAFE_4337_MODULE_ADDRESS) +sponsoredUserOperation.signature = await signUserOperation( + sponsoredUserOperation, + signer, + chainID, + ENTRYPOINT_ADDRESS_V07, + chainAddresses.SAFE_4337_MODULE_ADDRESS, +) // Submit the User Operation. await submitUserOperationPimlico(sponsoredUserOperation, bundlerClient, ENTRYPOINT_ADDRESS_V07, chain) diff --git a/examples/4337-gas-metering/utils/erc20.ts b/examples/4337-gas-metering/utils/erc20.ts index fa7bbff89..290a981ef 100644 --- a/examples/4337-gas-metering/utils/erc20.ts +++ b/examples/4337-gas-metering/utils/erc20.ts @@ -1,6 +1,6 @@ import dotenv from 'dotenv' import { HttpTransport, http, Address, encodeFunctionData, createWalletClient, PrivateKeyAccount, PublicClient } from 'viem' -import { baseSepolia, goerli, polygonMumbai, sepolia } from 'viem/chains' +import { baseSepolia, goerli, sepolia } from 'viem/chains' import { ERC20_TOKEN_APPROVE_ABI, ERC20_TOKEN_BALANCE_OF_ABI, @@ -71,16 +71,10 @@ export const mintERC20Token = async ( ) => { let walletClient if (paymaster == 'pimlico') { - if (chain == 'goerli') { - walletClient = createWalletClient({ - account: signer, - chain: goerli, - transport: http(pimlicoRPCURL), - }) - } else if (chain == 'mumbai') { + if (chain == 'sepolia') { walletClient = createWalletClient({ account: signer, - chain: polygonMumbai, + chain: sepolia, transport: http(pimlicoRPCURL), }) } else if (chain == 'base-sepolia') { @@ -148,16 +142,16 @@ export const transferERC20Token = async ( ) => { let walletClient if (paymaster == 'pimlico') { - if (chain == 'goerli') { + if (chain == 'sepolia') { walletClient = createWalletClient({ account: signer, - chain: goerli, + chain: sepolia, transport: http(pimlicoRPCURL), }) - } else if (chain == 'mumbai') { + } else if (chain == 'base-sepolia') { walletClient = createWalletClient({ account: signer, - chain: polygonMumbai, + chain: baseSepolia, transport: http(pimlicoRPCURL), }) } else { diff --git a/examples/4337-gas-metering/utils/safe.ts b/examples/4337-gas-metering/utils/safe.ts index 68f321468..9867a37e2 100644 --- a/examples/4337-gas-metering/utils/safe.ts +++ b/examples/4337-gas-metering/utils/safe.ts @@ -49,7 +49,7 @@ export const getGelatoCallData = async ({ }: { safe: Address owner: PrivateKeyAccount - publicClient: PublicClient, typeof sepolia | typeof baseSepolia> + publicClient: PublicClient, typeof sepolia | typeof baseSepolia> txType: string erc20TokenAddress: Address erc721TokenAddress: Address @@ -188,7 +188,7 @@ const getGelatoInitializerCode = async ({ erc721TokenAddress, }: { owner: Address - client: PublicClient, typeof sepolia | typeof baseSepolia> + client: PublicClient, typeof sepolia | typeof baseSepolia> txType: string safeModuleSetupAddress: Address safe4337ModuleAddress: Address @@ -253,7 +253,7 @@ export const prepareForGelatoTx = async ({ }: { signer: PrivateKeyAccount chain: string - publicClient: PublicClient, typeof sepolia | typeof baseSepolia> + publicClient: PublicClient, typeof sepolia | typeof baseSepolia> txType: string senderAddress: Address erc20TokenAddress: Address @@ -355,7 +355,7 @@ export const getGelatoAccountInitCode = async ({ erc721TokenAddress, }: { owner: Address - client: PublicClient, typeof sepolia | typeof baseSepolia> + client: PublicClient, typeof sepolia | typeof baseSepolia> txType: string safeModuleSetupAddress: Address safe4337ModuleAddress: Address