From c8e77a445974f97bb294788174152a2b436e0936 Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Thu, 12 Dec 2024 23:19:23 +0000 Subject: [PATCH] Fix build --- .../etherspot/toEtherspotSmartAccount.ts | 22 +++++++------------ .../etherspot/utils/getInitMSAData.ts | 2 +- .../accounts/etherspot/utils/getNonceKey.ts | 2 +- packages/permissionless/actions/etherspot.ts | 2 +- .../etherspot/getUserOperationGasPrice.ts | 2 +- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts b/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts index 88252a19..8f7e1cff 100644 --- a/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts +++ b/packages/permissionless/accounts/etherspot/toEtherspotSmartAccount.ts @@ -10,7 +10,6 @@ import { type OneOf, type Transport, type WalletClient, - concatHex, encodeAbiParameters, encodeFunctionData, encodePacked, @@ -28,18 +27,17 @@ import { } from "viem/account-abstraction" import { getChainId } from "viem/actions" import { getAction } from "viem/utils" -import { getAccountNonce } from "../../actions/public/getAccountNonce" -import { getSenderAddress } from "../../actions/public/getSenderAddress" -import { toOwner } from "../../utils" -import { encode7579Calls } from "../../utils/encode7579Calls" +import { getAccountNonce } from "../../actions/public/getAccountNonce.js" +import { getSenderAddress } from "../../actions/public/getSenderAddress.js" +import { encode7579Calls } from "../../utils/encode7579Calls.js" +import { toOwner } from "../../utils/index.js" import { DEFAULT_CONTRACT_ADDRESS, DUMMY_ECDSA_SIGNATURE, - type NetworkAddresses, - VALIDATOR_TYPE -} from "./constants" -import { getInitMSAData } from "./utils/getInitMSAData" -import { getNonceKeyWithEncoding } from "./utils/getNonceKey" + type NetworkAddresses +} from "./constants.js" +import { getInitMSAData } from "./utils/getInitMSAData.js" +import { getNonceKeyWithEncoding } from "./utils/getNonceKey.js" /** * The account creation ABI for a modular etherspot smart account @@ -98,10 +96,6 @@ const getDefaultAddresses = ({ } } -const getEcdsaValidatorIdentifier = (validatorAddress: Address) => { - return concatHex([VALIDATOR_TYPE.VALIDATOR, validatorAddress]) -} - /** * Get the initialization data for a etherspot smart account * @param entryPoint diff --git a/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts b/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts index 988ddb9b..bc582841 100644 --- a/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts +++ b/packages/permissionless/accounts/etherspot/utils/getInitMSAData.ts @@ -2,7 +2,7 @@ import { encodeFunctionData, zeroAddress } from "viem" import { EtherspotBootstrapAbi, EtherspotOnInstallAbi -} from "../abi/EtherspotBootstrapAbi" +} from "../abi/EtherspotBootstrapAbi.js" export const getInitMSAData = (ecdsaValidatorAddress: `0x${string}`) => { const validators = makeBootstrapConfig(ecdsaValidatorAddress, "0x") diff --git a/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts b/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts index cd3114f6..c1e828f7 100644 --- a/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts +++ b/packages/permissionless/accounts/etherspot/utils/getNonceKey.ts @@ -1,5 +1,5 @@ import { type Address, concatHex, pad, toHex } from "viem" -import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../constants" +import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../constants.js" export const getNonceKeyWithEncoding = ( validatorAddress: Address, diff --git a/packages/permissionless/actions/etherspot.ts b/packages/permissionless/actions/etherspot.ts index 80bd5afe..de7d9e47 100644 --- a/packages/permissionless/actions/etherspot.ts +++ b/packages/permissionless/actions/etherspot.ts @@ -1,6 +1,6 @@ import { type GetGasPriceResponseReturnType, getUserOperationGasPrice -} from "./etherspot/getUserOperationGasPrice" +} from "./etherspot/getUserOperationGasPrice.js" export { type GetGasPriceResponseReturnType, getUserOperationGasPrice } diff --git a/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts b/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts index cb2c5bf0..a66c7c8f 100644 --- a/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts +++ b/packages/permissionless/actions/etherspot/getUserOperationGasPrice.ts @@ -1,5 +1,5 @@ import type { Account, Chain, Client, Transport } from "viem" -import type { EtherspotBundlerRpcSchema } from "../../types/etherspot" +import type { EtherspotBundlerRpcSchema } from "../../types/etherspot.js" export type GetGasPriceResponseReturnType = { maxFeePerGas: bigint