From e9ed95916b8c58645ccce199baf786ed8755dc56 Mon Sep 17 00:00:00 2001 From: Phillip Ho Date: Tue, 10 Dec 2024 15:30:25 +0800 Subject: [PATCH] chore(refactor): kebab-case /shared/db --- renamer.ts | 145 ++++++++++++++++++ src/server/middleware/auth.ts | 6 +- src/server/routes/admin/nonces.ts | 2 +- .../routes/auth/access-tokens/create.ts | 4 +- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 2 +- .../routes/auth/access-tokens/update.ts | 2 +- src/server/routes/auth/permissions/grant.ts | 2 +- src/server/routes/auth/permissions/revoke.ts | 2 +- src/server/routes/backend-wallet/getAll.ts | 2 +- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../backend-wallet/getTransactionsByNonce.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 2 +- .../routes/backend-wallet/reset-nonces.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 2 +- src/server/routes/backend-wallet/update.ts | 2 +- .../routes/configuration/auth/update.ts | 2 +- .../backend-wallet-balance/update.ts | 2 +- .../routes/configuration/cache/update.ts | 2 +- .../routes/configuration/chains/update.ts | 2 +- .../contract-subscriptions/update.ts | 2 +- src/server/routes/configuration/cors/add.ts | 2 +- .../routes/configuration/cors/remove.ts | 2 +- src/server/routes/configuration/cors/set.ts | 2 +- src/server/routes/configuration/ip/set.ts | 2 +- .../configuration/transactions/update.ts | 2 +- .../routes/configuration/wallets/update.ts | 2 +- .../contract/events/getContractEventLogs.ts | 4 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../contract/events/paginateEventLogs.ts | 4 +- .../extensions/account/write/grantAdmin.ts | 2 +- .../extensions/account/write/grantSession.ts | 2 +- .../extensions/account/write/revokeAdmin.ts | 2 +- .../extensions/account/write/revokeSession.ts | 2 +- .../extensions/account/write/updateSession.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 2 +- .../contract/extensions/erc1155/write/burn.ts | 2 +- .../extensions/erc1155/write/burnBatch.ts | 2 +- .../extensions/erc1155/write/lazyMint.ts | 2 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 2 +- .../extensions/erc1155/write/mintBatchTo.ts | 2 +- .../erc1155/write/setApprovalForAll.ts | 2 +- .../erc1155/write/setBatchClaimConditions.ts | 2 +- .../erc1155/write/setClaimConditions.ts | 2 +- .../extensions/erc1155/write/signatureMint.ts | 2 +- .../erc1155/write/updateClaimConditions.ts | 2 +- .../erc1155/write/updateTokenMetadata.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 2 +- .../extensions/erc20/write/burnFrom.ts | 2 +- .../extensions/erc20/write/mintBatchTo.ts | 2 +- .../extensions/erc20/write/setAllowance.ts | 2 +- .../erc20/write/setClaimConditions.ts | 2 +- .../extensions/erc20/write/signatureMint.ts | 2 +- .../erc20/write/updateClaimConditions.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 2 +- .../extensions/erc721/write/lazyMint.ts | 2 +- .../extensions/erc721/write/mintBatchTo.ts | 2 +- .../erc721/write/setApprovalForAll.ts | 2 +- .../erc721/write/setApprovalForToken.ts | 2 +- .../erc721/write/setClaimConditions.ts | 2 +- .../extensions/erc721/write/signatureMint.ts | 2 +- .../erc721/write/updateClaimConditions.ts | 2 +- .../erc721/write/updateTokenMetadata.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 2 +- .../directListings/write/buyFromListing.ts | 2 +- .../directListings/write/cancelListing.ts | 2 +- .../directListings/write/createListing.ts | 2 +- .../revokeBuyerApprovalForReservedListing.ts | 2 +- .../write/revokeCurrencyApprovalForListing.ts | 2 +- .../directListings/write/updateListing.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 2 +- .../englishAuctions/write/cancelAuction.ts | 2 +- .../write/closeAuctionForBidder.ts | 2 +- .../write/closeAuctionForSeller.ts | 2 +- .../englishAuctions/write/createAuction.ts | 2 +- .../englishAuctions/write/executeSale.ts | 2 +- .../englishAuctions/write/makeBid.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 2 +- .../marketplaceV3/offers/write/cancelOffer.ts | 2 +- .../marketplaceV3/offers/write/makeOffer.ts | 2 +- .../routes/contract/roles/write/grant.ts | 2 +- .../routes/contract/roles/write/revoke.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 2 +- .../royalties/write/setTokenRoyaltyInfo.ts | 2 +- .../subscriptions/addContractSubscription.ts | 8 +- .../getContractIndexedBlockRange.ts | 2 +- .../subscriptions/getContractSubscriptions.ts | 2 +- .../contract/subscriptions/getLatestBlock.ts | 2 +- .../removeContractSubscription.ts | 4 +- .../transactions/getTransactionReceipts.ts | 4 +- .../getTransactionReceiptsByTimestamp.ts | 2 +- .../paginateTransactionReceipts.ts | 4 +- src/server/routes/deploy/prebuilt.ts | 2 +- src/server/routes/deploy/prebuilts/edition.ts | 2 +- .../routes/deploy/prebuilts/editionDrop.ts | 2 +- .../routes/deploy/prebuilts/marketplaceV3.ts | 2 +- .../routes/deploy/prebuilts/multiwrap.ts | 2 +- .../routes/deploy/prebuilts/nftCollection.ts | 2 +- src/server/routes/deploy/prebuilts/nftDrop.ts | 2 +- src/server/routes/deploy/prebuilts/pack.ts | 2 +- .../routes/deploy/prebuilts/signatureDrop.ts | 2 +- src/server/routes/deploy/prebuilts/split.ts | 2 +- src/server/routes/deploy/prebuilts/token.ts | 2 +- .../routes/deploy/prebuilts/tokenDrop.ts | 2 +- src/server/routes/deploy/prebuilts/vote.ts | 2 +- src/server/routes/deploy/published.ts | 2 +- src/server/routes/relayer/index.ts | 4 +- src/server/routes/webhooks/create.ts | 2 +- src/server/routes/webhooks/getAll.ts | 2 +- src/server/routes/webhooks/revoke.ts | 4 +- src/server/routes/webhooks/test.ts | 2 +- .../utils/wallets/createGcpKmsWallet.ts | 2 +- src/server/utils/wallets/createLocalWallet.ts | 2 +- src/server/utils/wallets/createSmartWallet.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 2 +- .../utils/wallets/importAwsKmsWallet.ts | 2 +- .../utils/wallets/importGcpKmsWallet.ts | 2 +- .../get-chain-indexer.ts} | 0 .../upsert-chain-indexer.ts} | 0 ...tConfiguration.ts => get-configuration.ts} | 2 +- ...nfiguration.ts => update-configuration.ts} | 0 .../create-contract-event-logs.ts} | 0 .../delete-contract-event-logs.ts} | 0 .../get-contract-event-logs.ts} | 0 .../create-contract-subscription.ts} | 0 .../delete-contract-subscription.ts} | 0 .../get-contract-subscriptions.ts} | 0 .../create-contract-transaction-receipts.ts} | 0 .../delete-contract-transaction-receipts.ts} | 0 .../get-contract-transaction-receipts.ts} | 0 ...tePermissions.ts => delete-permissions.ts} | 0 .../{getPermissions.ts => get-permissions.ts} | 0 ...tePermissions.ts => update-permissions.ts} | 0 ...getRelayerById.ts => get-relayer-by-id.ts} | 0 .../{createToken.ts => create-token.ts} | 0 ...etAccessTokens.ts => get-access-tokens.ts} | 0 .../db/tokens/{getToken.ts => get-token.ts} | 0 .../{revokeToken.ts => revoke-token.ts} | 0 .../{updateToken.ts => update-token.ts} | 0 .../transactions/{queueTx.ts => queue-tx.ts} | 0 ...letDetails.ts => create-wallet-details.ts} | 0 ...letDetails.ts => delete-wallet-details.ts} | 0 .../{getAllWallets.ts => get-all-wallets.ts} | 0 ...WalletDetails.ts => get-wallet-details.ts} | 0 .../db/wallets/{nonceMap.ts => nonce-map.ts} | 0 ...letDetails.ts => update-wallet-details.ts} | 0 .../{walletNonce.ts => wallet-nonce.ts} | 2 +- .../{createWebhook.ts => create-webhook.ts} | 0 ...{getAllWebhooks.ts => get-all-webhooks.ts} | 0 .../{getWebhook.ts => get-webhook.ts} | 0 .../{revokeWebhook.ts => revoke-webhook.ts} | 0 src/shared/utils/account.ts | 2 +- src/shared/utils/cache/accessToken.ts | 2 +- src/shared/utils/cache/authWallet.ts | 2 +- src/shared/utils/cache/getConfig.ts | 2 +- src/shared/utils/cache/getWallet.ts | 2 +- src/shared/utils/cache/getWebhook.ts | 2 +- src/shared/utils/prometheus.ts | 2 +- .../tasks/cancelRecycledNoncesWorker.ts | 2 +- src/worker/tasks/chainIndexer.ts | 6 +- src/worker/tasks/manageChainIndexers.ts | 2 +- src/worker/tasks/mineTransactionWorker.ts | 2 +- src/worker/tasks/nonceHealthCheckWorker.ts | 2 +- src/worker/tasks/nonceResyncWorker.ts | 2 +- src/worker/tasks/processEventLogsWorker.ts | 4 +- .../tasks/processTransactionReceiptsWorker.ts | 2 +- src/worker/tasks/pruneTransactionsWorker.ts | 2 +- src/worker/tasks/sendTransactionWorker.ts | 2 +- tests/unit/auth.test.ts | 2 +- 169 files changed, 297 insertions(+), 152 deletions(-) create mode 100644 renamer.ts rename src/shared/db/{chainIndexers/getChainIndexer.ts => chain-indexers/get-chain-indexer.ts} (100%) rename src/shared/db/{chainIndexers/upsertChainIndexer.ts => chain-indexers/upsert-chain-indexer.ts} (100%) rename src/shared/db/configuration/{getConfiguration.ts => get-configuration.ts} (99%) rename src/shared/db/configuration/{updateConfiguration.ts => update-configuration.ts} (100%) rename src/shared/db/{contractEventLogs/createContractEventLogs.ts => contract-event-logs/create-contract-event-logs.ts} (100%) rename src/shared/db/{contractEventLogs/deleteContractEventLogs.ts => contract-event-logs/delete-contract-event-logs.ts} (100%) rename src/shared/db/{contractEventLogs/getContractEventLogs.ts => contract-event-logs/get-contract-event-logs.ts} (100%) rename src/shared/db/{contractSubscriptions/createContractSubscription.ts => contract-subscriptions/create-contract-subscription.ts} (100%) rename src/shared/db/{contractSubscriptions/deleteContractSubscription.ts => contract-subscriptions/delete-contract-subscription.ts} (100%) rename src/shared/db/{contractSubscriptions/getContractSubscriptions.ts => contract-subscriptions/get-contract-subscriptions.ts} (100%) rename src/shared/db/{contractTransactionReceipts/createContractTransactionReceipts.ts => contract-transaction-receipts/create-contract-transaction-receipts.ts} (100%) rename src/shared/db/{contractTransactionReceipts/deleteContractTransactionReceipts.ts => contract-transaction-receipts/delete-contract-transaction-receipts.ts} (100%) rename src/shared/db/{contractTransactionReceipts/getContractTransactionReceipts.ts => contract-transaction-receipts/get-contract-transaction-receipts.ts} (100%) rename src/shared/db/permissions/{deletePermissions.ts => delete-permissions.ts} (100%) rename src/shared/db/permissions/{getPermissions.ts => get-permissions.ts} (100%) rename src/shared/db/permissions/{updatePermissions.ts => update-permissions.ts} (100%) rename src/shared/db/relayer/{getRelayerById.ts => get-relayer-by-id.ts} (100%) rename src/shared/db/tokens/{createToken.ts => create-token.ts} (100%) rename src/shared/db/tokens/{getAccessTokens.ts => get-access-tokens.ts} (100%) rename src/shared/db/tokens/{getToken.ts => get-token.ts} (100%) rename src/shared/db/tokens/{revokeToken.ts => revoke-token.ts} (100%) rename src/shared/db/tokens/{updateToken.ts => update-token.ts} (100%) rename src/shared/db/transactions/{queueTx.ts => queue-tx.ts} (100%) rename src/shared/db/wallets/{createWalletDetails.ts => create-wallet-details.ts} (100%) rename src/shared/db/wallets/{deleteWalletDetails.ts => delete-wallet-details.ts} (100%) rename src/shared/db/wallets/{getAllWallets.ts => get-all-wallets.ts} (100%) rename src/shared/db/wallets/{getWalletDetails.ts => get-wallet-details.ts} (100%) rename src/shared/db/wallets/{nonceMap.ts => nonce-map.ts} (100%) rename src/shared/db/wallets/{updateWalletDetails.ts => update-wallet-details.ts} (100%) rename src/shared/db/wallets/{walletNonce.ts => wallet-nonce.ts} (99%) rename src/shared/db/webhooks/{createWebhook.ts => create-webhook.ts} (100%) rename src/shared/db/webhooks/{getAllWebhooks.ts => get-all-webhooks.ts} (100%) rename src/shared/db/webhooks/{getWebhook.ts => get-webhook.ts} (100%) rename src/shared/db/webhooks/{revokeWebhook.ts => revoke-webhook.ts} (100%) diff --git a/renamer.ts b/renamer.ts new file mode 100644 index 000000000..3018ccf16 --- /dev/null +++ b/renamer.ts @@ -0,0 +1,145 @@ +import fs from "fs"; +import path from "path"; + +// Convert camelCase to kebab-case +function toKebabCase(filename: string): string { + return filename.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(); +} + +// Iteratively process files and directories +function processFilesAndFolders(rootDir: string) { + const queue: string[] = [rootDir]; + + while (queue.length > 0) { + const currentPath = queue.pop()!; + const entries = fs.readdirSync(currentPath, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(currentPath, entry.name); + + // Handle directories first + if (entry.isDirectory()) { + const newName = toKebabCase(entry.name); + if (newName !== entry.name) { + const newPath = path.join(currentPath, newName); + + if (fs.existsSync(newPath)) { + console.error( + `Conflict: ${newPath} already exists. Skipping ${fullPath}`, + ); + continue; + } + + console.log(`Renaming directory: ${fullPath} -> ${newPath}`); + fs.renameSync(fullPath, newPath); + + // Update imports after renaming + updateImports(fullPath, newPath); + + // Add the renamed directory back to the queue for further processing + queue.push(newPath); + } else { + queue.push(fullPath); // If no renaming, continue processing the directory + } + } else { + // Handle files + const newName = toKebabCase(entry.name); + if (newName !== entry.name) { + const newPath = path.join(currentPath, newName); + + if (fs.existsSync(newPath)) { + console.error( + `Conflict: ${newPath} already exists. Skipping ${fullPath}`, + ); + continue; + } + + console.log(`Renaming file: ${fullPath} -> ${newPath}`); + fs.renameSync(fullPath, newPath); + + // Update imports after renaming + updateImports(fullPath, newPath); + } + } + } + } +} + +// Corrected `updateImports` function +function updateImports(oldPath: string, newPath: string) { + const projectRoot = path.resolve("./"); // Adjust project root if needed + const allFiles = getAllFiles(projectRoot, /\.(ts|js|tsx|jsx)$/); + + const normalizedOldPath = normalizePath(oldPath); + const normalizedNewPath = normalizePath(newPath); + + for (const file of allFiles) { + let content = fs.readFileSync(file, "utf-8"); + + const relativeOldPath = normalizePath( + formatRelativePath(file, normalizedOldPath), + ); + const relativeNewPath = normalizePath( + formatRelativePath(file, normalizedNewPath), + ); + + const importRegex = new RegExp( + `(['"\`])(${escapeRegex(relativeOldPath)})(['"\`])`, + "g", + ); + + if (importRegex.test(content)) { + const updatedContent = content.replace( + importRegex, + `$1${relativeNewPath}$3`, + ); + fs.writeFileSync(file, updatedContent, "utf-8"); + console.log(`Updated imports in: ${file}`); + } + } +} + +// Normalize file paths for consistent imports +function normalizePath(p: string): string { + return p.replace(/\\/g, "/").replace(/\.[tj]sx?$/, ""); // Ensure forward slashes and remove extensions +} + +// Format paths as relative imports +function formatRelativePath(from: string, to: string): string { + const relativePath = path.relative(path.dirname(from), to); + return normalizePath( + relativePath.startsWith(".") ? relativePath : `./${relativePath}`, + ); // Ensure ./ prefix +} + +// Escape special regex characters in paths +function escapeRegex(string: string): string { + return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); +} + +// Get all project files iteratively +function getAllFiles(rootDir: string, extensions: RegExp): string[] { + const result: string[] = []; + const stack: string[] = [rootDir]; + + while (stack.length > 0) { + const currentDir = stack.pop()!; + const entries = fs.readdirSync(currentDir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(currentDir, entry.name); + + if (entry.isDirectory() && !entry.name.startsWith(".")) { + stack.push(fullPath); + } else if (extensions.test(entry.name)) { + result.push(fullPath); + } + } + } + + return result; +} + +// Run the script +const projectRoot = path.resolve("./src/shared/db"); // Change as needed +processFilesAndFolders(projectRoot); diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 022519a41..8836dd994 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -10,9 +10,9 @@ import type { FastifyInstance } from "fastify"; import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken, { type JwtPayload } from "jsonwebtoken"; import { validate as uuidValidate } from "uuid"; -import { getPermissions } from "../../shared/db/permissions/getPermissions"; -import { createToken } from "../../shared/db/tokens/createToken"; -import { revokeToken } from "../../shared/db/tokens/revokeToken"; +import { getPermissions } from "../../shared/db/permissions/get-permissions"; +import { createToken } from "../../shared/db/tokens/create-token"; +import { revokeToken } from "../../shared/db/tokens/revoke-token"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { THIRDWEB_DASHBOARD_ISSUER, handleSiwe } from "../../shared/utils/auth"; import { getAccessToken } from "../../shared/utils/cache/accessToken"; diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 75e109405..9d73da326 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -12,7 +12,7 @@ import { lastUsedNonceKey, recycledNoncesKey, sentNoncesKey, -} from "../../../shared/db/wallets/walletNonce"; +} from "../../../shared/db/wallets/wallet-nonce"; import { getChain } from "../../../shared/utils/chain"; import { redis } from "../../../shared/utils/redis/redis"; import { thirdwebClient } from "../../../shared/utils/sdk"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index b69b6cf20..05ef96411 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -3,8 +3,8 @@ import { buildJWT } from "@thirdweb-dev/auth"; import { LocalWallet } from "@thirdweb-dev/wallets"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; -import { createToken } from "../../../../shared/db/tokens/createToken"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; +import { createToken } from "../../../../shared/db/tokens/create-token"; import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { env } from "../../../../shared/utils/env"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 9cbe3646b..739cf96d4 100644 --- a/src/server/routes/auth/access-tokens/getAll.ts +++ b/src/server/routes/auth/access-tokens/getAll.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAccessTokens } from "../../../../shared/db/tokens/getAccessTokens"; +import { getAccessTokens } from "../../../../shared/db/tokens/get-access-tokens"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/access-tokens/revoke.ts b/src/server/routes/auth/access-tokens/revoke.ts index 39aad0a00..bdba582be 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/revoke.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { revokeToken } from "../../../../shared/db/tokens/revokeToken"; +import { revokeToken } from "../../../../shared/db/tokens/revoke-token"; import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index f09b5ce5f..a7f19ab32 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateToken } from "../../../../shared/db/tokens/updateToken"; +import { updateToken } from "../../../../shared/db/tokens/update-token"; import { accessTokenCache } from "../../../../shared/utils/cache/accessToken"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index fcde00839..4f390e9d1 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updatePermissions } from "../../../../shared/db/permissions/updatePermissions"; +import { updatePermissions } from "../../../../shared/db/permissions/update-permissions"; import { AddressSchema } from "../../../schemas/address"; import { permissionsSchema } from "../../../../shared/schemas/auth"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 6e72d7364..23dd4d8b9 100644 --- a/src/server/routes/auth/permissions/revoke.ts +++ b/src/server/routes/auth/permissions/revoke.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deletePermissions } from "../../../../shared/db/permissions/deletePermissions"; +import { deletePermissions } from "../../../../shared/db/permissions/delete-permissions"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/getAll.ts b/src/server/routes/backend-wallet/getAll.ts index 0a2b0e36f..a9ba04a0f 100644 --- a/src/server/routes/backend-wallet/getAll.ts +++ b/src/server/routes/backend-wallet/getAll.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllWallets } from "../../../shared/db/wallets/getAllWallets"; +import { getAllWallets } from "../../../shared/db/wallets/get-all-wallets"; import { standardResponseSchema, walletDetailsSchema, diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index f5ef87ac3..aedd1b86c 100644 --- a/src/server/routes/backend-wallet/getNonce.ts +++ b/src/server/routes/backend-wallet/getNonce.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { inspectNonce } from "../../../shared/db/wallets/walletNonce"; +import { inspectNonce } from "../../../shared/db/wallets/wallet-nonce"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { walletWithAddressParamSchema } from "../../schemas/wallet"; import { getChainIdFromChain } from "../../utils/chain"; diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index 0be1571d3..ff22df059 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -2,7 +2,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../shared/db/transactions/db"; -import { getNonceMap } from "../../../shared/db/wallets/nonceMap"; +import { getNonceMap } from "../../../shared/db/wallets/nonce-map"; import { normalizeAddress } from "../../../shared/utils/primitiveTypes"; import type { AnyTransaction } from "../../../shared/utils/transaction/types"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 9f57ace6c..0cbd94906 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { deleteWalletDetails } from "../../../shared/db/wallets/deleteWalletDetails"; +import { deleteWalletDetails } from "../../../shared/db/wallets/delete-wallet-details"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/reset-nonces.ts b/src/server/routes/backend-wallet/reset-nonces.ts index 3237a161a..2ecc66249 100644 --- a/src/server/routes/backend-wallet/reset-nonces.ts +++ b/src/server/routes/backend-wallet/reset-nonces.ts @@ -6,7 +6,7 @@ import { deleteNoncesForBackendWallets, getUsedBackendWallets, syncLatestNonceFromOnchain, -} from "../../../shared/db/wallets/walletNonce"; +} from "../../../shared/db/wallets/wallet-nonce"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index 45f9cb69d..a00e8a860 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -6,7 +6,7 @@ import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, isSmartBackendWallet, -} from "../../../shared/db/wallets/getWalletDetails"; +} from "../../../shared/db/wallets/get-wallet-details"; import { walletDetailsToAccount } from "../../../shared/utils/account"; import { getChain } from "../../../shared/utils/chain"; import { createCustomError } from "../../middleware/error"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 8baabfacf..dca07493f 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateWalletDetails } from "../../../shared/db/wallets/updateWalletDetails"; +import { updateWalletDetails } from "../../../shared/db/wallets/update-wallet-details"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 07ab148b3..4968c6ebe 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index e47a75af6..e0f1fba88 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { WeiAmountStringSchema } from "../../../schemas/number"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index a87ef1546..917954ca0 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { clearCacheCron } from "../../../../shared/utils/cron/clearCacheCron"; import { isValidCron } from "../../../../shared/utils/cron/isValidCron"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 589eb0797..b7c7d9744 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { sdkCache } from "../../../../shared/utils/cache/getSdk"; import { chainResponseSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index fdc0897d0..6aa402d0e 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index 24d085d07..24a1852f6 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/cors/remove.ts b/src/server/routes/configuration/cors/remove.ts index a1d4c7c98..3481195ee 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index a1a7540bc..ecf02fd82 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { mandatoryAllowedCorsUrls } from "../../../utils/cors-urls"; diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index 8dab64868..a79a84c54 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { responseBodySchema } from "./get"; diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c5322dca4..9eb07eb15 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index 9b79e6146..f60ce08d3 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { updateConfiguration } from "../../../../shared/db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../../../shared/db/configuration/update-configuration"; import { WalletType } from "../../../../shared/schemas/wallet"; import { getConfig } from "../../../../shared/utils/cache/getConfig"; import { createCustomError } from "../../../middleware/error"; diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 47a12a269..4ae5dffed 100644 --- a/src/server/routes/contract/events/getContractEventLogs.ts +++ b/src/server/routes/contract/events/getContractEventLogs.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContractEventLogsByBlockAndTopics } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; -import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractEventLogsByBlockAndTopics } from "../../../../shared/db/contractEventLogs/get-contract-event-logs"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/get-contract-subscriptions"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema, TransactionHashSchema } from "../../../schemas/address"; import { diff --git a/src/server/routes/contract/events/getEventLogsByTimestamp.ts b/src/server/routes/contract/events/getEventLogsByTimestamp.ts index 267ab1eb8..31ab72000 100644 --- a/src/server/routes/contract/events/getEventLogsByTimestamp.ts +++ b/src/server/routes/contract/events/getEventLogsByTimestamp.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getEventLogsByBlockTimestamp } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; +import { getEventLogsByBlockTimestamp } from "../../../../shared/db/contractEventLogs/get-contract-event-logs"; import { AddressSchema } from "../../../schemas/address"; import { eventLogSchema } from "../../../schemas/eventLog"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 1767a4c07..ed0cdcc6c 100644 --- a/src/server/routes/contract/events/paginateEventLogs.ts +++ b/src/server/routes/contract/events/paginateEventLogs.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; -import { getEventLogsByCursor } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; +import { getConfiguration } from "../../../../shared/db/configuration/get-configuration"; +import { getEventLogsByCursor } from "../../../../shared/db/contractEventLogs/get-contract-event-logs"; import { AddressSchema } from "../../../schemas/address"; import { eventLogSchema, toEventLogSchema } from "../../../schemas/eventLog"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 2a7120ca8..b84118a78 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index ab04cfcfa..688f854cb 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; import { diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2b19ee104..2caf8453a 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index 58c74d8c7..7ad7a2d5c 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index daade19b1..b08e9f230 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index 5164f0a83..eaa59e477 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index d01ea058d..1b616f34e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index a78cb430c..f1449432d 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts index b31c48bf1..580b7a2d8 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index 58fa670ab..7bb1ddf5a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index e8776756a..b29d77ddd 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftAndSupplySchema } from "../../../../../schemas/nft"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index 510469914..9713bf184 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc1155ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 36e81475b..41b1afc10 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index 6f3021397..bc1c7064e 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index b1e12fb4b..1d7427863 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -3,7 +3,7 @@ import type { SignedPayload1155 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature1155OutputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts index ce3e63e10..e132e05a4 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 0689517fa..a620b6f0a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 7c9f093f7..5e64df067 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { erc20ContractParamSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index ad5498414..c5676f9d5 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index dd3e4b601..d467d142d 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 7cad12a44..42f70a6b2 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index cc6ced02c..8363947d3 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 182259b9b..a03106941 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -3,7 +3,7 @@ import type { SignedPayload20 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { signature20OutputSchema } from "../../../../../schemas/erc20"; import { diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts index 96ec7578d..4c78c6a68 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index 259ba1af1..6062485bc 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts index 7f22c2eae..0ec2cb6a1 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftOrInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 38e5aa299..499ea6a7b 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; import { nftOrInputSchema } from "../../../../../schemas/nft"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index 3f3c29c8f..b2f3b37aa 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index ad7fd5aa8..914eb10d8 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { contractParamSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 42afb844d..476ac1198 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 808c14246..cc80e78c5 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -6,7 +6,7 @@ import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; import { mintWithSignature } from "thirdweb/extensions/erc721"; import { resolvePromisedValue } from "thirdweb/utils"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { getContractV5 } from "../../../../../../shared/utils/cache/getContractv5"; import { insertTransaction } from "../../../../../../shared/utils/transaction/insertTransaction"; diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index d9c9fb6f7..a321ef784 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { claimConditionInputSchema, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index c8a610821..40a74ba44 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../shared/utils/cache/getContract"; import { nftMetadataInputSchema } from "../../../../../schemas/nft"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts index f723caadc..5f8e9dc0b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts index 37ab99780..83e3a9ce8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts index af6a96951..9d4271c93 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts index 141feddad..4733a0dba 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts index 607afb958..ef81dfe47 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts index 705463bf4..89d22c3e7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../../../schemas/address"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts index c58104607..a23f58057 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { directListingV3InputSchema } from "../../../../../../schemas/marketplaceV3/directListing"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts index 142d5a6f3..70a663203 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts index dbcd85bec..c5cde585e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts index f0131cb06..c8a79684b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts index 0485e4151..583a3b60e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts index f74f0ad23..e58156254 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,7 +1,7 @@ import type { Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { englishAuctionInputSchema } from "../../../../../../schemas/marketplaceV3/englishAuction"; import { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts index 9770164ef..9d8c525af 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts index 8eabd7456..5ebb54a45 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts index 7eed54d24..aa0fa483f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts index 0f81e3138..c36a8e634 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { marketplaceV3ContractParamSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts index daa44c8c1..49a7f6296 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../../../shared/utils/cache/getContract"; import { OfferV3InputSchema } from "../../../../../../schemas/marketplaceV3/offer"; import { diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index 538b2d869..ef1ccf8f7 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 063f9c8e1..e4621fa8c 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/revoke.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../shared/utils/cache/getContract"; import { AddressSchema } from "../../../../schemas/address"; import { diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index 239c08778..a92fab835 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 6ff5d09c2..df3de4ab8 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { queueTx } from "../../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../../shared/db/transactions/queue-tx"; import { getContract } from "../../../../../shared/utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; import { diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index 05637d75f..4484fd91e 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -3,10 +3,10 @@ import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { isContractDeployed } from "thirdweb/utils"; -import { upsertChainIndexer } from "../../../../shared/db/chainIndexers/upsertChainIndexer"; -import { createContractSubscription } from "../../../../shared/db/contractSubscriptions/createContractSubscription"; -import { getContractSubscriptionsUniqueChainIds } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; -import { insertWebhook } from "../../../../shared/db/webhooks/createWebhook"; +import { upsertChainIndexer } from "../../../../shared/db/chainIndexers/upsert-chain-indexer"; +import { createContractSubscription } from "../../../../shared/db/contractSubscriptions/create-contract-subscription"; +import { getContractSubscriptionsUniqueChainIds } from "../../../../shared/db/contractSubscriptions/get-contract-subscriptions"; +import { insertWebhook } from "../../../../shared/db/webhooks/create-webhook"; import { WebhooksEventTypes } from "../../../../shared/schemas/webhooks"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { getChain } from "../../../../shared/utils/chain"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index 66a5f0cb8..94cc49c63 100644 --- a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts +++ b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContractEventLogsIndexedBlockRange } from "../../../../shared/db/contractEventLogs/getContractEventLogs"; +import { getContractEventLogsIndexedBlockRange } from "../../../../shared/db/contractEventLogs/get-contract-event-logs"; import { createCustomError } from "../../../middleware/error"; import { AddressSchema } from "../../../schemas/address"; import { chainIdOrSlugSchema } from "../../../schemas/chain"; diff --git a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts index d542ee9a2..9d6f4da72 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllContractSubscriptions } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getAllContractSubscriptions } from "../../../../shared/db/contractSubscriptions/get-contract-subscriptions"; import { contractSubscriptionSchema, toContractSubscriptionSchema, diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 1cea5a453..c4c4b3333 100644 --- a/src/server/routes/contract/subscriptions/getLatestBlock.ts +++ b/src/server/routes/contract/subscriptions/getLatestBlock.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getLastIndexedBlock } from "../../../../shared/db/chainIndexers/getChainIndexer"; +import { getLastIndexedBlock } from "../../../../shared/db/chainIndexers/get-chain-indexer"; import { chainRequestQuerystringSchema } from "../../../schemas/chain"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { getChainIdFromChain } from "../../../utils/chain"; diff --git a/src/server/routes/contract/subscriptions/removeContractSubscription.ts b/src/server/routes/contract/subscriptions/removeContractSubscription.ts index 488b2d68c..a0784d2a8 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/removeContractSubscription.ts @@ -1,8 +1,8 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { deleteContractSubscription } from "../../../../shared/db/contractSubscriptions/deleteContractSubscription"; -import { deleteWebhook } from "../../../../shared/db/webhooks/revokeWebhook"; +import { deleteContractSubscription } from "../../../../shared/db/contractSubscriptions/delete-contract-subscription"; +import { deleteWebhook } from "../../../../shared/db/webhooks/revoke-webhook"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; const bodySchema = Type.Object({ diff --git a/src/server/routes/contract/transactions/getTransactionReceipts.ts b/src/server/routes/contract/transactions/getTransactionReceipts.ts index d0267226d..ede4247cd 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -1,8 +1,8 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/getContractSubscriptions"; -import { getContractTransactionReceiptsByBlock } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; +import { isContractSubscribed } from "../../../../shared/db/contractSubscriptions/get-contract-subscriptions"; +import { getContractTransactionReceiptsByBlock } from "../../../../shared/db/contractTransactionReceipts/get-contract-transaction-receipts"; import { createCustomError } from "../../../middleware/error"; import { contractParamSchema, diff --git a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts index 5a9f55393..e890216d2 100644 --- a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts +++ b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getTransactionReceiptsByBlockTimestamp } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getTransactionReceiptsByBlockTimestamp } from "../../../../shared/db/contractTransactionReceipts/get-contract-transaction-receipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { transactionReceiptSchema } from "../../../schemas/transactionReceipt"; diff --git a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts index 6aca2a842..67e513753 100644 --- a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getConfiguration } from "../../../../shared/db/configuration/getConfiguration"; -import { getTransactionReceiptsByCursor } from "../../../../shared/db/contractTransactionReceipts/getContractTransactionReceipts"; +import { getConfiguration } from "../../../../shared/db/configuration/get-configuration"; +import { getTransactionReceiptsByCursor } from "../../../../shared/db/contractTransactionReceipts/get-contract-transaction-receipts"; import { AddressSchema } from "../../../schemas/address"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 271d298b7..a4b6f4be0 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { contractDeployBasicSchema } from "../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 611437a7b..226d5eac8 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 8ffa11299..08a82c1dd 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8d70769a9..8c0270039 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index beb778bda..a6acfa719 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index d12c2ec63..58289aa0c 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 19ca2a2f2..f73677f81 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 9e5eedbec..117d52f9b 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f7a4a6290..708e8596f 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8184c0699..e93255bff 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 50fde94fb..9ff37d0d9 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 73f55b682..270b74785 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index fce36471f..e6edb28e3 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; -import { queueTx } from "../../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; import { diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 13a313541..62e6552bc 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -2,7 +2,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isAddress } from "thirdweb"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../shared/utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../schemas/contract"; import { diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 604a0774d..db6b2d0b8 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -9,8 +9,8 @@ import { ForwarderAbiEIP712ChainlessDomain, NativeMetaTransaction, } from "../../../shared/schemas/relayer"; -import { getRelayerById } from "../../../shared/db/relayer/getRelayerById"; -import { queueTx } from "../../../shared/db/transactions/queueTx"; +import { getRelayerById } from "../../../shared/db/relayer/get-relayer-by-id"; +import { queueTx } from "../../../shared/db/transactions/queue-tx"; import { getSdk } from "../../../shared/utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; import { diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index b9e71f2a9..986fa6743 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,7 +1,7 @@ import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { insertWebhook } from "../../../shared/db/webhooks/createWebhook"; +import { insertWebhook } from "../../../shared/db/webhooks/create-webhook"; import { WebhooksEventTypes } from "../../../shared/schemas/webhooks"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 1c3c26149..5b342cd7a 100644 --- a/src/server/routes/webhooks/getAll.ts +++ b/src/server/routes/webhooks/getAll.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getAllWebhooks } from "../../../shared/db/webhooks/getAllWebhooks"; +import { getAllWebhooks } from "../../../shared/db/webhooks/get-all-webhooks"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; import { WebhookSchema, toWebhookSchema } from "../../schemas/webhook"; diff --git a/src/server/routes/webhooks/revoke.ts b/src/server/routes/webhooks/revoke.ts index e3b220442..de943d16d 100644 --- a/src/server/routes/webhooks/revoke.ts +++ b/src/server/routes/webhooks/revoke.ts @@ -1,8 +1,8 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; -import { deleteWebhook } from "../../../shared/db/webhooks/revokeWebhook"; +import { getWebhook } from "../../../shared/db/webhooks/get-webhook"; +import { deleteWebhook } from "../../../shared/db/webhooks/revoke-webhook"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/webhooks/test.ts b/src/server/routes/webhooks/test.ts index c70bbb5de..0031a7580 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.ts @@ -1,7 +1,7 @@ import { Type, type Static } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getWebhook } from "../../../shared/db/webhooks/getWebhook"; +import { getWebhook } from "../../../shared/db/webhooks/get-webhook"; import { sendWebhookRequest } from "../../../shared/utils/webhook"; import { createCustomError } from "../../middleware/error"; import { NumberStringSchema } from "../../schemas/number"; diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index bf4a249a2..d45fd0835 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -1,5 +1,5 @@ import { KeyManagementServiceClient } from "@google-cloud/kms"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { createWalletDetails } from "../../../shared/db/wallets/create-wallet-details"; import { WalletType } from "../../../shared/schemas/wallet"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { diff --git a/src/server/utils/wallets/createLocalWallet.ts b/src/server/utils/wallets/createLocalWallet.ts index c8b187171..2a1d3d7bd 100644 --- a/src/server/utils/wallets/createLocalWallet.ts +++ b/src/server/utils/wallets/createLocalWallet.ts @@ -1,7 +1,7 @@ import { encryptKeystore } from "@ethersproject/json-wallets"; import { privateKeyToAccount } from "thirdweb/wallets"; import { generatePrivateKey } from "viem/accounts"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { createWalletDetails } from "../../../shared/db/wallets/create-wallet-details"; import { env } from "../../../shared/utils/env"; import { thirdwebClient } from "../../../shared/utils/sdk"; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 263c60f03..d2e45a166 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,6 +1,6 @@ import { defineChain, type Address, type Chain } from "thirdweb"; import { smartWallet, type Account } from "thirdweb/wallets"; -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { createWalletDetails } from "../../../shared/db/wallets/create-wallet-details"; import { WalletType } from "../../../shared/schemas/wallet"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index dd078f4e4..ec4756789 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -3,7 +3,7 @@ import { Wallet } from "ethers"; import type { Address } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { privateKeyToAccount, type Account } from "thirdweb/wallets"; -import { getWalletDetails } from "../../../shared/db/wallets/getWalletDetails"; +import { getWalletDetails } from "../../../shared/db/wallets/get-wallet-details"; import { getChain } from "../../../shared/utils/chain"; import { env } from "../../../shared/utils/env"; import { logger } from "../../../shared/utils/logger"; diff --git a/src/server/utils/wallets/importAwsKmsWallet.ts b/src/server/utils/wallets/importAwsKmsWallet.ts index 82d3969b4..da394e32e 100644 --- a/src/server/utils/wallets/importAwsKmsWallet.ts +++ b/src/server/utils/wallets/importAwsKmsWallet.ts @@ -1,4 +1,4 @@ -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { createWalletDetails } from "../../../shared/db/wallets/create-wallet-details"; import { WalletType } from "../../../shared/schemas/wallet"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; diff --git a/src/server/utils/wallets/importGcpKmsWallet.ts b/src/server/utils/wallets/importGcpKmsWallet.ts index d34d1f865..57246ca78 100644 --- a/src/server/utils/wallets/importGcpKmsWallet.ts +++ b/src/server/utils/wallets/importGcpKmsWallet.ts @@ -1,4 +1,4 @@ -import { createWalletDetails } from "../../../shared/db/wallets/createWalletDetails"; +import { createWalletDetails } from "../../../shared/db/wallets/create-wallet-details"; import { WalletType } from "../../../shared/schemas/wallet"; import { thirdwebClient } from "../../../shared/utils/sdk"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; diff --git a/src/shared/db/chainIndexers/getChainIndexer.ts b/src/shared/db/chain-indexers/get-chain-indexer.ts similarity index 100% rename from src/shared/db/chainIndexers/getChainIndexer.ts rename to src/shared/db/chain-indexers/get-chain-indexer.ts diff --git a/src/shared/db/chainIndexers/upsertChainIndexer.ts b/src/shared/db/chain-indexers/upsert-chain-indexer.ts similarity index 100% rename from src/shared/db/chainIndexers/upsertChainIndexer.ts rename to src/shared/db/chain-indexers/upsert-chain-indexer.ts diff --git a/src/shared/db/configuration/getConfiguration.ts b/src/shared/db/configuration/get-configuration.ts similarity index 99% rename from src/shared/db/configuration/getConfiguration.ts rename to src/shared/db/configuration/get-configuration.ts index 5d1698ccd..3635569a0 100644 --- a/src/shared/db/configuration/getConfiguration.ts +++ b/src/shared/db/configuration/get-configuration.ts @@ -15,7 +15,7 @@ import { decrypt } from "../../utils/crypto"; import { env } from "../../utils/env"; import { logger } from "../../utils/logger"; import { prisma } from "../client"; -import { updateConfiguration } from "./updateConfiguration"; +import { updateConfiguration } from "./update-configuration"; const toParsedConfig = async (config: Configuration): Promise => { // We destructure the config to omit wallet related fields to prevent direct access diff --git a/src/shared/db/configuration/updateConfiguration.ts b/src/shared/db/configuration/update-configuration.ts similarity index 100% rename from src/shared/db/configuration/updateConfiguration.ts rename to src/shared/db/configuration/update-configuration.ts diff --git a/src/shared/db/contractEventLogs/createContractEventLogs.ts b/src/shared/db/contract-event-logs/create-contract-event-logs.ts similarity index 100% rename from src/shared/db/contractEventLogs/createContractEventLogs.ts rename to src/shared/db/contract-event-logs/create-contract-event-logs.ts diff --git a/src/shared/db/contractEventLogs/deleteContractEventLogs.ts b/src/shared/db/contract-event-logs/delete-contract-event-logs.ts similarity index 100% rename from src/shared/db/contractEventLogs/deleteContractEventLogs.ts rename to src/shared/db/contract-event-logs/delete-contract-event-logs.ts diff --git a/src/shared/db/contractEventLogs/getContractEventLogs.ts b/src/shared/db/contract-event-logs/get-contract-event-logs.ts similarity index 100% rename from src/shared/db/contractEventLogs/getContractEventLogs.ts rename to src/shared/db/contract-event-logs/get-contract-event-logs.ts diff --git a/src/shared/db/contractSubscriptions/createContractSubscription.ts b/src/shared/db/contract-subscriptions/create-contract-subscription.ts similarity index 100% rename from src/shared/db/contractSubscriptions/createContractSubscription.ts rename to src/shared/db/contract-subscriptions/create-contract-subscription.ts diff --git a/src/shared/db/contractSubscriptions/deleteContractSubscription.ts b/src/shared/db/contract-subscriptions/delete-contract-subscription.ts similarity index 100% rename from src/shared/db/contractSubscriptions/deleteContractSubscription.ts rename to src/shared/db/contract-subscriptions/delete-contract-subscription.ts diff --git a/src/shared/db/contractSubscriptions/getContractSubscriptions.ts b/src/shared/db/contract-subscriptions/get-contract-subscriptions.ts similarity index 100% rename from src/shared/db/contractSubscriptions/getContractSubscriptions.ts rename to src/shared/db/contract-subscriptions/get-contract-subscriptions.ts diff --git a/src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts similarity index 100% rename from src/shared/db/contractTransactionReceipts/createContractTransactionReceipts.ts rename to src/shared/db/contract-transaction-receipts/create-contract-transaction-receipts.ts diff --git a/src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts b/src/shared/db/contract-transaction-receipts/delete-contract-transaction-receipts.ts similarity index 100% rename from src/shared/db/contractTransactionReceipts/deleteContractTransactionReceipts.ts rename to src/shared/db/contract-transaction-receipts/delete-contract-transaction-receipts.ts diff --git a/src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts b/src/shared/db/contract-transaction-receipts/get-contract-transaction-receipts.ts similarity index 100% rename from src/shared/db/contractTransactionReceipts/getContractTransactionReceipts.ts rename to src/shared/db/contract-transaction-receipts/get-contract-transaction-receipts.ts diff --git a/src/shared/db/permissions/deletePermissions.ts b/src/shared/db/permissions/delete-permissions.ts similarity index 100% rename from src/shared/db/permissions/deletePermissions.ts rename to src/shared/db/permissions/delete-permissions.ts diff --git a/src/shared/db/permissions/getPermissions.ts b/src/shared/db/permissions/get-permissions.ts similarity index 100% rename from src/shared/db/permissions/getPermissions.ts rename to src/shared/db/permissions/get-permissions.ts diff --git a/src/shared/db/permissions/updatePermissions.ts b/src/shared/db/permissions/update-permissions.ts similarity index 100% rename from src/shared/db/permissions/updatePermissions.ts rename to src/shared/db/permissions/update-permissions.ts diff --git a/src/shared/db/relayer/getRelayerById.ts b/src/shared/db/relayer/get-relayer-by-id.ts similarity index 100% rename from src/shared/db/relayer/getRelayerById.ts rename to src/shared/db/relayer/get-relayer-by-id.ts diff --git a/src/shared/db/tokens/createToken.ts b/src/shared/db/tokens/create-token.ts similarity index 100% rename from src/shared/db/tokens/createToken.ts rename to src/shared/db/tokens/create-token.ts diff --git a/src/shared/db/tokens/getAccessTokens.ts b/src/shared/db/tokens/get-access-tokens.ts similarity index 100% rename from src/shared/db/tokens/getAccessTokens.ts rename to src/shared/db/tokens/get-access-tokens.ts diff --git a/src/shared/db/tokens/getToken.ts b/src/shared/db/tokens/get-token.ts similarity index 100% rename from src/shared/db/tokens/getToken.ts rename to src/shared/db/tokens/get-token.ts diff --git a/src/shared/db/tokens/revokeToken.ts b/src/shared/db/tokens/revoke-token.ts similarity index 100% rename from src/shared/db/tokens/revokeToken.ts rename to src/shared/db/tokens/revoke-token.ts diff --git a/src/shared/db/tokens/updateToken.ts b/src/shared/db/tokens/update-token.ts similarity index 100% rename from src/shared/db/tokens/updateToken.ts rename to src/shared/db/tokens/update-token.ts diff --git a/src/shared/db/transactions/queueTx.ts b/src/shared/db/transactions/queue-tx.ts similarity index 100% rename from src/shared/db/transactions/queueTx.ts rename to src/shared/db/transactions/queue-tx.ts diff --git a/src/shared/db/wallets/createWalletDetails.ts b/src/shared/db/wallets/create-wallet-details.ts similarity index 100% rename from src/shared/db/wallets/createWalletDetails.ts rename to src/shared/db/wallets/create-wallet-details.ts diff --git a/src/shared/db/wallets/deleteWalletDetails.ts b/src/shared/db/wallets/delete-wallet-details.ts similarity index 100% rename from src/shared/db/wallets/deleteWalletDetails.ts rename to src/shared/db/wallets/delete-wallet-details.ts diff --git a/src/shared/db/wallets/getAllWallets.ts b/src/shared/db/wallets/get-all-wallets.ts similarity index 100% rename from src/shared/db/wallets/getAllWallets.ts rename to src/shared/db/wallets/get-all-wallets.ts diff --git a/src/shared/db/wallets/getWalletDetails.ts b/src/shared/db/wallets/get-wallet-details.ts similarity index 100% rename from src/shared/db/wallets/getWalletDetails.ts rename to src/shared/db/wallets/get-wallet-details.ts diff --git a/src/shared/db/wallets/nonceMap.ts b/src/shared/db/wallets/nonce-map.ts similarity index 100% rename from src/shared/db/wallets/nonceMap.ts rename to src/shared/db/wallets/nonce-map.ts diff --git a/src/shared/db/wallets/updateWalletDetails.ts b/src/shared/db/wallets/update-wallet-details.ts similarity index 100% rename from src/shared/db/wallets/updateWalletDetails.ts rename to src/shared/db/wallets/update-wallet-details.ts diff --git a/src/shared/db/wallets/walletNonce.ts b/src/shared/db/wallets/wallet-nonce.ts similarity index 99% rename from src/shared/db/wallets/walletNonce.ts rename to src/shared/db/wallets/wallet-nonce.ts index 1d7124bd8..44d8e637e 100644 --- a/src/shared/db/wallets/walletNonce.ts +++ b/src/shared/db/wallets/wallet-nonce.ts @@ -9,7 +9,7 @@ import { logger } from "../../utils/logger"; import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; -import { updateNonceMap } from "./nonceMap"; +import { updateNonceMap } from "./nonce-map"; /** * Get all used backend wallets. diff --git a/src/shared/db/webhooks/createWebhook.ts b/src/shared/db/webhooks/create-webhook.ts similarity index 100% rename from src/shared/db/webhooks/createWebhook.ts rename to src/shared/db/webhooks/create-webhook.ts diff --git a/src/shared/db/webhooks/getAllWebhooks.ts b/src/shared/db/webhooks/get-all-webhooks.ts similarity index 100% rename from src/shared/db/webhooks/getAllWebhooks.ts rename to src/shared/db/webhooks/get-all-webhooks.ts diff --git a/src/shared/db/webhooks/getWebhook.ts b/src/shared/db/webhooks/get-webhook.ts similarity index 100% rename from src/shared/db/webhooks/getWebhook.ts rename to src/shared/db/webhooks/get-webhook.ts diff --git a/src/shared/db/webhooks/revokeWebhook.ts b/src/shared/db/webhooks/revoke-webhook.ts similarity index 100% rename from src/shared/db/webhooks/revokeWebhook.ts rename to src/shared/db/webhooks/revoke-webhook.ts diff --git a/src/shared/utils/account.ts b/src/shared/utils/account.ts index ef3d83e68..62262b0c1 100644 --- a/src/shared/utils/account.ts +++ b/src/shared/utils/account.ts @@ -5,7 +5,7 @@ import { getWalletDetails, isSmartBackendWallet, type ParsedWalletDetails, -} from "../db/wallets/getWalletDetails"; +} from "../db/wallets/get-wallet-details"; import { WalletType } from "../schemas/wallet"; import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn"; import { getConnectedSmartWallet } from "../../server/utils/wallets/createSmartWallet"; diff --git a/src/shared/utils/cache/accessToken.ts b/src/shared/utils/cache/accessToken.ts index 992e25ee9..139f16013 100644 --- a/src/shared/utils/cache/accessToken.ts +++ b/src/shared/utils/cache/accessToken.ts @@ -1,6 +1,6 @@ import type { Tokens } from "@prisma/client"; import LRUMap from "mnemonist/lru-map"; -import { getToken } from "../../db/tokens/getToken"; +import { getToken } from "../../db/tokens/get-token"; // Cache an access token JWT to the token object, or null if not found. export const accessTokenCache = new LRUMap(2048); diff --git a/src/shared/utils/cache/authWallet.ts b/src/shared/utils/cache/authWallet.ts index 8af853198..c97735499 100644 --- a/src/shared/utils/cache/authWallet.ts +++ b/src/shared/utils/cache/authWallet.ts @@ -1,5 +1,5 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; -import { updateConfiguration } from "../../db/configuration/updateConfiguration"; +import { updateConfiguration } from "../../db/configuration/update-configuration"; import { env } from "../env"; import { logger } from "../logger"; import { getConfig } from "./getConfig"; diff --git a/src/shared/utils/cache/getConfig.ts b/src/shared/utils/cache/getConfig.ts index f18937576..f88dd75c1 100644 --- a/src/shared/utils/cache/getConfig.ts +++ b/src/shared/utils/cache/getConfig.ts @@ -1,4 +1,4 @@ -import { getConfiguration } from "../../db/configuration/getConfiguration"; +import { getConfiguration } from "../../db/configuration/get-configuration"; import type { ParsedConfig } from "../../schemas/config"; let _config: ParsedConfig | null = null; diff --git a/src/shared/utils/cache/getWallet.ts b/src/shared/utils/cache/getWallet.ts index 520cf924f..7ad7cdecb 100644 --- a/src/shared/utils/cache/getWallet.ts +++ b/src/shared/utils/cache/getWallet.ts @@ -6,7 +6,7 @@ import { WalletDetailsError, getWalletDetails, type ParsedWalletDetails, -} from "../../db/wallets/getWalletDetails"; +} from "../../db/wallets/get-wallet-details"; import type { PrismaTransaction } from "../../schemas/prisma"; import { WalletType } from "../../schemas/wallet"; import { createCustomError } from "../../../server/middleware/error"; diff --git a/src/shared/utils/cache/getWebhook.ts b/src/shared/utils/cache/getWebhook.ts index 1ed9df187..51326d569 100644 --- a/src/shared/utils/cache/getWebhook.ts +++ b/src/shared/utils/cache/getWebhook.ts @@ -1,6 +1,6 @@ import type { Webhooks } from "@prisma/client"; import LRUMap from "mnemonist/lru-map"; -import { getAllWebhooks } from "../../db/webhooks/getAllWebhooks"; +import { getAllWebhooks } from "../../db/webhooks/get-all-webhooks"; import type { WebhooksEventTypes } from "../../schemas/webhooks"; export const webhookCache = new LRUMap(2048); diff --git a/src/shared/utils/prometheus.ts b/src/shared/utils/prometheus.ts index dbada9ad4..21b99132f 100644 --- a/src/shared/utils/prometheus.ts +++ b/src/shared/utils/prometheus.ts @@ -1,6 +1,6 @@ import fastify from "fastify"; import { Counter, Gauge, Histogram, Registry } from "prom-client"; -import { getUsedBackendWallets, inspectNonce } from "../db/wallets/walletNonce"; +import { getUsedBackendWallets, inspectNonce } from "../db/wallets/wallet-nonce"; import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; const nonceMetrics = new Gauge({ diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 2fa58212a..2c3f5280b 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,6 +1,6 @@ import { type Job, type Processor, Worker } from "bullmq"; import type { Address } from "thirdweb"; -import { recycleNonce } from "../../shared/db/wallets/walletNonce"; +import { recycleNonce } from "../../shared/db/wallets/wallet-nonce"; import { isNonceAlreadyUsedError } from "../../shared/utils/error"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index 41bf92288..6951c084d 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -4,10 +4,10 @@ import { getRpcClient, type Address, } from "thirdweb"; -import { getBlockForIndexing } from "../../shared/db/chainIndexers/getChainIndexer"; -import { upsertChainIndexer } from "../../shared/db/chainIndexers/upsertChainIndexer"; +import { getBlockForIndexing } from "../../shared/db/chainIndexers/get-chain-indexer"; +import { upsertChainIndexer } from "../../shared/db/chainIndexers/upsert-chain-indexer"; import { prisma } from "../../shared/db/client"; -import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/get-contract-subscriptions"; import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; import { thirdwebClient } from "../../shared/utils/sdk"; diff --git a/src/worker/tasks/manageChainIndexers.ts b/src/worker/tasks/manageChainIndexers.ts index 787f88116..d7ab46bdf 100644 --- a/src/worker/tasks/manageChainIndexers.ts +++ b/src/worker/tasks/manageChainIndexers.ts @@ -1,4 +1,4 @@ -import { getContractSubscriptionsUniqueChainIds } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { getContractSubscriptionsUniqueChainIds } from "../../shared/db/contractSubscriptions/get-contract-subscriptions"; import { INDEXER_REGISTRY, addChainIndexer, diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index a9d09edc5..631270773 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -14,7 +14,7 @@ import { TransactionDB } from "../../shared/db/transactions/db"; import { recycleNonce, removeSentNonce, -} from "../../shared/db/wallets/walletNonce"; +} from "../../shared/db/wallets/wallet-nonce"; import { getReceiptForEOATransaction, getReceiptForUserOp, diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 2c2ab63a3..0032dec6c 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -3,7 +3,7 @@ import { getAddress, type Address } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, -} from "../../shared/db/wallets/walletNonce"; +} from "../../shared/db/wallets/wallet-nonce"; import { getLastUsedOnchainNonce } from "../../server/routes/admin/nonces"; import { logger } from "../../shared/utils/logger"; import { redis } from "../../shared/utils/redis/redis"; diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 144390076..ed7e76b2b 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -5,7 +5,7 @@ import { isSentNonce, recycleNonce, splitSentNoncesKey, -} from "../../shared/db/wallets/walletNonce"; +} from "../../shared/db/wallets/wallet-nonce"; import { getConfig } from "../../shared/utils/cache/getConfig"; import { getChain } from "../../shared/utils/chain"; import { prettifyError } from "../../shared/utils/error"; diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b1fd0c357..27cd95eac 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -15,8 +15,8 @@ import { type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { bulkInsertContractEventLogs } from "../../shared/db/contractEventLogs/createContractEventLogs"; -import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/getContractSubscriptions"; +import { bulkInsertContractEventLogs } from "../../shared/db/contractEventLogs/create-contract-event-logs"; +import { getContractSubscriptionsByChainId } from "../../shared/db/contractSubscriptions/get-contract-subscriptions"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index 5bfb4e5a0..c2273d0a8 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -12,7 +12,7 @@ import { } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { decodeFunctionData, type Abi, type Hash } from "viem"; -import { bulkInsertContractTransactionReceipts } from "../../shared/db/contractTransactionReceipts/createContractTransactionReceipts"; +import { bulkInsertContractTransactionReceipts } from "../../shared/db/contractTransactionReceipts/create-contract-transaction-receipts"; import { WebhooksEventTypes } from "../../shared/schemas/webhooks"; import { getChain } from "../../shared/utils/chain"; import { logger } from "../../shared/utils/logger"; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index d736c23f3..190622969 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,6 +1,6 @@ import { Worker, type Job, type Processor } from "bullmq"; import { TransactionDB } from "../../shared/db/transactions/db"; -import { pruneNonceMaps } from "../../shared/db/wallets/nonceMap"; +import { pruneNonceMaps } from "../../shared/db/wallets/nonce-map"; import { env } from "../../shared/utils/env"; import { redis } from "../../shared/utils/redis/redis"; import { PruneTransactionsQueue } from "../queues/pruneTransactionsQueue"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 6a340b691..fbe43ccb4 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -24,7 +24,7 @@ import { addSentNonce, recycleNonce, syncLatestNonceFromOnchainIfHigher, -} from "../../shared/db/wallets/walletNonce"; +} from "../../shared/db/wallets/wallet-nonce"; import { getAccount, getSmartBackendWalletAdminAccount, diff --git a/tests/unit/auth.test.ts b/tests/unit/auth.test.ts index 7ea7ab5f2..e6eb1e26f 100644 --- a/tests/unit/auth.test.ts +++ b/tests/unit/auth.test.ts @@ -3,7 +3,7 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { LocalWallet } from "@thirdweb-dev/wallets"; import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken from "jsonwebtoken"; -import { getPermissions } from "../../src/shared/db/permissions/getPermissions"; +import { getPermissions } from "../../src/shared/db/permissions/get-permissions"; import { WebhooksEventTypes } from "../../src/shared/schemas/webhooks"; import { onRequest } from "../../src/server/middleware/auth"; import {